diff --git a/.nx/version-plans/version-plan-1754071902926.md b/.nx/version-plans/version-plan-1754071902926.md new file mode 100644 index 000000000..e15308b2a --- /dev/null +++ b/.nx/version-plans/version-plan-1754071902926.md @@ -0,0 +1,5 @@ +--- +ability-morpho: major +--- + +Added market operations supply and withdrawCollateral. Redefined operation values to clearly distinguish between market and vault operations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cb8c2e456..3a15c4f58 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ The Vincent system consists of several key components: - **ability-debridge**: An ability to utilize cross-chain bridging through Debridge from a Vincent app on behalf of the delegator. - **ability-transaction-signer**: An ability to sign transactions from a Vincent app on behalf of the delegator. - **ability-uniswap-swap**: An ability to trigger swaps on Uniswap from a Vincent app on behalf of the delegator. -- **ability-morpho**: An ability to operate on Morpho vaults from a Vincent app on behalf of the delegator. +- **ability-morpho**: An ability to operate on Morpho vaults and markets from a Vincent app on behalf of the delegator. - **policy-contract-whitelist**: A policy that restricts interactions to a predefined set of whitelisted contract addresses. - **policy-send-counter**: A policy that limits the number of transactions that can be sent within a specific time period. - **mcp-sdk**: A Model Context Protocol Wrapper that converts any Vincent app into an MCP server that can be connected to any LLM client to provide it with Vincent abilities. diff --git a/packages/apps/ability-morpho/CONTRIBUTING.md b/packages/apps/ability-morpho/CONTRIBUTING.md index 81949a176..27253494d 100644 --- a/packages/apps/ability-morpho/CONTRIBUTING.md +++ b/packages/apps/ability-morpho/CONTRIBUTING.md @@ -4,7 +4,7 @@ This document provides guidelines for contributing to the Vincent Ability Morpho ## Overview -The Vincent Ability Morpho is a ability to send deposit, withdraw or redeem Morpho transactions from a Vincent app on behalf of the delegator. It's part of the Vincent Abilities ecosystem and is built using the Vincent Ability SDK. +The Vincent Ability Morpho is a ability to send deposit, withdraw or redeem Morpho vault transactions and supply or withdrawCollateral Morpho market transactions from a Vincent app on behalf of the delegator. It's part of the Vincent Abilities ecosystem and is built using the Vincent Ability SDK. ## Setup diff --git a/packages/apps/ability-morpho/README.md b/packages/apps/ability-morpho/README.md index 4a0c8c277..8cf1602d2 100644 --- a/packages/apps/ability-morpho/README.md +++ b/packages/apps/ability-morpho/README.md @@ -1,11 +1,14 @@ # Vincent Ability Morpho -A ability to interact with Morpho vaults (deposit, withdraw, redeem) from a Vincent app on behalf of the delegator. +An ability to interact with Morpho vaults (deposit, withdraw, redeem) or markets (supply, +withdrawCollateral) from a Vincent app on behalf of the delegator. ## Overview -The Vincent Ability Morpho is part of the Vincent Abilities ecosystem and is built using the Vincent Ability SDK. It allows -Vincent apps to interact with Morpho vaults on behalf of users, enabling seamless integration with DeFi yield +The Vincent Ability Morpho is part of the Vincent Abilities ecosystem and is built using the Vincent +Ability SDK. It allows +Vincent apps to interact with Morpho vaults on behalf of users, enabling seamless integration with +DeFi yield strategies. ## Features @@ -28,7 +31,7 @@ This ability can be used in Vincent apps to interact with Morpho vaults: ```typescript import { getVincentAbilityClient } from '@lit-protocol/vincent-app-sdk/abilityClient'; -import { bundledVincentAbility } from '@lit-protocol/vincent-ability-morpho'; +import { bundledVincentAbility, MorphoOperation } from '@lit-protocol/vincent-ability-morpho'; // One of delegatee signers from your app's Vincent Dashboard const delegateeSigner = new ethers.Wallet('YOUR_DELEGATEE_PRIVATE_KEY'); @@ -41,10 +44,11 @@ const abilityClient = getVincentAbilityClient({ const delegatorPkpEthAddress = '0x09182301238'; // The delegator PKP Eth Address const abilityParams = { - operation: 'deposit', // 'deposit', 'withdraw', or 'redeem' - vaultAddress: '0x1234...', // The Morpho vault address - amount: '1.0', // Amount to deposit/withdraw/redeem - chain: 'base', // The chain where the vault is deployed + operation: MorphoOperation.VAULT_DEPOSIT, // The morpho operation, can apply to vault or market + marketId: '0x1234...', // The market id. Mandatory for market operations + vaultAddress: '0x1234...', // The Morpho vault or market contract address + amount: '1.0', // Amount to deposit/withdraw/redeem in the vault or supply/withdrawCollateral in the market + chain: 'base', // The chain where the contract is deployed onBehalfOf: '0xabcd...', // Optional: address to receive vault shares (defaults to delegator) }; @@ -81,16 +85,22 @@ The ability supports the following operations on Morpho vaults: - **WITHDRAW** - Withdraw assets from a Morpho vault - **REDEEM** - Redeem vault shares for underlying assets +And the following operations on Morpho markets: + +- **SUPPLY** - Supply collateral to a Morpho market to earn yield +- **WITHDRAW_COLLATERAL** - Withdraw collateral from a Morpho market + ## Parameters -| Parameter | Type | Required | Description | -| -------------- | ------------------------------------- | -------- | -------------------------------------------------------- | -| `operation` | `"deposit" \| "withdraw" \| "redeem"` | ✅ | The vault operation to perform | -| `vaultAddress` | `string` | ✅ | Morpho vault contract address (0x format) | -| `amount` | `string` | ✅ | Amount as string (assets for deposit, shares for redeem) | -| `chain` | `string` | ✅ | Chain identifier (e.g., "base") | -| `onBehalfOf` | `string` | ❌ | Address to receive tokens (defaults to sender) | -| `rpcUrl` | `string` | ❌ | Custom RPC URL (for precheck validation) | +| Parameter | Type | Required | Description | +| -------------- | --------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------ | +| `operation` | `"vault_deposit" \| "vault_withdraw" \| "vault_redeem" \| "market_supply" \| "market_withdrawCollateral"` | ✅ | The vault or market operation to perform. Can use `MorphoOperation` enum | +| `marketId` | `string` | ❌ | The market id. Mandatory for market operations | +| `vaultAddress` | `string` | ✅ | Morpho vault contract address (0x format) | +| `amount` | `string` | ✅ | Amount as string (assets for deposit, shares for redeem) | +| `chain` | `string` | ✅ | Chain identifier (e.g., "base") | +| `onBehalfOf` | `string` | ❌ | Address to receive tokens (defaults to sender) | +| `rpcUrl` | `string` | ❌ | Custom RPC URL (for precheck validation) | ## Supported Networks @@ -118,7 +128,8 @@ nx e2e ability-morpho-e2e ## Contributing -Please see [CONTRIBUTING.md](../../../CONTRIBUTING.md) for guidelines on how to contribute to this project. +Please see [CONTRIBUTING.md](../../../CONTRIBUTING.md) for guidelines on how to contribute to this +project. ## License diff --git a/packages/apps/ability-morpho/src/generated/lit-action.js b/packages/apps/ability-morpho/src/generated/lit-action.js index f09e71fac..85c38c269 100644 --- a/packages/apps/ability-morpho/src/generated/lit-action.js +++ b/packages/apps/ability-morpho/src/generated/lit-action.js @@ -2,8 +2,8 @@ * DO NOT EDIT THIS FILE. IT IS GENERATED ON BUILD. * @type {string} */ -const code = "\"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, mod2) => function __require() {\n return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;\n };\n var __export = (target, all3) => {\n for (var name in all3)\n __defProp(target, name, { get: all3[name], enumerable: true });\n };\n var __copyProps = (to, from5, except, desc) => {\n if (from5 && typeof from5 === \"object\" || typeof from5 === \"function\") {\n for (let key of __getOwnPropNames(from5))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from5[key], enumerable: !(desc = __getOwnPropDesc(from5, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __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 || !mod2 || !mod2.__esModule ? __defProp(target, \"default\", { value: mod2, enumerable: true }) : target,\n mod2\n ));\n var __toCommonJS = (mod2) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod2);\n\n // ../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js\n var init_dirname = __esm({\n \"../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/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, array) {\n this.fun = fun;\n this.array = array;\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/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/esbuild-plugin-polyfill-node/polyfills/process.js\n var init_process2 = __esm({\n \"../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/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, isLE2, mLen, nBytes) {\n var e2, 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 = isLE2 ? nBytes - 1 : 0;\n var d5 = isLE2 ? -1 : 1;\n var s4 = buffer2[offset + i3];\n i3 += d5;\n e2 = s4 & (1 << -nBits) - 1;\n s4 >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e2 = e2 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n m2 = e2 & (1 << -nBits) - 1;\n e2 >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n if (e2 === 0) {\n e2 = 1 - eBias;\n } else if (e2 === eMax) {\n return m2 ? NaN : (s4 ? -1 : 1) * Infinity;\n } else {\n m2 = m2 + Math.pow(2, mLen);\n e2 = e2 - eBias;\n }\n return (s4 ? -1 : 1) * m2 * Math.pow(2, e2 - mLen);\n };\n exports$1.write = function(buffer2, value, offset, isLE2, mLen, nBytes) {\n var e2, 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 = isLE2 ? 0 : nBytes - 1;\n var d5 = isLE2 ? 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 e2 = eMax;\n } else {\n e2 = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c4 = Math.pow(2, -e2)) < 1) {\n e2--;\n c4 *= 2;\n }\n if (e2 + eBias >= 1) {\n value += rt / c4;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c4 >= 2) {\n e2++;\n c4 /= 2;\n }\n if (e2 + eBias >= eMax) {\n m2 = 0;\n e2 = eMax;\n } else if (e2 + eBias >= 1) {\n m2 = (value * c4 - 1) * Math.pow(2, mLen);\n e2 = e2 + eBias;\n } else {\n m2 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e2 = 0;\n }\n }\n for (; mLen >= 8; buffer2[offset + i3] = m2 & 255, i3 += d5, m2 /= 256, mLen -= 8) {\n }\n e2 = e2 << mLen | m2;\n eLen += mLen;\n for (; eLen > 0; buffer2[offset + i3] = e2 & 255, i3 += d5, e2 /= 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 (e2) {\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(length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n }\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function Buffer3(arg, encodingOrOffset, length) {\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 from5(arg, encodingOrOffset, length);\n }\n Buffer3.poolSize = 8192;\n function from5(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return fromString3(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, length);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length);\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, length);\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, length);\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, length) {\n return from5(value, encodingOrOffset, length);\n };\n Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer3, Uint8Array);\n function assertSize4(size5) {\n if (typeof size5 !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size5 < 0) {\n throw new RangeError('The value \"' + size5 + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size5, fill, encoding) {\n assertSize4(size5);\n if (size5 <= 0) {\n return createBuffer(size5);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size5).fill(fill, encoding) : createBuffer(size5).fill(fill);\n }\n return createBuffer(size5);\n }\n Buffer3.alloc = function(size5, fill, encoding) {\n return alloc(size5, fill, encoding);\n };\n function allocUnsafe(size5) {\n assertSize4(size5);\n return createBuffer(size5 < 0 ? 0 : checked(size5) | 0);\n }\n Buffer3.allocUnsafe = function(size5) {\n return allocUnsafe(size5);\n };\n Buffer3.allocUnsafeSlow = function(size5) {\n return allocUnsafe(size5);\n };\n function fromString3(string, 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 length = byteLength(string, encoding) | 0;\n let buf = createBuffer(length);\n const actual = buf.write(string, encoding);\n if (actual !== length) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0;\n const buf = createBuffer(length);\n for (let i3 = 0; i3 < length; i3 += 1) {\n buf[i3] = array[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(array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n let buf;\n if (byteOffset === void 0 && length === void 0) {\n buf = new Uint8Array(array);\n } else if (length === void 0) {\n buf = new Uint8Array(array, byteOffset);\n } else {\n buf = new Uint8Array(array, byteOffset, length);\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(length) {\n if (length >= 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 length | 0;\n }\n function SlowBuffer(length) {\n if (+length != length) {\n length = 0;\n }\n return Buffer3.alloc(+length);\n }\n Buffer3.isBuffer = function isBuffer2(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, length) {\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 (length === void 0) {\n length = 0;\n for (i3 = 0; i3 < list.length; ++i3) {\n length += list[i3].length;\n }\n }\n const buffer2 = Buffer3.allocUnsafe(length);\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(string, encoding) {\n if (Buffer3.isBuffer(string)) {\n return string.length;\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength;\n }\n if (typeof string !== \"string\") {\n throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);\n }\n const len = string.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 utf8ToBytes2(string).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(string).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes2(string).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 toString3() {\n const length = this.length;\n if (length === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length);\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, string, offset, length) {\n offset = Number(offset) || 0;\n const remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n const strLen = string.length;\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n let i3;\n for (i3 = 0; i3 < length; ++i3) {\n const parsed = parseInt(string.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, string, offset, length) {\n return blitBuffer(utf8ToBytes2(string, buf.length - offset), buf, offset, length);\n }\n function asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n }\n function base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n }\n function ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n }\n Buffer3.prototype.write = function write(string, offset, length, encoding) {\n if (offset === void 0) {\n encoding = \"utf8\";\n length = this.length;\n offset = 0;\n } else if (length === void 0 && typeof offset === \"string\") {\n encoding = offset;\n length = this.length;\n offset = 0;\n } else if (isFinite(offset)) {\n offset = offset >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length;\n length = 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 (length === void 0 || length > remaining)\n length = remaining;\n if (string.length > 0 && (length < 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, string, offset, length);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string, offset, length);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string, offset, length);\n case \"base64\":\n return base64Write(this, string, offset, length);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string, offset, length);\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 toJSON2() {\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 slice3(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, length) {\n if (offset % 1 !== 0 || offset < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset + ext > length)\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, length, 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 (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n }\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", `>= ${0} and <= ${length}`, 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 utf8ToBytes2(string, units) {\n units = units || Infinity;\n let codePoint;\n const length = string.length;\n let leadSurrogate = null;\n const bytes = [];\n for (let i3 = 0; i3 < length; ++i3) {\n codePoint = string.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 === length) {\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, length) {\n let i3;\n for (i3 = 0; i3 < length; ++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/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js\n var init_buffer2 = __esm({\n \"../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/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(e2) {\n return obj[e2];\n });\n };\n util3.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, 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(array, separator = \" | \") {\n return array.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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\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 = __importDefault2(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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\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 = __importDefault2(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 } = 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 };\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 };\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(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description\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 regex = `${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 regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n }\n function isValidIP2(ip, version8) {\n if ((version8 === \"v4\" || !version8) && ipv4Regex2.test(ip)) {\n return true;\n }\n if ((version8 === \"v6\" || !version8) && 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, version8) {\n if ((version8 === \"v4\" || !version8) && ipv4CidrRegex2.test(ip)) {\n return true;\n }\n if ((version8 === \"v6\" || !version8) && 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 regex = datetimeRegex2(check);\n if (!regex.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 regex = dateRegex2;\n if (!regex.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 regex = timeRegex2(check);\n if (!regex.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(regex, validation, message) {\n return this.refinement((data) => regex.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(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex,\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(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\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(minLength, message) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength, 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 shape2 = this._def.shape();\n const keys = util_js_1.util.objectKeys(shape2);\n this._cached = { shape: shape2, 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: shape2, 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 = shape2[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 shape2 = {};\n for (const key of util_js_1.util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape2[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape2\n });\n }\n omit(mask) {\n const shape2 = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape2[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape2\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 = (shape2, params) => {\n return new ZodObject2({\n shape: () => shape2,\n unknownKeys: \"strip\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.strictCreate = (shape2, params) => {\n return new ZodObject2({\n shape: () => shape2,\n unknownKeys: \"strict\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.lazycreate = (shape2, params) => {\n return new ZodObject2({\n shape: shape2,\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(size5, message) {\n return this.min(size5, message).max(size5, 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((e2) => {\n error.addIssue(makeArgsIssue(args, e2));\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((e2) => {\n error.addIssue(makeReturnsIssue(result, e2));\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 base3 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!(0, parseUtil_js_1.isValid)(base3))\n return parseUtil_js_1.INVALID;\n const result = effect.transform(base3.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((base3) => {\n if (!(0, parseUtil_js_1.isValid)(base3))\n return parseUtil_js_1.INVALID;\n return Promise.resolve(effect.transform(base3.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 __createBinding2 = 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 __exportStar2 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding2(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n __exportStar2(require_errors(), exports3);\n __exportStar2(require_parseUtil(), exports3);\n __exportStar2(require_typeAliases(), exports3);\n __exportStar2(require_util(), exports3);\n __exportStar2(require_types(), exports3);\n __exportStar2(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 __createBinding2 = 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 __setModuleDefault2 = 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 __importStar2 = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 in mod2)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod2, k4))\n __createBinding2(result, mod2, k4);\n }\n __setModuleDefault2(result, mod2);\n return result;\n };\n var __exportStar2 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding2(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.z = void 0;\n var z2 = __importStar2(require_external());\n exports3.z = z2;\n __exportStar2(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 __createBinding2 = 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 __exportStar2 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding2(exports4, m2, p4);\n };\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var index_js_1 = __importDefault2(require_v3());\n __exportStar2(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(version8, options) {\n options = parseOptions(options);\n if (version8 instanceof _SemVer) {\n if (version8.loose === !!options.loose && version8.includePrerelease === !!options.includePrerelease) {\n return version8;\n } else {\n version8 = version8.version;\n }\n } else if (typeof version8 !== \"string\") {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version8}\".`);\n }\n if (version8.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n );\n }\n debug(\"SemVer\", version8, options);\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n const m2 = version8.trim().match(options.loose ? re[t3.LOOSE] : re[t3.FULL]);\n if (!m2) {\n throw new TypeError(`Invalid Version: ${version8}`);\n }\n this.raw = version8;\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 base3 = Number(identifierBase) ? 1 : 0;\n if (this.prerelease.length === 0) {\n this.prerelease = [base3];\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(base3);\n }\n }\n if (identifier) {\n let prerelease = [identifier, base3];\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 = (version8, options, throwErrors = false) => {\n if (version8 instanceof SemVer) {\n return version8;\n }\n try {\n return new SemVer(version8, 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 = (version8, options) => {\n const v2 = parse(version8, 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 clean2 = (version8, options) => {\n const s4 = parse(version8.trim().replace(/^[=v]+/, \"\"), options);\n return s4 ? s4.version : null;\n };\n module.exports = clean2;\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 = (version8, 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 version8 instanceof SemVer ? version8.version : version8,\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 = (version8, options) => {\n const parsed = parse(version8, 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 = (version8, options) => {\n if (version8 instanceof SemVer) {\n return version8;\n }\n if (typeof version8 === \"number\") {\n version8 = String(version8);\n }\n if (typeof version8 !== \"string\") {\n return null;\n }\n options = options || {};\n let match = null;\n if (!options.rtl) {\n match = version8.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(version8)) && (!match || match.index + match[0].length !== version8.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(version8) {\n if (!version8) {\n return false;\n }\n if (typeof version8 === \"string\") {\n try {\n version8 = new SemVer(version8, 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], version8, 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, from5, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from5 = \"\";\n } else if (isX(fm)) {\n from5 = `>=${fM}.0.0${incPr ? \"-0\" : \"\"}`;\n } else if (isX(fp)) {\n from5 = `>=${fM}.${fm}.0${incPr ? \"-0\" : \"\"}`;\n } else if (fpr) {\n from5 = `>=${from5}`;\n } else {\n from5 = `>=${from5}${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 `${from5} ${to}`.trim();\n };\n var testSet = (set, version8, options) => {\n for (let i3 = 0; i3 < set.length; i3++) {\n if (!set[i3].test(version8)) {\n return false;\n }\n }\n if (version8.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 === version8.major && allowed.minor === version8.minor && allowed.patch === version8.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(version8) {\n debug(\"Comparator.test\", version8, this.options.loose);\n if (this.semver === ANY || version8 === ANY) {\n return true;\n }\n if (typeof version8 === \"string\") {\n try {\n version8 = new SemVer(version8, this.options);\n } catch (er) {\n return false;\n }\n }\n return cmp(version8, 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 = (version8, range, options) => {\n try {\n range = new Range(range, options);\n } catch (er) {\n return false;\n }\n return range.test(version8);\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 = (version8, range, hilo, options) => {\n version8 = new SemVer(version8, 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(version8, 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(version8, low.semver)) {\n return false;\n } else if (low.operator === ecomp && ltfn(version8, 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 = (version8, range, options) => outside(version8, 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 = (version8, range, options) => outside(version8, 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 version8 of v2) {\n const included = satisfies(version8, range, options);\n if (included) {\n prev = version8;\n if (!first) {\n first = version8;\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 clean2 = 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: clean2,\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 assert4(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits2(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(number, base3, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number !== null) {\n if (base3 === \"le\" || base3 === \"be\") {\n endian = base3;\n base3 = 10;\n }\n this._init(number || 0, base3 || 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 (e2) {\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 init2(number, base3, endian) {\n if (typeof number === \"number\") {\n return this._initNumber(number, base3, endian);\n }\n if (typeof number === \"object\") {\n return this._initArray(number, base3, endian);\n }\n if (base3 === \"hex\") {\n base3 = 16;\n }\n assert4(base3 === (base3 | 0) && base3 >= 2 && base3 <= 36);\n number = number.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number.length) {\n if (base3 === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base3, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base3, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number, base3, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 67108864) {\n this.words = [number & 67108863];\n this.length = 1;\n } else if (number < 4503599627370496) {\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert4(number < 9007199254740992);\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base3, endian);\n };\n BN.prototype._initArray = function _initArray(number, base3, endian) {\n assert4(typeof number.length === \"number\");\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number.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 = number.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number[i3] | number[i3 - 1] << 8 | number[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 < number.length; i3 += 3) {\n w3 = number[i3] | number[i3 + 1] << 8 | number[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(string, index2) {\n var c4 = string.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 assert4(false, \"Invalid character in \" + string);\n }\n }\n function parseHexByte(string, lowerBound, index2) {\n var r2 = parseHex4Bits(string, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number, start, endian) {\n this.length = Math.ceil((number.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 = number.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number, 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 = number.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number.length; i3 += 2) {\n w3 = parseHexByte(number, 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 assert4(c4 >= 0 && b4 < mul, \"Invalid character\");\n r2 += b4;\n }\n return r2;\n }\n BN.prototype._parseBase = function _parseBase(number, base3, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base3) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base3 | 0;\n var total = number.length - start;\n var mod2 = total % limbLen;\n var end = Math.min(total, total - mod2) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number, i3, i3 + limbLen, base3);\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 (mod2 !== 0) {\n var pow = 1;\n word = parseBase(number, i3, number.length, base3);\n for (i3 = 0; i3 < mod2; i3++) {\n pow *= base3;\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(size5) {\n while (this.length < size5) {\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 (e2) {\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 toString3(base3, padding) {\n base3 = base3 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base3 === 16 || base3 === \"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 (base3 === (base3 | 0) && base3 >= 2 && base3 <= 36) {\n var groupSize = groupSizes[base3];\n var groupBase = groupBases[base3];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modrn(groupBase).toString(base3);\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 assert4(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber2() {\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 assert4(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON2() {\n return this.toString(16, 2);\n };\n if (Buffer3) {\n BN.prototype.toBuffer = function toBuffer(endian, length) {\n return this.toArrayLike(Buffer3, endian, length);\n };\n }\n BN.prototype.toArray = function toArray2(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n var allocate = function allocate2(ArrayType, size5) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size5);\n }\n return new ArrayType(size5);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert4(byteLength <= reqLength, \"byte array longer than desired length\");\n assert4(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 assert4((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 assert4((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 assert4((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 assert4(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 assert4(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 assert4(carry === 0);\n assert4((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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(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 assert4(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert4(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 assert4(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 assert4(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 assert4(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert4(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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(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 assert4(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod2, 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 mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.iadd(num2);\n }\n }\n return {\n div,\n mod: mod2\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 mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod2\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 mod2(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 mod2 = 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 = mod2.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 assert4(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 assert4(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 assert4(p4.negative === 0);\n assert4(!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 assert4(p4.negative === 0);\n assert4(!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 assert4(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 assert4(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 assert4(!this.red, \"Already a number in reduction context\");\n assert4(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert4(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 assert4(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert4(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert4(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert4(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert4(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert4(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 split3(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 inherits2(K256, MPrime);\n K256.prototype.split = function split3(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 inherits2(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits2(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits2(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 assert4(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 assert4(a3.negative === 0, \"red works only with positives\");\n assert4(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert4((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert4(\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 assert4(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 assert4(!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 assert4(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 inherits2(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 _permanentCensorErrors3 = false;\n var _censorErrors3 = false;\n var LogLevels3 = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\n var _logLevel3 = LogLevels3[\"default\"];\n var _version_1 = require_version();\n var _globalLogger3 = null;\n function _checkNormalize3() {\n try {\n var missing_1 = [];\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach(function(form2) {\n try {\n if (\"test\".normalize(form2) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n } catch (error) {\n missing_1.push(form2);\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 _normalizeError3 = _checkNormalize3();\n var LogLevel4;\n (function(LogLevel5) {\n LogLevel5[\"DEBUG\"] = \"DEBUG\";\n LogLevel5[\"INFO\"] = \"INFO\";\n LogLevel5[\"WARNING\"] = \"WARNING\";\n LogLevel5[\"ERROR\"] = \"ERROR\";\n LogLevel5[\"OFF\"] = \"OFF\";\n })(LogLevel4 = exports3.LogLevel || (exports3.LogLevel = {}));\n var ErrorCode3;\n (function(ErrorCode4) {\n ErrorCode4[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n ErrorCode4[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n ErrorCode4[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n ErrorCode4[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n ErrorCode4[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n ErrorCode4[\"TIMEOUT\"] = \"TIMEOUT\";\n ErrorCode4[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n ErrorCode4[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ErrorCode4[\"MISSING_NEW\"] = \"MISSING_NEW\";\n ErrorCode4[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n ErrorCode4[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n ErrorCode4[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ErrorCode4[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n ErrorCode4[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n ErrorCode4[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n ErrorCode4[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n ErrorCode4[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n ErrorCode4[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ErrorCode4[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n })(ErrorCode3 = exports3.ErrorCode || (exports3.ErrorCode = {}));\n var HEX4 = \"0123456789abcdef\";\n var Logger4 = (\n /** @class */\n function() {\n function Logger5(version8) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version8,\n writable: false\n });\n }\n Logger5.prototype._log = function(logLevel, args) {\n var level = logLevel.toLowerCase();\n if (LogLevels3[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel3 > LogLevels3[level]) {\n return;\n }\n console.log.apply(console, args);\n };\n Logger5.prototype.debug = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger5.levels.DEBUG, args);\n };\n Logger5.prototype.info = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger5.levels.INFO, args);\n };\n Logger5.prototype.warn = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger5.levels.WARNING, args);\n };\n Logger5.prototype.makeError = function(message, code, params) {\n if (_censorErrors3) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger5.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 += HEX4[value[i3] >> 4];\n hex += HEX4[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 ErrorCode3.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 ErrorCode3.CALL_EXCEPTION:\n case ErrorCode3.INSUFFICIENT_FUNDS:\n case ErrorCode3.MISSING_NEW:\n case ErrorCode3.NONCE_EXPIRED:\n case ErrorCode3.REPLACEMENT_UNDERPRICED:\n case ErrorCode3.TRANSACTION_REPLACED:\n case ErrorCode3.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 Logger5.prototype.throwError = function(message, code, params) {\n throw this.makeError(message, code, params);\n };\n Logger5.prototype.throwArgumentError = function(message, name, value) {\n return this.throwError(message, Logger5.errors.INVALID_ARGUMENT, {\n argument: name,\n value\n });\n };\n Logger5.prototype.assert = function(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n };\n Logger5.prototype.assertArgument = function(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n };\n Logger5.prototype.checkNormalize = function(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError3) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger5.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\",\n form: _normalizeError3\n });\n }\n };\n Logger5.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, Logger5.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value\n });\n }\n if (value % 1) {\n this.throwError(message, Logger5.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value\n });\n }\n };\n Logger5.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, Logger5.errors.MISSING_ARGUMENT, {\n count,\n expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger5.errors.UNEXPECTED_ARGUMENT, {\n count,\n expectedCount\n });\n }\n };\n Logger5.prototype.checkNew = function(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger5.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger5.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\", Logger5.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger5.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger5.globalLogger = function() {\n if (!_globalLogger3) {\n _globalLogger3 = new Logger5(_version_1.version);\n }\n return _globalLogger3;\n };\n Logger5.setCensorship = function(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger5.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors3) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger5.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors3 = !!censorship;\n _permanentCensorErrors3 = !!permanent;\n };\n Logger5.setLogLevel = function(logLevel) {\n var level = LogLevels3[logLevel.toLowerCase()];\n if (level == null) {\n Logger5.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel3 = level;\n };\n Logger5.from = function(version8) {\n return new Logger5(version8);\n };\n Logger5.errors = ErrorCode3;\n Logger5.levels = LogLevel4;\n return Logger5;\n }()\n );\n exports3.Logger = Logger4;\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 logger3 = new logger_1.Logger(_version_1.version);\n function isHexable(value) {\n return !!value.toHexString;\n }\n function addSlice(array) {\n if (array.slice) {\n return array;\n }\n array.slice = function() {\n var args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n };\n return array;\n }\n function isBytesLike2(value) {\n return isHexString2(value) && !(value.length % 2) || isBytes5(value);\n }\n exports3.isBytesLike = isBytesLike2;\n function isInteger(value) {\n return typeof value === \"number\" && value == value && value % 1 === 0;\n }\n function isBytes5(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 = isBytes5;\n function arrayify2(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger3.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 (isHexString2(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 logger3.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 (isBytes5(value)) {\n return addSlice(new Uint8Array(value));\n }\n return logger3.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n }\n exports3.arrayify = arrayify2;\n function concat5(items) {\n var objects = items.map(function(item) {\n return arrayify2(item);\n });\n var length = objects.reduce(function(accum, item) {\n return accum + item.length;\n }, 0);\n var result = new Uint8Array(length);\n objects.reduce(function(offset, object) {\n result.set(object, offset);\n return offset + object.length;\n }, 0);\n return addSlice(result);\n }\n exports3.concat = concat5;\n function stripZeros2(value) {\n var result = arrayify2(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 = stripZeros2;\n function zeroPad2(value, length) {\n value = arrayify2(value);\n if (value.length > length) {\n logger3.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n var result = new Uint8Array(length);\n result.set(value, length - value.length);\n return addSlice(result);\n }\n exports3.zeroPad = zeroPad2;\n function isHexString2(value, length) {\n if (typeof value !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (length && value.length !== 2 + 2 * length) {\n return false;\n }\n return true;\n }\n exports3.isHexString = isHexString2;\n var HexCharacters = \"0123456789abcdef\";\n function hexlify2(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger3.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 (isHexString2(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 logger3.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return value.toLowerCase();\n }\n if (isBytes5(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 logger3.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n }\n exports3.hexlify = hexlify2;\n function hexDataLength2(data) {\n if (typeof data !== \"string\") {\n data = hexlify2(data);\n } else if (!isHexString2(data) || data.length % 2) {\n return null;\n }\n return (data.length - 2) / 2;\n }\n exports3.hexDataLength = hexDataLength2;\n function hexDataSlice2(data, offset, endOffset) {\n if (typeof data !== \"string\") {\n data = hexlify2(data);\n } else if (!isHexString2(data) || data.length % 2) {\n logger3.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 = hexDataSlice2;\n function hexConcat2(items) {\n var result = \"0x\";\n items.forEach(function(item) {\n result += hexlify2(item).substring(2);\n });\n return result;\n }\n exports3.hexConcat = hexConcat2;\n function hexValue3(value) {\n var trimmed = hexStripZeros2(hexlify2(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") {\n return \"0x0\";\n }\n return trimmed;\n }\n exports3.hexValue = hexValue3;\n function hexStripZeros2(value) {\n if (typeof value !== \"string\") {\n value = hexlify2(value);\n }\n if (!isHexString2(value)) {\n logger3.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 = hexStripZeros2;\n function hexZeroPad2(value, length) {\n if (typeof value !== \"string\") {\n value = hexlify2(value);\n } else if (!isHexString2(value)) {\n logger3.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n if (value.length > 2 * length + 2) {\n logger3.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n while (value.length < 2 * length + 2) {\n value = \"0x0\" + value.substring(2);\n }\n return value;\n }\n exports3.hexZeroPad = hexZeroPad2;\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 (isBytesLike2(signature)) {\n var bytes = arrayify2(signature);\n if (bytes.length === 64) {\n result.v = 27 + (bytes[32] >> 7);\n bytes[32] &= 127;\n result.r = hexlify2(bytes.slice(0, 32));\n result.s = hexlify2(bytes.slice(32, 64));\n } else if (bytes.length === 65) {\n result.r = hexlify2(bytes.slice(0, 32));\n result.s = hexlify2(bytes.slice(32, 64));\n result.v = bytes[64];\n } else {\n logger3.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 logger3.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 = hexlify2(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 = zeroPad2(arrayify2(result._vs), 32);\n result._vs = hexlify2(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 logger3.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n vs_1[0] &= 127;\n var s4 = hexlify2(vs_1);\n if (result.s == null) {\n result.s = s4;\n } else if (result.s !== s4) {\n logger3.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger3.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 logger3.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n if (result.r == null || !isHexString2(result.r)) {\n logger3.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n } else {\n result.r = hexZeroPad2(result.r, 32);\n }\n if (result.s == null || !isHexString2(result.s)) {\n logger3.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n } else {\n result.s = hexZeroPad2(result.s, 32);\n }\n var vs = arrayify2(result.s);\n if (vs[0] >= 128) {\n logger3.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) {\n vs[0] |= 128;\n }\n var _vs = hexlify2(vs);\n if (result._vs) {\n if (!isHexString2(result._vs)) {\n logger3.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad2(result._vs, 32);\n }\n if (result._vs == null) {\n result._vs = _vs;\n } else if (result._vs !== _vs) {\n logger3.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 joinSignature2(signature) {\n signature = splitSignature2(signature);\n return hexlify2(concat5([\n signature.r,\n signature.s,\n signature.recoveryParam ? \"0x1c\" : \"0x1b\"\n ]));\n }\n exports3.joinSignature = joinSignature2;\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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._base16To36 = exports3._base36To16 = exports3.BigNumber = exports3.isBigNumberish = void 0;\n var bn_js_1 = __importDefault2(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 logger3 = new logger_1.Logger(_version_1.version);\n var _constructorGuard = {};\n var MAX_SAFE = 9007199254740991;\n function isBigNumberish2(value) {\n return value != null && (BigNumber3.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 BigNumber3 = (\n /** @class */\n function() {\n function BigNumber4(constructorGuard, hex) {\n if (constructorGuard !== _constructorGuard) {\n logger3.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 BigNumber4.prototype.fromTwos = function(value) {\n return toBigNumber(toBN(this).fromTwos(value));\n };\n BigNumber4.prototype.toTwos = function(value) {\n return toBigNumber(toBN(this).toTwos(value));\n };\n BigNumber4.prototype.abs = function() {\n if (this._hex[0] === \"-\") {\n return BigNumber4.from(this._hex.substring(1));\n }\n return this;\n };\n BigNumber4.prototype.add = function(other) {\n return toBigNumber(toBN(this).add(toBN(other)));\n };\n BigNumber4.prototype.sub = function(other) {\n return toBigNumber(toBN(this).sub(toBN(other)));\n };\n BigNumber4.prototype.div = function(other) {\n var o5 = BigNumber4.from(other);\n if (o5.isZero()) {\n throwFault(\"division-by-zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n };\n BigNumber4.prototype.mul = function(other) {\n return toBigNumber(toBN(this).mul(toBN(other)));\n };\n BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.prototype.eq = function(other) {\n return toBN(this).eq(toBN(other));\n };\n BigNumber4.prototype.lt = function(other) {\n return toBN(this).lt(toBN(other));\n };\n BigNumber4.prototype.lte = function(other) {\n return toBN(this).lte(toBN(other));\n };\n BigNumber4.prototype.gt = function(other) {\n return toBN(this).gt(toBN(other));\n };\n BigNumber4.prototype.gte = function(other) {\n return toBN(this).gte(toBN(other));\n };\n BigNumber4.prototype.isNegative = function() {\n return this._hex[0] === \"-\";\n };\n BigNumber4.prototype.isZero = function() {\n return toBN(this).isZero();\n };\n BigNumber4.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 BigNumber4.prototype.toBigInt = function() {\n try {\n return BigInt(this.toString());\n } catch (e2) {\n }\n return logger3.throwError(\"this platform does not support BigInt\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n };\n BigNumber4.prototype.toString = function() {\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger3.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n } else if (arguments[0] === 16) {\n logger3.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n } else {\n logger3.throwError(\"BigNumber.toString does not accept parameters\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n }\n }\n return toBN(this).toString(10);\n };\n BigNumber4.prototype.toHexString = function() {\n return this._hex;\n };\n BigNumber4.prototype.toJSON = function(key) {\n return { type: \"BigNumber\", hex: this.toHexString() };\n };\n BigNumber4.from = function(value) {\n if (value instanceof BigNumber4) {\n return value;\n }\n if (typeof value === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber4(_constructorGuard, toHex3(value));\n }\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber4(_constructorGuard, toHex3(new BN(value)));\n }\n return logger3.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 BigNumber4.from(String(value));\n }\n var anyValue = value;\n if (typeof anyValue === \"bigint\") {\n return BigNumber4.from(anyValue.toString());\n }\n if ((0, bytes_1.isBytes)(anyValue)) {\n return BigNumber4.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 BigNumber4.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 BigNumber4.from(hex);\n }\n }\n }\n }\n return logger3.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n };\n BigNumber4.isBigNumber = function(value) {\n return !!(value && value._isBigNumber);\n };\n return BigNumber4;\n }()\n );\n exports3.BigNumber = BigNumber3;\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 logger3.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 BigNumber3.from(toHex3(value));\n }\n function toBN(value) {\n var hex = BigNumber3.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 logger3.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 logger3 = 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 logger3.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 (e2) {\n }\n }\n if (typeof decimals === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return \"1\" + zeros.substring(0, decimals);\n }\n return logger3.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 logger3.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 logger3.throwArgumentError(\"missing value\", \"value\", value);\n }\n var comps = value.split(\".\");\n if (comps.length > 2) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n if (decimals > 80) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = new logger_1.Logger(_version_1.version);\n function defineReadOnly2(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value,\n writable: false\n });\n }\n exports3.defineReadOnly = defineReadOnly2;\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 resolveProperties3(object) {\n return __awaiter3(this, void 0, void 0, function() {\n var promises, results;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n promises = Object.keys(object).map(function(key) {\n var value = object[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 = _a2.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 = resolveProperties3;\n function checkProperties(object, properties) {\n if (!object || typeof object !== \"object\") {\n logger3.throwArgumentError(\"invalid object\", \"object\", object);\n }\n Object.keys(object).forEach(function(key) {\n if (!properties[key]) {\n logger3.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n }\n exports3.checkProperties = checkProperties;\n function shallowCopy(object) {\n var result = {};\n for (var key in object) {\n result[key] = object[key];\n }\n return result;\n }\n exports3.shallowCopy = shallowCopy;\n var opaque2 = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n function _isFrozen2(object) {\n if (object === void 0 || object === null || opaque2[typeof object]) {\n return true;\n }\n if (Array.isArray(object) || typeof object === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n var keys = Object.keys(object);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var value = null;\n try {\n value = object[keys[i3]];\n } catch (error) {\n continue;\n }\n if (!_isFrozen2(value)) {\n return false;\n }\n }\n return true;\n }\n return logger3.throwArgumentError(\"Cannot deepCopy \" + typeof object, \"object\", object);\n }\n function _deepCopy2(object) {\n if (_isFrozen2(object)) {\n return object;\n }\n if (Array.isArray(object)) {\n return Object.freeze(object.map(function(item) {\n return deepCopy2(item);\n }));\n }\n if (typeof object === \"object\") {\n var result = {};\n for (var key in object) {\n var value = object[key];\n if (value === void 0) {\n continue;\n }\n defineReadOnly2(result, key, deepCopy2(value));\n }\n return result;\n }\n return logger3.throwArgumentError(\"Cannot deepCopy \" + typeof object, \"object\", object);\n }\n function deepCopy2(object) {\n return _deepCopy2(object);\n }\n exports3.deepCopy = deepCopy2;\n var Description = (\n /** @class */\n /* @__PURE__ */ function() {\n function Description2(info) {\n for (var key in info) {\n this[key] = deepCopy2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 logger3.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n }\n function parseParamType(param, allowIndexed) {\n var originalParam = param;\n function throwError(i4) {\n logger3.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 logger3.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(object, params) {\n for (var key in params) {\n (0, properties_1.defineReadOnly)(object, 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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 __extends2(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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n return result;\n }\n var ConstructorFragment = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n var state = verifyState(value);\n if (state.constant) {\n logger3.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 logger3.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 __extends2(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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n var parens = comps[0].match(regexParen);\n if (!parens) {\n logger3.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 logger3.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 logger3.throwArgumentError(\"cannot specify user defined \" + sig + \" error\", \"fragment\", fragment);\n }\n return fragment;\n }\n var ErrorFragment = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3 = new logger_1.Logger(_version_1.version);\n function checkResultErrors(result) {\n var errors = [];\n var checkErrors = function(path, object) {\n if (!Array.isArray(object)) {\n return;\n }\n for (var key in object) {\n var childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object[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 logger3.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 logger3.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, length, loose) {\n var alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length <= this._data.length) {\n alignedLength = length;\n } else {\n logger3.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(length, loose) {\n var bytes = this._peekBytes(0, length, !!loose);\n this._offset += bytes.length;\n return bytes.slice(0, length);\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 Keccak2(bits2, padding, bits2).update(message)[outputType]();\n };\n };\n var createShakeOutputMethod = function(bits2, padding, outputType) {\n return function(message, outputBits) {\n return new Keccak2(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 Keccak2(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 Keccak2(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 Keccak2(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 Keccak2(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 Keccak2.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, length = message.length, blockCount = this.blockCount, index2 = 0, s4 = this.s, i4, code;\n while (index2 < length) {\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 < length && i4 < byteCount; ++index2) {\n blocks[i4 >> 2] |= message[index2] << SHIFT[i4++ & 3];\n }\n } else {\n for (i4 = this.start; index2 < length && 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 Keccak2.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 Keccak2.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, length = str.length;\n if (notString) {\n bytes = length;\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 Keccak2.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 Keccak2.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 Keccak2.prototype.toString = Keccak2.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 Keccak2.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 array = new Uint32Array(buffer2);\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n array[j3] = s4[i4];\n }\n if (j3 % blockCount === 0) {\n f6(s4);\n }\n }\n if (extraBytes) {\n array[i4] = s4[i4];\n buffer2 = buffer2.slice(0, bytes);\n }\n return buffer2;\n };\n Keccak2.prototype.buffer = Keccak2.prototype.arrayBuffer;\n Keccak2.prototype.digest = Keccak2.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 array = [], 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 array[offset] = block & 255;\n array[offset + 1] = block >> 8 & 255;\n array[offset + 2] = block >> 16 & 255;\n array[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 array[offset] = block & 255;\n if (extraBytes > 1) {\n array[offset + 1] = block >> 8 & 255;\n }\n if (extraBytes > 2) {\n array[offset + 2] = block >> 16 & 255;\n }\n }\n return array;\n };\n function Kmac(bits2, padding, outputBits) {\n Keccak2.call(this, bits2, padding, outputBits);\n }\n Kmac.prototype = new Keccak2();\n Kmac.prototype.finalize = function() {\n this.encode(this.outputBits, true);\n return Keccak2.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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.keccak256 = void 0;\n var js_sha3_1 = __importDefault2(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 logger3 = 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, length) {\n var result = 0;\n for (var i3 = 0; i3 < length; i3++) {\n result = result * 256 + data[offset + i3];\n }\n return result;\n }\n function _encode(object) {\n if (Array.isArray(object)) {\n var payload_1 = [];\n object.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)(object)) {\n logger3.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object);\n }\n var data = Array.prototype.slice.call((0, bytes_1.arrayify)(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 var length = arrayifyInteger(data.length);\n length.unshift(183 + length.length);\n return length.concat(data);\n }\n function encode7(object) {\n return (0, bytes_1.hexlify)(_encode(object));\n }\n exports3.encode = encode7;\n function _decodeChildren(data, offset, childOffset, length) {\n var result = [];\n while (childOffset < offset + 1 + length) {\n var decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length) {\n logger3.throwError(\"child data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n }\n return { consumed: 1 + length, result };\n }\n function _decode(data, offset) {\n if (data.length === 0) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3 = new logger_1.Logger(_version_1.version);\n function getChecksumAddress(address) {\n if (!(0, bytes_1.isHexString)(address, 20)) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 from5 = null;\n try {\n from5 = getAddress3(transaction.from);\n } catch (error) {\n logger3.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)([from5, nonce])), 12));\n }\n exports3.getContractAddress = getContractAddress3;\n function getCreate2Address2(from5, salt, initCodeHash) {\n if ((0, bytes_1.hexDataLength)(salt) !== 32) {\n logger3.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if ((0, bytes_1.hexDataLength)(initCodeHash) !== 32) {\n logger3.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(from5), 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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n if (coders.length !== arrayValues.length) {\n logger3.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 length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\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 __extends2(ArrayCoder2, _super);\n function ArrayCoder2(coder, length, localName) {\n var _this = this;\n var type = coder.type + \"[\" + (length >= 0 ? length : \"\") + \"]\";\n var dynamic = length === -1 || coder.dynamic;\n _this = _super.call(this, \"array\", type, localName, dynamic) || this;\n _this.coder = coder;\n _this.length = length;\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 logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(FixedBytesCoder2, _super);\n function FixedBytesCoder2(size5, localName) {\n var _this = this;\n var name = \"bytes\" + String(size5);\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size5;\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(NumberCoder2, _super);\n function NumberCoder2(size5, signed, localName) {\n var _this = this;\n var name = (signed ? \"int\" : \"uint\") + size5 * 8;\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size5;\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 logger3 = new logger_1.Logger(_version_1.version);\n var UnicodeNormalizationForm2;\n (function(UnicodeNormalizationForm3) {\n UnicodeNormalizationForm3[\"current\"] = \"\";\n UnicodeNormalizationForm3[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm3[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm3[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm3[\"NFKD\"] = \"NFKD\";\n })(UnicodeNormalizationForm2 = exports3.UnicodeNormalizationForm || (exports3.UnicodeNormalizationForm = {}));\n var Utf8ErrorReason2;\n (function(Utf8ErrorReason3) {\n Utf8ErrorReason3[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n Utf8ErrorReason3[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n Utf8ErrorReason3[\"OVERRUN\"] = \"string overrun\";\n Utf8ErrorReason3[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n Utf8ErrorReason3[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n Utf8ErrorReason3[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n Utf8ErrorReason3[\"OVERLONG\"] = \"overlong representation\";\n })(Utf8ErrorReason2 = exports3.Utf8ErrorReason || (exports3.Utf8ErrorReason = {}));\n function errorFunc2(reason, offset, bytes, output, badCodepoint) {\n return logger3.throwArgumentError(\"invalid codepoint at offset \" + offset + \"; \" + reason, \"bytes\", bytes);\n }\n function ignoreFunc2(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason2.BAD_PREFIX || reason === Utf8ErrorReason2.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 === Utf8ErrorReason2.OVERRUN) {\n return bytes.length - offset - 1;\n }\n return 0;\n }\n function replaceFunc2(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason2.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n output.push(65533);\n return ignoreFunc2(reason, offset, bytes, output, badCodepoint);\n }\n exports3.Utf8ErrorFuncs = Object.freeze({\n error: errorFunc2,\n ignore: ignoreFunc2,\n replace: replaceFunc2\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(Utf8ErrorReason2.UNEXPECTED_CONTINUE, i3 - 1, bytes, result);\n } else {\n i3 += onError(Utf8ErrorReason2.BAD_PREFIX, i3 - 1, bytes, result);\n }\n continue;\n }\n if (i3 - 1 + extraLength >= bytes.length) {\n i3 += onError(Utf8ErrorReason2.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(Utf8ErrorReason2.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(Utf8ErrorReason2.OUT_OF_RANGE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res >= 55296 && res <= 57343) {\n i3 += onError(Utf8ErrorReason2.UTF16_SURROGATE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res <= overlongMask) {\n i3 += onError(Utf8ErrorReason2.OVERLONG, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n }\n function toUtf8Bytes(str, form2) {\n if (form2 === void 0) {\n form2 = UnicodeNormalizationForm2.current;\n }\n if (form2 != UnicodeNormalizationForm2.current) {\n logger3.checkNormalize();\n str = str.normalize(form2);\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, form2) {\n if (form2 === void 0) {\n form2 = UnicodeNormalizationForm2.current;\n }\n return getUtf8CodePoints(toUtf8Bytes(str, form2));\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 length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n return (0, utf8_1.toUtf8String)(data.slice(0, length));\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 bytes22(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 createTable2(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 createRangeTable2(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 = createRangeTable2(\"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 = createTable2(\"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 = createTable2(\"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 = createTable2(\"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\", bytes22);\n var Table_C_ranges = createRangeTable2(\"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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 logger3 = 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 size5 = parseInt(match[2] || \"256\");\n if (size5 === 0 || size5 > 256 || size5 % 8 !== 0) {\n logger3.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new number_1.NumberCoder(size5 / 8, match[1] === \"int\", param.name);\n }\n match = param.type.match(paramTypeBytes);\n if (match) {\n var size5 = parseInt(match[1]);\n if (size5 === 0 || size5 > 32) {\n logger3.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new fixed_bytes_1.FixedBytesCoder(size5, param.name);\n }\n return logger3.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 logger3.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 encode7(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 = encode7;\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(array, depth) {\n if (depth == null) {\n depth = 1;\n }\n var result = [];\n var forEach2 = result.forEach;\n var flatDeep = function(arr, depth2) {\n forEach2.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(array, depth);\n return result;\n }\n function fromEntries(array) {\n var result = {};\n for (var i3 = 0; i3 < array.length; i3++) {\n var value = array[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, _a2 = name.split(\".\"); _i < _a2.length; _i++) {\n var label = _a2[_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(normalize3(name, filter_fe0f));\n }\n exports3.ens_normalize = ens_normalize;\n function normalize3(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 _a2;\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 = (_a2 = node.branches.find(function(x4) {\n return x4.set.has(cp);\n })) === null || _a2 === void 0 ? void 0 : _a2.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 logger3 = 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 logger3.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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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(_a2) {\n var name2 = _a2.name, type = _a2.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"missing primary type\", \"types\", types);\n } else if (primaryTypes.length > 1) {\n logger3.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 logger3.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 logger3.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(_a2) {\n var name = _a2.name, type2 = _a2.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 logger3.throwArgumentError(\"unknown type: \" + type, \"type\", type);\n };\n TypedDataEncoder2.prototype.encodeType = function(name) {\n var result = this._types[name];\n if (!result) {\n logger3.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 logger3.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, _a2) {\n var name = _a2.name, type2 = _a2.type;\n accum[name] = _this._visit(type2, value[name], callback);\n return accum;\n }, {});\n }\n return logger3.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 logger3.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, _a2, _b2, _i, name_4, _c, _d;\n return __generator2(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 _a2 = [];\n for (_b2 in ensCache)\n _a2.push(_b2);\n _i = 0;\n _e.label = 1;\n case 1:\n if (!(_i < _a2.length))\n return [3, 4];\n name_4 = _a2[_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 logger3.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 logger3.throwArgumentError(\"invalid string\", \"value\", value2);\n }\n return value2;\n }\n return logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = new logger_1.Logger(_version_1.version);\n var LogDescription = (\n /** @class */\n function(_super) {\n __extends2(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 __extends2(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 __extends2(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 __extends2(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 wrap = new Error(\"deferred error during ABI decoding triggered accessing \" + property);\n wrap.error = error;\n return wrap;\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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"no matching function\", \"name\", name_2);\n } else if (matching.length > 1) {\n logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"no matching event\", \"name\", name_4);\n } else if (matching.length > 1) {\n logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"no matching error\", \"name\", name_6);\n } else if (matching.length > 1) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = new logger_1.Logger(_version_1.version);\n var ForkEvent = (\n /** @class */\n function(_super) {\n __extends2(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 __extends2(BlockForkEvent2, _super);\n function BlockForkEvent2(blockHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(blockHash, 32)) {\n logger3.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 __extends2(TransactionForkEvent2, _super);\n function TransactionForkEvent2(hash2, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(hash2, 32)) {\n logger3.throwArgumentError(\"invalid transaction hash\", \"hash\", hash2);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: expiry || 0,\n hash: hash2\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 __extends2(TransactionOrderForkEvent2, _super);\n function TransactionOrderForkEvent2(beforeHash, afterHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(beforeHash, 32)) {\n logger3.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!(0, bytes_1.isHexString)(afterHash, 32)) {\n logger3.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 logger3.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 _a2, block, gasPrice, lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas;\n return __generator2(this, function(_b2) {\n switch (_b2.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 _a2 = _b2.sent(), block = _a2.block, gasPrice = _a2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"getBalance\");\n return [4, this.provider.getBalance(this.getAddress(), blockTag)];\n case 1:\n return [2, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype.getTransactionCount = function(blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"getTransactionCount\");\n return [4, this.provider.getTransactionCount(this.getAddress(), blockTag)];\n case 1:\n return [2, _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"estimateGas\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a2.sent();\n return [4, this.provider.estimateGas(tx)];\n case 2:\n return [2, _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"call\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a2.sent();\n return [4, this.provider.call(tx, blockTag)];\n case 2:\n return [2, _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"sendTransaction\");\n return [4, this.populateTransaction(transaction)];\n case 1:\n tx = _a2.sent();\n return [4, this.signTransaction(tx)];\n case 2:\n signedTx = _a2.sent();\n return [4, this.provider.sendTransaction(signedTx)];\n case 3:\n return [2, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype.getChainId = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var network;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"getChainId\");\n return [4, this.provider.getNetwork()];\n case 1:\n network = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"getGasPrice\");\n return [4, this.provider.getGasPrice()];\n case 1:\n return [2, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype.getFeeData = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"getFeeData\");\n return [4, this.provider.getFeeData()];\n case 1:\n return [2, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype.resolveName = function(name) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"resolveName\");\n return [4, this.provider.resolveName(name)];\n case 1:\n return [2, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype.checkTransaction = function(transaction) {\n for (var key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger3.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a2.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.resolveName(to)];\n case 1:\n address = _a3.sent();\n if (address == null) {\n logger3.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 logger3.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger3.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 = _a2.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 logger3.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 logger3.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 _a2.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 logger3.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 logger3.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, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype._checkProvider = function(operation) {\n if (!this.provider) {\n logger3.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 __extends2(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 logger3.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 assert4(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits2(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(number, base3, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number !== null) {\n if (base3 === \"le\" || base3 === \"be\") {\n endian = base3;\n base3 = 10;\n }\n this._init(number || 0, base3 || 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 (e2) {\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 init2(number, base3, endian) {\n if (typeof number === \"number\") {\n return this._initNumber(number, base3, endian);\n }\n if (typeof number === \"object\") {\n return this._initArray(number, base3, endian);\n }\n if (base3 === \"hex\") {\n base3 = 16;\n }\n assert4(base3 === (base3 | 0) && base3 >= 2 && base3 <= 36);\n number = number.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number.length) {\n if (base3 === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base3, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base3, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number, base3, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 67108864) {\n this.words = [number & 67108863];\n this.length = 1;\n } else if (number < 4503599627370496) {\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert4(number < 9007199254740992);\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base3, endian);\n };\n BN.prototype._initArray = function _initArray(number, base3, endian) {\n assert4(typeof number.length === \"number\");\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number.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 = number.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number[i3] | number[i3 - 1] << 8 | number[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 < number.length; i3 += 3) {\n w3 = number[i3] | number[i3 + 1] << 8 | number[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(string, index2) {\n var c4 = string.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(string, lowerBound, index2) {\n var r2 = parseHex4Bits(string, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number, start, endian) {\n this.length = Math.ceil((number.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 = number.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number, 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 = number.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number.length; i3 += 2) {\n w3 = parseHexByte(number, 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(number, base3, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base3) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base3 | 0;\n var total = number.length - start;\n var mod2 = total % limbLen;\n var end = Math.min(total, total - mod2) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number, i3, i3 + limbLen, base3);\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 (mod2 !== 0) {\n var pow = 1;\n word = parseBase(number, i3, number.length, base3);\n for (i3 = 0; i3 < mod2; i3++) {\n pow *= base3;\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(size5) {\n while (this.length < size5) {\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 toString3(base3, padding) {\n base3 = base3 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base3 === 16 || base3 === \"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 (base3 === (base3 | 0) && base3 >= 2 && base3 <= 36) {\n var groupSize = groupSizes[base3];\n var groupBase = groupBases[base3];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modn(groupBase).toString(base3);\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 assert4(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber2() {\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 assert4(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON2() {\n return this.toString(16);\n };\n BN.prototype.toBuffer = function toBuffer(endian, length) {\n assert4(typeof Buffer3 !== \"undefined\");\n return this.toArrayLike(Buffer3, endian, length);\n };\n BN.prototype.toArray = function toArray2(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert4(byteLength <= reqLength, \"byte array longer than desired length\");\n assert4(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 assert4((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 assert4((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 assert4((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 assert4(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 assert4(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 assert4(carry === 0);\n assert4((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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(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 assert4(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert4(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 assert4(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 assert4(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 assert4(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert4(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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(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 assert4(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod2, 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 mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.iadd(num2);\n }\n }\n return {\n div,\n mod: mod2\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 mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod2\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 mod2(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 mod2 = 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 = mod2.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 assert4(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 assert4(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 assert4(p4.negative === 0);\n assert4(!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 assert4(p4.negative === 0);\n assert4(!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 assert4(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 assert4(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 assert4(!this.red, \"Already a number in reduction context\");\n assert4(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert4(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 assert4(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert4(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert4(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert4(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert4(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert4(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 split3(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 inherits2(K256, MPrime);\n K256.prototype.split = function split3(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 inherits2(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits2(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits2(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 assert4(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 assert4(a3.negative === 0, \"red works only with positives\");\n assert4(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert4((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert4(\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 assert4(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 assert4(!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 assert4(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 inherits2(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 = assert4;\n function assert4(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n assert4.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 toArray2(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 = toArray2;\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 encode7(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 mod2 = k4.andln(ws - 1);\n if (k4.isOdd()) {\n if (mod2 > (ws >> 1) - 1)\n z2 = (ws >> 1) - mod2;\n else\n z2 = mod2;\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/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/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/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/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 (e2) {\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 assert4 = 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 validate4() {\n throw new Error(\"Not implemented\");\n };\n BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p4, k4) {\n assert4(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 assert4(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 validate4() {\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 assert4(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 7)\n assert4(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 encode7(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 inherits2(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 inherits2(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 inherits2 = require_inherits_browser();\n var Base = require_base();\n var assert4 = 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 inherits2(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 assert4(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 validate4(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 split3 = this._endoSplit(coeffs[i3]);\n var p4 = points[i3];\n var beta = p4._getBeta();\n if (split3.k1.negative) {\n split3.k1.ineg();\n p4 = p4.neg(true);\n }\n if (split3.k2.negative) {\n split3.k2.ineg();\n beta = beta.neg(true);\n }\n npoints[i3 * 2] = p4;\n npoints[i3 * 2 + 1] = beta;\n ncoeffs[i3 * 2] = split3.k1;\n ncoeffs[i3 * 2 + 1] = split3.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 inherits2(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 toJSON2() {\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 inherits2(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 e2 = a3.redAdd(a3).redIAdd(a3);\n var f6 = e2.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 = e2.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 e2 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e2 = e2.redIAdd(e2);\n e2 = e2.redAdd(e2).redIAdd(e2);\n e2 = e2.redISub(mm);\n var ee = e2.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(e2).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(e2.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n var nz = this.z.redAdd(e2).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 inherits2 = 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 inherits2(MontCurve, Base);\n module.exports = MontCurve;\n MontCurve.prototype.validate = function validate4(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 inherits2(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 normalize3() {\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 inherits2 = require_inherits_browser();\n var Base = require_base();\n var assert4 = 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 assert4(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n }\n inherits2(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 validate4(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 inherits2(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 e2 = 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 = e2.redMul(f6);\n var ny = g4.redMul(h4);\n var nt = e2.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 e2;\n var h4;\n var j2;\n if (this.curve.twisted) {\n e2 = this.curve._mulA(c4);\n var f6 = e2.redAdd(d5);\n if (this.zOne) {\n nx = b4.redSub(c4).redSub(d5).redMul(f6.redSub(this.curve.two));\n ny = f6.redMul(e2.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(e2.redSub(d5));\n nz = f6.redMul(j2);\n }\n } else {\n e2 = c4.redAdd(d5);\n h4 = this.curve._mulC(this.z).redSqr();\n j2 = e2.redSub(h4).redSub(h4);\n nx = this.curve._mulC(b4.redISub(e2)).redMul(j2);\n ny = this.curve._mulC(e2).redMul(c4.redISub(d5));\n nz = e2.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 e2 = b4.redSub(a3);\n var f6 = d5.redSub(c4);\n var g4 = d5.redAdd(c4);\n var h4 = b4.redAdd(a3);\n var nx = e2.redMul(f6);\n var ny = g4.redMul(h4);\n var nt = e2.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 e2 = this.curve.d.redMul(c4).redMul(d5);\n var f6 = b4.redSub(e2);\n var g4 = b4.redAdd(e2);\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 normalize3() {\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 assert4 = require_minimalistic_assert();\n var inherits2 = require_inherits_browser();\n exports3.inherits = inherits2;\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 toArray2(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 = toArray2;\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 assert4(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, e2) {\n return a3 + b4 + c4 + d5 + e2 >>> 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 assert4 = 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 assert4(this.pending === null);\n return this._digest(enc);\n };\n BlockHash.prototype._pad = function pad4() {\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 e2 = 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), e2, W[i3], sha1_K[s4]);\n e2 = 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], e2);\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 assert4 = 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 e2 = this.h[4];\n var f6 = this.h[5];\n var g4 = this.h[6];\n var h4 = this.h[7];\n assert4(this.k.length === W.length);\n for (i3 = 0; i3 < W.length; i3++) {\n var T1 = sum32_5(h4, s1_256(e2), ch32(e2, 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 = e2;\n e2 = 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], e2);\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 assert4 = 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 assert4(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 assert4 = require_minimalistic_assert();\n function Hmac(hash2, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash2, key, enc);\n this.Hash = hash2;\n this.blockSize = hash2.blockSize / 8;\n this.outSize = hash2.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 init2(key) {\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert4(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 hash2 = exports3;\n hash2.utils = require_utils4();\n hash2.common = require_common();\n hash2.sha = require_sha();\n hash2.ripemd = require_ripemd();\n hash2.hmac = require_hmac();\n hash2.sha1 = hash2.sha.sha1;\n hash2.sha256 = hash2.sha.sha256;\n hash2.sha224 = hash2.sha.sha224;\n hash2.sha384 = hash2.sha.sha384;\n hash2.sha512 = hash2.sha.sha512;\n hash2.ripemd160 = hash2.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 hash2 = require_hash();\n var curve = require_curve();\n var utils = require_utils3();\n var assert4 = 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 assert4(this.g.validate(), \"Invalid curve\");\n assert4(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: hash2.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: hash2.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: hash2.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: hash2.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: hash2.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: hash2.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: hash2.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 (e2) {\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: hash2.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 hash2 = require_hash();\n var utils = require_utils2();\n var assert4 = 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 assert4(\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 init2(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 hash2.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 assert4(\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 assert4 = 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 validate4() {\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 assert4(key.x, \"Need x coordinate\");\n } else if (this.ec.curve.type === \"short\" || this.ec.curve.type === \"edwards\") {\n assert4(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 assert4(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 assert4 = utils.assert;\n function Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n if (this._importDER(options, enc))\n return;\n assert4(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 = Signature;\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 Signature.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 Signature.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 assert4 = utils.assert;\n var KeyPair = require_key();\n var Signature = require_signature();\n function EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n if (typeof options === \"string\") {\n assert4(\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 assert4(\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 assert4(msg.length >>> 0 === msg.length);\n for (var i3 = 0; i3 < msg.length; i3++)\n assert4((msg[i3] & 255) === msg[i3]);\n }\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(msg, false, options.msgBitLength);\n assert4(!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 assert4(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 Signature({ 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 Signature(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 assert4((3 & j2) === j2, \"The recovery param is more than two bits\");\n signature = new Signature(signature, enc);\n var n2 = this.n;\n var e2 = 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(e2).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(e2, signature, Q2, enc) {\n signature = new Signature(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(e2, signature, i3);\n } catch (e3) {\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 assert4 = 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 hash2 = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n var a3 = hash2.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 hash2() {\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 assert4(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 assert4(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 assert4 = utils.assert;\n var cachedProperty = utils.cachedProperty;\n var parseBytes = utils.parseBytes;\n function Signature(eddsa, sig) {\n this.eddsa = eddsa;\n if (typeof sig !== \"object\")\n sig = parseBytes(sig);\n if (Array.isArray(sig)) {\n assert4(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 assert4(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(Signature, \"S\", function S3() {\n return this.eddsa.decodeInt(this.Sencoded());\n });\n cachedProperty(Signature, \"R\", function R3() {\n return this.eddsa.decodePoint(this.Rencoded());\n });\n cachedProperty(Signature, \"Rencoded\", function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n });\n cachedProperty(Signature, \"Sencoded\", function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n });\n Signature.prototype.toBytes = function toBytes4() {\n return this.Rencoded().concat(this.Sencoded());\n };\n Signature.prototype.toHex = function toHex3() {\n return utils.encode(this.toBytes(), \"hex\").toUpperCase();\n };\n module.exports = Signature;\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 hash2 = require_hash();\n var curves = require_curves();\n var utils = require_utils3();\n var assert4 = utils.assert;\n var parseBytes = utils.parseBytes;\n var KeyPair = require_key2();\n var Signature = require_signature2();\n function EDDSA(curve) {\n assert4(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 = hash2.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 hash3 = this.hash();\n for (var i3 = 0; i3 < arguments.length; i3++)\n hash3.update(arguments[i3]);\n return utils.intFromLE(hash3.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 Signature)\n return sig;\n return new Signature(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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EC = void 0;\n var elliptic_1 = __importDefault2(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 logger3 = 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 logger3.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 logger3.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 recoverPublicKey2(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 = recoverPublicKey2;\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 logger3.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 __createBinding2 = 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 __setModuleDefault2 = 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 __importStar2 = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 in mod2)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod2, k4))\n __createBinding2(result, mod2, k4);\n }\n __setModuleDefault2(result, mod2);\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 = __importStar2(require_lib6());\n var signing_key_1 = require_lib16();\n var logger_1 = require_lib();\n var _version_1 = require_version13();\n var logger3 = 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 recoverAddress2(digest, signature) {\n return computeAddress((0, signing_key_1.recoverPublicKey)((0, bytes_1.arrayify)(digest), signature));\n }\n exports3.recoverAddress = recoverAddress2;\n function formatNumber(value, name) {\n var result = (0, bytes_1.stripZeros)(bignumber_1.BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n } else if (sig.v !== v2) {\n logger3.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 logger3.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 logger3.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 logger3.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 = recoverAddress2(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 logger3.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 logger3.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 logger3.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 = recoverAddress2(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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 __spreadArray2 = exports3 && exports3.__spreadArray || function(to, from5, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from5.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from5)) {\n if (!ar)\n ar = Array.prototype.slice.call(from5, 0, i3);\n ar[i3] = from5[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from5));\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 logger3 = 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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, nameOrPromise];\n case 1:\n name = _a2.sent();\n if (typeof name !== \"string\") {\n logger3.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 logger3.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 = _a2.sent();\n if (address == null) {\n logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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, _a2.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, _a2.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, _a2.sent()];\n case 6:\n if (!(paramType.baseType === \"array\"))\n return [3, 8];\n if (!Array.isArray(value)) {\n return [2, Promise.reject(logger3.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, _a2.sent()];\n case 8:\n return [2, value];\n }\n });\n });\n }\n function populateTransaction(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 __generator2(this, function(_a2) {\n switch (_a2.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 logger3.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 __generator2(this, function(_a3) {\n if ((0, address_1.getAddress)(check.signer) !== check.override) {\n logger3.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 = _a2.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 logger3.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 logger3.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 populateTransaction(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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (!signerOrProvider) {\n logger3.throwError(\"estimate require a provider or signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n });\n }\n return [4, populateTransaction(contract, fragment, args)];\n case 1:\n tx = _a2.sent();\n return [4, signerOrProvider.estimateGas(tx)];\n case 2:\n return [2, _a2.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 (e2) {\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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n _a2.label = 2;\n case 2:\n delete overrides.blockTag;\n args.push(overrides);\n _a2.label = 3;\n case 3:\n if (!(contract.deployTransaction != null))\n return [3, 5];\n return [4, contract._deployed(blockTag)];\n case 4:\n _a2.sent();\n _a2.label = 5;\n case 5:\n return [4, populateTransaction(contract, fragment, args)];\n case 6:\n tx = _a2.sent();\n return [4, signerOrProvider.call(tx, blockTag)];\n case 7:\n result = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (!contract.signer) {\n logger3.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 _a2.sent();\n _a2.label = 2;\n case 2:\n return [4, populateTransaction(contract, fragment, args)];\n case 3:\n txRequest = _a2.sent();\n return [4, contract.signer.sendTransaction(txRequest)];\n case 4:\n tx = _a2.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(filter2) {\n if (filter2.address && (filter2.topics == null || filter2.topics.length === 0)) {\n return \"*\";\n }\n return (filter2.address || \"*\") + \"@\" + (filter2.topics ? filter2.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, filter2) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"filter\", filter2);\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 __extends2(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 __extends2(FragmentRunningEvent2, _super);\n function FragmentRunningEvent2(address, contractInterface, fragment, topics) {\n var _this = this;\n var filter2 = {\n address\n };\n var topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) {\n logger3.throwArgumentError(\"topic mismatch\", \"topics\", topics);\n }\n filter2.topics = topics.slice();\n } else {\n filter2.topics = [topic];\n }\n _this = _super.call(this, getEventTag(filter2), filter2) || 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 __extends2(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 logger3.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 logger3.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 logger3.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 logger3.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(e2) {\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 logger3.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 (e2) {\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 logger3.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 logger3.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 logger3.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 filter2 = {\n address: this.address,\n topics: eventName.topics\n };\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter2), filter2));\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 logger3.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, __spreadArray2([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 filter2 = (0, properties_1.shallowCopy)(runningEvent.filter);\n if (typeof fromBlockOrBlockhash === \"string\" && (0, bytes_1.isHexString)(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger3.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n filter2.blockHash = fromBlockOrBlockhash;\n } else {\n filter2.fromBlock = fromBlockOrBlockhash != null ? fromBlockOrBlockhash : 0;\n filter2.toBlock = toBlock != null ? toBlock : \"latest\";\n }\n return this.provider.getLogs(filter2).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 Contract2 = (\n /** @class */\n function(_super) {\n __extends2(Contract3, _super);\n function Contract3() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Contract3;\n }(BaseContract)\n );\n exports3.Contract = Contract2;\n var ContractFactory2 = (\n /** @class */\n function() {\n function ContractFactory3(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 logger3.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n if (signer && !abstract_signer_1.Signer.isSigner(signer)) {\n logger3.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 ContractFactory3.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 logger3.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 logger3.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 logger3.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 ContractFactory3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n overrides = {};\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n logger3.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 = _a2.sent();\n params.push(overrides);\n unsignedTx = this.getDeployTransaction.apply(this, params);\n return [4, this.signer.sendTransaction(unsignedTx)];\n case 2:\n tx = _a2.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 ContractFactory3.prototype.attach = function(address) {\n return this.constructor.getContract(address, this.interface, this.signer);\n };\n ContractFactory3.prototype.connect = function(signer) {\n return new this.constructor(this.interface, this.bytecode, signer);\n };\n ContractFactory3.fromSolidity = function(compilerOutput, signer) {\n if (compilerOutput == null) {\n logger3.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 ContractFactory3.getInterface = function(contractInterface) {\n return Contract2.getInterface(contractInterface);\n };\n ContractFactory3.getContractAddress = function(tx) {\n return (0, address_1.getContractAddress)(tx);\n };\n ContractFactory3.getContract = function(address, contractInterface, signer) {\n return new Contract2(address, contractInterface, signer);\n };\n return ContractFactory3;\n }()\n );\n exports3.ContractFactory = ContractFactory2;\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 string = \"\";\n for (var k4 = 0; source[k4] === 0 && k4 < source.length - 1; ++k4) {\n string += this._leader;\n }\n for (var q3 = digits.length - 1; q3 >= 0; --q3) {\n string += this.alphabet[digits[q3]];\n }\n return string;\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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computeHmac = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = void 0;\n var hash_js_1 = __importDefault2(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 logger3 = 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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 normalize3(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 = normalize3(a3);\n b4 = normalize3(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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, length) {\n length += 4;\n for (var i3 = 0; i3 < data2.length; i3 += length) {\n var word = \"\";\n for (var j2 = 0; j2 < length; 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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 logger3 = 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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3 = new logger_1.Logger(_version_1.version);\n function getGlobal2() {\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 = getGlobal2();\n var crypto3 = anyGlobal.crypto || anyGlobal.msCrypto;\n if (!crypto3 || !crypto3.getRandomValues) {\n logger3.warn(\"WARNING: Missing strong random number source\");\n crypto3 = {\n getRandomValues: function(buffer2) {\n return logger3.throwError(\"no secure random source avaialble\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n }\n function randomBytes2(length) {\n if (length <= 0 || length > 1024 || length % 1 || length != length) {\n logger3.throwArgumentError(\"invalid length\", \"length\", length);\n }\n var result = new Uint8Array(length);\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(array) {\n array = array.slice();\n for (var i3 = array.length - 1; i3 > 0; i3--) {\n var j2 = Math.floor(Math.random() * (i3 + 1));\n var tmp = array[i3];\n array[i3] = array[j2];\n array[j2] = tmp;\n }\n return array;\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(length) {\n return new Uint8Array(length);\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 toBytes4(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 fromBytes2(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: toBytes4,\n fromBytes: fromBytes2\n };\n }();\n var convertHex = /* @__PURE__ */ function() {\n function toBytes4(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 Hex = \"0123456789abcdef\";\n function fromBytes2(bytes) {\n var result = [];\n for (var i3 = 0; i3 < bytes.length; i3++) {\n var v2 = bytes[i3];\n result.push(Hex[(v2 & 240) >> 4] + Hex[v2 & 15]);\n }\n return result.join(\"\");\n }\n return {\n toBytes: toBytes4,\n fromBytes: fromBytes2\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 length = data.length - padder;\n for (var i3 = 0; i3 < padder; i3++) {\n if (data[length + i3] !== padder) {\n throw new Error(\"PKCS#7 invalid padding byte\");\n }\n }\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\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, length) {\n value = String(value);\n while (value.length < length) {\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(object, path) {\n var currentChild = object;\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decrypt = exports3.CrowdsaleAccount = void 0;\n var aes_js_1 = __importDefault2(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 logger3 = new logger_1.Logger(_version_1.version);\n var utils_1 = require_utils5();\n var CrowdsaleAccount = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.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, e2 = 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 = (((e2 >>> 6 | e2 << 32 - 6) ^ (e2 >>> 11 | e2 << 32 - 11) ^ (e2 >>> 25 | e2 << 32 - 25)) + (e2 & f6 ^ ~e2 & 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 = e2;\n e2 = 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 + e2 | 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, length) {\n while (length--) {\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encrypt = exports3.decrypt = exports3.decryptSync = exports3.KeystoreAccount = void 0;\n var aes_js_1 = __importDefault2(require_aes_js());\n var scrypt_js_1 = __importDefault2(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 logger3 = 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 __extends2(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 logger3.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 logger3.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 (e2) {\n return Promise.reject(e2);\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 now2 = /* @__PURE__ */ new Date();\n var timestamp = now2.getUTCFullYear() + \"-\" + (0, utils_1.zpad)(now2.getUTCMonth() + 1, 2) + \"-\" + (0, utils_1.zpad)(now2.getUTCDate(), 2) + \"T\" + (0, utils_1.zpad)(now2.getUTCHours(), 2) + \"-\" + (0, utils_1.zpad)(now2.getUTCMinutes(), 2) + \"-\" + (0, utils_1.zpad)(now2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 Wallet2 = (\n /** @class */\n function(_super) {\n __extends2(Wallet3, _super);\n function Wallet3(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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider || null);\n return _this;\n }\n Object.defineProperty(Wallet3.prototype, \"mnemonic\", {\n get: function() {\n return this._mnemonic();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet3.prototype, \"privateKey\", {\n get: function() {\n return this._signingKey().privateKey;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet3.prototype, \"publicKey\", {\n get: function() {\n return this._signingKey().publicKey;\n },\n enumerable: false,\n configurable: true\n });\n Wallet3.prototype.getAddress = function() {\n return Promise.resolve(this.address);\n };\n Wallet3.prototype.connect = function(provider) {\n return new Wallet3(this, provider);\n };\n Wallet3.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 logger3.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 Wallet3.prototype.signMessage = function(message) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator2(this, function(_a2) {\n return [2, (0, bytes_1.joinSignature)(this._signingKey().signDigest((0, hash_1.hashMessage)(message)))];\n });\n });\n };\n Wallet3.prototype._signTypedData = function(domain2, types, value) {\n return __awaiter3(this, void 0, void 0, function() {\n var populated;\n var _this = this;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types, value, function(name) {\n if (_this.provider == null) {\n logger3.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 = _a2.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 Wallet3.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 Wallet3.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 Wallet3.fromMnemonic(mnemonic, options.path, options.locale);\n };\n Wallet3.fromEncryptedJson = function(json, password, progressCallback) {\n return (0, json_wallets_1.decryptJsonWallet)(json, password, progressCallback).then(function(account) {\n return new Wallet3(account);\n });\n };\n Wallet3.fromEncryptedJsonSync = function(json, password) {\n return new Wallet3((0, json_wallets_1.decryptJsonWalletSync)(json, password));\n };\n Wallet3.fromMnemonic = function(mnemonic, path, wordlist) {\n if (!path) {\n path = hdnode_1.defaultPath;\n }\n return new Wallet3(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n };\n return Wallet3;\n }(abstract_signer_1.Signer)\n );\n exports3.Wallet = Wallet2;\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 logger3 = 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 getNetwork3(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 logger3.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger3.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 = getNetwork3;\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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n return [4, response.arrayBuffer()];\n case 2:\n body = _a2.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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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(all3, 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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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(logger3.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 cancel = function() {\n if (timer == null) {\n return;\n }\n clearTimeout(timer);\n timer = null;\n };\n return { promise, cancel };\n }();\n var runningFetch = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var attempt2, response2, location_1, tryAgain, stall, retryAfter, error_1, body_1, result2, error_2, tryAgain, timeout_1;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n attempt2 = 0;\n _a2.label = 1;\n case 1:\n if (!(attempt2 < attemptLimit))\n return [3, 20];\n response2 = null;\n _a2.label = 2;\n case 2:\n _a2.trys.push([2, 9, , 10]);\n return [4, (0, geturl_1.getUrl)(url, options)];\n case 3:\n response2 = _a2.sent();\n if (!(attempt2 < 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(attempt2, url)];\n case 5:\n tryAgain = _a2.sent();\n _a2.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, attempt2)));\n }\n return [4, staller(stall)];\n case 7:\n _a2.sent();\n return [3, 19];\n case 8:\n return [3, 10];\n case 9:\n error_1 = _a2.sent();\n response2 = error_1.response;\n if (response2 == null) {\n runningTimeout.cancel();\n logger3.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 logger3.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 _a2.label = 11;\n case 11:\n _a2.trys.push([11, 13, , 18]);\n return [4, processFunc(body_1, response2)];\n case 12:\n result2 = _a2.sent();\n runningTimeout.cancel();\n return [2, result2];\n case 13:\n error_2 = _a2.sent();\n if (!(error_2.throttleRetry && attempt2 < attemptLimit))\n return [3, 17];\n tryAgain = true;\n if (!throttleCallback)\n return [3, 15];\n return [4, throttleCallback(attempt2, url)];\n case 14:\n tryAgain = _a2.sent();\n _a2.label = 15;\n case 15:\n if (!tryAgain)\n return [3, 17];\n timeout_1 = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt2)));\n return [4, staller(timeout_1)];\n case 16:\n _a2.sent();\n return [3, 19];\n case 17:\n runningTimeout.cancel();\n logger3.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 attempt2++;\n return [3, 1];\n case 20:\n return [2, logger3.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 fetchJson2(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 logger3.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 = fetchJson2;\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 cancel = 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 (cancel()) {\n reject(new Error(\"timeout\"));\n }\n }, options.timeout);\n }\n var retryLimit = options.retryLimit;\n var attempt2 = 0;\n function check() {\n return func().then(function(result) {\n if (result !== void 0) {\n if (cancel()) {\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 attempt2++;\n if (attempt2 > retryLimit) {\n if (cancel()) {\n reject(new Error(\"retry limit reached\"));\n }\n return;\n }\n var timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt2)));\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 (cancel()) {\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 encode7(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 split3 = str.lastIndexOf(\"1\");\n if (split3 === -1)\n return \"No separator character for \" + str;\n if (split3 === 0)\n return \"Missing prefix for \" + str;\n var prefix = str.slice(0, split3);\n var wordChars = str.slice(split3 + 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, pad4) {\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 (pad4) {\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: encode7,\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 logger3 = 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 hash2 = this.hash.bind(this);\n var hex = this.hex.bind(this);\n var number = 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: hash2,\n type,\n accessList: Formatter2.allowNull(this.accessList.bind(this), null),\n blockHash: Formatter2.allowNull(hash2, null),\n blockNumber: Formatter2.allowNull(number, null),\n transactionIndex: Formatter2.allowNull(number, null),\n confirmations: Formatter2.allowNull(number, 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: number,\n data,\n r: Formatter2.allowNull(this.uint256),\n s: Formatter2.allowNull(this.uint256),\n v: Formatter2.allowNull(number),\n creates: Formatter2.allowNull(address, null),\n raw: Formatter2.allowNull(data)\n };\n formats.transactionRequest = {\n from: Formatter2.allowNull(address),\n nonce: Formatter2.allowNull(number),\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(number),\n accessList: Formatter2.allowNull(this.accessList.bind(this), null)\n };\n formats.receiptLog = {\n transactionIndex: number,\n blockNumber: number,\n transactionHash: hash2,\n address,\n topics: Formatter2.arrayOf(hash2),\n data,\n logIndex: number,\n blockHash: hash2\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: number,\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: hash2,\n transactionHash: hash2,\n logs: Formatter2.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number,\n confirmations: Formatter2.allowNull(number, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter2.allowNull(bigNumber),\n status: Formatter2.allowNull(number),\n type\n };\n formats.block = {\n hash: Formatter2.allowNull(hash2),\n parentHash: hash2,\n number,\n timestamp: number,\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(hash2)),\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(hash2, 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(number),\n blockHash: Formatter2.allowNull(hash2),\n transactionIndex: number,\n removed: Formatter2.allowNull(this.boolean.bind(this)),\n address,\n data: Formatter2.allowFalsish(data, \"0x\"),\n topics: Formatter2.arrayOf(hash2),\n transactionHash: hash2,\n logIndex: number\n };\n return formats;\n };\n Formatter2.prototype.accessList = function(accessList) {\n return (0, transactions_1.accessListify)(accessList || []);\n };\n Formatter2.prototype.number = function(number) {\n if (number === \"0x\") {\n return 0;\n }\n return bignumber_1.BigNumber.from(number).toNumber();\n };\n Formatter2.prototype.type = function(number) {\n if (number === \"0x\" || number == null) {\n return 0;\n }\n return bignumber_1.BigNumber.from(number).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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n logger3.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, object) {\n var result = {};\n for (var key in format) {\n try {\n var value = format[key](object[key]);\n if (value !== void 0) {\n result[key] = value;\n }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object[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(array) {\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n var result = [];\n array.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\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 = __importDefault2(require_bech32());\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger3 = 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 logger3.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 deserializeTopics2(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 logger3.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 = deserializeTopics2(comps[2]);\n var filter2 = {};\n if (topics.length > 0) {\n filter2.topics = topics;\n }\n if (address && address !== \"*\") {\n filter2.address = address;\n }\n return filter2;\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 length = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, offset, offset + 32)).toNumber();\n return (0, bytes_1.hexDataSlice)(result, offset + 32, offset + 32 + length);\n }\n function getIpfsLink(link2) {\n if (link2.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link2 = link2.substring(12);\n } else if (link2.match(/^ipfs:\\/\\//i)) {\n link2 = link2.substring(7);\n } else {\n logger3.throwArgumentError(\"unsupported IPFS format\", \"link\", link2);\n }\n return \"https://gateway.ipfs.io/ipfs/\" + link2;\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 __generator2(this, function(_a2) {\n switch (_a2.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 (_a2.sent()) {\n parseBytes = true;\n tx.data = (0, bytes_1.hexConcat)([\"0x9061b923\", encodeBytes3([(0, hash_1.dnsEncode)(this.name), tx.data])]);\n }\n _a2.label = 2;\n case 2:\n _a2.trys.push([2, 4, , 5]);\n return [4, this.provider.call(tx)];\n case 3:\n result = _a2.sent();\n if ((0, bytes_1.arrayify)(result).length % 32 === 4) {\n logger3.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 = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this._fetch(selector, parameters)];\n case 1:\n result = _a2.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (coinType == null) {\n coinType = 60;\n }\n if (!(coinType === 60))\n return [3, 4];\n _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, this._fetch(\"0x3b3b57de\")];\n case 2:\n result = _a2.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 = _a2.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 = _a2.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n address = this._getAddress(coinType, hexBytes);\n if (address == null) {\n logger3.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, _a2, selector, owner, _b2, comps, addr, tokenId, tokenOwner, _c, _d, balance, _e, _f, tx, metadataUrl, _g, metadata, imageUrl, ipfs, error_3;\n return __generator2(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 _a2 = scheme;\n switch (_a2) {\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 _b2 = this._resolvedAddress;\n if (_b2)\n return [3, 9];\n return [4, this.getAddress()];\n case 8:\n _b2 = _h.sent();\n _h.label = 9;\n case 9:\n owner = _b2;\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, hash2;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this._fetchBytes(\"0xbc1c58d1\")];\n case 1:\n hexBytes = _a2.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 hash2 = (0, base64_1.encode)(\"0x\" + skynet[1]).replace(/[=+\\/]/g, function(a3) {\n return urlSafe_1[a3];\n });\n return [2, \"sia://\" + hash2];\n }\n }\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 __extends2(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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, this._networkPromise];\n case 2:\n network = _a2.sent();\n return [3, 4];\n case 3:\n error_4 = _a2.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 = _a2.sent();\n _a2.label = 6;\n case 6:\n if (!network) {\n logger3.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 _a2.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 __generator2(this, function(_a2) {\n switch (_a2.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 _a2.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 = _a2.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, logger3.throwError(\"response not found during CCIP fetch: \" + errorMessage, logger_1.Logger.errors.SERVER_ERROR, { url, errorMessage })];\n }\n errorMessages.push(errorMessage);\n _a2.label = 3;\n case 3:\n i3++;\n return [3, 1];\n case 4:\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n _a2.sent();\n if (!(maxAge > 0))\n return [3, 7];\n _a2.label = 2;\n case 2:\n if (!this._internalBlockNumber)\n return [3, 7];\n internalBlockNumber = this._internalBlockNumber;\n _a2.label = 3;\n case 3:\n _a2.trys.push([3, 5, , 6]);\n return [4, internalBlockNumber];\n case 4:\n result = _a2.sent();\n if (getTime() - result.respTime <= maxAge) {\n return [2, result.blockNumber];\n }\n return [3, 7];\n case 5:\n error_5 = _a2.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(_a3) {\n var blockNumber = _a3.blockNumber, networkError = _a3.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, _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n pollId = nextPollId++;\n runners = [];\n blockNumber = null;\n _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, this._getInternalBlockNumber(100 + this.pollingInterval / 2)];\n case 2:\n blockNumber = _a2.sent();\n return [3, 4];\n case 3:\n error_6 = _a2.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 logger3.warn(\"network block skew detected; skipping block events (emitted=\" + this._emitted.block + \" blockNumber\" + blockNumber + \")\");\n this.emit(\"error\", logger3.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 __generator2(this, function(_a2) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n network = _a2.sent();\n return [4, this.detectNetwork()];\n case 2:\n currentNetwork = _a2.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 _a2.sent();\n return [2, this._network];\n case 4:\n error = logger3.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 now2 = getTime();\n if (now2 - this._fastQueryDate > 2 * this._pollingInterval) {\n this._fastQueryDate = now2;\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 __generator2(this, function(_a2) {\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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getTransactionReceipt(transactionHash)];\n case 1:\n receipt = _a2.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, stall(1e3)];\n case 1:\n _a3.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 __generator2(this, function(_a4) {\n switch (_a4.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 = _a4.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 _a4.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 = _a4.sent();\n ti = 0;\n _a4.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 = _a4.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(logger3.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(logger3.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 __generator2(this, function(_a2) {\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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, this.perform(\"getGasPrice\", {})];\n case 2:\n result = _a2.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a2.sent();\n return [4, this.perform(\"getBalance\", params)];\n case 3:\n result = _a2.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a2.sent();\n return [4, this.perform(\"getTransactionCount\", params)];\n case 3:\n result = _a2.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result).toNumber()];\n } catch (error) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a2.sent();\n return [4, this.perform(\"getCode\", params)];\n case 3:\n result = _a2.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.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 = _a2.sent();\n return [4, this.perform(\"getStorageAt\", params)];\n case 3:\n result = _a2.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger3.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, hash2, startBlock) {\n var _this = this;\n if (hash2 != null && (0, bytes_1.hexDataLength)(hash2) !== 32) {\n throw new Error(\"invalid response - sendTransaction\");\n }\n var result = tx;\n if (hash2 != null && tx.hash !== hash2) {\n logger3.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", logger_1.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash2 });\n }\n result.wait = function(confirms, timeout) {\n return __awaiter3(_this, void 0, void 0, function() {\n var replacement, receipt;\n return __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 logger3.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, hash2, error_7;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, Promise.resolve(signedTransaction).then(function(t3) {\n return (0, bytes_1.hexlify)(t3);\n })];\n case 2:\n hexTx = _a2.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 = _a2.sent();\n _a2.label = 4;\n case 4:\n _a2.trys.push([4, 6, , 7]);\n return [4, this.perform(\"sendTransaction\", { signedTransaction: hexTx })];\n case 5:\n hash2 = _a2.sent();\n return [2, this._wrapTransaction(tx, hash2, blockNumber)];\n case 6:\n error_7 = _a2.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, _a2, _b2;\n var _this = this;\n return __generator2(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 _b2 = (_a2 = this.formatter).transactionRequest;\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 2:\n return [2, _b2.apply(_a2, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._getFilter = function(filter2) {\n return __awaiter3(this, void 0, void 0, function() {\n var result, _a2, _b2;\n var _this = this;\n return __generator2(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, filter2];\n case 1:\n filter2 = _c.sent();\n result = {};\n if (filter2.address != null) {\n result.address = this._getAddress(filter2.address);\n }\n [\"blockHash\", \"topics\"].forEach(function(key) {\n if (filter2[key] == null) {\n return;\n }\n result[key] = filter2[key];\n });\n [\"fromBlock\", \"toBlock\"].forEach(function(key) {\n if (filter2[key] == null) {\n return;\n }\n result[key] = _this._getBlockTag(filter2[key]);\n });\n _b2 = (_a2 = this.formatter).filter;\n return [4, (0, properties_1.resolveProperties)(result)];\n case 2:\n return [2, _b2.apply(_a2, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._call = function(transaction, blockTag, attempt2) {\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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (attempt2 >= MAX_CCIP_REDIRECTS) {\n logger3.throwError(\"CCIP read exceeded maximum redirections\", logger_1.Logger.errors.SERVER_ERROR, {\n redirects: attempt2,\n transaction\n });\n }\n txSender = transaction.to;\n return [4, this.perform(\"call\", { transaction, blockTag })];\n case 1:\n result = _a2.sent();\n if (!(attempt2 >= 0 && blockTag === \"latest\" && txSender != null && result.substring(0, 10) === \"0x556f1830\" && (0, bytes_1.hexDataLength)(result) % 32 === 4))\n return [3, 5];\n _a2.label = 2;\n case 2:\n _a2.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 logger3.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 logger3.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 logger3.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 = _a2.sent();\n if (ccipResult == null) {\n logger3.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, attempt2 + 1)];\n case 4:\n error_8 = _a2.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, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.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 = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction)\n })];\n case 2:\n params = _a2.sent();\n return [4, this.perform(\"estimateGas\", params)];\n case 3:\n result = _a2.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, addressOrName];\n case 1:\n addressOrName = _a2.sent();\n if (typeof addressOrName !== \"string\") {\n logger3.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n return [4, this.resolveName(addressOrName)];\n case 2:\n address = _a2.sent();\n if (address == null) {\n logger3.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, _a2, error_9;\n var _this = this;\n return __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _b2.sent();\n return [4, blockHashOrBlockTag];\n case 2:\n blockHashOrBlockTag = _b2.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 _b2.trys.push([3, 5, , 6]);\n _a2 = params;\n return [4, this._getBlockTag(blockHashOrBlockTag)];\n case 4:\n _a2.blockTag = _b2.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 = _b2.sent();\n logger3.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n return [4, this.perform(\"getBlock\", params)];\n case 1:\n block = _a3.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 _a3.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 = _a3.sent();\n _a3.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 _a3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a2.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n return [4, this.perform(\"getTransaction\", params)];\n case 1:\n result = _a3.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 = _a3.sent();\n confirmations = blockNumber - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a2.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n return [4, this.perform(\"getTransactionReceipt\", params)];\n case 1:\n result = _a3.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 = _a3.sent();\n confirmations = blockNumber - receipt.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n receipt.confirmations = confirmations;\n _a3.label = 4;\n case 4:\n return [2, receipt];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getLogs = function(filter2) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, logs;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, (0, properties_1.resolveProperties)({ filter: this._getFilter(filter2) })];\n case 2:\n params = _a2.sent();\n return [4, this.perform(\"getLogs\", params)];\n case 3:\n logs = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, blockTag];\n case 1:\n blockTag = _a2.sent();\n if (!(typeof blockTag === \"number\" && blockTag < 0))\n return [3, 3];\n if (blockTag % 1) {\n logger3.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 2:\n blockNumber = _a2.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, _a2;\n return __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n currentName = name;\n _b2.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 = _b2.sent();\n if (!(addr != null))\n return [3, 5];\n resolver = new Resolver(this, addr, name);\n _a2 = currentName !== name;\n if (!_a2)\n return [3, 4];\n return [4, resolver.supportsWildcard()];\n case 3:\n _a2 = !_b2.sent();\n _b2.label = 4;\n case 4:\n if (_a2) {\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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (operation == null) {\n operation = \"ENS\";\n }\n return [4, this.getNetwork()];\n case 1:\n network = _a2.sent();\n if (!network.ensAddress) {\n logger3.throwError(\"network does not support ENS\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name });\n }\n _a2.label = 2;\n case 2:\n _a2.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 = _a2.sent();\n return [2, this.formatter.callAddress(addrData)];\n case 4:\n error_10 = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, name];\n case 1:\n name = _a2.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 logger3.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n return [4, this.getResolver(name)];\n case 2:\n resolver = _a2.sent();\n if (!resolver) {\n return [2, null];\n }\n return [4, resolver.getAddress()];\n case 3:\n return [2, _a2.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, _a2, addr;\n return __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, address];\n case 1:\n address = _b2.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 = _b2.sent();\n if (resolverAddr == null) {\n return [2, null];\n }\n _a2 = _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 = _a2.apply(void 0, [_b2.sent(), 0]);\n return [4, this.resolveName(name)];\n case 4:\n addr = _b2.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, _a2, error_12, avatar;\n return __generator2(this, function(_b2) {\n switch (_b2.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 = _b2.sent();\n if (!resolverAddress) {\n return [2, null];\n }\n resolver = new Resolver(this, resolverAddress, node);\n _b2.label = 2;\n case 2:\n _b2.trys.push([2, 4, , 5]);\n return [4, resolver.getAvatar()];\n case 3:\n avatar_1 = _b2.sent();\n if (avatar_1) {\n return [2, avatar_1.url];\n }\n return [3, 5];\n case 4:\n error_11 = _b2.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 _b2.trys.push([5, 8, , 9]);\n _a2 = _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 = _a2.apply(void 0, [_b2.sent(), 0]);\n return [4, this.getResolver(name_1)];\n case 7:\n resolver = _b2.sent();\n return [3, 9];\n case 8:\n error_12 = _b2.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 = _b2.sent();\n if (!resolver) {\n return [2, null];\n }\n _b2.label = 12;\n case 12:\n return [4, resolver.getAvatar()];\n case 13:\n avatar = _b2.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 logger3.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(e2) {\n return e2.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._stopEvent = function(event) {\n this.polling = this._events.filter(function(e2) {\n return e2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 getResult2(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 __extends2(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 logger3.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n return _this;\n }\n JsonRpcSigner2.prototype.connect = function(provider) {\n return logger3.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n if (address == null) {\n logger3.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(_a2) {\n var tx = _a2.tx, sender = _a2.sender;\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger3.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(hash2) {\n return hash2;\n }, function(error) {\n if (typeof error.message === \"string\" && error.message.match(/user denied/i)) {\n logger3.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 logger3.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, hash2, error_1;\n var _this = this;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval)];\n case 1:\n blockNumber = _a2.sent();\n return [4, this.sendUncheckedTransaction(transaction)];\n case 2:\n hash2 = _a2.sent();\n _a2.label = 3;\n case 3:\n _a2.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n return [4, this.provider.getTransaction(hash2)];\n case 1:\n tx = _a3.sent();\n if (tx === null) {\n return [2, void 0];\n }\n return [2, this.provider._wrapTransaction(tx, hash2, blockNumber)];\n }\n });\n });\n }, { oncePoll: this.provider })];\n case 4:\n return [2, _a2.sent()];\n case 5:\n error_1 = _a2.sent();\n error_1.transactionHash = hash2;\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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n _a2.label = 2;\n case 2:\n _a2.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, _a2.sent()];\n case 4:\n error_2 = _a2.sent();\n if (typeof error_2.message === \"string\" && error_2.message.match(/user denied/i)) {\n logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n _a2.label = 2;\n case 2:\n _a2.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, _a2.sent()];\n case 4:\n error_3 = _a2.sent();\n if (typeof error_3.message === \"string\" && error_3.message.match(/user denied/i)) {\n logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n return [4, this.getAddress()];\n case 2:\n address = _a2.sent();\n _a2.label = 3;\n case 3:\n _a2.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, _a2.sent()];\n case 5:\n error_4 = _a2.sent();\n if (typeof error_4.message === \"string\" && error_4.message.match(/user denied/i)) {\n logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n provider = this.provider;\n return [4, this.getAddress()];\n case 1:\n address = _a2.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 __extends2(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(hash2) {\n return {\n hash: hash2,\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(hash2, 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 JsonRpcProvider2 = (\n /** @class */\n function(_super) {\n __extends2(JsonRpcProvider3, _super);\n function JsonRpcProvider3(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(JsonRpcProvider3.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 JsonRpcProvider3.defaultUrl = function() {\n return \"http://localhost:8545\";\n };\n JsonRpcProvider3.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 JsonRpcProvider3.prototype._uncachedDetectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var chainId, error_5, error_6, getNetwork3;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, timer(0)];\n case 1:\n _a2.sent();\n chainId = null;\n _a2.label = 2;\n case 2:\n _a2.trys.push([2, 4, , 9]);\n return [4, this.send(\"eth_chainId\", [])];\n case 3:\n chainId = _a2.sent();\n return [3, 9];\n case 4:\n error_5 = _a2.sent();\n _a2.label = 5;\n case 5:\n _a2.trys.push([5, 7, , 8]);\n return [4, this.send(\"net_version\", [])];\n case 6:\n chainId = _a2.sent();\n return [3, 8];\n case 7:\n error_6 = _a2.sent();\n return [3, 8];\n case 8:\n return [3, 9];\n case 9:\n if (chainId != null) {\n getNetwork3 = (0, properties_1.getStatic)(this.constructor, \"getNetwork\");\n try {\n return [2, getNetwork3(bignumber_1.BigNumber.from(chainId).toNumber())];\n } catch (error) {\n return [2, logger3.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, logger3.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n })];\n }\n });\n });\n };\n JsonRpcProvider3.prototype.getSigner = function(addressOrIndex) {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n };\n JsonRpcProvider3.prototype.getUncheckedSigner = function(addressOrIndex) {\n return this.getSigner(addressOrIndex).connectUnchecked();\n };\n JsonRpcProvider3.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 JsonRpcProvider3.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), getResult2).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 JsonRpcProvider3.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 JsonRpcProvider3.prototype.perform = function(method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx, feeData, args, error_7;\n return __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 _a2.label = 2;\n case 2:\n args = this.prepareRequest(method, params);\n if (args == null) {\n logger3.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n _a2.label = 3;\n case 3:\n _a2.trys.push([3, 5, , 6]);\n return [4, this.send(args[0], args[1])];\n case 4:\n return [2, _a2.sent()];\n case 5:\n error_7 = _a2.sent();\n return [2, checkError(method, error_7, params)];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcProvider3.prototype._startEvent = function(event) {\n if (event.tag === \"pending\") {\n this._startPending();\n }\n _super.prototype._startEvent.call(this, event);\n };\n JsonRpcProvider3.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(hash2) {\n self2._emitted[\"t:\" + hash2.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self2.getTransaction(hash2).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 JsonRpcProvider3.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 JsonRpcProvider3.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 JsonRpcProvider3;\n }(base_provider_1.BaseProvider)\n );\n exports3.JsonRpcProvider = JsonRpcProvider2;\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = new logger_1.Logger(_version_1.version);\n var NextId = 1;\n var WebSocketProvider2 = (\n /** @class */\n function(_super) {\n __extends2(WebSocketProvider3, _super);\n function WebSocketProvider3(url, network) {\n var _this = this;\n if (network === \"any\") {\n logger3.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(WebSocketProvider3.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 WebSocketProvider3.prototype.detectNetwork = function() {\n return this._detectNetwork;\n };\n Object.defineProperty(WebSocketProvider3.prototype, \"pollingInterval\", {\n get: function() {\n return 0;\n },\n set: function(value) {\n logger3.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 WebSocketProvider3.prototype.resetEventsBlock = function(blockNumber) {\n logger3.throwError(\"cannot reset events block on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n };\n WebSocketProvider3.prototype.poll = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator2(this, function(_a2) {\n return [2, null];\n });\n });\n };\n Object.defineProperty(WebSocketProvider3.prototype, \"polling\", {\n set: function(value) {\n if (!value) {\n return;\n }\n logger3.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 WebSocketProvider3.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 WebSocketProvider3.defaultUrl = function() {\n return \"ws://localhost:8546\";\n };\n WebSocketProvider3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n this._subs[subId] = { tag, processFunc };\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n WebSocketProvider3.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 hash2 = event2.hash;\n _this.getTransactionReceipt(hash2).then(function(receipt) {\n if (!receipt) {\n return;\n }\n _this.emit(hash2, receipt);\n });\n };\n emitReceipt_1(event);\n this._subscribe(\"tx\", [\"newHeads\"], function(result) {\n _this._events.filter(function(e2) {\n return e2.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 WebSocketProvider3.prototype._stopEvent = function(event) {\n var _this = this;\n var tag = event.tag;\n if (event.type === \"tx\") {\n if (this._events.filter(function(e2) {\n return e2.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 WebSocketProvider3.prototype.destroy = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var _this = this;\n return __generator2(this, function(_a2) {\n switch (_a2.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 _a2.sent();\n _a2.label = 2;\n case 2:\n this.websocket.close(1e3);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n return WebSocketProvider3;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.WebSocketProvider = WebSocketProvider2;\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 __extends2(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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n if (!network) {\n logger3.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 _a2.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 __extends2(UrlJsonRpcProvider2, _super);\n function UrlJsonRpcProvider2(network, apiKey) {\n var _newTarget = this.constructor;\n var _this = this;\n logger3.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 logger3.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 logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 AlchemyWebSocketProvider2 = (\n /** @class */\n function(_super) {\n __extends2(AlchemyWebSocketProvider3, _super);\n function AlchemyWebSocketProvider3(network, apiKey) {\n var _this = this;\n var provider = new AlchemyProvider2(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 AlchemyWebSocketProvider3.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyWebSocketProvider3;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.AlchemyWebSocketProvider = AlchemyWebSocketProvider2;\n var AlchemyProvider2 = (\n /** @class */\n function(_super) {\n __extends2(AlchemyProvider3, _super);\n function AlchemyProvider3() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AlchemyProvider3.getWebSocketProvider = function(network, apiKey) {\n return new AlchemyWebSocketProvider2(network, apiKey);\n };\n AlchemyProvider3.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n if (apiKey && typeof apiKey !== \"string\") {\n logger3.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n };\n AlchemyProvider3.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 logger3.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return {\n allowGzip: true,\n url: \"https://\" + host + apiKey,\n throttleCallback: function(attempt2, url) {\n if (apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n };\n AlchemyProvider3.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyProvider3;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AlchemyProvider = AlchemyProvider2;\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 logger3.throwArgumentError(\"unsupported network\", \"name\", name);\n }\n var AnkrProvider = (\n /** @class */\n function(_super) {\n __extends2(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(attempt2, 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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = new logger_1.Logger(_version_1.version);\n var CloudflareProvider = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 getResult2(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 e2 = error.error;\n if (e2 && (e2.message.match(/reverted/i) || e2.message.match(/VM execution error/i))) {\n var data = e2.data;\n if (data) {\n data = \"0x\" + data.replace(/^.*0x/i, \"\");\n }\n if ((0, bytes_1.isHexString)(data)) {\n return data;\n }\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 __extends2(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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 : getResult2;\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n connection = {\n url,\n throttleSlotInterval: 1e3,\n throttleCallback: function(attempt2, 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 = _a2.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 __generator2(this, function(_a2) {\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 _a2, postData, error_1, postData, error_2, args, topic0, logs, blocks, i3, log, block, _b2;\n return __generator2(this, function(_c) {\n switch (_c.label) {\n case 0:\n _a2 = method;\n switch (_a2) {\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 logger3.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 logger3.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 _b2 = parseFloat;\n return [4, this.fetch(\"stats\", { action: \"ethprice\" })];\n case 27:\n return [2, _b2.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 _a2;\n var _this = this;\n return __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n _a2 = {\n action: \"txlist\"\n };\n return [4, this.resolveName(addressOrName)];\n case 1:\n params = (_a2.address = _b2.sent(), _a2.startblock = startBlock == null ? 0 : startBlock, _a2.endblock = endBlock == null ? 99999999 : endBlock, _a2.sort = \"asc\", _a2);\n return [4, this.fetch(\"account\", params)];\n case 2:\n result = _b2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = new logger_1.Logger(_version_1.version);\n function now2() {\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 logger3.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 cancel = null;\n var timer = null;\n var promise = new Promise(function(resolve) {\n cancel = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n };\n timer = setTimeout(cancel, 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, 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, now3) {\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 (now3) {\n result.duration = now3 - 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(normalize3, quorum) {\n return function(configs) {\n var tally = {};\n configs.forEach(function(c4) {\n var value = normalize3(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 normalize3 = 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 normalize3 = 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 normalize3 = 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 normalize3 = 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(normalize3, provider.quorum);\n }\n function waitForSync(config2, blockNumber) {\n return __awaiter3(this, void 0, void 0, function() {\n var provider;\n return __generator2(this, function(_a2) {\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, _a2, filter2;\n return __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n provider = config2.provider;\n _a2 = method;\n switch (_a2) {\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 = _b2.sent();\n _b2.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 = _b2.sent();\n _b2.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 = _b2.sent();\n _b2.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 = _b2.sent();\n _b2.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 filter2 = params.filter;\n if (!(filter2.fromBlock && (0, bytes_1.isHexString)(filter2.fromBlock) || filter2.toBlock && (0, bytes_1.isHexString)(filter2.toBlock)))\n return [3, 18];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 17:\n provider = _b2.sent();\n _b2.label = 18;\n case 18:\n return [2, provider.getLogs(filter2)];\n case 19:\n return [2, logger3.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 __extends2(FallbackProvider2, _super);\n function FallbackProvider2(providers, quorum) {\n var _this = this;\n if (providers.length === 0) {\n logger3.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 logger3.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 _a2.sent();\n _a2.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 __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n t0 = now2();\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 = now2();\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, now2()),\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, now2()),\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 _b2.sent();\n _b2.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 _b2.sent();\n _b2.label = 4;\n case 4:\n first = false;\n _b2.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 e2 = tally.error;\n var props = {};\n ForwardProperties.forEach(function(name) {\n if (e2[name] == null) {\n return;\n }\n props[name] = e2[name];\n });\n logger3.throwError(e2.reason || e2.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 _a2.label = 5;\n case 5:\n if (false)\n return [3, 7];\n return [5, _loop_1()];\n case 6:\n state_1 = _a2.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, logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 __extends2(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 logger3.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 __extends2(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 logger3.assertArgument(typeof apiKey.projectId === \"string\", \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger3.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 logger3.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(attempt2, 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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 batch2 = _this._pendingBatch;\n _this._pendingBatch = null;\n _this._pendingBatchAggregator = null;\n var request2 = batch2.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 batch2.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 batch2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"ETHERS_JS_SHARED\";\n var NodesmithProvider = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n NodesmithProvider2.getUrl = function(network, apiKey) {\n logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 __extends2(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 logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\n var QuickNodeProvider = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 __extends2(Web3Provider2, _super);\n function Web3Provider2(provider, network) {\n var _this = this;\n if (provider == null) {\n logger3.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 logger3.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 logger3 = 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 logger3.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n var n2 = (0, networks_1.getNetwork)(network);\n if (!n2 || !n2._defaultProvider) {\n logger3.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 logger3 = new logger_1.Logger(_version_1.version);\n function _pack(type, value, isArray2) {\n switch (type) {\n case \"address\":\n if (isArray2) {\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 (isArray2) {\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 size5 = parseInt(match[2] || \"256\");\n if (match[2] && String(size5) !== match[2] || size5 % 8 !== 0 || size5 === 0 || size5 > 256) {\n logger3.throwArgumentError(\"invalid number type\", \"type\", type);\n }\n if (isArray2) {\n size5 = 256;\n }\n value = bignumber_1.BigNumber.from(value).toTwos(size5);\n return (0, bytes_1.zeroPad)(value, size5 / 8);\n }\n match = type.match(regexBytes);\n if (match) {\n var size5 = parseInt(match[1]);\n if (String(size5) !== match[1] || size5 === 0 || size5 > 32) {\n logger3.throwArgumentError(\"invalid bytes type\", \"type\", type);\n }\n if ((0, bytes_1.arrayify)(value).byteLength !== size5) {\n logger3.throwArgumentError(\"invalid value for \" + type, \"value\", value);\n }\n if (isArray2) {\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 logger3.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 logger3.throwArgumentError(\"invalid type\", \"type\", type);\n }\n function pack(types, values) {\n if (types.length != values.length) {\n logger3.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 logger3 = 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 logger3.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 formatUnits3(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 = formatUnits3;\n function parseUnits2(value, unitName) {\n if (typeof value !== \"string\") {\n logger3.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 = parseUnits2;\n function formatEther3(wei) {\n return formatUnits3(wei, 18);\n }\n exports3.formatEther = formatEther3;\n function parseEther2(ether) {\n return parseUnits2(ether, 18);\n }\n exports3.parseEther = parseEther2;\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 __createBinding2 = 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 __setModuleDefault2 = 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 __importStar2 = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 in mod2)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod2, k4))\n __createBinding2(result, mod2, k4);\n }\n __setModuleDefault2(result, mod2);\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 = __importStar2(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 = __importStar2(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 __createBinding2 = 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 __setModuleDefault2 = 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 __importStar2 = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 in mod2)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod2, k4))\n __createBinding2(result, mod2, k4);\n }\n __setModuleDefault2(result, mod2);\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 = __importStar2(require_lib8());\n exports3.constants = constants;\n var providers = __importStar2(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 = __importStar2(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 logger3 = new logger_1.Logger(_version_1.version);\n exports3.logger = logger3;\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 __createBinding2 = 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 __setModuleDefault2 = 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 __importStar2 = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 in mod2)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod2, k4))\n __createBinding2(result, mod2, k4);\n }\n __setModuleDefault2(result, mod2);\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 ethers4 = __importStar2(require_ethers());\n exports3.ethers = ethers4;\n try {\n anyGlobal = window;\n if (anyGlobal._ethers == null) {\n anyGlobal._ethers = ethers4;\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, e2) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e2.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 (e2.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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 (e2) {\n op = [6, e2];\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 = [], e2;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e2 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e2)\n throw e2.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, from5, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from5.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from5)) {\n if (!ar)\n ar = Array.prototype.slice.call(from5, 0, i3);\n ar[i3] = from5[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from5));\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 (e2) {\n settle2(q3[0][3], e2);\n }\n }\n function step(r2) {\n r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle2(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 settle2(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(e2) {\n throw e2;\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), settle2(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle2(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(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 = ownKeys(mod2), i3 = 0; i3 < k4.length; i3++)\n if (k4[i3] !== \"default\")\n __createBinding(result, mod2, k4[i3]);\n }\n __setModuleDefault(result, mod2);\n return result;\n }\n function __importDefault(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { default: mod2 };\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(env3, 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 (e2) {\n return Promise.reject(e2);\n }\n };\n env3.stack.push({ value, dispose, async });\n } else if (async) {\n env3.stack.push({ async: true });\n }\n return value;\n }\n function __disposeResources(env3) {\n function fail(e2) {\n env3.error = env3.hasError ? new _SuppressedError(e2, env3.error, \"An error was suppressed during disposal.\") : e2;\n env3.hasError = true;\n }\n var r2, s4 = 0;\n function next() {\n while (r2 = env3.stack.pop()) {\n try {\n if (!r2.async && s4 === 1)\n return s4 = 0, env3.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(e2) {\n fail(e2);\n return next();\n });\n } else\n s4 |= 1;\n } catch (e2) {\n fail(e2);\n }\n }\n if (s4 === 1)\n return env3.hasError ? Promise.reject(env3.error) : Promise.resolve();\n if (env3.hasError)\n throw env3.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 __assign2(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 e2 = new Error(message);\n return e2.name = \"SuppressedError\", e2.error = error, e2.suppressed = suppressed, e2;\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"enableAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"registerNextAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"undeleteApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"AppDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"DelegateeAdded\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"AppAlreadyDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyUndeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionAlreadyInRequestedState\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeAlreadyRegisteredToApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"EmptyPolicyIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotAppManager\",\n inputs: [\n {\n name: \"appId\",\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: \"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: \"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: \"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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"version\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n },\n {\n name: \"appVersion\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.AppVersion\",\n components: [\n {\n name: \"version\",\n type: \"uint256\",\n internalType: \"uint256\"\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 outputs: [\n {\n name: \"appsWithVersions\",\n type: \"tuple[]\",\n internalType: \"struct VincentAppViewFacet.AppWithVersions[]\",\n components: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n },\n {\n name: \"versions\",\n type: \"tuple[]\",\n internalType: \"struct VincentAppViewFacet.AppVersion[]\",\n components: [\n {\n name: \"version\",\n type: \"uint256\",\n internalType: \"uint256\"\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 }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getDelegatedAgentPkpTokenIds\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"version\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"limit\",\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: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"InvalidOffsetOrLimit\",\n inputs: []\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: \"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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"setAbilityPolicyParameters\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityIpfsCid\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"EmptyPolicyIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidInput\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotAllRegisteredAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"AbilityNotRegisteredForAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"AbilitiesAndPoliciesLengthMismatch\",\n inputs: []\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: \"getAllPermittedAppIdsForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\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: \"getAllRegisteredAgentPkps\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n internalType: \"address\"\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: \"getAllAbilitiesAndPoliciesForApp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"getPermittedAppVersionForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\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: \"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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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 seen2 = /* @__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 (!seen2.has(signature)) {\n seen2.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 (!seen2.has(fallbackKey)) {\n seen2.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 = \"0xa1979393bbe7D59dfFBEB38fE5eCf9BDdFE6f4aD\";\n exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = \"0xa1979393bbe7D59dfFBEB38fE5eCf9BDdFE6f4aD\";\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 = 100;\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.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: newAppVersion.toNumber()\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 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.getAppVersion = getAppVersion;\n exports3.getAppsByManagerAddress = getAppsByManagerAddress;\n exports3.getAppByDelegateeAddress = getAppByDelegateeAddress;\n exports3.getDelegatedPkpEthAddresses = getDelegatedPkpEthAddresses;\n var constants_1 = require_constants3();\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.toNumber(),\n latestVersion: app.latestVersion.toNumber(),\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 getAppVersion(params) {\n const { args: { appId, version: version8 }, contract } = params;\n try {\n const [, appVersion] = await contract.getAppVersion(appId, version8);\n return {\n appVersion: { ...appVersion, version: appVersion.version.toNumber() }\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 }, contract } = params;\n try {\n const appsWithVersions = await contract.getAppsByManager(managerAddress);\n return appsWithVersions.map(({ app: appChain, versions: versions2 }) => {\n const { delegatees, ...app } = appChain;\n return {\n app: {\n ...app,\n delegateeAddresses: delegatees,\n id: app.id.toNumber(),\n latestVersion: app.latestVersion.toNumber()\n },\n versions: versions2.map(({ enabled, abilities, version: appVersion }) => ({\n version: appVersion.toNumber(),\n enabled,\n abilities\n }))\n };\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.toNumber(),\n latestVersion: app.latestVersion.toNumber()\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, pageOpts, version: version8 }, contract } = params;\n try {\n const delegatedAgentPkpTokenIds = await contract.getDelegatedAgentPkpTokenIds(appId, version8, pageOpts?.offset || 0, pageOpts?.limit || constants_1.DEFAULT_PAGE_SIZE);\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(e2, t3 = void 0) {\n this.tag = e2, this.contents = t3;\n }\n get noChildren() {\n return !!_i.#e.get(this.tag)?.noChildren;\n }\n static registerDecoder(e2, t3, n2) {\n const o5 = this.#e.get(e2);\n return this.#e.set(e2, 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(e2) {\n const t3 = this.#e.get(e2);\n return this.#e.delete(e2), t3;\n }\n static getDecoder(e2) {\n return this.#e.get(e2);\n }\n static getAllDecoders() {\n return new Map(this.#e);\n }\n *[Symbol.iterator]() {\n yield this.contents;\n }\n push(e2) {\n return this.contents = e2, 1;\n }\n decode(e2) {\n const t3 = e2?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n return t3 ? t3(this, e2) : this;\n }\n comment(e2, t3) {\n const n2 = e2?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n if (n2?.comment)\n return n2.comment(this, e2, t3);\n }\n toCBOR() {\n return [this.tag, this.contents];\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](e2, 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, e2) {\n Object.defineProperty(n2, N.ENCODED, { configurable: true, enumerable: false, value: e2 });\n }\n function l(n2, e2) {\n Object.defineProperty(n2, N.LENGTH, { configurable: true, enumerable: false, value: e2 });\n }\n function d(n2, e2) {\n const r2 = Object(n2);\n return u(r2, e2), 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((e2) => t(e2));\n case Map: {\n const e2 = t([...n2.entries()]);\n return e2.every(([r2]) => typeof r2 == \"string\") ? Object.fromEntries(e2) : new Map(e2);\n }\n case i:\n return new i(t(n2.tag), t(n2.contents));\n case Object: {\n const e2 = {};\n for (const [r2, a3] of Object.entries(n2))\n e2[r2] = t(a3);\n return e2;\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 e2 of a3)\n if (e2[0] >= n2 && e2[0] + e2[1] <= t3) {\n const i3 = [...e2];\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((e2, i3) => e2 + i3.length, 0), t3 = r2.some((e2) => l2(e2)), o5 = [], a3 = new Uint8Array(n2);\n let s4 = 0;\n for (const e2 of r2) {\n if (!(e2 instanceof Uint8Array))\n throw new TypeError(`Invalid array: ${e2}`);\n if (a3.set(e2, s4), t3) {\n const i3 = e2[g] ?? [[0, e2.length]];\n for (const u2 of i3)\n u2[0] += s4;\n o5.push(...i3);\n }\n s4 += e2.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(e2, t3) {\n const n2 = this.#e.get(e2);\n return this.#e.set(e2, t3), n2;\n }\n get(e2) {\n return this.#e.get(e2);\n }\n delete(e2) {\n return this.#e.delete(e2);\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 e2 = n2[o5] - t3[o5];\n if (e2 !== 0)\n return e2;\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(e2, n2 = 0, t3 = false) {\n const r2 = e2[n2] & 128 ? -1 : 1, f6 = (e2[n2] & 124) >> 2, a3 = (e2[n2] & 3) << 8 | e2[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(e2) {\n const n2 = new DataView(new ArrayBuffer(4));\n n2.setFloat32(0, e2, 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(e2) {\n if (e2 !== 0) {\n const n2 = new ArrayBuffer(8), t3 = new DataView(n2);\n t3.setFloat64(0, e2, false);\n const r2 = t3.getBigUint64(0, false);\n if ((r2 & 0x7ff0000000000000n) === 0n)\n return r2 & 0x8000000000000000n ? -0 : 0;\n }\n return e2;\n }\n function l3(e2) {\n switch (e2.length) {\n case 2:\n o2(e2, 0, true);\n break;\n case 4: {\n const n2 = new DataView(e2.buffer, e2.byteOffset, e2.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(e2.buffer, e2.byteOffset, e2.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: ${e2}`);\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(e2) {\n const n2 = e2 < 0;\n return typeof e2 == \"bigint\" ? [n2 ? -e2 - 1n : e2, n2] : [n2 ? -e2 - 1 : e2, n2];\n }\n function T2(e2, n2, t3) {\n if (t3.rejectFloats)\n throw new Error(`Attempt to encode an unwanted floating point number: ${e2}`);\n if (isNaN(e2))\n n2.writeUint8(U2), n2.writeUint16(32256);\n else if (!t3.float64 && Math.fround(e2) === e2) {\n const r2 = s3(e2);\n r2 === null ? (n2.writeUint8(h2), n2.writeFloat32(e2)) : (n2.writeUint8(U2), n2.writeUint16(r2));\n } else\n n2.writeUint8(B), n2.writeFloat64(e2);\n }\n function a(e2, n2, t3) {\n const [r2, i3] = y2(e2);\n if (i3 && t3)\n throw new TypeError(`Negative size: ${e2}`);\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(e2, n2, t3) {\n typeof e2 == \"number\" ? a(e2, n2, f.TAG) : typeof e2 == \"object\" && !t3.ignoreOriginalEncoding && N.ENCODED in e2 ? n2.write(e2[N.ENCODED]) : e2 <= Number.MAX_SAFE_INTEGER ? a(Number(e2), n2, f.TAG) : (n2.writeUint8(f.TAG << 5 | o.EIGHT), n2.writeBigUint64(BigInt(e2)));\n }\n function N2(e2, n2, t3) {\n const [r2, i3] = y2(e2);\n if (t3.collapseBigInts && (!t3.largeNegativeAsBigInt || e2 >= -0x8000000000000000n)) {\n if (r2 <= 0xffffffffn) {\n a(Number(e2), 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: ${e2}`);\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(e2, n2, t3) {\n t3.flushToZero && (e2 = i2(e2)), Object.is(e2, -0) ? t3.simplifyNegativeZero ? t3.avoidInts ? T2(0, n2, t3) : a(0, n2) : T2(e2, n2, t3) : !t3.avoidInts && Number.isSafeInteger(e2) ? a(e2, n2) : t3.reduceUnsafeNumbers && Math.floor(e2) === e2 && e2 >= S.MIN && e2 <= S.MAX ? N2(BigInt(e2), n2, t3) : T2(e2, n2, t3);\n }\n function Z(e2, n2, t3) {\n const r2 = t3.stringNormalization ? e2.normalize(t3.stringNormalization) : e2;\n if (t3.wtf8 && !e2.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(e2, n2, t3) {\n const r2 = e2;\n R2(r2, r2.length, f.ARRAY, n2, t3);\n for (const i3 of r2)\n g2(i3, n2, t3);\n }\n function V(e2, n2) {\n a(e2.length, n2, f.BYTE_STRING), n2.write(e2);\n }\n function ce(e2, n2) {\n return b2.registerEncoder(e2, n2);\n }\n function R2(e2, n2, t3, r2, i3) {\n const o5 = s(e2);\n o5 && !i3.ignoreOriginalEncoding ? r2.write(o5) : a(n2, r2, t3);\n }\n function X(e2, n2, t3) {\n if (e2 === null) {\n n2.writeUint8(q);\n return;\n }\n if (!t3.ignoreOriginalEncoding && N.ENCODED in e2) {\n n2.write(e2[N.ENCODED]);\n return;\n }\n const r2 = e2.constructor;\n if (r2) {\n const o5 = t3.types?.get(r2) ?? b2.get(r2);\n if (o5) {\n const c4 = o5(e2, 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 e2.toCBOR == \"function\") {\n const o5 = e2.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 e2.toJSON == \"function\") {\n g2(e2.toJSON(), n2, t3);\n return;\n }\n const i3 = Object.entries(e2).map((o5) => [o5[0], o5[1], Q(o5[0], t3)]);\n t3.sortKeys && i3.sort(t3.sortKeys), R2(e2, 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(e2, n2, t3) {\n switch (typeof e2) {\n case \"number\":\n Y(e2, n2, t3);\n break;\n case \"bigint\":\n N2(e2, n2, t3);\n break;\n case \"string\":\n Z(e2, n2, t3);\n break;\n case \"boolean\":\n n2.writeUint8(e2 ? 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(e2, n2, t3);\n break;\n case \"symbol\":\n throw new TypeError(`Unknown symbol: ${e2.toString()}`);\n default:\n throw new TypeError(`Unknown type: ${typeof e2}, ${String(e2)}`);\n }\n }\n function Q(e2, 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(e2, r2, t3), r2.read();\n }\n function de(e2, 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(e2);\n function c4(s4) {\n if (Object.is(e2, -0))\n throw new Error(\"Invalid integer: -0\");\n const [u2, E2] = y2(e2);\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}: ${e2}`);\n if (u2 > s4)\n throw new TypeError(`Undersized encoding ${n2} for: ${e2}`);\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(e2, -0))\n throw new TypeError(\"Invalid bigint: -0\");\n e2 = BigInt(e2), N2(e2, 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: ${e2}`);\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: ${e2}`);\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(e2, -0))\n throw new Error(\"Invalid integer: -0\");\n if (Number.isSafeInteger(o5))\n a(o5, i3, e2 < 0 ? void 0 : t3);\n else {\n const [s4, u2] = c4(1 / 0);\n u2 > 0xffffffffffffffffn ? (e2 = BigInt(e2), N2(e2, 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(e2, 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 = ((e2) => (e2[e2.NEVER = -1] = \"NEVER\", e2[e2.PREFERRED = 0] = \"PREFERRED\", e2[e2.ALWAYS = 1] = \"ALWAYS\", e2))(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(e2) {\n this.value = e2;\n }\n static create(e2) {\n return _t.KnownSimple.has(e2) ? _t.KnownSimple.get(e2) : new _t(e2);\n }\n toCBOR(e2, i3) {\n if (i3.rejectCustomSimples)\n throw new Error(`Cannot encode non-standard Simple value: ${this.value}`);\n a(this.value, e2, 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\")](e2, 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 e2 = n2, f6 = false, a3 = 0;\n switch (n2) {\n case o.ONE:\n if (a3 = 1, e2 = this.#r.getUint8(this.#e), i3 === f.SIMPLE_FLOAT) {\n if (e2 < 32)\n throw new Error(`Invalid simple encoding in extra byte: ${e2}`);\n f6 = true;\n } else if (this.#i.requirePreferred && e2 < 24)\n throw new Error(`Unexpectedly long integer encoding (1) for ${e2}`);\n break;\n case o.TWO:\n if (a3 = 2, i3 === f.SIMPLE_FLOAT)\n e2 = o2(this.#t, this.#e);\n else if (e2 = this.#r.getUint16(this.#e, false), this.#i.requirePreferred && e2 <= 255)\n throw new Error(`Unexpectedly long integer encoding (2) for ${e2}`);\n break;\n case o.FOUR:\n if (a3 = 4, i3 === f.SIMPLE_FLOAT)\n e2 = this.#r.getFloat32(this.#e, false);\n else if (e2 = this.#r.getUint32(this.#e, false), this.#i.requirePreferred && e2 <= 65535)\n throw new Error(`Unexpectedly long integer encoding (4) for ${e2}`);\n break;\n case o.EIGHT: {\n if (a3 = 8, i3 === f.SIMPLE_FLOAT)\n e2 = this.#r.getFloat64(this.#e, false);\n else if (e2 = this.#r.getBigUint64(this.#e, false), e2 <= Number.MAX_SAFE_INTEGER && (e2 = Number(e2)), this.#i.requirePreferred && e2 <= 4294967295)\n throw new Error(`Unexpectedly long integer encoding (8) for ${e2}`);\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 e2 = 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, e2, r2, a3];\n break;\n case f.NEG_INT:\n yield [i3, n2, typeof e2 == \"bigint\" ? -1n - e2 : -1 - Number(e2), r2, a3];\n break;\n case f.BYTE_STRING:\n e2 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, this.#a(e2), r2, e2];\n break;\n case f.UTF8_STRING:\n e2 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, p3.decode(this.#a(e2)), r2, e2];\n break;\n case f.ARRAY:\n if (e2 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e2);\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 (e2 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e2);\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, e2, r2, a3], yield* this.#n(t3);\n break;\n case f.SIMPLE_FLOAT: {\n const o5 = e2;\n f6 && (e2 = t2.create(Number(e2))), yield [i3, n2, e2, 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), e2 = n2.next(), [f6, a3, o5] = e2.value;\n if (o5 === N.BREAK) {\n yield e2.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 e2.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, e2, t3) {\n if ([this.mt, this.ai, , this.offset] = r2, this.left = i3, this.parent = e2, this.#e = t3, e2 && (this.depth = e2.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, e2, t3) {\n const [s4, l6, n2, c4] = r2;\n switch (s4) {\n case f.POS_INT:\n case f.NEG_INT: {\n if (e2.rejectInts)\n throw new Error(`Unexpected integer: ${n2}`);\n if (e2.rejectLargeNegatives && n2 < -0x8000000000000000n)\n throw new Error(`Invalid 65bit negative number: ${n2}`);\n let o5 = n2;\n return e2.convertUnsafeIntsToFloat && o5 >= S.MIN && o5 <= S.MAX && (o5 = Number(n2)), e2.boxed ? d(o5, t3.toHere(c4)) : o5;\n }\n case f.SIMPLE_FLOAT:\n if (l6 > o.ONE) {\n if (e2.rejectFloats)\n throw new Error(`Decoding unwanted floating point number: ${n2}`);\n if (e2.rejectNegativeZero && Object.is(n2, -0))\n throw new Error(\"Decoding negative zero\");\n if (e2.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 (e2.rejectSubnormals && l3(t3.toHere(c4 + 1)), e2.rejectLongFloats) {\n const o5 = Q(n2, { chunkSize: 9, reduceUnsafeNumbers: e2.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\" && e2.boxed)\n return d(n2, t3.toHere(c4));\n } else {\n if (e2.rejectSimple && n2 instanceof t2)\n throw new Error(`Invalid simple value: ${n2}`);\n if (e2.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 e2.ParentType(r2, 1 / 0, i3, e2);\n if (e2.rejectStringsNotNormalizedAs && typeof n2 == \"string\") {\n const o5 = n2.normalize(e2.rejectStringsNotNormalizedAs);\n if (n2 !== o5)\n throw new Error(`String not normalized as \"${e2.rejectStringsNotNormalizedAs}\", got [${U(n2)}] instead of [${U(o5)}]`);\n }\n return e2.boxed ? d(n2, t3.toHere(c4)) : n2;\n case f.ARRAY:\n return new e2.ParentType(r2, n2, i3, e2);\n case f.MAP:\n return new e2.ParentType(r2, n2 * 2, i3, e2);\n case f.TAG: {\n const o5 = new e2.ParentType(r2, 1, i3, e2);\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, e2) {\n if (this.children.push(r2), this.#t) {\n const t3 = f2(r2) || i3.toHere(e2);\n this.#t.push(t3);\n }\n return --this.left;\n }\n replaceLast(r2, i3, e2) {\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) || e2.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 e2 = this.#r();\n if (this.#e.sortKeys) {\n let t3;\n for (const s4 of e2) {\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 e2) {\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(e2, this.#e);\n break;\n }\n case f.BYTE_STRING:\n return d2(this.children);\n case f.UTF8_STRING: {\n const e2 = this.children.join(\"\");\n i3 = this.#e.boxed ? d(e2, r2.toHere(this.offset)) : e2;\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 e2 = new Array(i3 / 2);\n if (this.#t)\n for (let t3 = 0; t3 < i3; t3 += 2)\n e2[t3 >> 1] = [r2[t3], r2[t3 + 1], this.#t[t3]];\n else\n for (let t3 = 0; t3 < i3; t3 += 2)\n e2[t3 >> 1] = [r2[t3], r2[t3 + 1], A2];\n return e2;\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 e2 = o.ZERO;\n if (Object.is(n2, -0))\n e2 = 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 ? e2 = Number(o5) : o5 <= 255 ? e2 = o.ONE : o5 <= 65535 ? e2 = o.TWO : o5 <= 4294967295 ? e2 = o.FOUR : e2 = o.EIGHT;\n } else\n isFinite(n2) ? Math.fround(n2) === n2 ? s3(n2) == null ? e2 = o.FOUR : e2 = o.TWO : e2 = o.EIGHT : e2 = o.TWO;\n r2 = e2 !== 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, e2 = \"\";\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 ? e2 += \": \" : (e2 += \",\", n2.pretty || (e2 += \" \"))), n2.pretty && (t3.mt !== f.MAP || t3.count % 2 === 0) && (e2 += `\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 e2 += String(i3), e2 += 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 e2 += c4, isFinite(i3) && !/[.e]/.test(c4) && (e2 += \".0\"), e2 += a2(u2, o5, i3, n2);\n } else\n i3 instanceof t2 ? (e2 += \"simple(\", e2 += String(i3.value), e2 += a2(f.POS_INT, o5, i3.value, n2), e2 += \")\") : e2 += String(i3);\n break;\n case f.BYTE_STRING:\n i3 === 1 / 0 ? (e2 += \"(_ \", r2.close = \")\", r2.quote = \"'\") : (e2 += \"h'\", e2 += A(i3), e2 += \"'\", e2 += a2(f.POS_INT, o5, i3.length, n2));\n break;\n case f.UTF8_STRING:\n i3 === 1 / 0 ? (e2 += \"(_ \", r2.close = \")\") : (e2 += JSON.stringify(i3), e2 += a2(f.POS_INT, o5, y4.encode(i3).length, n2));\n break;\n case f.ARRAY: {\n e2 += \"[\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e2 += c4, c4 && (e2 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}]` : r2.close = \"]\";\n break;\n }\n case f.MAP: {\n e2 += \"{\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e2 += c4, c4 && (e2 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}}` : r2.close = \"}\";\n break;\n }\n case f.TAG:\n e2 += String(i3), e2 += a2(f.POS_INT, o5, i3, n2), e2 += \"(\", 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 e2 = e2.slice(0, -3), e2 += `${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 e2 += t3.close;\n }\n t3 = t3.parent;\n }\n }\n return e2;\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 e2 = \"\";\n e2 += y5(t3.depth * 2);\n const n2 = f2(t3);\n e2 += A(n2.subarray(0, 1));\n const r2 = t3.numBytes();\n r2 && (e2 += \" \", e2 += A(n2.subarray(1, r2 + 1))), e2 = e2.padEnd(a3.minCol + 1, \" \"), e2 += \"-- \", f6 !== void 0 && (e2 += y5(t3.depth * 2), f6 !== \"\" && (e2 += `[${f6}] `));\n let p4 = false;\n const [s4] = t3.children;\n switch (t3.mt) {\n case f.POS_INT:\n e2 += `Unsigned: ${s4}`, typeof s4 == \"bigint\" && (e2 += \"n\");\n break;\n case f.NEG_INT:\n e2 += `Negative: ${s4}`, typeof s4 == \"bigint\" && (e2 += \"n\");\n break;\n case f.BYTE_STRING:\n e2 += `Bytes (Length: ${O2(t3.length)})`;\n break;\n case f.UTF8_STRING:\n e2 += `UTF8 (Length: ${O2(t3.length)})`, t3.length !== 1 / 0 && (e2 += `: ${JSON.stringify(s4)}`);\n break;\n case f.ARRAY:\n e2 += `Array (Length: ${O2(t3.value, \"item\")})`;\n break;\n case f.MAP:\n e2 += `Map (Length: ${O2(t3.value, \"pair\")})`;\n break;\n case f.TAG: {\n e2 += `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 && (e2 += \": \", e2 += l6), p4 ||= i3.noChildren;\n break;\n }\n case f.SIMPLE_FLOAT:\n s4 === N.BREAK ? e2 += \"BREAK\" : t3.ai > o.ONE ? Object.is(s4, -0) ? e2 += \"Float: -0\" : e2 += `Float: ${s4}` : (e2 += \"Simple: \", s4 instanceof t2 ? e2 += s4.value : e2 += s4);\n break;\n }\n if (!p4)\n if (t3.leaf) {\n if (e2 += `\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 e2 += y5(a3.minCol + 1), e2 += \"--\", e2 += o5, e2 += \"<< \";\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 e2 += M(d5), e2 += ` >>\n`, e2 += L(d5, { initialDepth: t3.depth + 1, minCol: a3.minCol, noPrefixHex: true });\n continue;\n } else\n g4 === \"'\" && (e2 += y5(a3.minCol + 1), e2 += \"--\", e2 += o5, e2 += \"'\", e2 += H2.decode(n2.subarray(l6, l6 + c4)), e2 += `'\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 e2 += o5, e2 += A(n2.subarray(d5, h4)), e2 += `\n`;\n }\n }\n } else\n for (let i3 = r2 + 1; i3 < n2.length; i3 += 8)\n e2 += o5, e2 += A(n2.subarray(i3, i3 + 8)), e2 += `\n`;\n }\n } else {\n e2 += `\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 = \"\"), e2 += x2(m2, a3, i3);\n }\n o5++;\n }\n }\n return e2;\n }\n function L(t3, a3) {\n const f6 = { ...q2, ...a3, ParentType: A3, saveOriginal: true }, e2 = new y3(t3, f6);\n let n2, r2;\n for (const s4 of e2) {\n if (r2 = w.create(s4, n2, f6, e2), 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, e2.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, e2, s4[3]), n2 = r2; n2?.done; )\n r2 = n2, r2.leaf || u(r2, e2.toHere(r2.offset)), { parent: n2 } = n2;\n }\n a3 && (a3.minCol = f6.minCol);\n let p4 = f6.noPrefixHex ? \"\" : `0x${A(e2.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, e2, n2) {\n super(a3, f6, e2, 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(e2) {\n if (typeof e2 == \"object\" && e2) {\n if (e2.constructor !== Number)\n throw new Error(`Expected number: ${e2}`);\n } else if (typeof e2 != \"number\")\n throw new Error(`Expected number: ${e2}`);\n }\n function E(e2) {\n if (typeof e2 == \"object\" && e2) {\n if (e2.constructor !== String)\n throw new Error(`Expected string: ${e2}`);\n } else if (typeof e2 != \"string\")\n throw new Error(`Expected string: ${e2}`);\n }\n function f5(e2) {\n if (!(e2 instanceof Uint8Array))\n throw new Error(`Expected Uint8Array: ${e2}`);\n }\n function U3(e2) {\n if (!Array.isArray(e2))\n throw new Error(`Expected Array: ${e2}`);\n }\n function h3(e2) {\n return E(e2.contents), new Date(e2.contents);\n }\n function N3(e2) {\n return O3(e2.contents), new Date(e2.contents * 1e3);\n }\n function T3(e2, 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 (e2 && (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(e2, r2) {\n return f5(e2.contents), e2;\n }\n function c2(e2, r2, n2) {\n f5(e2.contents);\n let t3 = e2.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(e2.contents.buffer, e2.contents.byteOffset, e2.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(e2, r2, n2, t3, o5) {\n const d5 = o5.forceEndian ?? S2;\n if (p2(d5 ? r2 : n2, e2, o5), a(t3.byteLength, e2, f.BYTE_STRING), S2 === d5)\n e2.write(new Uint8Array(t3.buffer, t3.byteOffset, t3.byteLength));\n else {\n const y6 = `write${t3.constructor.name.replace(/Array/, \"\")}`, g4 = e2[y6].bind(e2);\n for (const p4 of t3)\n g4(p4, d5);\n }\n }\n function x3(e2) {\n return f5(e2.contents), new Wtf8Decoder().decode(e2.contents);\n }\n function w2(e2) {\n throw new Error(`Encoding ${e2.constructor.name} intentionally unimplmented. It is not concrete enough to interoperate. Convert to Uint8Array first.`);\n }\n function m(e2) {\n return [NaN, e2.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, (e2, r2, n2) => {\n const t3 = [...e2.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(e2, e2.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 = (e2) => (E(e2.contents), `(String Date) ${new Date(e2.contents).toISOString()}`), i.registerDecoder(I.DATE_STRING, h3);\n N3.comment = (e2) => (O3(e2.contents), `(Epoch Date) ${new Date(e2.contents * 1e3).toISOString()}`), i.registerDecoder(I.DATE_EPOCH, N3), ce(Date, (e2) => [I.DATE_EPOCH, e2.valueOf() / 1e3]);\n _ = T3.bind(null, false);\n $2 = T3.bind(null, true);\n _.comment = (e2, r2) => `(Positive BigInt) ${T3(false, e2, r2)}n`, $2.comment = (e2, r2) => `(Negative BigInt) ${T3(true, e2, r2)}n`, i.registerDecoder(I.POS_BIGINT, _), i.registerDecoder(I.NEG_BIGINT, $2);\n D.comment = (e2, r2, n2) => {\n f5(e2.contents);\n const t3 = { ...r2, initialDepth: n2 + 2, noPrefixHex: true }, o5 = f2(e2);\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(e2.contents, t3);\n let I2 = `Embedded CBOR\n`;\n return I2 += `${\"\".padStart((n2 + 1) * 2, \" \")}${g4}`.padEnd(t3.minCol + 1, \" \"), I2 += `-- Bytes (Length: ${e2.contents.length})\n`, I2 += p4, I2;\n }, D.noChildren = true, i.registerDecoder(I.CBOR, D), i.registerDecoder(I.URI, (e2) => (E(e2.contents), new URL(e2.contents)), \"URI\"), ce(URL, (e2) => [I.URI, e2.toString()]), i.registerDecoder(I.BASE64URL, (e2) => (E(e2.contents), x(e2.contents)), \"Base64url-encoded\"), i.registerDecoder(I.BASE64, (e2) => (E(e2.contents), y(e2.contents)), \"Base64-encoded\"), i.registerDecoder(35, (e2) => (E(e2.contents), new RegExp(e2.contents)), \"RegExp\"), i.registerDecoder(21065, (e2) => {\n E(e2.contents);\n const r2 = `^(?:${e2.contents})$`;\n return new RegExp(r2, \"u\");\n }, \"I-RegExp\"), i.registerDecoder(I.REGEXP, (e2) => {\n if (U3(e2.contents), e2.contents.length < 1 || e2.contents.length > 2)\n throw new Error(`Invalid RegExp Array: ${e2.contents}`);\n return new RegExp(e2.contents[0], e2.contents[1]);\n }, \"RegExp\"), ce(RegExp, (e2) => [I.REGEXP, [e2.source, e2.flags]]), i.registerDecoder(64, (e2) => (f5(e2.contents), e2.contents), \"uint8 Typed Array\");\n i.registerDecoder(65, (e2) => c2(e2, Uint16Array, false), \"uint16, big endian, Typed Array\"), i.registerDecoder(66, (e2) => c2(e2, Uint32Array, false), \"uint32, big endian, Typed Array\"), i.registerDecoder(67, (e2) => c2(e2, BigUint64Array, false), \"uint64, big endian, Typed Array\"), i.registerDecoder(68, (e2) => (f5(e2.contents), new Uint8ClampedArray(e2.contents)), \"uint8 Typed Array, clamped arithmetic\"), ce(Uint8ClampedArray, (e2) => [68, new Uint8Array(e2.buffer, e2.byteOffset, e2.byteLength)]), i.registerDecoder(69, (e2) => c2(e2, Uint16Array, true), \"uint16, little endian, Typed Array\"), ce(Uint16Array, (e2, r2, n2) => l4(r2, 69, 65, e2, n2)), i.registerDecoder(70, (e2) => c2(e2, Uint32Array, true), \"uint32, little endian, Typed Array\"), ce(Uint32Array, (e2, r2, n2) => l4(r2, 70, 66, e2, n2)), i.registerDecoder(71, (e2) => c2(e2, BigUint64Array, true), \"uint64, little endian, Typed Array\"), ce(BigUint64Array, (e2, r2, n2) => l4(r2, 71, 67, e2, n2)), i.registerDecoder(72, (e2) => (f5(e2.contents), new Int8Array(e2.contents)), \"sint8 Typed Array\"), ce(Int8Array, (e2) => [72, new Uint8Array(e2.buffer, e2.byteOffset, e2.byteLength)]), i.registerDecoder(73, (e2) => c2(e2, Int16Array, false), \"sint16, big endian, Typed Array\"), i.registerDecoder(74, (e2) => c2(e2, Int32Array, false), \"sint32, big endian, Typed Array\"), i.registerDecoder(75, (e2) => c2(e2, BigInt64Array, false), \"sint64, big endian, Typed Array\"), i.registerDecoder(77, (e2) => c2(e2, Int16Array, true), \"sint16, little endian, Typed Array\"), ce(Int16Array, (e2, r2, n2) => l4(r2, 77, 73, e2, n2)), i.registerDecoder(78, (e2) => c2(e2, Int32Array, true), \"sint32, little endian, Typed Array\"), ce(Int32Array, (e2, r2, n2) => l4(r2, 78, 74, e2, n2)), i.registerDecoder(79, (e2) => c2(e2, BigInt64Array, true), \"sint64, little endian, Typed Array\"), ce(BigInt64Array, (e2, r2, n2) => l4(r2, 79, 75, e2, n2)), i.registerDecoder(81, (e2) => c2(e2, Float32Array, false), \"IEEE 754 binary32, big endian, Typed Array\"), i.registerDecoder(82, (e2) => c2(e2, Float64Array, false), \"IEEE 754 binary64, big endian, Typed Array\"), i.registerDecoder(85, (e2) => c2(e2, Float32Array, true), \"IEEE 754 binary32, little endian, Typed Array\"), ce(Float32Array, (e2, r2, n2) => l4(r2, 85, 81, e2, n2)), i.registerDecoder(86, (e2) => c2(e2, Float64Array, true), \"IEEE 754 binary64, big endian, Typed Array\"), ce(Float64Array, (e2, r2, n2) => l4(r2, 86, 82, e2, n2)), i.registerDecoder(I.SET, (e2, r2) => {\n if (U3(e2.contents), r2.sortKeys) {\n const n2 = w.decodeToEncodeOpts(r2);\n let t3 = null;\n for (const o5 of e2.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(e2.contents);\n }, \"Set\"), ce(Set, (e2, r2, n2) => {\n let t3 = [...e2];\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, (e2) => (E(e2.contents), JSON.parse(e2.contents)), \"JSON-encoded\");\n x3.comment = (e2) => {\n f5(e2.contents);\n const r2 = new Wtf8Decoder();\n return `(WTF8 string): ${JSON.stringify(r2.decode(e2.contents))}`;\n }, i.registerDecoder(I.WTF8, x3), i.registerDecoder(I.SELF_DESCRIBED, (e2) => e2.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 e2 = { ...w.defaultDecodeOptions };\n if (i3.dcbor ? Object.assign(e2, w.dcborDecodeOptions) : i3.cde && Object.assign(e2, w.cdeDecodeOptions), Object.assign(e2, i3), Object.hasOwn(e2, \"rejectLongNumbers\"))\n throw new TypeError(\"rejectLongNumbers has changed to requirePreferred\");\n return e2.boxed && (e2.saveOriginal = true), e2;\n }\n function l5(i3, e2 = {}) {\n const n2 = c3(e2), 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, e2 = {}) {\n const n2 = c3(e2), 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(e2, n2, t3) {\n if (this.ret = w.create(e2, this.parent, n2, t3), e2[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, e2[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(e2, n2 = {}) {\n const t3 = new y3(e2, 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 e2 = this.#e ?? this.#n();\n return this.#e = void 0, e2;\n }\n *[Symbol.iterator]() {\n for (; ; ) {\n const e2 = this.read();\n if (!e2)\n return;\n yield e2;\n }\n }\n #n() {\n const { value: e2, done: n2 } = this.#t.next();\n if (!n2)\n return e2;\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 var cbor2_1 = (init_lib2(), __toCommonJS(lib_exports));\n var utils_1 = require_utils6();\n function encodePermissionDataForChain(permissionData) {\n const abilityIpfsCids = [];\n const policyIpfsCids = [];\n const policyParameterValues = [];\n Object.keys(permissionData).forEach((abilityIpfsCid) => {\n abilityIpfsCids.push(abilityIpfsCid);\n const abilityPolicies = permissionData[abilityIpfsCid];\n const abilityPolicyIpfsCids = [];\n const abilityPolicyParameterValues = [];\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(\"0x\" + Buffer2.from(encodedParams).toString(\"hex\"));\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 if (encodedParams && encodedParams.length > 0) {\n const byteArray = (0, utils_1.arrayify)(encodedParams);\n return (0, cbor2_1.decode)(byteArray);\n }\n return void 0;\n }\n function decodePermissionDataFromChain(abilitiesWithPolicies) {\n const permissionData = {};\n for (const ability of abilitiesWithPolicies) {\n const { abilityIpfsCid } = ability;\n permissionData[abilityIpfsCid] = {};\n for (const policy of ability.policies) {\n const { policyIpfsCid } = policy;\n permissionData[abilityIpfsCid][policyIpfsCid] = decodePolicyParametersFromChain(policy);\n }\n }\n return permissionData;\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.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 setAbilityPolicyParameters(params) {\n const { contract, args: { appId, appVersion, pkpEthAddress, policyParams }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const flattenedParams = (0, policyParams_1.encodePermissionDataForChain)(policyParams);\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.getAllAbilitiesAndPoliciesForApp = getAllAbilitiesAndPoliciesForApp;\n exports3.validateAbilityExecutionAndGetPolicies = validateAbilityExecutionAndGetPolicies;\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 } } = params;\n try {\n const pkpTokenIds = await contract.getAllRegisteredAgentPkps(userPkpAddress);\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.toNumber();\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 } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const appIds = await contract.getAllPermittedAppIdsForPkp(pkpTokenId);\n return appIds.map((appId) => appId.toNumber());\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 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 decodedPolicies = {};\n for (const policy of validationResult.policies) {\n const policyIpfsCid = policy.policyIpfsCid;\n decodedPolicies[policyIpfsCid] = (0, policyParams_1.decodePolicyParametersFromChain)(policy);\n }\n return {\n ...validationResult,\n appId: validationResult.appId.toNumber(),\n appVersion: validationResult.appVersion.toNumber(),\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 }\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 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 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 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 getAllAbilitiesAndPoliciesForApp: (params) => (0, UserView_1.getAllAbilitiesAndPoliciesForApp)({ contract, args: params }),\n validateAbilityExecutionAndGetPolicies: (params) => (0, UserView_1.validateAbilityExecutionAndGetPolicies)({ 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.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 }\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 // ../../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.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 }\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(e2) {\n return obj[e2];\n });\n };\n util2.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, 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(array, separator = \" | \") {\n return array.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_errors2 = __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_errors2();\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 } = 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 };\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 };\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 regex = `${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 regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n }\n function isValidIP(ip, version8) {\n if ((version8 === \"v4\" || !version8) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version8 === \"v6\" || !version8) && 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, version8) {\n if ((version8 === \"v4\" || !version8) && ipv4CidrRegex.test(ip)) {\n return true;\n }\n if ((version8 === \"v6\" || !version8) && 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 custom(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, base64Regex, 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_errors2();\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(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description\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 base64Regex = /^([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 regex = datetimeRegex(check);\n if (!regex.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 regex = dateRegex;\n if (!regex.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 regex = timeRegex(check);\n if (!regex.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 (!base64Regex.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(regex, validation, message) {\n return this.refinement((data) => regex.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(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex,\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(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\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(minLength, message) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength, 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 shape2 = this._def.shape();\n const keys = util.objectKeys(shape2);\n this._cached = { shape: shape2, 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: shape2, 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 = shape2[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 shape2 = {};\n for (const key of util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape2[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape2\n });\n }\n omit(mask) {\n const shape2 = {};\n for (const key of util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape2[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape2\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 = (shape2, params) => {\n return new ZodObject({\n shape: () => shape2,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.strictCreate = (shape2, params) => {\n return new ZodObject({\n shape: () => shape2,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.lazycreate = (shape2, params) => {\n return new ZodObject({\n shape: shape2,\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(size5, message) {\n return this.min(size5, message).max(size5, 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((e2) => {\n error.addIssue(makeArgsIssue(args, e2));\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((e2) => {\n error.addIssue(makeReturnsIssue(result, e2));\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 base3 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!isValid(base3))\n return INVALID;\n const result = effect.transform(base3.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((base3) => {\n if (!isValid(base3))\n return INVALID;\n return Promise.resolve(effect.transform(base3.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 }) => custom((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: () => custom,\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_errors2();\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_esm = __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/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-chain/yellowstone/yellowstoneConfig.js\n var require_yellowstoneConfig = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-chain/yellowstone/yellowstoneConfig.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.yellowstoneConfig = void 0;\n exports3.yellowstoneConfig = {\n id: 175188,\n name: \"Chronicle Yellowstone - Lit Protocol Testnet\",\n nativeCurrency: {\n name: \"Test LPX\",\n symbol: \"tstLPX\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://yellowstone-rpc.litprotocol.com/\"],\n webSocket: []\n },\n public: {\n http: [\"https://yellowstone-rpc.litprotocol.com/\"],\n webSocket: []\n }\n },\n blockExplorers: {\n default: {\n name: \"Yellowstone Explorer\",\n url: \"https://yellowstone-explorer.litprotocol.com/\"\n }\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/signTx.js\n var require_signTx = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/signTx.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.signTx = void 0;\n var signTx = async ({ sigName, pkpPublicKey, tx }) => {\n console.log(`Signing TX: ${sigName}`);\n const pkForLit = pkpPublicKey.startsWith(\"0x\") ? pkpPublicKey.slice(2) : pkpPublicKey;\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(ethers.utils.keccak256(ethers.utils.serializeTransaction(tx))),\n publicKey: pkForLit,\n sigName\n });\n return ethers.utils.serializeTransaction(tx, ethers.utils.joinSignature({\n r: \"0x\" + JSON.parse(sig).r.substring(2),\n s: \"0x\" + JSON.parse(sig).s,\n v: JSON.parse(sig).v\n }));\n };\n exports3.signTx = signTx;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/sendTx.js\n var require_sendTx = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/sendTx.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sendTx = void 0;\n var sendTx = async (provider, signedTx) => {\n console.log(\"Broadcasting transaction...\");\n const responseText = await Lit.Actions.runOnce({ waitForResponse: true, name: \"txnSender\" }, async () => {\n try {\n const receipt = await provider.sendTransaction(signedTx);\n console.log(\"Transaction sent:\", receipt.hash);\n return receipt.hash;\n } catch (error) {\n console.error(\"Error broadcasting transaction:\", error);\n return JSON.stringify(error);\n }\n });\n if (responseText.includes(\"error\")) {\n throw new Error(responseText);\n }\n const txHash = responseText;\n if (!ethers.utils.isHexString(txHash)) {\n throw new Error(`Invalid transaction hash: ${txHash}`);\n }\n return txHash;\n };\n exports3.sendTx = sendTx;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/contractCall.js\n var require_contractCall = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/contractCall.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.contractCall = void 0;\n var yellowstoneConfig_1 = require_yellowstoneConfig();\n var signTx_1 = require_signTx();\n var sendTx_1 = require_sendTx();\n var contractCall = async ({ provider, pkpPublicKey, callerAddress, abi: abi2, contractAddress, functionName, args, overrides = {}, chainId, gasBumpPercentage }) => {\n const iface = new ethers.utils.Interface(abi2);\n const encodedData = iface.encodeFunctionData(functionName, args);\n const fromAddress = callerAddress;\n console.log(\"Encoded data:\", encodedData);\n const txValue = overrides.value ? ethers.BigNumber.from(overrides.value.toString()) : ethers.BigNumber.from(0);\n const gasParamsResponse = await Lit.Actions.runOnce({ waitForResponse: true, name: \"gasParams\" }, async () => {\n let gasLimit2;\n if (overrides.gasLimit) {\n gasLimit2 = ethers.BigNumber.from(overrides.gasLimit.toString());\n } else {\n const estimatedGas = await provider.estimateGas({\n from: fromAddress,\n to: contractAddress,\n data: encodedData,\n value: txValue\n });\n console.log(\"RunOnce Estimated gas:\", estimatedGas);\n if (gasBumpPercentage) {\n gasLimit2 = estimatedGas.mul(gasBumpPercentage + 100).div(100);\n console.log(`RunOnce Bumped gas by ${gasBumpPercentage}% to ${gasLimit2}`);\n } else {\n gasLimit2 = estimatedGas;\n }\n }\n console.log(\"RunOnce Gas limit:\", gasLimit2);\n const nonce2 = await provider.getTransactionCount(callerAddress);\n const gasPrice2 = await provider.getGasPrice();\n console.log(\"RunOnce Gas price:\", gasPrice2.toString());\n return JSON.stringify({\n gasLimit: gasLimit2.toString(),\n gasPrice: gasPrice2.toString(),\n nonce: nonce2\n });\n });\n const parsedGasParamsResponse = JSON.parse(gasParamsResponse);\n const gasLimit = ethers.BigNumber.from(parsedGasParamsResponse.gasLimit);\n const gasPrice = ethers.BigNumber.from(parsedGasParamsResponse.gasPrice);\n const nonce = parseInt(parsedGasParamsResponse.nonce);\n const tx = {\n to: contractAddress,\n data: encodedData,\n value: txValue,\n gasLimit,\n gasPrice,\n nonce,\n chainId: chainId ?? yellowstoneConfig_1.yellowstoneConfig.id\n };\n console.log(\"Transaction:\", tx);\n const signedTx = await (0, signTx_1.signTx)({\n sigName: functionName,\n pkpPublicKey,\n tx\n });\n console.log(\"Signed transaction:\", signedTx);\n const txHash = await (0, sendTx_1.sendTx)(provider, signedTx);\n console.log(\"Transaction sent:\", txHash);\n return txHash;\n };\n exports3.contractCall = contractCall;\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.0.8_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.0.8_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.0.8\";\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/errors.js\n var BaseError;\n var init_errors3 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.0.8_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.0.8_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/regex.js\n function execTyped(regex, string) {\n const match = regex.exec(string);\n return match?.groups;\n }\n var bytesRegex, integerRegex, isTupleRegex;\n var init_regex = __esm({\n \"../../../node_modules/.pnpm/abitype@1.0.8_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.0.8_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 length = abiParameter.components.length;\n for (let i3 = 0; i3 < length; i3++) {\n const component = abiParameter.components[i3];\n type += formatAbiParameter(component);\n if (i3 < length - 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.0.8_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.0.8_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 length = abiParameters.length;\n for (let i3 = 0; i3 < length; i3++) {\n const abiParameter = abiParameters[i3];\n params += formatAbiParameter(abiParameter);\n if (i3 !== length - 1)\n params += \", \";\n }\n return params;\n }\n var init_formatAbiParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.0.8_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.0.8_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.0.8_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.0.8_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.0.8_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.0.8_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.0.8_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_errors3();\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.0.8_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.0.8_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_errors3();\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.0.8_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.0.8_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_errors3();\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.0.8_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.0.8_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_errors3();\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.0.8_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.0.8_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_errors3();\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.0.8_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.0.8_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.0.8_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 length = params.length;\n for (let i3 = 0; i3 < length; 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 length = params.length;\n for (let i3 = 0; i3 < length; 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 length = params.length;\n for (let i3 = 0; i3 < length; 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 length = params.length;\n for (let i3 = 0; i3 < length; 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 {\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 length = params.trim().length;\n for (let i3 = 0; i3 < length; 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, isArray2) {\n return isArray2 || type === \"bytes\" || type === \"string\" || type === \"tuple\";\n }\n var abiParameterWithoutTupleRegex, abiParameterWithTupleRegex, dynamicIntegerRegex, protectedKeywordsRegex;\n var init_utils2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.0.8_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$_]*)(?(?:\\[\\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.0.8_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 length = abiParameters.length;\n for (let i3 = 0; i3 < length; 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, 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${array ?? \"\"}`,\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.0.8_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.0.8_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 length = signatures.length;\n for (let i3 = 0; i3 < length; 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.0.8_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.0.8_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 length = signature.length;\n for (let i3 = 0; i3 < length; 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.0.8_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.0.8_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 length = parameters.length;\n for (let i3 = 0; i3 < length; i3++) {\n abiParameters.push(parseAbiParameter(parameters[i3], { modifiers }));\n }\n } else {\n const structs = parseStructs(params);\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++) {\n const signature = params[i3];\n if (isStructSignature(signature))\n continue;\n const parameters = splitParameters(signature);\n const length2 = parameters.length;\n for (let k4 = 0; k4 < length2; 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.0.8_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.0.8_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.0.8_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_parseAbi();\n init_parseAbiItem();\n init_parseAbiParameters();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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: size5 }) {\n super([`Data size of ${size5} bytes is too small for given parameters.`].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size5} 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 = size5;\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: size5 }) {\n super([\n `Data size of ${size5} bytes is too small for non-indexed event parameters.`\n ].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size5} 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 = size5;\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.31.3_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.31.3_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.31.3_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.31.3_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: size5 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \"${offset}\" is out-of-bounds (size: ${size5}).`, { name: \"SliceOffsetOutOfBoundsError\" });\n }\n };\n SizeExceedsPaddingSizeError = class extends BaseError2 {\n constructor({ size: size5, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size5}) exceeds padding size (${targetSize}).`, { name: \"SizeExceedsPaddingSizeError\" });\n }\n };\n InvalidBytesLengthError = class extends BaseError2 {\n constructor({ size: size5, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size5} ${type} long.`, { name: \"InvalidBytesLengthError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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: size5 = 32 } = {}) {\n if (typeof hexOrBytes === \"string\")\n return padHex(hexOrBytes, { dir, size: size5 });\n return padBytes(hexOrBytes, { dir, size: size5 });\n }\n function padHex(hex_, { dir, size: size5 = 32 } = {}) {\n if (size5 === null)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size5 * 2)\n throw new SizeExceedsPaddingSizeError({\n size: Math.ceil(hex.length / 2),\n targetSize: size5,\n type: \"hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size5 * 2, \"0\")}`;\n }\n function padBytes(bytes, { dir, size: size5 = 32 } = {}) {\n if (size5 === null)\n return bytes;\n if (bytes.length > size5)\n throw new SizeExceedsPaddingSizeError({\n size: bytes.length,\n targetSize: size5,\n type: \"bytes\"\n });\n const paddedBytes = new Uint8Array(size5);\n for (let i3 = 0; i3 < size5; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size5 - 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.31.3_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.31.3_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.31.3_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: size5, value }) {\n super(`Number \"${value}\" is not in safe ${size5 ? `${size5 * 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.31.3_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.31.3_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.31.3_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: size5 }) {\n if (size(hexOrBytes) > size5)\n throw new SizeOverflowError({\n givenSize: size(hexOrBytes),\n maxSize: size5\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 size5 = (hex.length - 2) / 2;\n const max = (1n << BigInt(size5) * 8n - 1n) - 1n;\n if (value <= max)\n return value;\n return value - BigInt(`0x${\"f\".padStart(size5 * 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.31.3_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.31.3_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 string = \"\";\n for (let i3 = 0; i3 < value.length; i3++) {\n string += hexes[value[i3]];\n }\n const hex = `0x${string}`;\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: size5 } = opts;\n const value = BigInt(value_);\n let maxValue;\n if (size5) {\n if (signed)\n maxValue = (1n << BigInt(size5) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size5) * 8n) - 1n;\n } else if (typeof value_ === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value > maxValue || value < minValue) {\n const suffix = typeof value_ === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue}${suffix}`,\n signed,\n size: size5,\n value: `${value_}${suffix}`\n });\n }\n const hex = `0x${(signed && value < 0 ? (1n << BigInt(size5 * 8)) + BigInt(value) : value).toString(16)}`;\n if (size5)\n return pad(hex, { size: size5 });\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.31.3_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.31.3_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 length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index2 = 0, j2 = 0; index2 < length; 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.31.3_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 array = 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 array[ai] = n1 * 16 + n2;\n }\n return array;\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, pad4 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad4);\n pad4 += a3.length;\n }\n return res;\n }\n function checkOpts(defaults3, 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(defaults3, 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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(size5) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size5;\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.31.3_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 hash2 = 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 (hash2[i3 >> 1] >> 4 >= 8 && address[i3]) {\n address[i3] = address[i3].toUpperCase();\n }\n if ((hash2[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.31.3_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.31.3_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.31.3_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.31.3_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 length = 0;\n for (const arr of values) {\n length += arr.length;\n }\n const result = new Uint8Array(length);\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 [length, type] = arrayComponents;\n return encodeArray(value, { length, 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 [, , size5 = \"256\"] = integerRegex2.exec(param.type) ?? [];\n return encodeNumber(value, {\n signed,\n size: Number(size5)\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, param }) {\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError(value);\n if (!dynamic && value.length !== length)\n throw new AbiEncodingArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${param.type}[${length}]`\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 length2 = numberToHex(preparedParams.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParams.length > 0 ? concat([length2, data]) : length2\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))\n throw new AbiEncodingBytesSizeMismatchError({\n expectedSize: Number.parseInt(paramSize),\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: size5 = 256 }) {\n if (typeof size5 === \"number\") {\n const max = 2n ** (BigInt(size5) - (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: size5 / 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 hexValue3 = stringToHex(value);\n const partsLength = Math.ceil(size(hexValue3) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padHex(slice(hexValue3, i3 * 32, (i3 + 1) * 32), {\n dir: \"right\"\n }));\n }\n return {\n dynamic: true,\n encoded: concat([\n padHex(numberToHex(size(hexValue3), { 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 matches2 = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches2 ? (\n // Return `null` if the array is dynamic.\n [matches2[2] ? Number(matches2[2]) : null, matches2[1]]\n ) : void 0;\n }\n var init_encodeAbiParameters = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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 = void 0;\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`, { 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.31.3_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.31.3_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(length, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length - 1);\n return this.bytes.subarray(position, position + length);\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(length, size5) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length);\n this.position += size5 ?? length;\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.31.3_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.31.3_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.31.3_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 [length, type] = arrayComponents;\n return decodeArray(cursor, { ...param, type }, { length, 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, staticPosition }) {\n if (!length) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength;\n cursor.setPosition(start);\n const length2 = bytesToNumber(cursor.readBytes(sizeOfLength));\n const dynamicChild = hasDynamicChild(param);\n let consumed2 = 0;\n const value2 = [];\n for (let i3 = 0; i3 < length2; ++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 < length; ++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 < length; ++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, size5] = param.type.split(\"bytes\");\n if (!size5) {\n const offset = bytesToNumber(cursor.readBytes(32));\n cursor.setPosition(staticPosition + offset);\n const length = bytesToNumber(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"0x\", 32];\n }\n const data = cursor.readBytes(length);\n cursor.setPosition(staticPosition + 32);\n return [bytesToHex(data), 32];\n }\n const value = bytesToHex(cursor.readBytes(Number.parseInt(size5), 32));\n return [value, 32];\n }\n function decodeNumber(cursor, param) {\n const signed = param.type.startsWith(\"int\");\n const size5 = Number.parseInt(param.type.split(\"int\")[1] || \"256\");\n const value = cursor.readBytes(32);\n return [\n size5 > 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 length = bytesToNumber(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"\", 32];\n }\n const data = cursor.readBytes(length, 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 [integer, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals)\n ];\n fraction = fraction.replace(/(0+)$/, \"\");\n return `${negative ? \"-\" : \"\"}${integer || \"0\"}${fraction ? `.${fraction}` : \"\"}`;\n }\n var init_formatUnits = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, WaitForTransactionReceiptTimeoutError;\n var init_transaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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: hash2, 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 (hash2)\n identifier = `Transaction with hash \"${hash2}\"`;\n super(`${identifier} could not be found.`, {\n name: \"TransactionNotFoundError\"\n });\n }\n };\n TransactionReceiptNotFoundError = class extends BaseError2 {\n constructor({ hash: hash2 }) {\n super(`Transaction receipt with hash \"${hash2}\" could not be found. The Transaction may not be processed on a block yet.`, {\n name: \"TransactionReceiptNotFoundError\"\n });\n }\n };\n WaitForTransactionReceiptTimeoutError = class extends BaseError2 {\n constructor({ hash: hash2 }) {\n super(`Timed out while waiting for transaction with hash \"${hash2}\" to be confirmed.`, { name: \"WaitForTransactionReceiptTimeoutError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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 = void 0;\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE2 ? 4 : 0;\n const l6 = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE2);\n view.setUint32(byteOffset + l6, wl, isLE2);\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, isLE2) {\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 = isLE2;\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: isLE2 } = 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), isLE2);\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], isLE2);\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, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % 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(hash2, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash(hash2);\n const key = toBytes2(_key);\n this.iHash = hash2.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 pad4 = new Uint8Array(blockLen);\n pad4.set(key.length > blockLen ? hash2.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad4.length; i3++)\n pad4[i3] ^= 54;\n this.iHash.update(pad4);\n this.oHash = hash2.create();\n for (let i3 = 0; i3 < pad4.length; i3++)\n pad4[i3] ^= 54 ^ 92;\n this.oHash.update(pad4);\n clean(pad4);\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 = (hash2, key, message) => new HMAC(hash2, key).update(message).digest();\n hmac.create = (hash2, key) => new HMAC(hash2, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.2/node_modules/@noble/curves/esm/utils.js\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 bytesToNumberBE(bytes) {\n return hexToNumber2(bytesToHex2(bytes));\n }\n function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber2(bytesToHex2(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE(n2, len) {\n return hexToBytes2(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 = hexToBytes2(hex);\n } catch (e2) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e2);\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 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 const u8n = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\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(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 isHash(val) {\n return typeof val === \"function\" && Number.isSafeInteger(val.outputLen);\n }\n function _validateObject(object, fields, optFields = {}) {\n if (!object || typeof object !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object[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 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, isPosBig, bitMask;\n var init_utils5 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.2/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 _0n2 = /* @__PURE__ */ BigInt(0);\n _1n2 = /* @__PURE__ */ BigInt(1);\n isPosBig = (n2) => typeof n2 === \"bigint\" && _0n2 <= n2;\n bitMask = (n2) => (_1n2 << BigInt(n2)) - _1n2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.2/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(number, modulo) {\n if (number === _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(number, 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: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n _validateObject(field, opts);\n return field;\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, bitLenOrOpts, isLE2 = false, opts = {}) {\n if (ORDER <= _0n3)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE2)\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 isLE2 = _opts.isLE;\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 } = nLength(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: isLE2,\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 // is valid and invertible\n isValidNot0: (num2) => !f6.is0(num2) && f6.isValid(num2),\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: _sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f6, n2);\n }),\n toBytes: (num2) => isLE2 ? 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 isLE2 ? 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 length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField(key, fieldOrder, isLE2 = 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 = isLE2 ? bytesToNumberLE(key) : bytesToNumberBE(key);\n const reduced = mod(num2, fieldOrder - _1n3) + _1n3;\n return isLE2 ? 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.2/node_modules/@noble/curves/esm/abstract/modular.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\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.2/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, property, points) {\n const getz = property === \"pz\" ? (p4) => p4.pz : (p4) => p4.ez;\n const toInv = FpInvertBatch(c4.Fp, points.map(getz));\n const affined = points.map((p4, i3) => p4.toAffine(toInv[i3]));\n return affined.map(c4.fromAffine);\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 assert0(n2) {\n if (n2 !== _0n4)\n throw new Error(\"invalid wNAF\");\n }\n function wNAF(c4, bits) {\n return {\n constTimeNegate: negateCt,\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 base3 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base3 = p4;\n points.push(base3);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base3 = base3.add(p4);\n points.push(base3);\n }\n p4 = base3.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(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 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 assert0(n2);\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 if (typeof transform2 === \"function\")\n comp = transform2(comp);\n pointPrecomputes.set(P2, comp);\n }\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 mulEndoUnsafe(c4, point, k1, k22) {\n let acc = point;\n let p1 = c4.ZERO;\n let p22 = c4.ZERO;\n while (k1 > _0n4 || k22 > _0n4) {\n if (k1 & _1n4)\n p1 = p1.add(acc);\n if (k22 & _1n4)\n p22 = p22.add(acc);\n acc = acc.double();\n k1 >>= _1n4;\n k22 >>= _1n4;\n }\n return { p1, p2: p22 };\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 createField(order, field) {\n if (field) {\n if (field.ORDER !== order)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n validateField(field);\n return field;\n } else {\n return Field(order);\n }\n }\n function _createCurveFields(type, CURVE, curveOpts = {}) {\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 > _0n4))\n throw new Error(`CURVE.${p4} must be positive bigint`);\n }\n const Fp = createField(CURVE.p, curveOpts.Fp);\n const Fn = createField(CURVE.n, curveOpts.Fn);\n const _b2 = type === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b2];\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 return { Fp, Fn };\n }\n var _0n4, _1n4, pointPrecomputes, pointWindowSizes;\n var init_curve = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.2/node_modules/@noble/curves/esm/abstract/curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils5();\n init_modular();\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.2/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 _legacyHelperEquat(Fp, a3, b4) {\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, a3)), b4);\n }\n return weierstrassEquation;\n }\n function _legacyHelperNormPriv(Fn, allowedPrivateKeyLengths, wrapPrivateKey) {\n const { BYTES: expected } = Fn;\n function normPrivateKeyToScalar(key) {\n let num2;\n if (typeof key === \"bigint\") {\n num2 = key;\n } else {\n let bytes = ensureBytes(\"private key\", key);\n if (allowedPrivateKeyLengths) {\n if (!allowedPrivateKeyLengths.includes(bytes.length * 2))\n throw new Error(\"invalid private key\");\n const padded = new Uint8Array(expected);\n padded.set(bytes, padded.length - bytes.length);\n bytes = padded;\n }\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 (wrapPrivateKey)\n num2 = Fn.create(num2);\n if (!Fn.isValidNot0(num2))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num2;\n }\n return normPrivateKeyToScalar;\n }\n function weierstrassN(CURVE, curveOpts = {}) {\n const { Fp, Fn } = _createCurveFields(\"weierstrass\", CURVE, curveOpts);\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n _validateObject(curveOpts, {}, {\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 } = curveOpts;\n if (endo) {\n if (!Fp.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error('invalid endo: expected \"beta\": bigint and \"splitScalar\": function');\n }\n }\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 abool(\"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 abytes(bytes);\n const L2 = Fp.BYTES;\n const LC = L2 + 1;\n const LU = 2 * L2 + 1;\n const length = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length === LC && (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 (length === LU && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(L2 * 0, L2 * 1));\n const y6 = Fp.fromBytes(tail.subarray(L2 * 1, 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 ${length}, expected compressed=${LC} or uncompressed=${LU}`);\n }\n }\n const toBytes4 = curveOpts.toBytes || pointToBytes2;\n const fromBytes2 = curveOpts.fromBytes || pointFromBytes;\n const weierstrassEquation = _legacyHelperEquat(Fp, CURVE.a, CURVE.b);\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 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 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 (curveOpts.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 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.px, endoBeta), k2p.py, k2p.pz);\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(px, py, pz) {\n this.px = acoord(\"x\", px);\n this.py = acoord(\"y\", py, true);\n this.pz = acoord(\"z\", pz);\n Object.freeze(this);\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 get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n static normalizeZ(points) {\n return normalizeZ(Point3, \"pz\", points);\n }\n static fromBytes(bytes) {\n abytes(bytes);\n return Point3.fromHex(bytes);\n }\n /** Converts hash string or Uint8Array to Point. */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes2(ensureBytes(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n /** Multiplies generator point by privateKey. */\n static fromPrivateKey(privateKey) {\n const normPrivateKeyToScalar = _legacyHelperNormPriv(Fn, curveOpts.allowedPrivateKeyLengths, curveOpts.wrapPrivateKey);\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 /**\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.setWindowSize(this, windowSize);\n if (!isLazy)\n this.multiply(_3n2);\n return this;\n }\n /** \"Private method\", don't use it directly */\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\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 { 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 /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\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 /**\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 } = curveOpts;\n if (!Fn.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n2) => wnaf.wNAFCached(this, n2, Point3.normalizeZ);\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(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 Point3.normalizeZ([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 private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = curveOpts;\n const p4 = this;\n if (!Fn.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n5 || p4.is0())\n return Point3.ZERO;\n if (sc === _1n5)\n return p4;\n if (wnaf.hasPrecomputes(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(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.wNAFCachedUnsafe(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 } = curveOpts;\n if (cofactor === _1n5)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n return wnaf.wNAFCachedUnsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = curveOpts;\n if (cofactor === _1n5)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(cofactor);\n }\n toBytes(isCompressed = true) {\n abool(\"isCompressed\", isCompressed);\n this.assertValidity();\n return toBytes4(Point3, this, isCompressed);\n }\n /** @deprecated use `toBytes` */\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n toHex(isCompressed = true) {\n return bytesToHex2(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\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 = wNAF(Point3, curveOpts.endo ? Math.ceil(bits / 2) : bits);\n return Point3;\n }\n function pprefix(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function ecdsa(Point3, ecdsaOpts, curveOpts = {}) {\n _validateObject(ecdsaOpts, { hash: \"function\" }, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes_ = ecdsaOpts.randomBytes || randomBytes;\n const hmac_ = ecdsaOpts.hmac || ((key, ...msgs) => hmac(ecdsaOpts.hash, key, concatBytes(...msgs)));\n const { Fp, Fn } = Point3;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n5;\n return number > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? Fn.neg(s4) : s4;\n }\n function aValidRS(title2, num2) {\n if (!Fn.isValidNot0(num2))\n throw new Error(`invalid signature ${title2}: out of range 1..CURVE.n`);\n }\n class Signature {\n constructor(r2, s4, recovery) {\n aValidRS(\"r\", r2);\n aValidRS(\"s\", s4);\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 L2 = Fn.BYTES;\n const b4 = ensureBytes(\"compactSignature\", hex, L2 * 2);\n return new Signature(Fn.fromBytes(b4.subarray(0, L2)), Fn.fromBytes(b4.subarray(L2, L2 * 2)));\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 Signature(r2, s4);\n }\n /**\n * @todo remove\n * @deprecated\n */\n assertValidity() {\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n // ProjPointType\n recoverPublicKey(msgHash) {\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 * _2n3 < 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.fromHex(concatBytes(pprefix((rec & 1) === 0), x4));\n const ir = Fn.inv(radj);\n const h4 = bits2int_modN(ensureBytes(\"msgHash\", msgHash));\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 normalizeS() {\n return this.hasHighS() ? new Signature(this.r, Fn.neg(this.s), this.recovery) : this;\n }\n toBytes(format) {\n if (format === \"compact\")\n return concatBytes(Fn.toBytes(this.r), Fn.toBytes(this.s));\n if (format === \"der\")\n return hexToBytes2(DER.hexFromSig(this));\n throw new Error(\"invalid format\");\n }\n // DER-encoded\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return bytesToHex2(this.toBytes(\"der\"));\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return bytesToHex2(this.toBytes(\"compact\"));\n }\n }\n const normPrivateKeyToScalar = _legacyHelperNormPriv(Fn, curveOpts.allowedPrivateKeyLengths, curveOpts.wrapPrivateKey);\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 n2 = CURVE_ORDER;\n return mapHashToField(randomBytes_(getMinHashLength(n2)), n2);\n },\n precompute(windowSize = 8, point = Point3.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toBytes(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 length = arr.length;\n const L2 = Fp.BYTES;\n const LC = L2 + 1;\n const LU = 2 * L2 + 1;\n if (curveOpts.allowedPrivateKeyLengths || Fn.BYTES === LC) {\n return void 0;\n } else {\n return length === LC || length === LU;\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)).toBytes(isCompressed);\n }\n const bits2int = ecdsaOpts.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 - fnBits;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function(bytes) {\n return Fn.create(bits2int(bytes));\n };\n const ORDER_MASK = bitMask(fnBits);\n function int2octets(num2) {\n aInRange(\"num < 2^\" + fnBits, num2, _0n5, ORDER_MASK);\n return Fn.toBytes(num2);\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: hash2 } = ecdsaOpts;\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\", hash2(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 e2 = ent === true ? randomBytes_(Fp.BYTES) : ent;\n seedArgs.push(ensureBytes(\"extraEntropy\", e2));\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 === _0n5)\n return;\n const s4 = Fn.create(ik * Fn.create(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 Signature(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: ecdsaOpts.lowS, prehash: false };\n const defaultVerOpts = { lowS: ecdsaOpts.lowS, prehash: false };\n function sign3(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const drbg = createHmacDrbg(ecdsaOpts.hash.outputLen, Fn.BYTES, hmac_);\n return drbg(seed, k2sig);\n }\n Point3.BASE.precompute(8);\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes(\"msgHash\", msgHash);\n publicKey = ensureBytes(\"publicKey\", publicKey);\n validateSigVerOpts(opts);\n const { lowS, prehash, format } = opts;\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n if (format !== void 0 && ![\"compact\", \"der\", \"js\"].includes(format))\n throw new Error('format must be \"compact\", \"der\" or \"js\"');\n const isHex3 = typeof sg === \"string\" || isBytes(sg);\n const isObj = !isHex3 && !format && typeof sg === \"object\" && sg !== null && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex3 && !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 if (format === void 0 || format === \"js\") {\n _sig = new Signature(sg.r, sg.s);\n } else {\n throw new Error(\"invalid format\");\n }\n }\n if (isHex3) {\n try {\n if (format !== \"compact\")\n _sig = Signature.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!_sig && format !== \"der\")\n _sig = Signature.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 = ecdsaOpts.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\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 }\n return Object.freeze({\n getPublicKey,\n getSharedSecret,\n sign: sign3,\n verify,\n utils,\n Point: Point3,\n Signature\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 const Fn = Field(CURVE.n, c4.nBitLength);\n const curveOpts = {\n Fp,\n Fn,\n allowedPrivateKeyLengths: c4.allowedPrivateKeyLengths,\n allowInfinityPoint: c4.allowInfinityPoint,\n endo: c4.endo,\n wrapPrivateKey: c4.wrapPrivateKey,\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 hash: c4.hash,\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, ecdsaOpts };\n }\n function _ecdsa_new_output_to_legacy(c4, ecdsa2) {\n return Object.assign({}, ecdsa2, {\n ProjectivePoint: ecdsa2.Point,\n CURVE: c4\n });\n }\n function weierstrass(c4) {\n const { CURVE, curveOpts, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c4);\n const Point3 = weierstrassN(CURVE, curveOpts);\n const signs = ecdsa(Point3, ecdsaOpts, curveOpts);\n return _ecdsa_new_output_to_legacy(c4, signs);\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 const { A: A4, B: B2, Z: Z2 } = opts;\n if (!Fp.isValid(A4) || !Fp.isValid(B2) || !Fp.isValid(Z2))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio(Fp, Z2);\n if (!Fp.isOdd)\n throw new Error(\"Field does not have .isOdd()\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, Z2);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, B2);\n tv4 = Fp.cmov(Z2, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, A4);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, A4);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, B2);\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.2/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_utils5();\n init_curve();\n init_modular();\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 length = 0;\n if (!isLong)\n length = 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 length = length << 8 | b4;\n pos += lenLen;\n if (length < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length);\n if (v2.length !== length)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length) };\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.2/node_modules/@noble/curves/esm/_shortw_utils.js\n function createCurve(curveDef, defHash) {\n const create = (hash2) => weierstrass({ ...curveDef, hash: hash2 });\n return { ...create(defHash), create };\n }\n var init_shortw_utils = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.2/node_modules/@noble/curves/esm/_shortw_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_weierstrass();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.2/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\n function i2osp(value, length) {\n anum(value);\n anum(length);\n if (value < 0 || value >= 1 << 8 * length)\n throw new Error(\"invalid I2OSP input: \" + value);\n const res = Array.from({ length }).fill(0);\n for (let i3 = length - 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 abytes(msg);\n abytes(DST);\n anum(lenInBytes);\n if (DST.length > 255)\n DST = H3(concatBytes(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 (lenInBytes > 65535 || ell > 255)\n throw new Error(\"expand_message_xmd: invalid lenInBytes\");\n const DST_prime = concatBytes(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(concatBytes(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b4[0] = H3(concatBytes(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(concatBytes(...args));\n }\n const pseudo_random_bytes = concatBytes(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n function expand_message_xof(msg, DST, lenInBytes, k4, H3) {\n abytes(msg);\n abytes(DST);\n anum(lenInBytes);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update(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(i2osp(lenInBytes, 2)).update(DST).update(i2osp(DST.length, 1)).digest();\n }\n function hash_to_field(msg, count, options) {\n _validateObject(options, {\n p: \"bigint\",\n m: \"number\",\n k: \"number\",\n hash: \"function\"\n });\n const { p: p4, k: k4, m: m2, hash: hash2, expand, DST: _DST } = options;\n if (!isBytes(_DST) && typeof _DST !== \"string\")\n throw new Error(\"DST must be string or uint8array\");\n if (!isHash(options.hash))\n throw new Error(\"expected valid hash\");\n abytes(msg);\n anum(count);\n const DST = typeof _DST === \"string\" ? utf8ToBytes(_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, hash2);\n } else if (expand === \"xof\") {\n prb = expand_message_xof(msg, DST, len_in_bytes, k4, hash2);\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 e2 = 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 e2[j2] = mod(os2ip(tv), p4);\n }\n u2[i3] = e2;\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, defaults3) {\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: defaults3,\n hashToCurve(msg, options) {\n const dst = defaults3.DST ? defaults3.DST : {};\n const opts = Object.assign({}, defaults3, dst, options);\n const u2 = hash_to_field(msg, 2, opts);\n const u0 = map(u2[0]);\n const u1 = map(u2[1]);\n return clear(u0.add(u1));\n },\n encodeToCurve(msg, options) {\n const dst = defaults3.encodeDST ? defaults3.encodeDST : {};\n const opts = Object.assign({}, defaults3, dst, options);\n const u2 = hash_to_field(msg, 1, opts);\n return clear(map(u2[0]));\n },\n /** See {@link H2CHasher} */\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.2/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils5();\n init_modular();\n os2ip = bytesToNumberBE;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.2/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 = secp256k1_CURVE.p;\n const _3n3 = 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, _3n3, P2) * b32 % P2;\n const b9 = pow2(b6, _3n3, 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, _3n3, 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 = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n }\n function schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv);\n let p4 = Point.fromPrivateKey(d_);\n const scalar = hasEven(p4.y) ? d_ : modN(-d_);\n return { scalar, bytes: pointToBytes(p4) };\n }\n function lift_x(x4) {\n aInRange(\"x\", x4, _1n6, secp256k1_CURVE.p);\n const xx = modP(x4 * x4);\n const c4 = modP(xx * x4 + BigInt(7));\n let y6 = sqrtMod(c4);\n if (!hasEven(y6))\n y6 = modP(-y6);\n const p4 = Point.fromAffine({ x: x4, y: y6 });\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 e2 = challenge(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k4 + e2 * 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, secp256k1_CURVE.p))\n return false;\n const s4 = num(sig.subarray(32, 64));\n if (!inRange(s4, _1n6, secp256k1_CURVE.n))\n return false;\n const e2 = challenge(numTo32b(r2), pointToBytes(P2), m2);\n const R3 = Point.BASE.multiplyUnsafe(s4).add(P2.multiplyUnsafe(modN(-e2)));\n const { x: x4, y: y6 } = R3.toAffine();\n if (R3.is0() || !hasEven(y6) || x4 !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n var secp256k1_CURVE, _0n6, _1n6, _2n4, divNearest, Fpk1, secp256k1, TAGGED_HASH_PREFIXES, pointToBytes, numTo32b, modP, modN, Point, hasEven, num, schnorr, isoMap, mapSWU, secp256k1_hasher, hashToCurve, encodeToCurve;\n var init_secp256k1 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.2/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_weierstrass();\n init_utils5();\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 _0n6 = BigInt(0);\n _1n6 = BigInt(1);\n _2n4 = BigInt(2);\n divNearest = (a3, b4) => (a3 + b4 / _2n4) / b4;\n Fpk1 = Field(secp256k1_CURVE.p, void 0, void 0, { sqrt: sqrtMod });\n secp256k1 = createCurve({\n ...secp256k1_CURVE,\n Fp: Fpk1,\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 = secp256k1_CURVE.n;\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.toBytes(true).slice(1);\n numTo32b = (n2) => numberToBytesBE(n2, 32);\n modP = (x4) => mod(x4, secp256k1_CURVE.p);\n modN = (x4) => mod(x4, secp256k1_CURVE.n);\n Point = /* @__PURE__ */ (() => secp256k1.Point)();\n hasEven = (y6) => y6 % _2n4 === _0n6;\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.Point, (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.31.3_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: hash2, signature }) {\n const hashHex = isHex(hash2) ? hash2 : toHex(hash2);\n const { secp256k1: secp256k12 } = 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 secp256k12.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 secp256k12.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.31.3_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.31.3_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: hash2, signature }) {\n return publicKeyToAddress(await recoverPublicKey({ hash: hash2, signature }));\n }\n var init_recoverAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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 length = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length,\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: encode7 } of list) {\n encode7(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 length = (() => {\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,\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(length) {\n if (length < 2 ** 8)\n return 1;\n if (length < 2 ** 16)\n return 2;\n if (length < 2 ** 24)\n return 3;\n if (length < 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.31.3_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.31.3_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 hash2 = 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(hash2);\n return hash2;\n }\n var init_hashAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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((e2) => e2?.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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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) => {\n const formatted = format(args);\n if (exclude) {\n for (const key of exclude) {\n delete formatted[key];\n }\n }\n return {\n ...formatted,\n ...overrides(args)\n };\n },\n type\n };\n };\n }\n var init_formatter = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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) {\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 (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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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) {\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.31.3_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.31.3_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) {\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.31.3_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.31.3_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: blockTag_, includeTransactions: includeTransactions_ } = {}) {\n const blockTag = blockTag_ ?? \"latest\";\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);\n }\n var init_getBlock = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 = (base3) => base3 * 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: version8 = 1 } = parameters;\n const to = parameters.to ?? (typeof commitment === \"string\" ? \"hex\" : \"bytes\");\n const versionedHash = sha2563(commitment, \"bytes\");\n versionedHash.set([version8], 0);\n return to === \"bytes\" ? versionedHash : bytesToHex(versionedHash);\n }\n var init_commitmentToVersionedHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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: version8 } = 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: version8\n }));\n }\n return hashes;\n }\n var init_commitmentsToVersionedHashes = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: size5 }) {\n super(\"Blob size is too large.\", {\n metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size5} 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: hash2, size: size5 }) {\n super(`Versioned hash \"${hash2}\" size is invalid.`, {\n metaMessages: [\"Expected: 32\", `Received: ${size5}`],\n name: \"InvalidVersionedHashSizeError\"\n });\n }\n };\n InvalidVersionedHashVersionError = class extends BaseError2 {\n constructor({ hash: hash2, version: version8 }) {\n super(`Versioned hash \"${hash2}\" version is invalid.`, {\n metaMessages: [\n `Expected: ${versionedHashVersionKzg}`,\n `Received: ${version8}`\n ],\n name: \"InvalidVersionedHashVersionError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 size5 = 0;\n while (size5 < 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 size5++;\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: account ? { address: account.address, type: \"json-rpc\" } : account\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.31.3_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.31.3_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 = \"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.31.3_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.31.3_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 } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n try {\n let estimateGas_rpc2 = function(parameters) {\n const { block: block2, request: request2, rpcStateOverride: rpcStateOverride2 } = parameters;\n return client.request({\n method: \"eth_estimateGas\",\n params: rpcStateOverride2 ? [request2, block2 ?? \"latest\", rpcStateOverride2] : block2 ? [request2, block2] : [request2]\n });\n };\n var estimateGas_rpc = estimateGas_rpc2;\n const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = await prepareTransactionRequest(client, {\n ...args,\n parameters: (\n // Some RPC Providers do not compute versioned hashes from blobs. We will need\n // to compute them.\n account?.type === \"local\" ? void 0 : [\"blobVersionedHashes\"]\n )\n });\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 from: account?.address,\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 });\n let estimate = BigInt(await estimateGas_rpc2({ block, request, rpcStateOverride }));\n if (authorizationList) {\n const value2 = await getBalance(client, { address: request.from });\n const estimates = await Promise.all(authorizationList.map(async (authorization) => {\n const { address } = authorization;\n const estimate2 = await estimateGas_rpc2({\n block,\n request: {\n authorizationList: void 0,\n data,\n from: account?.address,\n to: address,\n value: numberToHex(value2)\n },\n rpcStateOverride\n }).catch(() => 100000n);\n return 2n * BigInt(estimate2);\n }));\n estimate += estimates.reduce((acc, curr) => acc + curr, 0n);\n }\n return estimate;\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.31.3_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 init_getBalance();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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_size();\n init_toEventSelector();\n init_cursor();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n docsPath3 = \"/docs/contract/decodeEventLog\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 isEqual(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) => isEqual(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) => isEqual(input, value2, args[key]));\n });\n return false;\n }\n var init_parseEventLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.8.1_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.8.1_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.8.1_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_errors4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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.8.1_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.8.1_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_errors4();\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.8.1_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.8.1_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.8.1_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 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: size5 = 32 } = options;\n if (size5 === 0)\n return bytes;\n if (bytes.length > size5)\n throw new SizeExceedsPaddingSizeError2({\n size: bytes.length,\n targetSize: size5,\n type: \"Bytes\"\n });\n const paddedBytes = new Uint8Array(size5);\n for (let i3 = 0; i3 < size5; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size5 - i3 - 1] = bytes[padEnd ? i3 : bytes.length - i3 - 1];\n }\n return paddedBytes;\n }\n var charCodeMap2;\n var init_bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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.8.1_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 assertStartOffset2(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 assertEndOffset2(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: size5 = 32 } = options;\n if (size5 === 0)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size5 * 2)\n throw new SizeExceedsPaddingSizeError3({\n size: Math.ceil(hex.length / 2),\n targetSize: size5,\n type: \"Hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size5 * 2, \"0\")}`;\n }\n var init_hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\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: size5 } = options;\n let hex = value;\n if (size5) {\n assertSize3(value, size5);\n hex = padRight(value, size5);\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index2 = 0, j2 = 0; index2 < length; 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: size5 } = options;\n const bytes = encoder3.encode(value);\n if (typeof size5 === \"number\") {\n assertSize2(bytes, size5);\n return padRight2(bytes, size5);\n }\n return bytes;\n }\n function padRight2(value, size5) {\n return pad2(value, { dir: \"right\", size: size5 });\n }\n function size2(value) {\n return value.length;\n }\n var encoder3, SizeOverflowError2, SizeExceedsPaddingSizeError2;\n var init_Bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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 encoder3 = /* @__PURE__ */ new TextEncoder();\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 SizeExceedsPaddingSizeError2 = class extends BaseError3 {\n constructor({ size: size5, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size5}\\`) 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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\n function assert2(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 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 string = \"\";\n for (let i3 = 0; i3 < value.length; i3++)\n string += hexes3[value[i3]];\n const hex = `0x${string}`;\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: size5 } = options;\n const value_ = BigInt(value);\n let maxValue;\n if (size5) {\n if (signed)\n maxValue = (1n << BigInt(size5) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size5) * 8n) - 1n;\n } else if (typeof value === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value_ > maxValue || value_ < minValue) {\n const suffix = typeof value === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError2({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue}${suffix}`,\n signed,\n size: size5,\n value: `${value}${suffix}`\n });\n }\n const stringValue = (signed && value_ < 0 ? (1n << BigInt(size5 * 8)) + BigInt(value_) : value_).toString(16);\n const hex = `0x${stringValue}`;\n if (size5)\n return padLeft(hex, size5);\n return hex;\n }\n function fromString2(value, options = {}) {\n return fromBytes(encoder4.encode(value), options);\n }\n function padLeft(value, size5) {\n return pad3(value, { dir: \"left\", size: size5 });\n }\n function padRight(value, size5) {\n return pad3(value, { dir: \"right\", size: size5 });\n }\n function slice2(value, start, end, options = {}) {\n const { strict } = options;\n assertStartOffset2(value, start);\n const value_ = `0x${value.replace(\"0x\", \"\").slice((start ?? 0) * 2, (end ?? value.length) * 2)}`;\n if (strict)\n assertEndOffset2(value_, start, end);\n return value_;\n }\n function size3(value) {\n return Math.ceil((value.length - 2) / 2);\n }\n function validate(value, options = {}) {\n const { strict = false } = options;\n try {\n assert2(value, { strict });\n return true;\n } catch {\n return false;\n }\n }\n var encoder4, hexes3, IntegerOutOfRangeError2, InvalidHexTypeError, InvalidHexValueError, SizeOverflowError3, SliceOffsetOutOfBoundsError3, SizeExceedsPaddingSizeError3;\n var init_Hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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_Json();\n init_hex();\n encoder4 = /* @__PURE__ */ new TextEncoder();\n hexes3 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n IntegerOutOfRangeError2 = class extends BaseError3 {\n constructor({ max, min, signed, size: size5, value }) {\n super(`Number \\`${value}\\` is not in safe${size5 ? ` ${size5 * 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: size5 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size5}\\`).`);\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: size5, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size5}\\`) 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.8.1_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.8.1_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.8.1_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.8.1_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.31.3_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, universalSignatureValidatorAbi;\n var init_abis = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 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 name: \"ResolverNotFound\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"ResolverWildcardNotSupported\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"ResolverNotContract\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"returnData\",\n type: \"bytes\"\n }\n ],\n name: \"ResolverError\",\n type: \"error\"\n },\n {\n inputs: [\n {\n components: [\n {\n name: \"status\",\n type: \"uint16\"\n },\n {\n name: \"message\",\n type: \"string\"\n }\n ],\n name: \"errors\",\n type: \"tuple[]\"\n }\n ],\n name: \"HttpError\",\n type: \"error\"\n }\n ];\n universalResolverResolveAbi = [\n ...universalResolverErrors,\n {\n name: \"resolve\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes\" },\n { name: \"data\", type: \"bytes\" }\n ],\n outputs: [\n { name: \"\", type: \"bytes\" },\n { name: \"address\", type: \"address\" }\n ]\n },\n {\n name: \"resolve\",\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: \"reverse\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ type: \"bytes\", name: \"reverseName\" }],\n outputs: [\n { type: \"string\", name: \"resolvedName\" },\n { type: \"address\", name: \"resolvedAddress\" },\n { type: \"address\", name: \"reverseResolver\" },\n { type: \"address\", name: \"resolver\" }\n ]\n },\n {\n name: \"reverse\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { type: \"bytes\", name: \"reverseName\" },\n { type: \"string[]\", name: \"gateways\" }\n ],\n outputs: [\n { type: \"string\", name: \"resolvedName\" },\n { type: \"address\", name: \"resolvedAddress\" },\n { type: \"address\", name: \"reverseResolver\" },\n { type: \"address\", name: \"resolver\" }\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 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 }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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, universalSignatureValidatorByteCode;\n var init_contracts = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 universalSignatureValidatorByteCode = \"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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 description = abi2.find((x4) => \"type\" in x4 && x4.type === \"constructor\");\n if (!description)\n throw new AbiConstructorNotFoundError({ docsPath: docsPath5 });\n if (!(\"inputs\" in description))\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n if (!description.inputs || description.inputs.length === 0)\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n const data = encodeAbiParameters(description.inputs, args);\n return concatHex([bytecode, data]);\n }\n var docsPath5;\n var init_encodeDeployData = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 split3 = shouldSplitBatch?.([...getBatchedArgs(), args]);\n if (split3)\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.31.3_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.31.3_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.31.3_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.31.3_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 description = abi2.find((x4) => x4.type === \"function\" && signature === toFunctionSelector(formatAbiItem2(x4)));\n if (!description)\n throw new AbiFunctionSignatureNotFoundError(signature, {\n docsPath: \"/docs/contract/decodeFunctionData\"\n });\n return {\n functionName: description.name,\n args: \"inputs\" in description && description.inputs && description.inputs.length > 0 ? decodeAbiParameters(description.inputs, slice(data, 4)) : void 0\n };\n }\n var init_decodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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] = 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.31.3_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.31.3_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.31.3_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.31.3_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: batch2 = Boolean(client.batch?.multicall), blockNumber, 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 from: account?.address,\n accessList,\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 });\n if (batch2 && 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 base3 = [\n request,\n block\n ];\n if (rpcStateOverride && rpcBlockOverrides)\n return [...base3, rpcStateOverride, rpcBlockOverrides];\n if (rpcStateOverride)\n return [...base3, rpcStateOverride];\n if (rpcBlockOverrides)\n return [...base3, {}, rpcBlockOverrides];\n return base3;\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, wait: wait2 = 0 } = typeof client.batch?.multicall === \"object\" ? client.batch.multicall : {};\n const { blockNumber, blockTag = \"latest\", data, multicallAddress: multicallAddress_, to } = args;\n let multicallAddress = multicallAddress_;\n if (!multicallAddress) {\n if (!client.chain)\n throw new ClientChainNotConfiguredError();\n multicallAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\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 size5 = args2.reduce((size6, { data: data2 }) => size6 + (data2.length - 2), 0);\n return size5 > 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 data: calldata,\n to: multicallAddress\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 = void 0;\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.31.3_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.31.3_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 = (/* @__PURE__ */ new Date()).getTime() - 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.31.3_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.31.3_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.31.3_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.31.3_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: filter2 }) {\n const strict = \"strict\" in filter2 && filter2.strict;\n const logs = await filter2.request({\n method: \"eth_getFilterChanges\",\n params: [filter2.id]\n });\n if (typeof logs[0] === \"string\")\n return logs;\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!(\"abi\" in filter2) || !filter2.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter2.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterChanges = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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: filter2 }) {\n return filter2.request({\n method: \"eth_uninstallFilter\",\n params: [filter2.id]\n });\n }\n var init_uninstallFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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: batch2 = 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\")\n return false;\n if (client.transport.type === \"fallback\" && client.transport.transports[0].config.type === \"webSocket\")\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 batch2,\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 filter2;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter2 = 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 (filter2) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter: filter2 });\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 (batch2)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter2 && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter2)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter: filter2 });\n unwatch();\n };\n });\n };\n const subscribeContractEvent = () => {\n const strict = strict_ ?? false;\n const observerId = stringify([\n \"watchContractEvent\",\n address,\n args,\n batch2,\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\");\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 authorizationList,\n blobs,\n chainId,\n data,\n from: account?.address,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n type,\n value\n });\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 (e2) {\n if (isWalletNamespaceSupported === false)\n throw e2;\n const error = e2;\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((hash2) => {\n supportsWalletNamespace.set(client.uid, true);\n return hash2;\n }).catch((e3) => {\n const walletNamespaceError = e3;\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.31.3_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.31.3_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 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, sendTransaction, \"sendTransaction\")({\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 var init_writeContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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) {\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.31.3_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.31.3_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(length = 11) {\n if (!buffer || index + length > 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++ + length);\n }\n var size4, index, buffer;\n var init_uid = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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: batch2, chain: chain2, ccipRead, key = \"base\", name = \"Base Client\", type = \"base\" } = parameters;\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: batch2,\n cacheTime,\n ccipRead,\n chain: chain2,\n key,\n name,\n pollingInterval,\n request,\n transport,\n type,\n uid: uid()\n };\n function extend2(base3) {\n return (extendFn) => {\n const extended = extendFn(base3);\n for (const key2 in client)\n delete extended[key2];\n const combined = { ...base3, ...extended };\n return Object.assign(combined, { extend: extend2(combined) });\n };\n }\n return Object.assign(client, { extend: extend2(client) });\n }\n var init_createClient = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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 delay2 = typeof delay_ === \"function\" ? delay_({ count, error }) : delay_;\n if (delay2)\n await wait(delay2);\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.31.3_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.31.3_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: dedupe2 = 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 = dedupe2 ? 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) * 1e3;\n }\n return ~~(1 << count) * retryDelay;\n },\n retryCount,\n shouldRetry: ({ error }) => shouldRetry(error)\n }), { enabled: dedupe2, 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.31.3_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.31.3_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.31.3_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.31.3_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 custom2(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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, 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 init2 = {\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, init2);\n const args = await onRequest?.(request, init2) ?? { ...init2, url };\n const response2 = await fetch(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.31.3_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.31.3_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: batch2, 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 batch2 === \"object\" ? batch2 : {};\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 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) => batch2 ? 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.31.3_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.31.3_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, callType) {\n if (!(err instanceof BaseError2))\n return false;\n const cause = err.walk((e2) => e2 instanceof ContractFunctionRevertedError);\n if (!(cause instanceof ContractFunctionRevertedError))\n return false;\n if (cause.data?.errorName === \"ResolverNotFound\")\n return true;\n if (cause.data?.errorName === \"ResolverWildcardNotSupported\")\n return true;\n if (cause.data?.errorName === \"ResolverNotContract\")\n return true;\n if (cause.data?.errorName === \"ResolverError\")\n return true;\n if (cause.data?.errorName === \"HttpError\")\n return true;\n if (cause.reason?.includes(\"Wildcard on non-extended resolvers is not supported\"))\n return true;\n if (callType === \"reverse\" && cause.reason === panicReasons[50])\n return true;\n return false;\n }\n var init_errors5 = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_solidity();\n init_base();\n init_contract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 hash2 = `0x${label.slice(1, 65)}`;\n if (!isHex(hash2))\n return null;\n return hash2;\n }\n var init_encodedLabelToLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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(hash2) {\n return `[${hash2.slice(2)}]`;\n }\n var init_encodeLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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((tld2) => name.endsWith(tld2)))\n return null;\n try {\n const functionData = encodeFunctionData({\n abi: addressResolverAbi,\n functionName: \"addr\",\n ...coinType != null ? { args: [namehash(name), BigInt(coinType)] } : { args: [namehash(name)] }\n });\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: \"resolve\",\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: coinType != null ? [namehash(name), BigInt(coinType)] : void 0,\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, \"resolve\"))\n return null;\n throw err;\n }\n }\n var init_getEnsAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_errors5();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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 (!globalThis.hasOwnProperty(\"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 = base64Regex2.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),\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, base64Regex2, dataURIRegex;\n var init_utils6 = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 base64Regex2 = /^data:([a-zA-Z\\-/+]*);base64,([^\"].*)/;\n dataURIRegex = /^data:([a-zA-Z\\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 }) {\n if (/eip155:/i.test(record))\n return parseNftAvatarUri(client, { gatewayUrls, record });\n return parseAvatarUri({ uri: record, gatewayUrls });\n }\n async function parseNftAvatarUri(client, { gatewayUrls, record }) {\n const nft = parseNftUri(record);\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.31.3_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.31.3_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((tld2) => name.endsWith(tld2)))\n return null;\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: \"resolve\",\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 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 record = decodeFunctionResult({\n abi: textResolverAbi,\n functionName: \"text\",\n data: res[0]\n });\n return record === \"\" ? null : record;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err, \"resolve\"))\n return null;\n throw err;\n }\n }\n var init_getEnsText = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_errors5();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 record = await getAction(client, getEnsText, \"getEnsText\")({\n blockNumber,\n blockTag,\n key: \"avatar\",\n name,\n universalResolverAddress,\n gatewayUrls,\n strict\n });\n if (!record)\n return null;\n try {\n return await parseAvatarRecord(client, {\n record,\n gatewayUrls: assetGatewayUrls\n });\n } catch {\n return null;\n }\n }\n var init_getEnsAvatar = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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, { address, blockNumber, blockTag, gatewayUrls, strict, universalResolverAddress: universalResolverAddress_ }) {\n let universalResolverAddress = universalResolverAddress_;\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"ensUniversalResolver\"\n });\n }\n const reverseNode = `${address.toLowerCase().substring(2)}.addr.reverse`;\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverReverseAbi,\n functionName: \"reverse\",\n args: [toHex(packetToBytes(reverseNode))],\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const [name, resolvedAddress] = gatewayUrls ? await readContractAction({\n ...readContractParameters,\n args: [...readContractParameters.args, gatewayUrls]\n }) : await readContractAction(readContractParameters);\n if (address.toLowerCase() !== resolvedAddress.toLowerCase())\n return null;\n return name;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err, \"reverse\"))\n return null;\n throw err;\n }\n }\n var init_getEnsName = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_toHex();\n init_errors5();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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((tld2) => name.endsWith(tld2)))\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: [{ type: \"address\" }, { type: \"bytes32\" }],\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.31.3_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.31.3_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 from: account?.address,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n to,\n value\n });\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, version8, 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: version8,\n chainId: Number(chainId),\n verifyingContract,\n salt\n },\n extensions,\n fields\n };\n } catch (e2) {\n const error = e2;\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: filter2 }) {\n const strict = filter2.strict ?? false;\n const logs = await filter2.request({\n method: \"eth_getFilterLogs\",\n params: [filter2.id]\n });\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!filter2.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter2.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, base3, size_] = integerMatch;\n numberToHex(value, {\n signed: base3 === \"int\",\n size: Number.parseInt(size_) / 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_))\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size_),\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.31.3_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.31.3_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, isArray2 = 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: isArray2 ? 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: isArray2 ? 32 : 1 });\n const intMatch = type.match(integerRegex2);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size5 = Number.parseInt(bits) / 8;\n return numberToHex(value, {\n size: isArray2 ? 32 : size5,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex2);\n if (bytesMatch) {\n const [_type, size5] = bytesMatch;\n if (Number.parseInt(size5) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size5),\n givenSize: (value.length - 2) / 2\n });\n return pad(value, { dir: \"right\", size: isArray2 ? 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.31.3_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.31.3_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 hash2 of blobVersionedHashes) {\n const size_ = size(hash2);\n const version8 = hexToNumber(slice(hash2, 0, 1));\n if (size_ !== 32)\n throw new InvalidVersionedHashSizeError({ hash: hash2, size: size_ });\n if (version8 !== versionedHashVersionKzg)\n throw new InvalidVersionedHashVersionError({\n hash: hash2,\n version: version8\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 isBytes2(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.31.3_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.31.3_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 from5 = 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([from5, nonce], \"bytes\")).slice(26)}`);\n }\n function getCreate2Address(opts) {\n const from5 = toBytes(getAddress(opts.from));\n const salt = pad(isBytes2(opts.salt) ? opts.salt : toBytes(opts.salt), {\n size: 32\n });\n const bytecodeHash = (() => {\n if (\"bytecodeHash\" in opts) {\n if (isBytes2(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\"), from5, salt, bytecodeHash])), 12));\n }\n var init_getContractAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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/@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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 erc6492MagicBytes, zeroHash;\n var init_bytes2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 erc6492MagicBytes = \"0x6492649264926492649264926492649264926492649264926492649264926492\";\n zeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/isErc6492Signature.js\n function isErc6492Signature(signature) {\n return sliceHex(signature, -32) === erc6492MagicBytes;\n }\n var init_isErc6492Signature = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/isErc6492Signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bytes2();\n init_slice();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeErc6492Signature.js\n function serializeErc6492Signature(parameters) {\n const { address, data, signature, to = \"hex\" } = parameters;\n const signature_ = concatHex([\n encodeAbiParameters([{ type: \"address\" }, { type: \"bytes\" }, { type: \"bytes\" }], [address, data, signature]),\n erc6492MagicBytes\n ]);\n if (to === \"hex\")\n return signature_;\n return hexToBytes(signature_);\n }\n var init_serializeErc6492Signature = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeErc6492Signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bytes2();\n init_encodeAbiParameters();\n init_concat();\n init_toBytes();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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_encodeFunctionData();\n init_fromHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: hash2, index: index2 }) {\n const blockTag = blockTag_ || \"latest\";\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let transaction = null;\n if (hash2) {\n transaction = await client.request({\n method: \"eth_getTransactionByHash\",\n params: [hash2]\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: hash2,\n index: index2\n });\n const format = client.chain?.formatters?.transaction?.format || formatTransaction;\n return format(transaction);\n }\n var init_getTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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: hash2, transactionReceipt }) {\n const [blockNumber, transaction] = await Promise.all([\n getAction(client, getBlockNumber, \"getBlockNumber\")({}),\n hash2 ? getAction(client, getTransaction, \"getTransaction\")({ hash: hash2 }) : 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.31.3_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.31.3_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: hash2 }) {\n const receipt = await client.request({\n method: \"eth_getTransactionReceipt\",\n params: [hash2]\n }, { dedupe: true });\n if (!receipt)\n throw new TransactionReceiptNotFoundError({ hash: hash2 });\n const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;\n return format(receipt);\n }\n var init_getTransactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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, allowFailure = true, batchSize: batchSize_, blockNumber, blockTag, multicallAddress: multicallAddress_, stateOverride } = parameters;\n const contracts2 = parameters.contracts;\n const batchSize = batchSize_ ?? (typeof client.batch?.multicall === \"object\" && client.batch.multicall.batchSize || 1024);\n let multicallAddress = multicallAddress_;\n if (!multicallAddress) {\n if (!client.chain)\n throw new Error(\"client chain not configured. multicallAddress is required.\");\n multicallAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\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 abi: multicall3Abi,\n account,\n address: multicallAddress,\n args: [calls],\n blockNumber,\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.31.3_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_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.31.3_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 = \"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 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 = void 0;\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 (e2) {\n const cause = e2;\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.31.3_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.8.1_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.8.1_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.8.1_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.8.1_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(size5) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size5;\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.8.1_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.8.1_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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Address.js\n function assert3(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 assert3(address, { strict: false });\n const hexAddress = address.substring(2).toLowerCase();\n const hash2 = keccak2562(fromString(hexAddress), { as: \"Bytes\" });\n const characters = hexAddress.split(\"\");\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hash2[i3 >> 1] >> 4 >= 8 && characters[i3]) {\n characters[i3] = characters[i3].toUpperCase();\n }\n if ((hash2[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 validate2(address, options = {}) {\n const { strict = true } = options ?? {};\n try {\n assert3(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.8.1_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 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.8.1_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 validate2(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 validate2(args[parameterIndex], {\n strict: false\n });\n if (types.includes(\"address\") && types.includes(\"bytes\"))\n return validate2(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.8.1_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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiItem.js\n function from2(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 = validate(name, { strict: false });\n const abiItems = abi2.filter((abiItem2) => {\n if (isSelector) {\n if (abiItem2.type === \"function\" || abiItem2.type === \"error\")\n return getSelector(abiItem2) === slice2(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 = void 0;\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(abiItem) {\n return slice2(getSignatureHash(abiItem), 0, 4);\n }\n function getSignature(abiItem) {\n const signature = (() => {\n if (typeof abiItem === \"string\")\n return abiItem;\n return formatAbiItem(abiItem);\n })();\n return normalizeSignature2(signature);\n }\n function getSignatureHash(abiItem) {\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.8.1_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.8.1_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.8.1_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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiParameters.js\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 [length, type] = arrayComponents;\n return encodeArray2(value, {\n checksumAddress: checksumAddress2,\n length,\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 [, , size5 = \"256\"] = integerRegex3.exec(parameter.type) ?? [];\n return encodeNumber2(value, {\n signed,\n size: Number(size5)\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 assert3(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, parameter } = options;\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError2(value);\n if (!dynamic && value.length !== length)\n throw new ArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${parameter.type}[${length}]`\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 length2 = fromNumber(preparedParameters.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParameters.length > 0 ? concat2(length2, data) : length2\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))\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(parametersize),\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: size5 }) {\n if (typeof size5 === \"number\") {\n const max = 2n ** (BigInt(size5) - (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: size5 / 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 hexValue3 = fromString2(value);\n const partsLength = Math.ceil(size3(hexValue3) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padRight(slice2(hexValue3, i3 * 32, (i3 + 1) * 32)));\n }\n return {\n dynamic: true,\n encoded: concat2(padRight(fromNumber(size3(hexValue3), { 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 matches2 = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches2 ? (\n // Return `null` if the array is dynamic.\n [matches2[2] ? Number(matches2[2]) : null, matches2[1]]\n ) : void 0;\n }\n var init_abiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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_Errors();\n init_Hex();\n init_Solidity();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiParameters.js\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 var ArrayLengthMismatchError, BytesSizeMismatchError2, LengthMismatchError, InvalidArrayError2, InvalidTypeError;\n var init_AbiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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_Address();\n init_Errors();\n init_Hex();\n init_Solidity();\n init_abiParameters();\n (function(encodePacked3) {\n function encode7(type, value, isArray2 = false) {\n if (type === \"address\") {\n const address = value;\n assert3(address);\n return padLeft(address.toLowerCase(), isArray2 ? 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), isArray2 ? 32 : 1);\n const intMatch = type.match(integerRegex3);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size5 = Number.parseInt(bits) / 8;\n return fromNumber(value, {\n size: isArray2 ? 32 : size5,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex3);\n if (bytesMatch) {\n const [_type, size5] = bytesMatch;\n if (Number.parseInt(size5) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(size5),\n value\n });\n return padRight(value, isArray2 ? 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(encode7(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 = encode7;\n })(encodePacked2 || (encodePacked2 = {}));\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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiConstructor.js\n function encode4(abiConstructor, options) {\n const { bytecode, args } = options;\n return concat2(bytecode, abiConstructor.inputs?.length && args?.length ? encode3(abiConstructor.inputs, args) : \"0x\");\n }\n function from3(abiConstructor) {\n return from2(abiConstructor);\n }\n var init_AbiConstructor = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiFunction.js\n function encodeData2(abiFunction, ...args) {\n const { overloads } = abiFunction;\n const item = overloads ? fromAbi2([abiFunction, ...overloads], abiFunction.name, {\n args: args[0]\n }) : abiFunction;\n const selector = getSelector2(item);\n const data = args.length > 0 ? encode3(item.inputs, args[0]) : void 0;\n return data ? concat2(selector, data) : selector;\n }\n function from4(abiFunction, options = {}) {\n return from2(abiFunction, options);\n }\n function fromAbi2(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.8.1_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.31.3_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.31.3_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.31.3_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(from3(\"constructor(bytes, bytes)\"), {\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [\n getBalanceCode,\n encodeData2(from4(\"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 from4(\"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 from4(\"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 from4(\"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 from4(\"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: [from4(\"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.31.3_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/viem@2.31.3_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.31.3_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.31.3_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, factory, factoryData, hash: hash2, signature, universalSignatureVerifierAddress = client.chain?.contracts?.universalSignatureVerifier?.address, ...rest } = parameters;\n const signatureHex = (() => {\n if (isHex(signature))\n return signature;\n if (typeof signature === \"object\" && \"r\" in signature && \"s\" in signature)\n return serializeSignature(signature);\n return bytesToHex(signature);\n })();\n const wrappedSignature = await (async () => {\n if (!factory && !factoryData)\n return signatureHex;\n if (isErc6492Signature(signatureHex))\n return signatureHex;\n return serializeErc6492Signature({\n address: factory,\n data: factoryData,\n signature: signatureHex\n });\n })();\n try {\n const args = universalSignatureVerifierAddress ? {\n to: universalSignatureVerifierAddress,\n data: encodeFunctionData({\n abi: universalSignatureValidatorAbi,\n functionName: \"isValidSig\",\n args: [address, hash2, wrappedSignature]\n }),\n ...rest\n } : {\n data: encodeDeployData({\n abi: universalSignatureValidatorAbi,\n args: [address, hash2, wrappedSignature],\n bytecode: universalSignatureValidatorByteCode\n }),\n ...rest\n };\n const { data } = await getAction(client, call, \"call\")(args);\n return hexToBool(data ?? \"0x0\");\n } catch (error) {\n try {\n const verified = isAddressEqual(getAddress(address), await recoverAddress({ hash: hash2, signature }));\n if (verified)\n return true;\n } catch {\n }\n if (error instanceof CallExecutionError) {\n return false;\n }\n throw error;\n }\n }\n var init_verifyHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_abis();\n init_contracts();\n init_contract();\n init_encodeDeployData();\n init_getAddress();\n init_isAddressEqual();\n init_isHex();\n init_toHex();\n init_getAction();\n init_utils7();\n init_isErc6492Signature();\n init_recoverAddress();\n init_serializeErc6492Signature();\n init_serializeSignature();\n init_call();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 hash2 = hashMessage(message);\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash2,\n signature,\n ...callRequest\n });\n }\n var init_verifyMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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 hash2 = hashTypedData({ message, primaryType, types, domain: domain2 });\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash2,\n signature,\n ...callRequest\n });\n }\n var init_verifyTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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\")\n return false;\n if (client.transport.type === \"fallback\" && client.transport.transports[0].config.type === \"webSocket\")\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) {\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 || 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\");\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.31.3_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.31.3_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, {\n confirmations = 1,\n hash: hash2,\n onReplaced,\n pollingInterval = client.pollingInterval,\n retryCount = 6,\n retryDelay = ({ count }) => ~~(1 << count) * 200,\n // exponential backoff\n timeout = 18e4\n }) {\n const observerId = stringify([\"waitForTransactionReceipt\", client.uid, hash2]);\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: hash2 }));\n }, timeout) : void 0;\n _unobserve = observe(observerId, { onReplaced, resolve, reject }, (emit2) => {\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 (!transaction) {\n retrying = true;\n await withRetry(async () => {\n transaction = await getAction(client, getTransaction, \"getTransaction\")({ hash: hash2 });\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: hash2 });\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: from5, nonce }) => from5 === 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.31.3_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.31.3_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 = \"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\")\n return false;\n if (client.transport.type === \"fallback\" && client.transport.transports[0].config.type === \"webSocket\")\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\");\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.31.3_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.31.3_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: batch2 = 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\")\n return false;\n if (client.transport.type === \"fallback\" && client.transport.transports[0].config.type === \"webSocket\")\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 batch2,\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 filter2;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter2 = 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 (filter2) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter: filter2 });\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 (batch2)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter2 && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter2)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter: filter2 });\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\");\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.31.3_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_encodeEventTopics();\n init_observe();\n init_poll();\n init_stringify();\n init_abi();\n init_rpc();\n init_decodeEventLog();\n init_log2();\n init_getAction();\n init_createEventFilter();\n init_getBlockNumber();\n init_getFilterChanges();\n init_getLogs();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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: batch2 = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = typeof poll_ !== \"undefined\" ? poll_ : client.transport.type !== \"webSocket\";\n const pollPendingTransactions = () => {\n const observerId = stringify([\n \"watchPendingTransactions\",\n client.uid,\n batch2,\n pollingInterval\n ]);\n return observe(observerId, { onTransactions, onError }, (emit2) => {\n let filter2;\n const unwatch = poll(async () => {\n try {\n if (!filter2) {\n try {\n filter2 = 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: filter2 });\n if (hashes.length === 0)\n return;\n if (batch2)\n emit2.onTransactions(hashes);\n else\n for (const hash2 of hashes)\n emit2.onTransactions([hash2]);\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter2)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter: filter2 });\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 hash2 = hashMessage(message);\n return verifyHash(client, {\n address: parsed.address,\n hash: hash2,\n signature,\n ...callRequest\n });\n }\n var init_verifySiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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 simulate: (args) => simulateBlocks(client, args),\n simulateBlocks: (args) => simulateBlocks(client, args),\n simulateCalls: (args) => simulateCalls(client, args),\n simulateContract: (args) => simulateContract(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.31.3_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_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 }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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_esm2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_custom();\n init_http2();\n init_public();\n init_createTransport();\n init_address2();\n init_number();\n init_bytes2();\n init_base();\n init_address();\n init_stateOverride();\n init_decodeErrorResult();\n init_encodeAbiParameters();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_encodeFunctionResult();\n init_getContractAddress();\n init_hashTypedData();\n init_recoverAddress();\n init_toBytes();\n init_toHex();\n init_concat();\n init_defineChain();\n init_encodePacked();\n init_fromHex();\n init_hashMessage();\n init_isAddress();\n init_isHex();\n init_keccak256();\n init_pad();\n init_size();\n init_trim();\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js\n function isBytes3(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function isArrayOf(isString3, arr) {\n if (!Array.isArray(arr))\n return false;\n if (arr.length === 0)\n return true;\n if (isString3) {\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 wrap = (a3, b4) => (c4) => a3(b4(c4));\n const encode7 = args.map((x4) => x4.encode).reduceRight(wrap, id);\n const decode2 = args.map((x4) => x4.decode).reduce(wrap, id);\n return { encode: encode7, 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: (from5) => {\n astrArr(\"join.decode\", from5);\n return from5.join(separator);\n },\n decode: (to) => {\n astr(\"join.decode\", to);\n return to.split(separator);\n }\n };\n }\n function convertRadix(data, from5, to) {\n if (from5 < 2)\n throw new Error(`convertRadix: invalid from=${from5}, 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 >= from5)\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 = from5 * carry;\n const digitBase = fromCarry + digit;\n if (!Number.isSafeInteger(digitBase) || fromCarry / from5 !== 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 (!isBytes3(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 (!isBytes3(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 (!isBytes3(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_esm3 = __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_esm4 = __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_modular();\n init_secp256k1();\n init_hmac();\n init_legacy();\n init_sha2();\n init_utils3();\n init_esm3();\n Point2 = secp256k1.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 version8 = 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 (version8 !== 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 (!secp256k1.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 = secp256k1.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 (!secp256k1.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 = mod(this.privKey + childTweak, secp256k1.CURVE.n);\n if (!secp256k1.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(hash2) {\n if (!this.privateKey) {\n throw new Error(\"No privateKey set!\");\n }\n abytes(hash2, 32);\n return secp256k1.sign(hash2, this.privKey).toCompactRawBytes();\n }\n verify(hash2, signature) {\n abytes(hash2, 32);\n abytes(signature, 64);\n if (!this.publicKey) {\n throw new Error(\"No publicKey set!\");\n }\n let sig;\n try {\n sig = secp256k1.Signature.fromCompact(signature);\n } catch (error) {\n return false;\n }\n return secp256k1.verify(sig, hash2, 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(version8, key) {\n if (!this.chainCode) {\n throw new Error(\"No chainCode set\");\n }\n abytes(key, 33);\n return concatBytes(toU32(version8), 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(hash2, _password, _salt, _opts) {\n ahash(hash2);\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(hash2, 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(hash2, password, salt, opts) {\n const { c: c4, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash2, 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_esm5 = __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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: hash2, privateKey, to = \"object\" }) {\n const { r: r2, s: s4, recovery } = secp256k1.sign(hash2.slice(2), privateKey.slice(2), { lowS: true, extraEntropy });\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.31.3_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_toHex();\n init_serializeSignature();\n extraEntropy = false;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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(serializer(signableTransaction)),\n privateKey\n });\n return serializer(transaction, signature);\n }\n var init_signTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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: hash2 }) {\n return sign({ hash: hash2, 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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_esm4();\n init_esm5();\n init_hdKeyToAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2\";\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 (hash2) => getUserOperationByHash(client, { hash: hash2 }),\n getSupportedEntryPoints: async () => getSupportedEntryPoints(client),\n getUserOperationReceipt: async (hash2) => getUserOperationReceipt(client, { hash: hash2 })\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_client();\n init_version5();\n init_bundlerClient();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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(LogLevel4) {\n LogLevel4[LogLevel4[\"VERBOSE\"] = 5] = \"VERBOSE\";\n LogLevel4[LogLevel4[\"DEBUG\"] = 4] = \"DEBUG\";\n LogLevel4[LogLevel4[\"INFO\"] = 3] = \"INFO\";\n LogLevel4[LogLevel4[\"WARN\"] = 2] = \"WARN\";\n LogLevel4[LogLevel4[\"ERROR\"] = 1] = \"ERROR\";\n LogLevel4[LogLevel4[\"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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils8 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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: signTypedData3, 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: signTypedData3,\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_accounts();\n init_bundlerClient2();\n init_account2();\n init_client();\n init_entrypoint();\n init_logger();\n init_utils8();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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(hash2) {\n super(`Failed to find transaction for user operation ${hash2}`);\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_esm();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 = (base3, 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(base3) * BigInt(Math.round(multiplier * 10 ** decimalPlaces)) + BigInt(10 ** decimalPlaces - 1) : BigInt(base3) * BigInt(Math.round(multiplier * 10 ** decimalPlaces));\n return val / BigInt(10 ** decimalPlaces);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: from5, gas, isSystemTx, mint, to, value } = transaction;\n const serializedTransaction = [\n sourceHash,\n from5,\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: from5, to } = transaction;\n if (from5 && !isAddress(from5))\n throw new InvalidAddressError({ address: from5 });\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 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.31.3_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;\n var init_base3 = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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;\n var init_baseSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 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 ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n ensUniversalResolver: {\n address: \"0xce01f8eee7E479C928F8919abD53E553a36CeF67\",\n blockCreated: 19258213\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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://sepolia.drpc.org\"]\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 ensRegistry: { address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\" },\n ensUniversalResolver: {\n address: \"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC\",\n blockCreated: 5317080\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n bypassPaymasterAndData = (overrides) => !!overrides && (\"paymasterAndData\" in overrides || \"paymasterData\" in overrides);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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(object) {\n const promises = Object.keys(object).map((key) => {\n const value = object[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_utils9 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 batch2 = 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: batch2,\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: batch2,\n overrides: _overrides\n };\n }\n var init_buildUserOperationFromTxs = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_utils9();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_account2();\n init_utils9();\n init__();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n init_runMiddlewareStack();\n init_sendUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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: hash2, 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(hash2).catch((e2) => {\n Logger.error(`[SmartAccountProvider] waitForUserOperationTransaction error fetching receipt for ${hash2}: ${e2}`);\n });\n if (receipt) {\n return receipt?.receipt.transactionHash;\n }\n }\n throw new FailedToFindTransactionError(hash2);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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: hash2, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash2 }).catch((e2) => {\n throw new WaitForUserOperationError(request, e2);\n });\n }\n var init_sendTransaction2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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: hash2, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash2 }).catch((e2) => {\n throw new WaitForUserOperationError(request, e2);\n });\n }\n var init_sendTransactions = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 hash2 = result.hash;\n if (waitForTx) {\n hash2 = await waitForUserOperationTransaction(client, result);\n }\n return hash2;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm();\n init_utils9();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 custom2({\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({ method, params: params2 });\n }\n }\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_esm();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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: version8 = defaultEntryPointVersion, addressOverride } = options ?? {\n version: defaultEntryPointVersion\n };\n const entryPoint = entryPointRegistry[version8 ?? defaultEntryPointVersion];\n const address = addressOverride ?? entryPoint.address[chain2.id] ?? entryPoint.address.default;\n if (!address) {\n throw new EntryPointNotFoundError(chain2, version8);\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, version8);\n }\n var defaultEntryPointVersion, entryPointRegistry;\n var init_entrypoint2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_client();\n init_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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) => custom2({\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 [version8, 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 (version8 !== \"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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/api/utils.js\n function _checkNormalize() {\n try {\n const missing = [];\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form2) => {\n try {\n if (\"test\".normalize(form2) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n } catch (error) {\n missing.push(form2);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.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 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 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 === 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);\n }\n function bytes2(data) {\n if (data.length % 4 !== 0) {\n throw new Error(\"bad data\");\n }\n let result = [];\n for (let 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 let lo = 0;\n let result = {};\n data.split(\",\").forEach((pair) => {\n let 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 let hi = 0;\n return data.split(\",\").map((v2) => {\n let comps = v2.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n } else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n let lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n }\n var import_bytes4, import_units, version$1, _permanentCensorErrors, _censorErrors, LogLevels, _logLevel, _globalLogger, _normalizeError, LogLevel2, ErrorCode, HEX, Logger2, version5, logger, UnicodeNormalizationForm, Utf8ErrorReason, Utf8ErrorFuncs;\n var init_utils10 = __esm({\n \"../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/api/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n import_bytes4 = __toESM(require_lib2());\n import_units = __toESM(require_lib31());\n version$1 = \"logger/5.7.0\";\n _permanentCensorErrors = false;\n _censorErrors = false;\n LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\n _logLevel = LogLevels[\"default\"];\n _globalLogger = null;\n _normalizeError = _checkNormalize();\n (function(LogLevel4) {\n LogLevel4[\"DEBUG\"] = \"DEBUG\";\n LogLevel4[\"INFO\"] = \"INFO\";\n LogLevel4[\"WARNING\"] = \"WARNING\";\n LogLevel4[\"ERROR\"] = \"ERROR\";\n LogLevel4[\"OFF\"] = \"OFF\";\n })(LogLevel2 || (LogLevel2 = {}));\n (function(ErrorCode3) {\n ErrorCode3[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n ErrorCode3[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n ErrorCode3[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n ErrorCode3[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n ErrorCode3[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n ErrorCode3[\"TIMEOUT\"] = \"TIMEOUT\";\n ErrorCode3[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n ErrorCode3[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ErrorCode3[\"MISSING_NEW\"] = \"MISSING_NEW\";\n ErrorCode3[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n ErrorCode3[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n ErrorCode3[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ErrorCode3[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n ErrorCode3[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n ErrorCode3[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n ErrorCode3[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n ErrorCode3[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n ErrorCode3[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ErrorCode3[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n })(ErrorCode || (ErrorCode = {}));\n HEX = \"0123456789abcdef\";\n Logger2 = class _Logger {\n constructor(version8) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version8,\n writable: false\n });\n }\n _log(logLevel, args) {\n const 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 debug(...args) {\n this._log(_Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(_Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(_Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = _Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let 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 const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const 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 const 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 throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, _Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", _Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\",\n form: _normalizeError\n });\n }\n }\n checkSafeUint53(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, _Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value\n });\n }\n if (value % 1) {\n this.throwError(message, _Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value\n });\n }\n }\n checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, _Logger.errors.MISSING_ARGUMENT, {\n count,\n expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, _Logger.errors.UNEXPECTED_ARGUMENT, {\n count,\n expectedCount\n });\n }\n }\n checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", _Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", _Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", _Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new _Logger(version$1);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", _Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", _Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n _Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n static from(version8) {\n return new _Logger(version8);\n }\n };\n Logger2.errors = ErrorCode;\n Logger2.levels = LogLevel2;\n version5 = \"strings/5.7.0\";\n logger = new Logger2(version5);\n (function(UnicodeNormalizationForm2) {\n UnicodeNormalizationForm2[\"current\"] = \"\";\n UnicodeNormalizationForm2[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm2[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm2[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm2[\"NFKD\"] = \"NFKD\";\n })(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));\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 || (Utf8ErrorReason = {}));\n Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n });\n 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 \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map((v2) => parseInt(v2, 16));\n 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 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 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 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 }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/bind.js\n function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n }\n var init_bind = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/bind.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/utils.js\n function isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n }\n function isArrayBufferView2(val) {\n let result;\n if (typeof ArrayBuffer !== \"undefined\" && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && isArrayBuffer(val.buffer);\n }\n return result;\n }\n function forEach(obj, fn, { allOwnKeys = false } = {}) {\n if (obj === null || typeof obj === \"undefined\") {\n return;\n }\n let i3;\n let l6;\n if (typeof obj !== \"object\") {\n obj = [obj];\n }\n if (isArray(obj)) {\n for (i3 = 0, l6 = obj.length; i3 < l6; i3++) {\n fn.call(null, obj[i3], i3, obj);\n }\n } else {\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n for (i3 = 0; i3 < len; i3++) {\n key = keys[i3];\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n function findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i3 = keys.length;\n let _key;\n while (i3-- > 0) {\n _key = keys[i3];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n }\n function merge() {\n const { caseless } = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n for (let i3 = 0, l6 = arguments.length; i3 < l6; i3++) {\n arguments[i3] && forEach(arguments[i3], assignValue);\n }\n return result;\n }\n function isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[toStringTag] === \"FormData\" && thing[iterator]);\n }\n var toString, getPrototypeOf, iterator, toStringTag, kindOf, kindOfTest, typeOfTest, isArray, isUndefined, isArrayBuffer, isString, isFunction, isNumber, isObject, isBoolean, isPlainObject, isDate, isFile, isBlob, isFileList, isStream, isFormData, isURLSearchParams, isReadableStream, isRequest, isResponse, isHeaders, trim4, _global, isContextDefined, extend, stripBOM, inherits, toFlatObject, endsWith, toArray, isTypedArray, forEachEntry, matchAll, isHTMLForm, toCamelCase, hasOwnProperty, isRegExp, reduceDescriptors, freezeMethods, toObjectSet, noop2, toFiniteNumber, toJSONObject, isAsyncFn, isThenable, _setImmediate, asap, isIterable, utils_default;\n var init_utils11 = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bind();\n ({ toString } = Object.prototype);\n ({ getPrototypeOf } = Object);\n ({ iterator, toStringTag } = Symbol);\n kindOf = /* @__PURE__ */ ((cache) => (thing) => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n })(/* @__PURE__ */ Object.create(null));\n kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type;\n };\n typeOfTest = (type) => (thing) => typeof thing === type;\n ({ isArray } = Array);\n isUndefined = typeOfTest(\"undefined\");\n isArrayBuffer = kindOfTest(\"ArrayBuffer\");\n isString = typeOfTest(\"string\");\n isFunction = typeOfTest(\"function\");\n isNumber = typeOfTest(\"number\");\n isObject = (thing) => thing !== null && typeof thing === \"object\";\n isBoolean = (thing) => thing === true || thing === false;\n isPlainObject = (val) => {\n if (kindOf(val) !== \"object\") {\n return false;\n }\n const prototype3 = getPrototypeOf(val);\n return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(toStringTag in val) && !(iterator in val);\n };\n isDate = kindOfTest(\"Date\");\n isFile = kindOfTest(\"File\");\n isBlob = kindOfTest(\"Blob\");\n isFileList = kindOfTest(\"FileList\");\n isStream = (val) => isObject(val) && isFunction(val.pipe);\n isFormData = (thing) => {\n let kind;\n return thing && (typeof FormData === \"function\" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === \"formdata\" || // detect form-data instance\n kind === \"object\" && isFunction(thing.toString) && thing.toString() === \"[object FormData]\"));\n };\n isURLSearchParams = kindOfTest(\"URLSearchParams\");\n [isReadableStream, isRequest, isResponse, isHeaders] = [\"ReadableStream\", \"Request\", \"Response\", \"Headers\"].map(kindOfTest);\n trim4 = (str) => str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, \"\");\n _global = (() => {\n if (typeof globalThis !== \"undefined\")\n return globalThis;\n return typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : global;\n })();\n isContextDefined = (context2) => !isUndefined(context2) && context2 !== _global;\n extend = (a3, b4, thisArg, { allOwnKeys } = {}) => {\n forEach(b4, (val, key) => {\n if (thisArg && isFunction(val)) {\n a3[key] = bind(val, thisArg);\n } else {\n a3[key] = val;\n }\n }, { allOwnKeys });\n return a3;\n };\n stripBOM = (content) => {\n if (content.charCodeAt(0) === 65279) {\n content = content.slice(1);\n }\n return content;\n };\n inherits = (constructor, superConstructor, props, descriptors2) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors2);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, \"super\", {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n };\n toFlatObject = (sourceObj, destObj, filter2, propFilter) => {\n let props;\n let i3;\n let prop;\n const merged = {};\n destObj = destObj || {};\n if (sourceObj == null)\n return destObj;\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i3 = props.length;\n while (i3-- > 0) {\n prop = props[i3];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter2 !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);\n return destObj;\n };\n endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === void 0 || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n };\n toArray = (thing) => {\n if (!thing)\n return null;\n if (isArray(thing))\n return thing;\n let i3 = thing.length;\n if (!isNumber(i3))\n return null;\n const arr = new Array(i3);\n while (i3-- > 0) {\n arr[i3] = thing[i3];\n }\n return arr;\n };\n isTypedArray = /* @__PURE__ */ ((TypedArray) => {\n return (thing) => {\n return TypedArray && thing instanceof TypedArray;\n };\n })(typeof Uint8Array !== \"undefined\" && getPrototypeOf(Uint8Array));\n forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n const _iterator = generator.call(obj);\n let result;\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n };\n matchAll = (regExp, str) => {\n let matches2;\n const arr = [];\n while ((matches2 = regExp.exec(str)) !== null) {\n arr.push(matches2);\n }\n return arr;\n };\n isHTMLForm = kindOfTest(\"HTMLFormElement\");\n toCamelCase = (str) => {\n return str.toLowerCase().replace(\n /[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m2, p1, p22) {\n return p1.toUpperCase() + p22;\n }\n );\n };\n hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);\n isRegExp = kindOfTest(\"RegExp\");\n reduceDescriptors = (obj, reducer) => {\n const descriptors2 = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n forEach(descriptors2, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n Object.defineProperties(obj, reducedDescriptors);\n };\n freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n if (isFunction(obj) && [\"arguments\", \"caller\", \"callee\"].indexOf(name) !== -1) {\n return false;\n }\n const value = obj[name];\n if (!isFunction(value))\n return;\n descriptor.enumerable = false;\n if (\"writable\" in descriptor) {\n descriptor.writable = false;\n return;\n }\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n };\n }\n });\n };\n toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n const define2 = (arr) => {\n arr.forEach((value) => {\n obj[value] = true;\n });\n };\n isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));\n return obj;\n };\n noop2 = () => {\n };\n toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n };\n toJSONObject = (obj) => {\n const stack = new Array(10);\n const visit = (source, i3) => {\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n if (!(\"toJSON\" in source)) {\n stack[i3] = source;\n const target = isArray(source) ? [] : {};\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i3 + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n stack[i3] = void 0;\n return target;\n }\n }\n return source;\n };\n return visit(obj, 0);\n };\n isAsyncFn = kindOfTest(\"AsyncFunction\");\n isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({ source, data }) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n };\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n })(\n typeof setImmediate === \"function\",\n isFunction(_global.postMessage)\n );\n asap = typeof queueMicrotask !== \"undefined\" ? queueMicrotask.bind(_global) : typeof process_exports !== \"undefined\" && process_exports.nextTick || _setImmediate;\n isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n utils_default = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView: isArrayBufferView2,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim: trim4,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty,\n // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop: noop2,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosError.js\n function AxiosError(message, code, config2, request, response) {\n Error.call(this);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = new Error().stack;\n }\n this.message = message;\n this.name = \"AxiosError\";\n code && (this.code = code);\n config2 && (this.config = config2);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n }\n var prototype, descriptors, AxiosError_default;\n var init_AxiosError = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n utils_default.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils_default.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n });\n prototype = AxiosError.prototype;\n descriptors = {};\n [\n \"ERR_BAD_OPTION_VALUE\",\n \"ERR_BAD_OPTION\",\n \"ECONNABORTED\",\n \"ETIMEDOUT\",\n \"ERR_NETWORK\",\n \"ERR_FR_TOO_MANY_REDIRECTS\",\n \"ERR_DEPRECATED\",\n \"ERR_BAD_RESPONSE\",\n \"ERR_BAD_REQUEST\",\n \"ERR_CANCELED\",\n \"ERR_NOT_SUPPORT\",\n \"ERR_INVALID_URL\"\n // eslint-disable-next-line func-names\n ].forEach((code) => {\n descriptors[code] = { value: code };\n });\n Object.defineProperties(AxiosError, descriptors);\n Object.defineProperty(prototype, \"isAxiosError\", { value: true });\n AxiosError.from = (error, code, config2, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n utils_default.toFlatObject(error, axiosError, function filter2(obj) {\n return obj !== Error.prototype;\n }, (prop) => {\n return prop !== \"isAxiosError\";\n });\n AxiosError.call(axiosError, error.message, code, config2, request, response);\n axiosError.cause = error;\n axiosError.name = error.name;\n customProps && Object.assign(axiosError, customProps);\n return axiosError;\n };\n AxiosError_default = AxiosError;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/null.js\n var null_default;\n var init_null = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/null.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n null_default = null;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/toFormData.js\n function isVisitable(thing) {\n return utils_default.isPlainObject(thing) || utils_default.isArray(thing);\n }\n function removeBrackets(key) {\n return utils_default.endsWith(key, \"[]\") ? key.slice(0, -2) : key;\n }\n function renderKey(path, key, dots) {\n if (!path)\n return key;\n return path.concat(key).map(function each(token, i3) {\n token = removeBrackets(token);\n return !dots && i3 ? \"[\" + token + \"]\" : token;\n }).join(dots ? \".\" : \"\");\n }\n function isFlatArray(arr) {\n return utils_default.isArray(arr) && !arr.some(isVisitable);\n }\n function toFormData(obj, formData, options) {\n if (!utils_default.isObject(obj)) {\n throw new TypeError(\"target must be an object\");\n }\n formData = formData || new (null_default || FormData)();\n options = utils_default.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n return !utils_default.isUndefined(source[option]);\n });\n const metaTokens = options.metaTokens;\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== \"undefined\" && Blob;\n const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);\n if (!utils_default.isFunction(visitor)) {\n throw new TypeError(\"visitor must be a function\");\n }\n function convertValue(value) {\n if (value === null)\n return \"\";\n if (utils_default.isDate(value)) {\n return value.toISOString();\n }\n if (utils_default.isBoolean(value)) {\n return value.toString();\n }\n if (!useBlob && utils_default.isBlob(value)) {\n throw new AxiosError_default(\"Blob is not supported. Use a Buffer instead.\");\n }\n if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {\n return useBlob && typeof Blob === \"function\" ? new Blob([value]) : Buffer2.from(value);\n }\n return value;\n }\n function defaultVisitor(value, key, path) {\n let arr = value;\n if (value && !path && typeof value === \"object\") {\n if (utils_default.endsWith(key, \"{}\")) {\n key = metaTokens ? key : key.slice(0, -2);\n value = JSON.stringify(value);\n } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, \"[]\")) && (arr = utils_default.toArray(value))) {\n key = removeBrackets(key);\n arr.forEach(function each(el, index2) {\n !(utils_default.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + \"[]\",\n convertValue(el)\n );\n });\n return false;\n }\n }\n if (isVisitable(value)) {\n return true;\n }\n formData.append(renderKey(path, key, dots), convertValue(value));\n return false;\n }\n const stack = [];\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n function build(value, path) {\n if (utils_default.isUndefined(value))\n return;\n if (stack.indexOf(value) !== -1) {\n throw Error(\"Circular reference detected in \" + path.join(\".\"));\n }\n stack.push(value);\n utils_default.forEach(value, function each(el, key) {\n const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(\n formData,\n el,\n utils_default.isString(key) ? key.trim() : key,\n path,\n exposedHelpers\n );\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n stack.pop();\n }\n if (!utils_default.isObject(obj)) {\n throw new TypeError(\"data must be an object\");\n }\n build(obj);\n return formData;\n }\n var predicates, toFormData_default;\n var init_toFormData = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/toFormData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_AxiosError();\n init_null();\n predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n });\n toFormData_default = toFormData;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js\n function encode5(str) {\n const charMap = {\n \"!\": \"%21\",\n \"'\": \"%27\",\n \"(\": \"%28\",\n \")\": \"%29\",\n \"~\": \"%7E\",\n \"%20\": \"+\",\n \"%00\": \"\\0\"\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n }\n function AxiosURLSearchParams(params, options) {\n this._pairs = [];\n params && toFormData_default(params, this, options);\n }\n var prototype2, AxiosURLSearchParams_default;\n var init_AxiosURLSearchParams = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toFormData();\n prototype2 = AxiosURLSearchParams.prototype;\n prototype2.append = function append(name, value) {\n this._pairs.push([name, value]);\n };\n prototype2.toString = function toString2(encoder6) {\n const _encode = encoder6 ? function(value) {\n return encoder6.call(this, value, encode5);\n } : encode5;\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + \"=\" + _encode(pair[1]);\n }, \"\").join(\"&\");\n };\n AxiosURLSearchParams_default = AxiosURLSearchParams;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/buildURL.js\n function encode6(val) {\n return encodeURIComponent(val).replace(/%3A/gi, \":\").replace(/%24/g, \"$\").replace(/%2C/gi, \",\").replace(/%20/g, \"+\").replace(/%5B/gi, \"[\").replace(/%5D/gi, \"]\");\n }\n function buildURL(url, params, options) {\n if (!params) {\n return url;\n }\n const _encode = options && options.encode || encode6;\n if (utils_default.isFunction(options)) {\n options = {\n serialize: options\n };\n }\n const serializeFn = options && options.serialize;\n let serializedParams;\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode);\n }\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf(\"?\") === -1 ? \"?\" : \"&\") + serializedParams;\n }\n return url;\n }\n var init_buildURL = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/buildURL.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_AxiosURLSearchParams();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/InterceptorManager.js\n var InterceptorManager, InterceptorManager_default;\n var init_InterceptorManager = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/InterceptorManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n InterceptorManager = class {\n constructor() {\n this.handlers = [];\n }\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils_default.forEach(this.handlers, function forEachHandler(h4) {\n if (h4 !== null) {\n fn(h4);\n }\n });\n }\n };\n InterceptorManager_default = InterceptorManager;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/defaults/transitional.js\n var transitional_default;\n var init_transitional = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/defaults/transitional.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n transitional_default = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js\n var URLSearchParams_default;\n var init_URLSearchParams = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AxiosURLSearchParams();\n URLSearchParams_default = typeof URLSearchParams !== \"undefined\" ? URLSearchParams : AxiosURLSearchParams_default;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/FormData.js\n var FormData_default;\n var init_FormData = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/FormData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n FormData_default = typeof FormData !== \"undefined\" ? FormData : null;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/Blob.js\n var Blob_default;\n var init_Blob = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/Blob.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Blob_default = typeof Blob !== \"undefined\" ? Blob : null;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/index.js\n var browser_default;\n var init_browser = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_URLSearchParams();\n init_FormData();\n init_Blob();\n browser_default = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams_default,\n FormData: FormData_default,\n Blob: Blob_default\n },\n protocols: [\"http\", \"https\", \"file\", \"blob\", \"url\", \"data\"]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/common/utils.js\n var utils_exports = {};\n __export(utils_exports, {\n hasBrowserEnv: () => hasBrowserEnv,\n hasStandardBrowserEnv: () => hasStandardBrowserEnv,\n hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,\n navigator: () => _navigator,\n origin: () => origin\n });\n var hasBrowserEnv, _navigator, hasStandardBrowserEnv, hasStandardBrowserWebWorkerEnv, origin;\n var init_utils12 = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/common/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n hasBrowserEnv = typeof window !== \"undefined\" && typeof document !== \"undefined\";\n _navigator = typeof navigator === \"object\" && navigator || void 0;\n hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || [\"ReactNative\", \"NativeScript\", \"NS\"].indexOf(_navigator.product) < 0);\n hasStandardBrowserWebWorkerEnv = (() => {\n return typeof WorkerGlobalScope !== \"undefined\" && // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope && typeof self.importScripts === \"function\";\n })();\n origin = hasBrowserEnv && window.location.href || \"http://localhost\";\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/index.js\n var platform_default;\n var init_platform = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_browser();\n init_utils12();\n platform_default = {\n ...utils_exports,\n ...browser_default\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/toURLEncodedForm.js\n function toURLEncodedForm(data, options) {\n return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform_default.isNode && utils_default.isBuffer(value)) {\n this.append(key, value.toString(\"base64\"));\n return false;\n }\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n }\n var init_toURLEncodedForm = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/toURLEncodedForm.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_toFormData();\n init_platform();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/formDataToJSON.js\n function parsePropPath(name) {\n return utils_default.matchAll(/\\w+|\\[(\\w*)]/g, name).map((match) => {\n return match[0] === \"[]\" ? \"\" : match[1] || match[0];\n });\n }\n function arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i3;\n const len = keys.length;\n let key;\n for (i3 = 0; i3 < len; i3++) {\n key = keys[i3];\n obj[key] = arr[key];\n }\n return obj;\n }\n function formDataToJSON(formData) {\n function buildPath(path, value, target, index2) {\n let name = path[index2++];\n if (name === \"__proto__\")\n return true;\n const isNumericKey = Number.isFinite(+name);\n const isLast = index2 >= path.length;\n name = !name && utils_default.isArray(target) ? target.length : name;\n if (isLast) {\n if (utils_default.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n return !isNumericKey;\n }\n if (!target[name] || !utils_default.isObject(target[name])) {\n target[name] = [];\n }\n const result = buildPath(path, value, target[name], index2);\n if (result && utils_default.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n return !isNumericKey;\n }\n if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {\n const obj = {};\n utils_default.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n return obj;\n }\n return null;\n }\n var formDataToJSON_default;\n var init_formDataToJSON = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/formDataToJSON.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n formDataToJSON_default = formDataToJSON;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/defaults/index.js\n function stringifySafely(rawValue, parser, encoder6) {\n if (utils_default.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils_default.trim(rawValue);\n } catch (e2) {\n if (e2.name !== \"SyntaxError\") {\n throw e2;\n }\n }\n }\n return (encoder6 || JSON.stringify)(rawValue);\n }\n var defaults, defaults_default;\n var init_defaults2 = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/defaults/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_AxiosError();\n init_transitional();\n init_toFormData();\n init_toURLEncodedForm();\n init_platform();\n init_formDataToJSON();\n defaults = {\n transitional: transitional_default,\n adapter: [\"xhr\", \"http\", \"fetch\"],\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || \"\";\n const hasJSONContentType = contentType.indexOf(\"application/json\") > -1;\n const isObjectPayload = utils_default.isObject(data);\n if (isObjectPayload && utils_default.isHTMLForm(data)) {\n data = new FormData(data);\n }\n const isFormData2 = utils_default.isFormData(data);\n if (isFormData2) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;\n }\n if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {\n return data;\n }\n if (utils_default.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils_default.isURLSearchParams(data)) {\n headers.setContentType(\"application/x-www-form-urlencoded;charset=utf-8\", false);\n return data.toString();\n }\n let isFileList2;\n if (isObjectPayload) {\n if (contentType.indexOf(\"application/x-www-form-urlencoded\") > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf(\"multipart/form-data\") > -1) {\n const _FormData = this.env && this.env.FormData;\n return toFormData_default(\n isFileList2 ? { \"files[]\": data } : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n if (isObjectPayload || hasJSONContentType) {\n headers.setContentType(\"application/json\", false);\n return stringifySafely(data);\n }\n return data;\n }],\n transformResponse: [function transformResponse(data) {\n const transitional2 = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;\n const JSONRequested = this.responseType === \"json\";\n if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {\n return data;\n }\n if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {\n const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n try {\n return JSON.parse(data);\n } catch (e2) {\n if (strictJSONParsing) {\n if (e2.name === \"SyntaxError\") {\n throw AxiosError_default.from(e2, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e2;\n }\n }\n }\n return data;\n }],\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n xsrfCookieName: \"XSRF-TOKEN\",\n xsrfHeaderName: \"X-XSRF-TOKEN\",\n maxContentLength: -1,\n maxBodyLength: -1,\n env: {\n FormData: platform_default.classes.FormData,\n Blob: platform_default.classes.Blob\n },\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n headers: {\n common: {\n \"Accept\": \"application/json, text/plain, */*\",\n \"Content-Type\": void 0\n }\n }\n };\n utils_default.forEach([\"delete\", \"get\", \"head\", \"post\", \"put\", \"patch\"], (method) => {\n defaults.headers[method] = {};\n });\n defaults_default = defaults;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/parseHeaders.js\n var ignoreDuplicateOf, parseHeaders_default;\n var init_parseHeaders = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/parseHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n ignoreDuplicateOf = utils_default.toObjectSet([\n \"age\",\n \"authorization\",\n \"content-length\",\n \"content-type\",\n \"etag\",\n \"expires\",\n \"from\",\n \"host\",\n \"if-modified-since\",\n \"if-unmodified-since\",\n \"last-modified\",\n \"location\",\n \"max-forwards\",\n \"proxy-authorization\",\n \"referer\",\n \"retry-after\",\n \"user-agent\"\n ]);\n parseHeaders_default = (rawHeaders) => {\n const parsed = {};\n let key;\n let val;\n let i3;\n rawHeaders && rawHeaders.split(\"\\n\").forEach(function parser(line) {\n i3 = line.indexOf(\":\");\n key = line.substring(0, i3).trim().toLowerCase();\n val = line.substring(i3 + 1).trim();\n if (!key || parsed[key] && ignoreDuplicateOf[key]) {\n return;\n }\n if (key === \"set-cookie\") {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + \", \" + val : val;\n }\n });\n return parsed;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosHeaders.js\n function normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n }\n function normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);\n }\n function parseTokens(str) {\n const tokens = /* @__PURE__ */ Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n while (match = tokensRE.exec(str)) {\n tokens[match[1]] = match[2];\n }\n return tokens;\n }\n function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) {\n if (utils_default.isFunction(filter2)) {\n return filter2.call(this, value, header);\n }\n if (isHeaderNameFilter) {\n value = header;\n }\n if (!utils_default.isString(value))\n return;\n if (utils_default.isString(filter2)) {\n return value.indexOf(filter2) !== -1;\n }\n if (utils_default.isRegExp(filter2)) {\n return filter2.test(value);\n }\n }\n function formatHeader(header) {\n return header.trim().toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w3, char, str) => {\n return char.toUpperCase() + str;\n });\n }\n function buildAccessors(obj, header) {\n const accessorName = utils_default.toCamelCase(\" \" + header);\n [\"get\", \"set\", \"has\"].forEach((methodName) => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n }\n var $internals, isValidHeaderName, AxiosHeaders, AxiosHeaders_default;\n var init_AxiosHeaders = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_parseHeaders();\n $internals = Symbol(\"internals\");\n isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n AxiosHeaders = class {\n constructor(headers) {\n headers && this.set(headers);\n }\n set(header, valueOrRewrite, rewrite) {\n const self2 = this;\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n if (!lHeader) {\n throw new Error(\"header name must be a non-empty string\");\n }\n const key = utils_default.findKey(self2, lHeader);\n if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {\n self2[key || _header] = normalizeValue(_value);\n }\n }\n const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n if (utils_default.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders_default(header), valueOrRewrite);\n } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {\n let obj = {}, dest, key;\n for (const entry of header) {\n if (!utils_default.isArray(entry)) {\n throw TypeError(\"Object iterator must return a key-value pair\");\n }\n obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];\n }\n setHeaders(obj, valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n return this;\n }\n get(header, parser) {\n header = normalizeHeader(header);\n if (header) {\n const key = utils_default.findKey(this, header);\n if (key) {\n const value = this[key];\n if (!parser) {\n return value;\n }\n if (parser === true) {\n return parseTokens(value);\n }\n if (utils_default.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n if (utils_default.isRegExp(parser)) {\n return parser.exec(value);\n }\n throw new TypeError(\"parser must be boolean|regexp|function\");\n }\n }\n }\n has(header, matcher) {\n header = normalizeHeader(header);\n if (header) {\n const key = utils_default.findKey(this, header);\n return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n return false;\n }\n delete(header, matcher) {\n const self2 = this;\n let deleted = false;\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n if (_header) {\n const key = utils_default.findKey(self2, _header);\n if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {\n delete self2[key];\n deleted = true;\n }\n }\n }\n if (utils_default.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n return deleted;\n }\n clear(matcher) {\n const keys = Object.keys(this);\n let i3 = keys.length;\n let deleted = false;\n while (i3--) {\n const key = keys[i3];\n if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n return deleted;\n }\n normalize(format) {\n const self2 = this;\n const headers = {};\n utils_default.forEach(this, (value, header) => {\n const key = utils_default.findKey(headers, header);\n if (key) {\n self2[key] = normalizeValue(value);\n delete self2[header];\n return;\n }\n const normalized = format ? formatHeader(header) : String(header).trim();\n if (normalized !== header) {\n delete self2[header];\n }\n self2[normalized] = normalizeValue(value);\n headers[normalized] = true;\n });\n return this;\n }\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n toJSON(asStrings) {\n const obj = /* @__PURE__ */ Object.create(null);\n utils_default.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(\", \") : value);\n });\n return obj;\n }\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + \": \" + value).join(\"\\n\");\n }\n getSetCookie() {\n return this.get(\"set-cookie\") || [];\n }\n get [Symbol.toStringTag]() {\n return \"AxiosHeaders\";\n }\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n static concat(first, ...targets) {\n const computed = new this(first);\n targets.forEach((target) => computed.set(target));\n return computed;\n }\n static accessor(header) {\n const internals = this[$internals] = this[$internals] = {\n accessors: {}\n };\n const accessors = internals.accessors;\n const prototype3 = this.prototype;\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n if (!accessors[lHeader]) {\n buildAccessors(prototype3, _header);\n accessors[lHeader] = true;\n }\n }\n utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n return this;\n }\n };\n AxiosHeaders.accessor([\"Content-Type\", \"Content-Length\", \"Accept\", \"Accept-Encoding\", \"User-Agent\", \"Authorization\"]);\n utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1);\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n };\n });\n utils_default.freezeMethods(AxiosHeaders);\n AxiosHeaders_default = AxiosHeaders;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/transformData.js\n function transformData(fns, response) {\n const config2 = this || defaults_default;\n const context2 = response || config2;\n const headers = AxiosHeaders_default.from(context2.headers);\n let data = context2.data;\n utils_default.forEach(fns, function transform2(fn) {\n data = fn.call(config2, data, headers.normalize(), response ? response.status : void 0);\n });\n headers.normalize();\n return data;\n }\n var init_transformData = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/transformData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_defaults2();\n init_AxiosHeaders();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/isCancel.js\n function isCancel(value) {\n return !!(value && value.__CANCEL__);\n }\n var init_isCancel = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/isCancel.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/CanceledError.js\n function CanceledError(message, config2, request) {\n AxiosError_default.call(this, message == null ? \"canceled\" : message, AxiosError_default.ERR_CANCELED, config2, request);\n this.name = \"CanceledError\";\n }\n var CanceledError_default;\n var init_CanceledError = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/CanceledError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AxiosError();\n init_utils11();\n utils_default.inherits(CanceledError, AxiosError_default, {\n __CANCEL__: true\n });\n CanceledError_default = CanceledError;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/settle.js\n function settle(resolve, reject, response) {\n const validateStatus2 = response.config.validateStatus;\n if (!response.status || !validateStatus2 || validateStatus2(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError_default(\n \"Request failed with status code \" + response.status,\n [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n }\n var init_settle = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/settle.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AxiosError();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/parseProtocol.js\n function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || \"\";\n }\n var init_parseProtocol = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/parseProtocol.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/speedometer.js\n function speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n min = min !== void 0 ? min : 1e3;\n return function push(chunkLength) {\n const now2 = Date.now();\n const startedAt = timestamps[tail];\n if (!firstSampleTS) {\n firstSampleTS = now2;\n }\n bytes[head] = chunkLength;\n timestamps[head] = now2;\n let i3 = tail;\n let bytesCount = 0;\n while (i3 !== head) {\n bytesCount += bytes[i3++];\n i3 = i3 % samplesCount;\n }\n head = (head + 1) % samplesCount;\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n if (now2 - firstSampleTS < min) {\n return;\n }\n const passed = startedAt && now2 - startedAt;\n return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;\n };\n }\n var speedometer_default;\n var init_speedometer = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/speedometer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n speedometer_default = speedometer;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/throttle.js\n function throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1e3 / freq;\n let lastArgs;\n let timer;\n const invoke = (args, now2 = Date.now()) => {\n timestamp = now2;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n };\n const throttled = (...args) => {\n const now2 = Date.now();\n const passed = now2 - timestamp;\n if (passed >= threshold) {\n invoke(args, now2);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n const flush = () => lastArgs && invoke(lastArgs);\n return [throttled, flush];\n }\n var throttle_default;\n var init_throttle = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/throttle.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n throttle_default = throttle;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/progressEventReducer.js\n var progressEventReducer, progressEventDecorator, asyncDecorator;\n var init_progressEventReducer = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/progressEventReducer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_speedometer();\n init_throttle();\n init_utils11();\n progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer_default(50, 250);\n return throttle_default((e2) => {\n const loaded = e2.loaded;\n const total = e2.lengthComputable ? e2.total : void 0;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange2 = loaded <= total;\n bytesNotified = loaded;\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : void 0,\n bytes: progressBytes,\n rate: rate ? rate : void 0,\n estimated: rate && total && inRange2 ? (total - loaded) / rate : void 0,\n event: e2,\n lengthComputable: total != null,\n [isDownloadStream ? \"download\" : \"upload\"]: true\n };\n listener(data);\n }, freq);\n };\n progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n };\n asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isURLSameOrigin.js\n var isURLSameOrigin_default;\n var init_isURLSameOrigin = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isURLSameOrigin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_platform();\n isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {\n url = new URL(url, platform_default.origin);\n return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);\n })(\n new URL(platform_default.origin),\n platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)\n ) : () => true;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/cookies.js\n var cookies_default;\n var init_cookies = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/cookies.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_platform();\n cookies_default = platform_default.hasStandardBrowserEnv ? (\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain2, secure) {\n const cookie = [name + \"=\" + encodeURIComponent(value)];\n utils_default.isNumber(expires) && cookie.push(\"expires=\" + new Date(expires).toGMTString());\n utils_default.isString(path) && cookie.push(\"path=\" + path);\n utils_default.isString(domain2) && cookie.push(\"domain=\" + domain2);\n secure === true && cookie.push(\"secure\");\n document.cookie = cookie.join(\"; \");\n },\n read(name) {\n const match = document.cookie.match(new RegExp(\"(^|;\\\\s*)(\" + name + \")=([^;]*)\"));\n return match ? decodeURIComponent(match[3]) : null;\n },\n remove(name) {\n this.write(name, \"\", Date.now() - 864e5);\n }\n }\n ) : (\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {\n },\n read() {\n return null;\n },\n remove() {\n }\n }\n );\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isAbsoluteURL.js\n function isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n }\n var init_isAbsoluteURL = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isAbsoluteURL.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/combineURLs.js\n function combineURLs(baseURL, relativeURL) {\n return relativeURL ? baseURL.replace(/\\/?\\/$/, \"\") + \"/\" + relativeURL.replace(/^\\/+/, \"\") : baseURL;\n }\n var init_combineURLs = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/combineURLs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/buildFullPath.js\n function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n }\n var init_buildFullPath = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/buildFullPath.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isAbsoluteURL();\n init_combineURLs();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/mergeConfig.js\n function mergeConfig(config1, config2) {\n config2 = config2 || {};\n const config3 = {};\n function getMergedValue(target, source, prop, caseless) {\n if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {\n return utils_default.merge.call({ caseless }, target, source);\n } else if (utils_default.isPlainObject(source)) {\n return utils_default.merge({}, source);\n } else if (utils_default.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n function mergeDeepProperties(a3, b4, prop, caseless) {\n if (!utils_default.isUndefined(b4)) {\n return getMergedValue(a3, b4, prop, caseless);\n } else if (!utils_default.isUndefined(a3)) {\n return getMergedValue(void 0, a3, prop, caseless);\n }\n }\n function valueFromConfig2(a3, b4) {\n if (!utils_default.isUndefined(b4)) {\n return getMergedValue(void 0, b4);\n }\n }\n function defaultToConfig2(a3, b4) {\n if (!utils_default.isUndefined(b4)) {\n return getMergedValue(void 0, b4);\n } else if (!utils_default.isUndefined(a3)) {\n return getMergedValue(void 0, a3);\n }\n }\n function mergeDirectKeys(a3, b4, prop) {\n if (prop in config2) {\n return getMergedValue(a3, b4);\n } else if (prop in config1) {\n return getMergedValue(void 0, a3);\n }\n }\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a3, b4, prop) => mergeDeepProperties(headersToObject(a3), headersToObject(b4), prop, true)\n };\n utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge2 = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge2(config1[prop], config2[prop], prop);\n utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config3[prop] = configValue);\n });\n return config3;\n }\n var headersToObject;\n var init_mergeConfig = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/mergeConfig.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_AxiosHeaders();\n headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/resolveConfig.js\n var resolveConfig_default;\n var init_resolveConfig = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/resolveConfig.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_platform();\n init_utils11();\n init_isURLSameOrigin();\n init_cookies();\n init_buildFullPath();\n init_mergeConfig();\n init_AxiosHeaders();\n init_buildURL();\n resolveConfig_default = (config2) => {\n const newConfig = mergeConfig({}, config2);\n let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;\n newConfig.headers = headers = AxiosHeaders_default.from(headers);\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config2.params, config2.paramsSerializer);\n if (auth) {\n headers.set(\n \"Authorization\",\n \"Basic \" + btoa((auth.username || \"\") + \":\" + (auth.password ? unescape(encodeURIComponent(auth.password)) : \"\"))\n );\n }\n let contentType;\n if (utils_default.isFormData(data)) {\n if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(void 0);\n } else if ((contentType = headers.getContentType()) !== false) {\n const [type, ...tokens] = contentType ? contentType.split(\";\").map((token) => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || \"multipart/form-data\", ...tokens].join(\"; \"));\n }\n }\n if (platform_default.hasStandardBrowserEnv) {\n withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n return newConfig;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/xhr.js\n var isXHRAdapterSupported, xhr_default;\n var init_xhr = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/xhr.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_settle();\n init_transitional();\n init_AxiosError();\n init_CanceledError();\n init_parseProtocol();\n init_platform();\n init_AxiosHeaders();\n init_progressEventReducer();\n init_resolveConfig();\n isXHRAdapterSupported = typeof XMLHttpRequest !== \"undefined\";\n xhr_default = isXHRAdapterSupported && function(config2) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig_default(config2);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();\n let { responseType, onUploadProgress, onDownloadProgress } = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n function done() {\n flushUpload && flushUpload();\n flushDownload && flushDownload();\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n _config.signal && _config.signal.removeEventListener(\"abort\", onCanceled);\n }\n let request = new XMLHttpRequest();\n request.open(_config.method.toUpperCase(), _config.url, true);\n request.timeout = _config.timeout;\n function onloadend() {\n if (!request) {\n return;\n }\n const responseHeaders = AxiosHeaders_default.from(\n \"getAllResponseHeaders\" in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === \"text\" || responseType === \"json\" ? request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config2,\n request\n };\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n request = null;\n }\n if (\"onloadend\" in request) {\n request.onloadend = onloadend;\n } else {\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf(\"file:\") === 0)) {\n return;\n }\n setTimeout(onloadend);\n };\n }\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n reject(new AxiosError_default(\"Request aborted\", AxiosError_default.ECONNABORTED, config2, request));\n request = null;\n };\n request.onerror = function handleError() {\n reject(new AxiosError_default(\"Network Error\", AxiosError_default.ERR_NETWORK, config2, request));\n request = null;\n };\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? \"timeout of \" + _config.timeout + \"ms exceeded\" : \"timeout exceeded\";\n const transitional2 = _config.transitional || transitional_default;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError_default(\n timeoutErrorMessage,\n transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,\n config2,\n request\n ));\n request = null;\n };\n requestData === void 0 && requestHeaders.setContentType(null);\n if (\"setRequestHeader\" in request) {\n utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n if (!utils_default.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n if (responseType && responseType !== \"json\") {\n request.responseType = _config.responseType;\n }\n if (onDownloadProgress) {\n [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);\n request.addEventListener(\"progress\", downloadThrottled);\n }\n if (onUploadProgress && request.upload) {\n [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n request.upload.addEventListener(\"progress\", uploadThrottled);\n request.upload.addEventListener(\"loadend\", flushUpload);\n }\n if (_config.cancelToken || _config.signal) {\n onCanceled = (cancel) => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError_default(null, config2, request) : cancel);\n request.abort();\n request = null;\n };\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener(\"abort\", onCanceled);\n }\n }\n const protocol = parseProtocol(_config.url);\n if (protocol && platform_default.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError_default(\"Unsupported protocol \" + protocol + \":\", AxiosError_default.ERR_BAD_REQUEST, config2));\n return;\n }\n request.send(requestData || null);\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/composeSignals.js\n var composeSignals, composeSignals_default;\n var init_composeSignals = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/composeSignals.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_CanceledError();\n init_AxiosError();\n init_utils11();\n composeSignals = (signals, timeout) => {\n const { length } = signals = signals ? signals.filter(Boolean) : [];\n if (timeout || length) {\n let controller = new AbortController();\n let aborted;\n const onabort = function(reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));\n }\n };\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));\n }, timeout);\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach((signal2) => {\n signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener(\"abort\", onabort);\n });\n signals = null;\n }\n };\n signals.forEach((signal2) => signal2.addEventListener(\"abort\", onabort));\n const { signal } = controller;\n signal.unsubscribe = () => utils_default.asap(unsubscribe);\n return signal;\n }\n };\n composeSignals_default = composeSignals;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/trackStream.js\n var streamChunk, readBytes, readStream, trackStream;\n var init_trackStream = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/trackStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n let pos = 0;\n let end;\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n };\n readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n };\n readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n const reader = stream.getReader();\n try {\n for (; ; ) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n };\n trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator2 = readBytes(stream, chunkSize);\n let bytes = 0;\n let done;\n let _onFinish = (e2) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e2);\n }\n };\n return new ReadableStream({\n async pull(controller) {\n try {\n const { done: done2, value } = await iterator2.next();\n if (done2) {\n _onFinish();\n controller.close();\n return;\n }\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator2.return();\n }\n }, {\n highWaterMark: 2\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/fetch.js\n var isFetchSupported, isReadableStreamSupported, encodeText, test, supportsRequestStream, DEFAULT_CHUNK_SIZE, supportsResponseStream, resolvers, getBodyLength, resolveBodyLength, fetch_default;\n var init_fetch = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/fetch.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_platform();\n init_utils11();\n init_AxiosError();\n init_composeSignals();\n init_trackStream();\n init_AxiosHeaders();\n init_progressEventReducer();\n init_resolveConfig();\n init_settle();\n isFetchSupported = typeof fetch === \"function\" && typeof Request === \"function\" && typeof Response === \"function\";\n isReadableStreamSupported = isFetchSupported && typeof ReadableStream === \"function\";\n encodeText = isFetchSupported && (typeof TextEncoder === \"function\" ? /* @__PURE__ */ ((encoder6) => (str) => encoder6.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));\n test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e2) {\n return false;\n }\n };\n supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n const hasContentType = new Request(platform_default.origin, {\n body: new ReadableStream(),\n method: \"POST\",\n get duplex() {\n duplexAccessed = true;\n return \"half\";\n }\n }).headers.has(\"Content-Type\");\n return duplexAccessed && !hasContentType;\n });\n DEFAULT_CHUNK_SIZE = 64 * 1024;\n supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response(\"\").body));\n resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n };\n isFetchSupported && ((res) => {\n [\"text\", \"arrayBuffer\", \"blob\", \"formData\", \"stream\"].forEach((type) => {\n !resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_2, config2) => {\n throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config2);\n });\n });\n })(new Response());\n getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n if (utils_default.isBlob(body)) {\n return body.size;\n }\n if (utils_default.isSpecCompliantForm(body)) {\n const _request = new Request(platform_default.origin, {\n method: \"POST\",\n body\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {\n return body.byteLength;\n }\n if (utils_default.isURLSearchParams(body)) {\n body = body + \"\";\n }\n if (utils_default.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n };\n resolveBodyLength = async (headers, body) => {\n const length = utils_default.toFiniteNumber(headers.getContentLength());\n return length == null ? getBodyLength(body) : length;\n };\n fetch_default = isFetchSupported && (async (config2) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = \"same-origin\",\n fetchOptions\n } = resolveConfig_default(config2);\n responseType = responseType ? (responseType + \"\").toLowerCase() : \"text\";\n let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n let request;\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n let requestContentLength;\n try {\n if (onUploadProgress && supportsRequestStream && method !== \"get\" && method !== \"head\" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {\n let _request = new Request(url, {\n method: \"POST\",\n body: data,\n duplex: \"half\"\n });\n let contentTypeHeader;\n if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get(\"content-type\"))) {\n headers.setContentType(contentTypeHeader);\n }\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n if (!utils_default.isString(withCredentials)) {\n withCredentials = withCredentials ? \"include\" : \"omit\";\n }\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : void 0\n });\n let response = await fetch(request, fetchOptions);\n const isStreamResponse = supportsResponseStream && (responseType === \"stream\" || responseType === \"response\");\n if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {\n const options = {};\n [\"status\", \"statusText\", \"headers\"].forEach((prop) => {\n options[prop] = response[prop];\n });\n const responseContentLength = utils_default.toFiniteNumber(response.headers.get(\"content-length\"));\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n responseType = responseType || \"text\";\n let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || \"text\"](response, config2);\n !isStreamResponse && unsubscribe && unsubscribe();\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders_default.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config: config2,\n request\n });\n });\n } catch (err) {\n unsubscribe && unsubscribe();\n if (err && err.name === \"TypeError\" && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError_default(\"Network Error\", AxiosError_default.ERR_NETWORK, config2, request),\n {\n cause: err.cause || err\n }\n );\n }\n throw AxiosError_default.from(err, err && err.code, config2, request);\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/adapters.js\n var knownAdapters, renderReason, isResolvedHandle, adapters_default;\n var init_adapters = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/adapters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_null();\n init_xhr();\n init_fetch();\n init_AxiosError();\n knownAdapters = {\n http: null_default,\n xhr: xhr_default,\n fetch: fetch_default\n };\n utils_default.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, \"name\", { value });\n } catch (e2) {\n }\n Object.defineProperty(fn, \"adapterName\", { value });\n }\n });\n renderReason = (reason) => `- ${reason}`;\n isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;\n adapters_default = {\n getAdapter: (adapters) => {\n adapters = utils_default.isArray(adapters) ? adapters : [adapters];\n const { length } = adapters;\n let nameOrAdapter;\n let adapter;\n const rejectedReasons = {};\n for (let i3 = 0; i3 < length; i3++) {\n nameOrAdapter = adapters[i3];\n let id;\n adapter = nameOrAdapter;\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n if (adapter === void 0) {\n throw new AxiosError_default(`Unknown adapter '${id}'`);\n }\n }\n if (adapter) {\n break;\n }\n rejectedReasons[id || \"#\" + i3] = adapter;\n }\n if (!adapter) {\n const reasons = Object.entries(rejectedReasons).map(\n ([id, state]) => `adapter ${id} ` + (state === false ? \"is not supported by the environment\" : \"is not available in the build\")\n );\n let s4 = length ? reasons.length > 1 ? \"since :\\n\" + reasons.map(renderReason).join(\"\\n\") : \" \" + renderReason(reasons[0]) : \"as no adapter specified\";\n throw new AxiosError_default(\n `There is no suitable adapter to dispatch the request ` + s4,\n \"ERR_NOT_SUPPORT\"\n );\n }\n return adapter;\n },\n adapters: knownAdapters\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/dispatchRequest.js\n function throwIfCancellationRequested(config2) {\n if (config2.cancelToken) {\n config2.cancelToken.throwIfRequested();\n }\n if (config2.signal && config2.signal.aborted) {\n throw new CanceledError_default(null, config2);\n }\n }\n function dispatchRequest(config2) {\n throwIfCancellationRequested(config2);\n config2.headers = AxiosHeaders_default.from(config2.headers);\n config2.data = transformData.call(\n config2,\n config2.transformRequest\n );\n if ([\"post\", \"put\", \"patch\"].indexOf(config2.method) !== -1) {\n config2.headers.setContentType(\"application/x-www-form-urlencoded\", false);\n }\n const adapter = adapters_default.getAdapter(config2.adapter || defaults_default.adapter);\n return adapter(config2).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config2);\n response.data = transformData.call(\n config2,\n config2.transformResponse,\n response\n );\n response.headers = AxiosHeaders_default.from(response.headers);\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config2);\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config2,\n config2.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders_default.from(reason.response.headers);\n }\n }\n return Promise.reject(reason);\n });\n }\n var init_dispatchRequest = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/dispatchRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transformData();\n init_isCancel();\n init_defaults2();\n init_CanceledError();\n init_AxiosHeaders();\n init_adapters();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/env/data.js\n var VERSION2;\n var init_data2 = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/env/data.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION2 = \"1.10.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/validator.js\n function assertOptions(options, schema, allowUnknown) {\n if (typeof options !== \"object\") {\n throw new AxiosError_default(\"options must be an object\", AxiosError_default.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i3 = keys.length;\n while (i3-- > 0) {\n const opt = keys[i3];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === void 0 || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError_default(\"option \" + opt + \" must be \" + result, AxiosError_default.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError_default(\"Unknown option \" + opt, AxiosError_default.ERR_BAD_OPTION);\n }\n }\n }\n var validators, deprecatedWarnings, validator_default;\n var init_validator = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/validator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_data2();\n init_AxiosError();\n validators = {};\n [\"object\", \"boolean\", \"number\", \"function\", \"string\", \"symbol\"].forEach((type, i3) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || \"a\" + (i3 < 1 ? \"n \" : \" \") + type;\n };\n });\n deprecatedWarnings = {};\n validators.transitional = function transitional(validator, version8, message) {\n function formatMessage(opt, desc) {\n return \"[Axios v\" + VERSION2 + \"] Transitional option '\" + opt + \"'\" + desc + (message ? \". \" + message : \"\");\n }\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError_default(\n formatMessage(opt, \" has been removed\" + (version8 ? \" in \" + version8 : \"\")),\n AxiosError_default.ERR_DEPRECATED\n );\n }\n if (version8 && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n console.warn(\n formatMessage(\n opt,\n \" has been deprecated since v\" + version8 + \" and will be removed in the near future\"\n )\n );\n }\n return validator ? validator(value, opt, opts) : true;\n };\n };\n validators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n };\n };\n validator_default = {\n assertOptions,\n validators\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/Axios.js\n var validators2, Axios, Axios_default;\n var init_Axios = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/Axios.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_buildURL();\n init_InterceptorManager();\n init_dispatchRequest();\n init_mergeConfig();\n init_buildFullPath();\n init_validator();\n init_AxiosHeaders();\n validators2 = validator_default.validators;\n Axios = class {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager_default(),\n response: new InterceptorManager_default()\n };\n }\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config2) {\n try {\n return await this._request(configOrUrl, config2);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, \"\") : \"\";\n try {\n if (!err.stack) {\n err.stack = stack;\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, \"\"))) {\n err.stack += \"\\n\" + stack;\n }\n } catch (e2) {\n }\n }\n throw err;\n }\n }\n _request(configOrUrl, config2) {\n if (typeof configOrUrl === \"string\") {\n config2 = config2 || {};\n config2.url = configOrUrl;\n } else {\n config2 = configOrUrl || {};\n }\n config2 = mergeConfig(this.defaults, config2);\n const { transitional: transitional2, paramsSerializer, headers } = config2;\n if (transitional2 !== void 0) {\n validator_default.assertOptions(transitional2, {\n silentJSONParsing: validators2.transitional(validators2.boolean),\n forcedJSONParsing: validators2.transitional(validators2.boolean),\n clarifyTimeoutError: validators2.transitional(validators2.boolean)\n }, false);\n }\n if (paramsSerializer != null) {\n if (utils_default.isFunction(paramsSerializer)) {\n config2.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator_default.assertOptions(paramsSerializer, {\n encode: validators2.function,\n serialize: validators2.function\n }, true);\n }\n }\n if (config2.allowAbsoluteUrls !== void 0) {\n } else if (this.defaults.allowAbsoluteUrls !== void 0) {\n config2.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config2.allowAbsoluteUrls = true;\n }\n validator_default.assertOptions(config2, {\n baseUrl: validators2.spelling(\"baseURL\"),\n withXsrfToken: validators2.spelling(\"withXSRFToken\")\n }, true);\n config2.method = (config2.method || this.defaults.method || \"get\").toLowerCase();\n let contextHeaders = headers && utils_default.merge(\n headers.common,\n headers[config2.method]\n );\n headers && utils_default.forEach(\n [\"delete\", \"get\", \"head\", \"post\", \"put\", \"patch\", \"common\"],\n (method) => {\n delete headers[method];\n }\n );\n config2.headers = AxiosHeaders_default.concat(contextHeaders, headers);\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === \"function\" && interceptor.runWhen(config2) === false) {\n return;\n }\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n let promise;\n let i3 = 0;\n let len;\n if (!synchronousRequestInterceptors) {\n const chain2 = [dispatchRequest.bind(this), void 0];\n chain2.unshift.apply(chain2, requestInterceptorChain);\n chain2.push.apply(chain2, responseInterceptorChain);\n len = chain2.length;\n promise = Promise.resolve(config2);\n while (i3 < len) {\n promise = promise.then(chain2[i3++], chain2[i3++]);\n }\n return promise;\n }\n len = requestInterceptorChain.length;\n let newConfig = config2;\n i3 = 0;\n while (i3 < len) {\n const onFulfilled = requestInterceptorChain[i3++];\n const onRejected = requestInterceptorChain[i3++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n i3 = 0;\n len = responseInterceptorChain.length;\n while (i3 < len) {\n promise = promise.then(responseInterceptorChain[i3++], responseInterceptorChain[i3++]);\n }\n return promise;\n }\n getUri(config2) {\n config2 = mergeConfig(this.defaults, config2);\n const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls);\n return buildURL(fullPath, config2.params, config2.paramsSerializer);\n }\n };\n utils_default.forEach([\"delete\", \"get\", \"head\", \"options\"], function forEachMethodNoData(method) {\n Axios.prototype[method] = function(url, config2) {\n return this.request(mergeConfig(config2 || {}, {\n method,\n url,\n data: (config2 || {}).data\n }));\n };\n });\n utils_default.forEach([\"post\", \"put\", \"patch\"], function forEachMethodWithData(method) {\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config2) {\n return this.request(mergeConfig(config2 || {}, {\n method,\n headers: isForm ? {\n \"Content-Type\": \"multipart/form-data\"\n } : {},\n url,\n data\n }));\n };\n }\n Axios.prototype[method] = generateHTTPMethod();\n Axios.prototype[method + \"Form\"] = generateHTTPMethod(true);\n });\n Axios_default = Axios;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/CancelToken.js\n var CancelToken, CancelToken_default;\n var init_CancelToken = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/CancelToken.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_CanceledError();\n CancelToken = class _CancelToken {\n constructor(executor) {\n if (typeof executor !== \"function\") {\n throw new TypeError(\"executor must be a function.\");\n }\n let resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n const token = this;\n this.promise.then((cancel) => {\n if (!token._listeners)\n return;\n let i3 = token._listeners.length;\n while (i3-- > 0) {\n token._listeners[i3](cancel);\n }\n token._listeners = null;\n });\n this.promise.then = (onfulfilled) => {\n let _resolve;\n const promise = new Promise((resolve) => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n return promise;\n };\n executor(function cancel(message, config2, request) {\n if (token.reason) {\n return;\n }\n token.reason = new CanceledError_default(message, config2, request);\n resolvePromise(token.reason);\n });\n }\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n /**\n * Subscribe to the cancel signal\n */\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n /**\n * Unsubscribe from the cancel signal\n */\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index2 = this._listeners.indexOf(listener);\n if (index2 !== -1) {\n this._listeners.splice(index2, 1);\n }\n }\n toAbortSignal() {\n const controller = new AbortController();\n const abort2 = (err) => {\n controller.abort(err);\n };\n this.subscribe(abort2);\n controller.signal.unsubscribe = () => this.unsubscribe(abort2);\n return controller.signal;\n }\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new _CancelToken(function executor(c4) {\n cancel = c4;\n });\n return {\n token,\n cancel\n };\n }\n };\n CancelToken_default = CancelToken;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/spread.js\n function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n }\n var init_spread = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/spread.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isAxiosError.js\n function isAxiosError(payload) {\n return utils_default.isObject(payload) && payload.isAxiosError === true;\n }\n var init_isAxiosError = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isAxiosError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/HttpStatusCode.js\n var HttpStatusCode, HttpStatusCode_default;\n var init_HttpStatusCode = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/HttpStatusCode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511\n };\n Object.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n });\n HttpStatusCode_default = HttpStatusCode;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js\n function createInstance(defaultConfig) {\n const context2 = new Axios_default(defaultConfig);\n const instance = bind(Axios_default.prototype.request, context2);\n utils_default.extend(instance, Axios_default.prototype, context2, { allOwnKeys: true });\n utils_default.extend(instance, context2, null, { allOwnKeys: true });\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n return instance;\n }\n var axios, axios_default;\n var init_axios = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_bind();\n init_Axios();\n init_mergeConfig();\n init_defaults2();\n init_formDataToJSON();\n init_CanceledError();\n init_CancelToken();\n init_isCancel();\n init_data2();\n init_toFormData();\n init_AxiosError();\n init_spread();\n init_isAxiosError();\n init_AxiosHeaders();\n init_adapters();\n init_HttpStatusCode();\n axios = createInstance(defaults_default);\n axios.Axios = Axios_default;\n axios.CanceledError = CanceledError_default;\n axios.CancelToken = CancelToken_default;\n axios.isCancel = isCancel;\n axios.VERSION = VERSION2;\n axios.toFormData = toFormData_default;\n axios.AxiosError = AxiosError_default;\n axios.Cancel = axios.CanceledError;\n axios.all = function all(promises) {\n return Promise.all(promises);\n };\n axios.spread = spread;\n axios.isAxiosError = isAxiosError;\n axios.mergeConfig = mergeConfig;\n axios.AxiosHeaders = AxiosHeaders_default;\n axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);\n axios.getAdapter = adapters_default.getAdapter;\n axios.HttpStatusCode = HttpStatusCode_default;\n axios.default = axios;\n axios_default = axios;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js\n var Axios2, AxiosError2, CanceledError2, isCancel2, CancelToken2, VERSION3, all2, Cancel, isAxiosError2, spread2, toFormData2, AxiosHeaders2, HttpStatusCode2, formToJSON, getAdapter, mergeConfig2;\n var init_axios2 = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_axios();\n ({\n Axios: Axios2,\n AxiosError: AxiosError2,\n CanceledError: CanceledError2,\n isCancel: isCancel2,\n CancelToken: CancelToken2,\n VERSION: VERSION3,\n all: all2,\n Cancel,\n isAxiosError: isAxiosError2,\n spread: spread2,\n toFormData: toFormData2,\n AxiosHeaders: AxiosHeaders2,\n HttpStatusCode: HttpStatusCode2,\n formToJSON,\n getAdapter,\n mergeConfig: mergeConfig2\n } = axios_default);\n }\n });\n\n // ../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/alchemy-provider-6bbed8a2.js\n var alchemy_provider_6bbed8a2_exports = {};\n __export(alchemy_provider_6bbed8a2_exports, {\n AlchemyProvider: () => AlchemyProvider\n });\n function getResult(payload) {\n if (payload.error) {\n const 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 var import_networks, import_providers, import_web, DEFAULT_MAX_REQUEST_BATCH_SIZE, DEFAULT_REQUEST_BATCH_DELAY_MS, RequestBatcher, AlchemyProvider;\n var init_alchemy_provider_6bbed8a2 = __esm({\n \"../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/alchemy-provider-6bbed8a2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_index_f73a5f29();\n import_networks = __toESM(require_lib27());\n import_providers = __toESM(require_lib29());\n import_web = __toESM(require_lib28());\n DEFAULT_MAX_REQUEST_BATCH_SIZE = 100;\n DEFAULT_REQUEST_BATCH_DELAY_MS = 10;\n RequestBatcher = class {\n constructor(sendBatchFn, maxBatchSize = DEFAULT_MAX_REQUEST_BATCH_SIZE) {\n this.sendBatchFn = sendBatchFn;\n this.maxBatchSize = maxBatchSize;\n this.pendingBatch = [];\n }\n /**\n * Enqueues the provided request. The batch is immediately sent if the maximum\n * batch size is reached. Otherwise, the request is enqueued onto a batch that\n * is sent after 10ms.\n *\n * Returns a promise that resolves with the result of the request.\n */\n enqueueRequest(request) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const inflightRequest = {\n request,\n resolve: void 0,\n reject: void 0\n };\n const promise = new Promise((resolve, reject) => {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n this.pendingBatch.push(inflightRequest);\n if (this.pendingBatch.length === this.maxBatchSize) {\n void this.sendBatchRequest();\n } else if (!this.pendingBatchTimer) {\n this.pendingBatchTimer = setTimeout(() => this.sendBatchRequest(), DEFAULT_REQUEST_BATCH_DELAY_MS);\n }\n return promise;\n });\n }\n /**\n * Sends the currently queued batches and resets the batch and timer. Processes\n * the batched response results back to the original promises.\n */\n sendBatchRequest() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const batch2 = this.pendingBatch;\n this.pendingBatch = [];\n if (this.pendingBatchTimer) {\n clearTimeout(this.pendingBatchTimer);\n this.pendingBatchTimer = void 0;\n }\n const request = batch2.map((inflight) => inflight.request);\n return this.sendBatchFn(request).then((result) => {\n batch2.forEach((inflightRequest, index2) => {\n const payload = result[index2];\n if (payload.error) {\n const error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n inflightRequest.reject(error);\n } else {\n inflightRequest.resolve(payload.result);\n }\n });\n }, (error) => {\n batch2.forEach((inflightRequest) => {\n inflightRequest.reject(error);\n });\n });\n });\n }\n };\n AlchemyProvider = class _AlchemyProvider extends import_providers.JsonRpcProvider {\n /** @internal */\n constructor(config2) {\n const apiKey = _AlchemyProvider.getApiKey(config2.apiKey);\n const alchemyNetwork = _AlchemyProvider.getAlchemyNetwork(config2.network);\n let connection = _AlchemyProvider.getAlchemyConnectionInfo(alchemyNetwork, apiKey, \"http\");\n if (config2.url !== void 0) {\n connection.url = config2.url;\n }\n connection.throttleLimit = config2.maxRetries;\n if (config2.connectionInfoOverrides) {\n connection = Object.assign(Object.assign({}, connection), config2.connectionInfoOverrides);\n }\n const ethersNetwork = EthersNetwork[alchemyNetwork];\n if (!ethersNetwork) {\n throw new Error(`Unsupported network: ${alchemyNetwork}`);\n }\n super(connection, ethersNetwork);\n this.apiKey = config2.apiKey;\n this.maxRetries = config2.maxRetries;\n this.batchRequests = config2.batchRequests;\n const batcherConnection = Object.assign(Object.assign({}, this.connection), { headers: Object.assign(Object.assign({}, this.connection.headers), { \"Alchemy-Ethers-Sdk-Method\": \"batchSend\" }) });\n const sendBatchFn = (requests) => {\n return (0, import_web.fetchJson)(batcherConnection, JSON.stringify(requests));\n };\n this.batcher = new RequestBatcher(sendBatchFn);\n this.modifyFormatter();\n }\n /**\n * Overrides the `UrlJsonRpcProvider.getApiKey` method as implemented by\n * ethers.js. Returns the API key for an Alchemy provider.\n *\n * @internal\n * @override\n */\n static getApiKey(apiKey) {\n if (apiKey == null) {\n return DEFAULT_ALCHEMY_API_KEY;\n }\n if (apiKey && typeof apiKey !== \"string\") {\n throw new Error(`Invalid apiKey '${apiKey}' provided. apiKey must be a string.`);\n }\n return apiKey;\n }\n /**\n * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js.\n *\n * This override allows the SDK to set the provider's network to values not\n * yet supported by ethers.js.\n *\n * @internal\n * @override\n */\n static getNetwork(network) {\n if (typeof network === \"string\" && network in CustomNetworks) {\n return CustomNetworks[network];\n }\n return (0, import_networks.getNetwork)(network);\n }\n /**\n * Converts the `Networkish` input to the network enum used by Alchemy.\n *\n * @internal\n */\n static getAlchemyNetwork(network) {\n if (network === void 0) {\n return DEFAULT_NETWORK;\n }\n if (typeof network === \"number\") {\n throw new Error(`Invalid network '${network}' provided. Network must be a string.`);\n }\n const isValidNetwork = Object.values(Network).includes(network);\n if (!isValidNetwork) {\n throw new Error(`Invalid network '${network}' provided. Network must be one of: ${Object.values(Network).join(\", \")}.`);\n }\n return network;\n }\n /**\n * Returns a {@link ConnectionInfo} object compatible with ethers that contains\n * the correct URLs for Alchemy.\n *\n * @internal\n */\n static getAlchemyConnectionInfo(network, apiKey, type) {\n const url = type === \"http\" ? getAlchemyHttpUrl(network, apiKey) : getAlchemyWsUrl(network, apiKey);\n return {\n headers: IS_BROWSER ? {\n \"Alchemy-Ethers-Sdk-Version\": VERSION4\n } : {\n \"Alchemy-Ethers-Sdk-Version\": VERSION4,\n \"Accept-Encoding\": \"gzip\"\n },\n allowGzip: true,\n url\n };\n }\n /**\n * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This\n * method is called when calling methods on the parent class `BaseProvider`.\n *\n * @override\n */\n detectNetwork() {\n const _super = Object.create(null, {\n detectNetwork: { get: () => super.detectNetwork }\n });\n return __awaiter$1(this, void 0, void 0, function* () {\n let network = this.network;\n if (network == null) {\n network = yield _super.detectNetwork.call(this);\n if (!network) {\n throw new Error(\"No network detected\");\n }\n }\n return network;\n });\n }\n _startPending() {\n logWarn(\"WARNING: Alchemy Provider does not support pending filters\");\n }\n /**\n * Overrides the ether's `isCommunityResource()` method. Returns true if the\n * current api key is the default key.\n *\n * @override\n */\n isCommunityResource() {\n return this.apiKey === DEFAULT_ALCHEMY_API_KEY;\n }\n /**\n * Overrides the base {@link JsonRpcProvider.send} method to implement custom\n * logic for sending requests to Alchemy.\n *\n * @param method The method name to use for the request.\n * @param params The parameters to use for the request.\n * @override\n * @public\n */\n // TODO: Add headers for `perform()` override.\n send(method, params) {\n return this._send(method, params, \"send\");\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `JsonRpcProvider.send()`.\n *\n * This method is copied over directly in order to implement custom headers\n *\n * @internal\n */\n _send(method, params, methodName) {\n const request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n const connection = Object.assign({}, this.connection);\n connection.headers[\"Alchemy-Ethers-Sdk-Method\"] = methodName;\n if (this.batchRequests) {\n return this.batcher.enqueueRequest(request);\n }\n this.emit(\"debug\", {\n action: \"request\",\n request: deepCopy(request),\n provider: this\n });\n const cache = [\"eth_chainId\", \"eth_blockNumber\"].indexOf(method) >= 0;\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n const result = (0, import_web.fetchJson)(this.connection, JSON.stringify(request), getResult).then((result2) => {\n this.emit(\"debug\", {\n action: \"response\",\n request,\n response: result2,\n provider: this\n });\n return result2;\n }, (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(() => {\n this._cache[method] = null;\n }, 0);\n }\n return result;\n }\n /**\n * Overrides the base `Formatter` class inherited from ethers to support\n * returning custom fields in Ethers response types.\n *\n * For context, ethers has a `Formatter` class that is used to format the\n * response from a JSON-RPC request. Any fields that are not defined in the\n * `Formatter` class are removed from the returned response. By modifying the\n * `Formatter` class in this method, we can add support for fields that are\n * not defined in ethers.\n */\n modifyFormatter() {\n this.formatter.formats[\"receiptLog\"][\"removed\"] = (val) => {\n if (typeof val === \"boolean\") {\n return val;\n }\n return void 0;\n };\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/sturdy-websocket@0.2.1/node_modules/sturdy-websocket/dist/index.js\n var require_dist = __commonJS({\n \"../../../node_modules/.pnpm/sturdy-websocket@0.2.1/node_modules/sturdy-websocket/dist/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var SHOULD_RECONNECT_FALSE_MESSAGE = \"Provided shouldReconnect() returned false. Closing permanently.\";\n var SHOULD_RECONNECT_PROMISE_FALSE_MESSAGE = \"Provided shouldReconnect() resolved to false. Closing permanently.\";\n var SturdyWebSocket2 = (\n /** @class */\n function() {\n function SturdyWebSocket3(url, protocolsOrOptions, options) {\n if (options === void 0) {\n options = {};\n }\n this.url = url;\n this.onclose = null;\n this.onerror = null;\n this.onmessage = null;\n this.onopen = null;\n this.ondown = null;\n this.onreopen = null;\n this.CONNECTING = SturdyWebSocket3.CONNECTING;\n this.OPEN = SturdyWebSocket3.OPEN;\n this.CLOSING = SturdyWebSocket3.CLOSING;\n this.CLOSED = SturdyWebSocket3.CLOSED;\n this.hasBeenOpened = false;\n this.isClosed = false;\n this.messageBuffer = [];\n this.nextRetryTime = 0;\n this.reconnectCount = 0;\n this.lastKnownExtensions = \"\";\n this.lastKnownProtocol = \"\";\n this.listeners = {};\n if (protocolsOrOptions == null || typeof protocolsOrOptions === \"string\" || Array.isArray(protocolsOrOptions)) {\n this.protocols = protocolsOrOptions;\n } else {\n options = protocolsOrOptions;\n }\n this.options = applyDefaultOptions(options);\n if (!this.options.wsConstructor) {\n if (typeof WebSocket !== \"undefined\") {\n this.options.wsConstructor = WebSocket;\n } else {\n throw new Error(\"WebSocket not present in global scope and no wsConstructor option was provided.\");\n }\n }\n this.openNewWebSocket();\n }\n Object.defineProperty(SturdyWebSocket3.prototype, \"binaryType\", {\n get: function() {\n return this.binaryTypeInternal || \"blob\";\n },\n set: function(binaryType) {\n this.binaryTypeInternal = binaryType;\n if (this.ws) {\n this.ws.binaryType = binaryType;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SturdyWebSocket3.prototype, \"bufferedAmount\", {\n get: function() {\n var sum = this.ws ? this.ws.bufferedAmount : 0;\n var hasUnknownAmount = false;\n this.messageBuffer.forEach(function(data) {\n var byteLength = getDataByteLength(data);\n if (byteLength != null) {\n sum += byteLength;\n } else {\n hasUnknownAmount = true;\n }\n });\n if (hasUnknownAmount) {\n this.debugLog(\"Some buffered data had unknown length. bufferedAmount() return value may be below the correct amount.\");\n }\n return sum;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SturdyWebSocket3.prototype, \"extensions\", {\n get: function() {\n return this.ws ? this.ws.extensions : this.lastKnownExtensions;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SturdyWebSocket3.prototype, \"protocol\", {\n get: function() {\n return this.ws ? this.ws.protocol : this.lastKnownProtocol;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SturdyWebSocket3.prototype, \"readyState\", {\n get: function() {\n return this.isClosed ? SturdyWebSocket3.CLOSED : SturdyWebSocket3.OPEN;\n },\n enumerable: true,\n configurable: true\n });\n SturdyWebSocket3.prototype.close = function(code, reason) {\n this.disposeSocket(code, reason);\n this.shutdown();\n this.debugLog(\"WebSocket permanently closed by client.\");\n };\n SturdyWebSocket3.prototype.send = function(data) {\n if (this.isClosed) {\n throw new Error(\"WebSocket is already in CLOSING or CLOSED state.\");\n } else if (this.ws && this.ws.readyState === this.OPEN) {\n this.ws.send(data);\n } else {\n this.messageBuffer.push(data);\n }\n };\n SturdyWebSocket3.prototype.reconnect = function() {\n if (this.isClosed) {\n throw new Error(\"Cannot call reconnect() on socket which is permanently closed.\");\n }\n this.disposeSocket(1e3, \"Client requested reconnect.\");\n this.handleClose(void 0);\n };\n SturdyWebSocket3.prototype.addEventListener = function(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n this.listeners[type].push(listener);\n };\n SturdyWebSocket3.prototype.dispatchEvent = function(event) {\n return this.dispatchEventOfType(event.type, event);\n };\n SturdyWebSocket3.prototype.removeEventListener = function(type, listener) {\n if (this.listeners[type]) {\n this.listeners[type] = this.listeners[type].filter(function(l6) {\n return l6 !== listener;\n });\n }\n };\n SturdyWebSocket3.prototype.openNewWebSocket = function() {\n var _this = this;\n if (this.isClosed) {\n return;\n }\n var _a2 = this.options, connectTimeout = _a2.connectTimeout, wsConstructor = _a2.wsConstructor;\n this.debugLog(\"Opening new WebSocket to \" + this.url + \".\");\n var ws = new wsConstructor(this.url, this.protocols);\n ws.onclose = function(event) {\n return _this.handleClose(event);\n };\n ws.onerror = function(event) {\n return _this.handleError(event);\n };\n ws.onmessage = function(event) {\n return _this.handleMessage(event);\n };\n ws.onopen = function(event) {\n return _this.handleOpen(event);\n };\n this.connectTimeoutId = setTimeout(function() {\n _this.clearConnectTimeout();\n _this.disposeSocket();\n _this.handleClose(void 0);\n }, connectTimeout);\n this.ws = ws;\n };\n SturdyWebSocket3.prototype.handleOpen = function(event) {\n var _this = this;\n if (!this.ws || this.isClosed) {\n return;\n }\n var allClearResetTime = this.options.allClearResetTime;\n this.debugLog(\"WebSocket opened.\");\n if (this.binaryTypeInternal != null) {\n this.ws.binaryType = this.binaryTypeInternal;\n } else {\n this.binaryTypeInternal = this.ws.binaryType;\n }\n this.clearConnectTimeout();\n if (this.hasBeenOpened) {\n this.dispatchEventOfType(\"reopen\", event);\n } else {\n this.dispatchEventOfType(\"open\", event);\n this.hasBeenOpened = true;\n }\n this.messageBuffer.forEach(function(message) {\n return _this.send(message);\n });\n this.messageBuffer = [];\n this.allClearTimeoutId = setTimeout(function() {\n _this.clearAllClearTimeout();\n _this.nextRetryTime = 0;\n _this.reconnectCount = 0;\n var openTime = allClearResetTime / 1e3 | 0;\n _this.debugLog(\"WebSocket remained open for \" + openTime + \" seconds. Resetting retry time and count.\");\n }, allClearResetTime);\n };\n SturdyWebSocket3.prototype.handleMessage = function(event) {\n if (this.isClosed) {\n return;\n }\n this.dispatchEventOfType(\"message\", event);\n };\n SturdyWebSocket3.prototype.handleClose = function(event) {\n var _this = this;\n if (this.isClosed) {\n return;\n }\n var _a2 = this.options, maxReconnectAttempts = _a2.maxReconnectAttempts, shouldReconnect = _a2.shouldReconnect;\n this.clearConnectTimeout();\n this.clearAllClearTimeout();\n if (this.ws) {\n this.lastKnownExtensions = this.ws.extensions;\n this.lastKnownProtocol = this.ws.protocol;\n this.disposeSocket();\n }\n this.dispatchEventOfType(\"down\", event);\n if (this.reconnectCount >= maxReconnectAttempts) {\n this.stopReconnecting(event, this.getTooManyFailedReconnectsMessage());\n return;\n }\n var willReconnect = !event || shouldReconnect(event);\n if (typeof willReconnect === \"boolean\") {\n this.handleWillReconnect(willReconnect, event, SHOULD_RECONNECT_FALSE_MESSAGE);\n } else {\n willReconnect.then(function(willReconnectResolved) {\n if (_this.isClosed) {\n return;\n }\n _this.handleWillReconnect(willReconnectResolved, event, SHOULD_RECONNECT_PROMISE_FALSE_MESSAGE);\n });\n }\n };\n SturdyWebSocket3.prototype.handleError = function(event) {\n this.dispatchEventOfType(\"error\", event);\n this.debugLog(\"WebSocket encountered an error.\");\n };\n SturdyWebSocket3.prototype.handleWillReconnect = function(willReconnect, event, denialReason) {\n if (willReconnect) {\n this.reestablishConnection();\n } else {\n this.stopReconnecting(event, denialReason);\n }\n };\n SturdyWebSocket3.prototype.reestablishConnection = function() {\n var _this = this;\n var _a2 = this.options, minReconnectDelay = _a2.minReconnectDelay, maxReconnectDelay = _a2.maxReconnectDelay, reconnectBackoffFactor = _a2.reconnectBackoffFactor;\n this.reconnectCount++;\n var retryTime = this.nextRetryTime;\n this.nextRetryTime = Math.max(minReconnectDelay, Math.min(this.nextRetryTime * reconnectBackoffFactor, maxReconnectDelay));\n setTimeout(function() {\n return _this.openNewWebSocket();\n }, retryTime);\n var retryTimeSeconds = retryTime / 1e3 | 0;\n this.debugLog(\"WebSocket was closed. Re-opening in \" + retryTimeSeconds + \" seconds.\");\n };\n SturdyWebSocket3.prototype.stopReconnecting = function(event, debugReason) {\n this.debugLog(debugReason);\n this.shutdown();\n if (event) {\n this.dispatchEventOfType(\"close\", event);\n }\n };\n SturdyWebSocket3.prototype.shutdown = function() {\n this.isClosed = true;\n this.clearAllTimeouts();\n this.messageBuffer = [];\n this.disposeSocket();\n };\n SturdyWebSocket3.prototype.disposeSocket = function(closeCode, reason) {\n if (!this.ws) {\n return;\n }\n this.ws.onerror = noop4;\n this.ws.onclose = noop4;\n this.ws.onmessage = noop4;\n this.ws.onopen = noop4;\n this.ws.close(closeCode, reason);\n this.ws = void 0;\n };\n SturdyWebSocket3.prototype.clearAllTimeouts = function() {\n this.clearConnectTimeout();\n this.clearAllClearTimeout();\n };\n SturdyWebSocket3.prototype.clearConnectTimeout = function() {\n if (this.connectTimeoutId != null) {\n clearTimeout(this.connectTimeoutId);\n this.connectTimeoutId = void 0;\n }\n };\n SturdyWebSocket3.prototype.clearAllClearTimeout = function() {\n if (this.allClearTimeoutId != null) {\n clearTimeout(this.allClearTimeoutId);\n this.allClearTimeoutId = void 0;\n }\n };\n SturdyWebSocket3.prototype.dispatchEventOfType = function(type, event) {\n var _this = this;\n switch (type) {\n case \"close\":\n if (this.onclose) {\n this.onclose(event);\n }\n break;\n case \"error\":\n if (this.onerror) {\n this.onerror(event);\n }\n break;\n case \"message\":\n if (this.onmessage) {\n this.onmessage(event);\n }\n break;\n case \"open\":\n if (this.onopen) {\n this.onopen(event);\n }\n break;\n case \"down\":\n if (this.ondown) {\n this.ondown(event);\n }\n break;\n case \"reopen\":\n if (this.onreopen) {\n this.onreopen(event);\n }\n break;\n }\n if (type in this.listeners) {\n this.listeners[type].slice().forEach(function(listener) {\n return _this.callListener(listener, event);\n });\n }\n return !event || !event.defaultPrevented;\n };\n SturdyWebSocket3.prototype.callListener = function(listener, event) {\n if (typeof listener === \"function\") {\n listener.call(this, event);\n } else {\n listener.handleEvent.call(this, event);\n }\n };\n SturdyWebSocket3.prototype.debugLog = function(message) {\n if (this.options.debug) {\n console.log(message);\n }\n };\n SturdyWebSocket3.prototype.getTooManyFailedReconnectsMessage = function() {\n var maxReconnectAttempts = this.options.maxReconnectAttempts;\n return \"Failed to reconnect after \" + maxReconnectAttempts + \" \" + pluralize(\"attempt\", maxReconnectAttempts) + \". Closing permanently.\";\n };\n SturdyWebSocket3.DEFAULT_OPTIONS = {\n allClearResetTime: 5e3,\n connectTimeout: 5e3,\n debug: false,\n minReconnectDelay: 1e3,\n maxReconnectDelay: 3e4,\n maxReconnectAttempts: Number.POSITIVE_INFINITY,\n reconnectBackoffFactor: 1.5,\n shouldReconnect: function() {\n return true;\n },\n wsConstructor: void 0\n };\n SturdyWebSocket3.CONNECTING = 0;\n SturdyWebSocket3.OPEN = 1;\n SturdyWebSocket3.CLOSING = 2;\n SturdyWebSocket3.CLOSED = 3;\n return SturdyWebSocket3;\n }()\n );\n exports3.default = SturdyWebSocket2;\n function applyDefaultOptions(options) {\n var result = {};\n Object.keys(SturdyWebSocket2.DEFAULT_OPTIONS).forEach(function(key) {\n var value = options[key];\n result[key] = value === void 0 ? SturdyWebSocket2.DEFAULT_OPTIONS[key] : value;\n });\n return result;\n }\n function getDataByteLength(data) {\n if (typeof data === \"string\") {\n return 2 * data.length;\n } else if (data instanceof ArrayBuffer) {\n return data.byteLength;\n } else if (data instanceof Blob) {\n return data.size;\n } else {\n return void 0;\n }\n }\n function pluralize(s4, n2) {\n return n2 === 1 ? s4 : s4 + \"s\";\n }\n function noop4() {\n }\n }\n });\n\n // ../../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/global.js\n var require_global = __commonJS({\n \"../../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/global.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var naiveFallback = function() {\n if (typeof self === \"object\" && self)\n return self;\n if (typeof window === \"object\" && window)\n return window;\n throw new Error(\"Unable to resolve global `this`\");\n };\n module.exports = function() {\n if (this)\n return this;\n if (typeof globalThis === \"object\" && globalThis)\n return globalThis;\n try {\n Object.defineProperty(Object.prototype, \"__global__\", {\n get: function() {\n return this;\n },\n configurable: true\n });\n } catch (error) {\n return naiveFallback();\n }\n try {\n if (!__global__)\n return naiveFallback();\n return __global__;\n } finally {\n delete Object.prototype.__global__;\n }\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/package.json\n var require_package2 = __commonJS({\n \"../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/package.json\"(exports3, module) {\n module.exports = {\n name: \"websocket\",\n description: \"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.\",\n keywords: [\n \"websocket\",\n \"websockets\",\n \"socket\",\n \"networking\",\n \"comet\",\n \"push\",\n \"RFC-6455\",\n \"realtime\",\n \"server\",\n \"client\"\n ],\n author: \"Brian McKelvey (https://github.com/theturtle32)\",\n contributors: [\n \"I\\xF1aki Baz Castillo (http://dev.sipdoc.net)\"\n ],\n version: \"1.0.35\",\n repository: {\n type: \"git\",\n url: \"https://github.com/theturtle32/WebSocket-Node.git\"\n },\n homepage: \"https://github.com/theturtle32/WebSocket-Node\",\n engines: {\n node: \">=4.0.0\"\n },\n dependencies: {\n bufferutil: \"^4.0.1\",\n debug: \"^2.2.0\",\n \"es5-ext\": \"^0.10.63\",\n \"typedarray-to-buffer\": \"^3.1.5\",\n \"utf-8-validate\": \"^5.0.2\",\n yaeti: \"^0.0.6\"\n },\n devDependencies: {\n \"buffer-equal\": \"^1.0.0\",\n gulp: \"^4.0.2\",\n \"gulp-jshint\": \"^2.0.4\",\n \"jshint-stylish\": \"^2.2.1\",\n jshint: \"^2.0.0\",\n tape: \"^4.9.1\"\n },\n config: {\n verbose: false\n },\n scripts: {\n test: \"tape test/unit/*.js\",\n gulp: \"gulp\"\n },\n main: \"index\",\n directories: {\n lib: \"./lib\"\n },\n browser: \"lib/browser.js\",\n license: \"Apache-2.0\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/lib/version.js\n var require_version27 = __commonJS({\n \"../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/lib/version.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = require_package2().version;\n }\n });\n\n // ../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/lib/browser.js\n var require_browser = __commonJS({\n \"../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/lib/browser.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _globalThis;\n if (typeof globalThis === \"object\") {\n _globalThis = globalThis;\n } else {\n try {\n _globalThis = require_global();\n } catch (error) {\n } finally {\n if (!_globalThis && typeof window !== \"undefined\") {\n _globalThis = window;\n }\n if (!_globalThis) {\n throw new Error(\"Could not determine global this\");\n }\n }\n }\n var NativeWebSocket = _globalThis.WebSocket || _globalThis.MozWebSocket;\n var websocket_version = require_version27();\n function W3CWebSocket(uri, protocols) {\n var native_instance;\n if (protocols) {\n native_instance = new NativeWebSocket(uri, protocols);\n } else {\n native_instance = new NativeWebSocket(uri);\n }\n return native_instance;\n }\n if (NativeWebSocket) {\n [\"CONNECTING\", \"OPEN\", \"CLOSING\", \"CLOSED\"].forEach(function(prop) {\n Object.defineProperty(W3CWebSocket, prop, {\n get: function() {\n return NativeWebSocket[prop];\n }\n });\n });\n }\n module.exports = {\n \"w3cwebsocket\": NativeWebSocket ? W3CWebSocket : null,\n \"version\": websocket_version\n };\n }\n });\n\n // ../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/alchemy-websocket-provider-bdfaf8f9.js\n var alchemy_websocket_provider_bdfaf8f9_exports = {};\n __export(alchemy_websocket_provider_bdfaf8f9_exports, {\n AlchemyWebSocketProvider: () => AlchemyWebSocketProvider\n });\n function toNewHeadsEvent(head) {\n const result = Object.assign({}, head);\n delete result.totalDifficulty;\n delete result.transactions;\n delete result.uncles;\n return result;\n }\n function dedupeNewHeads(events) {\n return dedupe(events, (event) => event.hash);\n }\n function dedupeLogs(events) {\n return dedupe(events, (event) => `${event.blockHash}/${event.logIndex}`);\n }\n function dedupe(items, getKey) {\n const keysSeen = /* @__PURE__ */ new Set();\n const result = [];\n items.forEach((item) => {\n const key = getKey(item);\n if (!keysSeen.has(key)) {\n keysSeen.add(key);\n result.push(item);\n }\n });\n return result;\n }\n function throwIfCancelled(isCancelled) {\n if (isCancelled()) {\n throw CANCELLED;\n }\n }\n function getWebsocketConstructor() {\n return isNodeEnvironment() ? require_browser().w3cwebsocket : WebSocket;\n }\n function isNodeEnvironment() {\n return typeof process_exports !== \"undefined\" && process_exports != null && process_exports.versions != null && process_exports.versions.node != null;\n }\n function makeCancelToken() {\n let cancelled = false;\n return { cancel: () => cancelled = true, isCancelled: () => cancelled };\n }\n function withBackoffRetries(f6, retryCount, shouldRetry2 = () => true) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let nextWaitTime = 0;\n let i3 = 0;\n while (true) {\n try {\n return yield f6();\n } catch (error) {\n i3++;\n if (i3 >= retryCount || !shouldRetry2(error)) {\n throw error;\n }\n yield delay(nextWaitTime);\n if (!shouldRetry2(error)) {\n throw error;\n }\n nextWaitTime = nextWaitTime === 0 ? MIN_RETRY_DELAY : Math.min(MAX_RETRY_DELAY, RETRY_BACKOFF_FACTOR * nextWaitTime);\n }\n }\n });\n }\n function delay(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n function withTimeout2(promise, ms) {\n return Promise.race([\n promise,\n new Promise((_2, reject) => setTimeout(() => reject(new Error(\"Timeout\")), ms))\n ]);\n }\n function getNewHeadsBlockNumber(event) {\n return fromHex3(event.number);\n }\n function getLogsBlockNumber(event) {\n return fromHex3(event.blockNumber);\n }\n function isResponse2(message) {\n return Array.isArray(message) || message.jsonrpc === \"2.0\" && message.id !== void 0;\n }\n function isSubscriptionEvent(message) {\n return !isResponse2(message);\n }\n function addToNewHeadsEventsBuffer(pastEvents, event) {\n addToPastEventsBuffer(pastEvents, event, getNewHeadsBlockNumber);\n }\n function addToLogsEventsBuffer(pastEvents, event) {\n addToPastEventsBuffer(pastEvents, event, getLogsBlockNumber);\n }\n function addToPastEventsBuffer(pastEvents, event, getBlockNumber2) {\n const currentBlockNumber = getBlockNumber2(event);\n const firstGoodIndex = pastEvents.findIndex((e2) => getBlockNumber2(e2) > currentBlockNumber - RETAINED_EVENT_BLOCK_COUNT);\n if (firstGoodIndex === -1) {\n pastEvents.length = 0;\n } else {\n pastEvents.splice(0, firstGoodIndex);\n }\n pastEvents.push(event);\n }\n var import_sturdy_websocket, import_bignumber, import_networks2, import_providers2, MAX_BACKFILL_BLOCKS, WebsocketBackfiller, CANCELLED, HEARTBEAT_INTERVAL, HEARTBEAT_WAIT_TIME, BACKFILL_TIMEOUT, BACKFILL_RETRIES, RETAINED_EVENT_BLOCK_COUNT, AlchemyWebSocketProvider, MIN_RETRY_DELAY, RETRY_BACKOFF_FACTOR, MAX_RETRY_DELAY;\n var init_alchemy_websocket_provider_bdfaf8f9 = __esm({\n \"../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/alchemy-websocket-provider-bdfaf8f9.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_index_f73a5f29();\n import_sturdy_websocket = __toESM(require_dist());\n import_bignumber = __toESM(require_lib3());\n import_networks2 = __toESM(require_lib27());\n import_providers2 = __toESM(require_lib29());\n init_alchemy_provider_6bbed8a2();\n MAX_BACKFILL_BLOCKS = 120;\n WebsocketBackfiller = class {\n constructor(provider) {\n this.provider = provider;\n this.maxBackfillBlocks = MAX_BACKFILL_BLOCKS;\n }\n /**\n * Runs backfill for `newHeads` events.\n *\n * @param isCancelled Whether the backfill request is cancelled.\n * @param previousHeads Previous head requests that were sent.\n * @param fromBlockNumber The block number to start backfilling from.\n * @returns A list of `newHeads` events that were sent since the last backfill.\n */\n getNewHeadsBackfill(isCancelled, previousHeads, fromBlockNumber) {\n return __awaiter$1(this, void 0, void 0, function* () {\n throwIfCancelled(isCancelled);\n const toBlockNumber = yield this.getBlockNumber();\n throwIfCancelled(isCancelled);\n if (previousHeads.length === 0) {\n return this.getHeadEventsInRange(Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1, toBlockNumber + 1);\n }\n const lastSeenBlockNumber = fromHex3(previousHeads[previousHeads.length - 1].number);\n const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1;\n if (lastSeenBlockNumber <= minBlockNumber) {\n return this.getHeadEventsInRange(minBlockNumber, toBlockNumber + 1);\n }\n const reorgHeads = yield this.getReorgHeads(isCancelled, previousHeads);\n throwIfCancelled(isCancelled);\n const intermediateHeads = yield this.getHeadEventsInRange(lastSeenBlockNumber + 1, toBlockNumber + 1);\n throwIfCancelled(isCancelled);\n return [...reorgHeads, ...intermediateHeads];\n });\n }\n /**\n * Runs backfill for `logs` events.\n *\n * @param isCancelled Whether the backfill request is cancelled.\n * @param filter The filter object that accompanies a logs subscription.\n * @param previousLogs Previous log requests that were sent.\n * @param fromBlockNumber The block number to start backfilling from.\n */\n getLogsBackfill(isCancelled, filter2, previousLogs, fromBlockNumber) {\n return __awaiter$1(this, void 0, void 0, function* () {\n throwIfCancelled(isCancelled);\n const toBlockNumber = yield this.getBlockNumber();\n throwIfCancelled(isCancelled);\n if (previousLogs.length === 0) {\n return this.getLogsInRange(filter2, Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1, toBlockNumber + 1);\n }\n const lastSeenBlockNumber = fromHex3(previousLogs[previousLogs.length - 1].blockNumber);\n const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1;\n if (lastSeenBlockNumber < minBlockNumber) {\n return this.getLogsInRange(filter2, minBlockNumber, toBlockNumber + 1);\n }\n const commonAncestor = yield this.getCommonAncestor(isCancelled, previousLogs);\n throwIfCancelled(isCancelled);\n const removedLogs = previousLogs.filter((log) => fromHex3(log.blockNumber) > commonAncestor.blockNumber).map((log) => Object.assign(Object.assign({}, log), { removed: true }));\n const fromBlockInclusive = commonAncestor.blockNumber === Number.NEGATIVE_INFINITY ? fromHex3(previousLogs[0].blockNumber) : commonAncestor.blockNumber;\n let addedLogs = yield this.getLogsInRange(filter2, fromBlockInclusive, toBlockNumber + 1);\n addedLogs = addedLogs.filter((log) => log && (fromHex3(log.blockNumber) > commonAncestor.blockNumber || fromHex3(log.logIndex) > commonAncestor.logIndex));\n throwIfCancelled(isCancelled);\n return [...removedLogs, ...addedLogs];\n });\n }\n /**\n * Sets a new max backfill blocks. VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n setMaxBackfillBlock(newMax) {\n this.maxBackfillBlocks = newMax;\n }\n /**\n * Gets the current block number as a number.\n *\n * @private\n */\n getBlockNumber() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const blockNumberHex = yield this.provider.send(\"eth_blockNumber\");\n return fromHex3(blockNumberHex);\n });\n }\n /**\n * Gets all `newHead` events in the provided range. Note that the returned\n * heads do not include re-orged heads. Use {@link getReorgHeads} to find heads\n * that were part of a re-org.\n *\n * @private\n */\n getHeadEventsInRange(fromBlockInclusive, toBlockExclusive) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (fromBlockInclusive >= toBlockExclusive) {\n return [];\n }\n const batchParts = [];\n for (let i3 = fromBlockInclusive; i3 < toBlockExclusive; i3++) {\n batchParts.push({\n method: \"eth_getBlockByNumber\",\n params: [toHex2(i3), false]\n });\n }\n const blockHeads = yield this.provider.sendBatch(batchParts);\n return blockHeads.map(toNewHeadsEvent);\n });\n }\n /**\n * Returns all heads that were part of a reorg event.\n *\n * @private\n */\n getReorgHeads(isCancelled, previousHeads) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const result = [];\n for (let i3 = previousHeads.length - 1; i3 >= 0; i3--) {\n const oldEvent = previousHeads[i3];\n const blockHead = yield this.getBlockByNumber(fromHex3(oldEvent.number));\n throwIfCancelled(isCancelled);\n if (oldEvent.hash === blockHead.hash) {\n break;\n }\n result.push(toNewHeadsEvent(blockHead));\n }\n return result.reverse();\n });\n }\n /**\n * Simple wrapper around `eth_getBlockByNumber` that returns the complete\n * block information for the provided block number.\n *\n * @private\n */\n getBlockByNumber(blockNumber) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return this.provider.send(\"eth_getBlockByNumber\", [\n toHex2(blockNumber),\n false\n ]);\n });\n }\n /**\n * Given a list of previous log events, finds the common block number from the\n * logs that matches the block head.\n *\n * This can be used to identify which logs are part of a re-org.\n *\n * Returns 1 less than the oldest log's block number if no common ancestor was found.\n *\n * @private\n */\n getCommonAncestor(isCancelled, previousLogs) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let blockHead = yield this.getBlockByNumber(fromHex3(previousLogs[previousLogs.length - 1].blockNumber));\n throwIfCancelled(isCancelled);\n for (let i3 = previousLogs.length - 1; i3 >= 0; i3--) {\n const oldLog = previousLogs[i3];\n if (oldLog.blockNumber !== blockHead.number) {\n blockHead = yield this.getBlockByNumber(fromHex3(oldLog.blockNumber));\n }\n if (oldLog.blockHash === blockHead.hash) {\n return {\n blockNumber: fromHex3(oldLog.blockNumber),\n logIndex: fromHex3(oldLog.logIndex)\n };\n }\n }\n return {\n blockNumber: Number.NEGATIVE_INFINITY,\n logIndex: Number.NEGATIVE_INFINITY\n };\n });\n }\n /**\n * Gets all `logs` events in the provided range. Note that the returned logs\n * do not include removed logs.\n *\n * @private\n */\n getLogsInRange(filter2, fromBlockInclusive, toBlockExclusive) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (fromBlockInclusive >= toBlockExclusive) {\n return [];\n }\n const rangeFilter = Object.assign(Object.assign({}, filter2), { fromBlock: toHex2(fromBlockInclusive), toBlock: toHex2(toBlockExclusive - 1) });\n return this.provider.send(\"eth_getLogs\", [rangeFilter]);\n });\n }\n };\n CANCELLED = new Error(\"Cancelled\");\n HEARTBEAT_INTERVAL = 3e4;\n HEARTBEAT_WAIT_TIME = 1e4;\n BACKFILL_TIMEOUT = 6e4;\n BACKFILL_RETRIES = 5;\n RETAINED_EVENT_BLOCK_COUNT = 10;\n AlchemyWebSocketProvider = class extends import_providers2.WebSocketProvider {\n /** @internal */\n constructor(config2, wsConstructor) {\n var _a2;\n const apiKey = AlchemyProvider.getApiKey(config2.apiKey);\n const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config2.network);\n const connection = AlchemyProvider.getAlchemyConnectionInfo(alchemyNetwork, apiKey, \"wss\");\n const protocol = `alchemy-sdk-${VERSION4}`;\n const ws = new import_sturdy_websocket.default((_a2 = config2.url) !== null && _a2 !== void 0 ? _a2 : connection.url, protocol, {\n wsConstructor: wsConstructor !== null && wsConstructor !== void 0 ? wsConstructor : getWebsocketConstructor()\n });\n const ethersNetwork = EthersNetwork[alchemyNetwork];\n super(ws, ethersNetwork !== null && ethersNetwork !== void 0 ? ethersNetwork : void 0);\n this._events = [];\n this.virtualSubscriptionsById = /* @__PURE__ */ new Map();\n this.virtualIdsByPhysicalId = /* @__PURE__ */ new Map();\n this.handleMessage = (event) => {\n const message = JSON.parse(event.data);\n if (!isSubscriptionEvent(message)) {\n return;\n }\n const physicalId = message.params.subscription;\n const virtualId = this.virtualIdsByPhysicalId.get(physicalId);\n if (!virtualId) {\n return;\n }\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (subscription.method !== \"eth_subscribe\") {\n return;\n }\n switch (subscription.params[0]) {\n case \"newHeads\": {\n const newHeadsSubscription = subscription;\n const newHeadsMessage = message;\n const { isBackfilling, backfillBuffer } = newHeadsSubscription;\n const { result } = newHeadsMessage.params;\n if (isBackfilling) {\n addToNewHeadsEventsBuffer(backfillBuffer, result);\n } else if (physicalId !== virtualId) {\n this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber);\n } else {\n this.rememberEvent(virtualId, result, getNewHeadsBlockNumber);\n }\n break;\n }\n case \"logs\": {\n const logsSubscription = subscription;\n const logsMessage = message;\n const { isBackfilling, backfillBuffer } = logsSubscription;\n const { result } = logsMessage.params;\n if (isBackfilling) {\n addToLogsEventsBuffer(backfillBuffer, result);\n } else if (virtualId !== physicalId) {\n this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber);\n } else {\n this.rememberEvent(virtualId, result, getLogsBlockNumber);\n }\n break;\n }\n default:\n if (physicalId !== virtualId) {\n const { result } = message.params;\n this.emitEvent(virtualId, result);\n }\n }\n };\n this.handleReopen = () => {\n this.virtualIdsByPhysicalId.clear();\n const { cancel, isCancelled } = makeCancelToken();\n this.cancelBackfill = cancel;\n for (const subscription of this.virtualSubscriptionsById.values()) {\n void (() => __awaiter$1(this, void 0, void 0, function* () {\n try {\n yield this.resubscribeAndBackfill(isCancelled, subscription);\n } catch (error) {\n if (!isCancelled()) {\n console.error(`Error while backfilling \"${subscription.params[0]}\" subscription. Some events may be missing.`, error);\n }\n }\n }))();\n }\n this.startHeartbeat();\n };\n this.stopHeartbeatAndBackfill = () => {\n if (this.heartbeatIntervalId != null) {\n clearInterval(this.heartbeatIntervalId);\n this.heartbeatIntervalId = void 0;\n }\n this.cancelBackfill();\n };\n this.apiKey = apiKey;\n this.backfiller = new WebsocketBackfiller(this);\n this.addSocketListeners();\n this.startHeartbeat();\n this.cancelBackfill = noop3;\n }\n /**\n * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js.\n *\n * This override allows the SDK to set the provider's network to values not\n * yet supported by ethers.js.\n *\n * @internal\n * @override\n */\n static getNetwork(network) {\n if (typeof network === \"string\" && network in CustomNetworks) {\n return CustomNetworks[network];\n }\n return (0, import_networks2.getNetwork)(network);\n }\n /**\n * Overridden implementation of ethers that includes Alchemy based subscriptions.\n *\n * @param eventName Event to subscribe to\n * @param listener The listener function to call when the event is triggered.\n * @override\n * @public\n */\n // TODO: Override `Listener` type to get type autocompletions.\n on(eventName, listener) {\n return this._addEventListener(eventName, listener, false);\n }\n /**\n * Overridden implementation of ethers that includes Alchemy based\n * subscriptions. Adds a listener to the triggered for only the next\n * {@link eventName} event, after which it will be removed.\n *\n * @param eventName Event to subscribe to\n * @param listener The listener function to call when the event is triggered.\n * @override\n * @public\n */\n // TODO: Override `Listener` type to get type autocompletions.\n once(eventName, listener) {\n return this._addEventListener(eventName, listener, true);\n }\n /**\n * Removes the provided {@link listener} for the {@link eventName} event. If no\n * listener is provided, all listeners for the event will be removed.\n *\n * @param eventName Event to unlisten to.\n * @param listener The listener function to remove.\n * @override\n * @public\n */\n off(eventName, listener) {\n if (isAlchemyEvent(eventName)) {\n return this._off(eventName, listener);\n } else {\n return super.off(eventName, listener);\n }\n }\n /**\n * Remove all listeners for the provided {@link eventName} event. If no event\n * is provided, all events and their listeners are removed.\n *\n * @param eventName The event to remove all listeners for.\n * @override\n * @public\n */\n removeAllListeners(eventName) {\n if (eventName !== void 0 && isAlchemyEvent(eventName)) {\n return this._removeAllListeners(eventName);\n } else {\n return super.removeAllListeners(eventName);\n }\n }\n /**\n * Returns the number of listeners for the provided {@link eventName} event. If\n * no event is provided, the total number of listeners for all events is returned.\n *\n * @param eventName The event to get the number of listeners for.\n * @public\n * @override\n */\n listenerCount(eventName) {\n if (eventName !== void 0 && isAlchemyEvent(eventName)) {\n return this._listenerCount(eventName);\n } else {\n return super.listenerCount(eventName);\n }\n }\n /**\n * Returns an array of listeners for the provided {@link eventName} event. If\n * no event is provided, all listeners will be included.\n *\n * @param eventName The event to get the listeners for.\n * @public\n * @override\n */\n listeners(eventName) {\n if (eventName !== void 0 && isAlchemyEvent(eventName)) {\n return this._listeners(eventName);\n } else {\n return super.listeners(eventName);\n }\n }\n /**\n * Overrides the method in `BaseProvider` in order to properly format the\n * Alchemy subscription events.\n *\n * @internal\n * @override\n */\n _addEventListener(eventName, listener, once2) {\n if (isAlchemyEvent(eventName)) {\n verifyAlchemyEventName(eventName);\n const event = new EthersEvent(getAlchemyEventTag(eventName), listener, once2);\n this._events.push(event);\n this._startEvent(event);\n return this;\n } else {\n return super._addEventListener(eventName, listener, once2);\n }\n }\n /**\n * Overrides the `_startEvent()` method in ethers.js's\n * {@link WebSocketProvider} to include additional alchemy methods.\n *\n * @param event\n * @override\n * @internal\n */\n _startEvent(event) {\n const customLogicTypes = [...ALCHEMY_EVENT_TYPES, \"block\", \"filter\"];\n if (customLogicTypes.includes(event.type)) {\n this.customStartEvent(event);\n } else {\n super._startEvent(event);\n }\n }\n /**\n * Overridden from ethers.js's {@link WebSocketProvider}\n *\n * Modified in order to add mappings for backfilling.\n *\n * @internal\n * @override\n */\n _subscribe(tag, param, processFunc, event) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let subIdPromise = this._subIds[tag];\n const startingBlockNumber = yield this.getBlockNumber();\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then((param2) => {\n return this.send(\"eth_subscribe\", param2);\n });\n this._subIds[tag] = subIdPromise;\n }\n const subId = yield subIdPromise;\n const resolvedParams = yield Promise.all(param);\n this.virtualSubscriptionsById.set(subId, {\n event,\n method: \"eth_subscribe\",\n params: resolvedParams,\n startingBlockNumber,\n virtualId: subId,\n physicalId: subId,\n sentEvents: [],\n isBackfilling: false,\n backfillBuffer: []\n });\n this.virtualIdsByPhysicalId.set(subId, subId);\n this._subs[subId] = { tag, processFunc };\n });\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @internal\n * @override\n */\n emit(eventName, ...args) {\n if (isAlchemyEvent(eventName)) {\n let result = false;\n const stopped = [];\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) {\n return true;\n }\n setTimeout(() => {\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((event) => {\n this._stopEvent(event);\n });\n return result;\n } else {\n return super.emit(eventName, ...args);\n }\n }\n /** @internal */\n sendBatch(parts) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let nextId = 0;\n const payload = parts.map(({ method, params }) => {\n return {\n method,\n params,\n jsonrpc: \"2.0\",\n id: `alchemy-sdk:${nextId++}`\n };\n });\n return this.sendBatchConcurrently(payload);\n });\n }\n /** @override */\n destroy() {\n this.removeSocketListeners();\n this.stopHeartbeatAndBackfill();\n return super.destroy();\n }\n /**\n * Overrides the ether's `isCommunityResource()` method. Returns true if the\n * current api key is the default key.\n *\n * @override\n */\n isCommunityResource() {\n return this.apiKey === DEFAULT_ALCHEMY_API_KEY;\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `WebSocketProvider._stopEvent()`.\n *\n * This method is copied over directly in order to support Alchemy's\n * subscription type by allowing the provider to properly stop Alchemy's\n * subscription events.\n *\n * @internal\n */\n _stopEvent(event) {\n let tag = event.tag;\n if (ALCHEMY_EVENT_TYPES.includes(event.type)) {\n if (this._events.filter((e2) => ALCHEMY_EVENT_TYPES.includes(e2.type)).length) {\n return;\n }\n } else if (event.type === \"tx\") {\n if (this._events.filter((e2) => e2.type === \"tx\").length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n return;\n }\n const subId = this._subIds[tag];\n if (!subId) {\n return;\n }\n delete this._subIds[tag];\n void subId.then((subId2) => {\n if (!this._subs[subId2]) {\n return;\n }\n delete this._subs[subId2];\n void this.send(\"eth_unsubscribe\", [subId2]);\n });\n }\n /** @internal */\n addSocketListeners() {\n this._websocket.addEventListener(\"message\", this.handleMessage);\n this._websocket.addEventListener(\"reopen\", this.handleReopen);\n this._websocket.addEventListener(\"down\", this.stopHeartbeatAndBackfill);\n }\n /** @internal */\n removeSocketListeners() {\n this._websocket.removeEventListener(\"message\", this.handleMessage);\n this._websocket.removeEventListener(\"reopen\", this.handleReopen);\n this._websocket.removeEventListener(\"down\", this.stopHeartbeatAndBackfill);\n }\n /**\n * Reopens the backfill based on\n *\n * @param isCancelled\n * @param subscription\n * @internal\n */\n resubscribeAndBackfill(isCancelled, subscription) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const { virtualId, method, params, sentEvents, backfillBuffer, startingBlockNumber } = subscription;\n subscription.isBackfilling = true;\n backfillBuffer.length = 0;\n try {\n const physicalId = yield this.send(method, params);\n throwIfCancelled(isCancelled);\n subscription.physicalId = physicalId;\n this.virtualIdsByPhysicalId.set(physicalId, virtualId);\n switch (params[0]) {\n case \"newHeads\": {\n const backfillEvents = yield withBackoffRetries(() => withTimeout2(this.backfiller.getNewHeadsBackfill(isCancelled, sentEvents, startingBlockNumber), BACKFILL_TIMEOUT), BACKFILL_RETRIES, () => !isCancelled());\n throwIfCancelled(isCancelled);\n const events = dedupeNewHeads([...backfillEvents, ...backfillBuffer]);\n events.forEach((event) => this.emitNewHeadsEvent(virtualId, event));\n break;\n }\n case \"logs\": {\n const filter2 = params[1] || {};\n const backfillEvents = yield withBackoffRetries(() => withTimeout2(this.backfiller.getLogsBackfill(isCancelled, filter2, sentEvents, startingBlockNumber), BACKFILL_TIMEOUT), BACKFILL_RETRIES, () => !isCancelled());\n throwIfCancelled(isCancelled);\n const events = dedupeLogs([...backfillEvents, ...backfillBuffer]);\n events.forEach((event) => this.emitLogsEvent(virtualId, event));\n break;\n }\n default:\n break;\n }\n } finally {\n subscription.isBackfilling = false;\n backfillBuffer.length = 0;\n }\n });\n }\n /** @internal */\n emitNewHeadsEvent(virtualId, result) {\n this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber);\n }\n /** @internal */\n emitLogsEvent(virtualId, result) {\n this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber);\n }\n /**\n * Emits an event to consumers, but also remembers it in its subscriptions's\n * `sentEvents` buffer so that we can detect re-orgs if the connection drops\n * and needs to be reconnected.\n *\n * @internal\n */\n emitAndRememberEvent(virtualId, result, getBlockNumber2) {\n this.rememberEvent(virtualId, result, getBlockNumber2);\n this.emitEvent(virtualId, result);\n }\n emitEvent(virtualId, result) {\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (!subscription) {\n return;\n }\n this.emitGenericEvent(subscription, result);\n }\n /** @internal */\n rememberEvent(virtualId, result, getBlockNumber2) {\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (!subscription) {\n return;\n }\n addToPastEventsBuffer(subscription.sentEvents, Object.assign({}, result), getBlockNumber2);\n }\n /** @internal */\n emitGenericEvent(subscription, result) {\n const emitFunction = this.emitProcessFn(subscription.event);\n emitFunction(result);\n }\n /**\n * Starts a heartbeat that pings the websocket server periodically to ensure\n * that the connection stays open.\n *\n * @internal\n */\n startHeartbeat() {\n if (this.heartbeatIntervalId != null) {\n return;\n }\n this.heartbeatIntervalId = setInterval(() => __awaiter$1(this, void 0, void 0, function* () {\n try {\n yield withTimeout2(this.send(\"net_version\"), HEARTBEAT_WAIT_TIME);\n } catch (_a2) {\n this._websocket.reconnect();\n }\n }), HEARTBEAT_INTERVAL);\n }\n /**\n * This method sends the batch concurrently as individual requests rather than\n * as a batch, which was the original implementation. The original batch logic\n * is preserved in this implementation in order for faster porting.\n *\n * @param payload\n * @internal\n */\n // TODO(cleanup): Refactor and remove usages of `sendBatch()`.\n // TODO(errors): Use allSettled() once we have more error handling.\n sendBatchConcurrently(payload) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return Promise.all(payload.map((req) => this.send(req.method, req.params)));\n });\n }\n /** @internal */\n customStartEvent(event) {\n if (event.type === ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n const { fromAddress, toAddress, hashesOnly } = event;\n void this._subscribe(event.tag, [\n AlchemySubscription.PENDING_TRANSACTIONS,\n { fromAddress, toAddress, hashesOnly }\n ], this.emitProcessFn(event), event);\n } else if (event.type === ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n const { addresses: addresses4, includeRemoved, hashesOnly } = event;\n void this._subscribe(event.tag, [\n AlchemySubscription.MINED_TRANSACTIONS,\n { addresses: addresses4, includeRemoved, hashesOnly }\n ], this.emitProcessFn(event), event);\n } else if (event.type === \"block\") {\n void this._subscribe(\"block\", [\"newHeads\"], this.emitProcessFn(event), event);\n } else if (event.type === \"filter\") {\n void this._subscribe(event.tag, [\"logs\", this._getFilter(event.filter)], this.emitProcessFn(event), event);\n }\n }\n /** @internal */\n emitProcessFn(event) {\n switch (event.type) {\n case ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE:\n return (result) => this.emit({\n method: AlchemySubscription.PENDING_TRANSACTIONS,\n fromAddress: event.fromAddress,\n toAddress: event.toAddress,\n hashesOnly: event.hashesOnly\n }, result);\n case ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE:\n return (result) => this.emit({\n method: AlchemySubscription.MINED_TRANSACTIONS,\n addresses: event.addresses,\n includeRemoved: event.includeRemoved,\n hashesOnly: event.hashesOnly\n }, result);\n case \"block\":\n return (result) => {\n const blockNumber = import_bignumber.BigNumber.from(result.number).toNumber();\n this._emitted.block = blockNumber;\n this.emit(\"block\", blockNumber);\n };\n case \"filter\":\n return (result) => {\n if (result.removed == null) {\n result.removed = false;\n }\n this.emit(event.filter, this.formatter.filterLog(result));\n };\n default:\n throw new Error(\"Invalid event type to `emitProcessFn()`\");\n }\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.off()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n _off(eventName, listener) {\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n const stopped = [];\n let found = false;\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter((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((event) => {\n this._stopEvent(event);\n });\n return this;\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n _removeAllListeners(eventName) {\n let stopped = [];\n if (eventName == null) {\n stopped = this._events;\n this._events = [];\n } else {\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n stopped.forEach((event) => {\n this._stopEvent(event);\n });\n return this;\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.listenerCount()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n _listenerCount(eventName) {\n if (!eventName) {\n return this._events.length;\n }\n const eventTag = getAlchemyEventTag(eventName);\n return this._events.filter((event) => {\n return event.tag === eventTag;\n }).length;\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.listeners()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n _listeners(eventName) {\n if (eventName == null) {\n return this._events.map((event) => event.listener);\n }\n const eventTag = getAlchemyEventTag(eventName);\n return this._events.filter((event) => event.tag === eventTag).map((event) => event.listener);\n }\n };\n MIN_RETRY_DELAY = 1e3;\n RETRY_BACKOFF_FACTOR = 2;\n MAX_RETRY_DELAY = 3e4;\n }\n });\n\n // ../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/index-f73a5f29.js\n function __awaiter$1(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __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 __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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function verb(n2) {\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 }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e2) {\n settle2(q3[0][3], e2);\n }\n }\n function step(r2) {\n r2.value instanceof __await2 ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle2(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 settle2(f6, v2) {\n if (f6(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\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), settle2(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle2(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v3) {\n resolve({ value: v3, done: d5 });\n }, reject);\n }\n }\n function getAlchemyHttpUrl(network, apiKey) {\n return `https://${network}.g.alchemy.com/v2/${apiKey}`;\n }\n function getAlchemyNftHttpUrl(network, apiKey) {\n return `https://${network}.g.alchemy.com/nft/v3/${apiKey}`;\n }\n function getAlchemyWsUrl(network, apiKey) {\n return `wss://${network}.g.alchemy.com/v2/${apiKey}`;\n }\n function getAlchemyWebhookHttpUrl() {\n return \"https://dashboard.alchemy.com/api\";\n }\n function getPricesBaseUrl(apiKey) {\n return `https://api.g.alchemy.com/prices/v1/${apiKey}`;\n }\n function getDataBaseUrl(apiKey) {\n return `https://api.g.alchemy.com/data/v1/${apiKey}`;\n }\n function noop3() {\n }\n function _checkNormalize2() {\n try {\n const missing = [];\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form2) => {\n try {\n if (\"test\".normalize(form2) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n } catch (error) {\n missing.push(form2);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.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 function defineReadOnly(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value,\n writable: false\n });\n }\n function resolveProperties2(object) {\n return __awaiter2(this, void 0, void 0, function* () {\n const promises = Object.keys(object).map((key) => {\n const value = object[key];\n return Promise.resolve(value).then((v2) => ({ key, value: v2 }));\n });\n const results = yield Promise.all(promises);\n return results.reduce((accum, result) => {\n accum[result.key] = result.value;\n return accum;\n }, {});\n });\n }\n function _isFrozen(object) {\n if (object === void 0 || object === null || opaque[typeof object]) {\n return true;\n }\n if (Array.isArray(object) || typeof object === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n const keys = Object.keys(object);\n for (let i3 = 0; i3 < keys.length; i3++) {\n let value = null;\n try {\n value = object[keys[i3]];\n } catch (error) {\n continue;\n }\n if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger2.throwArgumentError(`Cannot deepCopy ${typeof object}`, \"object\", object);\n }\n function _deepCopy(object) {\n if (_isFrozen(object)) {\n return object;\n }\n if (Array.isArray(object)) {\n return Object.freeze(object.map((item) => deepCopy(item)));\n }\n if (typeof object === \"object\") {\n const result = {};\n for (const key in object) {\n const value = object[key];\n if (value === void 0) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger2.throwArgumentError(`Cannot deepCopy ${typeof object}`, \"object\", object);\n }\n function deepCopy(object) {\n return _deepCopy(object);\n }\n function fromHex3(hexString) {\n return import_bignumber2.BigNumber.from(hexString).toNumber();\n }\n function toHex2(num2) {\n return (0, import_bytes5.hexValue)(num2);\n }\n function formatBlock2(block) {\n if (typeof block === \"string\") {\n return block;\n } else if (Number.isInteger(block)) {\n return toHex2(block);\n }\n return block.toString();\n }\n function stringToEnum(x4, enumb) {\n return Object.values(enumb).includes(x4) ? x4 : null;\n }\n function getNftContractForNftFromRaw(rawNftContract) {\n return nullsToUndefined(Object.assign(Object.assign({}, getNftContractFromRaw(rawNftContract)), { spamClassifications: rawNftContract.spamClassifications.map(parseNftSpamClassification) }));\n }\n function getNftContractsForOwnerFromRaw(rawNftContract) {\n return nullsToUndefined(Object.assign(Object.assign({}, getNftContractFromRaw(rawNftContract)), { displayNft: rawNftContract.displayNft, image: rawNftContract.image, totalBalance: rawNftContract.totalBalance, numDistinctTokensOwned: rawNftContract.numDistinctTokensOwned, isSpam: rawNftContract.isSpam }));\n }\n function getNftContractFromRaw(rawNftContract) {\n var _a2;\n return nullsToUndefined(Object.assign(Object.assign({}, rawNftContract), { tokenType: parseNftTokenType(rawNftContract.tokenType), openSeaMetadata: Object.assign(Object.assign({}, rawNftContract.openSeaMetadata), { safelistRequestStatus: ((_a2 = rawNftContract.openSeaMetadata) === null || _a2 === void 0 ? void 0 : _a2.safelistRequestStatus) ? stringToEnum(rawNftContract.openSeaMetadata.safelistRequestStatus, OpenSeaSafelistRequestStatus) : null }) }));\n }\n function getNftCollectionFromRaw(rawNftCollection) {\n return nullsToUndefined(Object.assign(Object.assign({}, rawNftCollection), { floorPrice: Object.assign(Object.assign({}, rawNftCollection.floorPrice), { marketplace: parseNftCollectionMarketplace(rawNftCollection.floorPrice.marketplace) }) }));\n }\n function getBaseNftFromRaw(rawBaseNft, contractAddress) {\n return {\n contractAddress: contractAddress ? contractAddress : rawBaseNft.contractAddress,\n tokenId: rawBaseNft.tokenId\n };\n }\n function getNftFromRaw(rawNft) {\n return nullsToUndefined(Object.assign(Object.assign({}, rawNft), { contract: getNftContractForNftFromRaw(rawNft.contract), tokenType: parseNftTokenType(rawNft.tokenType), acquiredAt: rawNft.acquiredAt, collection: rawNft.collection, mint: rawNft.mint }));\n }\n function getNftSalesFromRaw(rawNftSales) {\n return nullsToUndefined({\n nftSales: rawNftSales.nftSales.map((rawNftSale) => Object.assign(Object.assign({}, rawNftSale), { marketplace: parseNftSaleMarketplace(rawNftSale.marketplace), taker: parseNftTaker(rawNftSale.taker) })),\n validAt: rawNftSales.validAt,\n pageKey: rawNftSales.pageKey\n });\n }\n function parseNftSaleMarketplace(marketplace) {\n switch (marketplace) {\n case \"looksrare\":\n return NftSaleMarketplace.LOOKSRARE;\n case \"seaport\":\n return NftSaleMarketplace.SEAPORT;\n case \"x2y2\":\n return NftSaleMarketplace.X2Y2;\n case \"wyvern\":\n return NftSaleMarketplace.WYVERN;\n case \"cryptopunks\":\n return NftSaleMarketplace.CRYPTOPUNKS;\n case \"blur\":\n return NftSaleMarketplace.BLUR;\n default:\n return NftSaleMarketplace.UNKNOWN;\n }\n }\n function parseNftCollectionMarketplace(marketplace) {\n switch (marketplace) {\n case \"OpenSea\":\n return NftCollectionMarketplace.OPENSEA;\n default:\n return void 0;\n }\n }\n function parseNftTaker(taker) {\n switch (taker.toLowerCase()) {\n case \"buyer\":\n return NftSaleTakerType.BUYER;\n case \"seller\":\n return NftSaleTakerType.SELLER;\n default:\n throw new Error(`Unsupported NftSaleTakerType ${taker}`);\n }\n }\n function parseNftSpamClassification(s4) {\n const res = stringToEnum(s4, NftSpamClassification);\n if (res == null) {\n return NftSpamClassification.Unknown;\n }\n return res;\n }\n function parseNftTokenType(tokenType) {\n switch (tokenType) {\n case \"erc721\":\n case \"ERC721\":\n return NftTokenType.ERC721;\n case \"erc1155\":\n case \"ERC1155\":\n return NftTokenType.ERC1155;\n case \"no_supported_nft_standard\":\n case \"NO_SUPPORTED_NFT_STANDARD\":\n return NftTokenType.NO_SUPPORTED_NFT_STANDARD;\n case \"not_a_contract\":\n case \"NOT_A_CONTRACT\":\n return NftTokenType.NOT_A_CONTRACT;\n default:\n return NftTokenType.UNKNOWN;\n }\n }\n function nullsToUndefined(obj) {\n if (obj === null || obj === void 0) {\n return void 0;\n }\n if (obj.constructor.name === \"Object\" || Array.isArray(obj)) {\n for (const key in obj) {\n obj[key] = nullsToUndefined(obj[key]);\n }\n }\n return obj;\n }\n function getAssetTransfers(config2, params, srcMethod = \"getAssetTransfers\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n if (params.fromAddress) {\n params.fromAddress = yield provider._getAddress(params.fromAddress);\n }\n if (params.toAddress) {\n params.toAddress = yield provider._getAddress(params.toAddress);\n }\n return provider._send(\"alchemy_getAssetTransfers\", [\n Object.assign(Object.assign({}, params), { fromBlock: params.fromBlock != null ? formatBlock2(params.fromBlock) : void 0, toBlock: params.toBlock != null ? formatBlock2(params.toBlock) : void 0, maxCount: params.maxCount != null ? toHex2(params.maxCount) : void 0 })\n ], srcMethod);\n });\n }\n function getTransactionReceipts(config2, params, srcMethod = \"getTransactionReceipts\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n return provider._send(\"alchemy_getTransactionReceipts\", [params], srcMethod);\n });\n }\n function getLogs2(config2, filter2) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n yield provider.getNetwork();\n const params = yield resolveProperties2({\n filter: getFilter(config2, filter2)\n });\n const logs = yield provider.send(\"eth_getLogs\", [params.filter]);\n logs.forEach((log) => {\n if (log.removed == null) {\n log.removed = false;\n }\n });\n return arrayOf(provider.formatter.filterLog.bind(provider.formatter))(logs);\n });\n }\n function getFilter(config2, filter2) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n const resolvedFilter = yield filter2;\n let result = {};\n [\"blockHash\", \"topics\"].forEach((key) => {\n if (resolvedFilter[key] == null) {\n return;\n }\n result[key] = resolvedFilter[key];\n });\n [\"fromBlock\", \"toBlock\"].forEach((key) => {\n if (resolvedFilter[key] == null) {\n return;\n }\n result[key] = provider._getBlockTag(resolvedFilter[key]);\n });\n result = provider.formatter.filter(yield resolveProperties2(result));\n if (Array.isArray(resolvedFilter.address)) {\n result.address = yield Promise.all(resolvedFilter.address.map((address) => __awaiter$1(this, void 0, void 0, function* () {\n return provider._getAddress(address);\n })));\n } else if (resolvedFilter.address != null) {\n result.address = yield provider._getAddress(resolvedFilter.address);\n }\n return result;\n });\n }\n function arrayOf(format) {\n return function(array) {\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n const result = [];\n array.forEach((value) => {\n result.push(format(value));\n });\n return result;\n };\n }\n function binarySearchFirstBlock(start, end, address, config2) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (start >= end) {\n return end;\n }\n const mid = Math.floor((start + end) / 2);\n const provider = yield config2.getProvider();\n const code = yield provider.getCode(address, mid);\n if (code === ETH_NULL_VALUE) {\n return binarySearchFirstBlock(mid + 1, end, address, config2);\n }\n return binarySearchFirstBlock(start, mid, address, config2);\n });\n }\n function parseTracerParams(tracer, timeout) {\n return Object.assign({ tracer: tracer.type }, tracer.onlyTopCall !== void 0 && {\n tracerConfig: {\n onlyTopCall: tracer.onlyTopCall,\n timeout\n }\n });\n }\n function sanitizeTokenType(tokenType) {\n if (tokenType === NftTokenType.ERC1155 || tokenType === NftTokenType.ERC721) {\n return tokenType;\n }\n return void 0;\n }\n function logDebug(message, ...args) {\n loggerClient.debug(message, args);\n }\n function logInfo(message, ...args) {\n loggerClient.info(message, args);\n }\n function logWarn(message, ...args) {\n loggerClient.warn(message, args);\n }\n function stringify3(obj) {\n if (typeof obj === \"string\") {\n return obj;\n } else {\n try {\n return JSON.stringify(obj);\n } catch (e2) {\n return obj;\n }\n }\n }\n function sendAxiosRequest(baseUrl, restApiName, methodName, params, overrides) {\n var _a2;\n const requestUrl = baseUrl + \"/\" + restApiName;\n const config2 = Object.assign(Object.assign({}, overrides), { headers: Object.assign(Object.assign(Object.assign({}, overrides === null || overrides === void 0 ? void 0 : overrides.headers), !IS_BROWSER && { \"Accept-Encoding\": \"gzip\" }), { \"Alchemy-Ethers-Sdk-Version\": VERSION4, \"Alchemy-Ethers-Sdk-Method\": methodName }), method: (_a2 = overrides === null || overrides === void 0 ? void 0 : overrides.method) !== null && _a2 !== void 0 ? _a2 : \"GET\", url: requestUrl, params });\n return axios_default(config2);\n }\n function requestHttpWithBackoff(config2, apiType, restApiName, methodName, params, overrides) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let lastError = void 0;\n const backoff2 = new ExponentialBackoff(config2.maxRetries);\n for (let attempt2 = 0; attempt2 < config2.maxRetries + 1; attempt2++) {\n try {\n if (lastError !== void 0) {\n logInfo(\"requestHttp\", `Retrying after error: ${lastError.message}`);\n }\n try {\n yield backoff2.backoff();\n } catch (err) {\n break;\n }\n const response = yield sendAxiosRequest(config2._getRequestUrl(apiType), restApiName, methodName, params, Object.assign(Object.assign({}, overrides), { timeout: config2.requestTimeout }));\n if (response.status === 200) {\n logDebug(restApiName, `Successful request: ${restApiName}`);\n return response.data;\n } else {\n logInfo(restApiName, `Request failed: ${restApiName}, ${response.status}, ${response.data}`);\n lastError = new Error(response.status + \": \" + response.data);\n }\n } catch (err) {\n if (!axios_default.isAxiosError(err) || err.response === void 0) {\n throw err;\n }\n lastError = new Error(err.response.status + \": \" + JSON.stringify(err.response.data));\n if (!isRetryableHttpError(err, apiType)) {\n break;\n }\n }\n }\n return Promise.reject(lastError);\n });\n }\n function isRetryableHttpError(err, apiType) {\n const retryableCodes = apiType === AlchemyApiType.WEBHOOK ? [429, 500] : [429];\n return err.response !== void 0 && retryableCodes.includes(err.response.status);\n }\n function paginateEndpoint(config2, apiType, restApiName, methodName, reqPageKey, resPageKey, params) {\n return __asyncGenerator2(this, arguments, function* paginateEndpoint_1() {\n let hasNext = true;\n const requestParams = Object.assign({}, params);\n while (hasNext) {\n const response = yield __await2(requestHttpWithBackoff(config2, apiType, restApiName, methodName, requestParams));\n yield yield __await2(response);\n if (response[resPageKey] !== null) {\n requestParams[reqPageKey] = response[resPageKey];\n } else {\n hasNext = false;\n }\n }\n });\n }\n function getNftMetadata(config2, contractAddress, tokenId, options, srcMethod = \"getNftMetadata\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTMetadata\", srcMethod, {\n contractAddress,\n tokenId: import_bignumber2.BigNumber.from(tokenId).toString(),\n tokenType: sanitizeTokenType(options === null || options === void 0 ? void 0 : options.tokenType),\n tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs,\n refreshCache: options === null || options === void 0 ? void 0 : options.refreshCache\n });\n return getNftFromRaw(response);\n });\n }\n function getNftMetadataBatch(config2, tokens, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n tokens,\n tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs,\n refreshCache: options === null || options === void 0 ? void 0 : options.refreshCache\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTMetadataBatch\", \"getNftMetadataBatch\", {}, {\n method: \"POST\",\n data\n });\n return {\n nfts: response.nfts.map((nft) => getNftFromRaw(nft))\n };\n });\n }\n function getContractMetadata(config2, contractAddress, srcMethod = \"getContractMetadata\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getContractMetadata\", srcMethod, {\n contractAddress\n });\n return getNftContractFromRaw(response);\n });\n }\n function getContractMetadataBatch(config2, contractAddresses) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getContractMetadataBatch\", \"getContractMetadataBatch\", {}, {\n method: \"POST\",\n data: { contractAddresses }\n });\n return {\n contracts: response.contracts.map(getNftContractFromRaw)\n };\n });\n }\n function getCollectionMetadata(config2, collectionSlug, srcMethod = \"getCollectionMetadata\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getCollectionMetadata\", srcMethod, {\n collectionSlug\n });\n return getNftCollectionFromRaw(response);\n });\n }\n function getNftsForOwnerIterator(config2, owner, options, srcMethod = \"getNftsForOwnerIterator\") {\n return __asyncGenerator2(this, arguments, function* getNftsForOwnerIterator_1() {\n var e_1, _a2;\n const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata);\n try {\n for (var _b2 = __asyncValues2(paginateEndpoint(config2, AlchemyApiType.NFT, \"getNFTsForOwner\", srcMethod, \"pageKey\", \"pageKey\", {\n contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey,\n excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters,\n includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters,\n owner,\n withMetadata,\n tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs,\n orderBy: options === null || options === void 0 ? void 0 : options.orderBy\n })), _c; _c = yield __await2(_b2.next()), !_c.done; ) {\n const response = _c.value;\n for (const ownedNft of response.ownedNfts) {\n yield yield __await2(Object.assign(Object.assign({}, nftFromGetNftResponse(ownedNft)), { balance: ownedNft.balance }));\n }\n }\n } catch (e_1_1) {\n e_1 = { error: e_1_1 };\n } finally {\n try {\n if (_c && !_c.done && (_a2 = _b2.return))\n yield __await2(_a2.call(_b2));\n } finally {\n if (e_1)\n throw e_1.error;\n }\n }\n });\n }\n function getNftsForOwner(config2, owner, options, srcMethod = \"getNftsForOwner\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata);\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTsForOwner\", srcMethod, {\n contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey,\n excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters,\n includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters,\n owner,\n pageSize: options === null || options === void 0 ? void 0 : options.pageSize,\n withMetadata,\n tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs,\n orderBy: options === null || options === void 0 ? void 0 : options.orderBy\n });\n if (withMetadata) {\n return nullsToUndefined({\n ownedNfts: response.ownedNfts.map((res) => Object.assign(Object.assign({}, getNftFromRaw(res)), { balance: res.balance })),\n pageKey: response.pageKey,\n totalCount: response.totalCount,\n validAt: response.validAt\n });\n }\n return nullsToUndefined({\n ownedNfts: response.ownedNfts.map((res) => Object.assign(Object.assign({}, getBaseNftFromRaw(res)), { balance: res.balance })),\n pageKey: response.pageKey,\n totalCount: response.totalCount,\n validAt: response.validAt\n });\n });\n }\n function getNftsForContract(config2, contractAddress, options, srcMethod = \"getNftsForContract\") {\n var _a2;\n return __awaiter$1(this, void 0, void 0, function* () {\n const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata);\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTsForContract\", srcMethod, {\n contractAddress,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey,\n withMetadata,\n limit: (_a2 = options === null || options === void 0 ? void 0 : options.pageSize) !== null && _a2 !== void 0 ? _a2 : void 0,\n tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs\n });\n if (withMetadata) {\n return nullsToUndefined({\n nfts: response.nfts.map((res) => getNftFromRaw(res)),\n pageKey: response.pageKey\n });\n }\n return nullsToUndefined({\n nfts: response.nfts.map((res) => getBaseNftFromRaw(res, contractAddress)),\n pageKey: response.pageKey\n });\n });\n }\n function getNftsForContractIterator(config2, contractAddress, options, srcMethod = \"getNftsForContractIterator\") {\n return __asyncGenerator2(this, arguments, function* getNftsForContractIterator_1() {\n var e_2, _a2;\n const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata);\n try {\n for (var _b2 = __asyncValues2(paginateEndpoint(config2, AlchemyApiType.NFT, \"getNFTsForContract\", srcMethod, \"pageKey\", \"pageKey\", {\n contractAddress,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey,\n withMetadata\n })), _c; _c = yield __await2(_b2.next()), !_c.done; ) {\n const response = _c.value;\n for (const nft of response.nfts) {\n yield yield __await2(nftFromGetNftContractResponse(nft, contractAddress));\n }\n }\n } catch (e_2_1) {\n e_2 = { error: e_2_1 };\n } finally {\n try {\n if (_c && !_c.done && (_a2 = _b2.return))\n yield __await2(_a2.call(_b2));\n } finally {\n if (e_2)\n throw e_2.error;\n }\n }\n });\n }\n function getOwnersForContract(config2, contractAddress, options, srcMethod = \"getOwnersForContract\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getOwnersForContract\", srcMethod, Object.assign(Object.assign({}, options), { contractAddress }));\n if (options === null || options === void 0 ? void 0 : options.withTokenBalances) {\n return nullsToUndefined({\n owners: response.owners,\n pageKey: response.pageKey\n });\n }\n return nullsToUndefined({\n owners: response.owners,\n pageKey: response.pageKey\n });\n });\n }\n function getContractsForOwner(config2, owner, options, srcMethod = \"getContractsForOwner\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getContractsForOwner\", srcMethod, {\n owner,\n excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters,\n includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey,\n pageSize: options === null || options === void 0 ? void 0 : options.pageSize,\n orderBy: options === null || options === void 0 ? void 0 : options.orderBy\n });\n return nullsToUndefined({\n contracts: response.contracts.map(getNftContractsForOwnerFromRaw),\n pageKey: response.pageKey,\n totalCount: response.totalCount\n });\n });\n }\n function getOwnersForNft(config2, contractAddress, tokenId, options, srcMethod = \"getOwnersForNft\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n return requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getOwnersForNFT\", srcMethod, Object.assign({ contractAddress, tokenId: import_bignumber2.BigNumber.from(tokenId).toString() }, options));\n });\n }\n function getMintedNfts(config2, owner, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n const ownerAddress = yield provider._getAddress(owner);\n const category = nftTokenTypeToCategory(options === null || options === void 0 ? void 0 : options.tokenType);\n const params = {\n fromBlock: \"0x0\",\n fromAddress: ETH_NULL_ADDRESS,\n toAddress: ownerAddress,\n excludeZeroValue: true,\n contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses,\n category,\n maxCount: 100,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey\n };\n const response = yield getAssetTransfers(config2, params, \"getMintedNfts\");\n return getNftsForTransfers(config2, response);\n });\n }\n function getTransfersForOwner(config2, owner, transferType, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n const ownerAddress = yield provider._getAddress(owner);\n const category = nftTokenTypeToCategory(options === null || options === void 0 ? void 0 : options.tokenType);\n const params = {\n fromBlock: \"0x0\",\n excludeZeroValue: true,\n contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses,\n category,\n maxCount: 100,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey\n };\n if (transferType === GetTransfersForOwnerTransferType.TO) {\n params.toAddress = ownerAddress;\n } else {\n params.fromAddress = ownerAddress;\n }\n const transfersResponse = yield getAssetTransfers(config2, params, \"getTransfersForOwner\");\n return getNftsForTransfers(config2, transfersResponse);\n });\n }\n function getTransfersForContract(config2, contract, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const category = [\n AssetTransfersCategory.ERC721,\n AssetTransfersCategory.ERC1155,\n AssetTransfersCategory.SPECIALNFT\n ];\n const provider = yield config2.getProvider();\n const fromBlock = (options === null || options === void 0 ? void 0 : options.fromBlock) ? provider.formatter.blockTag(yield provider._getBlockTag(options.fromBlock)) : \"0x0\";\n const toBlock = (options === null || options === void 0 ? void 0 : options.toBlock) ? provider.formatter.blockTag(yield provider._getBlockTag(options.toBlock)) : void 0;\n const params = {\n fromBlock,\n toBlock,\n excludeZeroValue: true,\n contractAddresses: [contract],\n order: options === null || options === void 0 ? void 0 : options.order,\n category,\n maxCount: 100,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey\n };\n const transfersResponse = yield getAssetTransfers(config2, params, \"getTransfersForContract\");\n return getNftsForTransfers(config2, transfersResponse);\n });\n }\n function nftTokenTypeToCategory(tokenType) {\n switch (tokenType) {\n case NftTokenType.ERC721:\n return [AssetTransfersCategory.ERC721];\n case NftTokenType.ERC1155:\n return [AssetTransfersCategory.ERC1155];\n default:\n return [\n AssetTransfersCategory.ERC721,\n AssetTransfersCategory.ERC1155,\n AssetTransfersCategory.SPECIALNFT\n ];\n }\n }\n function parse1155Transfer(transfer) {\n return transfer.erc1155Metadata.map((metadata) => ({\n contractAddress: transfer.rawContract.address,\n tokenId: metadata.tokenId,\n tokenType: NftTokenType.ERC1155\n }));\n }\n function verifyNftOwnership(config2, owner, contractAddresses, srcMethod = \"verifyNftOwnership\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (typeof contractAddresses === \"string\") {\n const response = yield getNftsForOwner(config2, owner, {\n contractAddresses: [contractAddresses],\n omitMetadata: true\n }, srcMethod);\n return response.ownedNfts.length > 0;\n } else {\n if (contractAddresses.length === 0) {\n throw new Error(\"Must provide at least one contract address\");\n }\n const response = yield getNftsForOwner(config2, owner, {\n contractAddresses,\n omitMetadata: true\n }, srcMethod);\n const result = contractAddresses.reduce((acc, curr) => {\n acc[curr] = false;\n return acc;\n }, {});\n for (const nft of response.ownedNfts) {\n result[nft.contractAddress] = true;\n }\n return result;\n }\n });\n }\n function isSpamContract(config2, contractAddress, srcMethod = \"isSpamContract\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n return requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"isSpamContract\", srcMethod, {\n contractAddress\n });\n });\n }\n function getSpamContracts(config2, srcMethod = \"getSpamContracts\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n return requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getSpamContracts\", srcMethod, void 0);\n });\n }\n function reportSpam(config2, contractAddress, srcMethod = \"reportSpam\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n void requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"reportSpam\", srcMethod, {\n contractAddress\n });\n });\n }\n function isAirdropNft(config2, contractAddress, tokenId, srcMethod = \"isAirdropNft\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n return requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"isAirdropNFT\", srcMethod, {\n contractAddress,\n tokenId\n });\n });\n }\n function getFloorPrice(config2, contractAddress, srcMethod = \"getFloorPrice\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getFloorPrice\", srcMethod, {\n contractAddress\n });\n return nullsToUndefined(response);\n });\n }\n function getNftSales(config2, options = {}, srcMethod = \"getNftSales\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const params = Object.assign({}, options);\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTSales\", srcMethod, {\n fromBlock: params === null || params === void 0 ? void 0 : params.fromBlock,\n toBlock: params === null || params === void 0 ? void 0 : params.toBlock,\n order: params === null || params === void 0 ? void 0 : params.order,\n marketplace: params === null || params === void 0 ? void 0 : params.marketplace,\n contractAddress: params === null || params === void 0 ? void 0 : params.contractAddress,\n tokenId: (params === null || params === void 0 ? void 0 : params.tokenId) ? import_bignumber2.BigNumber.from(params === null || params === void 0 ? void 0 : params.tokenId).toString() : void 0,\n sellerAddress: params === null || params === void 0 ? void 0 : params.sellerAddress,\n buyerAddress: params === null || params === void 0 ? void 0 : params.buyerAddress,\n taker: params === null || params === void 0 ? void 0 : params.taker,\n limit: params === null || params === void 0 ? void 0 : params.limit,\n pageKey: params === null || params === void 0 ? void 0 : params.pageKey\n });\n return getNftSalesFromRaw(response);\n });\n }\n function computeRarity(config2, contractAddress, tokenId, srcMethod = \"computeRarity\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"computeRarity\", srcMethod, {\n contractAddress,\n tokenId: import_bignumber2.BigNumber.from(tokenId).toString()\n });\n return nullsToUndefined(response);\n });\n }\n function searchContractMetadata(config2, query, srcMethod = \"searchContractMetadata\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"searchContractMetadata\", srcMethod, {\n query\n });\n return {\n contracts: response.contracts.map(getNftContractFromRaw)\n };\n });\n }\n function summarizeNftAttributes(config2, contractAddress, srcMethod = \"summarizeNftAttributes\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n return requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"summarizeNFTAttributes\", srcMethod, {\n contractAddress\n });\n });\n }\n function refreshNftMetadata(config2, contractAddress, tokenId, srcMethod = \"refreshNftMetadata\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const tokenIdString = import_bignumber2.BigNumber.from(tokenId).toString();\n const first = yield getNftMetadata(config2, contractAddress, tokenIdString, void 0, srcMethod);\n const second = yield refresh(config2, contractAddress, tokenIdString, srcMethod);\n return first.timeLastUpdated !== second.timeLastUpdated;\n });\n }\n function refreshContract(config2, contractAddress, srcMethod = \"refreshContract\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"reingestContract\", srcMethod, {\n contractAddress\n });\n return {\n contractAddress: response.contractAddress,\n refreshState: parseReingestionState(response.reingestionState),\n progress: response.progress\n };\n });\n }\n function refresh(config2, contractAddress, tokenId, srcMethod) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTMetadata\", srcMethod, {\n contractAddress,\n tokenId: import_bignumber2.BigNumber.from(tokenId).toString(),\n refreshCache: true\n });\n return getNftFromRaw(response);\n });\n }\n function nftFromGetNftResponse(ownedNft) {\n if (isNftWithMetadata(ownedNft)) {\n return getNftFromRaw(ownedNft);\n } else {\n return getBaseNftFromRaw(ownedNft);\n }\n }\n function nftFromGetNftContractResponse(ownedNft, contractAddress) {\n if (isNftWithMetadata(ownedNft)) {\n return getNftFromRaw(ownedNft);\n } else {\n return getBaseNftFromRaw(ownedNft, contractAddress);\n }\n }\n function isNftWithMetadata(response) {\n return response.name !== void 0;\n }\n function getNftsForTransfers(config2, response) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const metadataTransfers = response.transfers.filter((transfer) => transfer.rawContract.address !== null).flatMap((transfer) => {\n var _a2;\n const tokens = getTokensFromTransfer(transfer);\n const metadata = {\n from: transfer.from,\n to: (_a2 = transfer.to) !== null && _a2 !== void 0 ? _a2 : void 0,\n transactionHash: transfer.hash,\n blockNumber: transfer.blockNum\n };\n return tokens.map((token) => ({ metadata, token }));\n });\n if (metadataTransfers.length === 0) {\n return { nfts: [] };\n }\n const batchSize = 100;\n const requestBatches = [];\n for (let i3 = 0; i3 < metadataTransfers.length; i3 += batchSize) {\n requestBatches.push(metadataTransfers.slice(i3, i3 + batchSize));\n }\n const responseBatches = yield Promise.all(requestBatches.map((batch2) => getNftMetadataBatch(config2, batch2.map((transfer) => transfer.token))));\n const nfts = responseBatches.map((r2) => r2.nfts).flat();\n const nftsByTokenId = /* @__PURE__ */ new Map();\n nfts.forEach((nft) => {\n const key = `${nft.contract.address.toLowerCase()}-${import_bignumber2.BigNumber.from(nft.tokenId).toString()}`;\n nftsByTokenId.set(key, nft);\n });\n const transferredNfts = metadataTransfers.map((t3) => {\n const key = `${t3.token.contractAddress.toLowerCase()}-${import_bignumber2.BigNumber.from(t3.token.tokenId).toString()}`;\n return Object.assign(Object.assign({}, nftsByTokenId.get(key)), t3.metadata);\n });\n return {\n nfts: transferredNfts,\n pageKey: response.pageKey\n };\n });\n }\n function getTokensFromTransfer(transfer) {\n if (transfer.category === AssetTransfersCategory.ERC1155) {\n return parse1155Transfer(transfer);\n } else {\n return [\n {\n contractAddress: transfer.rawContract.address,\n tokenId: transfer.tokenId,\n tokenType: transfer.category === AssetTransfersCategory.ERC721 ? NftTokenType.ERC721 : void 0\n }\n ];\n }\n }\n function omitMetadataToWithMetadata(omitMetadata) {\n return omitMetadata === void 0 ? true : !omitMetadata;\n }\n function parseReingestionState(reingestionState) {\n switch (reingestionState) {\n case \"does_not_exist\":\n return NftRefreshState.DOES_NOT_EXIST;\n case \"already_queued\":\n return NftRefreshState.ALREADY_QUEUED;\n case \"in_progress\":\n return NftRefreshState.IN_PROGRESS;\n case \"finished\":\n return NftRefreshState.FINISHED;\n case \"queued\":\n return NftRefreshState.QUEUED;\n case \"queue_failed\":\n return NftRefreshState.QUEUE_FAILED;\n default:\n throw new Error(\"Unknown reingestion state: \" + reingestionState);\n }\n }\n function parseRawWebhookResponse(response) {\n return response.data.map(parseRawWebhook);\n }\n function parseRawWebhook(rawWebhook) {\n return Object.assign(Object.assign({ id: rawWebhook.id, network: WEBHOOK_NETWORK_TO_NETWORK[rawWebhook.network], type: rawWebhook.webhook_type, url: rawWebhook.webhook_url, isActive: rawWebhook.is_active, timeCreated: new Date(rawWebhook.time_created).toISOString(), signingKey: rawWebhook.signing_key, version: rawWebhook.version }, rawWebhook.app_id !== void 0 && { appId: rawWebhook.app_id }), rawWebhook.name !== void 0 && { name: rawWebhook.name });\n }\n function parseRawAddressActivityResponse(response) {\n return {\n addresses: response.data,\n totalCount: response.pagination.total_count,\n pageKey: response.pagination.cursors.after\n };\n }\n function parseRawCustomGraphqlWebhookResponse(response) {\n return {\n graphqlQuery: response.data.graphql_query\n };\n }\n function parseRawNftFiltersResponse(response) {\n return {\n filters: response.data.map((f6) => f6.token_id ? {\n contractAddress: f6.contract_address,\n tokenId: import_bignumber2.BigNumber.from(f6.token_id).toString()\n } : {\n contractAddress: f6.contract_address\n }),\n totalCount: response.pagination.total_count,\n pageKey: response.pagination.cursors.after\n };\n }\n function nftFilterToParam(filter2) {\n return filter2.tokenId ? {\n contract_address: filter2.contractAddress,\n token_id: import_bignumber2.BigNumber.from(filter2.tokenId).toString()\n } : {\n contract_address: filter2.contractAddress\n };\n }\n function getTokensByWallet(config2, addresses4, withMetadata = true, withPrices = true, includeNativeTokens = true, srcMethod = \"getTokensByWallet\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n addresses: addresses4,\n withMetadata,\n withPrices,\n includeNativeTokens\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PORTFOLIO, \"assets/tokens/by-address\", srcMethod, {}, {\n data,\n method: \"POST\"\n });\n return nullsToUndefined(response);\n });\n }\n function getTokenBalancesByWallet(config2, addresses4, includeNativeTokens = true, srcMethod = \"getTokenBalancesByWallet\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n addresses: addresses4,\n includeNativeTokens\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PORTFOLIO, \"assets/tokens/balances/by-address\", srcMethod, {}, {\n method: \"POST\",\n data\n });\n return nullsToUndefined(response);\n });\n }\n function getNftsByWallet(config2, addresses4, withMetadata = true, pageKey = void 0, pageSize = void 0, srcMethod = \"getNftsByWallet\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n addresses: addresses4,\n withMetadata,\n pageKey,\n pageSize\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PORTFOLIO, \"assets/nfts/by-address\", srcMethod, {}, {\n method: \"POST\",\n data\n });\n return nullsToUndefined(response);\n });\n }\n function getNftCollectionsByWallet(config2, addresses4, withMetadata = true, pageKey = void 0, pageSize = void 0, srcMethod = \"getNftCollectionsByWallet\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n addresses: addresses4,\n pageKey,\n pageSize,\n withMetadata\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PORTFOLIO, \"assets/nfts/contracts/by-address\", srcMethod, {}, {\n method: \"POST\",\n data\n });\n return nullsToUndefined(response);\n });\n }\n function getTransactionsByWallet(config2, addresses4, before = void 0, after = void 0, limit = void 0, srcMethod = \"getTransactionsByWallet\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n addresses: addresses4,\n before,\n after,\n limit\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PORTFOLIO, \"transactions/history/by-address\", srcMethod, {}, {\n method: \"POST\",\n data\n });\n return nullsToUndefined(response);\n });\n }\n function getTokenPriceByAddress(config2, addresses4, srcMethod = \"getTokenPriceByAddress\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PRICES, \"tokens/by-address\", srcMethod, {}, {\n method: \"POST\",\n data: { addresses: addresses4 }\n });\n return nullsToUndefined(response);\n });\n }\n function getTokenPriceBySymbol(config2, symbols, srcMethod = \"getTokenPriceBySymbol\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PRICES, \"tokens/by-symbol\", srcMethod, {\n symbols\n }, {\n // We need to serialize the symbols array as URLSearchParams since the\n // Alchemy API expects a query parameter for each symbol. The axios default\n // serializer will not work here because the symbols array is an array of\n // strings.\n // Axios default encoding: ?symbols[]=AAVE&symbols[]=UNI\n // Alchemy requires: ?symbols=AAVE&symbols=UNI\n paramsSerializer: (params) => {\n const searchParams = new URLSearchParams();\n Object.entries(params).forEach(([key, value]) => {\n value.forEach((v2) => searchParams.append(key, v2));\n });\n return searchParams.toString();\n }\n });\n return nullsToUndefined(response);\n });\n }\n function getHistoricalPriceBySymbol(config2, symbol, startTime, endTime, interval, srcMethod = \"getHistoricalPriceBySymbol\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PRICES, \"tokens/historical\", srcMethod, {}, {\n method: \"POST\",\n data: {\n symbol,\n startTime,\n endTime,\n interval\n }\n });\n return nullsToUndefined(response);\n });\n }\n function getHistoricalPriceByAddress(config2, network, address, startTime, endTime, interval, srcMethod = \"getHistoricalPriceByAddress\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PRICES, \"tokens/historical\", srcMethod, {}, {\n method: \"POST\",\n data: {\n network,\n address,\n startTime,\n endTime,\n interval\n }\n });\n return nullsToUndefined(response);\n });\n }\n function generateGasSpreadTransactions(transaction, gasLimit, baseFee, priorityFee) {\n return GAS_OPTIMIZED_TX_FEE_MULTIPLES.map((feeMultiplier) => {\n return Object.assign(Object.assign({}, transaction), { gasLimit, maxFeePerGas: Math.round(baseFee * feeMultiplier + priorityFee * feeMultiplier), maxPriorityFeePerGas: Math.round(feeMultiplier * priorityFee) });\n });\n }\n function isAlchemyEvent(event) {\n return typeof event === \"object\" && \"method\" in event;\n }\n function getAlchemyEventTag(event) {\n if (!isAlchemyEvent(event)) {\n throw new Error(\"Event tag requires AlchemyEventType\");\n }\n if (event.method === AlchemySubscription.PENDING_TRANSACTIONS) {\n return serializePendingTransactionsEvent(event);\n } else if (event.method === AlchemySubscription.MINED_TRANSACTIONS) {\n return serializeMinedTransactionsEvent(event);\n } else {\n throw new Error(`Unrecognized AlchemyFilterEvent: ${event}`);\n }\n }\n function verifyAlchemyEventName(eventName) {\n if (!Object.values(AlchemySubscription).includes(eventName.method)) {\n throw new Error(`Invalid method name ${eventName.method}. Accepted method names: ${Object.values(AlchemySubscription)}`);\n }\n }\n function serializePendingTransactionsEvent(event) {\n const fromAddress = serializeAddressField(event.fromAddress);\n const toAddress = serializeAddressField(event.toAddress);\n const hashesOnly = serializeBooleanField(event.hashesOnly);\n return ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE + \":\" + fromAddress + \":\" + toAddress + \":\" + hashesOnly;\n }\n function serializeMinedTransactionsEvent(event) {\n const addresses4 = serializeAddressesField(event.addresses);\n const includeRemoved = serializeBooleanField(event.includeRemoved);\n const hashesOnly = serializeBooleanField(event.hashesOnly);\n return ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE + \":\" + addresses4 + \":\" + includeRemoved + \":\" + hashesOnly;\n }\n function serializeAddressesField(addresses4) {\n if (addresses4 === void 0) {\n return \"*\";\n }\n return addresses4.map((filter2) => serializeAddressField(filter2.to) + \",\" + serializeAddressField(filter2.from)).join(\"|\");\n }\n function serializeAddressField(field) {\n if (field === void 0) {\n return \"*\";\n } else if (Array.isArray(field)) {\n return field.join(\"|\");\n } else {\n return field;\n }\n }\n function serializeBooleanField(field) {\n if (field === void 0) {\n return \"*\";\n } else {\n return field.toString();\n }\n }\n function deserializeTopics(data) {\n if (data === \"\") {\n return [];\n }\n return data.split(/&/g).map((topic) => {\n if (topic === \"\") {\n return [];\n }\n const comps = topic.split(\"|\").map((topic2) => {\n return topic2 === \"null\" ? null : topic2;\n });\n return comps.length === 1 ? comps[0] : comps;\n });\n }\n function deserializeAddressField(data) {\n if (data === \"\") {\n return void 0;\n }\n const addresses4 = data.split(\"|\");\n return addresses4.length === 1 ? addresses4[0] : addresses4;\n }\n function deserializeAddressesField(data) {\n if (data === \"\") {\n return void 0;\n }\n return data.split(\"|\").map((addressStr) => addressStr.split(\",\")).map((addressPair) => Object.assign(Object.assign({}, addressPair[0] !== \"*\" && { to: addressPair[0] }), addressPair[1] !== \"*\" && { from: addressPair[1] }));\n }\n var import_bignumber2, import_bytes5, Network, TokenBalanceType, AssetTransfersCategory, GetTransfersForOwnerTransferType, SortingOrder, OpenSeaSafelistRequestStatus, AlchemySubscription, SimulateAssetType, SimulateChangeType, DecodingAuthority, DebugCallType, GasOptimizedTransactionStatus, WebhookVersion, WebhookType, CommitmentLevel, DebugTracerType, NftTokenType, NftSpamClassification, NftFilters, NftOrdering, NftSaleMarketplace, NftSaleTakerType, NftRefreshState, NftCollectionMarketplace, HistoricalPriceInterval, DEFAULT_ALCHEMY_API_KEY, DEFAULT_NETWORK, DEFAULT_MAX_RETRIES, DEFAULT_REQUEST_TIMEOUT, AlchemyApiType, EthersNetwork, CustomNetworks, ETH_NULL_VALUE, ETH_NULL_ADDRESS, AlchemyConfig, version$12, _permanentCensorErrors2, _censorErrors2, LogLevels2, _logLevel2, _globalLogger2, _normalizeError2, LogLevel$1, ErrorCode2, HEX2, Logger$1, version6, __awaiter2, logger2, opaque, IS_BROWSER, CoreNamespace, DebugNamespace, LogLevel3, logLevelStringToEnum, logLevelToConsoleFn, DEFAULT_LOG_LEVEL, Logger3, loggerClient, VERSION4, DEFAULT_BACKOFF_INITIAL_DELAY_MS, DEFAULT_BACKOFF_MULTIPLIER, DEFAULT_BACKOFF_MAX_DELAY_MS, DEFAULT_BACKOFF_MAX_ATTEMPTS, ExponentialBackoff, NftNamespace, NotifyNamespace, WEBHOOK_NETWORK_TO_NETWORK, NETWORK_TO_WEBHOOK_NETWORK, PortfolioNamespace, PricesNamespace, GAS_OPTIMIZED_TX_FEE_MULTIPLES, TransactNamespace, ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE, ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE, ALCHEMY_EVENT_TYPES, Event, EthersEvent, WebSocketNamespace, Alchemy;\n var init_index_f73a5f29 = __esm({\n \"../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/index-f73a5f29.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils10();\n import_bignumber2 = __toESM(require_lib3());\n import_bytes5 = __toESM(require_lib2());\n init_axios2();\n (function(Network2) {\n Network2[\"ETH_MAINNET\"] = \"eth-mainnet\";\n Network2[\"ETH_GOERLI\"] = \"eth-goerli\";\n Network2[\"ETH_SEPOLIA\"] = \"eth-sepolia\";\n Network2[\"ETH_HOLESKY\"] = \"eth-holesky\";\n Network2[\"ETH_HOODI\"] = \"eth-hoodi\";\n Network2[\"OPT_MAINNET\"] = \"opt-mainnet\";\n Network2[\"OPT_GOERLI\"] = \"opt-goerli\";\n Network2[\"OPT_SEPOLIA\"] = \"opt-sepolia\";\n Network2[\"ARB_MAINNET\"] = \"arb-mainnet\";\n Network2[\"ARB_GOERLI\"] = \"arb-goerli\";\n Network2[\"ARB_SEPOLIA\"] = \"arb-sepolia\";\n Network2[\"MATIC_MAINNET\"] = \"polygon-mainnet\";\n Network2[\"MATIC_MUMBAI\"] = \"polygon-mumbai\";\n Network2[\"MATIC_AMOY\"] = \"polygon-amoy\";\n Network2[\"ASTAR_MAINNET\"] = \"astar-mainnet\";\n Network2[\"POLYGONZKEVM_MAINNET\"] = \"polygonzkevm-mainnet\";\n Network2[\"POLYGONZKEVM_TESTNET\"] = \"polygonzkevm-testnet\";\n Network2[\"POLYGONZKEVM_CARDONA\"] = \"polygonzkevm-cardona\";\n Network2[\"BASE_MAINNET\"] = \"base-mainnet\";\n Network2[\"BASE_GOERLI\"] = \"base-goerli\";\n Network2[\"BASE_SEPOLIA\"] = \"base-sepolia\";\n Network2[\"ZKSYNC_MAINNET\"] = \"zksync-mainnet\";\n Network2[\"ZKSYNC_SEPOLIA\"] = \"zksync-sepolia\";\n Network2[\"SHAPE_MAINNET\"] = \"shape-mainnet\";\n Network2[\"SHAPE_SEPOLIA\"] = \"shape-sepolia\";\n Network2[\"LINEA_MAINNET\"] = \"linea-mainnet\";\n Network2[\"LINEA_SEPOLIA\"] = \"linea-sepolia\";\n Network2[\"FANTOM_MAINNET\"] = \"fantom-mainnet\";\n Network2[\"FANTOM_TESTNET\"] = \"fantom-testnet\";\n Network2[\"ZETACHAIN_MAINNET\"] = \"zetachain-mainnet\";\n Network2[\"ZETACHAIN_TESTNET\"] = \"zetachain-testnet\";\n Network2[\"ARBNOVA_MAINNET\"] = \"arbnova-mainnet\";\n Network2[\"BLAST_MAINNET\"] = \"blast-mainnet\";\n Network2[\"BLAST_SEPOLIA\"] = \"blast-sepolia\";\n Network2[\"MANTLE_MAINNET\"] = \"mantle-mainnet\";\n Network2[\"MANTLE_SEPOLIA\"] = \"mantle-sepolia\";\n Network2[\"SCROLL_MAINNET\"] = \"scroll-mainnet\";\n Network2[\"SCROLL_SEPOLIA\"] = \"scroll-sepolia\";\n Network2[\"GNOSIS_MAINNET\"] = \"gnosis-mainnet\";\n Network2[\"GNOSIS_CHIADO\"] = \"gnosis-chiado\";\n Network2[\"BNB_MAINNET\"] = \"bnb-mainnet\";\n Network2[\"BNB_TESTNET\"] = \"bnb-testnet\";\n Network2[\"AVAX_MAINNET\"] = \"avax-mainnet\";\n Network2[\"AVAX_FUJI\"] = \"avax-fuji\";\n Network2[\"CELO_MAINNET\"] = \"celo-mainnet\";\n Network2[\"CELO_ALFAJORES\"] = \"celo-alfajores\";\n Network2[\"CELO_BAKLAVA\"] = \"celo-baklava\";\n Network2[\"METIS_MAINNET\"] = \"metis-mainnet\";\n Network2[\"OPBNB_MAINNET\"] = \"opbnb-mainnet\";\n Network2[\"OPBNB_TESTNET\"] = \"opbnb-testnet\";\n Network2[\"BERACHAIN_BARTIO\"] = \"berachain-bartio\";\n Network2[\"BERACHAIN_MAINNET\"] = \"berachain-mainnet\";\n Network2[\"BERACHAIN_BEPOLIA\"] = \"berachain-bepolia\";\n Network2[\"SONEIUM_MAINNET\"] = \"soneium-mainnet\";\n Network2[\"SONEIUM_MINATO\"] = \"soneium-minato\";\n Network2[\"WORLDCHAIN_MAINNET\"] = \"worldchain-mainnet\";\n Network2[\"WORLDCHAIN_SEPOLIA\"] = \"worldchain-sepolia\";\n Network2[\"ROOTSTOCK_MAINNET\"] = \"rootstock-mainnet\";\n Network2[\"ROOTSTOCK_TESTNET\"] = \"rootstock-testnet\";\n Network2[\"FLOW_MAINNET\"] = \"flow-mainnet\";\n Network2[\"FLOW_TESTNET\"] = \"flow-testnet\";\n Network2[\"ZORA_MAINNET\"] = \"zora-mainnet\";\n Network2[\"ZORA_SEPOLIA\"] = \"zora-sepolia\";\n Network2[\"FRAX_MAINNET\"] = \"frax-mainnet\";\n Network2[\"FRAX_SEPOLIA\"] = \"frax-sepolia\";\n Network2[\"POLYNOMIAL_MAINNET\"] = \"polynomial-mainnet\";\n Network2[\"POLYNOMIAL_SEPOLIA\"] = \"polynomial-sepolia\";\n Network2[\"CROSSFI_MAINNET\"] = \"crossfi-mainnet\";\n Network2[\"CROSSFI_TESTNET\"] = \"crossfi-testnet\";\n Network2[\"APECHAIN_MAINNET\"] = \"apechain-mainnet\";\n Network2[\"APECHAIN_CURTIS\"] = \"apechain-curtis\";\n Network2[\"LENS_MAINNET\"] = \"lens-mainnet\";\n Network2[\"LENS_SEPOLIA\"] = \"lens-sepolia\";\n Network2[\"GEIST_MAINNET\"] = \"geist-mainnet\";\n Network2[\"GEIST_POLTER\"] = \"geist-polter\";\n Network2[\"LUMIA_PRISM\"] = \"lumia-prism\";\n Network2[\"LUMIA_TESTNET\"] = \"lumia-testnet\";\n Network2[\"UNICHAIN_MAINNET\"] = \"unichain-mainnet\";\n Network2[\"UNICHAIN_SEPOLIA\"] = \"unichain-sepolia\";\n Network2[\"SONIC_MAINNET\"] = \"sonic-mainnet\";\n Network2[\"SONIC_BLAZE\"] = \"sonic-blaze\";\n Network2[\"XMTP_TESTNET\"] = \"xmtp-testnet\";\n Network2[\"ABSTRACT_MAINNET\"] = \"abstract-mainnet\";\n Network2[\"ABSTRACT_TESTNET\"] = \"abstract-testnet\";\n Network2[\"DEGEN_MAINNET\"] = \"degen-mainnet\";\n Network2[\"INK_MAINNET\"] = \"ink-mainnet\";\n Network2[\"INK_SEPOLIA\"] = \"ink-sepolia\";\n Network2[\"SEI_MAINNET\"] = \"sei-mainnet\";\n Network2[\"SEI_TESTNET\"] = \"sei-testnet\";\n Network2[\"RONIN_MAINNET\"] = \"ronin-mainnet\";\n Network2[\"RONIN_SAIGON\"] = \"ronin-saigon\";\n Network2[\"MONAD_TESTNET\"] = \"monad-testnet\";\n Network2[\"SETTLUS_SEPTESTNET\"] = \"settlus-septestnet\";\n Network2[\"SETTLUS_MAINNET\"] = \"settlus-mainnet\";\n Network2[\"SOLANA_MAINNET\"] = \"solana-mainnet\";\n Network2[\"SOLANA_DEVNET\"] = \"solana-devnet\";\n Network2[\"GENSYN_TESTNET\"] = \"gensyn-testnet\";\n Network2[\"SUPERSEED_MAINNET\"] = \"superseed-mainnet\";\n Network2[\"SUPERSEED_SEPOLIA\"] = \"superseed-sepolia\";\n Network2[\"TEA_SEPOLIA\"] = \"tea-sepolia\";\n Network2[\"ANIME_MAINNET\"] = \"anime-mainnet\";\n Network2[\"ANIME_SEPOLIA\"] = \"anime-sepolia\";\n Network2[\"STORY_MAINNET\"] = \"story-mainnet\";\n Network2[\"STORY_AENEID\"] = \"story-aeneid\";\n Network2[\"MEGAETH_TESTNET\"] = \"megaeth-testnet\";\n Network2[\"BOTANIX_MAINNET\"] = \"botanix-mainnet\";\n Network2[\"BOTANIX_TESTNET\"] = \"botanix-testnet\";\n Network2[\"HUMANITY_MAINNET\"] = \"humanity-mainnet\";\n Network2[\"RISE_TESTNET\"] = \"rise-testnet\";\n })(Network || (Network = {}));\n (function(TokenBalanceType2) {\n TokenBalanceType2[\"DEFAULT_TOKENS\"] = \"DEFAULT_TOKENS\";\n TokenBalanceType2[\"ERC20\"] = \"erc20\";\n })(TokenBalanceType || (TokenBalanceType = {}));\n (function(AssetTransfersCategory2) {\n AssetTransfersCategory2[\"EXTERNAL\"] = \"external\";\n AssetTransfersCategory2[\"INTERNAL\"] = \"internal\";\n AssetTransfersCategory2[\"ERC20\"] = \"erc20\";\n AssetTransfersCategory2[\"ERC721\"] = \"erc721\";\n AssetTransfersCategory2[\"ERC1155\"] = \"erc1155\";\n AssetTransfersCategory2[\"SPECIALNFT\"] = \"specialnft\";\n })(AssetTransfersCategory || (AssetTransfersCategory = {}));\n (function(GetTransfersForOwnerTransferType2) {\n GetTransfersForOwnerTransferType2[\"TO\"] = \"TO\";\n GetTransfersForOwnerTransferType2[\"FROM\"] = \"FROM\";\n })(GetTransfersForOwnerTransferType || (GetTransfersForOwnerTransferType = {}));\n (function(SortingOrder2) {\n SortingOrder2[\"ASCENDING\"] = \"asc\";\n SortingOrder2[\"DESCENDING\"] = \"desc\";\n })(SortingOrder || (SortingOrder = {}));\n (function(OpenSeaSafelistRequestStatus2) {\n OpenSeaSafelistRequestStatus2[\"VERIFIED\"] = \"verified\";\n OpenSeaSafelistRequestStatus2[\"APPROVED\"] = \"approved\";\n OpenSeaSafelistRequestStatus2[\"REQUESTED\"] = \"requested\";\n OpenSeaSafelistRequestStatus2[\"NOT_REQUESTED\"] = \"not_requested\";\n })(OpenSeaSafelistRequestStatus || (OpenSeaSafelistRequestStatus = {}));\n (function(AlchemySubscription2) {\n AlchemySubscription2[\"PENDING_TRANSACTIONS\"] = \"alchemy_pendingTransactions\";\n AlchemySubscription2[\"MINED_TRANSACTIONS\"] = \"alchemy_minedTransactions\";\n })(AlchemySubscription || (AlchemySubscription = {}));\n (function(SimulateAssetType2) {\n SimulateAssetType2[\"NATIVE\"] = \"NATIVE\";\n SimulateAssetType2[\"ERC20\"] = \"ERC20\";\n SimulateAssetType2[\"ERC721\"] = \"ERC721\";\n SimulateAssetType2[\"ERC1155\"] = \"ERC1155\";\n SimulateAssetType2[\"SPECIAL_NFT\"] = \"SPECIAL_NFT\";\n })(SimulateAssetType || (SimulateAssetType = {}));\n (function(SimulateChangeType2) {\n SimulateChangeType2[\"APPROVE\"] = \"APPROVE\";\n SimulateChangeType2[\"TRANSFER\"] = \"TRANSFER\";\n })(SimulateChangeType || (SimulateChangeType = {}));\n (function(DecodingAuthority2) {\n DecodingAuthority2[\"ETHERSCAN\"] = \"ETHERSCAN\";\n })(DecodingAuthority || (DecodingAuthority = {}));\n (function(DebugCallType2) {\n DebugCallType2[\"CREATE\"] = \"CREATE\";\n DebugCallType2[\"CALL\"] = \"CALL\";\n DebugCallType2[\"STATICCALL\"] = \"STATICCALL\";\n DebugCallType2[\"DELEGATECALL\"] = \"DELEGATECALL\";\n })(DebugCallType || (DebugCallType = {}));\n (function(GasOptimizedTransactionStatus2) {\n GasOptimizedTransactionStatus2[\"UNSPECIFIED\"] = \"TRANSACTION_JOB_STATUS_UNSPECIFIED\";\n GasOptimizedTransactionStatus2[\"IN_PROGRESS\"] = \"IN_PROGRESS\";\n GasOptimizedTransactionStatus2[\"COMPLETE\"] = \"COMPLETE\";\n GasOptimizedTransactionStatus2[\"ABANDONED\"] = \"ABANDONED\";\n })(GasOptimizedTransactionStatus || (GasOptimizedTransactionStatus = {}));\n (function(WebhookVersion2) {\n WebhookVersion2[\"V1\"] = \"V1\";\n WebhookVersion2[\"V2\"] = \"V2\";\n })(WebhookVersion || (WebhookVersion = {}));\n (function(WebhookType2) {\n WebhookType2[\"MINED_TRANSACTION\"] = \"MINED_TRANSACTION\";\n WebhookType2[\"DROPPED_TRANSACTION\"] = \"DROPPED_TRANSACTION\";\n WebhookType2[\"ADDRESS_ACTIVITY\"] = \"ADDRESS_ACTIVITY\";\n WebhookType2[\"NFT_ACTIVITY\"] = \"NFT_ACTIVITY\";\n WebhookType2[\"NFT_METADATA_UPDATE\"] = \"NFT_METADATA_UPDATE\";\n WebhookType2[\"GRAPHQL\"] = \"GRAPHQL\";\n })(WebhookType || (WebhookType = {}));\n (function(CommitmentLevel2) {\n CommitmentLevel2[\"PENDING\"] = \"pending\";\n CommitmentLevel2[\"LATEST\"] = \"latest\";\n CommitmentLevel2[\"SAFE\"] = \"safe\";\n CommitmentLevel2[\"FINALIZED\"] = \"finalized\";\n CommitmentLevel2[\"EARLIEST\"] = \"earliest\";\n })(CommitmentLevel || (CommitmentLevel = {}));\n (function(DebugTracerType2) {\n DebugTracerType2[\"CALL_TRACER\"] = \"callTracer\";\n DebugTracerType2[\"PRESTATE_TRACER\"] = \"prestateTracer\";\n })(DebugTracerType || (DebugTracerType = {}));\n (function(NftTokenType2) {\n NftTokenType2[\"ERC721\"] = \"ERC721\";\n NftTokenType2[\"ERC1155\"] = \"ERC1155\";\n NftTokenType2[\"NO_SUPPORTED_NFT_STANDARD\"] = \"NO_SUPPORTED_NFT_STANDARD\";\n NftTokenType2[\"NOT_A_CONTRACT\"] = \"NOT_A_CONTRACT\";\n NftTokenType2[\"UNKNOWN\"] = \"UNKNOWN\";\n })(NftTokenType || (NftTokenType = {}));\n (function(NftSpamClassification2) {\n NftSpamClassification2[\"Erc721TooManyOwners\"] = \"Erc721TooManyOwners\";\n NftSpamClassification2[\"Erc721TooManyTokens\"] = \"Erc721TooManyTokens\";\n NftSpamClassification2[\"Erc721DishonestTotalSupply\"] = \"Erc721DishonestTotalSupply\";\n NftSpamClassification2[\"MostlyHoneyPotOwners\"] = \"MostlyHoneyPotOwners\";\n NftSpamClassification2[\"OwnedByMostHoneyPots\"] = \"OwnedByMostHoneyPots\";\n NftSpamClassification2[\"LowDistinctOwnersPercent\"] = \"LowDistinctOwnersPercent\";\n NftSpamClassification2[\"HighHoneyPotOwnerPercent\"] = \"HighHoneyPotOwnerPercent\";\n NftSpamClassification2[\"HighHoneyPotPercent\"] = \"HighHoneyPotPercent\";\n NftSpamClassification2[\"HoneyPotsOwnMultipleTokens\"] = \"HoneyPotsOwnMultipleTokens\";\n NftSpamClassification2[\"NoSalesActivity\"] = \"NoSalesActivity\";\n NftSpamClassification2[\"HighAirdropPercent\"] = \"HighAirdropPercent\";\n NftSpamClassification2[\"Unknown\"] = \"Unknown\";\n })(NftSpamClassification || (NftSpamClassification = {}));\n (function(NftFilters2) {\n NftFilters2[\"SPAM\"] = \"SPAM\";\n NftFilters2[\"AIRDROPS\"] = \"AIRDROPS\";\n })(NftFilters || (NftFilters = {}));\n (function(NftOrdering2) {\n NftOrdering2[\"TRANSFERTIME\"] = \"TRANSFERTIME\";\n })(NftOrdering || (NftOrdering = {}));\n (function(NftSaleMarketplace2) {\n NftSaleMarketplace2[\"SEAPORT\"] = \"seaport\";\n NftSaleMarketplace2[\"LOOKSRARE\"] = \"looksrare\";\n NftSaleMarketplace2[\"X2Y2\"] = \"x2y2\";\n NftSaleMarketplace2[\"WYVERN\"] = \"wyvern\";\n NftSaleMarketplace2[\"CRYPTOPUNKS\"] = \"cryptopunks\";\n NftSaleMarketplace2[\"BLUR\"] = \"blur\";\n NftSaleMarketplace2[\"UNKNOWN\"] = \"unknown\";\n })(NftSaleMarketplace || (NftSaleMarketplace = {}));\n (function(NftSaleTakerType2) {\n NftSaleTakerType2[\"BUYER\"] = \"buyer\";\n NftSaleTakerType2[\"SELLER\"] = \"seller\";\n })(NftSaleTakerType || (NftSaleTakerType = {}));\n (function(NftRefreshState2) {\n NftRefreshState2[\"DOES_NOT_EXIST\"] = \"does_not_exist\";\n NftRefreshState2[\"ALREADY_QUEUED\"] = \"already_queued\";\n NftRefreshState2[\"IN_PROGRESS\"] = \"in_progress\";\n NftRefreshState2[\"FINISHED\"] = \"finished\";\n NftRefreshState2[\"QUEUED\"] = \"queued\";\n NftRefreshState2[\"QUEUE_FAILED\"] = \"queue_failed\";\n })(NftRefreshState || (NftRefreshState = {}));\n (function(NftCollectionMarketplace2) {\n NftCollectionMarketplace2[\"OPENSEA\"] = \"OpenSea\";\n })(NftCollectionMarketplace || (NftCollectionMarketplace = {}));\n (function(HistoricalPriceInterval2) {\n HistoricalPriceInterval2[\"FIVE_MINUTE\"] = \"5m\";\n HistoricalPriceInterval2[\"ONE_HOUR\"] = \"1h\";\n HistoricalPriceInterval2[\"ONE_DAY\"] = \"1d\";\n })(HistoricalPriceInterval || (HistoricalPriceInterval = {}));\n DEFAULT_ALCHEMY_API_KEY = \"demo\";\n DEFAULT_NETWORK = Network.ETH_MAINNET;\n DEFAULT_MAX_RETRIES = 5;\n DEFAULT_REQUEST_TIMEOUT = 0;\n (function(AlchemyApiType2) {\n AlchemyApiType2[AlchemyApiType2[\"BASE\"] = 0] = \"BASE\";\n AlchemyApiType2[AlchemyApiType2[\"NFT\"] = 1] = \"NFT\";\n AlchemyApiType2[AlchemyApiType2[\"WEBHOOK\"] = 2] = \"WEBHOOK\";\n AlchemyApiType2[AlchemyApiType2[\"PRICES\"] = 3] = \"PRICES\";\n AlchemyApiType2[AlchemyApiType2[\"PORTFOLIO\"] = 4] = \"PORTFOLIO\";\n })(AlchemyApiType || (AlchemyApiType = {}));\n EthersNetwork = {\n [Network.ETH_MAINNET]: \"mainnet\",\n [Network.ETH_GOERLI]: \"goerli\",\n [Network.ETH_SEPOLIA]: \"sepolia\",\n [Network.ETH_HOLESKY]: \"holesky\",\n [Network.ETH_HOODI]: \"hoodi\",\n [Network.OPT_MAINNET]: \"opt-mainnet\",\n [Network.OPT_GOERLI]: \"optimism-goerli\",\n [Network.OPT_SEPOLIA]: \"optimism-sepolia\",\n [Network.ARB_MAINNET]: \"arbitrum\",\n [Network.ARB_GOERLI]: \"arbitrum-goerli\",\n [Network.ARB_SEPOLIA]: \"arbitrum-sepolia\",\n [Network.MATIC_MAINNET]: \"matic\",\n [Network.MATIC_MUMBAI]: \"maticmum\",\n [Network.MATIC_AMOY]: \"maticamoy\",\n [Network.SOLANA_MAINNET]: null,\n [Network.SOLANA_DEVNET]: null,\n [Network.ASTAR_MAINNET]: \"astar-mainnet\",\n [Network.POLYGONZKEVM_MAINNET]: \"polygonzkevm-mainnet\",\n [Network.POLYGONZKEVM_TESTNET]: \"polygonzkevm-testnet\",\n [Network.POLYGONZKEVM_CARDONA]: \"polygonzkevm-cardona\",\n [Network.BASE_MAINNET]: \"base-mainnet\",\n [Network.BASE_GOERLI]: \"base-goerli\",\n [Network.BASE_SEPOLIA]: \"base-sepolia\",\n [Network.ZKSYNC_MAINNET]: \"zksync-mainnet\",\n [Network.ZKSYNC_SEPOLIA]: \"zksync-sepolia\",\n [Network.SHAPE_MAINNET]: \"shape-mainnet\",\n [Network.SHAPE_SEPOLIA]: \"shape-sepolia\",\n [Network.LINEA_MAINNET]: \"linea-mainnet\",\n [Network.LINEA_SEPOLIA]: \"linea-sepolia\",\n [Network.FANTOM_MAINNET]: \"fantom-mainnet\",\n [Network.FANTOM_TESTNET]: \"fantom-testnet\",\n [Network.ZETACHAIN_MAINNET]: \"zetachain-mainnet\",\n [Network.ZETACHAIN_TESTNET]: \"zetachain-testnet\",\n [Network.ARBNOVA_MAINNET]: \"arbnova-mainnet\",\n [Network.BLAST_MAINNET]: \"blast-mainnet\",\n [Network.BLAST_SEPOLIA]: \"blast-sepolia\",\n [Network.MANTLE_MAINNET]: \"mantle-mainnet\",\n [Network.MANTLE_SEPOLIA]: \"mantle-sepolia\",\n [Network.SCROLL_MAINNET]: \"scroll-mainnet\",\n [Network.SCROLL_SEPOLIA]: \"scroll-sepolia\",\n [Network.GNOSIS_MAINNET]: \"gnosis-mainnet\",\n [Network.GNOSIS_CHIADO]: \"gnosis-chiado\",\n [Network.BNB_MAINNET]: \"bnb-mainnet\",\n [Network.BNB_TESTNET]: \"bnb-testnet\",\n [Network.AVAX_MAINNET]: \"avax-mainnet\",\n [Network.AVAX_FUJI]: \"avax-fuji\",\n [Network.CELO_MAINNET]: \"celo-mainnet\",\n [Network.CELO_ALFAJORES]: \"celo-alfajores\",\n [Network.CELO_BAKLAVA]: \"celo-baklava\",\n [Network.METIS_MAINNET]: \"metis-mainnet\",\n [Network.OPBNB_MAINNET]: \"opbnb-mainnet\",\n [Network.OPBNB_TESTNET]: \"opbnb-testnet\",\n [Network.BERACHAIN_BARTIO]: \"berachain-bartio\",\n [Network.BERACHAIN_MAINNET]: \"berachain-mainnet\",\n [Network.BERACHAIN_BEPOLIA]: \"berachain-bepolia\",\n [Network.SONEIUM_MAINNET]: \"soneium-mainnet\",\n [Network.SONEIUM_MINATO]: \"soneium-minato\",\n [Network.WORLDCHAIN_MAINNET]: \"worldchain-mainnet\",\n [Network.WORLDCHAIN_SEPOLIA]: \"worldchain-sepolia\",\n [Network.ROOTSTOCK_MAINNET]: \"rootstock-mainnet\",\n [Network.ROOTSTOCK_TESTNET]: \"rootstock-testnet\",\n [Network.FLOW_MAINNET]: \"flow-mainnet\",\n [Network.FLOW_TESTNET]: \"flow-testnet\",\n [Network.ZORA_MAINNET]: \"zora-mainnet\",\n [Network.ZORA_SEPOLIA]: \"zora-sepolia\",\n [Network.FRAX_MAINNET]: \"frax-mainnet\",\n [Network.FRAX_SEPOLIA]: \"frax-sepolia\",\n [Network.POLYNOMIAL_MAINNET]: \"polynomial-mainnet\",\n [Network.POLYNOMIAL_SEPOLIA]: \"polynomial-sepolia\",\n [Network.CROSSFI_MAINNET]: \"crossfi-mainnet\",\n [Network.CROSSFI_TESTNET]: \"crossfi-testnet\",\n [Network.APECHAIN_MAINNET]: \"apechain-mainnet\",\n [Network.APECHAIN_CURTIS]: \"apechain-curtis\",\n [Network.LENS_MAINNET]: \"lens-mainnet\",\n [Network.LENS_SEPOLIA]: \"lens-sepolia\",\n [Network.GEIST_MAINNET]: \"geist-mainnet\",\n [Network.GEIST_POLTER]: \"geist-polter\",\n [Network.LUMIA_PRISM]: \"lumia-prism\",\n [Network.LUMIA_TESTNET]: \"lumia-testnet\",\n [Network.UNICHAIN_MAINNET]: \"unichain-mainnet\",\n [Network.UNICHAIN_SEPOLIA]: \"unichain-sepolia\",\n [Network.SONIC_MAINNET]: \"sonic-mainnet\",\n [Network.SONIC_BLAZE]: \"sonic-blaze\",\n [Network.XMTP_TESTNET]: \"xmtp-testnet\",\n [Network.ABSTRACT_MAINNET]: \"abstract-mainnet\",\n [Network.ABSTRACT_TESTNET]: \"abstract-testnet\",\n [Network.DEGEN_MAINNET]: \"degen-mainnet\",\n [Network.INK_MAINNET]: \"ink-mainnet\",\n [Network.INK_SEPOLIA]: \"ink-sepolia\",\n [Network.SEI_MAINNET]: \"sei-mainnet\",\n [Network.SEI_TESTNET]: \"sei-testnet\",\n [Network.RONIN_MAINNET]: \"ronin-mainnet\",\n [Network.RONIN_SAIGON]: \"ronin-saigon\",\n [Network.MONAD_TESTNET]: \"monad-testnet\",\n [Network.SETTLUS_MAINNET]: \"settlus-mainnet\",\n [Network.SETTLUS_SEPTESTNET]: \"settlus-septestnet\",\n [Network.GENSYN_TESTNET]: \"gensyn-testnet\",\n [Network.SUPERSEED_MAINNET]: \"superseed-mainnet\",\n [Network.SUPERSEED_SEPOLIA]: \"superseed-sepolia\",\n [Network.TEA_SEPOLIA]: \"tea-sepolia\",\n [Network.ANIME_MAINNET]: \"anime-mainnet\",\n [Network.ANIME_SEPOLIA]: \"anime-sepolia\",\n [Network.STORY_MAINNET]: \"story-mainnet\",\n [Network.STORY_AENEID]: \"story-aeneid\",\n [Network.MEGAETH_TESTNET]: \"megaeth-testnet\",\n [Network.BOTANIX_MAINNET]: \"botanix-mainnet\",\n [Network.BOTANIX_TESTNET]: \"botanix-testnet\",\n [Network.HUMANITY_MAINNET]: \"humanity-mainnet\",\n [Network.RISE_TESTNET]: \"rise-testnet\"\n };\n CustomNetworks = {\n \"arbitrum-goerli\": {\n chainId: 421613,\n name: \"arbitrum-goerli\"\n },\n \"arbitrum-sepolia\": {\n chainId: 421614,\n name: \"arbitrum-sepolia\"\n },\n \"astar-mainnet\": {\n chainId: 592,\n name: \"astar-mainnet\"\n },\n sepolia: {\n chainId: 11155111,\n name: \"sepolia\"\n },\n holesky: {\n chainId: 17e3,\n name: \"holesky\"\n },\n hoodi: {\n chainId: 560048,\n name: \"hoodi\"\n },\n \"opt-mainnet\": {\n chainId: 10,\n name: \"opt-mainnet\"\n },\n \"optimism-sepolia\": {\n chainId: 11155420,\n name: \"optimism-sepolia\"\n },\n \"polygonzkevm-mainnet\": {\n chainId: 1101,\n name: \"polygonzkevm-mainnet\"\n },\n \"polygonzkevm-testnet\": {\n chainId: 1442,\n name: \"polygonzkevm-testnet\"\n },\n \"polygonzkevm-cardona\": {\n chainId: 2442,\n name: \"polygonzkevm-cardona\"\n },\n \"base-mainnet\": {\n chainId: 8453,\n name: \"base-mainnet\"\n },\n \"base-goerli\": {\n chainId: 84531,\n name: \"base-goerli\"\n },\n \"base-sepolia\": {\n chainId: 84532,\n name: \"base-sepolia\"\n },\n maticamoy: {\n chainId: 80002,\n name: \"maticamoy\"\n },\n \"zksync-mainnet\": {\n chainId: 324,\n name: \"zksync-mainnet\"\n },\n \"zksync-sepolia\": {\n chainId: 300,\n name: \"zksync-sepolia\"\n },\n \"shape-mainnet\": {\n chainId: 360,\n name: \"shape-mainnet\"\n },\n \"shape-sepolia\": {\n chainId: 11011,\n name: \"shape-sepolia\"\n },\n \"linea-mainnet\": {\n chainId: 59144,\n name: \"linea-mainnet\"\n },\n \"linea-sepolia\": {\n chainId: 59141,\n name: \"linea-sepolia\"\n },\n \"fantom-mainnet\": {\n chainId: 250,\n name: \"fantom-mainnet\"\n },\n \"fantom-testnet\": {\n chainId: 4002,\n name: \"fantom-testnet\"\n },\n \"zetachain-mainnet\": {\n chainId: 7e3,\n name: \"zetachain-mainnet\"\n },\n \"zetachain-testnet\": {\n chainId: 7001,\n name: \"zetachain-testnet\"\n },\n \"arbnova-mainnet\": {\n chainId: 42170,\n name: \"arbnova-mainnet\"\n },\n \"blast-mainnet\": {\n chainId: 81457,\n name: \"blast-mainnet\"\n },\n \"blast-sepolia\": {\n chainId: 168587773,\n name: \"blast-sepolia\"\n },\n \"mantle-mainnet\": {\n chainId: 5e3,\n name: \"mantle-mainnet\"\n },\n \"mantle-sepolia\": {\n chainId: 5003,\n name: \"mantle-sepolia\"\n },\n \"scroll-mainnet\": {\n chainId: 534352,\n name: \"scroll-mainnet\"\n },\n \"scroll-sepolia\": {\n chainId: 534351,\n name: \"scroll-sepolia\"\n },\n \"gnosis-mainnet\": {\n chainId: 100,\n name: \"gnosis-mainnet\"\n },\n \"gnosis-chiado\": {\n chainId: 10200,\n name: \"gnosis-chiado\"\n },\n \"bnb-mainnet\": {\n chainId: 56,\n name: \"bnb-mainnet\"\n },\n \"bnb-testnet\": {\n chainId: 97,\n name: \"bnb-testnet\"\n },\n \"avax-mainnet\": {\n chainId: 43114,\n name: \"avax-mainnet\"\n },\n \"avax-fuji\": {\n chainId: 43113,\n name: \"avax-fuji\"\n },\n \"celo-mainnet\": {\n chainId: 42220,\n name: \"celo-mainnet\"\n },\n \"celo-alfajores\": {\n chainId: 44787,\n name: \"celo-alfajores\"\n },\n \"celo-baklava\": {\n chainId: 62320,\n name: \"celo-baklava\"\n },\n \"metis-mainnet\": {\n chainId: 1088,\n name: \"metis-mainnet\"\n },\n \"opbnb-mainnet\": {\n chainId: 204,\n name: \"opbnb-mainnet\"\n },\n \"opbnb-testnet\": {\n chainId: 5611,\n name: \"opbnb-testnet\"\n },\n \"berachain-bartio\": {\n chainId: 80084,\n name: \"berachain-bartio\"\n },\n \"berachain-mainnet\": {\n chainId: 80094,\n name: \"berachain-mainnet\"\n },\n \"berachain-bepolia\": {\n chainId: 80069,\n name: \"berachain-bepolia\"\n },\n \"soneium-mainnet\": {\n chainId: 1868,\n name: \"soneium-mainnet\"\n },\n \"soneium-minato\": {\n chainId: 1946,\n name: \"soneium-minato\"\n },\n \"worldchain-mainnet\": {\n chainId: 480,\n name: \"worldchain-mainnet\"\n },\n \"worldchain-sepolia\": {\n chainId: 4801,\n name: \"worldchain-sepolia\"\n },\n \"rootstock-mainnet\": {\n chainId: 30,\n name: \"rootstock-mainnet\"\n },\n \"rootstock-testnet\": {\n chainId: 31,\n name: \"rootstock-testnet\"\n },\n \"flow-mainnet\": {\n chainId: 747,\n name: \"flow-mainnet\"\n },\n \"flow-testnet\": {\n chainId: 545,\n name: \"flow-testnet\"\n },\n \"zora-mainnet\": {\n chainId: 7777777,\n name: \"zora-mainnet\"\n },\n \"zora-sepolia\": {\n chainId: 999999999,\n name: \"zora-sepolia\"\n },\n \"frax-mainnet\": {\n chainId: 252,\n name: \"frax-mainnet\"\n },\n \"frax-sepolia\": {\n chainId: 2522,\n name: \"frax-sepolia\"\n },\n \"polynomial-mainnet\": {\n chainId: 8008,\n name: \"polynomial-mainnet\"\n },\n \"polynomial-sepolia\": {\n chainId: 8009,\n name: \"polynomial-sepolia\"\n },\n \"crossfi-mainnet\": {\n chainId: 4158,\n name: \"crossfi-mainnet\"\n },\n \"crossfi-testnet\": {\n chainId: 4157,\n name: \"crossfi-testnet\"\n },\n \"apechain-mainnet\": {\n chainId: 33139,\n name: \"apechain-mainnet\"\n },\n \"apechain-curtis\": {\n chainId: 33111,\n name: \"apechain-curtis\"\n },\n \"lens-mainnet\": {\n chainId: 232,\n name: \"lens-mainnet\"\n },\n \"lens-sepolia\": {\n chainId: 37111,\n name: \"lens-sepolia\"\n },\n \"geist-mainnet\": {\n chainId: 63157,\n name: \"geist-mainnet\"\n },\n \"geist-polter\": {\n chainId: 631571,\n name: \"geist-polter\"\n },\n \"lumia-prism\": {\n chainId: 994873017,\n name: \"lumia-prism\"\n },\n \"lumia-testnet\": {\n chainId: 1952959480,\n name: \"lumia-testnet\"\n },\n \"unichain-mainnet\": {\n chainId: 130,\n name: \"unichain-mainnet\"\n },\n \"unichain-sepolia\": {\n chainId: 1301,\n name: \"unichain-sepolia\"\n },\n \"sonic-mainnet\": {\n chainId: 146,\n name: \"sonic-mainnet\"\n },\n \"sonic-blaze\": {\n chainId: 57054,\n name: \"sonic-blaze\"\n },\n \"xmtp-testnet\": {\n chainId: 241320161,\n name: \"xmtp-testnet\"\n },\n \"abstract-mainnet\": {\n chainId: 2741,\n name: \"abstract-mainnet\"\n },\n \"abstract-testnet\": {\n chainId: 11124,\n name: \"abstract-testnet\"\n },\n \"degen-mainnet\": {\n chainId: 666666666,\n name: \"degen-mainnet\"\n },\n \"ink-mainnet\": {\n chainId: 57073,\n name: \"ink-mainnet\"\n },\n \"ink-sepolia\": {\n chainId: 763373,\n name: \"ink-sepolia\"\n },\n \"sei-mainnet\": {\n chainId: 1329,\n name: \"sei-mainnet\"\n },\n \"sei-testnet\": {\n chainId: 1328,\n name: \"sei-testnet\"\n },\n \"ronin-mainnet\": {\n chainId: 2020,\n name: \"ronin-mainnet\"\n },\n \"ronin-saigon\": {\n chainId: 2021,\n name: \"ronin-saigon\"\n },\n \"monad-testnet\": {\n chainId: 10143,\n name: \"monad-testnet\"\n },\n \"settlus-mainnet\": {\n chainId: 5371,\n name: \"settlus-mainnet\"\n },\n \"settlus-septestnet\": {\n chainId: 5373,\n name: \"settlus-septestnet\"\n },\n \"gensyn-testnet\": {\n chainId: 685685,\n name: \"gensyn-testnet\"\n },\n \"superseed-mainnet\": {\n chainId: 5330,\n name: \"superseed-mainnet\"\n },\n \"superseed-sepolia\": {\n chainId: 53302,\n name: \"superseed-sepolia\"\n },\n \"tea-sepolia\": {\n chainId: 10218,\n name: \"tea-sepolia\"\n },\n \"anime-mainnet\": {\n chainId: 69e3,\n name: \"anime-mainnet\"\n },\n \"anime-sepolia\": {\n chainId: 6900,\n name: \"anime-sepolia\"\n },\n \"story-mainnet\": {\n chainId: 1514,\n name: \"story-mainnet\"\n },\n \"story-aeneid\": {\n chainId: 1315,\n name: \"story-aeneid\"\n },\n \"megaeth-testnet\": {\n chainId: 6342,\n name: \"megaeth-testnet\"\n },\n \"botanix-mainnet\": {\n chainId: 3636,\n name: \"botanix-mainnet\"\n },\n \"botanix-testnet\": {\n chainId: 3637,\n name: \"botanix-testnet\"\n },\n \"humanity-mainnet\": {\n chainId: 6985385,\n name: \"humanity-mainnet\"\n },\n \"rise-testnet\": {\n chainId: 11155931,\n name: \"rise-testnet\"\n }\n };\n ETH_NULL_VALUE = \"0x\";\n ETH_NULL_ADDRESS = \"0x0000000000000000000000000000000000000000\";\n AlchemyConfig = class {\n constructor(config2) {\n this.apiKey = (config2 === null || config2 === void 0 ? void 0 : config2.apiKey) || DEFAULT_ALCHEMY_API_KEY;\n this.network = (config2 === null || config2 === void 0 ? void 0 : config2.network) || DEFAULT_NETWORK;\n this.maxRetries = (config2 === null || config2 === void 0 ? void 0 : config2.maxRetries) || DEFAULT_MAX_RETRIES;\n this.url = config2 === null || config2 === void 0 ? void 0 : config2.url;\n this.authToken = config2 === null || config2 === void 0 ? void 0 : config2.authToken;\n this.batchRequests = (config2 === null || config2 === void 0 ? void 0 : config2.batchRequests) || false;\n this.requestTimeout = (config2 === null || config2 === void 0 ? void 0 : config2.requestTimeout) || DEFAULT_REQUEST_TIMEOUT;\n this.connectionInfoOverrides = config2 === null || config2 === void 0 ? void 0 : config2.connectionInfoOverrides;\n }\n /**\n * Returns the URL endpoint to send the HTTP request to. If a custom URL was\n * provided in the config, that URL is returned. Otherwise, the default URL is\n * from the network and API key.\n *\n * @param apiType - The type of API to get the URL for.\n * @internal\n */\n _getRequestUrl(apiType) {\n if (this.url !== void 0) {\n return this.url;\n } else if (apiType === AlchemyApiType.NFT) {\n return getAlchemyNftHttpUrl(this.network, this.apiKey);\n } else if (apiType === AlchemyApiType.WEBHOOK) {\n return getAlchemyWebhookHttpUrl();\n } else if (apiType === AlchemyApiType.PRICES) {\n return getPricesBaseUrl(this.apiKey);\n } else if (apiType === AlchemyApiType.PORTFOLIO) {\n return getDataBaseUrl(this.apiKey);\n } else {\n return getAlchemyHttpUrl(this.network, this.apiKey);\n }\n }\n /**\n * Returns an AlchemyProvider instance. Only one provider is created per\n * Alchemy instance.\n *\n * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and\n * has been expanded to support Alchemy's Enhanced APIs.\n *\n * Most common methods on the provider are available as top-level methods on\n * the {@link Alchemy} instance, but the provider is exposed here to access\n * other less-common methods.\n *\n * @public\n */\n getProvider() {\n if (!this._baseAlchemyProvider) {\n this._baseAlchemyProvider = (() => __awaiter$1(this, void 0, void 0, function* () {\n const { AlchemyProvider: AlchemyProvider2 } = yield Promise.resolve().then(() => (init_alchemy_provider_6bbed8a2(), alchemy_provider_6bbed8a2_exports));\n return new AlchemyProvider2(this);\n }))();\n }\n return this._baseAlchemyProvider;\n }\n /**\n * Returns an AlchemyWebsocketProvider instance. Only one provider is created\n * per Alchemy instance.\n *\n * The AlchemyWebSocketProvider is a wrapper around ether's\n * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's\n * Subscription APIs, automatic backfilling, and other performance improvements.\n *\n * Most common methods on the provider are available as top-level methods on\n * the {@link Alchemy} instance, but the provider is exposed here to access\n * other less-common methods.\n */\n getWebSocketProvider() {\n if (!this._baseAlchemyWssProvider) {\n this._baseAlchemyWssProvider = (() => __awaiter$1(this, void 0, void 0, function* () {\n const { AlchemyWebSocketProvider: AlchemyWebSocketProvider2 } = yield Promise.resolve().then(() => (init_alchemy_websocket_provider_bdfaf8f9(), alchemy_websocket_provider_bdfaf8f9_exports));\n return new AlchemyWebSocketProvider2(this);\n }))();\n }\n return this._baseAlchemyWssProvider;\n }\n };\n version$12 = \"logger/5.7.0\";\n _permanentCensorErrors2 = false;\n _censorErrors2 = false;\n LogLevels2 = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\n _logLevel2 = LogLevels2[\"default\"];\n _globalLogger2 = null;\n _normalizeError2 = _checkNormalize2();\n (function(LogLevel4) {\n LogLevel4[\"DEBUG\"] = \"DEBUG\";\n LogLevel4[\"INFO\"] = \"INFO\";\n LogLevel4[\"WARNING\"] = \"WARNING\";\n LogLevel4[\"ERROR\"] = \"ERROR\";\n LogLevel4[\"OFF\"] = \"OFF\";\n })(LogLevel$1 || (LogLevel$1 = {}));\n (function(ErrorCode3) {\n ErrorCode3[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n ErrorCode3[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n ErrorCode3[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n ErrorCode3[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n ErrorCode3[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n ErrorCode3[\"TIMEOUT\"] = \"TIMEOUT\";\n ErrorCode3[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n ErrorCode3[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ErrorCode3[\"MISSING_NEW\"] = \"MISSING_NEW\";\n ErrorCode3[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n ErrorCode3[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n ErrorCode3[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ErrorCode3[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n ErrorCode3[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n ErrorCode3[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n ErrorCode3[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n ErrorCode3[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n ErrorCode3[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ErrorCode3[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n })(ErrorCode2 || (ErrorCode2 = {}));\n HEX2 = \"0123456789abcdef\";\n Logger$1 = class _Logger$1 {\n constructor(version8) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version8,\n writable: false\n });\n }\n _log(logLevel, args) {\n const level = logLevel.toLowerCase();\n if (LogLevels2[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel2 > LogLevels2[level]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(_Logger$1.levels.DEBUG, args);\n }\n info(...args) {\n this._log(_Logger$1.levels.INFO, args);\n }\n warn(...args) {\n this._log(_Logger$1.levels.WARNING, args);\n }\n makeError(message, code, params) {\n if (_censorErrors2) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = _Logger$1.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i3 = 0; i3 < value.length; i3++) {\n hex += HEX2[value[i3] >> 4];\n hex += HEX2[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 const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode2.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const 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 ErrorCode2.CALL_EXCEPTION:\n case ErrorCode2.INSUFFICIENT_FUNDS:\n case ErrorCode2.MISSING_NEW:\n case ErrorCode2.NONCE_EXPIRED:\n case ErrorCode2.REPLACEMENT_UNDERPRICED:\n case ErrorCode2.TRANSACTION_REPLACED:\n case ErrorCode2.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 const 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 throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, _Logger$1.errors.INVALID_ARGUMENT, {\n argument: name,\n value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (_normalizeError2) {\n this.throwError(\"platform missing String.prototype.normalize\", _Logger$1.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\",\n form: _normalizeError2\n });\n }\n }\n checkSafeUint53(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, _Logger$1.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value\n });\n }\n if (value % 1) {\n this.throwError(message, _Logger$1.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value\n });\n }\n }\n checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, _Logger$1.errors.MISSING_ARGUMENT, {\n count,\n expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, _Logger$1.errors.UNEXPECTED_ARGUMENT, {\n count,\n expectedCount\n });\n }\n }\n checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", _Logger$1.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", _Logger$1.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", _Logger$1.errors.MISSING_NEW, { name: kind.name });\n }\n }\n static globalLogger() {\n if (!_globalLogger2) {\n _globalLogger2 = new _Logger$1(version$12);\n }\n return _globalLogger2;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", _Logger$1.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors2) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", _Logger$1.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors2 = !!censorship;\n _permanentCensorErrors2 = !!permanent;\n }\n static setLogLevel(logLevel) {\n const level = LogLevels2[logLevel.toLowerCase()];\n if (level == null) {\n _Logger$1.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel2 = level;\n }\n static from(version8) {\n return new _Logger$1(version8);\n }\n };\n Logger$1.errors = ErrorCode2;\n Logger$1.levels = LogLevel$1;\n version6 = \"properties/5.7.0\";\n __awaiter2 = 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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 logger2 = new Logger$1(version6);\n opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n IS_BROWSER = typeof window !== \"undefined\" && window !== null;\n CoreNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Returns the balance of a given address as of the provided block.\n *\n * @param addressOrName The address or name of the account to get the balance for.\n * @param blockTag The optional block number or hash to get the balance for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n getBalance(addressOrName, blockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getBalance(addressOrName, blockTag);\n });\n }\n /**\n * Checks if the provided address is a smart contract.\n *\n * @param address The address to check type for.\n * @public\n */\n isContractAddress(address) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const code = yield provider.getCode(address);\n return code !== \"0x\";\n });\n }\n /**\n * Returns the contract code of the provided address at the block. If there is\n * no contract deployed, the result is `0x`.\n *\n * @param addressOrName The address or name of the account to get the code for.\n * @param blockTag The optional block number or hash to get the code for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n getCode(addressOrName, blockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getCode(addressOrName, blockTag);\n });\n }\n /**\n * Return the value of the provided position at the provided address, at the\n * provided block in `Bytes32` format.\n *\n * @param addressOrName The address or name of the account to get the code for.\n * @param position The position of the storage slot to get.\n * @param blockTag The optional block number or hash to get the code for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n getStorageAt(addressOrName, position, blockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getStorageAt(addressOrName, position, blockTag);\n });\n }\n /**\n * Returns the number of transactions ever sent from the provided address, as\n * of the provided block tag. This value is used as the nonce for the next\n * transaction from the address sent to the network.\n *\n * @param addressOrName The address or name of the account to get the nonce for.\n * @param blockTag The optional block number or hash to get the nonce for.\n * @public\n */\n getTransactionCount(addressOrName, blockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getTransactionCount(addressOrName, blockTag);\n });\n }\n /**\n * Returns the block from the network based on the provided block number or\n * hash. Transactions on the block are represented as an array of transaction\n * hashes. To get the full transaction details on the block, use\n * {@link getBlockWithTransactions} instead.\n *\n * @param blockHashOrBlockTag The block number or hash to get the block for.\n * @public\n */\n getBlock(blockHashOrBlockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getBlock(blockHashOrBlockTag);\n });\n }\n /**\n * Returns the block from the network based on the provided block number or\n * hash. Transactions on the block are represented as an array of\n * {@link TransactionResponse} objects.\n *\n * @param blockHashOrBlockTag The block number or hash to get the block for.\n * @public\n */\n getBlockWithTransactions(blockHashOrBlockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getBlockWithTransactions(blockHashOrBlockTag);\n });\n }\n /**\n * Returns the {@link EthersNetworkAlias} Alchemy is connected to.\n *\n * @public\n */\n getNetwork() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getNetwork();\n });\n }\n /**\n * Returns the block number of the most recently mined block.\n *\n * @public\n */\n getBlockNumber() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getBlockNumber();\n });\n }\n /**\n * Returns the best guess of the current gas price to use in a transaction.\n *\n * @public\n */\n getGasPrice() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getGasPrice();\n });\n }\n /**\n * Returns the recommended fee data to use in a transaction.\n *\n * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas\n * should be used.\n *\n * For legacy transactions and networks which do not support EIP-1559, the\n * gasPrice should be used.\n *\n * @public\n */\n getFeeData() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getFeeData();\n });\n }\n /**\n * Returns a Promise which will stall until the network has heen established,\n * ignoring errors due to the target node not being active yet.\n *\n * This can be used for testing or attaching scripts to wait until the node is\n * up and running smoothly.\n *\n * @public\n */\n ready() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.ready;\n });\n }\n /**\n * Returns the result of executing the transaction, using call. A call does\n * not require any ether, but cannot change any state. This is useful for\n * calling getters on Contracts.\n *\n * @param transaction The transaction to execute.\n * @param blockTag The optional block number or hash to get the call for.\n * @public\n */\n call(transaction, blockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.call(transaction, blockTag);\n });\n }\n /**\n * Returns an estimate of the amount of gas that would be required to submit\n * transaction to the network.\n *\n * An estimate may not be accurate since there could be another transaction on\n * the network that was not accounted for, but after being mined affects the\n * relevant state.\n *\n * This is an alias for {@link TransactNamespace.estimateGas}.\n *\n * @param transaction The transaction to estimate gas for.\n * @public\n */\n estimateGas(transaction) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.estimateGas(transaction);\n });\n }\n /**\n * Returns the transaction with hash or null if the transaction is unknown.\n *\n * If a transaction has not been mined, this method will search the\n * transaction pool. Various backends may have more restrictive transaction\n * pool access (e.g. if the gas price is too low or the transaction was only\n * recently sent and not yet indexed) in which case this method may also return null.\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n getTransaction(transactionHash) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getTransaction(transactionHash);\n });\n }\n /**\n * Returns the transaction receipt for hash or null if the transaction has not\n * been mined.\n *\n * To stall until the transaction has been mined, consider the\n * waitForTransaction method below.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n getTransactionReceipt(transactionHash) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getTransactionReceipt(transactionHash);\n });\n }\n /**\n * Submits transaction to the network to be mined. The transaction must be\n * signed, and be valid (i.e. the nonce is correct and the account has\n * sufficient balance to pay for the transaction).\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param signedTransaction The signed transaction to send.\n * @public\n */\n sendTransaction(signedTransaction) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.sendTransaction(signedTransaction);\n });\n }\n /**\n * Returns a promise which will not resolve until specified transaction hash is mined.\n *\n * If {@link confirmations} is 0, this method is non-blocking and if the\n * transaction has not been mined returns null. Otherwise, this method will\n * block until the transaction has confirmed blocks mined on top of the block\n * in which it was mined.\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to wait for.\n * @param confirmations The number of blocks to wait for.\n * @param timeout The maximum time to wait for the transaction to confirm.\n * @public\n */\n waitForTransaction(transactionHash, confirmations, timeout) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.waitForTransaction(transactionHash, confirmations, timeout);\n });\n }\n /**\n * Returns an array of logs that match the provided filter.\n *\n * @param filter The filter object to use.\n * @public\n */\n getLogs(filter2) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return getLogs2(this.config, filter2);\n });\n }\n /**\n * Allows sending a raw message to the Alchemy backend.\n *\n * @param method The method to call.\n * @param params The parameters to pass to the method.\n * @public\n */\n send(method, params) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.send(method, params);\n });\n }\n /**\n * Finds the address that deployed the provided contract and block number it\n * was deployed in.\n *\n * NOTE: This method performs a binary search across all blocks since genesis\n * and can take a long time to complete. This method is a convenience method\n * that will eventually be replaced by a single call to an Alchemy endpoint\n * with this information cached.\n *\n * @param contractAddress - The contract address to find the deployer for.\n * @beta\n */\n findContractDeployer(contractAddress) {\n var _a2;\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const currentBlockNum = yield provider.getBlockNumber();\n if ((yield provider.getCode(contractAddress, currentBlockNum)) === ETH_NULL_VALUE) {\n throw new Error(`Contract '${contractAddress}' does not exist`);\n }\n const firstBlock = yield binarySearchFirstBlock(0, currentBlockNum + 1, contractAddress, this.config);\n const txReceipts = yield getTransactionReceipts(this.config, {\n blockNumber: toHex2(firstBlock)\n }, \"findContractDeployer\");\n const matchingReceipt = (_a2 = txReceipts.receipts) === null || _a2 === void 0 ? void 0 : _a2.find((receipt) => receipt.contractAddress === contractAddress.toLowerCase());\n return {\n deployerAddress: matchingReceipt === null || matchingReceipt === void 0 ? void 0 : matchingReceipt.from,\n blockNumber: firstBlock\n };\n });\n }\n getTokenBalances(addressOrName, contractAddressesOrOptions) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const address = yield provider._getAddress(addressOrName);\n if (Array.isArray(contractAddressesOrOptions)) {\n if (contractAddressesOrOptions.length > 1500) {\n throw new Error(\"You cannot pass in more than 1500 contract addresses to getTokenBalances()\");\n }\n if (contractAddressesOrOptions.length === 0) {\n throw new Error(\"getTokenBalances() requires at least one contractAddress when using an array\");\n }\n return provider._send(\"alchemy_getTokenBalances\", [address, contractAddressesOrOptions], \"getTokenBalances\");\n } else {\n const tokenType = contractAddressesOrOptions === void 0 ? TokenBalanceType.ERC20 : contractAddressesOrOptions.type;\n const params = [address, tokenType];\n if ((contractAddressesOrOptions === null || contractAddressesOrOptions === void 0 ? void 0 : contractAddressesOrOptions.type) === TokenBalanceType.ERC20 && contractAddressesOrOptions.pageKey) {\n params.push({ pageKey: contractAddressesOrOptions.pageKey });\n }\n return provider._send(\"alchemy_getTokenBalances\", params, \"getTokenBalances\");\n }\n });\n }\n /**\n * Returns the tokens that the specified address owns, along with the amount\n * of each token and the relevant metadata.\n *\n * @param addressOrName The owner address to get the tokens with balances for.\n * @param options Additional options to pass to the request.\n * @public\n */\n getTokensForOwner(addressOrName, options) {\n var _a2;\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const address = yield provider._getAddress(addressOrName);\n const params = [\n address,\n (_a2 = options === null || options === void 0 ? void 0 : options.contractAddresses) !== null && _a2 !== void 0 ? _a2 : TokenBalanceType.ERC20\n ];\n if (options === null || options === void 0 ? void 0 : options.pageKey) {\n params.push({ pageKey: options.pageKey });\n }\n const response = yield provider._send(\"alchemy_getTokenBalances\", params, \"getTokensForOwner\");\n const formattedBalances = response.tokenBalances.map((balance) => ({\n contractAddress: balance.contractAddress,\n rawBalance: import_bignumber2.BigNumber.from(balance.tokenBalance).toString()\n }));\n const metadataPromises = yield Promise.allSettled(response.tokenBalances.map((token) => provider._send(\"alchemy_getTokenMetadata\", [token.contractAddress], \"getTokensForOwner\")));\n const metadata = metadataPromises.map((p4) => p4.status === \"fulfilled\" ? p4.value : {\n name: null,\n symbol: null,\n decimals: null,\n logo: null\n });\n const ownedTokens = formattedBalances.map((balance, index2) => Object.assign(Object.assign(Object.assign({}, balance), metadata[index2]), { balance: metadata[index2].decimals !== null ? (0, import_units.formatUnits)(balance.rawBalance, metadata[index2].decimals) : void 0 }));\n return {\n tokens: ownedTokens.map((t3) => nullsToUndefined(t3)),\n pageKey: response.pageKey\n };\n });\n }\n /**\n * Returns metadata for a given token contract address.\n *\n * @param address The contract address to get metadata for.\n * @public\n */\n getTokenMetadata(address) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider._send(\"alchemy_getTokenMetadata\", [address], \"getTokenMetadata\");\n });\n }\n getAssetTransfers(params) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return getAssetTransfers(this.config, params);\n });\n }\n /**\n * Gets all transaction receipts for a given block by number or block hash.\n *\n * @param params An object containing fields for the transaction receipt query.\n * @public\n */\n getTransactionReceipts(params) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return getTransactionReceipts(this.config, params);\n });\n }\n /**\n * Returns the underlying owner address for the provided ENS address, or `null`\n * if the ENS name does not have an underlying address.\n *\n * @param name The ENS address name to resolve.\n */\n resolveName(name) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.resolveName(name);\n });\n }\n /**\n * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned.\n *\n * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain.\n *\n * @param address The address to look up the ENS domain name for.\n */\n lookupAddress(address) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.lookupAddress(address);\n });\n }\n };\n DebugNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n traceCall(transaction, blockIdentifier, tracer) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = [transaction, blockIdentifier, parseTracerParams(tracer)];\n return provider._send(\"debug_traceCall\", params, \"traceCall\");\n });\n }\n traceTransaction(transactionHash, tracer, timeout) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = [transactionHash, parseTracerParams(tracer, timeout)];\n return provider._send(\"debug_traceTransaction\", params, \"traceTransaction\");\n });\n }\n traceBlock(blockIdentifier, tracer) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n let method;\n let params;\n if ((0, import_bytes4.isHexString)(blockIdentifier, 32)) {\n method = \"debug_traceBlockByHash\";\n params = [blockIdentifier, parseTracerParams(tracer)];\n } else {\n method = \"debug_traceBlockByNumber\";\n const block = typeof blockIdentifier === \"number\" ? (0, import_bytes4.hexStripZeros)((0, import_bytes4.hexValue)(blockIdentifier)) : blockIdentifier;\n params = [block, parseTracerParams(tracer)];\n }\n return provider._send(method, params, \"traceBlock\");\n });\n }\n };\n (function(LogLevel4) {\n LogLevel4[LogLevel4[\"DEBUG\"] = 0] = \"DEBUG\";\n LogLevel4[LogLevel4[\"INFO\"] = 1] = \"INFO\";\n LogLevel4[LogLevel4[\"WARN\"] = 2] = \"WARN\";\n LogLevel4[LogLevel4[\"ERROR\"] = 3] = \"ERROR\";\n LogLevel4[LogLevel4[\"SILENT\"] = 4] = \"SILENT\";\n })(LogLevel3 || (LogLevel3 = {}));\n logLevelStringToEnum = {\n debug: LogLevel3.DEBUG,\n info: LogLevel3.INFO,\n warn: LogLevel3.WARN,\n error: LogLevel3.ERROR,\n silent: LogLevel3.SILENT\n };\n logLevelToConsoleFn = {\n [LogLevel3.DEBUG]: \"log\",\n [LogLevel3.INFO]: \"info\",\n [LogLevel3.WARN]: \"warn\",\n [LogLevel3.ERROR]: \"error\"\n };\n DEFAULT_LOG_LEVEL = LogLevel3.INFO;\n Logger3 = class {\n constructor() {\n this._logLevel = DEFAULT_LOG_LEVEL;\n }\n get logLevel() {\n return this._logLevel;\n }\n set logLevel(val) {\n if (!(val in LogLevel3)) {\n throw new TypeError(`Invalid value \"${val}\" assigned to \\`logLevel\\``);\n }\n this._logLevel = val;\n }\n debug(...args) {\n this._log(LogLevel3.DEBUG, ...args);\n }\n info(...args) {\n this._log(LogLevel3.INFO, ...args);\n }\n warn(...args) {\n this._log(LogLevel3.WARN, ...args);\n }\n error(...args) {\n this._log(LogLevel3.ERROR, ...args);\n }\n /**\n * Forwards log messages to their corresponding console counterparts if the\n * log level allows it.\n */\n _log(logLevel, ...args) {\n if (logLevel < this._logLevel) {\n return;\n }\n const now2 = (/* @__PURE__ */ new Date()).toISOString();\n const method = logLevelToConsoleFn[logLevel];\n if (method) {\n console[method](`[${now2}] Alchemy:`, ...args.map(stringify3));\n } else {\n throw new Error(`Logger received an invalid logLevel (value: ${logLevel})`);\n }\n }\n };\n loggerClient = new Logger3();\n VERSION4 = \"3.6.2\";\n DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1e3;\n DEFAULT_BACKOFF_MULTIPLIER = 1.5;\n DEFAULT_BACKOFF_MAX_DELAY_MS = 30 * 1e3;\n DEFAULT_BACKOFF_MAX_ATTEMPTS = 5;\n ExponentialBackoff = class {\n constructor(maxAttempts = DEFAULT_BACKOFF_MAX_ATTEMPTS) {\n this.maxAttempts = maxAttempts;\n this.initialDelayMs = DEFAULT_BACKOFF_INITIAL_DELAY_MS;\n this.backoffMultiplier = DEFAULT_BACKOFF_MULTIPLIER;\n this.maxDelayMs = DEFAULT_BACKOFF_MAX_DELAY_MS;\n this.numAttempts = 0;\n this.currentDelayMs = 0;\n this.isInBackoff = false;\n }\n /**\n * Returns a promise that resolves after the the backoff delay. The delay is\n * increased for each attempt. The promise is rejected if the maximum number\n * of attempts is exceeded.\n */\n // TODO: beautify this into an async iterator.\n backoff() {\n if (this.numAttempts >= this.maxAttempts) {\n return Promise.reject(new Error(`Exceeded maximum number of attempts: ${this.maxAttempts}`));\n }\n if (this.isInBackoff) {\n return Promise.reject(new Error(\"A backoff operation is already in progress\"));\n }\n const backoffDelayWithJitterMs = this.withJitterMs(this.currentDelayMs);\n if (backoffDelayWithJitterMs > 0) {\n logDebug(\"ExponentialBackoff.backoff\", `Backing off for ${backoffDelayWithJitterMs}ms`);\n }\n this.currentDelayMs *= this.backoffMultiplier;\n this.currentDelayMs = Math.max(this.currentDelayMs, this.initialDelayMs);\n this.currentDelayMs = Math.min(this.currentDelayMs, this.maxDelayMs);\n this.numAttempts += 1;\n return new Promise((resolve) => {\n this.isInBackoff = true;\n setTimeout(() => {\n this.isInBackoff = false;\n resolve();\n }, backoffDelayWithJitterMs);\n });\n }\n /**\n * Applies +/- 50% jitter to the backoff delay, up to the max delay cap.\n *\n * @private\n * @param delayMs\n */\n withJitterMs(delayMs) {\n return Math.min(delayMs + (Math.random() - 0.5) * delayMs, this.maxDelayMs);\n }\n };\n NftNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n getNftMetadata(contractAddress, tokenId, optionsOrTokenType, tokenUriTimeoutInMs) {\n let options;\n if (typeof optionsOrTokenType === \"object\") {\n options = {\n tokenType: optionsOrTokenType.tokenType,\n tokenUriTimeoutInMs: optionsOrTokenType.tokenUriTimeoutInMs,\n refreshCache: optionsOrTokenType.refreshCache\n };\n } else {\n options = {\n tokenType: optionsOrTokenType,\n tokenUriTimeoutInMs\n };\n }\n return getNftMetadata(this.config, contractAddress, tokenId, options);\n }\n /**\n * Gets the NFT metadata for multiple NFT tokens.\n *\n * @param tokens An array of NFT tokens to fetch metadata for.\n * @param options Configuration options for making the request.\n */\n getNftMetadataBatch(tokens, options) {\n return getNftMetadataBatch(this.config, tokens, options);\n }\n /**\n * Get the NFT contract metadata associated with the provided parameters.\n *\n * @param contractAddress - The contract address of the NFT.\n * @public\n */\n getContractMetadata(contractAddress) {\n return getContractMetadata(this.config, contractAddress);\n }\n /**\n * Get the NFT contract metadata for multiple NFT contracts in a single request.\n *\n * @param contractAddresses - An array of contract addresses to fetch metadata for.\n */\n getContractMetadataBatch(contractAddresses) {\n return getContractMetadataBatch(this.config, contractAddresses);\n }\n /**\n * Get the NFT collection metadata associated with the provided parameters.\n *\n * @param collectionSlug - The OpenSea collection slug of the NFT.\n * @beta\n */\n getCollectionMetadata(collectionSlug) {\n return getCollectionMetadata(this.config, collectionSlug);\n }\n getNftsForOwnerIterator(owner, options) {\n return getNftsForOwnerIterator(this.config, owner, options);\n }\n getNftsForOwner(owner, options) {\n return getNftsForOwner(this.config, owner, options);\n }\n getNftsForContract(contractAddress, options) {\n return getNftsForContract(this.config, contractAddress, options);\n }\n getNftsForContractIterator(contractAddress, options) {\n return getNftsForContractIterator(this.config, contractAddress, options);\n }\n getOwnersForContract(contractAddress, options) {\n return getOwnersForContract(this.config, contractAddress, options);\n }\n /**\n * Gets all the owners for a given NFT contract address and token ID.\n *\n * @param contractAddress - The NFT contract address.\n * @param tokenId - Token id of the NFT.\n * @param options - Optional parameters to use for the request.\n * @beta\n */\n getOwnersForNft(contractAddress, tokenId, options) {\n return getOwnersForNft(this.config, contractAddress, tokenId, options);\n }\n /**\n * Gets all NFT contracts held by the specified owner address.\n *\n * @param owner - Address for NFT owner (can be in ENS format!).\n * @param options - The optional parameters to use for the request.\n * @public\n */\n // TODO(v3): Add overload for withMetadata=false\n getContractsForOwner(owner, options) {\n return getContractsForOwner(this.config, owner, options);\n }\n /**\n * Gets all NFT transfers for a given owner's address.\n *\n * @param owner The owner to get transfers for.\n * @param category Whether to get transfers to or from the owner address.\n * @param options Additional options for the request.\n */\n getTransfersForOwner(owner, category, options) {\n return getTransfersForOwner(this.config, owner, category, options);\n }\n /**\n * Gets all NFT transfers for a given NFT contract address.\n *\n * Defaults to all transfers for the contract. To get transfers for a specific\n * block range, use {@link GetTransfersForContractOptions}.\n *\n * @param contract The NFT contract to get transfers for.\n * @param options Additional options for the request.\n */\n getTransfersForContract(contract, options) {\n return getTransfersForContract(this.config, contract, options);\n }\n /**\n * Get all the NFTs minted by a specified owner address.\n *\n * @param owner - Address for the NFT owner (can be in ENS format).\n * @param options - The optional parameters to use for the request.\n */\n getMintedNfts(owner, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return getMintedNfts(this.config, owner, options);\n });\n }\n verifyNftOwnership(owner, contractAddress) {\n return verifyNftOwnership(this.config, owner, contractAddress);\n }\n /**\n * Returns whether a contract is marked as spam or not by Alchemy. For more\n * information on how we classify spam, go to our NFT API FAQ at\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n *\n * @param contractAddress - The contract address to check.\n */\n isSpamContract(contractAddress) {\n return isSpamContract(this.config, contractAddress);\n }\n /**\n * Returns a list of all spam contracts marked by Alchemy. For details on how\n * Alchemy marks spam contracts, go to\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n */\n getSpamContracts() {\n return getSpamContracts(this.config);\n }\n /**\n * Returns whether a contract is marked as spam or not by Alchemy. For more\n * information on how we classify spam, go to our NFT API FAQ at\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n *\n * @param contractAddress - The contract address to check.\n */\n reportSpam(contractAddress) {\n return reportSpam(this.config, contractAddress);\n }\n /**\n * Returns whether a token is marked as an airdrop or not.\n * Airdrops are defined as NFTs that were minted to a user address in a transaction\n * sent by a different address.\n *\n * @param contractAddress - The contract address to check.\n * @param tokenId - Token id of the NFT.\n */\n isAirdropNft(contractAddress, tokenId) {\n return isAirdropNft(this.config, contractAddress, tokenId);\n }\n /**\n * Returns the floor prices of a NFT contract by marketplace.\n *\n * @param contractAddress - The contract address for the NFT collection.\n * @beta\n */\n getFloorPrice(contractAddress) {\n return getFloorPrice(this.config, contractAddress);\n }\n getNftSales(options) {\n return getNftSales(this.config, options);\n }\n /**\n * Get the rarity of each attribute of an NFT.\n *\n * @param contractAddress - Contract address for the NFT collection.\n * @param tokenId - Token id of the NFT.\n */\n computeRarity(contractAddress, tokenId) {\n return computeRarity(this.config, contractAddress, tokenId);\n }\n /**\n * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts.\n *\n * @param query - The search string that you want to search for in contract metadata.\n */\n searchContractMetadata(query) {\n return searchContractMetadata(this.config, query);\n }\n /**\n * Get a summary of attribute prevalence for an NFT collection.\n *\n * @param contractAddress - Contract address for the NFT collection.\n */\n summarizeNftAttributes(contractAddress) {\n return summarizeNftAttributes(this.config, contractAddress);\n }\n /**\n * Refreshes the cached metadata for a provided NFT contract address and token\n * id. Returns a boolean value indicating whether the metadata was refreshed.\n *\n * This method is useful when you want to refresh the metadata for a NFT that\n * has been updated since the last time it was fetched. Note that the backend\n * only allows one refresh per token every 15 minutes, globally for all users.\n * The last refresh time for an NFT can be accessed on the\n * {@link Nft.timeLastUpdated} field.\n *\n * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead.\n *\n * @param contractAddress - The contract address of the NFT.\n * @param tokenId - The token id of the NFT.\n */\n refreshNftMetadata(contractAddress, tokenId) {\n return refreshNftMetadata(this.config, contractAddress, tokenId);\n }\n /**\n * Triggers a metadata refresh all NFTs in the provided contract address. This\n * method is useful after an NFT collection is revealed.\n *\n * Refreshes are queued on the Alchemy backend and may take time to fully\n * process. To refresh the metadata for a specific token, use the\n * {@link refreshNftMetadata} method instead.\n *\n * @param contractAddress - The contract address of the NFT collection.\n * @beta\n */\n refreshContract(contractAddress) {\n return refreshContract(this.config, contractAddress);\n }\n };\n NotifyNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Get all webhooks on your team.\n *\n * The team is determined by the `authToken` provided into the {@link AlchemySettings}\n * object when creating a new {@link Alchemy} instance.\n *\n * This method returns a response object containing all the webhooks\n */\n getAllWebhooks() {\n return __awaiter$1(this, void 0, void 0, function* () {\n this.verifyConfig();\n const response = yield this.sendWebhookRequest(\"team-webhooks\", \"getAllWebhooks\", {});\n return {\n webhooks: parseRawWebhookResponse(response),\n totalCount: response.data.length\n };\n });\n }\n getAddresses(webhookOrId, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n this.verifyConfig();\n const webhookId = typeof webhookOrId === \"string\" ? webhookOrId : webhookOrId.id;\n const response = yield this.sendWebhookRequest(\"webhook-addresses\", \"getAddresses\", {\n webhook_id: webhookId,\n limit: options === null || options === void 0 ? void 0 : options.limit,\n after: options === null || options === void 0 ? void 0 : options.pageKey\n });\n return parseRawAddressActivityResponse(response);\n });\n }\n getGraphqlQuery(webhookOrId) {\n return __awaiter$1(this, void 0, void 0, function* () {\n this.verifyConfig();\n const webhookId = typeof webhookOrId === \"string\" ? webhookOrId : webhookOrId.id;\n const response = yield this.sendWebhookRequest(\"dashboard-webhook-graphql-query\", \"getGraphqlQuery\", {\n webhook_id: webhookId\n });\n return parseRawCustomGraphqlWebhookResponse(response);\n });\n }\n getNftFilters(webhookOrId, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n this.verifyConfig();\n const webhookId = typeof webhookOrId === \"string\" ? webhookOrId : webhookOrId.id;\n const response = yield this.sendWebhookRequest(\"webhook-nft-filters\", \"getNftFilters\", {\n webhook_id: webhookId,\n limit: options === null || options === void 0 ? void 0 : options.limit,\n after: options === null || options === void 0 ? void 0 : options.pageKey\n });\n return parseRawNftFiltersResponse(response);\n });\n }\n updateWebhook(webhookOrId, update) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const webhookId = typeof webhookOrId === \"string\" ? webhookOrId : webhookOrId.id;\n let restApiName;\n let methodName;\n let method;\n let data;\n if (\"isActive\" in update) {\n restApiName = \"update-webhook\";\n methodName = \"updateWebhook\";\n method = \"PUT\";\n data = {\n webhook_id: webhookId,\n is_active: update.isActive\n };\n } else if (\"addFilters\" in update || \"removeFilters\" in update) {\n restApiName = \"update-webhook-nft-filters\";\n methodName = \"updateWebhookNftFilters\";\n method = \"PATCH\";\n data = {\n webhook_id: webhookId,\n nft_filters_to_add: update.addFilters ? update.addFilters.map(nftFilterToParam) : [],\n nft_filters_to_remove: update.removeFilters ? update.removeFilters.map(nftFilterToParam) : []\n };\n } else if (\"addMetadataFilters\" in update || \"removeMetadataFilters\" in update) {\n restApiName = \"update-webhook-nft-metadata-filters\";\n methodName = \"updateWebhookNftMetadataFilters\";\n method = \"PATCH\";\n data = {\n webhook_id: webhookId,\n nft_metadata_filters_to_add: update.addMetadataFilters ? update.addMetadataFilters.map(nftFilterToParam) : [],\n nft_metadata_filters_to_remove: update.removeMetadataFilters ? update.removeMetadataFilters.map(nftFilterToParam) : []\n };\n } else if (\"addAddresses\" in update || \"removeAddresses\" in update) {\n restApiName = \"update-webhook-addresses\";\n methodName = \"webhook:updateWebhookAddresses\";\n method = \"PATCH\";\n data = {\n webhook_id: webhookId,\n addresses_to_add: yield this.resolveAddresses(update.addAddresses),\n addresses_to_remove: yield this.resolveAddresses(update.removeAddresses)\n };\n } else if (\"newAddresses\" in update) {\n restApiName = \"update-webhook-addresses\";\n methodName = \"webhook:updateWebhookAddress\";\n method = \"PUT\";\n data = {\n webhook_id: webhookId,\n addresses: yield this.resolveAddresses(update.newAddresses)\n };\n } else {\n throw new Error(\"Invalid `update` param passed into `updateWebhook`\");\n }\n yield this.sendWebhookRequest(restApiName, methodName, {}, {\n method,\n data\n });\n });\n }\n createWebhook(url, type, params) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let appId;\n if (type === WebhookType.MINED_TRANSACTION || type === WebhookType.DROPPED_TRANSACTION || type === WebhookType.GRAPHQL) {\n if (!(\"appId\" in params)) {\n throw new Error(\"Transaction and GraphQL Webhooks require an app id.\");\n }\n appId = params.appId;\n }\n let network = NETWORK_TO_WEBHOOK_NETWORK.get(this.config.network);\n let nftFilterObj;\n let addresses4;\n let graphqlQuery;\n let skipEmptyMessages;\n if (type === WebhookType.NFT_ACTIVITY || type === WebhookType.NFT_METADATA_UPDATE) {\n if (!(\"filters\" in params) || params.filters.length === 0) {\n throw new Error(\"Nft Activity Webhooks require a non-empty array input.\");\n }\n network = params.network ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) : network;\n const filters = params.filters.map((filter2) => filter2.tokenId ? {\n contract_address: filter2.contractAddress,\n token_id: import_bignumber2.BigNumber.from(filter2.tokenId).toString()\n } : {\n contract_address: filter2.contractAddress\n });\n nftFilterObj = type === WebhookType.NFT_ACTIVITY ? { nft_filters: filters } : { nft_metadata_filters: filters };\n } else if (type === WebhookType.ADDRESS_ACTIVITY) {\n if (params === void 0 || !(\"addresses\" in params) || params.addresses.length === 0) {\n throw new Error(\"Address Activity Webhooks require a non-empty array input.\");\n }\n network = params.network ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) : network;\n addresses4 = yield this.resolveAddresses(params.addresses);\n } else if (type == WebhookType.GRAPHQL) {\n if (params === void 0 || !(\"graphqlQuery\" in params) || params.graphqlQuery.length === 0) {\n throw new Error(\"Custom Webhooks require a non-empty graphql query.\");\n }\n network = params.network ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) : network;\n graphqlQuery = params.graphqlQuery;\n skipEmptyMessages = params.skipEmptyMessages;\n }\n const data = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ network, webhook_type: type, webhook_url: url }, appId && { app_id: appId }), params.name && { name: params.name }), nftFilterObj), addresses4 && { addresses: addresses4 }), graphqlQuery && {\n graphql_query: {\n query: graphqlQuery,\n skip_empty_messages: !!skipEmptyMessages\n }\n });\n const response = yield this.sendWebhookRequest(\"create-webhook\", \"createWebhook\", {}, {\n method: \"POST\",\n data\n });\n return parseRawWebhook(response.data);\n });\n }\n deleteWebhook(webhookOrId) {\n return __awaiter$1(this, void 0, void 0, function* () {\n this.verifyConfig();\n const webhookId = typeof webhookOrId === \"string\" ? webhookOrId : webhookOrId.id;\n const response = yield this.sendWebhookRequest(\"delete-webhook\", \"deleteWebhook\", {\n webhook_id: webhookId\n }, {\n method: \"DELETE\"\n });\n if (\"message\" in response) {\n throw new Error(`Webhook not found. Failed to delete webhook: ${webhookId}`);\n }\n });\n }\n verifyConfig() {\n if (this.config.authToken === void 0) {\n throw new Error(\"Using the Notify API requires setting the Alchemy Auth Token in the settings object when initializing Alchemy.\");\n }\n }\n sendWebhookRequest(restApiName, methodName, params, overrides) {\n return requestHttpWithBackoff(this.config, AlchemyApiType.WEBHOOK, restApiName, methodName, params, Object.assign(Object.assign({}, overrides), { headers: Object.assign({ \"X-Alchemy-Token\": this.config.authToken }, overrides === null || overrides === void 0 ? void 0 : overrides.headers) }));\n }\n /** Resolves ENS addresses to the raw address.\n * @internal */\n resolveAddresses(addresses4) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (addresses4 === void 0) {\n return [];\n }\n const resolvedAddresses = [];\n const provider = yield this.config.getProvider();\n for (const address of addresses4) {\n const rawAddress = yield provider.resolveName(address);\n if (rawAddress === null) {\n throw new Error(`Unable to resolve the ENS address: ${address}`);\n }\n resolvedAddresses.push(rawAddress);\n }\n return resolvedAddresses;\n });\n }\n };\n WEBHOOK_NETWORK_TO_NETWORK = Object.fromEntries(Object.entries(Network));\n NETWORK_TO_WEBHOOK_NETWORK = Object.keys(Network).reduce((map, key) => {\n if (key in WEBHOOK_NETWORK_TO_NETWORK) {\n map.set(WEBHOOK_NETWORK_TO_NETWORK[key], key);\n }\n return map;\n }, /* @__PURE__ */ new Map());\n PortfolioNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Fetches fungible tokens (native and ERC-20) for multiple wallet addresses\n * and networks.\n *\n * @param addresses - Array of network/address pairs\n * (limit 2 pairs, max 5 networks each).\n * @param withMetadata - Boolean. If set to true, returns metadata. Setting\n * this to false will reduce payload size and\n * may result in a faster API call.\n * (default: true)\n * @param withPrices - Boolean. If set to true, returns token prices. Setting\n * this to false will reduce payload size and may\n * result in a faster API call. (default: true)\n * @param includeNativeTokens - Boolean. Whether to include each chain’s\n * native token in the response\n * (e.g. ETH on Ethereum). The native\n * token will have a null contract\n * address. (default: true)\n *\n * @returns Promise containing a list of tokens with balances, prices, and\n * metadata for each wallet/network combination.\n *\n * @public\n */\n getTokensByWallet(addresses4, withMetadata = true, withPrices = true, includeNativeTokens = true) {\n return getTokensByWallet(this.config, addresses4, withMetadata, withPrices, includeNativeTokens);\n }\n /**\n * Fetches fungible tokens (native and ERC-20) for multiple wallet addresses and networks.\n *\n * @param addresses - Array of network/address pairs (limit 2 pairs, max 5 networks each).\n * @param includeNativeTokens - Boolean. Whether to include each chain’s native token in the response (e.g. ETH on Ethereum). The native token will have a null contract address. (default: true) * @returns Promise containing a list of tokens with balances for each wallet/network combination\n * @public\n */\n getTokenBalancesByWallet(addresses4, includeNativeTokens = true) {\n return getTokenBalancesByWallet(this.config, addresses4, includeNativeTokens);\n }\n /**\n * Fetches NFTs for multiple wallet addresses and networks.\n *\n * @param addresses - Array of network/address pairs to fetch NFTs for.\n * @param withMetadata - Boolean. If set to true, returns metadata. Setting this to false will reduce payload size and may result in a faster API call. (default: true)\n * @param pageKey - Optional. The cursor that points to the current set of results.\n * @param pageSize - Optional. Sets the number of items per page.\n * @returns Promise containing a list of NFTs and metadata for each wallet/network combination.\n *\n * @public\n */\n getNftsByWallet(addresses4, withMetadata = true, pageKey, pageSize) {\n return getNftsByWallet(this.config, addresses4, withMetadata, pageKey, pageSize);\n }\n /**\n * Fetches NFT collections (contracts) for multiple wallet addresses and networks. Returns a list of\n * collections and metadata for each wallet/network combination.\n *\n * @param addresses - Array of address and networks pairs (limit 2 pairs, max 15 networks each).\n * @param withMetadata - Boolean. If set to true, returns metadata. (default: true)\n * @param pageKey - Optional. The cursor that points to the current set of results.\n * @param pageSize - Optional. Sets the number of items per page.\n * @returns Promise containing a list of NFT collections for each wallet/network combination.\n * @public\n */\n getNftCollectionsByWallet(addresses4, withMetadata = true, pageKey, pageSize) {\n return getNftCollectionsByWallet(this.config, addresses4, withMetadata, pageKey, pageSize);\n }\n /**\n * Fetches all historical transactions (internal & external) for multiple wallet addresses and networks.\n *\n * @param addresses - Array of network/address pairs to fetch transactions for.\n * @param before - Optional. The cursor that points to the previous set of results.\n * @param after - Optional. The cursor that points to the end of the current set of results.\n * @param limit - Optional. Sets the maximum number of items per page (Max: 100)\n * @returns Promise containing a list of transaction objects with metadata and log information.\n *\n * @public\n */\n getTransactionsByWallet(addresses4, before, after, limit) {\n return getTransactionsByWallet(this.config, addresses4, before, after, limit);\n }\n };\n PricesNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Get token prices by network and contract address pairs.\n *\n * @param addresses - Array of network/address pairs to get prices for\n * @returns Promise containing token price data\n * @public\n */\n getTokenPriceByAddress(addresses4) {\n return getTokenPriceByAddress(this.config, addresses4);\n }\n /**\n * Get token prices by token symbol.\n *\n * @param symbols - Array of token symbols to get prices for\n * @returns Promise containing token price data\n * @public\n */\n getTokenPriceBySymbol(symbols) {\n return getTokenPriceBySymbol(this.config, symbols);\n }\n /**\n * Get historical token prices by token symbol.\n *\n * @param symbol - The token symbol to get historical prices for\n * @param startTime - Start time in ISO-8601 string format or Unix timestamp in seconds\n * @param endTime - End time in ISO-8601 string format or Unix timestamp in seconds\n * @param interval - Time interval between data points\n * @returns Promise containing historical token price data\n * @public\n */\n getHistoricalPriceBySymbol(symbol, startTime, endTime, interval) {\n return getHistoricalPriceBySymbol(this.config, symbol, startTime, endTime, interval);\n }\n /**\n * Get historical token prices by network and contract address.\n *\n * @param network - The network where the token contract is deployed\n * @param address - The token contract address\n * @param startTime - Start time in ISO-8601 string format or Unix timestamp in seconds\n * @param endTime - End time in ISO-8601 string format or Unix timestamp in seconds\n * @param interval - Time interval between data points\n * @returns Promise containing historical token price data\n * @public\n */\n getHistoricalPriceByAddress(network, address, startTime, endTime, interval) {\n return getHistoricalPriceByAddress(this.config, network, address, startTime, endTime, interval);\n }\n };\n GAS_OPTIMIZED_TX_FEE_MULTIPLES = [0.9, 1, 1.1, 1.2, 1.3];\n TransactNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Used to send a single transaction to Flashbots. Flashbots will attempt to\n * send the transaction to miners for the next 25 blocks.\n *\n * Returns the transaction hash of the submitted transaction.\n *\n * @param signedTransaction The raw, signed transaction as a hash.\n * @param maxBlockNumber Optional highest block number in which the\n * transaction should be included.\n * @param options Options to configure the request.\n */\n sendPrivateTransaction(signedTransaction, maxBlockNumber, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const hexBlockNumber = maxBlockNumber ? toHex2(maxBlockNumber) : void 0;\n return provider._send(\"eth_sendPrivateTransaction\", [\n {\n tx: signedTransaction,\n maxBlockNumber: hexBlockNumber,\n preferences: options\n }\n ], \"sendPrivateTransaction\");\n });\n }\n /**\n * Stops the provided private transaction from being submitted for future\n * blocks. A transaction can only be cancelled if the request is signed by the\n * same key as the {@link sendPrivateTransaction} call submitting the\n * transaction in first place.\n *\n * Please note that fast mode transactions cannot be cancelled using this method.\n *\n * Returns a boolean indicating whether the cancellation was successful.\n *\n * @param transactionHash Transaction hash of private tx to be cancelled\n */\n cancelPrivateTransaction(transactionHash) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider._send(\"eth_cancelPrivateTransaction\", [\n {\n txHash: transactionHash\n }\n ], \"cancelPrivateTransaction\");\n });\n }\n /**\n * Simulates the asset changes resulting from a list of transactions simulated\n * in sequence.\n *\n * Returns a list of asset changes for each transaction during simulation.\n *\n * @param transactions Transactions list of max 3 transactions to simulate.\n * @param blockIdentifier Optional block identifier to simulate the\n * transaction in.\n */\n simulateAssetChangesBundle(transactions, blockIdentifier) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = blockIdentifier !== void 0 ? [transactions, blockIdentifier] : [transactions];\n const res = yield provider._send(\"alchemy_simulateAssetChangesBundle\", params, \"simulateAssetChangesBundle\");\n return nullsToUndefined(res);\n });\n }\n /**\n * Simulates the asset changes resulting from a single transaction.\n *\n * Returns list of asset changes that occurred during the transaction\n * simulation. Note that this method does not run the transaction on the\n * blockchain.\n *\n * @param transaction The transaction to simulate.\n * @param blockIdentifier Optional block identifier to simulate the\n * transaction in.\n */\n simulateAssetChanges(transaction, blockIdentifier) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = blockIdentifier !== void 0 ? [transaction, blockIdentifier] : [transaction];\n const res = yield provider._send(\"alchemy_simulateAssetChanges\", params, \"simulateAssetChanges\");\n return nullsToUndefined(res);\n });\n }\n /**\n * Simulates a list of transactions in sequence and returns list of decoded\n * traces and logs that occurred for each transaction during simulation.\n *\n * Note that this method does not run any transactions on the blockchain.\n *\n * @param transactions Transactions list of max 3 transactions to simulate.\n * @param blockIdentifier Optional block identifier to simulate the\n * transaction in.\n */\n simulateExecutionBundle(transactions, blockIdentifier) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = blockIdentifier !== void 0 ? [transactions, blockIdentifier] : [transactions];\n const res = provider._send(\"alchemy_simulateExecutionBundle\", params, \"simulateExecutionBundle\");\n return nullsToUndefined(res);\n });\n }\n /**\n * Simulates a single transaction and the resulting and returns list of\n * decoded traces and logs that occurred during the transaction simulation.\n *\n * Note that this method does not run the transaction on the blockchain.\n *\n * @param transaction The transaction to simulate.\n * @param blockIdentifier Optional block identifier to simulate the\n * transaction in.\n */\n simulateExecution(transaction, blockIdentifier) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = blockIdentifier !== void 0 ? [transaction, blockIdentifier] : [transaction];\n const res = provider._send(\"alchemy_simulateExecution\", params, \"simulateExecution\");\n return nullsToUndefined(res);\n });\n }\n /**\n * Returns the transaction with hash or null if the transaction is unknown.\n *\n * If a transaction has not been mined, this method will search the\n * transaction pool. Various backends may have more restrictive transaction\n * pool access (e.g. if the gas price is too low or the transaction was only\n * recently sent and not yet indexed) in which case this method may also return null.\n *\n * NOTE: This is an alias for {@link CoreNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n getTransaction(transactionHash) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getTransaction(transactionHash);\n });\n }\n /**\n * Submits transaction to the network to be mined. The transaction must be\n * signed, and be valid (i.e. the nonce is correct and the account has\n * sufficient balance to pay for the transaction).\n *\n * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}.\n *\n * @param signedTransaction The signed transaction to send.\n * @public\n */\n sendTransaction(signedTransaction) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.sendTransaction(signedTransaction);\n });\n }\n /**\n * Returns an estimate of the amount of gas that would be required to submit\n * transaction to the network.\n *\n * An estimate may not be accurate since there could be another transaction on\n * the network that was not accounted for, but after being mined affects the\n * relevant state.\n *\n * This is an alias for {@link CoreNamespace.estimateGas}.\n *\n * @param transaction The transaction to estimate gas for.\n * @public\n */\n estimateGas(transaction) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.estimateGas(transaction);\n });\n }\n /**\n * Returns a fee per gas (in wei) that is an estimate of how much you can pay\n * as a priority fee, or \"tip\", to get a transaction included in the current block.\n *\n * This number is generally used to set the `maxPriorityFeePerGas` field in a\n * transaction request.\n *\n * @public\n */\n getMaxPriorityFeePerGas() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const feeHex = yield provider._send(\"eth_maxPriorityFeePerGas\", [], \"getMaxPriorityFeePerGas\");\n return fromHex3(feeHex);\n });\n }\n /**\n * Returns a promise which will not resolve until specified transaction hash is mined.\n *\n * If {@link confirmations} is 0, this method is non-blocking and if the\n * transaction has not been mined returns null. Otherwise, this method will\n * block until the transaction has confirmed blocks mined on top of the block\n * in which it was mined.\n *\n * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}.\n *\n * @param transactionHash The hash of the transaction to wait for.\n * @param confirmations The number of blocks to wait for.\n * @param timeout The maximum time to wait for the transaction to confirm.\n * @public\n */\n waitForTransaction(transactionHash, confirmations, timeout) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.waitForTransaction(transactionHash, confirmations, timeout);\n });\n }\n sendGasOptimizedTransaction(transactionOrSignedTxs, wallet) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (Array.isArray(transactionOrSignedTxs)) {\n return this._sendGasOptimizedTransaction(transactionOrSignedTxs, \"sendGasOptimizedTransactionPreSigned\");\n }\n let gasLimit;\n let priorityFee;\n let baseFee;\n const provider = yield this.config.getProvider();\n try {\n gasLimit = yield this.estimateGas(transactionOrSignedTxs);\n priorityFee = yield this.getMaxPriorityFeePerGas();\n const currentBlock = yield provider.getBlock(\"latest\");\n baseFee = currentBlock.baseFeePerGas.toNumber();\n } catch (e2) {\n throw new Error(`Failed to estimate gas for transaction: ${e2}`);\n }\n const gasSpreadTransactions = generateGasSpreadTransactions(transactionOrSignedTxs, gasLimit.toNumber(), baseFee, priorityFee);\n const signedTransactions = yield Promise.all(gasSpreadTransactions.map((tx) => wallet.signTransaction(tx)));\n return this._sendGasOptimizedTransaction(signedTransactions, \"sendGasOptimizedTransactionGenerated\");\n });\n }\n /**\n * Returns the state of the transaction job returned by the\n * {@link sendGasOptimizedTransaction}.\n *\n * @param trackingId The tracking id from the response of the sent gas optimized transaction.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n getGasOptimizedTransactionStatus(trackingId) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider._send(\"alchemy_getGasOptimizedTransactionStatus\", [trackingId], \"getGasOptimizedTransactionStatus\");\n });\n }\n /** @internal */\n _sendGasOptimizedTransaction(signedTransactions, methodName) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider._send(\"alchemy_sendGasOptimizedTransaction\", [\n {\n rawTransactions: signedTransactions\n }\n ], methodName);\n });\n }\n };\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = \"alchemy-pending-transactions\";\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = \"alchemy-mined-transactions\";\n ALCHEMY_EVENT_TYPES = [\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE\n ];\n Event = class {\n constructor(tag, listener, once2) {\n this.listener = listener;\n this.tag = tag;\n this.once = once2;\n this._lastBlockNumber = -2;\n this._inflight = false;\n }\n get event() {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n default:\n return this.tag;\n }\n }\n get type() {\n return this.tag.split(\":\")[0];\n }\n get hash() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") {\n throw new Error(\"Not a transaction event\");\n }\n return comps[1];\n }\n get filter() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") {\n throw new Error(\"Not a transaction event\");\n }\n const address = comps[1];\n const topics = deserializeTopics(comps[2]);\n const filter2 = {};\n if (topics.length > 0) {\n filter2.topics = topics;\n }\n if (address && address !== \"*\") {\n filter2.address = address;\n }\n return filter2;\n }\n pollable() {\n const PollableEvents = [\"block\", \"network\", \"pending\", \"poll\"];\n return this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0;\n }\n };\n EthersEvent = class extends Event {\n /**\n * Converts the event tag into the original `fromAddress` field in\n * {@link AlchemyPendingTransactionsEventFilter}.\n */\n get fromAddress() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n return void 0;\n }\n if (comps[1] && comps[1] !== \"*\") {\n return deserializeAddressField(comps[1]);\n } else {\n return void 0;\n }\n }\n /**\n * Converts the event tag into the original `toAddress` field in\n * {@link AlchemyPendingTransactionsEventFilter}.\n */\n get toAddress() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n return void 0;\n }\n if (comps[2] && comps[2] !== \"*\") {\n return deserializeAddressField(comps[2]);\n } else {\n return void 0;\n }\n }\n /**\n * Converts the event tag into the original `hashesOnly` field in\n * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}.\n */\n get hashesOnly() {\n const comps = this.tag.split(\":\");\n if (!ALCHEMY_EVENT_TYPES.includes(comps[0])) {\n return void 0;\n }\n if (comps[3] && comps[3] !== \"*\") {\n return comps[3] === \"true\";\n } else {\n return void 0;\n }\n }\n get includeRemoved() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n return void 0;\n }\n if (comps[2] && comps[2] !== \"*\") {\n return comps[2] === \"true\";\n } else {\n return void 0;\n }\n }\n get addresses() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n return void 0;\n }\n if (comps[1] && comps[1] !== \"*\") {\n return deserializeAddressesField(comps[1]);\n } else {\n return void 0;\n }\n }\n };\n WebSocketNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Adds a listener to be triggered for each {@link eventName} event. Also\n * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for\n * how to use them.\n *\n * @param eventName The event to listen for.\n * @param listener The listener to call when the event is triggered.\n * @public\n */\n on(eventName, listener) {\n void (() => __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = yield this._resolveEnsAlchemyEvent(eventName);\n provider.on(processedEvent, listener);\n }))();\n return this;\n }\n /**\n * Adds a listener to be triggered for only the next {@link eventName} event,\n * after which it will be removed. Also includes Alchemy's Subscription API\n * events. See {@link AlchemyEventType} for how to use them.\n *\n * @param eventName The event to listen for.\n * @param listener The listener to call when the event is triggered.\n * @public\n */\n once(eventName, listener) {\n void (() => __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = yield this._resolveEnsAlchemyEvent(eventName);\n provider.once(processedEvent, listener);\n }))();\n return this;\n }\n /**\n * Removes the provided {@link listener} for the {@link eventName} event. If no\n * listener is provided, all listeners for the event will be removed.\n *\n * @param eventName The event to unlisten to.\n * @param listener The listener to remove.\n * @public\n */\n off(eventName, listener) {\n void (() => __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = yield this._resolveEnsAlchemyEvent(eventName);\n return provider.off(processedEvent, listener);\n }))();\n return this;\n }\n /**\n * Remove all listeners for the provided {@link eventName} event. If no event\n * is provided, all events and their listeners are removed.\n *\n * @param eventName The event to remove all listeners for.\n * @public\n */\n removeAllListeners(eventName) {\n void (() => __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = eventName ? yield this._resolveEnsAlchemyEvent(eventName) : void 0;\n provider.removeAllListeners(processedEvent);\n }))();\n return this;\n }\n /**\n * Returns the number of listeners for the provided {@link eventName} event. If\n * no event is provided, the total number of listeners for all events is returned.\n *\n * @param eventName The event to get the number of listeners for.\n * @public\n */\n listenerCount(eventName) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = eventName ? yield this._resolveEnsAlchemyEvent(eventName) : void 0;\n return provider.listenerCount(processedEvent);\n });\n }\n /**\n * Returns an array of listeners for the provided {@link eventName} event. If\n * no event is provided, all listeners will be included.\n *\n * @param eventName The event to get the listeners for.\n */\n listeners(eventName) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = eventName ? yield this._resolveEnsAlchemyEvent(eventName) : void 0;\n return provider.listeners(processedEvent);\n });\n }\n /**\n * Converts ENS addresses in an Alchemy Event to the underlying resolved\n * address.\n *\n * VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n _resolveEnsAlchemyEvent(eventName) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (!isAlchemyEvent(eventName)) {\n return eventName;\n }\n if (eventName.method === AlchemySubscription.MINED_TRANSACTIONS && eventName.addresses) {\n const processedAddresses = [];\n for (const address of eventName.addresses) {\n if (address.to) {\n address.to = yield this._resolveNameOrError(address.to);\n }\n if (address.from) {\n address.from = yield this._resolveNameOrError(address.from);\n }\n processedAddresses.push(address);\n }\n eventName.addresses = processedAddresses;\n } else if (eventName.method === AlchemySubscription.PENDING_TRANSACTIONS) {\n if (eventName.fromAddress) {\n if (typeof eventName.fromAddress === \"string\") {\n eventName.fromAddress = yield this._resolveNameOrError(eventName.fromAddress);\n } else {\n eventName.fromAddress = yield Promise.all(eventName.fromAddress.map((address) => this._resolveNameOrError(address)));\n }\n }\n if (eventName.toAddress) {\n if (typeof eventName.toAddress === \"string\") {\n eventName.toAddress = yield this._resolveNameOrError(eventName.toAddress);\n } else {\n eventName.toAddress = yield Promise.all(eventName.toAddress.map((address) => this._resolveNameOrError(address)));\n }\n }\n }\n return eventName;\n });\n }\n /**\n * Converts the provided ENS address or throws an error. This improves code\n * readability and type safety in other methods.\n *\n * VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n _resolveNameOrError(name) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const resolved = yield provider.resolveName(name);\n if (resolved === null) {\n throw new Error(`Unable to resolve the ENS address: ${name}`);\n }\n return resolved;\n });\n }\n };\n Alchemy = class {\n /**\n * @param {string} [settings.apiKey] - The API key to use for Alchemy\n * @param {Network} [settings.network] - The network to use for Alchemy\n * @param {number} [settings.maxRetries] - The maximum number of retries to attempt\n * @param {number} [settings.requestTimeout] - The timeout after which request should fail\n * @public\n */\n constructor(settings) {\n this.config = new AlchemyConfig(settings);\n this.core = new CoreNamespace(this.config);\n this.nft = new NftNamespace(this.config);\n this.ws = new WebSocketNamespace(this.config);\n this.transact = new TransactNamespace(this.config);\n this.notify = new NotifyNamespace(this.config);\n this.debug = new DebugNamespace(this.config);\n this.prices = new PricesNamespace(this.config);\n this.portfolio = new PortfolioNamespace(this.config);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/index.js\n var init_esm7 = __esm({\n \"../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_index_f73a5f29();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/schema.js\n var AlchemyChainSchema, AlchemySdkClientSchema;\n var init_schema3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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_esm7();\n init_esm();\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 AlchemySdkClientSchema = esm_default.instanceof(Alchemy);\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/version.js\n var VERSION5;\n var init_version6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION5 = \"4.52.2\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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\": VERSION5\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 })\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(opts).request,\n retryCount: retryCount ?? opts?.retryCount,\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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;\n var init_chains2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/chains.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm2();\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 }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/client/decorators/alchemyEnhancedApis.js\n function alchemyEnhancedApiActions(alchemy2) {\n return (client) => {\n const alchemySdk = AlchemySdkClientSchema.parse(alchemy2);\n if (alchemy2.config.url && alchemy2.config.url !== client.transport.alchemyRpcUrl) {\n throw new Error(\"Alchemy SDK client JSON-RPC URL must match AlchemyProvider JSON-RPC URL\");\n }\n return {\n core: alchemySdk.core,\n nft: alchemySdk.nft,\n transact: alchemySdk.transact,\n debug: alchemySdk.debug,\n ws: alchemySdk.ws,\n notify: alchemySdk.notify,\n config: alchemySdk.config\n };\n };\n }\n var init_alchemyEnhancedApis = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/client/decorators/alchemyEnhancedApis.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_schema3();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/emitter/interface.js\n var init_interface = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/emitter/interface.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/plugins/index.js\n var init_plugins = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/plugins/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/events/interfaces.js\n var init_interfaces = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/events/interfaces.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/dset@3.1.4/node_modules/dset/dist/index.mjs\n function dset(obj, keys, val) {\n keys.split && (keys = keys.split(\".\"));\n var i3 = 0, l6 = keys.length, t3 = obj, x4, k4;\n while (i3 < l6) {\n k4 = \"\" + keys[i3++];\n if (k4 === \"__proto__\" || k4 === \"constructor\" || k4 === \"prototype\")\n break;\n t3 = t3[k4] = i3 === l6 ? val : typeof (x4 = t3[k4]) === typeof keys ? x4 : keys[i3] * 0 !== 0 || !!~(\"\" + keys[i3]).indexOf(\".\") ? {} : [];\n }\n }\n var init_dist = __esm({\n \"../../../node_modules/.pnpm/dset@3.1.4/node_modules/dset/dist/index.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/pick.js\n var pickBy;\n var init_pick = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/pick.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n pickBy = function(obj, fn) {\n return Object.keys(obj).filter(function(k4) {\n return fn(k4, obj[k4]);\n }).reduce(function(acc, key) {\n return acc[key] = obj[key], acc;\n }, {});\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/errors.js\n var ValidationError;\n var init_errors6 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n ValidationError = /** @class */\n function(_super) {\n __extends(ValidationError2, _super);\n function ValidationError2(field, message) {\n var _this = _super.call(this, \"\".concat(field, \" \").concat(message)) || this;\n _this.field = field;\n return _this;\n }\n return ValidationError2;\n }(Error);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/helpers.js\n function isString2(obj) {\n return typeof obj === \"string\";\n }\n function isNumber2(obj) {\n return typeof obj === \"number\";\n }\n function isFunction2(obj) {\n return typeof obj === \"function\";\n }\n function exists(val) {\n return val !== void 0 && val !== null;\n }\n function isPlainObject2(obj) {\n return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase() === \"object\";\n }\n var init_helpers = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/helpers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/assertions.js\n function assertEventExists(event) {\n if (!exists(event)) {\n throw new ValidationError(\"Event\", nilError);\n }\n if (typeof event !== \"object\") {\n throw new ValidationError(\"Event\", objError);\n }\n }\n function assertEventType(event) {\n if (!isString2(event.type)) {\n throw new ValidationError(\".type\", stringError);\n }\n }\n function assertTrackEventName(event) {\n if (!isString2(event.event)) {\n throw new ValidationError(\".event\", stringError);\n }\n }\n function assertTrackEventProperties(event) {\n if (!isPlainObject2(event.properties)) {\n throw new ValidationError(\".properties\", objError);\n }\n }\n function assertTraits(event) {\n if (!isPlainObject2(event.traits)) {\n throw new ValidationError(\".traits\", objError);\n }\n }\n function assertMessageId(event) {\n if (!isString2(event.messageId)) {\n throw new ValidationError(\".messageId\", stringError);\n }\n }\n function validateEvent(event) {\n assertEventExists(event);\n assertEventType(event);\n assertMessageId(event);\n if (event.type === \"track\") {\n assertTrackEventName(event);\n assertTrackEventProperties(event);\n }\n if ([\"group\", \"identify\"].includes(event.type)) {\n assertTraits(event);\n }\n }\n var stringError, objError, nilError;\n var init_assertions = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/assertions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors6();\n init_helpers();\n stringError = \"is not a string\";\n objError = \"is not an object\";\n nilError = \"is nil\";\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/events/index.js\n var InternalEventFactorySettings, CoreEventFactory;\n var init_events = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/events/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_interfaces();\n init_dist();\n init_pick();\n init_assertions();\n InternalEventFactorySettings = /** @class */\n /* @__PURE__ */ function() {\n function InternalEventFactorySettings2(settings) {\n var _a2, _b2;\n this.settings = settings;\n this.createMessageId = settings.createMessageId;\n this.onEventMethodCall = (_a2 = settings.onEventMethodCall) !== null && _a2 !== void 0 ? _a2 : function() {\n };\n this.onFinishedEvent = (_b2 = settings.onFinishedEvent) !== null && _b2 !== void 0 ? _b2 : function() {\n };\n }\n return InternalEventFactorySettings2;\n }();\n CoreEventFactory = /** @class */\n function() {\n function CoreEventFactory2(settings) {\n this.settings = new InternalEventFactorySettings(settings);\n }\n CoreEventFactory2.prototype.track = function(event, properties, options, globalIntegrations) {\n this.settings.onEventMethodCall({ type: \"track\", options });\n return this.normalize(__assign(__assign({}, this.baseEvent()), { event, type: \"track\", properties: properties !== null && properties !== void 0 ? properties : {}, options: __assign({}, options), integrations: __assign({}, globalIntegrations) }));\n };\n CoreEventFactory2.prototype.page = function(category, page, properties, options, globalIntegrations) {\n var _a2;\n this.settings.onEventMethodCall({ type: \"page\", options });\n var event = {\n type: \"page\",\n properties: __assign({}, properties),\n options: __assign({}, options),\n integrations: __assign({}, globalIntegrations)\n };\n if (category !== null) {\n event.category = category;\n event.properties = (_a2 = event.properties) !== null && _a2 !== void 0 ? _a2 : {};\n event.properties.category = category;\n }\n if (page !== null) {\n event.name = page;\n }\n return this.normalize(__assign(__assign({}, this.baseEvent()), event));\n };\n CoreEventFactory2.prototype.screen = function(category, screen, properties, options, globalIntegrations) {\n this.settings.onEventMethodCall({ type: \"screen\", options });\n var event = {\n type: \"screen\",\n properties: __assign({}, properties),\n options: __assign({}, options),\n integrations: __assign({}, globalIntegrations)\n };\n if (category !== null) {\n event.category = category;\n }\n if (screen !== null) {\n event.name = screen;\n }\n return this.normalize(__assign(__assign({}, this.baseEvent()), event));\n };\n CoreEventFactory2.prototype.identify = function(userId, traits, options, globalIntegrations) {\n this.settings.onEventMethodCall({ type: \"identify\", options });\n return this.normalize(__assign(__assign({}, this.baseEvent()), { type: \"identify\", userId, traits: traits !== null && traits !== void 0 ? traits : {}, options: __assign({}, options), integrations: globalIntegrations }));\n };\n CoreEventFactory2.prototype.group = function(groupId, traits, options, globalIntegrations) {\n this.settings.onEventMethodCall({ type: \"group\", options });\n return this.normalize(__assign(__assign({}, this.baseEvent()), {\n type: \"group\",\n traits: traits !== null && traits !== void 0 ? traits : {},\n options: __assign({}, options),\n integrations: __assign({}, globalIntegrations),\n //\n groupId\n }));\n };\n CoreEventFactory2.prototype.alias = function(to, from5, options, globalIntegrations) {\n this.settings.onEventMethodCall({ type: \"alias\", options });\n var base3 = {\n userId: to,\n type: \"alias\",\n options: __assign({}, options),\n integrations: __assign({}, globalIntegrations)\n };\n if (from5 !== null) {\n base3.previousId = from5;\n }\n if (to === void 0) {\n return this.normalize(__assign(__assign({}, base3), this.baseEvent()));\n }\n return this.normalize(__assign(__assign({}, this.baseEvent()), base3));\n };\n CoreEventFactory2.prototype.baseEvent = function() {\n return {\n integrations: {},\n options: {}\n };\n };\n CoreEventFactory2.prototype.context = function(options) {\n var _a2;\n var eventOverrideKeys = [\n \"userId\",\n \"anonymousId\",\n \"timestamp\",\n \"messageId\"\n ];\n delete options[\"integrations\"];\n var providedOptionsKeys = Object.keys(options);\n var context2 = (_a2 = options.context) !== null && _a2 !== void 0 ? _a2 : {};\n var eventOverrides = {};\n providedOptionsKeys.forEach(function(key) {\n if (key === \"context\") {\n return;\n }\n if (eventOverrideKeys.includes(key)) {\n dset(eventOverrides, key, options[key]);\n } else {\n dset(context2, key, options[key]);\n }\n });\n return [context2, eventOverrides];\n };\n CoreEventFactory2.prototype.normalize = function(event) {\n var _a2, _b2;\n var integrationBooleans = Object.keys((_a2 = event.integrations) !== null && _a2 !== void 0 ? _a2 : {}).reduce(function(integrationNames, name) {\n var _a3;\n var _b3;\n return __assign(__assign({}, integrationNames), (_a3 = {}, _a3[name] = Boolean((_b3 = event.integrations) === null || _b3 === void 0 ? void 0 : _b3[name]), _a3));\n }, {});\n event.options = pickBy(event.options || {}, function(_2, value) {\n return value !== void 0;\n });\n var allIntegrations = __assign(__assign({}, integrationBooleans), (_b2 = event.options) === null || _b2 === void 0 ? void 0 : _b2.integrations);\n var _c = event.options ? this.context(event.options) : [], context2 = _c[0], overrides = _c[1];\n var options = event.options, rest = __rest(event, [\"options\"]);\n var evt = __assign(__assign(__assign(__assign({ timestamp: /* @__PURE__ */ new Date() }, rest), { context: context2, integrations: allIntegrations }), overrides), { messageId: options.messageId || this.settings.createMessageId() });\n this.settings.onFinishedEvent(evt);\n validateEvent(evt);\n return evt;\n };\n return CoreEventFactory2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/callback/index.js\n function pTimeout(promise, timeout) {\n return new Promise(function(resolve, reject) {\n var timeoutId = setTimeout(function() {\n reject(Error(\"Promise timed out\"));\n }, timeout);\n promise.then(function(val) {\n clearTimeout(timeoutId);\n return resolve(val);\n }).catch(reject);\n });\n }\n function sleep(timeoutInMs) {\n return new Promise(function(resolve) {\n return setTimeout(resolve, timeoutInMs);\n });\n }\n function invokeCallback(ctx, callback, delay2) {\n var cb = function() {\n try {\n return Promise.resolve(callback(ctx));\n } catch (err) {\n return Promise.reject(err);\n }\n };\n return sleep(delay2).then(function() {\n return pTimeout(cb(), 1e3);\n }).catch(function(err) {\n ctx === null || ctx === void 0 ? void 0 : ctx.log(\"warn\", \"Callback Error\", { error: err });\n ctx === null || ctx === void 0 ? void 0 : ctx.stats.increment(\"callback_error\");\n }).then(function() {\n return ctx;\n });\n }\n var init_callback = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/callback/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/create-deferred.js\n var createDeferred;\n var init_create_deferred = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/create-deferred.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n createDeferred = function() {\n var resolve;\n var reject;\n var settled = false;\n var promise = new Promise(function(_resolve, _reject) {\n resolve = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n settled = true;\n _resolve.apply(void 0, args);\n };\n reject = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n settled = true;\n _reject.apply(void 0, args);\n };\n });\n return {\n resolve,\n reject,\n promise,\n isSettled: function() {\n return settled;\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/index.js\n var init_create_deferred2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_create_deferred();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/emitter/emitter.js\n var Emitter;\n var init_emitter = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/emitter/emitter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Emitter = /** @class */\n function() {\n function Emitter2(options) {\n var _a2;\n this.callbacks = {};\n this.warned = false;\n this.maxListeners = (_a2 = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _a2 !== void 0 ? _a2 : 10;\n }\n Emitter2.prototype.warnIfPossibleMemoryLeak = function(event) {\n if (this.warned) {\n return;\n }\n if (this.maxListeners && this.callbacks[event].length > this.maxListeners) {\n console.warn(\"Event Emitter: Possible memory leak detected; \".concat(String(event), \" has exceeded \").concat(this.maxListeners, \" listeners.\"));\n this.warned = true;\n }\n };\n Emitter2.prototype.on = function(event, callback) {\n if (!this.callbacks[event]) {\n this.callbacks[event] = [callback];\n } else {\n this.callbacks[event].push(callback);\n this.warnIfPossibleMemoryLeak(event);\n }\n return this;\n };\n Emitter2.prototype.once = function(event, callback) {\n var _this = this;\n var on2 = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this.off(event, on2);\n callback.apply(_this, args);\n };\n this.on(event, on2);\n return this;\n };\n Emitter2.prototype.off = function(event, callback) {\n var _a2;\n var fns = (_a2 = this.callbacks[event]) !== null && _a2 !== void 0 ? _a2 : [];\n var without = fns.filter(function(fn) {\n return fn !== callback;\n });\n this.callbacks[event] = without;\n return this;\n };\n Emitter2.prototype.emit = function(event) {\n var _this = this;\n var _a2;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var callbacks = (_a2 = this.callbacks[event]) !== null && _a2 !== void 0 ? _a2 : [];\n callbacks.forEach(function(callback) {\n callback.apply(_this, args);\n });\n return this;\n };\n return Emitter2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/emitter/index.js\n var init_emitter2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/emitter/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_emitter();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/index.js\n var init_esm8 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_create_deferred2();\n init_emitter2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/priority-queue/backoff.js\n function backoff(params) {\n var random = Math.random() + 1;\n var _a2 = params.minTimeout, minTimeout = _a2 === void 0 ? 500 : _a2, _b2 = params.factor, factor = _b2 === void 0 ? 2 : _b2, attempt2 = params.attempt, _c = params.maxTimeout, maxTimeout = _c === void 0 ? Infinity : _c;\n return Math.min(random * minTimeout * Math.pow(factor, attempt2), maxTimeout);\n }\n var init_backoff = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/priority-queue/backoff.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/priority-queue/index.js\n var ON_REMOVE_FROM_FUTURE, PriorityQueue;\n var init_priority_queue = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/priority-queue/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_esm8();\n init_backoff();\n ON_REMOVE_FROM_FUTURE = \"onRemoveFromFuture\";\n PriorityQueue = /** @class */\n function(_super) {\n __extends(PriorityQueue2, _super);\n function PriorityQueue2(maxAttempts, queue2, seen2) {\n var _this = _super.call(this) || this;\n _this.future = [];\n _this.maxAttempts = maxAttempts;\n _this.queue = queue2;\n _this.seen = seen2 !== null && seen2 !== void 0 ? seen2 : {};\n return _this;\n }\n PriorityQueue2.prototype.push = function() {\n var _this = this;\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var accepted = items.map(function(operation) {\n var attempts = _this.updateAttempts(operation);\n if (attempts > _this.maxAttempts || _this.includes(operation)) {\n return false;\n }\n _this.queue.push(operation);\n return true;\n });\n this.queue = this.queue.sort(function(a3, b4) {\n return _this.getAttempts(a3) - _this.getAttempts(b4);\n });\n return accepted;\n };\n PriorityQueue2.prototype.pushWithBackoff = function(item, minTimeout) {\n var _this = this;\n if (minTimeout === void 0) {\n minTimeout = 0;\n }\n if (minTimeout == 0 && this.getAttempts(item) === 0) {\n return this.push(item)[0];\n }\n var attempt2 = this.updateAttempts(item);\n if (attempt2 > this.maxAttempts || this.includes(item)) {\n return false;\n }\n var timeout = backoff({ attempt: attempt2 - 1 });\n if (minTimeout > 0 && timeout < minTimeout) {\n timeout = minTimeout;\n }\n setTimeout(function() {\n _this.queue.push(item);\n _this.future = _this.future.filter(function(f6) {\n return f6.id !== item.id;\n });\n _this.emit(ON_REMOVE_FROM_FUTURE);\n }, timeout);\n this.future.push(item);\n return true;\n };\n PriorityQueue2.prototype.getAttempts = function(item) {\n var _a2;\n return (_a2 = this.seen[item.id]) !== null && _a2 !== void 0 ? _a2 : 0;\n };\n PriorityQueue2.prototype.updateAttempts = function(item) {\n this.seen[item.id] = this.getAttempts(item) + 1;\n return this.getAttempts(item);\n };\n PriorityQueue2.prototype.includes = function(item) {\n return this.queue.includes(item) || this.future.includes(item) || Boolean(this.queue.find(function(i3) {\n return i3.id === item.id;\n })) || Boolean(this.future.find(function(i3) {\n return i3.id === item.id;\n }));\n };\n PriorityQueue2.prototype.pop = function() {\n return this.queue.shift();\n };\n Object.defineProperty(PriorityQueue2.prototype, \"length\", {\n get: function() {\n return this.queue.length;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(PriorityQueue2.prototype, \"todo\", {\n get: function() {\n return this.queue.length + this.future.length;\n },\n enumerable: false,\n configurable: true\n });\n return PriorityQueue2;\n }(Emitter);\n }\n });\n\n // ../../../node_modules/.pnpm/@lukeed+uuid@2.0.1/node_modules/@lukeed/uuid/dist/index.mjs\n function v4() {\n var i3 = 0, num2, out = \"\";\n if (!BUFFER || IDX + 16 > 256) {\n BUFFER = Array(i3 = 256);\n while (i3--)\n BUFFER[i3] = 256 * Math.random() | 0;\n i3 = IDX = 0;\n }\n for (; i3 < 16; i3++) {\n num2 = BUFFER[IDX + i3];\n if (i3 == 6)\n out += HEX3[num2 & 15 | 64];\n else if (i3 == 8)\n out += HEX3[num2 & 63 | 128];\n else\n out += HEX3[num2];\n if (i3 & 1 && i3 > 1 && i3 < 11)\n out += \"-\";\n }\n IDX++;\n return out;\n }\n var IDX, HEX3, BUFFER;\n var init_dist2 = __esm({\n \"../../../node_modules/.pnpm/@lukeed+uuid@2.0.1/node_modules/@lukeed/uuid/dist/index.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IDX = 256;\n HEX3 = [];\n while (IDX--)\n HEX3[IDX] = (IDX + 256).toString(16).substring(1);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/logger/index.js\n var CoreLogger;\n var init_logger2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/logger/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n CoreLogger = /** @class */\n function() {\n function CoreLogger2() {\n this._logs = [];\n }\n CoreLogger2.prototype.log = function(level, message, extras) {\n var time = /* @__PURE__ */ new Date();\n this._logs.push({\n level,\n message,\n time,\n extras\n });\n };\n Object.defineProperty(CoreLogger2.prototype, \"logs\", {\n get: function() {\n return this._logs;\n },\n enumerable: false,\n configurable: true\n });\n CoreLogger2.prototype.flush = function() {\n if (this.logs.length > 1) {\n var formatted = this._logs.reduce(function(logs, log) {\n var _a2;\n var _b2, _c;\n var line = __assign(__assign({}, log), { json: JSON.stringify(log.extras, null, \" \"), extras: log.extras });\n delete line[\"time\"];\n var key = (_c = (_b2 = log.time) === null || _b2 === void 0 ? void 0 : _b2.toISOString()) !== null && _c !== void 0 ? _c : \"\";\n if (logs[key]) {\n key = \"\".concat(key, \"-\").concat(Math.random());\n }\n return __assign(__assign({}, logs), (_a2 = {}, _a2[key] = line, _a2));\n }, {});\n if (console.table) {\n console.table(formatted);\n } else {\n console.log(formatted);\n }\n } else {\n this.logs.forEach(function(logEntry) {\n var level = logEntry.level, message = logEntry.message, extras = logEntry.extras;\n if (level === \"info\" || level === \"debug\") {\n console.log(message, extras !== null && extras !== void 0 ? extras : \"\");\n } else {\n console[level](message, extras !== null && extras !== void 0 ? extras : \"\");\n }\n });\n }\n this._logs = [];\n };\n return CoreLogger2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/stats/index.js\n var compactMetricType, CoreStats, NullStats;\n var init_stats = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/stats/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n compactMetricType = function(type) {\n var enums = {\n gauge: \"g\",\n counter: \"c\"\n };\n return enums[type];\n };\n CoreStats = /** @class */\n function() {\n function CoreStats2() {\n this.metrics = [];\n }\n CoreStats2.prototype.increment = function(metric, by, tags) {\n if (by === void 0) {\n by = 1;\n }\n this.metrics.push({\n metric,\n value: by,\n tags: tags !== null && tags !== void 0 ? tags : [],\n type: \"counter\",\n timestamp: Date.now()\n });\n };\n CoreStats2.prototype.gauge = function(metric, value, tags) {\n this.metrics.push({\n metric,\n value,\n tags: tags !== null && tags !== void 0 ? tags : [],\n type: \"gauge\",\n timestamp: Date.now()\n });\n };\n CoreStats2.prototype.flush = function() {\n var formatted = this.metrics.map(function(m2) {\n return __assign(__assign({}, m2), { tags: m2.tags.join(\",\") });\n });\n if (console.table) {\n console.table(formatted);\n } else {\n console.log(formatted);\n }\n this.metrics = [];\n };\n CoreStats2.prototype.serialize = function() {\n return this.metrics.map(function(m2) {\n return {\n m: m2.metric,\n v: m2.value,\n t: m2.tags,\n k: compactMetricType(m2.type),\n e: m2.timestamp\n };\n });\n };\n return CoreStats2;\n }();\n NullStats = /** @class */\n function(_super) {\n __extends(NullStats2, _super);\n function NullStats2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NullStats2.prototype.gauge = function() {\n var _args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n _args[_i] = arguments[_i];\n }\n };\n NullStats2.prototype.increment = function() {\n var _args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n _args[_i] = arguments[_i];\n }\n };\n NullStats2.prototype.flush = function() {\n var _args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n _args[_i] = arguments[_i];\n }\n };\n NullStats2.prototype.serialize = function() {\n var _args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n _args[_i] = arguments[_i];\n }\n return [];\n };\n return NullStats2;\n }(CoreStats);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/context/index.js\n var ContextCancelation, CoreContext;\n var init_context = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/context/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_dist2();\n init_dist();\n init_logger2();\n init_stats();\n ContextCancelation = /** @class */\n /* @__PURE__ */ function() {\n function ContextCancelation2(options) {\n var _a2, _b2, _c;\n this.retry = (_a2 = options.retry) !== null && _a2 !== void 0 ? _a2 : true;\n this.type = (_b2 = options.type) !== null && _b2 !== void 0 ? _b2 : \"plugin Error\";\n this.reason = (_c = options.reason) !== null && _c !== void 0 ? _c : \"\";\n }\n return ContextCancelation2;\n }();\n CoreContext = /** @class */\n function() {\n function CoreContext2(event, id, stats, logger3) {\n if (id === void 0) {\n id = v4();\n }\n if (stats === void 0) {\n stats = new NullStats();\n }\n if (logger3 === void 0) {\n logger3 = new CoreLogger();\n }\n this.attempts = 0;\n this.event = event;\n this._id = id;\n this.logger = logger3;\n this.stats = stats;\n }\n CoreContext2.system = function() {\n };\n CoreContext2.prototype.isSame = function(other) {\n return other.id === this.id;\n };\n CoreContext2.prototype.cancel = function(error) {\n if (error) {\n throw error;\n }\n throw new ContextCancelation({ reason: \"Context Cancel\" });\n };\n CoreContext2.prototype.log = function(level, message, extras) {\n this.logger.log(level, message, extras);\n };\n Object.defineProperty(CoreContext2.prototype, \"id\", {\n get: function() {\n return this._id;\n },\n enumerable: false,\n configurable: true\n });\n CoreContext2.prototype.updateEvent = function(path, val) {\n var _a2;\n if (path.split(\".\")[0] === \"integrations\") {\n var integrationName = path.split(\".\")[1];\n if (((_a2 = this.event.integrations) === null || _a2 === void 0 ? void 0 : _a2[integrationName]) === false) {\n return this.event;\n }\n }\n dset(this.event, path, val);\n return this.event;\n };\n CoreContext2.prototype.failedDelivery = function() {\n return this._failedDelivery;\n };\n CoreContext2.prototype.setFailedDelivery = function(options) {\n this._failedDelivery = options;\n };\n CoreContext2.prototype.logs = function() {\n return this.logger.logs;\n };\n CoreContext2.prototype.flush = function() {\n this.logger.flush();\n this.stats.flush();\n };\n CoreContext2.prototype.toJSON = function() {\n return {\n id: this._id,\n event: this.event,\n logs: this.logger.logs,\n metrics: this.stats.metrics\n };\n };\n return CoreContext2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/group-by.js\n function groupBy(collection, grouper) {\n var results = {};\n collection.forEach(function(item) {\n var _a2;\n var key = void 0;\n if (typeof grouper === \"string\") {\n var suggestedKey = item[grouper];\n key = typeof suggestedKey !== \"string\" ? JSON.stringify(suggestedKey) : suggestedKey;\n } else if (grouper instanceof Function) {\n key = grouper(item);\n }\n if (key === void 0) {\n return;\n }\n results[key] = __spreadArray(__spreadArray([], (_a2 = results[key]) !== null && _a2 !== void 0 ? _a2 : [], true), [item], false);\n });\n return results;\n }\n var init_group_by = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/group-by.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/is-thenable.js\n var isThenable2;\n var init_is_thenable = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/is-thenable.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n isThenable2 = function(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value && typeof value.then === \"function\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/task/task-group.js\n var createTaskGroup;\n var init_task_group = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/task/task-group.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_is_thenable();\n createTaskGroup = function() {\n var taskCompletionPromise;\n var resolvePromise;\n var count = 0;\n return {\n done: function() {\n return taskCompletionPromise;\n },\n run: function(op) {\n var returnValue = op();\n if (isThenable2(returnValue)) {\n if (++count === 1) {\n taskCompletionPromise = new Promise(function(res) {\n return resolvePromise = res;\n });\n }\n returnValue.finally(function() {\n return --count === 0 && resolvePromise();\n });\n }\n return returnValue;\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/queue/delivery.js\n function tryAsync(fn) {\n return __awaiter(this, void 0, void 0, function() {\n var err_1;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n _a2.trys.push([0, 2, , 3]);\n return [4, fn()];\n case 1:\n return [2, _a2.sent()];\n case 2:\n err_1 = _a2.sent();\n return [2, Promise.reject(err_1)];\n case 3:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }\n function attempt(ctx, plugin) {\n ctx.log(\"debug\", \"plugin\", { plugin: plugin.name });\n var start = (/* @__PURE__ */ new Date()).getTime();\n var hook = plugin[ctx.event.type];\n if (hook === void 0) {\n return Promise.resolve(ctx);\n }\n var newCtx = tryAsync(function() {\n return hook.apply(plugin, [ctx]);\n }).then(function(ctx2) {\n var done = (/* @__PURE__ */ new Date()).getTime() - start;\n ctx2.stats.gauge(\"plugin_time\", done, [\"plugin:\".concat(plugin.name)]);\n return ctx2;\n }).catch(function(err) {\n if (err instanceof ContextCancelation && err.type === \"middleware_cancellation\") {\n throw err;\n }\n if (err instanceof ContextCancelation) {\n ctx.log(\"warn\", err.type, {\n plugin: plugin.name,\n error: err\n });\n return err;\n }\n ctx.log(\"error\", \"plugin Error\", {\n plugin: plugin.name,\n error: err\n });\n ctx.stats.increment(\"plugin_error\", 1, [\"plugin:\".concat(plugin.name)]);\n return err;\n });\n return newCtx;\n }\n function ensure(ctx, plugin) {\n return attempt(ctx, plugin).then(function(newContext) {\n if (newContext instanceof CoreContext) {\n return newContext;\n }\n ctx.log(\"debug\", \"Context canceled\");\n ctx.stats.increment(\"context_canceled\");\n ctx.cancel(newContext);\n });\n }\n var init_delivery = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/queue/delivery.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_context();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/queue/event-queue.js\n var CoreEventQueue;\n var init_event_queue = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/queue/event-queue.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_group_by();\n init_priority_queue();\n init_context();\n init_esm8();\n init_task_group();\n init_delivery();\n CoreEventQueue = /** @class */\n function(_super) {\n __extends(CoreEventQueue2, _super);\n function CoreEventQueue2(priorityQueue) {\n var _this = _super.call(this) || this;\n _this.criticalTasks = createTaskGroup();\n _this.plugins = [];\n _this.failedInitializations = [];\n _this.flushing = false;\n _this.queue = priorityQueue;\n _this.queue.on(ON_REMOVE_FROM_FUTURE, function() {\n _this.scheduleFlush(0);\n });\n return _this;\n }\n CoreEventQueue2.prototype.register = function(ctx, plugin, instance) {\n return __awaiter(this, void 0, void 0, function() {\n var handleLoadError, err_1;\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this.plugins.push(plugin);\n handleLoadError = function(err) {\n _this.failedInitializations.push(plugin.name);\n _this.emit(\"initialization_failure\", plugin);\n console.warn(plugin.name, err);\n ctx.log(\"warn\", \"Failed to load destination\", {\n plugin: plugin.name,\n error: err\n });\n _this.plugins = _this.plugins.filter(function(p4) {\n return p4 !== plugin;\n });\n };\n if (!(plugin.type === \"destination\" && plugin.name !== \"Segment.io\"))\n return [3, 1];\n plugin.load(ctx, instance).catch(handleLoadError);\n return [3, 4];\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, plugin.load(ctx, instance)];\n case 2:\n _a2.sent();\n return [3, 4];\n case 3:\n err_1 = _a2.sent();\n handleLoadError(err_1);\n return [3, 4];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n CoreEventQueue2.prototype.deregister = function(ctx, plugin, instance) {\n return __awaiter(this, void 0, void 0, function() {\n var e_1;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n _a2.trys.push([0, 3, , 4]);\n if (!plugin.unload)\n return [3, 2];\n return [4, Promise.resolve(plugin.unload(ctx, instance))];\n case 1:\n _a2.sent();\n _a2.label = 2;\n case 2:\n this.plugins = this.plugins.filter(function(p4) {\n return p4.name !== plugin.name;\n });\n return [3, 4];\n case 3:\n e_1 = _a2.sent();\n ctx.log(\"warn\", \"Failed to unload destination\", {\n plugin: plugin.name,\n error: e_1\n });\n return [3, 4];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n CoreEventQueue2.prototype.dispatch = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var willDeliver;\n return __generator(this, function(_a2) {\n ctx.log(\"debug\", \"Dispatching\");\n ctx.stats.increment(\"message_dispatched\");\n this.queue.push(ctx);\n willDeliver = this.subscribeToDelivery(ctx);\n this.scheduleFlush(0);\n return [2, willDeliver];\n });\n });\n };\n CoreEventQueue2.prototype.subscribeToDelivery = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var _this = this;\n return __generator(this, function(_a2) {\n return [2, new Promise(function(resolve) {\n var onDeliver = function(flushed, delivered) {\n if (flushed.isSame(ctx)) {\n _this.off(\"flush\", onDeliver);\n if (delivered) {\n resolve(flushed);\n } else {\n resolve(flushed);\n }\n }\n };\n _this.on(\"flush\", onDeliver);\n })];\n });\n });\n };\n CoreEventQueue2.prototype.dispatchSingle = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var _this = this;\n return __generator(this, function(_a2) {\n ctx.log(\"debug\", \"Dispatching\");\n ctx.stats.increment(\"message_dispatched\");\n this.queue.updateAttempts(ctx);\n ctx.attempts = 1;\n return [2, this.deliver(ctx).catch(function(err) {\n var accepted = _this.enqueuRetry(err, ctx);\n if (!accepted) {\n ctx.setFailedDelivery({ reason: err });\n return ctx;\n }\n return _this.subscribeToDelivery(ctx);\n })];\n });\n });\n };\n CoreEventQueue2.prototype.isEmpty = function() {\n return this.queue.length === 0;\n };\n CoreEventQueue2.prototype.scheduleFlush = function(timeout) {\n var _this = this;\n if (timeout === void 0) {\n timeout = 500;\n }\n if (this.flushing) {\n return;\n }\n this.flushing = true;\n setTimeout(function() {\n _this.flush().then(function() {\n setTimeout(function() {\n _this.flushing = false;\n if (_this.queue.length) {\n _this.scheduleFlush(0);\n }\n }, 0);\n });\n }, timeout);\n };\n CoreEventQueue2.prototype.deliver = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var start, done, err_2, error;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.criticalTasks.done()];\n case 1:\n _a2.sent();\n start = Date.now();\n _a2.label = 2;\n case 2:\n _a2.trys.push([2, 4, , 5]);\n return [4, this.flushOne(ctx)];\n case 3:\n ctx = _a2.sent();\n done = Date.now() - start;\n this.emit(\"delivery_success\", ctx);\n ctx.stats.gauge(\"delivered\", done);\n ctx.log(\"debug\", \"Delivered\", ctx.event);\n return [2, ctx];\n case 4:\n err_2 = _a2.sent();\n error = err_2;\n ctx.log(\"error\", \"Failed to deliver\", error);\n this.emit(\"delivery_failure\", ctx, error);\n ctx.stats.increment(\"delivery_failed\");\n throw err_2;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n CoreEventQueue2.prototype.enqueuRetry = function(err, ctx) {\n var retriable = !(err instanceof ContextCancelation) || err.retry;\n if (!retriable) {\n return false;\n }\n return this.queue.pushWithBackoff(ctx);\n };\n CoreEventQueue2.prototype.flush = function() {\n return __awaiter(this, void 0, void 0, function() {\n var ctx, err_3, accepted;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (this.queue.length === 0) {\n return [2, []];\n }\n ctx = this.queue.pop();\n if (!ctx) {\n return [2, []];\n }\n ctx.attempts = this.queue.getAttempts(ctx);\n _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, this.deliver(ctx)];\n case 2:\n ctx = _a2.sent();\n this.emit(\"flush\", ctx, true);\n return [3, 4];\n case 3:\n err_3 = _a2.sent();\n accepted = this.enqueuRetry(err_3, ctx);\n if (!accepted) {\n ctx.setFailedDelivery({ reason: err_3 });\n this.emit(\"flush\", ctx, false);\n }\n return [2, []];\n case 4:\n return [2, [ctx]];\n }\n });\n });\n };\n CoreEventQueue2.prototype.isReady = function() {\n return true;\n };\n CoreEventQueue2.prototype.availableExtensions = function(denyList) {\n var available = this.plugins.filter(function(p4) {\n var _a3, _b3, _c2;\n if (p4.type !== \"destination\" && p4.name !== \"Segment.io\") {\n return true;\n }\n var alternativeNameMatch = void 0;\n (_a3 = p4.alternativeNames) === null || _a3 === void 0 ? void 0 : _a3.forEach(function(name) {\n if (denyList[name] !== void 0) {\n alternativeNameMatch = denyList[name];\n }\n });\n return (_c2 = (_b3 = denyList[p4.name]) !== null && _b3 !== void 0 ? _b3 : alternativeNameMatch) !== null && _c2 !== void 0 ? _c2 : (p4.name === \"Segment.io\" ? true : denyList.All) !== false;\n });\n var _a2 = groupBy(available, \"type\"), _b2 = _a2.before, before = _b2 === void 0 ? [] : _b2, _c = _a2.enrichment, enrichment = _c === void 0 ? [] : _c, _d = _a2.destination, destination = _d === void 0 ? [] : _d, _e = _a2.after, after = _e === void 0 ? [] : _e;\n return {\n before,\n enrichment,\n destinations: destination,\n after\n };\n };\n CoreEventQueue2.prototype.flushOne = function(ctx) {\n var _a2, _b2;\n return __awaiter(this, void 0, void 0, function() {\n var _c, before, enrichment, _i, before_1, beforeWare, temp, _d, enrichment_1, enrichmentWare, temp, _e, destinations, after, afterCalls;\n return __generator(this, function(_f) {\n switch (_f.label) {\n case 0:\n if (!this.isReady()) {\n throw new Error(\"Not ready\");\n }\n if (ctx.attempts > 1) {\n this.emit(\"delivery_retry\", ctx);\n }\n _c = this.availableExtensions((_a2 = ctx.event.integrations) !== null && _a2 !== void 0 ? _a2 : {}), before = _c.before, enrichment = _c.enrichment;\n _i = 0, before_1 = before;\n _f.label = 1;\n case 1:\n if (!(_i < before_1.length))\n return [3, 4];\n beforeWare = before_1[_i];\n return [4, ensure(ctx, beforeWare)];\n case 2:\n temp = _f.sent();\n if (temp instanceof CoreContext) {\n ctx = temp;\n }\n this.emit(\"message_enriched\", ctx, beforeWare);\n _f.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n _d = 0, enrichment_1 = enrichment;\n _f.label = 5;\n case 5:\n if (!(_d < enrichment_1.length))\n return [3, 8];\n enrichmentWare = enrichment_1[_d];\n return [4, attempt(ctx, enrichmentWare)];\n case 6:\n temp = _f.sent();\n if (temp instanceof CoreContext) {\n ctx = temp;\n }\n this.emit(\"message_enriched\", ctx, enrichmentWare);\n _f.label = 7;\n case 7:\n _d++;\n return [3, 5];\n case 8:\n _e = this.availableExtensions((_b2 = ctx.event.integrations) !== null && _b2 !== void 0 ? _b2 : {}), destinations = _e.destinations, after = _e.after;\n return [4, new Promise(function(resolve, reject) {\n setTimeout(function() {\n var attempts = destinations.map(function(destination) {\n return attempt(ctx, destination);\n });\n Promise.all(attempts).then(resolve).catch(reject);\n }, 0);\n })];\n case 9:\n _f.sent();\n ctx.stats.increment(\"message_delivered\");\n this.emit(\"message_delivered\", ctx);\n afterCalls = after.map(function(after2) {\n return attempt(ctx, after2);\n });\n return [4, Promise.all(afterCalls)];\n case 10:\n _f.sent();\n return [2, ctx];\n }\n });\n });\n };\n return CoreEventQueue2;\n }(Emitter);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/analytics/index.js\n var init_analytics = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/analytics/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/analytics/dispatch.js\n function dispatch(ctx, queue2, emitter, options) {\n return __awaiter(this, void 0, void 0, function() {\n var startTime, dispatched;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n emitter.emit(\"dispatch_start\", ctx);\n startTime = Date.now();\n if (!queue2.isEmpty())\n return [3, 2];\n return [4, queue2.dispatchSingle(ctx)];\n case 1:\n dispatched = _a2.sent();\n return [3, 4];\n case 2:\n return [4, queue2.dispatch(ctx)];\n case 3:\n dispatched = _a2.sent();\n _a2.label = 4;\n case 4:\n if (!(options === null || options === void 0 ? void 0 : options.callback))\n return [3, 6];\n return [4, invokeCallback(dispatched, options.callback, getDelay(startTime, options.timeout))];\n case 5:\n dispatched = _a2.sent();\n _a2.label = 6;\n case 6:\n if (options === null || options === void 0 ? void 0 : options.debug) {\n dispatched.flush();\n }\n return [2, dispatched];\n }\n });\n });\n }\n var getDelay;\n var init_dispatch = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/analytics/dispatch.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_callback();\n getDelay = function(startTimeInEpochMS, timeoutInMS) {\n var elapsedTime = Date.now() - startTimeInEpochMS;\n return Math.max((timeoutInMS !== null && timeoutInMS !== void 0 ? timeoutInMS : 300) - elapsedTime, 0);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/bind-all.js\n var init_bind_all = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/bind-all.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/index.js\n var init_esm9 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_interface();\n init_plugins();\n init_interfaces();\n init_events();\n init_callback();\n init_priority_queue();\n init_context();\n init_event_queue();\n init_analytics();\n init_dispatch();\n init_helpers();\n init_errors6();\n init_assertions();\n init_bind_all();\n init_stats();\n init_delivery();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/arguments-resolver/index.js\n function resolveArguments(eventName, properties, options, callback) {\n var _a2;\n var args = [eventName, properties, options, callback];\n var name = isPlainObject2(eventName) ? eventName.event : eventName;\n if (!name || !isString2(name)) {\n throw new Error(\"Event missing\");\n }\n var data = isPlainObject2(eventName) ? (_a2 = eventName.properties) !== null && _a2 !== void 0 ? _a2 : {} : isPlainObject2(properties) ? properties : {};\n var opts = {};\n if (!isFunction2(options)) {\n opts = options !== null && options !== void 0 ? options : {};\n }\n if (isPlainObject2(eventName) && !isFunction2(properties)) {\n opts = properties !== null && properties !== void 0 ? properties : {};\n }\n var cb = args.find(isFunction2);\n return [name, data, opts, cb];\n }\n function resolvePageArguments(category, name, properties, options, callback) {\n var _a2, _b2;\n var resolvedCategory = null;\n var resolvedName = null;\n var args = [category, name, properties, options, callback];\n var strings = args.filter(isString2);\n if (strings[0] !== void 0 && strings[1] !== void 0) {\n resolvedCategory = strings[0];\n resolvedName = strings[1];\n }\n if (strings.length === 1) {\n resolvedCategory = null;\n resolvedName = strings[0];\n }\n var resolvedCallback = args.find(isFunction2);\n var objects = args.filter(function(obj) {\n if (resolvedName === null) {\n return isPlainObject2(obj);\n }\n return isPlainObject2(obj) || obj === null;\n });\n var resolvedProperties = (_a2 = objects[0]) !== null && _a2 !== void 0 ? _a2 : {};\n var resolvedOptions = (_b2 = objects[1]) !== null && _b2 !== void 0 ? _b2 : {};\n return [\n resolvedCategory,\n resolvedName,\n resolvedProperties,\n resolvedOptions,\n resolvedCallback\n ];\n }\n function resolveAliasArguments(to, from5, options, callback) {\n if (isNumber2(to))\n to = to.toString();\n if (isNumber2(from5))\n from5 = from5.toString();\n var args = [to, from5, options, callback];\n var _a2 = args.filter(isString2), _b2 = _a2[0], aliasTo = _b2 === void 0 ? to : _b2, _c = _a2[1], aliasFrom = _c === void 0 ? null : _c;\n var _d = args.filter(isPlainObject2)[0], opts = _d === void 0 ? {} : _d;\n var resolvedCallback = args.find(isFunction2);\n return [aliasTo, aliasFrom, opts, resolvedCallback];\n }\n var resolveUserArguments;\n var init_arguments_resolver = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/arguments-resolver/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm9();\n resolveUserArguments = function(user) {\n return function() {\n var _a2, _b2, _c;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var values = {};\n var orderStack = [\n \"callback\",\n \"options\",\n \"traits\",\n \"id\"\n ];\n for (var _d = 0, args_1 = args; _d < args_1.length; _d++) {\n var arg = args_1[_d];\n var current = orderStack.pop();\n if (current === \"id\") {\n if (isString2(arg) || isNumber2(arg)) {\n values.id = arg.toString();\n continue;\n }\n if (arg === null || arg === void 0) {\n continue;\n }\n current = orderStack.pop();\n }\n if ((current === \"traits\" || current === \"options\") && (arg === null || arg === void 0 || isPlainObject2(arg))) {\n values[current] = arg;\n }\n if (isFunction2(arg)) {\n values.callback = arg;\n break;\n }\n }\n return [\n (_a2 = values.id) !== null && _a2 !== void 0 ? _a2 : user.id(),\n (_b2 = values.traits) !== null && _b2 !== void 0 ? _b2 : {},\n (_c = values.options) !== null && _c !== void 0 ? _c : {},\n values.callback\n ];\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/environment/index.js\n function isBrowser() {\n return typeof window !== \"undefined\";\n }\n function isServer() {\n return !isBrowser();\n }\n var init_environment = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/environment/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/connection/index.js\n function isOnline() {\n if (isBrowser()) {\n return window.navigator.onLine;\n }\n return true;\n }\n function isOffline() {\n return !isOnline();\n }\n var init_connection = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/connection/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_environment();\n }\n });\n\n // ../../../node_modules/.pnpm/unfetch@4.2.0/node_modules/unfetch/dist/unfetch.module.js\n function unfetch_module_default(e2, n2) {\n return n2 = n2 || {}, new Promise(function(t3, r2) {\n var s4 = new XMLHttpRequest(), o5 = [], u2 = [], i3 = {}, a3 = function() {\n return { ok: 2 == (s4.status / 100 | 0), statusText: s4.statusText, status: s4.status, url: s4.responseURL, text: function() {\n return Promise.resolve(s4.responseText);\n }, json: function() {\n return Promise.resolve(s4.responseText).then(JSON.parse);\n }, blob: function() {\n return Promise.resolve(new Blob([s4.response]));\n }, clone: a3, headers: { keys: function() {\n return o5;\n }, entries: function() {\n return u2;\n }, get: function(e3) {\n return i3[e3.toLowerCase()];\n }, has: function(e3) {\n return e3.toLowerCase() in i3;\n } } };\n };\n for (var l6 in s4.open(n2.method || \"get\", e2, true), s4.onload = function() {\n s4.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm, function(e3, n3, t4) {\n o5.push(n3 = n3.toLowerCase()), u2.push([n3, t4]), i3[n3] = i3[n3] ? i3[n3] + \",\" + t4 : t4;\n }), t3(a3());\n }, s4.onerror = r2, s4.withCredentials = \"include\" == n2.credentials, n2.headers)\n s4.setRequestHeader(l6, n2.headers[l6]);\n s4.send(n2.body || null);\n });\n }\n var init_unfetch_module = __esm({\n \"../../../node_modules/.pnpm/unfetch@4.2.0/node_modules/unfetch/dist/unfetch.module.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/get-global.js\n var getGlobal;\n var init_get_global = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/get-global.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getGlobal = function() {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\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 return null;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/fetch.js\n var fetch2;\n var init_fetch2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/fetch.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_unfetch_module();\n init_get_global();\n fetch2 = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var global3 = getGlobal();\n return (global3 && global3.fetch || unfetch_module_default).apply(void 0, args);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/generated/version.js\n var version7;\n var init_version7 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/generated/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version7 = \"1.74.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/version-type.js\n function getVersionType() {\n return _version;\n }\n var _version;\n var init_version_type = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/version-type.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _version = \"npm\";\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/constants/index.js\n var SEGMENT_API_HOST;\n var init_constants2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/constants/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n SEGMENT_API_HOST = \"api.segment.io/v1\";\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/remote-metrics.js\n function logError(err) {\n console.error(\"Error sending segment performance metrics\", err);\n }\n var createRemoteMetric, RemoteMetrics;\n var init_remote_metrics = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/remote-metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_fetch2();\n init_version7();\n init_version_type();\n init_constants2();\n createRemoteMetric = function(metric, tags, versionType) {\n var formattedTags = tags.reduce(function(acc, t3) {\n var _a2 = t3.split(\":\"), k4 = _a2[0], v2 = _a2[1];\n acc[k4] = v2;\n return acc;\n }, {});\n return {\n type: \"Counter\",\n metric,\n value: 1,\n tags: __assign(__assign({}, formattedTags), { library: \"analytics.js\", library_version: versionType === \"web\" ? \"next-\".concat(version7) : \"npm:next-\".concat(version7) })\n };\n };\n RemoteMetrics = /** @class */\n function() {\n function RemoteMetrics2(options) {\n var _this = this;\n var _a2, _b2, _c, _d, _e;\n this.host = (_a2 = options === null || options === void 0 ? void 0 : options.host) !== null && _a2 !== void 0 ? _a2 : SEGMENT_API_HOST;\n this.sampleRate = (_b2 = options === null || options === void 0 ? void 0 : options.sampleRate) !== null && _b2 !== void 0 ? _b2 : 1;\n this.flushTimer = (_c = options === null || options === void 0 ? void 0 : options.flushTimer) !== null && _c !== void 0 ? _c : 30 * 1e3;\n this.maxQueueSize = (_d = options === null || options === void 0 ? void 0 : options.maxQueueSize) !== null && _d !== void 0 ? _d : 20;\n this.protocol = (_e = options === null || options === void 0 ? void 0 : options.protocol) !== null && _e !== void 0 ? _e : \"https\";\n this.queue = [];\n if (this.sampleRate > 0) {\n var flushing_1 = false;\n var run_1 = function() {\n if (flushing_1) {\n return;\n }\n flushing_1 = true;\n _this.flush().catch(logError);\n flushing_1 = false;\n setTimeout(run_1, _this.flushTimer);\n };\n run_1();\n }\n }\n RemoteMetrics2.prototype.increment = function(metric, tags) {\n if (!metric.includes(\"analytics_js.\")) {\n return;\n }\n if (tags.length === 0) {\n return;\n }\n if (Math.random() > this.sampleRate) {\n return;\n }\n if (this.queue.length >= this.maxQueueSize) {\n return;\n }\n var remoteMetric = createRemoteMetric(metric, tags, getVersionType());\n this.queue.push(remoteMetric);\n if (metric.includes(\"error\")) {\n this.flush().catch(logError);\n }\n };\n RemoteMetrics2.prototype.flush = function() {\n return __awaiter(this, void 0, void 0, function() {\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (this.queue.length <= 0) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.send().catch(function(error) {\n logError(error);\n _this.sampleRate = 0;\n })];\n case 1:\n _a2.sent();\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n RemoteMetrics2.prototype.send = function() {\n return __awaiter(this, void 0, void 0, function() {\n var payload, headers, url;\n return __generator(this, function(_a2) {\n payload = { series: this.queue };\n this.queue = [];\n headers = { \"Content-Type\": \"text/plain\" };\n url = \"\".concat(this.protocol, \"://\").concat(this.host, \"/m\");\n return [2, fetch2(url, {\n headers,\n body: JSON.stringify(payload),\n method: \"POST\"\n })];\n });\n });\n };\n return RemoteMetrics2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/index.js\n var remoteMetrics, Stats;\n var init_stats2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_esm9();\n init_remote_metrics();\n Stats = /** @class */\n function(_super) {\n __extends(Stats2, _super);\n function Stats2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Stats2.initRemoteMetrics = function(options) {\n remoteMetrics = new RemoteMetrics(options);\n };\n Stats2.prototype.increment = function(metric, by, tags) {\n _super.prototype.increment.call(this, metric, by, tags);\n remoteMetrics === null || remoteMetrics === void 0 ? void 0 : remoteMetrics.increment(metric, tags !== null && tags !== void 0 ? tags : []);\n };\n return Stats2;\n }(CoreStats);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/context/index.js\n var Context;\n var init_context2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/context/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_esm9();\n init_stats2();\n Context = /** @class */\n function(_super) {\n __extends(Context2, _super);\n function Context2(event, id) {\n return _super.call(this, event, id, new Stats()) || this;\n }\n Context2.system = function() {\n return new this({ type: \"track\", event: \"system\" });\n };\n return Context2;\n }(CoreContext);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/get-page-context.js\n function isBufferedPageContext(bufferedPageCtx) {\n if (!isPlainObject2(bufferedPageCtx))\n return false;\n if (bufferedPageCtx.__t !== BufferedPageContextDiscriminant)\n return false;\n for (var k4 in bufferedPageCtx) {\n if (!BUFFERED_PAGE_CONTEXT_KEYS.includes(k4)) {\n return false;\n }\n }\n return true;\n }\n var BufferedPageContextDiscriminant, createBufferedPageContext, BUFFERED_PAGE_CONTEXT_KEYS, createCanonicalURL, removeHash, parseCanonicalPath, createPageContext, getDefaultBufferedPageContext, getDefaultPageContext;\n var init_get_page_context = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/get-page-context.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm9();\n BufferedPageContextDiscriminant = \"bpc\";\n createBufferedPageContext = function(url, canonicalUrl, search, path, title2, referrer) {\n return {\n __t: BufferedPageContextDiscriminant,\n c: canonicalUrl,\n p: path,\n u: url,\n s: search,\n t: title2,\n r: referrer\n };\n };\n BUFFERED_PAGE_CONTEXT_KEYS = Object.keys(createBufferedPageContext(\"\", \"\", \"\", \"\", \"\", \"\"));\n createCanonicalURL = function(canonicalUrl, searchParams) {\n return canonicalUrl.indexOf(\"?\") > -1 ? canonicalUrl : canonicalUrl + searchParams;\n };\n removeHash = function(href) {\n var hashIdx = href.indexOf(\"#\");\n return hashIdx === -1 ? href : href.slice(0, hashIdx);\n };\n parseCanonicalPath = function(canonicalUrl) {\n try {\n return new URL(canonicalUrl).pathname;\n } catch (_e) {\n return canonicalUrl[0] === \"/\" ? canonicalUrl : \"/\" + canonicalUrl;\n }\n };\n createPageContext = function(_a2) {\n var canonicalUrl = _a2.c, pathname = _a2.p, search = _a2.s, url = _a2.u, referrer = _a2.r, title2 = _a2.t;\n var newPath = canonicalUrl ? parseCanonicalPath(canonicalUrl) : pathname;\n var newUrl = canonicalUrl ? createCanonicalURL(canonicalUrl, search) : removeHash(url);\n return {\n path: newPath,\n referrer,\n search,\n title: title2,\n url: newUrl\n };\n };\n getDefaultBufferedPageContext = function() {\n var c4 = document.querySelector(\"link[rel='canonical']\");\n return createBufferedPageContext(location.href, c4 && c4.getAttribute(\"href\") || void 0, location.search, location.pathname, document.title, document.referrer);\n };\n getDefaultPageContext = function() {\n return createPageContext(getDefaultBufferedPageContext());\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/pick.js\n function pick2(object, keys) {\n return Object.assign.apply(Object, __spreadArray([{}], keys.map(function(key) {\n var _a2;\n if (object && Object.prototype.hasOwnProperty.call(object, key)) {\n return _a2 = {}, _a2[key] = object[key], _a2;\n }\n }), false));\n }\n var init_pick2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/pick.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/add-page-context.js\n var addPageContext;\n var init_add_page_context = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/add-page-context.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_pick2();\n init_get_page_context();\n addPageContext = function(event, pageCtx) {\n if (pageCtx === void 0) {\n pageCtx = getDefaultPageContext();\n }\n var evtCtx = event.context;\n var pageContextFromEventProps;\n if (event.type === \"page\") {\n pageContextFromEventProps = event.properties && pick2(event.properties, Object.keys(pageCtx));\n event.properties = __assign(__assign(__assign({}, pageCtx), event.properties), event.name ? { name: event.name } : {});\n }\n evtCtx.page = __assign(__assign(__assign({}, pageCtx), pageContextFromEventProps), evtCtx.page);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/index.js\n var init_page = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_get_page_context();\n init_add_page_context();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/events/interfaces.js\n var init_interfaces2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/events/interfaces.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/events/index.js\n var EventFactory;\n var init_events2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/events/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_dist2();\n init_page();\n init_esm9();\n init_interfaces2();\n EventFactory = /** @class */\n function(_super) {\n __extends(EventFactory2, _super);\n function EventFactory2(user) {\n var _this = _super.call(this, {\n createMessageId: function() {\n return \"ajs-next-\".concat(Date.now(), \"-\").concat(v4());\n },\n onEventMethodCall: function(_a2) {\n var options = _a2.options;\n _this.maybeUpdateAnonId(options);\n },\n onFinishedEvent: function(event) {\n _this.addIdentity(event);\n return event;\n }\n }) || this;\n _this.user = user;\n return _this;\n }\n EventFactory2.prototype.maybeUpdateAnonId = function(options) {\n (options === null || options === void 0 ? void 0 : options.anonymousId) && this.user.anonymousId(options.anonymousId);\n };\n EventFactory2.prototype.addIdentity = function(event) {\n if (this.user.id()) {\n event.userId = this.user.id();\n }\n if (this.user.anonymousId()) {\n event.anonymousId = this.user.anonymousId();\n }\n };\n EventFactory2.prototype.track = function(event, properties, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.track.call(this, event, properties, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n EventFactory2.prototype.page = function(category, page, properties, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.page.call(this, category, page, properties, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n EventFactory2.prototype.screen = function(category, screen, properties, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.screen.call(this, category, screen, properties, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n EventFactory2.prototype.identify = function(userId, traits, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.identify.call(this, userId, traits, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n EventFactory2.prototype.group = function(groupId, traits, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.group.call(this, groupId, traits, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n EventFactory2.prototype.alias = function(to, from5, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.alias.call(this, to, from5, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n return EventFactory2;\n }(CoreEventFactory);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/plugin/index.js\n var isDestinationPluginWithAddMiddleware;\n var init_plugin = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/plugin/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n isDestinationPluginWithAddMiddleware = function(plugin) {\n return \"addMiddleware\" in plugin && plugin.type === \"destination\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/index.js\n var init_priority_queue2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm9();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/persisted.js\n function persisted(key) {\n var items = loc.getItem(key);\n return (items ? JSON.parse(items) : []).map(function(p4) {\n return new Context(p4.event, p4.id);\n });\n }\n function persistItems(key, items) {\n var existing = persisted(key);\n var all3 = __spreadArray(__spreadArray([], items, true), existing, true);\n var merged = all3.reduce(function(acc, item) {\n var _a2;\n return __assign(__assign({}, acc), (_a2 = {}, _a2[item.id] = item, _a2));\n }, {});\n loc.setItem(key, JSON.stringify(Object.values(merged)));\n }\n function seen(key) {\n var stored = loc.getItem(key);\n return stored ? JSON.parse(stored) : {};\n }\n function persistSeen(key, memory) {\n var stored = seen(key);\n loc.setItem(key, JSON.stringify(__assign(__assign({}, stored), memory)));\n }\n function remove(key) {\n loc.removeItem(key);\n }\n function mutex(key, onUnlock, attempt2) {\n if (attempt2 === void 0) {\n attempt2 = 0;\n }\n var lockTimeout = 50;\n var lockKey = \"persisted-queue:v1:\".concat(key, \":lock\");\n var expired = function(lock2) {\n return (/* @__PURE__ */ new Date()).getTime() > lock2;\n };\n var rawLock = loc.getItem(lockKey);\n var lock = rawLock ? JSON.parse(rawLock) : null;\n var allowed = lock === null || expired(lock);\n if (allowed) {\n loc.setItem(lockKey, JSON.stringify(now() + lockTimeout));\n onUnlock();\n loc.removeItem(lockKey);\n return;\n }\n if (!allowed && attempt2 < 3) {\n setTimeout(function() {\n mutex(key, onUnlock, attempt2 + 1);\n }, lockTimeout);\n } else {\n console.error(\"Unable to retrieve lock\");\n }\n }\n var loc, now, PersistedPriorityQueue;\n var init_persisted = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/persisted.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_priority_queue2();\n init_context2();\n init_environment();\n loc = {\n getItem: function() {\n },\n setItem: function() {\n },\n removeItem: function() {\n }\n };\n try {\n loc = isBrowser() && window.localStorage ? window.localStorage : loc;\n } catch (err) {\n console.warn(\"Unable to access localStorage\", err);\n }\n now = function() {\n return (/* @__PURE__ */ new Date()).getTime();\n };\n PersistedPriorityQueue = /** @class */\n function(_super) {\n __extends(PersistedPriorityQueue2, _super);\n function PersistedPriorityQueue2(maxAttempts, key) {\n var _this = _super.call(this, maxAttempts, []) || this;\n var itemsKey = \"persisted-queue:v1:\".concat(key, \":items\");\n var seenKey = \"persisted-queue:v1:\".concat(key, \":seen\");\n var saved = [];\n var lastSeen = {};\n mutex(key, function() {\n try {\n saved = persisted(itemsKey);\n lastSeen = seen(seenKey);\n remove(itemsKey);\n remove(seenKey);\n _this.queue = __spreadArray(__spreadArray([], saved, true), _this.queue, true);\n _this.seen = __assign(__assign({}, lastSeen), _this.seen);\n } catch (err) {\n console.error(err);\n }\n });\n window.addEventListener(\"pagehide\", function() {\n if (_this.todo > 0) {\n var items_1 = __spreadArray(__spreadArray([], _this.queue, true), _this.future, true);\n try {\n mutex(key, function() {\n persistItems(itemsKey, items_1);\n persistSeen(seenKey, _this.seen);\n });\n } catch (err) {\n console.error(err);\n }\n }\n });\n return _this;\n }\n return PersistedPriorityQueue2;\n }(PriorityQueue);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/queue/event-queue.js\n var EventQueue;\n var init_event_queue2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/queue/event-queue.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_persisted();\n init_esm9();\n init_connection();\n EventQueue = /** @class */\n function(_super) {\n __extends(EventQueue2, _super);\n function EventQueue2(nameOrQueue) {\n return _super.call(this, typeof nameOrQueue === \"string\" ? new PersistedPriorityQueue(4, nameOrQueue) : nameOrQueue) || this;\n }\n EventQueue2.prototype.flush = function() {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n if (isOffline())\n return [2, []];\n return [2, _super.prototype.flush.call(this)];\n });\n });\n };\n return EventQueue2;\n }(CoreEventQueue);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/bind-all.js\n function bindAll(obj) {\n var proto = obj.constructor.prototype;\n for (var _i = 0, _a2 = Object.getOwnPropertyNames(proto); _i < _a2.length; _i++) {\n var key = _a2[_i];\n if (key !== \"constructor\") {\n var desc = Object.getOwnPropertyDescriptor(obj.constructor.prototype, key);\n if (!!desc && typeof desc.value === \"function\") {\n obj[key] = obj[key].bind(obj);\n }\n }\n }\n return obj;\n }\n var init_bind_all2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/bind-all.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/js-cookie@3.0.1/node_modules/js-cookie/dist/js.cookie.mjs\n function assign(target) {\n for (var i3 = 1; i3 < arguments.length; i3++) {\n var source = arguments[i3];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target;\n }\n function init(converter, defaultAttributes) {\n function set(key, value, attributes) {\n if (typeof document === \"undefined\") {\n return;\n }\n attributes = assign({}, defaultAttributes, attributes);\n if (typeof attributes.expires === \"number\") {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n key = encodeURIComponent(key).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);\n var stringifiedAttributes = \"\";\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue;\n }\n stringifiedAttributes += \"; \" + attributeName;\n if (attributes[attributeName] === true) {\n continue;\n }\n stringifiedAttributes += \"=\" + attributes[attributeName].split(\";\")[0];\n }\n return document.cookie = key + \"=\" + converter.write(value, key) + stringifiedAttributes;\n }\n function get(key) {\n if (typeof document === \"undefined\" || arguments.length && !key) {\n return;\n }\n var cookies = document.cookie ? document.cookie.split(\"; \") : [];\n var jar = {};\n for (var i3 = 0; i3 < cookies.length; i3++) {\n var parts = cookies[i3].split(\"=\");\n var value = parts.slice(1).join(\"=\");\n try {\n var foundKey = decodeURIComponent(parts[0]);\n jar[foundKey] = converter.read(value, foundKey);\n if (key === foundKey) {\n break;\n }\n } catch (e2) {\n }\n }\n return key ? jar[key] : jar;\n }\n return Object.create(\n {\n set,\n get,\n remove: function(key, attributes) {\n set(\n key,\n \"\",\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function(attributes) {\n return init(this.converter, assign({}, this.attributes, attributes));\n },\n withConverter: function(converter2) {\n return init(assign({}, this.converter, converter2), this.attributes);\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n );\n }\n var defaultConverter, api, js_cookie_default;\n var init_js_cookie = __esm({\n \"../../../node_modules/.pnpm/js-cookie@3.0.1/node_modules/js-cookie/dist/js.cookie.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n defaultConverter = {\n read: function(value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\n },\n write: function(value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n );\n }\n };\n api = init(defaultConverter, { path: \"/\" });\n js_cookie_default = api;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/user/tld.js\n function levels(url) {\n var host = url.hostname;\n var parts = host.split(\".\");\n var last = parts[parts.length - 1];\n var levels2 = [];\n if (parts.length === 4 && parseInt(last, 10) > 0) {\n return levels2;\n }\n if (parts.length <= 1) {\n return levels2;\n }\n for (var i3 = parts.length - 2; i3 >= 0; --i3) {\n levels2.push(parts.slice(i3).join(\".\"));\n }\n return levels2;\n }\n function parseUrl(url) {\n try {\n return new URL(url);\n } catch (_a2) {\n return;\n }\n }\n function tld(url) {\n var parsedUrl = parseUrl(url);\n if (!parsedUrl)\n return;\n var lvls = levels(parsedUrl);\n for (var i3 = 0; i3 < lvls.length; ++i3) {\n var cname = \"__tld__\";\n var domain2 = lvls[i3];\n var opts = { domain: \".\" + domain2 };\n try {\n js_cookie_default.set(cname, \"1\", opts);\n if (js_cookie_default.get(cname)) {\n js_cookie_default.remove(cname, opts);\n return domain2;\n }\n } catch (_2) {\n return;\n }\n }\n }\n var init_tld = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/user/tld.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_js_cookie();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/cookieStorage.js\n var ONE_YEAR, CookieStorage;\n var init_cookieStorage = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/cookieStorage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_js_cookie();\n init_tld();\n ONE_YEAR = 365;\n CookieStorage = /** @class */\n function() {\n function CookieStorage2(options) {\n if (options === void 0) {\n options = CookieStorage2.defaults;\n }\n this.options = __assign(__assign({}, CookieStorage2.defaults), options);\n }\n Object.defineProperty(CookieStorage2, \"defaults\", {\n get: function() {\n return {\n maxage: ONE_YEAR,\n domain: tld(window.location.href),\n path: \"/\",\n sameSite: \"Lax\"\n };\n },\n enumerable: false,\n configurable: true\n });\n CookieStorage2.prototype.opts = function() {\n return {\n sameSite: this.options.sameSite,\n expires: this.options.maxage,\n domain: this.options.domain,\n path: this.options.path,\n secure: this.options.secure\n };\n };\n CookieStorage2.prototype.get = function(key) {\n var _a2;\n try {\n var value = js_cookie_default.get(key);\n if (value === void 0 || value === null) {\n return null;\n }\n try {\n return (_a2 = JSON.parse(value)) !== null && _a2 !== void 0 ? _a2 : null;\n } catch (e2) {\n return value !== null && value !== void 0 ? value : null;\n }\n } catch (e2) {\n return null;\n }\n };\n CookieStorage2.prototype.set = function(key, value) {\n if (typeof value === \"string\") {\n js_cookie_default.set(key, value, this.opts());\n } else if (value === null) {\n js_cookie_default.remove(key, this.opts());\n } else {\n js_cookie_default.set(key, JSON.stringify(value), this.opts());\n }\n };\n CookieStorage2.prototype.remove = function(key) {\n return js_cookie_default.remove(key, this.opts());\n };\n return CookieStorage2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/localStorage.js\n var LocalStorage;\n var init_localStorage = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/localStorage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LocalStorage = /** @class */\n function() {\n function LocalStorage2() {\n }\n LocalStorage2.prototype.localStorageWarning = function(key, state) {\n console.warn(\"Unable to access \".concat(key, \", localStorage may be \").concat(state));\n };\n LocalStorage2.prototype.get = function(key) {\n var _a2;\n try {\n var val = localStorage.getItem(key);\n if (val === null) {\n return null;\n }\n try {\n return (_a2 = JSON.parse(val)) !== null && _a2 !== void 0 ? _a2 : null;\n } catch (e2) {\n return val !== null && val !== void 0 ? val : null;\n }\n } catch (err) {\n this.localStorageWarning(key, \"unavailable\");\n return null;\n }\n };\n LocalStorage2.prototype.set = function(key, value) {\n try {\n localStorage.setItem(key, JSON.stringify(value));\n } catch (_a2) {\n this.localStorageWarning(key, \"full\");\n }\n };\n LocalStorage2.prototype.remove = function(key) {\n try {\n return localStorage.removeItem(key);\n } catch (err) {\n this.localStorageWarning(key, \"unavailable\");\n }\n };\n return LocalStorage2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/memoryStorage.js\n var MemoryStorage;\n var init_memoryStorage = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/memoryStorage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MemoryStorage = /** @class */\n function() {\n function MemoryStorage2() {\n this.cache = {};\n }\n MemoryStorage2.prototype.get = function(key) {\n var _a2;\n return (_a2 = this.cache[key]) !== null && _a2 !== void 0 ? _a2 : null;\n };\n MemoryStorage2.prototype.set = function(key, value) {\n this.cache[key] = value;\n };\n MemoryStorage2.prototype.remove = function(key) {\n delete this.cache[key];\n };\n return MemoryStorage2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/types.js\n var StoreType;\n var init_types3 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/types.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n StoreType = {\n Cookie: \"cookie\",\n LocalStorage: \"localStorage\",\n Memory: \"memory\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/settings.js\n function isArrayOfStoreType(s4) {\n return s4 && s4.stores && Array.isArray(s4.stores) && s4.stores.every(function(e2) {\n return Object.values(StoreType).includes(e2);\n });\n }\n function isStoreTypeWithSettings(s4) {\n return typeof s4 === \"object\" && s4.name !== void 0;\n }\n var init_settings = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/settings.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_types3();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/universalStorage.js\n var _logStoreKeyError, UniversalStorage;\n var init_universalStorage = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/universalStorage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _logStoreKeyError = function(store, action, key, err) {\n console.warn(\"\".concat(store.constructor.name, \": Can't \").concat(action, ' key \"').concat(key, '\" | Err: ').concat(err));\n };\n UniversalStorage = /** @class */\n function() {\n function UniversalStorage2(stores) {\n this.stores = stores;\n }\n UniversalStorage2.prototype.get = function(key) {\n var val = null;\n for (var _i = 0, _a2 = this.stores; _i < _a2.length; _i++) {\n var store = _a2[_i];\n try {\n val = store.get(key);\n if (val !== void 0 && val !== null) {\n return val;\n }\n } catch (e2) {\n _logStoreKeyError(store, \"get\", key, e2);\n }\n }\n return null;\n };\n UniversalStorage2.prototype.set = function(key, value) {\n this.stores.forEach(function(store) {\n try {\n store.set(key, value);\n } catch (e2) {\n _logStoreKeyError(store, \"set\", key, e2);\n }\n });\n };\n UniversalStorage2.prototype.clear = function(key) {\n this.stores.forEach(function(store) {\n try {\n store.remove(key);\n } catch (e2) {\n _logStoreKeyError(store, \"remove\", key, e2);\n }\n });\n };\n UniversalStorage2.prototype.getAndSync = function(key) {\n var val = this.get(key);\n var coercedValue = typeof val === \"number\" ? val.toString() : val;\n this.set(key, coercedValue);\n return coercedValue;\n };\n return UniversalStorage2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/index.js\n function initializeStorages(args) {\n var storages = args.map(function(s4) {\n var type;\n var settings;\n if (isStoreTypeWithSettings(s4)) {\n type = s4.name;\n settings = s4.settings;\n } else {\n type = s4;\n }\n switch (type) {\n case StoreType.Cookie:\n return new CookieStorage(settings);\n case StoreType.LocalStorage:\n return new LocalStorage();\n case StoreType.Memory:\n return new MemoryStorage();\n default:\n throw new Error(\"Unknown Store Type: \".concat(s4));\n }\n });\n return storages;\n }\n function applyCookieOptions(storeTypes, cookieOptions2) {\n return storeTypes.map(function(s4) {\n if (cookieOptions2 && s4 === StoreType.Cookie) {\n return {\n name: s4,\n settings: cookieOptions2\n };\n }\n return s4;\n });\n }\n var init_storage = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_cookieStorage();\n init_localStorage();\n init_memoryStorage();\n init_settings();\n init_types3();\n init_types3();\n init_localStorage();\n init_cookieStorage();\n init_memoryStorage();\n init_universalStorage();\n init_settings();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/user/index.js\n var defaults2, User, groupDefaults, Group;\n var init_user = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/user/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_dist2();\n init_bind_all2();\n init_storage();\n defaults2 = {\n persist: true,\n cookie: {\n key: \"ajs_user_id\",\n oldKey: \"ajs_user\"\n },\n localStorage: {\n key: \"ajs_user_traits\"\n }\n };\n User = /** @class */\n function() {\n function User2(options, cookieOptions2) {\n if (options === void 0) {\n options = defaults2;\n }\n var _this = this;\n var _a2, _b2, _c, _d;\n this.options = {};\n this.id = function(id) {\n if (_this.options.disable) {\n return null;\n }\n var prevId = _this.identityStore.getAndSync(_this.idKey);\n if (id !== void 0) {\n _this.identityStore.set(_this.idKey, id);\n var changingIdentity = id !== prevId && prevId !== null && id !== null;\n if (changingIdentity) {\n _this.anonymousId(null);\n }\n }\n var retId = _this.identityStore.getAndSync(_this.idKey);\n if (retId)\n return retId;\n var retLeg = _this.legacyUserStore.get(defaults2.cookie.oldKey);\n return retLeg ? typeof retLeg === \"object\" ? retLeg.id : retLeg : null;\n };\n this.anonymousId = function(id) {\n var _a3, _b3;\n if (_this.options.disable) {\n return null;\n }\n if (id === void 0) {\n var val = (_a3 = _this.identityStore.getAndSync(_this.anonKey)) !== null && _a3 !== void 0 ? _a3 : (_b3 = _this.legacySIO()) === null || _b3 === void 0 ? void 0 : _b3[0];\n if (val) {\n return val;\n }\n }\n if (id === null) {\n _this.identityStore.set(_this.anonKey, null);\n return _this.identityStore.getAndSync(_this.anonKey);\n }\n _this.identityStore.set(_this.anonKey, id !== null && id !== void 0 ? id : v4());\n return _this.identityStore.getAndSync(_this.anonKey);\n };\n this.traits = function(traits) {\n var _a3;\n if (_this.options.disable) {\n return;\n }\n if (traits === null) {\n traits = {};\n }\n if (traits) {\n _this.traitsStore.set(_this.traitsKey, traits !== null && traits !== void 0 ? traits : {});\n }\n return (_a3 = _this.traitsStore.get(_this.traitsKey)) !== null && _a3 !== void 0 ? _a3 : {};\n };\n this.options = __assign(__assign({}, defaults2), options);\n this.cookieOptions = cookieOptions2;\n this.idKey = (_b2 = (_a2 = options.cookie) === null || _a2 === void 0 ? void 0 : _a2.key) !== null && _b2 !== void 0 ? _b2 : defaults2.cookie.key;\n this.traitsKey = (_d = (_c = options.localStorage) === null || _c === void 0 ? void 0 : _c.key) !== null && _d !== void 0 ? _d : defaults2.localStorage.key;\n this.anonKey = \"ajs_anonymous_id\";\n this.identityStore = this.createStorage(this.options, cookieOptions2);\n this.legacyUserStore = this.createStorage(this.options, cookieOptions2, function(s4) {\n return s4 === StoreType.Cookie;\n });\n this.traitsStore = this.createStorage(this.options, cookieOptions2, function(s4) {\n return s4 !== StoreType.Cookie;\n });\n var legacyUser = this.legacyUserStore.get(defaults2.cookie.oldKey);\n if (legacyUser && typeof legacyUser === \"object\") {\n legacyUser.id && this.id(legacyUser.id);\n legacyUser.traits && this.traits(legacyUser.traits);\n }\n bindAll(this);\n }\n User2.prototype.legacySIO = function() {\n var val = this.legacyUserStore.get(\"_sio\");\n if (!val) {\n return null;\n }\n var _a2 = val.split(\"----\"), anon = _a2[0], user = _a2[1];\n return [anon, user];\n };\n User2.prototype.identify = function(id, traits) {\n if (this.options.disable) {\n return;\n }\n traits = traits !== null && traits !== void 0 ? traits : {};\n var currentId = this.id();\n if (currentId === null || currentId === id) {\n traits = __assign(__assign({}, this.traits()), traits);\n }\n if (id) {\n this.id(id);\n }\n this.traits(traits);\n };\n User2.prototype.logout = function() {\n this.anonymousId(null);\n this.id(null);\n this.traits({});\n };\n User2.prototype.reset = function() {\n this.logout();\n this.identityStore.clear(this.idKey);\n this.identityStore.clear(this.anonKey);\n this.traitsStore.clear(this.traitsKey);\n };\n User2.prototype.load = function() {\n return new User2(this.options, this.cookieOptions);\n };\n User2.prototype.save = function() {\n return true;\n };\n User2.prototype.createStorage = function(options, cookieOpts, filterStores) {\n var stores = [\n StoreType.LocalStorage,\n StoreType.Cookie,\n StoreType.Memory\n ];\n if (options.disable) {\n return new UniversalStorage([]);\n }\n if (!options.persist) {\n return new UniversalStorage([new MemoryStorage()]);\n }\n if (options.storage !== void 0 && options.storage !== null) {\n if (isArrayOfStoreType(options.storage)) {\n stores = options.storage.stores;\n }\n }\n if (options.localStorageFallbackDisabled) {\n stores = stores.filter(function(s4) {\n return s4 !== StoreType.LocalStorage;\n });\n }\n if (filterStores) {\n stores = stores.filter(filterStores);\n }\n return new UniversalStorage(initializeStorages(applyCookieOptions(stores, cookieOpts)));\n };\n User2.defaults = defaults2;\n return User2;\n }();\n groupDefaults = {\n persist: true,\n cookie: {\n key: \"ajs_group_id\"\n },\n localStorage: {\n key: \"ajs_group_properties\"\n }\n };\n Group = /** @class */\n function(_super) {\n __extends(Group4, _super);\n function Group4(options, cookie) {\n if (options === void 0) {\n options = groupDefaults;\n }\n var _this = _super.call(this, __assign(__assign({}, groupDefaults), options), cookie) || this;\n _this.anonymousId = function(_id) {\n return void 0;\n };\n bindAll(_this);\n return _this;\n }\n return Group4;\n }(User);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/global-analytics-helper.js\n function getGlobalAnalytics() {\n return window[_globalAnalyticsKey];\n }\n function setGlobalAnalyticsKey(key) {\n _globalAnalyticsKey = key;\n }\n function setGlobalAnalytics(analytics) {\n ;\n window[_globalAnalyticsKey] = analytics;\n }\n var _globalAnalyticsKey;\n var init_global_analytics_helper = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/global-analytics-helper.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _globalAnalyticsKey = \"analytics\";\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/is-thenable.js\n var isThenable3;\n var init_is_thenable2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/is-thenable.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n isThenable3 = function(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value && typeof value.then === \"function\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/buffer/index.js\n function callAnalyticsMethod(analytics, call2) {\n return __awaiter(this, void 0, void 0, function() {\n var result, err_1;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n _a2.trys.push([0, 3, , 4]);\n if (call2.called) {\n return [2, void 0];\n }\n call2.called = true;\n result = analytics[call2.method].apply(analytics, call2.args);\n if (!isThenable3(result))\n return [3, 2];\n return [4, result];\n case 1:\n _a2.sent();\n _a2.label = 2;\n case 2:\n call2.resolve(result);\n return [3, 4];\n case 3:\n err_1 = _a2.sent();\n call2.reject(err_1);\n return [3, 4];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }\n var flushSyncAnalyticsCalls, flushAddSourceMiddleware, flushRegister, flushOn, flushSetAnonymousID, flushAnalyticsCallsInNewTask, popPageContext, hasBufferedPageContextAsLastArg, PreInitMethodCall, PreInitMethodCallBuffer, AnalyticsBuffered;\n var init_buffer3 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/buffer/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_is_thenable2();\n init_version7();\n init_global_analytics_helper();\n init_page();\n init_version_type();\n flushSyncAnalyticsCalls = function(name, analytics, buffer2) {\n buffer2.getAndRemove(name).forEach(function(c4) {\n callAnalyticsMethod(analytics, c4).catch(console.error);\n });\n };\n flushAddSourceMiddleware = function(analytics, buffer2) {\n return __awaiter(void 0, void 0, void 0, function() {\n var _i, _a2, c4;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n _i = 0, _a2 = buffer2.getAndRemove(\"addSourceMiddleware\");\n _b2.label = 1;\n case 1:\n if (!(_i < _a2.length))\n return [3, 4];\n c4 = _a2[_i];\n return [4, callAnalyticsMethod(analytics, c4).catch(console.error)];\n case 2:\n _b2.sent();\n _b2.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n flushRegister = function(analytics, buffer2) {\n return __awaiter(void 0, void 0, void 0, function() {\n var _i, _a2, c4;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n _i = 0, _a2 = buffer2.getAndRemove(\"register\");\n _b2.label = 1;\n case 1:\n if (!(_i < _a2.length))\n return [3, 4];\n c4 = _a2[_i];\n return [4, callAnalyticsMethod(analytics, c4).catch(console.error)];\n case 2:\n _b2.sent();\n _b2.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n flushOn = flushSyncAnalyticsCalls.bind(void 0, \"on\");\n flushSetAnonymousID = flushSyncAnalyticsCalls.bind(void 0, \"setAnonymousId\");\n flushAnalyticsCallsInNewTask = function(analytics, buffer2) {\n ;\n Object.keys(buffer2.calls).forEach(function(m2) {\n buffer2.getAndRemove(m2).forEach(function(c4) {\n setTimeout(function() {\n callAnalyticsMethod(analytics, c4).catch(console.error);\n }, 0);\n });\n });\n };\n popPageContext = function(args) {\n if (hasBufferedPageContextAsLastArg(args)) {\n var ctx = args.pop();\n return createPageContext(ctx);\n }\n };\n hasBufferedPageContextAsLastArg = function(args) {\n var lastArg = args[args.length - 1];\n return isBufferedPageContext(lastArg);\n };\n PreInitMethodCall = /** @class */\n /* @__PURE__ */ function() {\n function PreInitMethodCall2(method, args, resolve, reject) {\n if (resolve === void 0) {\n resolve = function() {\n };\n }\n if (reject === void 0) {\n reject = console.error;\n }\n this.method = method;\n this.resolve = resolve;\n this.reject = reject;\n this.called = false;\n this.args = args;\n }\n return PreInitMethodCall2;\n }();\n PreInitMethodCallBuffer = /** @class */\n function() {\n function PreInitMethodCallBuffer2() {\n var calls = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n calls[_i] = arguments[_i];\n }\n this._callMap = {};\n this.add.apply(this, calls);\n }\n Object.defineProperty(PreInitMethodCallBuffer2.prototype, \"calls\", {\n /**\n * Pull any buffered method calls from the window object, and use them to hydrate the instance buffer.\n */\n get: function() {\n this._pushSnippetWindowBuffer();\n return this._callMap;\n },\n set: function(calls) {\n this._callMap = calls;\n },\n enumerable: false,\n configurable: true\n });\n PreInitMethodCallBuffer2.prototype.get = function(methodName) {\n var _a2;\n return (_a2 = this.calls[methodName]) !== null && _a2 !== void 0 ? _a2 : [];\n };\n PreInitMethodCallBuffer2.prototype.getAndRemove = function(methodName) {\n var calls = this.get(methodName);\n this.calls[methodName] = [];\n return calls;\n };\n PreInitMethodCallBuffer2.prototype.add = function() {\n var _this = this;\n var calls = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n calls[_i] = arguments[_i];\n }\n calls.forEach(function(call2) {\n var eventsExpectingPageContext = [\n \"track\",\n \"screen\",\n \"alias\",\n \"group\",\n \"page\",\n \"identify\"\n ];\n if (eventsExpectingPageContext.includes(call2.method) && !hasBufferedPageContextAsLastArg(call2.args)) {\n call2.args = __spreadArray(__spreadArray([], call2.args, true), [getDefaultBufferedPageContext()], false);\n }\n if (_this.calls[call2.method]) {\n _this.calls[call2.method].push(call2);\n } else {\n _this.calls[call2.method] = [call2];\n }\n });\n };\n PreInitMethodCallBuffer2.prototype.clear = function() {\n this._pushSnippetWindowBuffer();\n this.calls = {};\n };\n PreInitMethodCallBuffer2.prototype.toArray = function() {\n var _a2;\n return (_a2 = []).concat.apply(_a2, Object.values(this.calls));\n };\n PreInitMethodCallBuffer2.prototype._pushSnippetWindowBuffer = function() {\n if (getVersionType() === \"npm\") {\n return void 0;\n }\n var wa = getGlobalAnalytics();\n if (!Array.isArray(wa))\n return void 0;\n var buffered = wa.splice(0, wa.length);\n var calls = buffered.map(function(_a2) {\n var methodName = _a2[0], args = _a2.slice(1);\n return new PreInitMethodCall(methodName, args);\n });\n this.add.apply(this, calls);\n };\n return PreInitMethodCallBuffer2;\n }();\n AnalyticsBuffered = /** @class */\n function() {\n function AnalyticsBuffered2(loader) {\n var _this = this;\n this.trackSubmit = this._createMethod(\"trackSubmit\");\n this.trackClick = this._createMethod(\"trackClick\");\n this.trackLink = this._createMethod(\"trackLink\");\n this.pageView = this._createMethod(\"pageview\");\n this.identify = this._createMethod(\"identify\");\n this.reset = this._createMethod(\"reset\");\n this.group = this._createMethod(\"group\");\n this.track = this._createMethod(\"track\");\n this.ready = this._createMethod(\"ready\");\n this.alias = this._createMethod(\"alias\");\n this.debug = this._createChainableMethod(\"debug\");\n this.page = this._createMethod(\"page\");\n this.once = this._createChainableMethod(\"once\");\n this.off = this._createChainableMethod(\"off\");\n this.on = this._createChainableMethod(\"on\");\n this.addSourceMiddleware = this._createMethod(\"addSourceMiddleware\");\n this.setAnonymousId = this._createMethod(\"setAnonymousId\");\n this.addDestinationMiddleware = this._createMethod(\"addDestinationMiddleware\");\n this.screen = this._createMethod(\"screen\");\n this.register = this._createMethod(\"register\");\n this.deregister = this._createMethod(\"deregister\");\n this.user = this._createMethod(\"user\");\n this.VERSION = version7;\n this._preInitBuffer = new PreInitMethodCallBuffer();\n this._promise = loader(this._preInitBuffer);\n this._promise.then(function(_a2) {\n var ajs = _a2[0], ctx = _a2[1];\n _this.instance = ajs;\n _this.ctx = ctx;\n }).catch(function() {\n });\n }\n AnalyticsBuffered2.prototype.then = function() {\n var _a2;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return (_a2 = this._promise).then.apply(_a2, args);\n };\n AnalyticsBuffered2.prototype.catch = function() {\n var _a2;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return (_a2 = this._promise).catch.apply(_a2, args);\n };\n AnalyticsBuffered2.prototype.finally = function() {\n var _a2;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return (_a2 = this._promise).finally.apply(_a2, args);\n };\n AnalyticsBuffered2.prototype._createMethod = function(methodName) {\n var _this = this;\n return function() {\n var _a2;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (_this.instance) {\n var result = (_a2 = _this.instance)[methodName].apply(_a2, args);\n return Promise.resolve(result);\n }\n return new Promise(function(resolve, reject) {\n _this._preInitBuffer.add(new PreInitMethodCall(methodName, args, resolve, reject));\n });\n };\n };\n AnalyticsBuffered2.prototype._createChainableMethod = function(methodName) {\n var _this = this;\n return function() {\n var _a2;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (_this.instance) {\n void (_a2 = _this.instance)[methodName].apply(_a2, args);\n return _this;\n } else {\n _this._preInitBuffer.add(new PreInitMethodCall(methodName, args));\n }\n return _this;\n };\n };\n return AnalyticsBuffered2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/callback/index.js\n var init_callback2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/callback/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm9();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js\n var auto_track_exports = {};\n __export(auto_track_exports, {\n form: () => form,\n link: () => link\n });\n function userNewTab(event) {\n var typedEvent = event;\n if (typedEvent.ctrlKey || typedEvent.shiftKey || typedEvent.metaKey || typedEvent.button && typedEvent.button == 1) {\n return true;\n }\n return false;\n }\n function linkNewTab(element, href) {\n if (element.target === \"_blank\" && href) {\n return true;\n }\n return false;\n }\n function link(links, event, properties, options) {\n var _this = this;\n var elements = [];\n if (!links) {\n return this;\n }\n if (links instanceof Element) {\n elements = [links];\n } else if (\"toArray\" in links) {\n elements = links.toArray();\n } else {\n elements = links;\n }\n elements.forEach(function(el) {\n el.addEventListener(\"click\", function(elementEvent) {\n var _a2, _b2;\n var ev = event instanceof Function ? event(el) : event;\n var props = properties instanceof Function ? properties(el) : properties;\n var href = el.getAttribute(\"href\") || el.getAttributeNS(\"http://www.w3.org/1999/xlink\", \"href\") || el.getAttribute(\"xlink:href\") || ((_a2 = el.getElementsByTagName(\"a\")[0]) === null || _a2 === void 0 ? void 0 : _a2.getAttribute(\"href\"));\n var trackEvent = pTimeout(_this.track(ev, props, options !== null && options !== void 0 ? options : {}), (_b2 = _this.settings.timeout) !== null && _b2 !== void 0 ? _b2 : 500);\n if (!linkNewTab(el, href) && !userNewTab(elementEvent)) {\n if (href) {\n elementEvent.preventDefault ? elementEvent.preventDefault() : elementEvent.returnValue = false;\n trackEvent.catch(console.error).then(function() {\n window.location.href = href;\n }).catch(console.error);\n }\n }\n }, false);\n });\n return this;\n }\n function form(forms, event, properties, options) {\n var _this = this;\n if (!forms)\n return this;\n if (forms instanceof HTMLFormElement)\n forms = [forms];\n var elements = forms;\n elements.forEach(function(el) {\n if (!(el instanceof Element))\n throw new TypeError(\"Must pass HTMLElement to trackForm/trackSubmit.\");\n var handler = function(elementEvent) {\n var _a2;\n elementEvent.preventDefault ? elementEvent.preventDefault() : elementEvent.returnValue = false;\n var ev = event instanceof Function ? event(el) : event;\n var props = properties instanceof Function ? properties(el) : properties;\n var trackEvent = pTimeout(_this.track(ev, props, options !== null && options !== void 0 ? options : {}), (_a2 = _this.settings.timeout) !== null && _a2 !== void 0 ? _a2 : 500);\n trackEvent.catch(console.error).then(function() {\n el.submit();\n }).catch(console.error);\n };\n var $3 = window.jQuery || window.Zepto;\n if ($3) {\n $3(el).submit(handler);\n } else {\n el.addEventListener(\"submit\", handler, false);\n }\n });\n return this;\n }\n var init_auto_track = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_callback2();\n }\n });\n\n // ../../../node_modules/.pnpm/obj-case@0.2.1/node_modules/obj-case/index.js\n var require_obj_case = __commonJS({\n \"../../../node_modules/.pnpm/obj-case@0.2.1/node_modules/obj-case/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = multiple(find);\n module.exports.find = module.exports;\n module.exports.replace = function(obj, key, val, options) {\n multiple(replace).call(this, obj, key, val, options);\n return obj;\n };\n module.exports.del = function(obj, key, options) {\n multiple(del).call(this, obj, key, null, options);\n return obj;\n };\n function multiple(fn) {\n return function(obj, path, val, options) {\n var normalize3 = options && isFunction3(options.normalizer) ? options.normalizer : defaultNormalize;\n path = normalize3(path);\n var key;\n var finished = false;\n while (!finished)\n loop();\n function loop() {\n for (key in obj) {\n var normalizedKey = normalize3(key);\n if (0 === path.indexOf(normalizedKey)) {\n var temp = path.substr(normalizedKey.length);\n if (temp.charAt(0) === \".\" || temp.length === 0) {\n path = temp.substr(1);\n var child = obj[key];\n if (null == child) {\n finished = true;\n return;\n }\n if (!path.length) {\n finished = true;\n return;\n }\n obj = child;\n return;\n }\n }\n }\n key = void 0;\n finished = true;\n }\n if (!key)\n return;\n if (null == obj)\n return obj;\n return fn(obj, key, val);\n };\n }\n function find(obj, key) {\n if (obj.hasOwnProperty(key))\n return obj[key];\n }\n function del(obj, key) {\n if (obj.hasOwnProperty(key))\n delete obj[key];\n return obj;\n }\n function replace(obj, key, val) {\n if (obj.hasOwnProperty(key))\n obj[key] = val;\n return obj;\n }\n function defaultNormalize(path) {\n return path.replace(/[^a-zA-Z0-9\\.]+/g, \"\").toLowerCase();\n }\n function isFunction3(val) {\n return typeof val === \"function\";\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/address.js\n var require_address2 = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var obj_case_1 = __importDefault2(require_obj_case());\n function trait(a3, b4) {\n return function() {\n var traits = this.traits();\n var props = this.properties ? this.properties() : {};\n return obj_case_1.default(traits, \"address.\" + a3) || obj_case_1.default(traits, a3) || (b4 ? obj_case_1.default(traits, \"address.\" + b4) : null) || (b4 ? obj_case_1.default(traits, b4) : null) || obj_case_1.default(props, \"address.\" + a3) || obj_case_1.default(props, a3) || (b4 ? obj_case_1.default(props, \"address.\" + b4) : null) || (b4 ? obj_case_1.default(props, b4) : null);\n };\n }\n function default_1(proto) {\n proto.zip = trait(\"postalCode\", \"zip\");\n proto.country = trait(\"country\");\n proto.street = trait(\"street\");\n proto.state = trait(\"state\");\n proto.city = trait(\"city\");\n proto.region = trait(\"region\");\n }\n exports3.default = default_1;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/clone.js\n var require_clone = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/clone.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.clone = void 0;\n function clone(properties) {\n if (typeof properties !== \"object\")\n return properties;\n if (Object.prototype.toString.call(properties) === \"[object Object]\") {\n var temp = {};\n for (var key in properties) {\n if (Object.prototype.hasOwnProperty.call(properties, key)) {\n temp[key] = clone(properties[key]);\n }\n }\n return temp;\n } else if (Array.isArray(properties)) {\n return properties.map(clone);\n } else {\n return properties;\n }\n }\n exports3.clone = clone;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/is-enabled.js\n var require_is_enabled = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/is-enabled.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var disabled = {\n Salesforce: true\n };\n function default_1(integration) {\n return !disabled[integration];\n }\n exports3.default = default_1;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+isodate@1.0.3/node_modules/@segment/isodate/lib/index.js\n var require_lib33 = __commonJS({\n \"../../../node_modules/.pnpm/@segment+isodate@1.0.3/node_modules/@segment/isodate/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var matcher = /^(\\d{4})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:([ T])(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,\\.](\\d{1,}))?)?(?:(Z)|([+\\-])(\\d{2})(?::?(\\d{2}))?)?)?$/;\n exports3.parse = function(iso) {\n var numericKeys = [1, 5, 6, 7, 11, 12];\n var arr = matcher.exec(iso);\n var offset = 0;\n if (!arr) {\n return new Date(iso);\n }\n for (var i3 = 0, val; val = numericKeys[i3]; i3++) {\n arr[val] = parseInt(arr[val], 10) || 0;\n }\n arr[2] = parseInt(arr[2], 10) || 1;\n arr[3] = parseInt(arr[3], 10) || 1;\n arr[2]--;\n arr[8] = arr[8] ? (arr[8] + \"00\").substring(0, 3) : 0;\n if (arr[4] === \" \") {\n offset = (/* @__PURE__ */ new Date()).getTimezoneOffset();\n } else if (arr[9] !== \"Z\" && arr[10]) {\n offset = arr[11] * 60 + arr[12];\n if (arr[10] === \"+\") {\n offset = 0 - offset;\n }\n }\n var millis = Date.UTC(arr[1], arr[2], arr[3], arr[5], arr[6] + offset, arr[7], arr[8]);\n return new Date(millis);\n };\n exports3.is = function(string, strict) {\n if (typeof string !== \"string\") {\n return false;\n }\n if (strict && /^\\d{4}-\\d{2}-\\d{2}/.test(string) === false) {\n return false;\n }\n return matcher.test(string);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/milliseconds.js\n var require_milliseconds = __commonJS({\n \"../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/milliseconds.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var matcher = /\\d{13}/;\n exports3.is = function(string) {\n return matcher.test(string);\n };\n exports3.parse = function(millis) {\n millis = parseInt(millis, 10);\n return new Date(millis);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/seconds.js\n var require_seconds = __commonJS({\n \"../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/seconds.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var matcher = /\\d{10}/;\n exports3.is = function(string) {\n return matcher.test(string);\n };\n exports3.parse = function(seconds) {\n var millis = parseInt(seconds, 10) * 1e3;\n return new Date(millis);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/index.js\n var require_lib34 = __commonJS({\n \"../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var isodate = require_lib33();\n var milliseconds = require_milliseconds();\n var seconds = require_seconds();\n var objProto = Object.prototype;\n var toStr = objProto.toString;\n function isDate2(value) {\n return toStr.call(value) === \"[object Date]\";\n }\n function isNumber3(value) {\n return toStr.call(value) === \"[object Number]\";\n }\n module.exports = function newDate(val) {\n if (isDate2(val))\n return val;\n if (isNumber3(val))\n return new Date(toMs(val));\n if (isodate.is(val)) {\n return isodate.parse(val);\n }\n if (milliseconds.is(val)) {\n return milliseconds.parse(val);\n }\n if (seconds.is(val)) {\n return seconds.parse(val);\n }\n return new Date(val);\n };\n function toMs(num2) {\n if (num2 < 315576e5)\n return num2 * 1e3;\n return num2;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+isodate-traverse@1.1.1/node_modules/@segment/isodate-traverse/lib/index.js\n var require_lib35 = __commonJS({\n \"../../../node_modules/.pnpm/@segment+isodate-traverse@1.1.1/node_modules/@segment/isodate-traverse/lib/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var isodate = require_lib33();\n module.exports = traverse;\n function traverse(input, strict) {\n if (strict === void 0)\n strict = true;\n if (input && typeof input === \"object\") {\n return traverseObject(input, strict);\n } else if (Array.isArray(input)) {\n return traverseArray(input, strict);\n } else if (isodate.is(input, strict)) {\n return isodate.parse(input);\n }\n return input;\n }\n function traverseObject(obj, strict) {\n Object.keys(obj).forEach(function(key) {\n obj[key] = traverse(obj[key], strict);\n });\n return obj;\n }\n function traverseArray(arr, strict) {\n arr.forEach(function(value, index2) {\n arr[index2] = traverse(value, strict);\n });\n return arr;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/facade.js\n var require_facade = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/facade.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Facade = void 0;\n var address_1 = __importDefault2(require_address2());\n var clone_1 = require_clone();\n var is_enabled_1 = __importDefault2(require_is_enabled());\n var new_date_1 = __importDefault2(require_lib34());\n var obj_case_1 = __importDefault2(require_obj_case());\n var isodate_traverse_1 = __importDefault2(require_lib35());\n function Facade2(obj, opts) {\n opts = opts || {};\n this.raw = clone_1.clone(obj);\n if (!(\"clone\" in opts))\n opts.clone = true;\n if (opts.clone)\n obj = clone_1.clone(obj);\n if (!(\"traverse\" in opts))\n opts.traverse = true;\n if (!(\"timestamp\" in obj))\n obj.timestamp = /* @__PURE__ */ new Date();\n else\n obj.timestamp = new_date_1.default(obj.timestamp);\n if (opts.traverse)\n isodate_traverse_1.default(obj);\n this.opts = opts;\n this.obj = obj;\n }\n exports3.Facade = Facade2;\n var f6 = Facade2.prototype;\n f6.proxy = function(field) {\n var fields = field.split(\".\");\n field = fields.shift();\n var obj = this[field] || this.obj[field];\n if (!obj)\n return obj;\n if (typeof obj === \"function\")\n obj = obj.call(this) || {};\n if (fields.length === 0)\n return this.opts.clone ? transform2(obj) : obj;\n obj = obj_case_1.default(obj, fields.join(\".\"));\n return this.opts.clone ? transform2(obj) : obj;\n };\n f6.field = function(field) {\n var obj = this.obj[field];\n return this.opts.clone ? transform2(obj) : obj;\n };\n Facade2.proxy = function(field) {\n return function() {\n return this.proxy(field);\n };\n };\n Facade2.field = function(field) {\n return function() {\n return this.field(field);\n };\n };\n Facade2.multi = function(path) {\n return function() {\n var multi = this.proxy(path + \"s\");\n if (Array.isArray(multi))\n return multi;\n var one = this.proxy(path);\n if (one)\n one = [this.opts.clone ? clone_1.clone(one) : one];\n return one || [];\n };\n };\n Facade2.one = function(path) {\n return function() {\n var one = this.proxy(path);\n if (one)\n return one;\n var multi = this.proxy(path + \"s\");\n if (Array.isArray(multi))\n return multi[0];\n };\n };\n f6.json = function() {\n var ret = this.opts.clone ? clone_1.clone(this.obj) : this.obj;\n if (this.type)\n ret.type = this.type();\n return ret;\n };\n f6.rawEvent = function() {\n return this.raw;\n };\n f6.options = function(integration) {\n var obj = this.obj.options || this.obj.context || {};\n var options = this.opts.clone ? clone_1.clone(obj) : obj;\n if (!integration)\n return options;\n if (!this.enabled(integration))\n return;\n var integrations = this.integrations();\n var value = integrations[integration] || obj_case_1.default(integrations, integration);\n if (typeof value !== \"object\")\n value = obj_case_1.default(this.options(), integration);\n return typeof value === \"object\" ? value : {};\n };\n f6.context = f6.options;\n f6.enabled = function(integration) {\n var allEnabled = this.proxy(\"options.providers.all\");\n if (typeof allEnabled !== \"boolean\")\n allEnabled = this.proxy(\"options.all\");\n if (typeof allEnabled !== \"boolean\")\n allEnabled = this.proxy(\"integrations.all\");\n if (typeof allEnabled !== \"boolean\")\n allEnabled = true;\n var enabled = allEnabled && is_enabled_1.default(integration);\n var options = this.integrations();\n if (options.providers && options.providers.hasOwnProperty(integration)) {\n enabled = options.providers[integration];\n }\n if (options.hasOwnProperty(integration)) {\n var settings = options[integration];\n if (typeof settings === \"boolean\") {\n enabled = settings;\n } else {\n enabled = true;\n }\n }\n return !!enabled;\n };\n f6.integrations = function() {\n return this.obj.integrations || this.proxy(\"options.providers\") || this.options();\n };\n f6.active = function() {\n var active = this.proxy(\"options.active\");\n if (active === null || active === void 0)\n active = true;\n return active;\n };\n f6.anonymousId = function() {\n return this.field(\"anonymousId\") || this.field(\"sessionId\");\n };\n f6.sessionId = f6.anonymousId;\n f6.groupId = Facade2.proxy(\"options.groupId\");\n f6.traits = function(aliases) {\n var ret = this.proxy(\"options.traits\") || {};\n var id = this.userId();\n aliases = aliases || {};\n if (id)\n ret.id = id;\n for (var alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n var value = this[alias] == null ? this.proxy(\"options.traits.\" + alias) : this[alias]();\n if (value == null)\n continue;\n ret[aliases[alias]] = value;\n delete ret[alias];\n }\n }\n return ret;\n };\n f6.library = function() {\n var library = this.proxy(\"options.library\");\n if (!library)\n return { name: \"unknown\", version: null };\n if (typeof library === \"string\")\n return { name: library, version: null };\n return library;\n };\n f6.device = function() {\n var device = this.proxy(\"context.device\");\n if (typeof device !== \"object\" || device === null) {\n device = {};\n }\n var library = this.library().name;\n if (device.type)\n return device;\n if (library.indexOf(\"ios\") > -1)\n device.type = \"ios\";\n if (library.indexOf(\"android\") > -1)\n device.type = \"android\";\n return device;\n };\n f6.userAgent = Facade2.proxy(\"context.userAgent\");\n f6.timezone = Facade2.proxy(\"context.timezone\");\n f6.timestamp = Facade2.field(\"timestamp\");\n f6.channel = Facade2.field(\"channel\");\n f6.ip = Facade2.proxy(\"context.ip\");\n f6.userId = Facade2.field(\"userId\");\n address_1.default(f6);\n function transform2(obj) {\n return clone_1.clone(obj);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/alias.js\n var require_alias = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/alias.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Alias = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var facade_1 = require_facade();\n function Alias3(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Alias = Alias3;\n inherits_1.default(Alias3, facade_1.Facade);\n Alias3.prototype.action = function() {\n return \"alias\";\n };\n Alias3.prototype.type = Alias3.prototype.action;\n Alias3.prototype.previousId = function() {\n return this.field(\"previousId\") || this.field(\"from\");\n };\n Alias3.prototype.from = Alias3.prototype.previousId;\n Alias3.prototype.userId = function() {\n return this.field(\"userId\") || this.field(\"to\");\n };\n Alias3.prototype.to = Alias3.prototype.userId;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/is-email.js\n var require_is_email = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/is-email.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var matcher = /.+\\@.+\\..+/;\n function isEmail(string) {\n return matcher.test(string);\n }\n exports3.default = isEmail;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/group.js\n var require_group = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/group.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Group = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var is_email_1 = __importDefault2(require_is_email());\n var new_date_1 = __importDefault2(require_lib34());\n var facade_1 = require_facade();\n function Group4(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Group = Group4;\n inherits_1.default(Group4, facade_1.Facade);\n var g4 = Group4.prototype;\n g4.action = function() {\n return \"group\";\n };\n g4.type = g4.action;\n g4.groupId = facade_1.Facade.field(\"groupId\");\n g4.created = function() {\n var created = this.proxy(\"traits.createdAt\") || this.proxy(\"traits.created\") || this.proxy(\"properties.createdAt\") || this.proxy(\"properties.created\");\n if (created)\n return new_date_1.default(created);\n };\n g4.email = function() {\n var email = this.proxy(\"traits.email\");\n if (email)\n return email;\n var groupId = this.groupId();\n if (is_email_1.default(groupId))\n return groupId;\n };\n g4.traits = function(aliases) {\n var ret = this.properties();\n var id = this.groupId();\n aliases = aliases || {};\n if (id)\n ret.id = id;\n for (var alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n var value = this[alias] == null ? this.proxy(\"traits.\" + alias) : this[alias]();\n if (value == null)\n continue;\n ret[aliases[alias]] = value;\n delete ret[alias];\n }\n }\n return ret;\n };\n g4.name = facade_1.Facade.proxy(\"traits.name\");\n g4.industry = facade_1.Facade.proxy(\"traits.industry\");\n g4.employees = facade_1.Facade.proxy(\"traits.employees\");\n g4.properties = function() {\n return this.field(\"traits\") || this.field(\"properties\") || {};\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/identify.js\n var require_identify = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/identify.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Identify = void 0;\n var facade_1 = require_facade();\n var obj_case_1 = __importDefault2(require_obj_case());\n var inherits_1 = __importDefault2(require_inherits_browser());\n var is_email_1 = __importDefault2(require_is_email());\n var new_date_1 = __importDefault2(require_lib34());\n var trim5 = function(str) {\n return str.trim();\n };\n function Identify3(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Identify = Identify3;\n inherits_1.default(Identify3, facade_1.Facade);\n var i3 = Identify3.prototype;\n i3.action = function() {\n return \"identify\";\n };\n i3.type = i3.action;\n i3.traits = function(aliases) {\n var ret = this.field(\"traits\") || {};\n var id = this.userId();\n aliases = aliases || {};\n if (id)\n ret.id = id;\n for (var alias in aliases) {\n var value = this[alias] == null ? this.proxy(\"traits.\" + alias) : this[alias]();\n if (value == null)\n continue;\n ret[aliases[alias]] = value;\n if (alias !== aliases[alias])\n delete ret[alias];\n }\n return ret;\n };\n i3.email = function() {\n var email = this.proxy(\"traits.email\");\n if (email)\n return email;\n var userId = this.userId();\n if (is_email_1.default(userId))\n return userId;\n };\n i3.created = function() {\n var created = this.proxy(\"traits.created\") || this.proxy(\"traits.createdAt\");\n if (created)\n return new_date_1.default(created);\n };\n i3.companyCreated = function() {\n var created = this.proxy(\"traits.company.created\") || this.proxy(\"traits.company.createdAt\");\n if (created) {\n return new_date_1.default(created);\n }\n };\n i3.companyName = function() {\n return this.proxy(\"traits.company.name\");\n };\n i3.name = function() {\n var name = this.proxy(\"traits.name\");\n if (typeof name === \"string\") {\n return trim5(name);\n }\n var firstName = this.firstName();\n var lastName = this.lastName();\n if (firstName && lastName) {\n return trim5(firstName + \" \" + lastName);\n }\n };\n i3.firstName = function() {\n var firstName = this.proxy(\"traits.firstName\");\n if (typeof firstName === \"string\") {\n return trim5(firstName);\n }\n var name = this.proxy(\"traits.name\");\n if (typeof name === \"string\") {\n return trim5(name).split(\" \")[0];\n }\n };\n i3.lastName = function() {\n var lastName = this.proxy(\"traits.lastName\");\n if (typeof lastName === \"string\") {\n return trim5(lastName);\n }\n var name = this.proxy(\"traits.name\");\n if (typeof name !== \"string\") {\n return;\n }\n var space = trim5(name).indexOf(\" \");\n if (space === -1) {\n return;\n }\n return trim5(name.substr(space + 1));\n };\n i3.uid = function() {\n return this.userId() || this.username() || this.email();\n };\n i3.description = function() {\n return this.proxy(\"traits.description\") || this.proxy(\"traits.background\");\n };\n i3.age = function() {\n var date = this.birthday();\n var age = obj_case_1.default(this.traits(), \"age\");\n if (age != null)\n return age;\n if (!(date instanceof Date))\n return;\n var now2 = /* @__PURE__ */ new Date();\n return now2.getFullYear() - date.getFullYear();\n };\n i3.avatar = function() {\n var traits = this.traits();\n return obj_case_1.default(traits, \"avatar\") || obj_case_1.default(traits, \"photoUrl\") || obj_case_1.default(traits, \"avatarUrl\");\n };\n i3.position = function() {\n var traits = this.traits();\n return obj_case_1.default(traits, \"position\") || obj_case_1.default(traits, \"jobTitle\");\n };\n i3.username = facade_1.Facade.proxy(\"traits.username\");\n i3.website = facade_1.Facade.one(\"traits.website\");\n i3.websites = facade_1.Facade.multi(\"traits.website\");\n i3.phone = facade_1.Facade.one(\"traits.phone\");\n i3.phones = facade_1.Facade.multi(\"traits.phone\");\n i3.address = facade_1.Facade.proxy(\"traits.address\");\n i3.gender = facade_1.Facade.proxy(\"traits.gender\");\n i3.birthday = facade_1.Facade.proxy(\"traits.birthday\");\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/track.js\n var require_track = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/track.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Track = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var facade_1 = require_facade();\n var identify_1 = require_identify();\n var is_email_1 = __importDefault2(require_is_email());\n var obj_case_1 = __importDefault2(require_obj_case());\n function Track3(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Track = Track3;\n inherits_1.default(Track3, facade_1.Facade);\n var t3 = Track3.prototype;\n t3.action = function() {\n return \"track\";\n };\n t3.type = t3.action;\n t3.event = facade_1.Facade.field(\"event\");\n t3.value = facade_1.Facade.proxy(\"properties.value\");\n t3.category = facade_1.Facade.proxy(\"properties.category\");\n t3.id = facade_1.Facade.proxy(\"properties.id\");\n t3.productId = function() {\n return this.proxy(\"properties.product_id\") || this.proxy(\"properties.productId\");\n };\n t3.promotionId = function() {\n return this.proxy(\"properties.promotion_id\") || this.proxy(\"properties.promotionId\");\n };\n t3.cartId = function() {\n return this.proxy(\"properties.cart_id\") || this.proxy(\"properties.cartId\");\n };\n t3.checkoutId = function() {\n return this.proxy(\"properties.checkout_id\") || this.proxy(\"properties.checkoutId\");\n };\n t3.paymentId = function() {\n return this.proxy(\"properties.payment_id\") || this.proxy(\"properties.paymentId\");\n };\n t3.couponId = function() {\n return this.proxy(\"properties.coupon_id\") || this.proxy(\"properties.couponId\");\n };\n t3.wishlistId = function() {\n return this.proxy(\"properties.wishlist_id\") || this.proxy(\"properties.wishlistId\");\n };\n t3.reviewId = function() {\n return this.proxy(\"properties.review_id\") || this.proxy(\"properties.reviewId\");\n };\n t3.orderId = function() {\n return this.proxy(\"properties.id\") || this.proxy(\"properties.order_id\") || this.proxy(\"properties.orderId\");\n };\n t3.sku = facade_1.Facade.proxy(\"properties.sku\");\n t3.tax = facade_1.Facade.proxy(\"properties.tax\");\n t3.name = facade_1.Facade.proxy(\"properties.name\");\n t3.price = facade_1.Facade.proxy(\"properties.price\");\n t3.total = facade_1.Facade.proxy(\"properties.total\");\n t3.repeat = facade_1.Facade.proxy(\"properties.repeat\");\n t3.coupon = facade_1.Facade.proxy(\"properties.coupon\");\n t3.shipping = facade_1.Facade.proxy(\"properties.shipping\");\n t3.discount = facade_1.Facade.proxy(\"properties.discount\");\n t3.shippingMethod = function() {\n return this.proxy(\"properties.shipping_method\") || this.proxy(\"properties.shippingMethod\");\n };\n t3.paymentMethod = function() {\n return this.proxy(\"properties.payment_method\") || this.proxy(\"properties.paymentMethod\");\n };\n t3.description = facade_1.Facade.proxy(\"properties.description\");\n t3.plan = facade_1.Facade.proxy(\"properties.plan\");\n t3.subtotal = function() {\n var subtotal = obj_case_1.default(this.properties(), \"subtotal\");\n var total = this.total() || this.revenue();\n if (subtotal)\n return subtotal;\n if (!total)\n return 0;\n if (this.total()) {\n var n2 = this.tax();\n if (n2)\n total -= n2;\n n2 = this.shipping();\n if (n2)\n total -= n2;\n n2 = this.discount();\n if (n2)\n total += n2;\n }\n return total;\n };\n t3.products = function() {\n var props = this.properties();\n var products = obj_case_1.default(props, \"products\");\n if (Array.isArray(products)) {\n return products.filter(function(item) {\n return item !== null;\n });\n }\n return [];\n };\n t3.quantity = function() {\n var props = this.obj.properties || {};\n return props.quantity || 1;\n };\n t3.currency = function() {\n var props = this.obj.properties || {};\n return props.currency || \"USD\";\n };\n t3.referrer = function() {\n return this.proxy(\"context.referrer.url\") || this.proxy(\"context.page.referrer\") || this.proxy(\"properties.referrer\");\n };\n t3.query = facade_1.Facade.proxy(\"options.query\");\n t3.properties = function(aliases) {\n var ret = this.field(\"properties\") || {};\n aliases = aliases || {};\n for (var alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n var value = this[alias] == null ? this.proxy(\"properties.\" + alias) : this[alias]();\n if (value == null)\n continue;\n ret[aliases[alias]] = value;\n delete ret[alias];\n }\n }\n return ret;\n };\n t3.username = function() {\n return this.proxy(\"traits.username\") || this.proxy(\"properties.username\") || this.userId() || this.sessionId();\n };\n t3.email = function() {\n var email = this.proxy(\"traits.email\") || this.proxy(\"properties.email\") || this.proxy(\"options.traits.email\");\n if (email)\n return email;\n var userId = this.userId();\n if (is_email_1.default(userId))\n return userId;\n };\n t3.revenue = function() {\n var revenue = this.proxy(\"properties.revenue\");\n var event = this.event();\n var orderCompletedRegExp = /^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;\n if (!revenue && event && event.match(orderCompletedRegExp)) {\n revenue = this.proxy(\"properties.total\");\n }\n return currency(revenue);\n };\n t3.cents = function() {\n var revenue = this.revenue();\n return typeof revenue !== \"number\" ? this.value() || 0 : revenue * 100;\n };\n t3.identify = function() {\n var json = this.json();\n json.traits = this.traits();\n return new identify_1.Identify(json, this.opts);\n };\n function currency(val) {\n if (!val)\n return;\n if (typeof val === \"number\") {\n return val;\n }\n if (typeof val !== \"string\") {\n return;\n }\n val = val.replace(/\\$/g, \"\");\n val = parseFloat(val);\n if (!isNaN(val)) {\n return val;\n }\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/page.js\n var require_page = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/page.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Page = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var facade_1 = require_facade();\n var track_1 = require_track();\n var is_email_1 = __importDefault2(require_is_email());\n function Page3(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Page = Page3;\n inherits_1.default(Page3, facade_1.Facade);\n var p4 = Page3.prototype;\n p4.action = function() {\n return \"page\";\n };\n p4.type = p4.action;\n p4.category = facade_1.Facade.field(\"category\");\n p4.name = facade_1.Facade.field(\"name\");\n p4.title = facade_1.Facade.proxy(\"properties.title\");\n p4.path = facade_1.Facade.proxy(\"properties.path\");\n p4.url = facade_1.Facade.proxy(\"properties.url\");\n p4.referrer = function() {\n return this.proxy(\"context.referrer.url\") || this.proxy(\"context.page.referrer\") || this.proxy(\"properties.referrer\");\n };\n p4.properties = function(aliases) {\n var props = this.field(\"properties\") || {};\n var category = this.category();\n var name = this.name();\n aliases = aliases || {};\n if (category)\n props.category = category;\n if (name)\n props.name = name;\n for (var alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n var value = this[alias] == null ? this.proxy(\"properties.\" + alias) : this[alias]();\n if (value == null)\n continue;\n props[aliases[alias]] = value;\n if (alias !== aliases[alias])\n delete props[alias];\n }\n }\n return props;\n };\n p4.email = function() {\n var email = this.proxy(\"context.traits.email\") || this.proxy(\"properties.email\");\n if (email)\n return email;\n var userId = this.userId();\n if (is_email_1.default(userId))\n return userId;\n };\n p4.fullName = function() {\n var category = this.category();\n var name = this.name();\n return name && category ? category + \" \" + name : name;\n };\n p4.event = function(name) {\n return name ? \"Viewed \" + name + \" Page\" : \"Loaded a Page\";\n };\n p4.track = function(name) {\n var json = this.json();\n json.event = this.event(name);\n json.timestamp = this.timestamp();\n json.properties = this.properties();\n return new track_1.Track(json, this.opts);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/screen.js\n var require_screen = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/screen.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Screen = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var page_1 = require_page();\n var track_1 = require_track();\n function Screen2(dictionary, opts) {\n page_1.Page.call(this, dictionary, opts);\n }\n exports3.Screen = Screen2;\n inherits_1.default(Screen2, page_1.Page);\n Screen2.prototype.action = function() {\n return \"screen\";\n };\n Screen2.prototype.type = Screen2.prototype.action;\n Screen2.prototype.event = function(name) {\n return name ? \"Viewed \" + name + \" Screen\" : \"Loaded a Screen\";\n };\n Screen2.prototype.track = function(name) {\n var json = this.json();\n json.event = this.event(name);\n json.timestamp = this.timestamp();\n json.properties = this.properties();\n return new track_1.Track(json, this.opts);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/delete.js\n var require_delete = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/delete.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Delete = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var facade_1 = require_facade();\n function Delete(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Delete = Delete;\n inherits_1.default(Delete, facade_1.Facade);\n Delete.prototype.type = function() {\n return \"delete\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/index.js\n var require_dist2 = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __assign2 = exports3 && exports3.__assign || function() {\n __assign2 = Object.assign || function(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 Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Delete = exports3.Screen = exports3.Page = exports3.Track = exports3.Identify = exports3.Group = exports3.Alias = exports3.Facade = void 0;\n var facade_1 = require_facade();\n Object.defineProperty(exports3, \"Facade\", { enumerable: true, get: function() {\n return facade_1.Facade;\n } });\n var alias_1 = require_alias();\n Object.defineProperty(exports3, \"Alias\", { enumerable: true, get: function() {\n return alias_1.Alias;\n } });\n var group_1 = require_group();\n Object.defineProperty(exports3, \"Group\", { enumerable: true, get: function() {\n return group_1.Group;\n } });\n var identify_1 = require_identify();\n Object.defineProperty(exports3, \"Identify\", { enumerable: true, get: function() {\n return identify_1.Identify;\n } });\n var track_1 = require_track();\n Object.defineProperty(exports3, \"Track\", { enumerable: true, get: function() {\n return track_1.Track;\n } });\n var page_1 = require_page();\n Object.defineProperty(exports3, \"Page\", { enumerable: true, get: function() {\n return page_1.Page;\n } });\n var screen_1 = require_screen();\n Object.defineProperty(exports3, \"Screen\", { enumerable: true, get: function() {\n return screen_1.Screen;\n } });\n var delete_1 = require_delete();\n Object.defineProperty(exports3, \"Delete\", { enumerable: true, get: function() {\n return delete_1.Delete;\n } });\n exports3.default = __assign2(__assign2({}, facade_1.Facade), {\n Alias: alias_1.Alias,\n Group: group_1.Group,\n Identify: identify_1.Identify,\n Track: track_1.Track,\n Page: page_1.Page,\n Screen: screen_1.Screen,\n Delete: delete_1.Delete\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/to-facade.js\n function toFacade(evt, options) {\n var fcd = new import_facade.Facade(evt, options);\n if (evt.type === \"track\") {\n fcd = new import_facade.Track(evt, options);\n }\n if (evt.type === \"identify\") {\n fcd = new import_facade.Identify(evt, options);\n }\n if (evt.type === \"page\") {\n fcd = new import_facade.Page(evt, options);\n }\n if (evt.type === \"alias\") {\n fcd = new import_facade.Alias(evt, options);\n }\n if (evt.type === \"group\") {\n fcd = new import_facade.Group(evt, options);\n }\n if (evt.type === \"screen\") {\n fcd = new import_facade.Screen(evt, options);\n }\n Object.defineProperty(fcd, \"obj\", {\n value: evt,\n writable: true\n });\n return fcd;\n }\n var import_facade;\n var init_to_facade = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/to-facade.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n import_facade = __toESM(require_dist2());\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js\n var middleware_exports = {};\n __export(middleware_exports, {\n applyDestinationMiddleware: () => applyDestinationMiddleware,\n sourceMiddlewarePlugin: () => sourceMiddlewarePlugin\n });\n function applyDestinationMiddleware(destination, evt, middleware) {\n return __awaiter(this, void 0, void 0, function() {\n function applyMiddleware(event, fn) {\n return __awaiter(this, void 0, void 0, function() {\n var nextCalled, returnedEvent;\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n nextCalled = false;\n returnedEvent = null;\n return [4, fn({\n payload: toFacade(event, {\n clone: true,\n traverse: false\n }),\n integration: destination,\n next: function(evt2) {\n nextCalled = true;\n if (evt2 === null) {\n returnedEvent = null;\n }\n if (evt2) {\n returnedEvent = evt2.obj;\n }\n }\n })];\n case 1:\n _b2.sent();\n if (!nextCalled && returnedEvent !== null) {\n returnedEvent = returnedEvent;\n returnedEvent.integrations = __assign(__assign({}, event.integrations), (_a2 = {}, _a2[destination] = false, _a2));\n }\n return [2, returnedEvent];\n }\n });\n });\n }\n var modifiedEvent, _i, middleware_1, md, result;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n modifiedEvent = toFacade(evt, {\n clone: true,\n traverse: false\n }).rawEvent();\n _i = 0, middleware_1 = middleware;\n _a2.label = 1;\n case 1:\n if (!(_i < middleware_1.length))\n return [3, 4];\n md = middleware_1[_i];\n return [4, applyMiddleware(modifiedEvent, md)];\n case 2:\n result = _a2.sent();\n if (result === null) {\n return [2, null];\n }\n modifiedEvent = result;\n _a2.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n return [2, modifiedEvent];\n }\n });\n });\n }\n function sourceMiddlewarePlugin(fn, integrations) {\n function apply(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var nextCalled;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n nextCalled = false;\n return [4, fn({\n payload: toFacade(ctx.event, {\n clone: true,\n traverse: false\n }),\n integrations: integrations !== null && integrations !== void 0 ? integrations : {},\n next: function(evt) {\n nextCalled = true;\n if (evt) {\n ctx.event = evt.obj;\n }\n }\n })];\n case 1:\n _a2.sent();\n if (!nextCalled) {\n throw new ContextCancelation({\n retry: false,\n type: \"middleware_cancellation\",\n reason: \"Middleware `next` function skipped\"\n });\n }\n return [2, ctx];\n }\n });\n });\n }\n return {\n name: \"Source Middleware \".concat(fn.name),\n type: \"before\",\n version: \"0.1.0\",\n isLoaded: function() {\n return true;\n },\n load: function(ctx) {\n return Promise.resolve(ctx);\n },\n track: apply,\n page: apply,\n identify: apply,\n alias: apply,\n group: apply\n };\n }\n var init_middleware = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_context2();\n init_to_facade();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/pickPrefix.js\n function pickPrefix(prefix, object) {\n return Object.keys(object).reduce(function(acc, key) {\n if (key.startsWith(prefix)) {\n var field = key.substr(prefix.length);\n acc[field] = object[key];\n }\n return acc;\n }, {});\n }\n var init_pickPrefix = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/pickPrefix.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/gracefulDecodeURIComponent.js\n function gracefulDecodeURIComponent(encodedURIComponent) {\n try {\n return decodeURIComponent(encodedURIComponent.replace(/\\+/g, \" \"));\n } catch (_a2) {\n return encodedURIComponent;\n }\n }\n var init_gracefulDecodeURIComponent = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/gracefulDecodeURIComponent.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/index.js\n var query_string_exports = {};\n __export(query_string_exports, {\n queryString: () => queryString\n });\n function queryString(analytics, query) {\n var a3 = document.createElement(\"a\");\n a3.href = query;\n var parsed = a3.search.slice(1);\n var params = parsed.split(\"&\").reduce(function(acc, str) {\n var _a3 = str.split(\"=\"), k4 = _a3[0], v2 = _a3[1];\n acc[k4] = gracefulDecodeURIComponent(v2);\n return acc;\n }, {});\n var calls = [];\n var ajs_uid = params.ajs_uid, ajs_event = params.ajs_event, ajs_aid = params.ajs_aid;\n var _a2 = isPlainObject2(analytics.options.useQueryString) ? analytics.options.useQueryString : {}, _b2 = _a2.aid, aidPattern = _b2 === void 0 ? /.+/ : _b2, _c = _a2.uid, uidPattern = _c === void 0 ? /.+/ : _c;\n if (ajs_aid) {\n var anonId = Array.isArray(params.ajs_aid) ? params.ajs_aid[0] : params.ajs_aid;\n if (aidPattern.test(anonId)) {\n analytics.setAnonymousId(anonId);\n }\n }\n if (ajs_uid) {\n var uid2 = Array.isArray(params.ajs_uid) ? params.ajs_uid[0] : params.ajs_uid;\n if (uidPattern.test(uid2)) {\n var traits = pickPrefix(\"ajs_trait_\", params);\n calls.push(analytics.identify(uid2, traits));\n }\n }\n if (ajs_event) {\n var event_1 = Array.isArray(params.ajs_event) ? params.ajs_event[0] : params.ajs_event;\n var props = pickPrefix(\"ajs_prop_\", params);\n calls.push(analytics.track(event_1, props));\n }\n return Promise.all(calls);\n }\n var init_query_string = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_pickPrefix();\n init_gracefulDecodeURIComponent();\n init_esm9();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/analytics/index.js\n function createDefaultQueue(name, retryQueue, disablePersistance) {\n if (retryQueue === void 0) {\n retryQueue = false;\n }\n if (disablePersistance === void 0) {\n disablePersistance = false;\n }\n var maxAttempts = retryQueue ? 10 : 1;\n var priorityQueue = disablePersistance ? new PriorityQueue(maxAttempts, []) : new PersistedPriorityQueue(maxAttempts, name);\n return new EventQueue(priorityQueue);\n }\n function _stub() {\n console.warn(deprecationWarning);\n }\n var deprecationWarning, global2, _analytics, AnalyticsInstanceSettings, Analytics, NullAnalytics;\n var init_analytics2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/analytics/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_arguments_resolver();\n init_connection();\n init_context2();\n init_esm9();\n init_esm8();\n init_events2();\n init_plugin();\n init_event_queue2();\n init_user();\n init_bind_all2();\n init_persisted();\n init_version7();\n init_priority_queue2();\n init_get_global();\n init_storage();\n init_global_analytics_helper();\n init_buffer3();\n deprecationWarning = \"This is being deprecated and will be not be available in future releases of Analytics JS\";\n global2 = getGlobal();\n _analytics = global2 === null || global2 === void 0 ? void 0 : global2.analytics;\n AnalyticsInstanceSettings = /** @class */\n /* @__PURE__ */ function() {\n function AnalyticsInstanceSettings2(settings) {\n var _a2;\n this.timeout = 300;\n this.writeKey = settings.writeKey;\n this.cdnSettings = (_a2 = settings.cdnSettings) !== null && _a2 !== void 0 ? _a2 : {\n integrations: {},\n edgeFunction: {}\n };\n this.cdnURL = settings.cdnURL;\n }\n return AnalyticsInstanceSettings2;\n }();\n Analytics = /** @class */\n function(_super) {\n __extends(Analytics2, _super);\n function Analytics2(settings, options, queue2, user, group) {\n var _this = this;\n var _a2, _b2;\n _this = _super.call(this) || this;\n _this._debug = false;\n _this.initialized = false;\n _this.user = function() {\n return _this._user;\n };\n _this.init = _this.initialize.bind(_this);\n _this.log = _stub;\n _this.addIntegrationMiddleware = _stub;\n _this.listeners = _stub;\n _this.addEventListener = _stub;\n _this.removeAllListeners = _stub;\n _this.removeListener = _stub;\n _this.removeEventListener = _stub;\n _this.hasListeners = _stub;\n _this.add = _stub;\n _this.addIntegration = _stub;\n var cookieOptions2 = options === null || options === void 0 ? void 0 : options.cookie;\n var disablePersistance = (_a2 = options === null || options === void 0 ? void 0 : options.disableClientPersistence) !== null && _a2 !== void 0 ? _a2 : false;\n _this.settings = new AnalyticsInstanceSettings(settings);\n _this.queue = queue2 !== null && queue2 !== void 0 ? queue2 : createDefaultQueue(\"\".concat(settings.writeKey, \":event-queue\"), options === null || options === void 0 ? void 0 : options.retryQueue, disablePersistance);\n var storageSetting = options === null || options === void 0 ? void 0 : options.storage;\n _this._universalStorage = _this.createStore(disablePersistance, storageSetting, cookieOptions2);\n _this._user = user !== null && user !== void 0 ? user : new User(__assign({ persist: !disablePersistance, storage: options === null || options === void 0 ? void 0 : options.storage }, options === null || options === void 0 ? void 0 : options.user), cookieOptions2).load();\n _this._group = group !== null && group !== void 0 ? group : new Group(__assign({ persist: !disablePersistance, storage: options === null || options === void 0 ? void 0 : options.storage }, options === null || options === void 0 ? void 0 : options.group), cookieOptions2).load();\n _this.eventFactory = new EventFactory(_this._user);\n _this.integrations = (_b2 = options === null || options === void 0 ? void 0 : options.integrations) !== null && _b2 !== void 0 ? _b2 : {};\n _this.options = options !== null && options !== void 0 ? options : {};\n bindAll(_this);\n return _this;\n }\n Analytics2.prototype.createStore = function(disablePersistance, storageSetting, cookieOptions2) {\n if (disablePersistance) {\n return new UniversalStorage([new MemoryStorage()]);\n } else {\n if (storageSetting) {\n if (isArrayOfStoreType(storageSetting)) {\n return new UniversalStorage(initializeStorages(applyCookieOptions(storageSetting.stores, cookieOptions2)));\n }\n }\n }\n return new UniversalStorage(initializeStorages([\n StoreType.LocalStorage,\n {\n name: StoreType.Cookie,\n settings: cookieOptions2\n },\n StoreType.Memory\n ]));\n };\n Object.defineProperty(Analytics2.prototype, \"storage\", {\n get: function() {\n return this._universalStorage;\n },\n enumerable: false,\n configurable: true\n });\n Analytics2.prototype.track = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pageCtx, _a2, name, data, opts, cb, segmentEvent;\n var _this = this;\n return __generator(this, function(_b2) {\n pageCtx = popPageContext(args);\n _a2 = resolveArguments.apply(void 0, args), name = _a2[0], data = _a2[1], opts = _a2[2], cb = _a2[3];\n segmentEvent = this.eventFactory.track(name, data, opts, this.integrations, pageCtx);\n return [2, this._dispatch(segmentEvent, cb).then(function(ctx) {\n _this.emit(\"track\", name, ctx.event.properties, ctx.event.options);\n return ctx;\n })];\n });\n });\n };\n Analytics2.prototype.page = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pageCtx, _a2, category, page, properties, options, callback, segmentEvent;\n var _this = this;\n return __generator(this, function(_b2) {\n pageCtx = popPageContext(args);\n _a2 = resolvePageArguments.apply(void 0, args), category = _a2[0], page = _a2[1], properties = _a2[2], options = _a2[3], callback = _a2[4];\n segmentEvent = this.eventFactory.page(category, page, properties, options, this.integrations, pageCtx);\n return [2, this._dispatch(segmentEvent, callback).then(function(ctx) {\n _this.emit(\"page\", category, page, ctx.event.properties, ctx.event.options);\n return ctx;\n })];\n });\n });\n };\n Analytics2.prototype.identify = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pageCtx, _a2, id, _traits, options, callback, segmentEvent;\n var _this = this;\n return __generator(this, function(_b2) {\n pageCtx = popPageContext(args);\n _a2 = resolveUserArguments(this._user).apply(void 0, args), id = _a2[0], _traits = _a2[1], options = _a2[2], callback = _a2[3];\n this._user.identify(id, _traits);\n segmentEvent = this.eventFactory.identify(this._user.id(), this._user.traits(), options, this.integrations, pageCtx);\n return [2, this._dispatch(segmentEvent, callback).then(function(ctx) {\n _this.emit(\"identify\", ctx.event.userId, ctx.event.traits, ctx.event.options);\n return ctx;\n })];\n });\n });\n };\n Analytics2.prototype.group = function() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var pageCtx = popPageContext(args);\n if (args.length === 0) {\n return this._group;\n }\n var _a2 = resolveUserArguments(this._group).apply(void 0, args), id = _a2[0], _traits = _a2[1], options = _a2[2], callback = _a2[3];\n this._group.identify(id, _traits);\n var groupId = this._group.id();\n var groupTraits = this._group.traits();\n var segmentEvent = this.eventFactory.group(groupId, groupTraits, options, this.integrations, pageCtx);\n return this._dispatch(segmentEvent, callback).then(function(ctx) {\n _this.emit(\"group\", ctx.event.groupId, ctx.event.traits, ctx.event.options);\n return ctx;\n });\n };\n Analytics2.prototype.alias = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pageCtx, _a2, to, from5, options, callback, segmentEvent;\n var _this = this;\n return __generator(this, function(_b2) {\n pageCtx = popPageContext(args);\n _a2 = resolveAliasArguments.apply(void 0, args), to = _a2[0], from5 = _a2[1], options = _a2[2], callback = _a2[3];\n segmentEvent = this.eventFactory.alias(to, from5, options, this.integrations, pageCtx);\n return [2, this._dispatch(segmentEvent, callback).then(function(ctx) {\n _this.emit(\"alias\", to, from5, ctx.event.options);\n return ctx;\n })];\n });\n });\n };\n Analytics2.prototype.screen = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pageCtx, _a2, category, page, properties, options, callback, segmentEvent;\n var _this = this;\n return __generator(this, function(_b2) {\n pageCtx = popPageContext(args);\n _a2 = resolvePageArguments.apply(void 0, args), category = _a2[0], page = _a2[1], properties = _a2[2], options = _a2[3], callback = _a2[4];\n segmentEvent = this.eventFactory.screen(category, page, properties, options, this.integrations, pageCtx);\n return [2, this._dispatch(segmentEvent, callback).then(function(ctx) {\n _this.emit(\"screen\", category, page, ctx.event.properties, ctx.event.options);\n return ctx;\n })];\n });\n });\n };\n Analytics2.prototype.trackClick = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var autotrack;\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, Promise.resolve().then(() => (init_auto_track(), auto_track_exports))];\n case 1:\n autotrack = _b2.sent();\n return [2, (_a2 = autotrack.link).call.apply(_a2, __spreadArray([this], args, false))];\n }\n });\n });\n };\n Analytics2.prototype.trackLink = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var autotrack;\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, Promise.resolve().then(() => (init_auto_track(), auto_track_exports))];\n case 1:\n autotrack = _b2.sent();\n return [2, (_a2 = autotrack.link).call.apply(_a2, __spreadArray([this], args, false))];\n }\n });\n });\n };\n Analytics2.prototype.trackSubmit = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var autotrack;\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, Promise.resolve().then(() => (init_auto_track(), auto_track_exports))];\n case 1:\n autotrack = _b2.sent();\n return [2, (_a2 = autotrack.form).call.apply(_a2, __spreadArray([this], args, false))];\n }\n });\n });\n };\n Analytics2.prototype.trackForm = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var autotrack;\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, Promise.resolve().then(() => (init_auto_track(), auto_track_exports))];\n case 1:\n autotrack = _b2.sent();\n return [2, (_a2 = autotrack.form).call.apply(_a2, __spreadArray([this], args, false))];\n }\n });\n });\n };\n Analytics2.prototype.register = function() {\n var plugins = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n plugins[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var ctx, registrations;\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n ctx = Context.system();\n registrations = plugins.map(function(xt) {\n return _this.queue.register(ctx, xt, _this);\n });\n return [4, Promise.all(registrations)];\n case 1:\n _a2.sent();\n return [2, ctx];\n }\n });\n });\n };\n Analytics2.prototype.deregister = function() {\n var plugins = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n plugins[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var ctx, deregistrations;\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n ctx = Context.system();\n deregistrations = plugins.map(function(pl) {\n var plugin = _this.queue.plugins.find(function(p4) {\n return p4.name === pl;\n });\n if (plugin) {\n return _this.queue.deregister(ctx, plugin, _this);\n } else {\n ctx.log(\"warn\", \"plugin \".concat(pl, \" not found\"));\n }\n });\n return [4, Promise.all(deregistrations)];\n case 1:\n _a2.sent();\n return [2, ctx];\n }\n });\n });\n };\n Analytics2.prototype.debug = function(toggle) {\n if (toggle === false && localStorage.getItem(\"debug\")) {\n localStorage.removeItem(\"debug\");\n }\n this._debug = toggle;\n return this;\n };\n Analytics2.prototype.reset = function() {\n this._user.reset();\n this._group.reset();\n this.emit(\"reset\");\n };\n Analytics2.prototype.timeout = function(timeout) {\n this.settings.timeout = timeout;\n };\n Analytics2.prototype._dispatch = function(event, callback) {\n return __awaiter(this, void 0, void 0, function() {\n var ctx;\n return __generator(this, function(_a2) {\n ctx = new Context(event);\n if (isOffline() && !this.options.retryQueue) {\n return [2, ctx];\n }\n return [2, dispatch(ctx, this.queue, this, {\n callback,\n debug: this._debug,\n timeout: this.settings.timeout\n })];\n });\n });\n };\n Analytics2.prototype.addSourceMiddleware = function(fn) {\n return __awaiter(this, void 0, void 0, function() {\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.queue.criticalTasks.run(function() {\n return __awaiter(_this, void 0, void 0, function() {\n var sourceMiddlewarePlugin2, integrations, plugin;\n return __generator(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n return [4, Promise.resolve().then(() => (init_middleware(), middleware_exports))];\n case 1:\n sourceMiddlewarePlugin2 = _a3.sent().sourceMiddlewarePlugin;\n integrations = {};\n this.queue.plugins.forEach(function(plugin2) {\n if (plugin2.type === \"destination\") {\n return integrations[plugin2.name] = true;\n }\n });\n plugin = sourceMiddlewarePlugin2(fn, integrations);\n return [4, this.register(plugin)];\n case 2:\n _a3.sent();\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n })];\n case 1:\n _a2.sent();\n return [2, this];\n }\n });\n });\n };\n Analytics2.prototype.addDestinationMiddleware = function(integrationName) {\n var middlewares = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n middlewares[_i - 1] = arguments[_i];\n }\n this.queue.plugins.filter(isDestinationPluginWithAddMiddleware).forEach(function(p4) {\n if (integrationName === \"*\" || p4.name.toLowerCase() === integrationName.toLowerCase()) {\n p4.addMiddleware.apply(p4, middlewares);\n }\n });\n return Promise.resolve(this);\n };\n Analytics2.prototype.setAnonymousId = function(id) {\n return this._user.anonymousId(id);\n };\n Analytics2.prototype.queryString = function(query) {\n return __awaiter(this, void 0, void 0, function() {\n var queryString2;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (this.options.useQueryString === false) {\n return [2, []];\n }\n return [4, Promise.resolve().then(() => (init_query_string(), query_string_exports))];\n case 1:\n queryString2 = _a2.sent().queryString;\n return [2, queryString2(this, query)];\n }\n });\n });\n };\n Analytics2.prototype.use = function(legacyPluginFactory) {\n legacyPluginFactory(this);\n return this;\n };\n Analytics2.prototype.ready = function(callback) {\n if (callback === void 0) {\n callback = function(res) {\n return res;\n };\n }\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n return [2, Promise.all(this.queue.plugins.map(function(i3) {\n return i3.ready ? i3.ready() : Promise.resolve();\n })).then(function(res) {\n callback(res);\n return res;\n })];\n });\n });\n };\n Analytics2.prototype.noConflict = function() {\n console.warn(deprecationWarning);\n setGlobalAnalytics(_analytics !== null && _analytics !== void 0 ? _analytics : this);\n return this;\n };\n Analytics2.prototype.normalize = function(msg) {\n console.warn(deprecationWarning);\n return this.eventFactory[\"normalize\"](msg);\n };\n Object.defineProperty(Analytics2.prototype, \"failedInitializations\", {\n get: function() {\n console.warn(deprecationWarning);\n return this.queue.failedInitializations;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Analytics2.prototype, \"VERSION\", {\n get: function() {\n return version7;\n },\n enumerable: false,\n configurable: true\n });\n Analytics2.prototype.initialize = function(_settings, _options) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n console.warn(deprecationWarning);\n return [2, Promise.resolve(this)];\n });\n });\n };\n Analytics2.prototype.pageview = function(url) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n console.warn(deprecationWarning);\n return [4, this.page({ path: url })];\n case 1:\n _a2.sent();\n return [2, this];\n }\n });\n });\n };\n Object.defineProperty(Analytics2.prototype, \"plugins\", {\n get: function() {\n var _a2;\n console.warn(deprecationWarning);\n return (_a2 = this._plugins) !== null && _a2 !== void 0 ? _a2 : {};\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Analytics2.prototype, \"Integrations\", {\n get: function() {\n console.warn(deprecationWarning);\n var integrations = this.queue.plugins.filter(function(plugin) {\n return plugin.type === \"destination\";\n }).reduce(function(acc, plugin) {\n var name = \"\".concat(plugin.name.toLowerCase().replace(\".\", \"\").split(\" \").join(\"-\"), \"Integration\");\n var integration = window[name];\n if (!integration) {\n return acc;\n }\n var nested = integration.Integration;\n if (nested) {\n acc[plugin.name] = nested;\n return acc;\n }\n acc[plugin.name] = integration;\n return acc;\n }, {});\n return integrations;\n },\n enumerable: false,\n configurable: true\n });\n Analytics2.prototype.push = function(args) {\n var an = this;\n var method = args.shift();\n if (method) {\n if (!an[method])\n return;\n }\n an[method].apply(this, args);\n };\n return Analytics2;\n }(Emitter);\n NullAnalytics = /** @class */\n function(_super) {\n __extends(NullAnalytics2, _super);\n function NullAnalytics2() {\n var _this = _super.call(this, { writeKey: \"\" }, { disableClientPersistence: true }) || this;\n _this.initialized = true;\n return _this;\n }\n return NullAnalytics2;\n }(Analytics);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/get-process-env.js\n function getProcessEnv() {\n if (typeof process_exports === \"undefined\" || !process_exports.env) {\n return {};\n }\n return process_exports.env;\n }\n var init_get_process_env = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/get-process-env.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/parse-cdn.js\n var analyticsScriptRegex, getCDNUrlFromScriptTag, _globalCDN, getGlobalCDNUrl, setGlobalCDNUrl, getCDN, getNextIntegrationsURL;\n var init_parse_cdn = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/parse-cdn.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_global_analytics_helper();\n analyticsScriptRegex = /(https:\\/\\/.*)\\/analytics\\.js\\/v1\\/(?:.*?)\\/(?:platform|analytics.*)?/;\n getCDNUrlFromScriptTag = function() {\n var cdn;\n var scripts = Array.prototype.slice.call(document.querySelectorAll(\"script\"));\n scripts.forEach(function(s4) {\n var _a2;\n var src = (_a2 = s4.getAttribute(\"src\")) !== null && _a2 !== void 0 ? _a2 : \"\";\n var result = analyticsScriptRegex.exec(src);\n if (result && result[1]) {\n cdn = result[1];\n }\n });\n return cdn;\n };\n getGlobalCDNUrl = function() {\n var _a2;\n var result = _globalCDN !== null && _globalCDN !== void 0 ? _globalCDN : (_a2 = getGlobalAnalytics()) === null || _a2 === void 0 ? void 0 : _a2._cdn;\n return result;\n };\n setGlobalCDNUrl = function(cdn) {\n var globalAnalytics = getGlobalAnalytics();\n if (globalAnalytics) {\n globalAnalytics._cdn = cdn;\n }\n _globalCDN = cdn;\n };\n getCDN = function() {\n var globalCdnUrl = getGlobalCDNUrl();\n if (globalCdnUrl)\n return globalCdnUrl;\n var cdnFromScriptTag = getCDNUrlFromScriptTag();\n if (cdnFromScriptTag) {\n return cdnFromScriptTag;\n } else {\n return \"https://cdn.segment.com\";\n }\n };\n getNextIntegrationsURL = function() {\n var cdn = getCDN();\n return \"\".concat(cdn, \"/next-integrations\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/merged-options.js\n function mergedOptions(cdnSettings, options) {\n var _a2;\n var optionOverrides = Object.entries((_a2 = options.integrations) !== null && _a2 !== void 0 ? _a2 : {}).reduce(function(overrides, _a3) {\n var _b2, _c;\n var integration = _a3[0], options2 = _a3[1];\n if (typeof options2 === \"object\") {\n return __assign(__assign({}, overrides), (_b2 = {}, _b2[integration] = options2, _b2));\n }\n return __assign(__assign({}, overrides), (_c = {}, _c[integration] = {}, _c));\n }, {});\n return Object.entries(cdnSettings.integrations).reduce(function(integrationSettings, _a3) {\n var _b2;\n var integration = _a3[0], settings = _a3[1];\n return __assign(__assign({}, integrationSettings), (_b2 = {}, _b2[integration] = __assign(__assign({}, settings), optionOverrides[integration]), _b2));\n }, {});\n }\n var init_merged_options = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/merged-options.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/client-hints/index.js\n function clientHints(hints) {\n return __awaiter(this, void 0, void 0, function() {\n var userAgentData;\n return __generator(this, function(_a2) {\n userAgentData = navigator.userAgentData;\n if (!userAgentData)\n return [2, void 0];\n if (!hints)\n return [2, userAgentData.toJSON()];\n return [2, userAgentData.getHighEntropyValues(hints).catch(function() {\n return userAgentData.toJSON();\n })];\n });\n });\n }\n var init_client_hints = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/client-hints/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/env-enrichment/index.js\n function getCookieOptions() {\n if (cookieOptions) {\n return cookieOptions;\n }\n var domain2 = tld(window.location.href);\n cookieOptions = {\n expires: 31536e6,\n secure: false,\n path: \"/\"\n };\n if (domain2) {\n cookieOptions.domain = domain2;\n }\n return cookieOptions;\n }\n function ads(query) {\n var queryIds = {\n btid: \"dataxu\",\n urid: \"millennial-media\"\n };\n if (query.startsWith(\"?\")) {\n query = query.substring(1);\n }\n query = query.replace(/\\?/g, \"&\");\n var parts = query.split(\"&\");\n for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {\n var part = parts_1[_i];\n var _a2 = part.split(\"=\"), k4 = _a2[0], v2 = _a2[1];\n if (queryIds[k4]) {\n return {\n id: v2,\n type: queryIds[k4]\n };\n }\n }\n }\n function utm(query) {\n if (query.startsWith(\"?\")) {\n query = query.substring(1);\n }\n query = query.replace(/\\?/g, \"&\");\n return query.split(\"&\").reduce(function(acc, str) {\n var _a2 = str.split(\"=\"), k4 = _a2[0], _b2 = _a2[1], v2 = _b2 === void 0 ? \"\" : _b2;\n if (k4.includes(\"utm_\") && k4.length > 4) {\n var utmParam = k4.slice(4);\n if (utmParam === \"campaign\") {\n utmParam = \"name\";\n }\n acc[utmParam] = gracefulDecodeURIComponent(v2);\n }\n return acc;\n }, {});\n }\n function ampId() {\n var ampId2 = js_cookie_default.get(\"_ga\");\n if (ampId2 && ampId2.startsWith(\"amp\")) {\n return ampId2;\n }\n }\n function referrerId(query, ctx, disablePersistance) {\n var _a2;\n var storage = new UniversalStorage(disablePersistance ? [] : [new CookieStorage(getCookieOptions())]);\n var stored = storage.get(\"s:context.referrer\");\n var ad = (_a2 = ads(query)) !== null && _a2 !== void 0 ? _a2 : stored;\n if (!ad) {\n return;\n }\n if (ctx) {\n ctx.referrer = __assign(__assign({}, ctx.referrer), ad);\n }\n storage.set(\"s:context.referrer\", ad);\n }\n var cookieOptions, objectToQueryString, EnvironmentEnrichmentPlugin, envEnrichment;\n var init_env_enrichment = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/env-enrichment/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_js_cookie();\n init_version7();\n init_version_type();\n init_tld();\n init_gracefulDecodeURIComponent();\n init_storage();\n init_client_hints();\n objectToQueryString = function(obj) {\n try {\n var searchParams_1 = new URLSearchParams();\n Object.entries(obj).forEach(function(_a2) {\n var k4 = _a2[0], v2 = _a2[1];\n if (Array.isArray(v2)) {\n v2.forEach(function(value) {\n return searchParams_1.append(k4, value);\n });\n } else {\n searchParams_1.append(k4, v2);\n }\n });\n return searchParams_1.toString();\n } catch (_a2) {\n return \"\";\n }\n };\n EnvironmentEnrichmentPlugin = /** @class */\n /* @__PURE__ */ function() {\n function EnvironmentEnrichmentPlugin2() {\n var _this = this;\n this.name = \"Page Enrichment\";\n this.type = \"before\";\n this.version = \"0.1.0\";\n this.isLoaded = function() {\n return true;\n };\n this.load = function(_ctx, instance) {\n return __awaiter(_this, void 0, void 0, function() {\n var _a2, _1;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n this.instance = instance;\n _b2.label = 1;\n case 1:\n _b2.trys.push([1, 3, , 4]);\n _a2 = this;\n return [4, clientHints(this.instance.options.highEntropyValuesClientHints)];\n case 2:\n _a2.userAgentData = _b2.sent();\n return [3, 4];\n case 3:\n _1 = _b2.sent();\n return [3, 4];\n case 4:\n return [2, Promise.resolve()];\n }\n });\n });\n };\n this.enrich = function(ctx) {\n var _a2, _b2;\n var evtCtx = ctx.event.context;\n var search = evtCtx.page.search || \"\";\n var query = typeof search === \"object\" ? objectToQueryString(search) : search;\n evtCtx.userAgent = navigator.userAgent;\n evtCtx.userAgentData = _this.userAgentData;\n var locale = navigator.userLanguage || navigator.language;\n if (typeof evtCtx.locale === \"undefined\" && typeof locale !== \"undefined\") {\n evtCtx.locale = locale;\n }\n (_a2 = evtCtx.library) !== null && _a2 !== void 0 ? _a2 : evtCtx.library = {\n name: \"analytics.js\",\n version: \"\".concat(getVersionType() === \"web\" ? \"next\" : \"npm:next\", \"-\").concat(version7)\n };\n if (query && !evtCtx.campaign) {\n evtCtx.campaign = utm(query);\n }\n var amp = ampId();\n if (amp) {\n evtCtx.amp = { id: amp };\n }\n referrerId(query, evtCtx, (_b2 = _this.instance.options.disableClientPersistence) !== null && _b2 !== void 0 ? _b2 : false);\n try {\n evtCtx.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n } catch (_2) {\n }\n return ctx;\n };\n this.track = this.enrich;\n this.identify = this.enrich;\n this.page = this.enrich;\n this.group = this.enrich;\n this.alias = this.enrich;\n this.screen = this.enrich;\n }\n return EnvironmentEnrichmentPlugin2;\n }();\n envEnrichment = new EnvironmentEnrichmentPlugin();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/load-script.js\n function findScript(src) {\n var scripts = Array.prototype.slice.call(window.document.querySelectorAll(\"script\"));\n return scripts.find(function(s4) {\n return s4.src === src;\n });\n }\n function loadScript(src, attributes) {\n var found = findScript(src);\n if (found !== void 0) {\n var status_1 = found === null || found === void 0 ? void 0 : found.getAttribute(\"status\");\n if (status_1 === \"loaded\") {\n return Promise.resolve(found);\n }\n if (status_1 === \"loading\") {\n return new Promise(function(resolve, reject) {\n found.addEventListener(\"load\", function() {\n return resolve(found);\n });\n found.addEventListener(\"error\", function(err) {\n return reject(err);\n });\n });\n }\n }\n return new Promise(function(resolve, reject) {\n var _a2;\n var script = window.document.createElement(\"script\");\n script.type = \"text/javascript\";\n script.src = src;\n script.async = true;\n script.setAttribute(\"status\", \"loading\");\n for (var _i = 0, _b2 = Object.entries(attributes !== null && attributes !== void 0 ? attributes : {}); _i < _b2.length; _i++) {\n var _c = _b2[_i], k4 = _c[0], v2 = _c[1];\n script.setAttribute(k4, v2);\n }\n script.onload = function() {\n script.onerror = script.onload = null;\n script.setAttribute(\"status\", \"loaded\");\n resolve(script);\n };\n script.onerror = function() {\n script.onerror = script.onload = null;\n script.setAttribute(\"status\", \"error\");\n reject(new Error(\"Failed to load \".concat(src)));\n };\n var firstExistingScript = window.document.querySelector(\"script\");\n if (!firstExistingScript) {\n window.document.head.appendChild(script);\n } else {\n (_a2 = firstExistingScript.parentElement) === null || _a2 === void 0 ? void 0 : _a2.insertBefore(script, firstExistingScript);\n }\n });\n }\n function unloadScript(src) {\n var found = findScript(src);\n if (found !== void 0) {\n found.remove();\n }\n return Promise.resolve();\n }\n var init_load_script = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/load-script.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/metric-helpers.js\n function recordIntegrationMetric(ctx, _a2) {\n var methodName = _a2.methodName, integrationName = _a2.integrationName, type = _a2.type, _b2 = _a2.didError, didError = _b2 === void 0 ? false : _b2;\n ctx.stats.increment(\"analytics_js.integration.invoke\".concat(didError ? \".error\" : \"\"), 1, [\n \"method:\".concat(methodName),\n \"integration_name:\".concat(integrationName),\n \"type:\".concat(type)\n ]);\n }\n var init_metric_helpers = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/metric-helpers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/remote-loader/index.js\n function validate3(pluginLike) {\n if (!Array.isArray(pluginLike)) {\n throw new Error(\"Not a valid list of plugins\");\n }\n var required = [\"load\", \"isLoaded\", \"name\", \"version\", \"type\"];\n pluginLike.forEach(function(plugin) {\n required.forEach(function(method) {\n var _a2;\n if (plugin[method] === void 0) {\n throw new Error(\"Plugin: \".concat((_a2 = plugin.name) !== null && _a2 !== void 0 ? _a2 : \"unknown\", \" missing required function \").concat(method));\n }\n });\n });\n return true;\n }\n function isPluginDisabled(userIntegrations, remotePlugin) {\n var creationNameEnabled = userIntegrations[remotePlugin.creationName];\n var currentNameEnabled = userIntegrations[remotePlugin.name];\n if (userIntegrations.All === false && !creationNameEnabled && !currentNameEnabled) {\n return true;\n }\n if (creationNameEnabled === false || currentNameEnabled === false) {\n return true;\n }\n return false;\n }\n function loadPluginFactory(remotePlugin, obfuscate) {\n return __awaiter(this, void 0, void 0, function() {\n var defaultCdn, cdn, urlSplit, name_1, obfuscatedURL, error_3, err_1;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n _a2.trys.push([0, 9, , 10]);\n defaultCdn = new RegExp(\"https://cdn.segment.(com|build)\");\n cdn = getCDN();\n if (!obfuscate)\n return [3, 6];\n urlSplit = remotePlugin.url.split(\"/\");\n name_1 = urlSplit[urlSplit.length - 2];\n obfuscatedURL = remotePlugin.url.replace(name_1, btoa(name_1).replace(/=/g, \"\"));\n _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 5]);\n return [4, loadScript(obfuscatedURL.replace(defaultCdn, cdn))];\n case 2:\n _a2.sent();\n return [3, 5];\n case 3:\n error_3 = _a2.sent();\n return [4, loadScript(remotePlugin.url.replace(defaultCdn, cdn))];\n case 4:\n _a2.sent();\n return [3, 5];\n case 5:\n return [3, 8];\n case 6:\n return [4, loadScript(remotePlugin.url.replace(defaultCdn, cdn))];\n case 7:\n _a2.sent();\n _a2.label = 8;\n case 8:\n if (typeof window[remotePlugin.libraryName] === \"function\") {\n return [2, window[remotePlugin.libraryName]];\n }\n return [3, 10];\n case 9:\n err_1 = _a2.sent();\n console.error(\"Failed to create PluginFactory\", remotePlugin);\n throw err_1;\n case 10:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }\n function remoteLoader(settings, userIntegrations, mergedIntegrations, options, routingMiddleware, pluginSources) {\n var _a2, _b2, _c;\n return __awaiter(this, void 0, void 0, function() {\n var allPlugins, routingRules, pluginPromises;\n var _this = this;\n return __generator(this, function(_d) {\n switch (_d.label) {\n case 0:\n allPlugins = [];\n routingRules = (_b2 = (_a2 = settings.middlewareSettings) === null || _a2 === void 0 ? void 0 : _a2.routingRules) !== null && _b2 !== void 0 ? _b2 : [];\n pluginPromises = ((_c = settings.remotePlugins) !== null && _c !== void 0 ? _c : []).map(function(remotePlugin) {\n return __awaiter(_this, void 0, void 0, function() {\n var pluginFactory, _a3, plugin, plugins, routing_1, error_4;\n return __generator(this, function(_b3) {\n switch (_b3.label) {\n case 0:\n if (isPluginDisabled(userIntegrations, remotePlugin))\n return [\n 2\n /*return*/\n ];\n _b3.label = 1;\n case 1:\n _b3.trys.push([1, 6, , 7]);\n _a3 = pluginSources === null || pluginSources === void 0 ? void 0 : pluginSources.find(function(_a4) {\n var pluginName = _a4.pluginName;\n return pluginName === remotePlugin.name;\n });\n if (_a3)\n return [3, 3];\n return [4, loadPluginFactory(remotePlugin, options === null || options === void 0 ? void 0 : options.obfuscate)];\n case 2:\n _a3 = _b3.sent();\n _b3.label = 3;\n case 3:\n pluginFactory = _a3;\n if (!pluginFactory)\n return [3, 5];\n return [4, pluginFactory(__assign(__assign({}, remotePlugin.settings), mergedIntegrations[remotePlugin.name]))];\n case 4:\n plugin = _b3.sent();\n plugins = Array.isArray(plugin) ? plugin : [plugin];\n validate3(plugins);\n routing_1 = routingRules.filter(function(rule) {\n return rule.destinationName === remotePlugin.creationName;\n });\n plugins.forEach(function(plugin2) {\n var wrapper = new ActionDestination(remotePlugin.creationName, plugin2);\n if (routing_1.length && routingMiddleware) {\n wrapper.addMiddleware(routingMiddleware);\n }\n allPlugins.push(wrapper);\n });\n _b3.label = 5;\n case 5:\n return [3, 7];\n case 6:\n error_4 = _b3.sent();\n console.warn(\"Failed to load Remote Plugin\", error_4);\n return [3, 7];\n case 7:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n });\n return [4, Promise.all(pluginPromises)];\n case 1:\n _d.sent();\n return [2, allPlugins.filter(Boolean)];\n }\n });\n });\n }\n var ActionDestination;\n var init_remote_loader = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/remote-loader/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_load_script();\n init_parse_cdn();\n init_middleware();\n init_context2();\n init_metric_helpers();\n init_esm8();\n ActionDestination = /** @class */\n function() {\n function ActionDestination2(name, action) {\n this.version = \"1.0.0\";\n this.alternativeNames = [];\n this.loadPromise = createDeferred();\n this.middleware = [];\n this.alias = this._createMethod(\"alias\");\n this.group = this._createMethod(\"group\");\n this.identify = this._createMethod(\"identify\");\n this.page = this._createMethod(\"page\");\n this.screen = this._createMethod(\"screen\");\n this.track = this._createMethod(\"track\");\n this.action = action;\n this.name = name;\n this.type = action.type;\n this.alternativeNames.push(action.name);\n }\n ActionDestination2.prototype.addMiddleware = function() {\n var _a2;\n var fn = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fn[_i] = arguments[_i];\n }\n if (this.type === \"destination\") {\n (_a2 = this.middleware).push.apply(_a2, fn);\n }\n };\n ActionDestination2.prototype.transform = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var modifiedEvent;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, applyDestinationMiddleware(this.name, ctx.event, this.middleware)];\n case 1:\n modifiedEvent = _a2.sent();\n if (modifiedEvent === null) {\n ctx.cancel(new ContextCancelation({\n retry: false,\n reason: \"dropped by destination middleware\"\n }));\n }\n return [2, new Context(modifiedEvent)];\n }\n });\n });\n };\n ActionDestination2.prototype._createMethod = function(methodName) {\n var _this = this;\n return function(ctx) {\n return __awaiter(_this, void 0, void 0, function() {\n var transformedContext, error_1;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (!this.action[methodName])\n return [2, ctx];\n transformedContext = ctx;\n if (!(this.type === \"destination\"))\n return [3, 2];\n return [4, this.transform(ctx)];\n case 1:\n transformedContext = _a2.sent();\n _a2.label = 2;\n case 2:\n _a2.trys.push([2, 5, , 6]);\n return [4, this.ready()];\n case 3:\n if (!_a2.sent()) {\n throw new Error(\"Something prevented the destination from getting ready\");\n }\n recordIntegrationMetric(ctx, {\n integrationName: this.action.name,\n methodName,\n type: \"action\"\n });\n return [4, this.action[methodName](transformedContext)];\n case 4:\n _a2.sent();\n return [3, 6];\n case 5:\n error_1 = _a2.sent();\n recordIntegrationMetric(ctx, {\n integrationName: this.action.name,\n methodName,\n type: \"action\",\n didError: true\n });\n throw error_1;\n case 6:\n return [2, ctx];\n }\n });\n });\n };\n };\n ActionDestination2.prototype.isLoaded = function() {\n return this.action.isLoaded();\n };\n ActionDestination2.prototype.ready = function() {\n return __awaiter(this, void 0, void 0, function() {\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n _b2.trys.push([0, 2, , 3]);\n return [4, this.loadPromise.promise];\n case 1:\n _b2.sent();\n return [2, true];\n case 2:\n _a2 = _b2.sent();\n return [2, false];\n case 3:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n ActionDestination2.prototype.load = function(ctx, analytics) {\n return __awaiter(this, void 0, void 0, function() {\n var loadP, _a2, _b2, error_2;\n return __generator(this, function(_c) {\n switch (_c.label) {\n case 0:\n if (this.loadPromise.isSettled()) {\n return [2, this.loadPromise.promise];\n }\n _c.label = 1;\n case 1:\n _c.trys.push([1, 3, , 4]);\n recordIntegrationMetric(ctx, {\n integrationName: this.action.name,\n methodName: \"load\",\n type: \"action\"\n });\n loadP = this.action.load(ctx, analytics);\n _b2 = (_a2 = this.loadPromise).resolve;\n return [4, loadP];\n case 2:\n _b2.apply(_a2, [_c.sent()]);\n return [2, loadP];\n case 3:\n error_2 = _c.sent();\n recordIntegrationMetric(ctx, {\n integrationName: this.action.name,\n methodName: \"load\",\n type: \"action\",\n didError: true\n });\n this.loadPromise.reject(error_2);\n throw error_2;\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n ActionDestination2.prototype.unload = function(ctx, analytics) {\n var _a2, _b2;\n return (_b2 = (_a2 = this.action).unload) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, ctx, analytics);\n };\n return ActionDestination2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/on-page-change.js\n var onPageChange;\n var init_on_page_change = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/on-page-change.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n onPageChange = function(cb) {\n var unloaded = false;\n window.addEventListener(\"pagehide\", function() {\n if (unloaded)\n return;\n unloaded = true;\n cb(unloaded);\n });\n document.addEventListener(\"visibilitychange\", function() {\n if (document.visibilityState == \"hidden\") {\n if (unloaded)\n return;\n unloaded = true;\n } else {\n unloaded = false;\n }\n cb(unloaded);\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/ratelimit-error.js\n var RateLimitError;\n var init_ratelimit_error = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/ratelimit-error.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n RateLimitError = /** @class */\n function(_super) {\n __extends(RateLimitError2, _super);\n function RateLimitError2(message, retryTimeout) {\n var _this = _super.call(this, message) || this;\n _this.retryTimeout = retryTimeout;\n _this.name = \"RateLimitError\";\n return _this;\n }\n return RateLimitError2;\n }(Error);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/batched-dispatcher.js\n function kilobytes(buffer2) {\n var size5 = encodeURI(JSON.stringify(buffer2)).split(/%..|./).length - 1;\n return size5 / 1024;\n }\n function approachingTrackingAPILimit(buffer2) {\n return kilobytes(buffer2) >= MAX_PAYLOAD_SIZE - 50;\n }\n function passedKeepaliveLimit(buffer2) {\n return kilobytes(buffer2) >= MAX_KEEPALIVE_SIZE - 10;\n }\n function chunks(batch2) {\n var result = [];\n var index2 = 0;\n batch2.forEach(function(item) {\n var size5 = kilobytes(result[index2]);\n if (size5 >= 64) {\n index2++;\n }\n if (result[index2]) {\n result[index2].push(item);\n } else {\n result[index2] = [item];\n }\n });\n return result;\n }\n function batch(apiHost, config2) {\n var _a2, _b2;\n var buffer2 = [];\n var pageUnloaded = false;\n var limit = (_a2 = config2 === null || config2 === void 0 ? void 0 : config2.size) !== null && _a2 !== void 0 ? _a2 : 10;\n var timeout = (_b2 = config2 === null || config2 === void 0 ? void 0 : config2.timeout) !== null && _b2 !== void 0 ? _b2 : 5e3;\n var rateLimitTimeout = 0;\n function sendBatch(batch2) {\n var _a3;\n if (batch2.length === 0) {\n return;\n }\n var writeKey = (_a3 = batch2[0]) === null || _a3 === void 0 ? void 0 : _a3.writeKey;\n var updatedBatch = batch2.map(function(event) {\n var _a4 = event, sentAt = _a4.sentAt, newEvent = __rest(_a4, [\"sentAt\"]);\n return newEvent;\n });\n return fetch2(\"https://\".concat(apiHost, \"/b\"), {\n keepalive: (config2 === null || config2 === void 0 ? void 0 : config2.keepalive) || pageUnloaded,\n headers: {\n \"Content-Type\": \"text/plain\"\n },\n method: \"post\",\n body: JSON.stringify({\n writeKey,\n batch: updatedBatch,\n sentAt: (/* @__PURE__ */ new Date()).toISOString()\n })\n }).then(function(res) {\n var _a4;\n if (res.status >= 500) {\n throw new Error(\"Bad response from server: \".concat(res.status));\n }\n if (res.status === 429) {\n var retryTimeoutStringSecs = (_a4 = res.headers) === null || _a4 === void 0 ? void 0 : _a4.get(\"x-ratelimit-reset\");\n var retryTimeoutMS = typeof retryTimeoutStringSecs == \"string\" ? parseInt(retryTimeoutStringSecs) * 1e3 : timeout;\n throw new RateLimitError(\"Rate limit exceeded: \".concat(res.status), retryTimeoutMS);\n }\n });\n }\n function flush(attempt2) {\n var _a3;\n if (attempt2 === void 0) {\n attempt2 = 1;\n }\n return __awaiter(this, void 0, void 0, function() {\n var batch_1;\n return __generator(this, function(_b3) {\n if (buffer2.length) {\n batch_1 = buffer2;\n buffer2 = [];\n return [2, (_a3 = sendBatch(batch_1)) === null || _a3 === void 0 ? void 0 : _a3.catch(function(error) {\n var _a4;\n var ctx = Context.system();\n ctx.log(\"error\", \"Error sending batch\", error);\n if (attempt2 <= ((_a4 = config2 === null || config2 === void 0 ? void 0 : config2.maxRetries) !== null && _a4 !== void 0 ? _a4 : 10)) {\n if (error.name === \"RateLimitError\") {\n rateLimitTimeout = error.retryTimeout;\n }\n buffer2.push.apply(buffer2, batch_1);\n buffer2.map(function(event) {\n if (\"_metadata\" in event) {\n var segmentEvent = event;\n segmentEvent._metadata = __assign(__assign({}, segmentEvent._metadata), { retryCount: attempt2 });\n }\n });\n scheduleFlush2(attempt2 + 1);\n }\n })];\n }\n return [\n 2\n /*return*/\n ];\n });\n });\n }\n var schedule;\n function scheduleFlush2(attempt2) {\n if (attempt2 === void 0) {\n attempt2 = 1;\n }\n if (schedule) {\n return;\n }\n schedule = setTimeout(function() {\n schedule = void 0;\n flush(attempt2).catch(console.error);\n }, rateLimitTimeout ? rateLimitTimeout : timeout);\n rateLimitTimeout = 0;\n }\n onPageChange(function(unloaded) {\n pageUnloaded = unloaded;\n if (pageUnloaded && buffer2.length) {\n var reqs = chunks(buffer2).map(sendBatch);\n Promise.all(reqs).catch(console.error);\n }\n });\n function dispatch2(_url, body) {\n return __awaiter(this, void 0, void 0, function() {\n var bufferOverflow;\n return __generator(this, function(_a3) {\n buffer2.push(body);\n bufferOverflow = buffer2.length >= limit || approachingTrackingAPILimit(buffer2) || (config2 === null || config2 === void 0 ? void 0 : config2.keepalive) && passedKeepaliveLimit(buffer2);\n return [2, bufferOverflow || pageUnloaded ? flush() : scheduleFlush2()];\n });\n });\n }\n return {\n dispatch: dispatch2\n };\n }\n var MAX_PAYLOAD_SIZE, MAX_KEEPALIVE_SIZE;\n var init_batched_dispatcher = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/batched-dispatcher.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_fetch2();\n init_on_page_change();\n init_ratelimit_error();\n init_context2();\n MAX_PAYLOAD_SIZE = 500;\n MAX_KEEPALIVE_SIZE = 64;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/fetch-dispatcher.js\n function fetch_dispatcher_default(config2) {\n function dispatch2(url, body) {\n return fetch2(url, {\n keepalive: config2 === null || config2 === void 0 ? void 0 : config2.keepalive,\n headers: { \"Content-Type\": \"text/plain\" },\n method: \"post\",\n body: JSON.stringify(body)\n }).then(function(res) {\n var _a2;\n if (res.status >= 500) {\n throw new Error(\"Bad response from server: \".concat(res.status));\n }\n if (res.status === 429) {\n var retryTimeoutStringSecs = (_a2 = res.headers) === null || _a2 === void 0 ? void 0 : _a2.get(\"x-ratelimit-reset\");\n var retryTimeoutMS = retryTimeoutStringSecs ? parseInt(retryTimeoutStringSecs) * 1e3 : 5e3;\n throw new RateLimitError(\"Rate limit exceeded: \".concat(res.status), retryTimeoutMS);\n }\n });\n }\n return {\n dispatch: dispatch2\n };\n }\n var init_fetch_dispatcher = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/fetch-dispatcher.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fetch2();\n init_ratelimit_error();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/normalize.js\n function normalize2(analytics, json, settings, integrations, ctx) {\n var _a2;\n var user = analytics.user();\n delete json.options;\n json.writeKey = settings === null || settings === void 0 ? void 0 : settings.apiKey;\n json.userId = json.userId || user.id();\n json.anonymousId = json.anonymousId || user.anonymousId();\n json.sentAt = /* @__PURE__ */ new Date();\n var failed = analytics.queue.failedInitializations || [];\n if (failed.length > 0) {\n json._metadata = { failedInitializations: failed };\n }\n if (ctx != null) {\n if (ctx.attempts > 1) {\n json._metadata = __assign(__assign({}, json._metadata), { retryCount: ctx.attempts });\n }\n ctx.attempts++;\n }\n var bundled = [];\n var unbundled = [];\n for (var key in integrations) {\n var integration = integrations[key];\n if (key === \"Segment.io\") {\n bundled.push(key);\n }\n if (integration.bundlingStatus === \"bundled\") {\n bundled.push(key);\n }\n if (integration.bundlingStatus === \"unbundled\") {\n unbundled.push(key);\n }\n }\n for (var _i = 0, _b2 = (settings === null || settings === void 0 ? void 0 : settings.unbundledIntegrations) || []; _i < _b2.length; _i++) {\n var settingsUnbundled = _b2[_i];\n if (!unbundled.includes(settingsUnbundled)) {\n unbundled.push(settingsUnbundled);\n }\n }\n var configIds = (_a2 = settings === null || settings === void 0 ? void 0 : settings.maybeBundledConfigIds) !== null && _a2 !== void 0 ? _a2 : {};\n var bundledConfigIds = [];\n bundled.sort().forEach(function(name) {\n var _a3;\n ;\n ((_a3 = configIds[name]) !== null && _a3 !== void 0 ? _a3 : []).forEach(function(id) {\n bundledConfigIds.push(id);\n });\n });\n if ((settings === null || settings === void 0 ? void 0 : settings.addBundledMetadata) !== false) {\n json._metadata = __assign(__assign({}, json._metadata), { bundled: bundled.sort(), unbundled: unbundled.sort(), bundledIds: bundledConfigIds });\n }\n return json;\n }\n var init_normalize = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/normalize.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/p-while.js\n var pWhile;\n var init_p_while = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/p-while.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n pWhile = function(condition, action) {\n return __awaiter(void 0, void 0, void 0, function() {\n var loop;\n return __generator(this, function(_a2) {\n loop = function(actionResult) {\n return __awaiter(void 0, void 0, void 0, function() {\n var _a3;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n if (!condition(actionResult))\n return [3, 2];\n _a3 = loop;\n return [4, action()];\n case 1:\n return [2, _a3.apply(void 0, [_b2.sent()])];\n case 2:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n return [2, loop(void 0)];\n });\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/schedule-flush.js\n function flushQueue(xt, queue2) {\n return __awaiter(this, void 0, void 0, function() {\n var failedQueue;\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n failedQueue = [];\n if (isOffline()) {\n return [2, queue2];\n }\n return [\n 4,\n pWhile(function() {\n return queue2.length > 0 && !isOffline();\n }, function() {\n return __awaiter(_this, void 0, void 0, function() {\n var ctx, result, success;\n return __generator(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n ctx = queue2.pop();\n if (!ctx) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, attempt(ctx, xt)];\n case 1:\n result = _a3.sent();\n success = result instanceof Context;\n if (!success) {\n failedQueue.push(ctx);\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n })\n // re-add failed tasks\n ];\n case 1:\n _a2.sent();\n failedQueue.map(function(failed) {\n return queue2.pushWithBackoff(failed);\n });\n return [2, queue2];\n }\n });\n });\n }\n function scheduleFlush(flushing, buffer2, xt, scheduleFlush2) {\n var _this = this;\n if (flushing) {\n return;\n }\n setTimeout(function() {\n return __awaiter(_this, void 0, void 0, function() {\n var isFlushing, newBuffer;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n isFlushing = true;\n return [4, flushQueue(xt, buffer2)];\n case 1:\n newBuffer = _a2.sent();\n isFlushing = false;\n if (buffer2.todo > 0) {\n scheduleFlush2(isFlushing, newBuffer, xt, scheduleFlush2);\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }, Math.random() * 5e3);\n }\n var init_schedule_flush = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/schedule-flush.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_connection();\n init_context2();\n init_esm9();\n init_p_while();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/index.js\n function onAlias(analytics, json) {\n var _a2, _b2, _c, _d;\n var user = analytics.user();\n json.previousId = (_c = (_b2 = (_a2 = json.previousId) !== null && _a2 !== void 0 ? _a2 : json.from) !== null && _b2 !== void 0 ? _b2 : user.id()) !== null && _c !== void 0 ? _c : user.anonymousId();\n json.userId = (_d = json.userId) !== null && _d !== void 0 ? _d : json.to;\n delete json.from;\n delete json.to;\n return json;\n }\n function segmentio(analytics, settings, integrations) {\n var _a2, _b2, _c;\n window.addEventListener(\"pagehide\", function() {\n buffer2.push.apply(buffer2, Array.from(inflightEvents));\n inflightEvents.clear();\n });\n var writeKey = (_a2 = settings === null || settings === void 0 ? void 0 : settings.apiKey) !== null && _a2 !== void 0 ? _a2 : \"\";\n var buffer2 = analytics.options.disableClientPersistence ? new PriorityQueue(analytics.queue.queue.maxAttempts, []) : new PersistedPriorityQueue(analytics.queue.queue.maxAttempts, \"\".concat(writeKey, \":dest-Segment.io\"));\n var inflightEvents = /* @__PURE__ */ new Set();\n var flushing = false;\n var apiHost = (_b2 = settings === null || settings === void 0 ? void 0 : settings.apiHost) !== null && _b2 !== void 0 ? _b2 : SEGMENT_API_HOST;\n var protocol = (_c = settings === null || settings === void 0 ? void 0 : settings.protocol) !== null && _c !== void 0 ? _c : \"https\";\n var remote = \"\".concat(protocol, \"://\").concat(apiHost);\n var deliveryStrategy = settings === null || settings === void 0 ? void 0 : settings.deliveryStrategy;\n var client = (deliveryStrategy === null || deliveryStrategy === void 0 ? void 0 : deliveryStrategy.strategy) === \"batching\" ? batch(apiHost, deliveryStrategy.config) : fetch_dispatcher_default(deliveryStrategy === null || deliveryStrategy === void 0 ? void 0 : deliveryStrategy.config);\n function send(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var path, json;\n return __generator(this, function(_a3) {\n if (isOffline()) {\n buffer2.push(ctx);\n scheduleFlush(flushing, buffer2, segmentio2, scheduleFlush);\n return [2, ctx];\n }\n inflightEvents.add(ctx);\n path = ctx.event.type.charAt(0);\n json = toFacade(ctx.event).json();\n if (ctx.event.type === \"track\") {\n delete json.traits;\n }\n if (ctx.event.type === \"alias\") {\n json = onAlias(analytics, json);\n }\n return [2, client.dispatch(\"\".concat(remote, \"/\").concat(path), normalize2(analytics, json, settings, integrations, ctx)).then(function() {\n return ctx;\n }).catch(function(error) {\n ctx.log(\"error\", \"Error sending event\", error);\n if (error.name === \"RateLimitError\") {\n var timeout = error.retryTimeout;\n buffer2.pushWithBackoff(ctx, timeout);\n } else {\n buffer2.pushWithBackoff(ctx);\n }\n scheduleFlush(flushing, buffer2, segmentio2, scheduleFlush);\n return ctx;\n }).finally(function() {\n inflightEvents.delete(ctx);\n })];\n });\n });\n }\n var segmentio2 = {\n name: \"Segment.io\",\n type: \"destination\",\n version: \"0.1.0\",\n isLoaded: function() {\n return true;\n },\n load: function() {\n return Promise.resolve();\n },\n track: send,\n identify: send,\n page: send,\n alias: send,\n group: send,\n screen: send\n };\n if (buffer2.todo) {\n scheduleFlush(flushing, buffer2, segmentio2, scheduleFlush);\n }\n return segmentio2;\n }\n var init_segmentio = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_connection();\n init_priority_queue2();\n init_persisted();\n init_to_facade();\n init_batched_dispatcher();\n init_fetch_dispatcher();\n init_normalize();\n init_schedule_flush();\n init_constants2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/inspector/index.js\n var _a, _b, env2, inspectorHost, attachInspector;\n var init_inspector = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/inspector/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_get_global();\n env2 = getGlobal();\n inspectorHost = (_a = (_b = env2)[\"__SEGMENT_INSPECTOR__\"]) !== null && _a !== void 0 ? _a : _b[\"__SEGMENT_INSPECTOR__\"] = {};\n attachInspector = function(analytics) {\n var _a2;\n return (_a2 = inspectorHost.attach) === null || _a2 === void 0 ? void 0 : _a2.call(inspectorHost, analytics);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/vendor/tsub/tsub.js\n var require_tsub = __commonJS({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/vendor/tsub/tsub.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n !function(t3, r2) {\n if (\"object\" == typeof exports3 && \"object\" == typeof module)\n module.exports = r2();\n else if (\"function\" == typeof define && define.amd)\n define([], r2);\n else {\n var e2 = r2();\n for (var n2 in e2)\n (\"object\" == typeof exports3 ? exports3 : t3)[n2] = e2[n2];\n }\n }(self, function() {\n return function() {\n var t3 = { 2870: function(t4, r3, e3) {\n \"use strict\";\n var n2 = this && this.__importDefault || function(t5) {\n return t5 && t5.__esModule ? t5 : { default: t5 };\n };\n Object.defineProperty(r3, \"__esModule\", { value: true }), r3.Store = r3.matches = r3.transform = void 0;\n var o5 = e3(4303);\n Object.defineProperty(r3, \"transform\", { enumerable: true, get: function() {\n return n2(o5).default;\n } });\n var s4 = e3(2370);\n Object.defineProperty(r3, \"matches\", { enumerable: true, get: function() {\n return n2(s4).default;\n } });\n var i3 = e3(1444);\n Object.defineProperty(r3, \"Store\", { enumerable: true, get: function() {\n return n2(i3).default;\n } });\n }, 2370: function(t4, r3, e3) {\n \"use strict\";\n var n2 = this && this.__importDefault || function(t5) {\n return t5 && t5.__esModule ? t5 : { default: t5 };\n };\n Object.defineProperty(r3, \"__esModule\", { value: true });\n var o5 = n2(e3(7843));\n function s4(t5, r4) {\n if (!Array.isArray(t5))\n return true === i3(t5, r4);\n var e4, n3, o6, f7, p4 = t5[0];\n switch (p4) {\n case \"!\":\n return !s4(t5[1], r4);\n case \"or\":\n for (var l6 = 1; l6 < t5.length; l6++)\n if (s4(t5[l6], r4))\n return true;\n return false;\n case \"and\":\n for (l6 = 1; l6 < t5.length; l6++)\n if (!s4(t5[l6], r4))\n return false;\n return true;\n case \"=\":\n case \"!=\":\n return function(t6, r5, e5, n4) {\n switch (u2(t6) && (t6 = s4(t6, n4)), u2(r5) && (r5 = s4(r5, n4)), \"object\" == typeof t6 && \"object\" == typeof r5 && (t6 = JSON.stringify(t6), r5 = JSON.stringify(r5)), e5) {\n case \"=\":\n return t6 === r5;\n case \"!=\":\n return t6 !== r5;\n default:\n throw new Error(\"Invalid operator in compareItems: \".concat(e5));\n }\n }(i3(t5[1], r4), i3(t5[2], r4), p4, r4);\n case \"<=\":\n case \"<\":\n case \">\":\n case \">=\":\n return function(t6, r5, e5, n4) {\n if (u2(t6) && (t6 = s4(t6, n4)), u2(r5) && (r5 = s4(r5, n4)), \"number\" != typeof t6 || \"number\" != typeof r5)\n return false;\n switch (e5) {\n case \"<=\":\n return t6 <= r5;\n case \">=\":\n return t6 >= r5;\n case \"<\":\n return t6 < r5;\n case \">\":\n return t6 > r5;\n default:\n throw new Error(\"Invalid operator in compareNumbers: \".concat(e5));\n }\n }(i3(t5[1], r4), i3(t5[2], r4), p4, r4);\n case \"in\":\n return function(t6, r5, e5) {\n return void 0 !== r5.find(function(r6) {\n return i3(r6, e5) === t6;\n });\n }(i3(t5[1], r4), i3(t5[2], r4), r4);\n case \"contains\":\n return o6 = i3(t5[1], r4), f7 = i3(t5[2], r4), \"string\" == typeof o6 && \"string\" == typeof f7 && -1 !== o6.indexOf(f7);\n case \"match\":\n return e4 = i3(t5[1], r4), n3 = i3(t5[2], r4), \"string\" == typeof e4 && \"string\" == typeof n3 && function(t6, r5) {\n var e5, n4;\n t:\n for (; t6.length > 0; ) {\n var o7, s5;\n if (o7 = (e5 = a3(t6)).star, s5 = e5.chunk, t6 = e5.pattern, o7 && \"\" === s5)\n return true;\n var i4 = c4(s5, r5), u3 = i4.t, f8 = i4.ok, p5 = i4.err;\n if (p5)\n return false;\n if (!f8 || !(0 === u3.length || t6.length > 0)) {\n if (o7)\n for (var l7 = 0; l7 < r5.length; l7++) {\n if (u3 = (n4 = c4(s5, r5.slice(l7 + 1))).t, f8 = n4.ok, p5 = n4.err, f8) {\n if (0 === t6.length && u3.length > 0)\n continue;\n r5 = u3;\n continue t;\n }\n if (p5)\n return false;\n }\n return false;\n }\n r5 = u3;\n }\n return 0 === r5.length;\n }(n3, e4);\n case \"lowercase\":\n var v2 = i3(t5[1], r4);\n return \"string\" != typeof v2 ? null : v2.toLowerCase();\n case \"typeof\":\n return typeof i3(t5[1], r4);\n case \"length\":\n return function(t6) {\n return null === t6 ? 0 : Array.isArray(t6) || \"string\" == typeof t6 ? t6.length : NaN;\n }(i3(t5[1], r4));\n default:\n throw new Error(\"FQL IR could not evaluate for token: \".concat(p4));\n }\n }\n function i3(t5, r4) {\n return Array.isArray(t5) ? t5 : \"object\" == typeof t5 ? t5.value : (0, o5.default)(r4, t5);\n }\n function u2(t5) {\n return !!Array.isArray(t5) && ((\"lowercase\" === t5[0] || \"length\" === t5[0] || \"typeof\" === t5[0]) && 2 === t5.length || (\"contains\" === t5[0] || \"match\" === t5[0]) && 3 === t5.length);\n }\n function a3(t5) {\n for (var r4 = { star: false, chunk: \"\", pattern: \"\" }; t5.length > 0 && \"*\" === t5[0]; )\n t5 = t5.slice(1), r4.star = true;\n var e4, n3 = false;\n t:\n for (e4 = 0; e4 < t5.length; e4++)\n switch (t5[e4]) {\n case \"\\\\\":\n e4 + 1 < t5.length && e4++;\n break;\n case \"[\":\n n3 = true;\n break;\n case \"]\":\n n3 = false;\n break;\n case \"*\":\n if (!n3)\n break t;\n }\n return r4.chunk = t5.slice(0, e4), r4.pattern = t5.slice(e4), r4;\n }\n function c4(t5, r4) {\n for (var e4, n3, o6 = { t: \"\", ok: false, err: false }; t5.length > 0; ) {\n if (0 === r4.length)\n return o6;\n switch (t5[0]) {\n case \"[\":\n var s5 = r4[0];\n r4 = r4.slice(1);\n var i4 = true;\n (t5 = t5.slice(1)).length > 0 && \"^\" === t5[0] && (i4 = false, t5 = t5.slice(1));\n for (var u3 = false, a4 = 0; ; ) {\n if (t5.length > 0 && \"]\" === t5[0] && a4 > 0) {\n t5 = t5.slice(1);\n break;\n }\n var c5, p4 = \"\";\n if (c5 = (e4 = f6(t5)).char, t5 = e4.newChunk, e4.err)\n return o6;\n if (p4 = c5, \"-\" === t5[0] && (p4 = (n3 = f6(t5.slice(1))).char, t5 = n3.newChunk, n3.err))\n return o6;\n c5 <= s5 && s5 <= p4 && (u3 = true), a4++;\n }\n if (u3 !== i4)\n return o6;\n break;\n case \"?\":\n r4 = r4.slice(1), t5 = t5.slice(1);\n break;\n case \"\\\\\":\n if (0 === (t5 = t5.slice(1)).length)\n return o6.err = true, o6;\n default:\n if (t5[0] !== r4[0])\n return o6;\n r4 = r4.slice(1), t5 = t5.slice(1);\n }\n }\n return o6.t = r4, o6.ok = true, o6.err = false, o6;\n }\n function f6(t5) {\n var r4 = { char: \"\", newChunk: \"\", err: false };\n return 0 === t5.length || \"-\" === t5[0] || \"]\" === t5[0] || \"\\\\\" === t5[0] && 0 === (t5 = t5.slice(1)).length ? (r4.err = true, r4) : (r4.char = t5[0], r4.newChunk = t5.slice(1), 0 === r4.newChunk.length && (r4.err = true), r4);\n }\n r3.default = function(t5, r4) {\n if (!r4)\n throw new Error(\"No matcher supplied!\");\n switch (r4.type) {\n case \"all\":\n return true;\n case \"fql\":\n return function(t6, r5) {\n if (!t6)\n return false;\n try {\n t6 = JSON.parse(t6);\n } catch (r6) {\n throw new Error('Failed to JSON.parse FQL intermediate representation \"'.concat(t6, '\": ').concat(r6));\n }\n var e4 = s4(t6, r5);\n return \"boolean\" == typeof e4 && e4;\n }(r4.ir, t5);\n default:\n throw new Error(\"Matcher of type \".concat(r4.type, \" unsupported.\"));\n }\n };\n }, 1444: function(t4, r3) {\n \"use strict\";\n Object.defineProperty(r3, \"__esModule\", { value: true });\n var e3 = function() {\n function t5(t6) {\n this.rules = [], this.rules = t6 || [];\n }\n return t5.prototype.getRulesByDestinationName = function(t6) {\n for (var r4 = [], e4 = 0, n2 = this.rules; e4 < n2.length; e4++) {\n var o5 = n2[e4];\n o5.destinationName !== t6 && void 0 !== o5.destinationName || r4.push(o5);\n }\n return r4;\n }, t5;\n }();\n r3.default = e3;\n }, 4303: function(t4, r3, e3) {\n \"use strict\";\n var n2 = this && this.__importDefault || function(t5) {\n return t5 && t5.__esModule ? t5 : { default: t5 };\n };\n Object.defineProperty(r3, \"__esModule\", { value: true });\n var o5 = n2(e3(374)), s4 = n2(e3(7843)), i3 = n2(e3(5500)), u2 = e3(9014), a3 = e3(4966);\n function c4(t5, r4) {\n p4(t5, r4.drop, function(t6, r5) {\n r5.forEach(function(r6) {\n return delete t6[r6];\n });\n });\n }\n function f6(t5, r4) {\n p4(t5, r4.allow, function(t6, r5) {\n Object.keys(t6).forEach(function(e4) {\n r5.includes(e4) || delete t6[e4];\n });\n });\n }\n function p4(t5, r4, e4) {\n Object.entries(r4).forEach(function(r5) {\n var n3 = r5[0], o6 = r5[1], i4 = function(t6) {\n \"object\" == typeof t6 && null !== t6 && e4(t6, o6);\n }, u3 = \"\" === n3 ? t5 : (0, s4.default)(t5, n3);\n Array.isArray(u3) ? u3.forEach(i4) : i4(u3);\n });\n }\n function l6(t5, r4) {\n var e4 = JSON.parse(JSON.stringify(t5));\n for (var n3 in r4.map)\n if (r4.map.hasOwnProperty(n3)) {\n var o6 = r4.map[n3], i4 = n3.split(\".\"), c5 = void 0;\n if (i4.length > 1 ? (i4.pop(), c5 = (0, s4.default)(e4, i4.join(\".\"))) : c5 = t5, \"object\" == typeof c5) {\n if (o6.copy) {\n var f7 = (0, s4.default)(e4, o6.copy);\n void 0 !== f7 && (0, u2.dset)(t5, n3, f7);\n } else if (o6.move) {\n var p5 = (0, s4.default)(e4, o6.move);\n void 0 !== p5 && (0, u2.dset)(t5, n3, p5), (0, a3.unset)(t5, o6.move);\n } else\n o6.hasOwnProperty(\"set\") && (0, u2.dset)(t5, n3, o6.set);\n if (o6.to_string) {\n var l7 = (0, s4.default)(t5, n3);\n if (\"string\" == typeof l7 || \"object\" == typeof l7 && null !== l7)\n continue;\n void 0 !== l7 ? (0, u2.dset)(t5, n3, JSON.stringify(l7)) : (0, u2.dset)(t5, n3, \"undefined\");\n }\n }\n }\n }\n function v2(t5, r4) {\n return !(r4.sample.percent <= 0) && (r4.sample.percent >= 1 || (r4.sample.path ? function(t6, r5) {\n var e5 = (0, s4.default)(t6, r5.sample.path), n3 = (0, o5.default)(JSON.stringify(e5)), u3 = -64, a4 = [];\n y6(n3.slice(0, 8), a4);\n for (var c5 = 0, f7 = 0; f7 < 64 && 1 !== a4[f7]; f7++)\n c5++;\n if (0 !== c5) {\n var p5 = [];\n y6(n3.slice(9, 16), p5), u3 -= c5, a4.splice(0, c5), p5.splice(64 - c5), a4 = a4.concat(p5);\n }\n return a4[63] = 0 === a4[63] ? 1 : 0, (0, i3.default)(parseInt(a4.join(\"\"), 2), u3) < r5.sample.percent;\n }(t5, r4) : (e4 = r4.sample.percent, Math.random() <= e4)));\n var e4;\n }\n function y6(t5, r4) {\n for (var e4 = 0; e4 < 8; e4++)\n for (var n3 = t5[e4], o6 = 128; o6 >= 1; o6 /= 2)\n n3 - o6 >= 0 ? (n3 -= o6, r4.push(1)) : r4.push(0);\n }\n r3.default = function(t5, r4) {\n for (var e4 = t5, n3 = 0, o6 = r4; n3 < o6.length; n3++) {\n var s5 = o6[n3];\n switch (s5.type) {\n case \"drop\":\n return null;\n case \"drop_properties\":\n c4(e4, s5.config);\n break;\n case \"allow_properties\":\n f6(e4, s5.config);\n break;\n case \"sample_event\":\n if (v2(e4, s5.config))\n break;\n return null;\n case \"map_properties\":\n l6(e4, s5.config);\n break;\n case \"hash_properties\":\n break;\n default:\n throw new Error('Transformer of type \"'.concat(s5.type, '\" is unsupported.'));\n }\n }\n return e4;\n };\n }, 4966: function(t4, r3, e3) {\n \"use strict\";\n var n2 = this && this.__importDefault || function(t5) {\n return t5 && t5.__esModule ? t5 : { default: t5 };\n };\n Object.defineProperty(r3, \"__esModule\", { value: true }), r3.unset = void 0;\n var o5 = n2(e3(7843));\n r3.unset = function(t5, r4) {\n if ((0, o5.default)(t5, r4)) {\n for (var e4 = r4.split(\".\"), n3 = e4.pop(); e4.length && \"\\\\\" === e4[e4.length - 1].slice(-1); )\n n3 = e4.pop().slice(0, -1) + \".\" + n3;\n for (; e4.length; )\n t5 = t5[r4 = e4.shift()];\n return delete t5[n3];\n }\n return true;\n };\n }, 9014: function(t4, r3) {\n r3.dset = function(t5, r4, e3) {\n r4.split && (r4 = r4.split(\".\"));\n for (var n2, o5, s4 = 0, i3 = r4.length, u2 = t5; s4 < i3 && \"__proto__\" !== (o5 = r4[s4++]) && \"constructor\" !== o5 && \"prototype\" !== o5; )\n u2 = u2[o5] = s4 === i3 ? e3 : typeof (n2 = u2[o5]) == typeof r4 ? n2 : 0 * r4[s4] != 0 || ~(\"\" + r4[s4]).indexOf(\".\") ? {} : [];\n };\n }, 3304: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Float64Array ? Float64Array : void 0;\n t4.exports = r3;\n }, 7382: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(5569), s4 = e3(3304), i3 = e3(8482);\n n2 = o5() ? s4 : i3, t4.exports = n2;\n }, 8482: function(t4) {\n \"use strict\";\n t4.exports = function() {\n throw new Error(\"not implemented\");\n };\n }, 6322: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(2508), s4 = e3(5679), i3 = e3(882);\n n2 = o5() ? s4 : i3, t4.exports = n2;\n }, 882: function(t4) {\n \"use strict\";\n t4.exports = function() {\n throw new Error(\"not implemented\");\n };\n }, 5679: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint16Array ? Uint16Array : void 0;\n t4.exports = r3;\n }, 4773: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(9773), s4 = e3(3004), i3 = e3(3078);\n n2 = o5() ? s4 : i3, t4.exports = n2;\n }, 3078: function(t4) {\n \"use strict\";\n t4.exports = function() {\n throw new Error(\"not implemented\");\n };\n }, 3004: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint32Array ? Uint32Array : void 0;\n t4.exports = r3;\n }, 7980: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(8114), s4 = e3(6737), i3 = e3(3357);\n n2 = o5() ? s4 : i3, t4.exports = n2;\n }, 3357: function(t4) {\n \"use strict\";\n t4.exports = function() {\n throw new Error(\"not implemented\");\n };\n }, 6737: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint8Array ? Uint8Array : void 0;\n t4.exports = r3;\n }, 2684: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Float64Array ? Float64Array : null;\n t4.exports = r3;\n }, 5569: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(3876);\n t4.exports = n2;\n }, 3876: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(1448), o5 = e3(2684);\n t4.exports = function() {\n var t5, r4;\n if (\"function\" != typeof o5)\n return false;\n try {\n r4 = new o5([1, 3.14, -3.14, NaN]), t5 = n2(r4) && 1 === r4[0] && 3.14 === r4[1] && -3.14 === r4[2] && r4[3] != r4[3];\n } catch (r5) {\n t5 = false;\n }\n return t5;\n };\n }, 9048: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(3763);\n t4.exports = n2;\n }, 3763: function(t4) {\n \"use strict\";\n var r3 = Object.prototype.hasOwnProperty;\n t4.exports = function(t5, e3) {\n return null != t5 && r3.call(t5, e3);\n };\n }, 7009: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6784);\n t4.exports = n2;\n }, 6784: function(t4) {\n \"use strict\";\n t4.exports = function() {\n return \"function\" == typeof Symbol && \"symbol\" == typeof Symbol(\"foo\");\n };\n }, 3123: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(8481);\n t4.exports = n2;\n }, 8481: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7009)();\n t4.exports = function() {\n return n2 && \"symbol\" == typeof Symbol.toStringTag;\n };\n }, 2508: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(3403);\n t4.exports = n2;\n }, 3403: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(768), o5 = e3(9668), s4 = e3(187);\n t4.exports = function() {\n var t5, r4;\n if (\"function\" != typeof s4)\n return false;\n try {\n r4 = new s4(r4 = [1, 3.14, -3.14, o5 + 1, o5 + 2]), t5 = n2(r4) && 1 === r4[0] && 3 === r4[1] && r4[2] === o5 - 2 && 0 === r4[3] && 1 === r4[4];\n } catch (r5) {\n t5 = false;\n }\n return t5;\n };\n }, 187: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint16Array ? Uint16Array : null;\n t4.exports = r3;\n }, 9773: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(2822);\n t4.exports = n2;\n }, 2822: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(2744), o5 = e3(3899), s4 = e3(746);\n t4.exports = function() {\n var t5, r4;\n if (\"function\" != typeof s4)\n return false;\n try {\n r4 = new s4(r4 = [1, 3.14, -3.14, o5 + 1, o5 + 2]), t5 = n2(r4) && 1 === r4[0] && 3 === r4[1] && r4[2] === o5 - 2 && 0 === r4[3] && 1 === r4[4];\n } catch (r5) {\n t5 = false;\n }\n return t5;\n };\n }, 746: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint32Array ? Uint32Array : null;\n t4.exports = r3;\n }, 8114: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(8066);\n t4.exports = n2;\n }, 8066: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(8279), o5 = e3(3443), s4 = e3(2731);\n t4.exports = function() {\n var t5, r4;\n if (\"function\" != typeof s4)\n return false;\n try {\n r4 = new s4(r4 = [1, 3.14, -3.14, o5 + 1, o5 + 2]), t5 = n2(r4) && 1 === r4[0] && 3 === r4[1] && r4[2] === o5 - 2 && 0 === r4[3] && 1 === r4[4];\n } catch (r5) {\n t5 = false;\n }\n return t5;\n };\n }, 2731: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint8Array ? Uint8Array : null;\n t4.exports = r3;\n }, 1448: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(1453);\n t4.exports = n2;\n }, 1453: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6208), o5 = \"function\" == typeof Float64Array;\n t4.exports = function(t5) {\n return o5 && t5 instanceof Float64Array || \"[object Float64Array]\" === n2(t5);\n };\n }, 9331: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7980), o5 = { uint16: e3(6322), uint8: n2 };\n t4.exports = o5;\n }, 5902: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4106);\n t4.exports = n2;\n }, 4106: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5, s4 = e3(9331);\n (o5 = new s4.uint16(1))[0] = 4660, n2 = 52 === new s4.uint8(o5.buffer)[0], t4.exports = n2;\n }, 768: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(3823);\n t4.exports = n2;\n }, 3823: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6208), o5 = \"function\" == typeof Uint16Array;\n t4.exports = function(t5) {\n return o5 && t5 instanceof Uint16Array || \"[object Uint16Array]\" === n2(t5);\n };\n }, 2744: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(2326);\n t4.exports = n2;\n }, 2326: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6208), o5 = \"function\" == typeof Uint32Array;\n t4.exports = function(t5) {\n return o5 && t5 instanceof Uint32Array || \"[object Uint32Array]\" === n2(t5);\n };\n }, 8279: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(208);\n t4.exports = n2;\n }, 208: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6208), o5 = \"function\" == typeof Uint8Array;\n t4.exports = function(t5) {\n return o5 && t5 instanceof Uint8Array || \"[object Uint8Array]\" === n2(t5);\n };\n }, 6315: function(t4) {\n \"use strict\";\n t4.exports = 1023;\n }, 1686: function(t4) {\n \"use strict\";\n t4.exports = 2147483647;\n }, 3105: function(t4) {\n \"use strict\";\n t4.exports = 2146435072;\n }, 3449: function(t4) {\n \"use strict\";\n t4.exports = 2147483648;\n }, 6988: function(t4) {\n \"use strict\";\n t4.exports = -1023;\n }, 9777: function(t4) {\n \"use strict\";\n t4.exports = 1023;\n }, 3690: function(t4) {\n \"use strict\";\n t4.exports = -1074;\n }, 2918: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4772).NEGATIVE_INFINITY;\n t4.exports = n2;\n }, 4165: function(t4) {\n \"use strict\";\n var r3 = Number.POSITIVE_INFINITY;\n t4.exports = r3;\n }, 6488: function(t4) {\n \"use strict\";\n t4.exports = 22250738585072014e-324;\n }, 9668: function(t4) {\n \"use strict\";\n t4.exports = 65535;\n }, 3899: function(t4) {\n \"use strict\";\n t4.exports = 4294967295;\n }, 3443: function(t4) {\n \"use strict\";\n t4.exports = 255;\n }, 7011: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(812);\n t4.exports = n2;\n }, 812: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4165), o5 = e3(2918);\n t4.exports = function(t5) {\n return t5 === n2 || t5 === o5;\n };\n }, 1883: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(1797);\n t4.exports = n2;\n }, 1797: function(t4) {\n \"use strict\";\n t4.exports = function(t5) {\n return t5 != t5;\n };\n }, 513: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(5760);\n t4.exports = n2;\n }, 5760: function(t4) {\n \"use strict\";\n t4.exports = function(t5) {\n return Math.abs(t5);\n };\n }, 5848: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(677);\n t4.exports = n2;\n }, 677: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(3449), o5 = e3(1686), s4 = e3(7838), i3 = e3(1921), u2 = e3(2490), a3 = [0, 0];\n t4.exports = function(t5, r4) {\n var e4, c4;\n return s4.assign(t5, a3, 1, 0), e4 = a3[0], e4 &= o5, c4 = i3(r4), u2(e4 |= c4 &= n2, a3[1]);\n };\n }, 5500: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(8397);\n t4.exports = n2;\n }, 8397: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4165), o5 = e3(2918), s4 = e3(6315), i3 = e3(9777), u2 = e3(6988), a3 = e3(3690), c4 = e3(1883), f6 = e3(7011), p4 = e3(5848), l6 = e3(4948), v2 = e3(8478), y6 = e3(7838), d5 = e3(2490), h4 = [0, 0], x4 = [0, 0];\n t4.exports = function(t5, r4) {\n var e4, b4;\n return 0 === t5 || c4(t5) || f6(t5) ? t5 : (l6(h4, t5), r4 += h4[1], (r4 += v2(t5 = h4[0])) < a3 ? p4(0, t5) : r4 > i3 ? t5 < 0 ? o5 : n2 : (r4 <= u2 ? (r4 += 52, b4 = 2220446049250313e-31) : b4 = 1, y6(x4, t5), e4 = x4[0], e4 &= 2148532223, b4 * d5(e4 |= r4 + s4 << 20, x4[1])));\n };\n }, 4772: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7548);\n t4.exports = n2;\n }, 7548: function(t4) {\n \"use strict\";\n t4.exports = Number;\n }, 8478: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4500);\n t4.exports = n2;\n }, 4500: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(1921), o5 = e3(3105), s4 = e3(6315);\n t4.exports = function(t5) {\n var r4 = n2(t5);\n return (r4 = (r4 & o5) >>> 20) - s4 | 0;\n };\n }, 2490: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(9639);\n t4.exports = n2;\n }, 4445: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5, s4;\n true === e3(5902) ? (o5 = 1, s4 = 0) : (o5 = 0, s4 = 1), n2 = { HIGH: o5, LOW: s4 }, t4.exports = n2;\n }, 9639: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4773), o5 = e3(7382), s4 = e3(4445), i3 = new o5(1), u2 = new n2(i3.buffer), a3 = s4.HIGH, c4 = s4.LOW;\n t4.exports = function(t5, r4) {\n return u2[a3] = t5, u2[c4] = r4, i3[0];\n };\n }, 5646: function(t4, r3, e3) {\n \"use strict\";\n var n2;\n n2 = true === e3(5902) ? 1 : 0, t4.exports = n2;\n }, 1921: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6285);\n t4.exports = n2;\n }, 6285: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4773), o5 = e3(7382), s4 = e3(5646), i3 = new o5(1), u2 = new n2(i3.buffer);\n t4.exports = function(t5) {\n return i3[0] = t5, u2[s4];\n };\n }, 9024: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6488), o5 = e3(7011), s4 = e3(1883), i3 = e3(513);\n t4.exports = function(t5, r4, e4, u2) {\n return s4(t5) || o5(t5) ? (r4[u2] = t5, r4[u2 + e4] = 0, r4) : 0 !== t5 && i3(t5) < n2 ? (r4[u2] = 4503599627370496 * t5, r4[u2 + e4] = -52, r4) : (r4[u2] = t5, r4[u2 + e4] = 0, r4);\n };\n }, 4948: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7576), o5 = e3(9422);\n n2(o5, \"assign\", e3(9024)), t4.exports = o5;\n }, 9422: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(9024);\n t4.exports = function(t5) {\n return n2(t5, [0, 0], 1, 0);\n };\n }, 5239: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4773), o5 = e3(7382), s4 = e3(5782), i3 = new o5(1), u2 = new n2(i3.buffer), a3 = s4.HIGH, c4 = s4.LOW;\n t4.exports = function(t5, r4, e4, n3) {\n return i3[0] = t5, r4[n3] = u2[a3], r4[n3 + e4] = u2[c4], r4;\n };\n }, 7838: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7576), o5 = e3(4010);\n n2(o5, \"assign\", e3(5239)), t4.exports = o5;\n }, 5782: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5, s4;\n true === e3(5902) ? (o5 = 1, s4 = 0) : (o5 = 0, s4 = 1), n2 = { HIGH: o5, LOW: s4 }, t4.exports = n2;\n }, 4010: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(5239);\n t4.exports = function(t5) {\n return n2(t5, [0, 0], 1, 0);\n };\n }, 7576: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7063);\n t4.exports = n2;\n }, 7063: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6691);\n t4.exports = function(t5, r4, e4) {\n n2(t5, r4, { configurable: false, enumerable: false, writable: false, value: e4 });\n };\n }, 2073: function(t4) {\n \"use strict\";\n var r3 = Object.defineProperty;\n t4.exports = r3;\n }, 1680: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Object.defineProperty ? Object.defineProperty : null;\n t4.exports = r3;\n }, 1471: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(1680);\n t4.exports = function() {\n try {\n return n2({}, \"x\", {}), true;\n } catch (t5) {\n return false;\n }\n };\n }, 6691: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(1471), s4 = e3(2073), i3 = e3(1309);\n n2 = o5() ? s4 : i3, t4.exports = n2;\n }, 1309: function(t4) {\n \"use strict\";\n var r3 = Object.prototype, e3 = r3.toString, n2 = r3.__defineGetter__, o5 = r3.__defineSetter__, s4 = r3.__lookupGetter__, i3 = r3.__lookupSetter__;\n t4.exports = function(t5, u2, a3) {\n var c4, f6, p4, l6;\n if (\"object\" != typeof t5 || null === t5 || \"[object Array]\" === e3.call(t5))\n throw new TypeError(\"invalid argument. First argument must be an object. Value: `\" + t5 + \"`.\");\n if (\"object\" != typeof a3 || null === a3 || \"[object Array]\" === e3.call(a3))\n throw new TypeError(\"invalid argument. Property descriptor must be an object. Value: `\" + a3 + \"`.\");\n if ((f6 = \"value\" in a3) && (s4.call(t5, u2) || i3.call(t5, u2) ? (c4 = t5.__proto__, t5.__proto__ = r3, delete t5[u2], t5[u2] = a3.value, t5.__proto__ = c4) : t5[u2] = a3.value), p4 = \"get\" in a3, l6 = \"set\" in a3, f6 && (p4 || l6))\n throw new Error(\"invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.\");\n return p4 && n2 && n2.call(t5, u2, a3.get), l6 && o5 && o5.call(t5, u2, a3.set), t5;\n };\n }, 6208: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(3123), s4 = e3(7407), i3 = e3(4210);\n n2 = o5() ? i3 : s4, t4.exports = n2;\n }, 7407: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(173);\n t4.exports = function(t5) {\n return n2.call(t5);\n };\n }, 4210: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(9048), o5 = e3(1403), s4 = e3(173);\n t4.exports = function(t5) {\n var r4, e4, i3;\n if (null == t5)\n return s4.call(t5);\n e4 = t5[o5], r4 = n2(t5, o5);\n try {\n t5[o5] = void 0;\n } catch (r5) {\n return s4.call(t5);\n }\n return i3 = s4.call(t5), r4 ? t5[o5] = e4 : delete t5[o5], i3;\n };\n }, 173: function(t4) {\n \"use strict\";\n var r3 = Object.prototype.toString;\n t4.exports = r3;\n }, 1403: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Symbol ? Symbol.toStringTag : \"\";\n t4.exports = r3;\n }, 7843: function(t4) {\n t4.exports = function(t5, r3, e3, n2, o5) {\n for (r3 = r3.split ? r3.split(\".\") : r3, n2 = 0; n2 < r3.length; n2++)\n t5 = t5 ? t5[r3[n2]] : o5;\n return t5 === o5 ? e3 : t5;\n };\n }, 374: function(t4, r3, e3) {\n \"use strict\";\n e3.r(r3), e3.d(r3, { default: function() {\n return s4;\n } });\n for (var n2 = [], o5 = 0; o5 < 64; )\n n2[o5] = 0 | 4294967296 * Math.sin(++o5 % Math.PI);\n function s4(t5) {\n var r4, e4, s5, i3 = [r4 = 1732584193, e4 = 4023233417, ~r4, ~e4], u2 = [], a3 = unescape(encodeURI(t5)) + \"\\x80\", c4 = a3.length;\n for (t5 = --c4 / 4 + 2 | 15, u2[--t5] = 8 * c4; ~c4; )\n u2[c4 >> 2] |= a3.charCodeAt(c4) << 8 * c4--;\n for (o5 = a3 = 0; o5 < t5; o5 += 16) {\n for (c4 = i3; a3 < 64; c4 = [s5 = c4[3], r4 + ((s5 = c4[0] + [r4 & e4 | ~r4 & s5, s5 & r4 | ~s5 & e4, r4 ^ e4 ^ s5, e4 ^ (r4 | ~s5)][c4 = a3 >> 4] + n2[a3] + ~~u2[o5 | 15 & [a3, 5 * a3 + 1, 3 * a3 + 5, 7 * a3][c4]]) << (c4 = [7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21][4 * c4 + a3++ % 4]) | s5 >>> -c4), r4, e4])\n r4 = 0 | c4[1], e4 = c4[2];\n for (a3 = 4; a3; )\n i3[--a3] += c4[a3];\n }\n for (t5 = \"\"; a3 < 32; )\n t5 += (i3[a3 >> 3] >> 4 * (1 ^ a3++) & 15).toString(16);\n return t5;\n }\n } }, r2 = {};\n function e2(n2) {\n var o5 = r2[n2];\n if (void 0 !== o5)\n return o5.exports;\n var s4 = r2[n2] = { exports: {} };\n return t3[n2].call(s4.exports, s4, s4.exports, e2), s4.exports;\n }\n return e2.d = function(t4, r3) {\n for (var n2 in r3)\n e2.o(r3, n2) && !e2.o(t4, n2) && Object.defineProperty(t4, n2, { enumerable: true, get: r3[n2] });\n }, e2.o = function(t4, r3) {\n return Object.prototype.hasOwnProperty.call(t4, r3);\n }, e2.r = function(t4) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t4, Symbol.toStringTag, { value: \"Module\" }), Object.defineProperty(t4, \"__esModule\", { value: true });\n }, e2(2870);\n }();\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/routing-middleware/index.js\n var routing_middleware_exports = {};\n __export(routing_middleware_exports, {\n tsubMiddleware: () => tsubMiddleware\n });\n var tsub, tsubMiddleware;\n var init_routing_middleware = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/routing-middleware/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n tsub = __toESM(require_tsub());\n tsubMiddleware = function(rules) {\n return function(_a2) {\n var payload = _a2.payload, integration = _a2.integration, next = _a2.next;\n var store = new tsub.Store(rules);\n var rulesToApply = store.getRulesByDestinationName(integration);\n rulesToApply.forEach(function(rule) {\n var matchers = rule.matchers, transformers = rule.transformers;\n for (var i3 = 0; i3 < matchers.length; i3++) {\n if (tsub.matches(payload.obj, matchers[i3])) {\n payload.obj = tsub.transform(payload.obj, transformers[i3]);\n if (payload.obj === null) {\n return next(null);\n }\n }\n }\n });\n next(payload);\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js\n function isPlanEventEnabled(plan, planEvent) {\n var _a2, _b2;\n if (typeof (planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) === \"boolean\") {\n return planEvent.enabled;\n }\n return (_b2 = (_a2 = plan === null || plan === void 0 ? void 0 : plan.__default) === null || _a2 === void 0 ? void 0 : _a2.enabled) !== null && _b2 !== void 0 ? _b2 : true;\n }\n var init_is_plan_event_enabled = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js\n function normalizeName(name) {\n return name.toLowerCase().replace(\".\", \"\").replace(/\\s+/g, \"-\");\n }\n function obfuscatePathName(pathName, obfuscate) {\n if (obfuscate === void 0) {\n obfuscate = false;\n }\n return obfuscate ? btoa(pathName).replace(/=/g, \"\") : void 0;\n }\n function resolveIntegrationNameFromSource(integrationSource) {\n return (\"Integration\" in integrationSource ? integrationSource.Integration : integrationSource).prototype.name;\n }\n function recordLoadMetrics(fullPath, ctx, name) {\n var _a2, _b2;\n try {\n var metric = ((_b2 = (_a2 = window === null || window === void 0 ? void 0 : window.performance) === null || _a2 === void 0 ? void 0 : _a2.getEntriesByName(fullPath, \"resource\")) !== null && _b2 !== void 0 ? _b2 : [])[0];\n metric && ctx.stats.gauge(\"legacy_destination_time\", Math.round(metric.duration), __spreadArray([\n name\n ], metric.duration < 100 ? [\"cached\"] : [], true));\n } catch (_2) {\n }\n }\n function buildIntegration(integrationSource, integrationSettings, analyticsInstance) {\n var integrationCtr;\n if (\"Integration\" in integrationSource) {\n var analyticsStub = {\n user: function() {\n return analyticsInstance.user();\n },\n addIntegration: function() {\n }\n };\n integrationSource(analyticsStub);\n integrationCtr = integrationSource.Integration;\n } else {\n integrationCtr = integrationSource;\n }\n var integration = new integrationCtr(integrationSettings);\n integration.analytics = analyticsInstance;\n return integration;\n }\n function loadIntegration(ctx, name, version8, obfuscate) {\n return __awaiter(this, void 0, void 0, function() {\n var pathName, obfuscatedPathName, path, fullPath, err_1, deps;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n pathName = normalizeName(name);\n obfuscatedPathName = obfuscatePathName(pathName, obfuscate);\n path = getNextIntegrationsURL();\n fullPath = \"\".concat(path, \"/integrations/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \"/\").concat(version8, \"/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \".dynamic.js.gz\");\n _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, loadScript(fullPath)];\n case 2:\n _a2.sent();\n recordLoadMetrics(fullPath, ctx, name);\n return [3, 4];\n case 3:\n err_1 = _a2.sent();\n ctx.stats.gauge(\"legacy_destination_time\", -1, [\"plugin:\".concat(name), \"failed\"]);\n throw err_1;\n case 4:\n deps = window[\"\".concat(pathName, \"Deps\")];\n return [\n 4,\n Promise.all(deps.map(function(dep) {\n return loadScript(path + dep + \".gz\");\n }))\n // @ts-ignore\n ];\n case 5:\n _a2.sent();\n window[\"\".concat(pathName, \"Loader\")]();\n return [2, window[\n // @ts-ignore\n \"\".concat(pathName, \"Integration\")\n ]];\n }\n });\n });\n }\n function unloadIntegration(name, version8, obfuscate) {\n return __awaiter(this, void 0, void 0, function() {\n var path, pathName, obfuscatedPathName, fullPath;\n return __generator(this, function(_a2) {\n path = getNextIntegrationsURL();\n pathName = normalizeName(name);\n obfuscatedPathName = obfuscatePathName(name, obfuscate);\n fullPath = \"\".concat(path, \"/integrations/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \"/\").concat(version8, \"/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \".dynamic.js.gz\");\n return [2, unloadScript(fullPath)];\n });\n });\n }\n function resolveVersion(integrationConfig) {\n var _a2, _b2, _c, _d;\n return (_d = (_b2 = (_a2 = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.versionSettings) === null || _a2 === void 0 ? void 0 : _a2.override) !== null && _b2 !== void 0 ? _b2 : (_c = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.versionSettings) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : \"latest\";\n }\n var init_loader = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_parse_cdn();\n init_load_script();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js\n var isInstallableIntegration, isDisabledIntegration;\n var init_utils13 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n isInstallableIntegration = function(name, integrationSettings) {\n var _a2;\n var type = integrationSettings.type, bundlingStatus = integrationSettings.bundlingStatus, versionSettings = integrationSettings.versionSettings;\n var deviceMode = bundlingStatus !== \"unbundled\" && (type === \"browser\" || ((_a2 = versionSettings === null || versionSettings === void 0 ? void 0 : versionSettings.componentTypes) === null || _a2 === void 0 ? void 0 : _a2.includes(\"browser\")));\n return !name.startsWith(\"Segment\") && name !== \"Iterable\" && deviceMode;\n };\n isDisabledIntegration = function(integrationName, globalIntegrations) {\n var allDisableAndNotDefined = globalIntegrations.All === false && globalIntegrations[integrationName] === void 0;\n return globalIntegrations[integrationName] === false || allDisableAndNotDefined;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js\n var ajs_destination_exports = {};\n __export(ajs_destination_exports, {\n LegacyDestination: () => LegacyDestination,\n ajsDestinations: () => ajsDestinations\n });\n function flushQueue2(xt, queue2) {\n return __awaiter(this, void 0, void 0, function() {\n var failedQueue;\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n failedQueue = [];\n if (isOffline()) {\n return [2, queue2];\n }\n return [\n 4,\n pWhile(function() {\n return queue2.length > 0 && isOnline();\n }, function() {\n return __awaiter(_this, void 0, void 0, function() {\n var ctx, result, success;\n return __generator(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n ctx = queue2.pop();\n if (!ctx) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, attempt(ctx, xt)];\n case 1:\n result = _a3.sent();\n success = result instanceof Context;\n if (!success) {\n failedQueue.push(ctx);\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n })\n // re-add failed tasks\n ];\n case 1:\n _a2.sent();\n failedQueue.map(function(failed) {\n return queue2.pushWithBackoff(failed);\n });\n return [2, queue2];\n }\n });\n });\n }\n function ajsDestinations(writeKey, settings, globalIntegrations, options, routingMiddleware, legacyIntegrationSources) {\n var _a2, _b2;\n if (globalIntegrations === void 0) {\n globalIntegrations = {};\n }\n if (options === void 0) {\n options = {};\n }\n if (isServer()) {\n return [];\n }\n if (settings.plan) {\n options = options !== null && options !== void 0 ? options : {};\n options.plan = settings.plan;\n }\n var routingRules = (_b2 = (_a2 = settings.middlewareSettings) === null || _a2 === void 0 ? void 0 : _a2.routingRules) !== null && _b2 !== void 0 ? _b2 : [];\n var remoteIntegrationsConfig = settings.integrations;\n var localIntegrationsConfig = options.integrations;\n var integrationOptions = mergedOptions(settings, options !== null && options !== void 0 ? options : {});\n var adhocIntegrationSources = legacyIntegrationSources === null || legacyIntegrationSources === void 0 ? void 0 : legacyIntegrationSources.reduce(function(acc, integrationSource) {\n var _a3;\n return __assign(__assign({}, acc), (_a3 = {}, _a3[resolveIntegrationNameFromSource(integrationSource)] = integrationSource, _a3));\n }, {});\n var installableIntegrations = new Set(__spreadArray(__spreadArray([], Object.keys(remoteIntegrationsConfig).filter(function(name) {\n return isInstallableIntegration(name, remoteIntegrationsConfig[name]);\n }), true), Object.keys(adhocIntegrationSources || {}).filter(function(name) {\n return isPlainObject2(remoteIntegrationsConfig[name]) || isPlainObject2(localIntegrationsConfig === null || localIntegrationsConfig === void 0 ? void 0 : localIntegrationsConfig[name]);\n }), true));\n return Array.from(installableIntegrations).filter(function(name) {\n return !isDisabledIntegration(name, globalIntegrations);\n }).map(function(name) {\n var integrationSettings = remoteIntegrationsConfig[name];\n var version8 = resolveVersion(integrationSettings);\n var destination = new LegacyDestination(name, version8, writeKey, integrationOptions[name], options, adhocIntegrationSources === null || adhocIntegrationSources === void 0 ? void 0 : adhocIntegrationSources[name]);\n var routing = routingRules.filter(function(rule) {\n return rule.destinationName === name;\n });\n if (routing.length > 0 && routingMiddleware) {\n destination.addMiddleware(routingMiddleware);\n }\n return destination;\n });\n }\n var import_facade2, LegacyDestination;\n var init_ajs_destination = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n import_facade2 = __toESM(require_dist2());\n init_connection();\n init_context2();\n init_environment();\n init_esm9();\n init_is_plan_event_enabled();\n init_merged_options();\n init_p_while();\n init_priority_queue2();\n init_persisted();\n init_middleware();\n init_loader();\n init_esm9();\n init_utils13();\n init_metric_helpers();\n init_esm8();\n LegacyDestination = /** @class */\n function() {\n function LegacyDestination2(name, version8, writeKey, settings, options, integrationSource) {\n if (settings === void 0) {\n settings = {};\n }\n var _this = this;\n this.options = {};\n this.type = \"destination\";\n this.middleware = [];\n this.initializePromise = createDeferred();\n this.flushing = false;\n this.name = name;\n this.version = version8;\n this.settings = __assign({}, settings);\n this.disableAutoISOConversion = options.disableAutoISOConversion || false;\n this.integrationSource = integrationSource;\n if (this.settings[\"type\"] && this.settings[\"type\"] === \"browser\") {\n delete this.settings[\"type\"];\n }\n this.initializePromise.promise.then(function(isInitialized) {\n return _this._initialized = isInitialized;\n }, function() {\n });\n this.options = options;\n this.buffer = options.disableClientPersistence ? new PriorityQueue(4, []) : new PersistedPriorityQueue(4, \"\".concat(writeKey, \":dest-\").concat(name));\n this.scheduleFlush();\n }\n LegacyDestination2.prototype.isLoaded = function() {\n return !!this._ready;\n };\n LegacyDestination2.prototype.ready = function() {\n var _this = this;\n return this.initializePromise.promise.then(function() {\n var _a2;\n return (_a2 = _this.onReady) !== null && _a2 !== void 0 ? _a2 : Promise.resolve();\n });\n };\n LegacyDestination2.prototype.load = function(ctx, analyticsInstance) {\n var _a2;\n return __awaiter(this, void 0, void 0, function() {\n var integrationSource, _b2;\n var _this = this;\n return __generator(this, function(_c) {\n switch (_c.label) {\n case 0:\n if (this._ready || this.onReady !== void 0) {\n return [\n 2\n /*return*/\n ];\n }\n if (!((_a2 = this.integrationSource) !== null && _a2 !== void 0))\n return [3, 1];\n _b2 = _a2;\n return [3, 3];\n case 1:\n return [4, loadIntegration(ctx, this.name, this.version, this.options.obfuscate)];\n case 2:\n _b2 = _c.sent();\n _c.label = 3;\n case 3:\n integrationSource = _b2;\n this.integration = buildIntegration(integrationSource, this.settings, analyticsInstance);\n this.onReady = new Promise(function(resolve) {\n var onReadyFn = function() {\n _this._ready = true;\n resolve(true);\n };\n _this.integration.once(\"ready\", onReadyFn);\n });\n this.integration.on(\"initialize\", function() {\n _this.initializePromise.resolve(true);\n });\n try {\n recordIntegrationMetric(ctx, {\n integrationName: this.name,\n methodName: \"initialize\",\n type: \"classic\"\n });\n this.integration.initialize();\n } catch (error) {\n recordIntegrationMetric(ctx, {\n integrationName: this.name,\n methodName: \"initialize\",\n type: \"classic\",\n didError: true\n });\n this.initializePromise.resolve(false);\n throw error;\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n LegacyDestination2.prototype.unload = function(_ctx, _analyticsInstance) {\n return unloadIntegration(this.name, this.version, this.options.obfuscate);\n };\n LegacyDestination2.prototype.addMiddleware = function() {\n var _a2;\n var fn = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fn[_i] = arguments[_i];\n }\n this.middleware = (_a2 = this.middleware).concat.apply(_a2, fn);\n };\n LegacyDestination2.prototype.shouldBuffer = function(ctx) {\n return (\n // page events can't be buffered because of destinations that automatically add page views\n ctx.event.type !== \"page\" && (isOffline() || this._ready !== true || this._initialized !== true)\n );\n };\n LegacyDestination2.prototype.send = function(ctx, clz, eventType) {\n var _a2, _b2;\n return __awaiter(this, void 0, void 0, function() {\n var plan, ev, planEvent, afterMiddleware, event, err_1;\n return __generator(this, function(_c) {\n switch (_c.label) {\n case 0:\n if (this.shouldBuffer(ctx)) {\n this.buffer.push(ctx);\n this.scheduleFlush();\n return [2, ctx];\n }\n plan = (_b2 = (_a2 = this.options) === null || _a2 === void 0 ? void 0 : _a2.plan) === null || _b2 === void 0 ? void 0 : _b2.track;\n ev = ctx.event.event;\n if (plan && ev && this.name !== \"Segment.io\") {\n planEvent = plan[ev];\n if (!isPlanEventEnabled(plan, planEvent)) {\n ctx.updateEvent(\"integrations\", __assign(__assign({}, ctx.event.integrations), { All: false, \"Segment.io\": true }));\n ctx.cancel(new ContextCancelation({\n retry: false,\n reason: \"Event \".concat(ev, \" disabled for integration \").concat(this.name, \" in tracking plan\"),\n type: \"Dropped by plan\"\n }));\n } else {\n ctx.updateEvent(\"integrations\", __assign(__assign({}, ctx.event.integrations), planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations));\n }\n if ((planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) && (planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations[this.name]) === false) {\n ctx.cancel(new ContextCancelation({\n retry: false,\n reason: \"Event \".concat(ev, \" disabled for integration \").concat(this.name, \" in tracking plan\"),\n type: \"Dropped by plan\"\n }));\n }\n }\n return [4, applyDestinationMiddleware(this.name, ctx.event, this.middleware)];\n case 1:\n afterMiddleware = _c.sent();\n if (afterMiddleware === null) {\n return [2, ctx];\n }\n event = new clz(afterMiddleware, {\n traverse: !this.disableAutoISOConversion\n });\n recordIntegrationMetric(ctx, {\n integrationName: this.name,\n methodName: eventType,\n type: \"classic\"\n });\n _c.label = 2;\n case 2:\n _c.trys.push([2, 5, , 6]);\n if (!this.integration)\n return [3, 4];\n return [4, this.integration.invoke.call(this.integration, eventType, event)];\n case 3:\n _c.sent();\n _c.label = 4;\n case 4:\n return [3, 6];\n case 5:\n err_1 = _c.sent();\n recordIntegrationMetric(ctx, {\n integrationName: this.name,\n methodName: eventType,\n type: \"classic\",\n didError: true\n });\n throw err_1;\n case 6:\n return [2, ctx];\n }\n });\n });\n };\n LegacyDestination2.prototype.track = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n return [2, this.send(ctx, import_facade2.Track, \"track\")];\n });\n });\n };\n LegacyDestination2.prototype.page = function(ctx) {\n var _a2;\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n if (((_a2 = this.integration) === null || _a2 === void 0 ? void 0 : _a2._assumesPageview) && !this._initialized) {\n this.integration.initialize();\n }\n return [4, this.initializePromise.promise];\n case 1:\n _b2.sent();\n return [2, this.send(ctx, import_facade2.Page, \"page\")];\n }\n });\n });\n };\n LegacyDestination2.prototype.identify = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n return [2, this.send(ctx, import_facade2.Identify, \"identify\")];\n });\n });\n };\n LegacyDestination2.prototype.alias = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n return [2, this.send(ctx, import_facade2.Alias, \"alias\")];\n });\n });\n };\n LegacyDestination2.prototype.group = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n return [2, this.send(ctx, import_facade2.Group, \"group\")];\n });\n });\n };\n LegacyDestination2.prototype.scheduleFlush = function() {\n var _this = this;\n if (this.flushing) {\n return;\n }\n setTimeout(function() {\n return __awaiter(_this, void 0, void 0, function() {\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n if (isOffline() || this._ready !== true || this._initialized !== true) {\n this.scheduleFlush();\n return [\n 2\n /*return*/\n ];\n }\n this.flushing = true;\n _a2 = this;\n return [4, flushQueue2(this, this.buffer)];\n case 1:\n _a2.buffer = _b2.sent();\n this.flushing = false;\n if (this.buffer.todo > 0) {\n this.scheduleFlush();\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }, Math.random() * 5e3);\n };\n return LegacyDestination2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics.js-video-plugins@0.2.1/node_modules/@segment/analytics.js-video-plugins/dist/index.umd.js\n var require_index_umd = __commonJS({\n \"../../../node_modules/.pnpm/@segment+analytics.js-video-plugins@0.2.1/node_modules/@segment/analytics.js-video-plugins/dist/index.umd.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n !function(e2, t3) {\n \"object\" == typeof exports3 && \"object\" == typeof module ? module.exports = t3() : \"function\" == typeof define && define.amd ? define([], t3) : \"object\" == typeof exports3 ? exports3.analyticsVideoPlugins = t3() : e2.analyticsVideoPlugins = t3();\n }(window, function() {\n return function(e2) {\n var t3 = {};\n function a3(n2) {\n if (t3[n2])\n return t3[n2].exports;\n var i3 = t3[n2] = { i: n2, l: false, exports: {} };\n return e2[n2].call(i3.exports, i3, i3.exports, a3), i3.l = true, i3.exports;\n }\n return a3.m = e2, a3.c = t3, a3.d = function(e3, t4, n2) {\n a3.o(e3, t4) || Object.defineProperty(e3, t4, { enumerable: true, get: n2 });\n }, a3.r = function(e3) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e3, Symbol.toStringTag, { value: \"Module\" }), Object.defineProperty(e3, \"__esModule\", { value: true });\n }, a3.t = function(e3, t4) {\n if (1 & t4 && (e3 = a3(e3)), 8 & t4)\n return e3;\n if (4 & t4 && \"object\" == typeof e3 && e3 && e3.__esModule)\n return e3;\n var n2 = /* @__PURE__ */ Object.create(null);\n if (a3.r(n2), Object.defineProperty(n2, \"default\", { enumerable: true, value: e3 }), 2 & t4 && \"string\" != typeof e3)\n for (var i3 in e3)\n a3.d(n2, i3, function(t5) {\n return e3[t5];\n }.bind(null, i3));\n return n2;\n }, a3.n = function(e3) {\n var t4 = e3 && e3.__esModule ? function() {\n return e3.default;\n } : function() {\n return e3;\n };\n return a3.d(t4, \"a\", t4), t4;\n }, a3.o = function(e3, t4) {\n return Object.prototype.hasOwnProperty.call(e3, t4);\n }, a3.p = \"\", a3(a3.s = 2);\n }([function(e2, t3, a3) {\n \"use strict\";\n a3.r(t3);\n var n2 = \"function\" == typeof fetch ? fetch.bind() : function(e3, t4) {\n return t4 = t4 || {}, new Promise(function(a4, n3) {\n var i3 = new XMLHttpRequest();\n for (var r2 in i3.open(t4.method || \"get\", e3, true), t4.headers)\n i3.setRequestHeader(r2, t4.headers[r2]);\n function o5() {\n var e4, t5 = [], a5 = [], n4 = {};\n return i3.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm, function(i4, r3, o6) {\n t5.push(r3 = r3.toLowerCase()), a5.push([r3, o6]), e4 = n4[r3], n4[r3] = e4 ? e4 + \",\" + o6 : o6;\n }), { ok: 2 == (i3.status / 100 | 0), status: i3.status, statusText: i3.statusText, url: i3.responseURL, clone: o5, text: function() {\n return Promise.resolve(i3.responseText);\n }, json: function() {\n return Promise.resolve(i3.responseText).then(JSON.parse);\n }, blob: function() {\n return Promise.resolve(new Blob([i3.response]));\n }, headers: { keys: function() {\n return t5;\n }, entries: function() {\n return a5;\n }, get: function(e5) {\n return n4[e5.toLowerCase()];\n }, has: function(e5) {\n return e5.toLowerCase() in n4;\n } } };\n }\n i3.withCredentials = \"include\" == t4.credentials, i3.onload = function() {\n a4(o5());\n }, i3.onerror = n3, i3.send(t4.body);\n });\n };\n t3.default = n2;\n }, function(e2, t3, a3) {\n \"use strict\";\n Object.defineProperty(t3, \"__esModule\", { value: true });\n var n2 = /* @__PURE__ */ function() {\n function e3(e4, t4) {\n for (var a4 = 0; a4 < t4.length; a4++) {\n var n3 = t4[a4];\n n3.enumerable = n3.enumerable || false, n3.configurable = true, \"value\" in n3 && (n3.writable = true), Object.defineProperty(e4, n3.key, n3);\n }\n }\n return function(t4, a4, n3) {\n return a4 && e3(t4.prototype, a4), n3 && e3(t4, n3), t4;\n };\n }();\n var i3 = function() {\n function e3(t4, a4) {\n !function(e4, t5) {\n if (!(e4 instanceof t5))\n throw new TypeError(\"Cannot call a class as a function\");\n }(this, e3), this.pluginName = t4;\n }\n return n2(e3, [{ key: \"track\", value: function(e4, t4) {\n window.analytics.track(e4, t4, { integration: { name: this.pluginName } });\n } }]), e3;\n }();\n t3.default = i3;\n }, function(e2, t3, a3) {\n \"use strict\";\n Object.defineProperty(t3, \"__esModule\", { value: true }), t3.YouTubeAnalytics = t3.VimeoAnalytics = void 0;\n var n2 = r2(a3(3)), i3 = r2(a3(4));\n function r2(e3) {\n return e3 && e3.__esModule ? e3 : { default: e3 };\n }\n t3.VimeoAnalytics = n2.default, t3.YouTubeAnalytics = i3.default;\n }, function(e2, t3, a3) {\n \"use strict\";\n Object.defineProperty(t3, \"__esModule\", { value: true });\n var n2 = /* @__PURE__ */ function() {\n function e3(e4, t4) {\n for (var a4 = 0; a4 < t4.length; a4++) {\n var n3 = t4[a4];\n n3.enumerable = n3.enumerable || false, n3.configurable = true, \"value\" in n3 && (n3.writable = true), Object.defineProperty(e4, n3.key, n3);\n }\n }\n return function(t4, a4, n3) {\n return a4 && e3(t4.prototype, a4), n3 && e3(t4, n3), t4;\n };\n }(), i3 = r2(a3(0));\n function r2(e3) {\n return e3 && e3.__esModule ? e3 : { default: e3 };\n }\n var o5 = function(e3) {\n function t4(e4, a4) {\n !function(e5, t5) {\n if (!(e5 instanceof t5))\n throw new TypeError(\"Cannot call a class as a function\");\n }(this, t4);\n var n3 = function(e5, t5) {\n if (!e5)\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return !t5 || \"object\" != typeof t5 && \"function\" != typeof t5 ? e5 : t5;\n }(this, (t4.__proto__ || Object.getPrototypeOf(t4)).call(this, \"VimeoAnalytics\"));\n return n3.authToken = a4, n3.player = e4, n3.metadata = { content: {}, playback: { videoPlayer: \"Vimeo\" } }, n3.mostRecentHeartbeat = 0, n3.isPaused = false, n3;\n }\n return function(e4, t5) {\n if (\"function\" != typeof t5 && null !== t5)\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof t5);\n e4.prototype = Object.create(t5 && t5.prototype, { constructor: { value: e4, enumerable: false, writable: true, configurable: true } }), t5 && (Object.setPrototypeOf ? Object.setPrototypeOf(e4, t5) : e4.__proto__ = t5);\n }(t4, e3), n2(t4, [{ key: \"initialize\", value: function() {\n var e4 = this, t5 = { loaded: this.retrieveMetadata, play: this.trackPlay, pause: this.trackPause, ended: this.trackEnded, timeupdate: this.trackHeartbeat };\n for (var a4 in t5)\n this.registerHandler(a4, t5[a4]);\n this.player.getVideoId().then(function(t6) {\n e4.retrieveMetadata({ id: t6 });\n }).catch(console.error);\n } }, { key: \"registerHandler\", value: function(e4, t5) {\n var a4 = this;\n this.player.on(e4, function(e5) {\n a4.updateMetadata(e5), t5.call(a4, e5);\n });\n } }, { key: \"trackPlay\", value: function() {\n this.isPaused ? (this.track(\"Video Playback Resumed\", this.metadata.playback), this.isPaused = false) : (this.track(\"Video Playback Started\", this.metadata.playback), this.track(\"Video Content Started\", this.metadata.content));\n } }, { key: \"trackEnded\", value: function() {\n this.track(\"Video Playback Completed\", this.metadata.playback), this.track(\"Video Content Completed\", this.metadata.content);\n } }, { key: \"trackHeartbeat\", value: function() {\n var e4 = this.mostRecentHeartbeat, t5 = this.metadata.playback.position;\n t5 !== e4 && t5 - e4 >= 10 && (this.track(\"Video Content Playing\", this.metadata.content), this.mostRecentHeartbeat = Math.floor(t5));\n } }, { key: \"trackPause\", value: function() {\n this.isPaused = true, this.track(\"Video Playback Paused\", this.metadata.playback);\n } }, { key: \"retrieveMetadata\", value: function(e4) {\n var t5 = this;\n return new Promise(function(a4, n3) {\n var r3 = e4.id;\n (0, i3.default)(\"https://api.vimeo.com/videos/\" + r3, { headers: { Authorization: \"Bearer \" + t5.authToken } }).then(function(e5) {\n return e5.ok ? e5.json() : n3(e5);\n }).then(function(e5) {\n t5.metadata.content.title = e5.name, t5.metadata.content.description = e5.description, t5.metadata.content.publisher = e5.user.name, t5.metadata.playback.position = 0, t5.metadata.playback.totalLength = e5.duration;\n }).catch(function(e5) {\n return console.error(\"Request to Vimeo API Failed with: \", e5), n3(e5);\n });\n });\n } }, { key: \"updateMetadata\", value: function(e4) {\n var t5 = this;\n return new Promise(function(a4, n3) {\n t5.player.getVolume().then(function(n4) {\n n4 && (t5.metadata.playback.sound = 100 * n4), t5.metadata.playback.position = e4.seconds, a4();\n }).catch(n3);\n });\n } }]), t4;\n }(r2(a3(1)).default);\n t3.default = o5;\n }, function(e2, t3, a3) {\n \"use strict\";\n Object.defineProperty(t3, \"__esModule\", { value: true });\n var n2 = /* @__PURE__ */ function() {\n function e3(e4, t4) {\n for (var a4 = 0; a4 < t4.length; a4++) {\n var n3 = t4[a4];\n n3.enumerable = n3.enumerable || false, n3.configurable = true, \"value\" in n3 && (n3.writable = true), Object.defineProperty(e4, n3.key, n3);\n }\n }\n return function(t4, a4, n3) {\n return a4 && e3(t4.prototype, a4), n3 && e3(t4, n3), t4;\n };\n }(), i3 = o5(a3(0)), r2 = o5(a3(1));\n function o5(e3) {\n return e3 && e3.__esModule ? e3 : { default: e3 };\n }\n var s4 = function(e3) {\n function t4(e4, a4) {\n !function(e5, t5) {\n if (!(e5 instanceof t5))\n throw new TypeError(\"Cannot call a class as a function\");\n }(this, t4);\n var n3 = function(e5, t5) {\n if (!e5)\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return !t5 || \"object\" != typeof t5 && \"function\" != typeof t5 ? e5 : t5;\n }(this, (t4.__proto__ || Object.getPrototypeOf(t4)).call(this, \"YoutubeAnalytics\"));\n return n3.player = e4, n3.apiKey = a4, n3.playerLoaded = false, n3.playbackStarted = false, n3.contentStarted = false, n3.isPaused = false, n3.isBuffering = false, n3.isSeeking = false, n3.lastRecordedTime = { timeReported: Date.now(), timeElapsed: 0 }, n3.metadata = [{ playback: { video_player: \"youtube\" }, content: {} }], n3.playlistIndex = 0, n3;\n }\n return function(e4, t5) {\n if (\"function\" != typeof t5 && null !== t5)\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof t5);\n e4.prototype = Object.create(t5 && t5.prototype, { constructor: { value: e4, enumerable: false, writable: true, configurable: true } }), t5 && (Object.setPrototypeOf ? Object.setPrototypeOf(e4, t5) : e4.__proto__ = t5);\n }(t4, e3), n2(t4, [{ key: \"initialize\", value: function() {\n window.segmentYoutubeOnStateChange = this.onPlayerStateChange.bind(this), window.segmentYoutubeOnReady = this.onPlayerReady.bind(this), this.player.addEventListener(\"onReady\", \"segmentYoutubeOnReady\"), this.player.addEventListener(\"onStateChange\", \"segmentYoutubeOnStateChange\");\n } }, { key: \"onPlayerReady\", value: function(e4) {\n this.retrieveMetadata();\n } }, { key: \"onPlayerStateChange\", value: function(e4) {\n var t5 = this.player.getCurrentTime();\n switch (this.metadata[this.playlistIndex] && (this.metadata[this.playlistIndex].playback.position = this.metadata[this.playlistIndex].content.position = t5, this.metadata[this.playlistIndex].playback.quality = this.player.getPlaybackQuality(), this.metadata[this.playlistIndex].playback.sound = this.player.isMuted() ? 0 : this.player.getVolume()), e4.data) {\n case -1:\n if (this.playerLoaded)\n break;\n this.retrieveMetadata(), this.playerLoaded = true;\n break;\n case YT.PlayerState.BUFFERING:\n this.handleBuffer();\n break;\n case YT.PlayerState.PLAYING:\n this.handlePlay();\n break;\n case YT.PlayerState.PAUSED:\n this.handlePause();\n break;\n case YT.PlayerState.ENDED:\n this.handleEnd();\n }\n this.lastRecordedTime = { timeReported: Date.now(), timeElapsed: 1e3 * this.player.getCurrentTime() };\n } }, { key: \"retrieveMetadata\", value: function() {\n var e4 = this;\n return new Promise(function(t5, a4) {\n var n3 = e4.player.getVideoData(), r3 = e4.player.getPlaylist() || [n3.video_id], o6 = r3.join();\n (0, i3.default)(\"https://www.googleapis.com/youtube/v3/videos?id=\" + o6 + \"&part=snippet,contentDetails&key=\" + e4.apiKey).then(function(e5) {\n if (!e5.ok) {\n var t6 = new Error(\"Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)\");\n throw t6.response = e5, t6;\n }\n return e5.json();\n }).then(function(a5) {\n e4.metadata = [];\n for (var n4 = 0, i4 = 0; i4 < r3.length; i4++) {\n var o7 = a5.items[i4];\n e4.metadata.push({ content: { title: o7.snippet.title, description: o7.snippet.description, keywords: o7.snippet.tags, channel: o7.snippet.channelTitle, airdate: o7.snippet.publishedAt } }), n4 += l6(o7.contentDetails.duration);\n }\n for (i4 = 0; i4 < r3.length; i4++)\n e4.metadata[i4].playback = { total_length: n4, video_player: \"youtube\" };\n t5();\n }).catch(function(t6) {\n e4.metadata = r3.map(function(e5) {\n return { playback: { video_player: \"youtube\" }, content: {} };\n }), a4(t6);\n });\n });\n } }, { key: \"handleBuffer\", value: function() {\n var e4 = this.determineSeek();\n this.playbackStarted || (this.playbackStarted = true, this.track(\"Video Playback Started\", this.metadata[this.playlistIndex].playback)), e4 && !this.isSeeking && (this.isSeeking = true, this.track(\"Video Playback Seek Started\", this.metadata[this.playlistIndex].playback)), this.isSeeking && (this.track(\"Video Playback Seek Completed\", this.metadata[this.playlistIndex].playback), this.isSeeking = false);\n var t5 = this.player.getPlaylist();\n t5 && 0 === this.player.getCurrentTime() && this.player.getPlaylistIndex() !== this.playlistIndex && (this.contentStarted = false, this.playlistIndex === t5.length - 1 && 0 === this.player.getPlaylistIndex() && (this.track(\"Video Playback Completed\", this.metadata[this.player.getPlaylistIndex()].playback), this.track(\"Video Playback Started\", this.metadata[this.player.getPlaylistIndex()].playback))), this.track(\"Video Playback Buffer Started\", this.metadata[this.playlistIndex].playback), this.isBuffering = true;\n } }, { key: \"handlePlay\", value: function() {\n this.contentStarted || (this.playlistIndex = this.player.getPlaylistIndex(), -1 === this.playlistIndex && (this.playlistIndex = 0), this.track(\"Video Content Started\", this.metadata[this.playlistIndex].content), this.contentStarted = true), this.isBuffering && (this.track(\"Video Playback Buffer Completed\", this.metadata[this.playlistIndex].playback), this.isBuffering = false), this.isPaused && (this.track(\"Video Playback Resumed\", this.metadata[this.playlistIndex].playback), this.isPaused = false);\n } }, { key: \"handlePause\", value: function() {\n var e4 = this.determineSeek();\n this.isBuffering && (this.track(\"Video Playback Buffer Completed\", this.metadata[this.playlistIndex].playback), this.isBuffering = false), this.isPaused || (e4 ? (this.track(\"Video Playback Seek Started\", this.metadata[this.playlistIndex].playback), this.isSeeking = true) : (this.track(\"Video Playback Paused\", this.metadata[this.playlistIndex].playback), this.isPaused = true));\n } }, { key: \"handleEnd\", value: function() {\n this.track(\"Video Content Completed\", this.metadata[this.playlistIndex].content), this.contentStarted = false;\n var e4 = this.player.getPlaylistIndex(), t5 = this.player.getPlaylist();\n (t5 && e4 === t5.length - 1 || -1 === e4) && (this.track(\"Video Playback Completed\", this.metadata[this.playlistIndex].playback), this.playbackStarted = false);\n } }, { key: \"determineSeek\", value: function() {\n var e4 = this.isPaused || this.isBuffering ? 0 : Date.now() - this.lastRecordedTime.timeReported, t5 = 1e3 * this.player.getCurrentTime() - this.lastRecordedTime.timeElapsed;\n return Math.abs(e4 - t5) > 2e3;\n } }]), t4;\n }(r2.default);\n function l6(e3) {\n var t4 = e3.match(/PT(\\d+H)?(\\d+M)?(\\d+S)?/);\n return t4 = t4.slice(1).map(function(e4) {\n if (null != e4)\n return e4.replace(/\\D/, \"\");\n }), 3600 * (parseInt(t4[0]) || 0) + 60 * (parseInt(t4[1]) || 0) + (parseInt(t4[2]) || 0);\n }\n t3.default = s4;\n }]);\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/legacy-video-plugins/index.js\n var legacy_video_plugins_exports = {};\n __export(legacy_video_plugins_exports, {\n loadLegacyVideoPlugins: () => loadLegacyVideoPlugins\n });\n function loadLegacyVideoPlugins(analytics) {\n return __awaiter(this, void 0, void 0, function() {\n var plugins;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [\n 4,\n Promise.resolve().then(() => __toESM(require_index_umd()))\n // This is super gross, but we need to support the `window.analytics.plugins` namespace\n // that is linked in the segment docs in order to be backwards compatible with ajs-classic\n // @ts-expect-error\n ];\n case 1:\n plugins = _a2.sent();\n analytics._plugins = plugins;\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }\n var init_legacy_video_plugins = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/legacy-video-plugins/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/schema-filter/index.js\n var schema_filter_exports = {};\n __export(schema_filter_exports, {\n schemaFilter: () => schemaFilter\n });\n function disabledActionDestinations(plan, settings) {\n var _a2, _b2;\n if (!plan || !Object.keys(plan)) {\n return {};\n }\n var disabledIntegrations = plan.integrations ? Object.keys(plan.integrations).filter(function(i3) {\n return plan.integrations[i3] === false;\n }) : [];\n var disabledRemotePlugins = [];\n ((_a2 = settings.remotePlugins) !== null && _a2 !== void 0 ? _a2 : []).forEach(function(p4) {\n disabledIntegrations.forEach(function(int) {\n if (p4.creationName == int) {\n disabledRemotePlugins.push(p4.name);\n }\n });\n });\n return ((_b2 = settings.remotePlugins) !== null && _b2 !== void 0 ? _b2 : []).reduce(function(acc, p4) {\n if (p4.settings[\"subscriptions\"]) {\n if (disabledRemotePlugins.includes(p4.name)) {\n p4.settings[\"subscriptions\"].forEach(\n // @ts-expect-error parameter 'sub' implicitly has an 'any' type\n function(sub) {\n return acc[\"\".concat(p4.name, \" \").concat(sub.partnerAction)] = false;\n }\n );\n }\n }\n return acc;\n }, {});\n }\n function schemaFilter(track, settings) {\n function filter2(ctx) {\n var plan = track;\n var ev = ctx.event.event;\n if (plan && ev) {\n var planEvent = plan[ev];\n if (!isPlanEventEnabled(plan, planEvent)) {\n ctx.updateEvent(\"integrations\", __assign(__assign({}, ctx.event.integrations), { All: false, \"Segment.io\": true }));\n return ctx;\n } else {\n var disabledActions = disabledActionDestinations(planEvent, settings);\n ctx.updateEvent(\"integrations\", __assign(__assign(__assign({}, ctx.event.integrations), planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations), disabledActions));\n }\n }\n return ctx;\n }\n return {\n name: \"Schema Filter\",\n version: \"0.1.0\",\n isLoaded: function() {\n return true;\n },\n load: function() {\n return Promise.resolve();\n },\n type: \"before\",\n page: filter2,\n alias: filter2,\n track: filter2,\n identify: filter2,\n group: filter2\n };\n }\n var init_schema_filter = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/schema-filter/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_is_plan_event_enabled();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/remote-middleware/index.js\n var remote_middleware_exports = {};\n __export(remote_middleware_exports, {\n remoteMiddlewares: () => remoteMiddlewares\n });\n function remoteMiddlewares(ctx, settings, obfuscate) {\n var _a2;\n return __awaiter(this, void 0, void 0, function() {\n var path, remoteMiddleware, names, scripts, middleware;\n var _this = this;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n if (isServer()) {\n return [2, []];\n }\n path = getNextIntegrationsURL();\n remoteMiddleware = (_a2 = settings.enabledMiddleware) !== null && _a2 !== void 0 ? _a2 : {};\n names = Object.entries(remoteMiddleware).filter(function(_a3) {\n var _2 = _a3[0], enabled = _a3[1];\n return enabled;\n }).map(function(_a3) {\n var name = _a3[0];\n return name;\n });\n scripts = names.map(function(name) {\n return __awaiter(_this, void 0, void 0, function() {\n var nonNamespaced, bundleName, fullPath, error_1;\n return __generator(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n nonNamespaced = name.replace(\"@segment/\", \"\");\n bundleName = nonNamespaced;\n if (obfuscate) {\n bundleName = btoa(nonNamespaced).replace(/=/g, \"\");\n }\n fullPath = \"\".concat(path, \"/middleware/\").concat(bundleName, \"/latest/\").concat(bundleName, \".js.gz\");\n _a3.label = 1;\n case 1:\n _a3.trys.push([1, 3, , 4]);\n return [\n 4,\n loadScript(fullPath)\n // @ts-ignore\n ];\n case 2:\n _a3.sent();\n return [2, window[\"\".concat(nonNamespaced, \"Middleware\")]];\n case 3:\n error_1 = _a3.sent();\n ctx.log(\"error\", error_1);\n ctx.stats.increment(\"failed_remote_middleware\");\n return [3, 4];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n });\n return [4, Promise.all(scripts)];\n case 1:\n middleware = _b2.sent();\n middleware = middleware.filter(Boolean);\n return [2, middleware];\n }\n });\n });\n }\n var init_remote_middleware = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/remote-middleware/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_environment();\n init_load_script();\n init_parse_cdn();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/browser/index.js\n function loadCDNSettings(writeKey, baseUrl) {\n return fetch2(\"\".concat(baseUrl, \"/v1/projects/\").concat(writeKey, \"/settings\")).then(function(res) {\n if (!res.ok) {\n return res.text().then(function(errorResponseMessage) {\n throw new Error(errorResponseMessage);\n });\n }\n return res.json();\n }).catch(function(err) {\n console.error(err.message);\n throw err;\n });\n }\n function hasLegacyDestinations(settings) {\n return getProcessEnv().NODE_ENV !== \"test\" && // just one integration means segmentio\n Object.keys(settings.integrations).length > 1;\n }\n function hasTsubMiddleware(settings) {\n var _a2, _b2, _c;\n return getProcessEnv().NODE_ENV !== \"test\" && ((_c = (_b2 = (_a2 = settings.middlewareSettings) === null || _a2 === void 0 ? void 0 : _a2.routingRules) === null || _b2 === void 0 ? void 0 : _b2.length) !== null && _c !== void 0 ? _c : 0) > 0;\n }\n function flushPreBuffer(analytics, buffer2) {\n flushSetAnonymousID(analytics, buffer2);\n flushOn(analytics, buffer2);\n }\n function flushFinalBuffer(analytics, buffer2) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, flushAddSourceMiddleware(analytics, buffer2)];\n case 1:\n _a2.sent();\n flushAnalyticsCallsInNewTask(analytics, buffer2);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }\n function registerPlugins(writeKey, cdnSettings, analytics, options, pluginLikes, legacyIntegrationSources, preInitBuffer) {\n var _a2, _b2, _c;\n if (pluginLikes === void 0) {\n pluginLikes = [];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pluginsFromSettings, pluginSources, tsubMiddleware2, _d, legacyDestinations, _e, schemaFilter2, _f, mergedSettings, remotePlugins, basePlugins, shouldIgnoreSegmentio, _g, _h, ctx;\n var _this = this;\n return __generator(this, function(_j) {\n switch (_j.label) {\n case 0:\n flushPreBuffer(analytics, preInitBuffer);\n pluginsFromSettings = pluginLikes === null || pluginLikes === void 0 ? void 0 : pluginLikes.filter(function(pluginLike) {\n return typeof pluginLike === \"object\";\n });\n pluginSources = pluginLikes === null || pluginLikes === void 0 ? void 0 : pluginLikes.filter(function(pluginLike) {\n return typeof pluginLike === \"function\" && typeof pluginLike.pluginName === \"string\";\n });\n if (!hasTsubMiddleware(cdnSettings))\n return [3, 2];\n return [4, Promise.resolve().then(() => (init_routing_middleware(), routing_middleware_exports)).then(function(mod2) {\n return mod2.tsubMiddleware(cdnSettings.middlewareSettings.routingRules);\n })];\n case 1:\n _d = _j.sent();\n return [3, 3];\n case 2:\n _d = void 0;\n _j.label = 3;\n case 3:\n tsubMiddleware2 = _d;\n if (!(hasLegacyDestinations(cdnSettings) || legacyIntegrationSources.length > 0))\n return [3, 5];\n return [4, Promise.resolve().then(() => (init_ajs_destination(), ajs_destination_exports)).then(function(mod2) {\n return mod2.ajsDestinations(writeKey, cdnSettings, analytics.integrations, options, tsubMiddleware2, legacyIntegrationSources);\n })];\n case 4:\n _e = _j.sent();\n return [3, 6];\n case 5:\n _e = [];\n _j.label = 6;\n case 6:\n legacyDestinations = _e;\n if (!cdnSettings.legacyVideoPluginsEnabled)\n return [3, 8];\n return [4, Promise.resolve().then(() => (init_legacy_video_plugins(), legacy_video_plugins_exports)).then(function(mod2) {\n return mod2.loadLegacyVideoPlugins(analytics);\n })];\n case 7:\n _j.sent();\n _j.label = 8;\n case 8:\n if (!((_a2 = options.plan) === null || _a2 === void 0 ? void 0 : _a2.track))\n return [3, 10];\n return [4, Promise.resolve().then(() => (init_schema_filter(), schema_filter_exports)).then(function(mod2) {\n var _a3;\n return mod2.schemaFilter((_a3 = options.plan) === null || _a3 === void 0 ? void 0 : _a3.track, cdnSettings);\n })];\n case 9:\n _f = _j.sent();\n return [3, 11];\n case 10:\n _f = void 0;\n _j.label = 11;\n case 11:\n schemaFilter2 = _f;\n mergedSettings = mergedOptions(cdnSettings, options);\n return [4, remoteLoader(cdnSettings, analytics.integrations, mergedSettings, options, tsubMiddleware2, pluginSources).catch(function() {\n return [];\n })];\n case 12:\n remotePlugins = _j.sent();\n basePlugins = __spreadArray(__spreadArray([envEnrichment], legacyDestinations, true), remotePlugins, true);\n if (schemaFilter2) {\n basePlugins.push(schemaFilter2);\n }\n shouldIgnoreSegmentio = ((_b2 = options.integrations) === null || _b2 === void 0 ? void 0 : _b2.All) === false && !options.integrations[\"Segment.io\"] || options.integrations && options.integrations[\"Segment.io\"] === false;\n if (!!shouldIgnoreSegmentio)\n return [3, 14];\n _h = (_g = basePlugins).push;\n return [4, segmentio(analytics, mergedSettings[\"Segment.io\"], cdnSettings.integrations)];\n case 13:\n _h.apply(_g, [_j.sent()]);\n _j.label = 14;\n case 14:\n return [4, analytics.register.apply(analytics, __spreadArray(__spreadArray([], basePlugins, false), pluginsFromSettings, false))];\n case 15:\n ctx = _j.sent();\n return [4, flushRegister(analytics, preInitBuffer)];\n case 16:\n _j.sent();\n if (!Object.entries((_c = cdnSettings.enabledMiddleware) !== null && _c !== void 0 ? _c : {}).some(function(_a3) {\n var enabled = _a3[1];\n return enabled;\n }))\n return [3, 18];\n return [4, Promise.resolve().then(() => (init_remote_middleware(), remote_middleware_exports)).then(function(_a3) {\n var remoteMiddlewares2 = _a3.remoteMiddlewares;\n return __awaiter(_this, void 0, void 0, function() {\n var middleware, promises;\n return __generator(this, function(_b3) {\n switch (_b3.label) {\n case 0:\n return [4, remoteMiddlewares2(ctx, cdnSettings, options.obfuscate)];\n case 1:\n middleware = _b3.sent();\n promises = middleware.map(function(mdw) {\n return analytics.addSourceMiddleware(mdw);\n });\n return [2, Promise.all(promises)];\n }\n });\n });\n })];\n case 17:\n _j.sent();\n _j.label = 18;\n case 18:\n return [2, ctx];\n }\n });\n });\n }\n function loadAnalytics(settings, options, preInitBuffer) {\n var _a2, _b2, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n if (options === void 0) {\n options = {};\n }\n return __awaiter(this, void 0, void 0, function() {\n var cdnURL, cdnSettings, _m, disabled, retryQueue, analytics, plugins, classicIntegrations, segmentLoadOptions, ctx, search, hash2, term;\n return __generator(this, function(_o) {\n switch (_o.label) {\n case 0:\n if (options.disable === true) {\n return [2, [new NullAnalytics(), Context.system()]];\n }\n if (options.globalAnalyticsKey)\n setGlobalAnalyticsKey(options.globalAnalyticsKey);\n if (settings.cdnURL)\n setGlobalCDNUrl(settings.cdnURL);\n if (options.initialPageview) {\n preInitBuffer.add(new PreInitMethodCall(\"page\", []));\n }\n cdnURL = (_a2 = settings.cdnURL) !== null && _a2 !== void 0 ? _a2 : getCDN();\n if (!((_b2 = settings.cdnSettings) !== null && _b2 !== void 0))\n return [3, 1];\n _m = _b2;\n return [3, 3];\n case 1:\n return [4, loadCDNSettings(settings.writeKey, cdnURL)];\n case 2:\n _m = _o.sent();\n _o.label = 3;\n case 3:\n cdnSettings = _m;\n if (options.updateCDNSettings) {\n cdnSettings = options.updateCDNSettings(cdnSettings);\n }\n if (!(typeof options.disable === \"function\"))\n return [3, 5];\n return [4, options.disable(cdnSettings)];\n case 4:\n disabled = _o.sent();\n if (disabled) {\n return [2, [new NullAnalytics(), Context.system()]];\n }\n _o.label = 5;\n case 5:\n retryQueue = (_d = (_c = cdnSettings.integrations[\"Segment.io\"]) === null || _c === void 0 ? void 0 : _c.retryQueue) !== null && _d !== void 0 ? _d : true;\n options = __assign({ retryQueue }, options);\n analytics = new Analytics(__assign(__assign({}, settings), { cdnSettings, cdnURL }), options);\n attachInspector(analytics);\n plugins = (_e = settings.plugins) !== null && _e !== void 0 ? _e : [];\n classicIntegrations = (_f = settings.classicIntegrations) !== null && _f !== void 0 ? _f : [];\n segmentLoadOptions = (_g = options.integrations) === null || _g === void 0 ? void 0 : _g[\"Segment.io\"];\n Stats.initRemoteMetrics(__assign(__assign({}, cdnSettings.metrics), { host: (_h = segmentLoadOptions === null || segmentLoadOptions === void 0 ? void 0 : segmentLoadOptions.apiHost) !== null && _h !== void 0 ? _h : (_j = cdnSettings.metrics) === null || _j === void 0 ? void 0 : _j.host, protocol: segmentLoadOptions === null || segmentLoadOptions === void 0 ? void 0 : segmentLoadOptions.protocol }));\n return [4, registerPlugins(settings.writeKey, cdnSettings, analytics, options, plugins, classicIntegrations, preInitBuffer)];\n case 6:\n ctx = _o.sent();\n search = (_k = window.location.search) !== null && _k !== void 0 ? _k : \"\";\n hash2 = (_l = window.location.hash) !== null && _l !== void 0 ? _l : \"\";\n term = search.length ? search : hash2.replace(/(?=#).*(?=\\?)/, \"\");\n if (!term.includes(\"ajs_\"))\n return [3, 8];\n return [4, analytics.queryString(term).catch(console.error)];\n case 7:\n _o.sent();\n _o.label = 8;\n case 8:\n analytics.initialized = true;\n analytics.emit(\"initialize\", settings, options);\n return [4, flushFinalBuffer(analytics, preInitBuffer)];\n case 9:\n _o.sent();\n return [2, [analytics, ctx]];\n }\n });\n });\n }\n var AnalyticsBrowser;\n var init_browser2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_get_process_env();\n init_parse_cdn();\n init_fetch2();\n init_analytics2();\n init_context2();\n init_merged_options();\n init_esm8();\n init_env_enrichment();\n init_remote_loader();\n init_segmentio();\n init_buffer3();\n init_inspector();\n init_stats2();\n init_global_analytics_helper();\n AnalyticsBrowser = /** @class */\n function(_super) {\n __extends(AnalyticsBrowser2, _super);\n function AnalyticsBrowser2() {\n var _this = this;\n var _a2 = createDeferred(), loadStart = _a2.promise, resolveLoadStart = _a2.resolve;\n _this = _super.call(this, function(buffer2) {\n return loadStart.then(function(_a3) {\n var settings = _a3[0], options = _a3[1];\n return loadAnalytics(settings, options, buffer2);\n });\n }) || this;\n _this._resolveLoadStart = function(settings, options) {\n return resolveLoadStart([settings, options]);\n };\n return _this;\n }\n AnalyticsBrowser2.prototype.load = function(settings, options) {\n if (options === void 0) {\n options = {};\n }\n this._resolveLoadStart(settings, options);\n return this;\n };\n AnalyticsBrowser2.load = function(settings, options) {\n if (options === void 0) {\n options = {};\n }\n return new AnalyticsBrowser2().load(settings, options);\n };\n AnalyticsBrowser2.standalone = function(writeKey, options) {\n return AnalyticsBrowser2.load({ writeKey }, options).then(function(res) {\n return res[0];\n });\n };\n return AnalyticsBrowser2;\n }(AnalyticsBuffered);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/node/node.browser.js\n var AnalyticsNode;\n var init_node_browser = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/node/node.browser.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n AnalyticsNode = /** @class */\n function() {\n function AnalyticsNode2() {\n }\n AnalyticsNode2.load = function() {\n return Promise.reject(new Error(\"AnalyticsNode is not available in browsers.\"));\n };\n return AnalyticsNode2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/index.js\n var init_pkg = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_browser2();\n init_node_browser();\n init_context2();\n init_events2();\n init_plugin();\n init_user();\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js\n function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + \"-\" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + \"-\" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + \"-\" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + \"-\" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n }\n var byteToHex;\n var init_stringify2 = __esm({\n \"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n byteToHex = [];\n for (let i3 = 0; i3 < 256; ++i3) {\n byteToHex.push((i3 + 256).toString(16).slice(1));\n }\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js\n function rng() {\n if (!getRandomValues) {\n if (typeof crypto === \"undefined\" || !crypto.getRandomValues) {\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n }\n var getRandomValues, rnds8;\n var init_rng = __esm({\n \"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n rnds8 = new Uint8Array(16);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js\n var randomUUID, native_default;\n var init_native = __esm({\n \"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n randomUUID = typeof crypto !== \"undefined\" && crypto.randomUUID && crypto.randomUUID.bind(crypto);\n native_default = { randomUUID };\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js\n function v42(options, buf, offset) {\n if (native_default.randomUUID && !buf && !options) {\n return native_default.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error(\"Random bytes length must be >= 16\");\n }\n rnds[6] = rnds[6] & 15 | 64;\n rnds[8] = rnds[8] & 63 | 128;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i3 = 0; i3 < 16; ++i3) {\n buf[offset + i3] = rnds[i3];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n }\n var v4_default;\n var init_v4 = __esm({\n \"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_native();\n init_rng();\n init_stringify2();\n v4_default = v42;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/index.js\n var init_esm_browser = __esm({\n \"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v4();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/_writeKey.js\n var WRITE_IN_DEV;\n var init_writeKey = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/_writeKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n WRITE_IN_DEV = false;\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/fetchRemoteWriteKey.js\n async function fetchRemoteWriteKey() {\n try {\n const res = await fetch(\"https://ws-accounkit-assets.s3.us-west-1.amazonaws.com/logger_config_v1.json\");\n const json = await res.json();\n return json.writeKey;\n } catch (e2) {\n console.warn(\"failed to fetch write key\");\n return void 0;\n }\n }\n var init_fetchRemoteWriteKey = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/fetchRemoteWriteKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/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.52.2/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.52.2/node_modules/@account-kit/logging/dist/esm/plugins/contextAllowlist.js\n function stripContext(ctx) {\n ctx.event.context = allowlist.reduce((acc, key) => {\n acc[key] = ctx.event?.context?.[key];\n return acc;\n }, {});\n return ctx;\n }\n var allowlist, ContextAllowlistPlugin;\n var init_contextAllowlist = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/plugins/contextAllowlist.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n allowlist = [\"page\"];\n ContextAllowlistPlugin = {\n name: \"Enforce Context Allowlist\",\n type: \"enrichment\",\n isLoaded: () => true,\n load: () => Promise.resolve(),\n track: stripContext,\n identify: stripContext,\n page: stripContext,\n alias: stripContext,\n group: stripContext,\n screen: stripContext\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/plugins/devDestination.js\n function consoleLogEvent(ctx) {\n console.log(JSON.stringify(ctx.event, null, 2));\n return ctx;\n }\n var DevDestinationPlugin;\n var init_devDestination = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/plugins/devDestination.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n DevDestinationPlugin = {\n name: \"Dev Destination Plugin\",\n type: \"destination\",\n isLoaded: () => true,\n load: () => Promise.resolve(),\n track: consoleLogEvent,\n identify: consoleLogEvent,\n page: consoleLogEvent,\n alias: consoleLogEvent,\n group: consoleLogEvent,\n screen: consoleLogEvent\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/utils.js\n function isClientDevMode() {\n if (typeof __DEV__ !== \"undefined\" && __DEV__) {\n return true;\n }\n if (typeof process_exports !== \"undefined\" && true) {\n return true;\n }\n if (typeof window !== \"undefined\" && window.location?.hostname?.includes(\"localhost\")) {\n return true;\n }\n return false;\n }\n var init_utils14 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/client.js\n function getOrCreateAnonId() {\n let anon = JSON.parse(localStorage.getItem(ANON_ID_STORAGE_KEY) ?? \"null\");\n if (!anon || anon.expiresMs < Date.now()) {\n anon = {\n id: v4_default(),\n // expires a month from now (30days * 24hrs/day * 60min/hr * 60sec/min * 1000ms/sec)\n expiresMs: Date.now() + 30 * 24 * 60 * 60 * 1e3\n };\n localStorage.setItem(ANON_ID_STORAGE_KEY, JSON.stringify(anon));\n }\n return anon;\n }\n function createClientLogger(context2) {\n const isDev = isClientDevMode();\n if (isDev && !WRITE_IN_DEV) {\n return noopLogger;\n }\n const analytics = new AnalyticsBrowser();\n const writeKey = fetchRemoteWriteKey();\n const { id: anonId } = getOrCreateAnonId();\n analytics.setAnonymousId(anonId);\n analytics.register(ContextAllowlistPlugin);\n analytics.debug(isDev);\n if (isDev) {\n console.log(`[Metrics] metrics initialized for ${context2.package}`);\n }\n if (isDev) {\n analytics.register(DevDestinationPlugin);\n }\n const ready = writeKey.then((writeKey2) => {\n if (writeKey2 == null) {\n return;\n }\n analytics.load(\n {\n writeKey: writeKey2,\n // we disable these settings in dev so we don't fetch anything from segment\n cdnSettings: isDev ? {\n integrations: {}\n } : void 0\n },\n // further we disable the segment integration dev\n {\n disableClientPersistence: true,\n integrations: {\n \"Segment.io\": !isDev\n }\n }\n );\n return analytics.ready();\n });\n return {\n _internal: {\n ready,\n anonId\n },\n trackEvent: async ({ name, data }) => {\n if (!await writeKey) {\n return noopLogger.trackEvent({\n name,\n // @ts-expect-error\n data\n });\n }\n await analytics.track(name, { ...data, ...context2 });\n }\n };\n }\n var ANON_ID_STORAGE_KEY;\n var init_client2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_pkg();\n init_esm_browser();\n init_writeKey();\n init_fetchRemoteWriteKey();\n init_noop();\n init_contextAllowlist();\n init_devDestination();\n init_utils14();\n ANON_ID_STORAGE_KEY = \"account-kit:anonId\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/server.js\n function createServerLogger(_context) {\n return noopLogger;\n }\n var init_server = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/server.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+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/index.js\n function createLogger(context2) {\n const innerLogger = (() => {\n try {\n return typeof window === \"undefined\" ? createServerLogger(context2) : createClientLogger(context2);\n } catch (e2) {\n console.error(\"[Safe to ignore] failed to initialize metrics\", e2);\n return noopLogger;\n }\n })();\n const logger3 = {\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 logger3;\n }\n var init_esm10 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_client2();\n init_noop();\n init_server();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm10();\n init_version6();\n InfraLogger = createLogger({\n package: \"@account-kit/infra\",\n version: VERSION5\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/defaults.js\n var getDefaultUserOperationFeeOptions2;\n var init_defaults3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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, version8) => {\n switch (version8) {\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: ${version8}`);\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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: VERSION5\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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_defaults3();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/index.js\n var esm_exports = {};\n __export(esm_exports, {\n alchemy: () => alchemy,\n alchemyActions: () => alchemyActions,\n alchemyEnhancedApiActions: () => alchemyEnhancedApiActions,\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 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_esm11 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/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_alchemyEnhancedApis();\n init_smartAccount();\n init_isAlchemySmartAccountClient();\n init_rpcClient();\n init_smartAccountClient3();\n init_defaults3();\n init_gas_manager();\n init_feeEstimator2();\n init_alchemyTrackerHeaders();\n init_gasManager();\n init_userOperationSimulator();\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/sponsoredGas/litActionSmartSigner.js\n var require_litActionSmartSigner = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/sponsoredGas/litActionSmartSigner.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 constructor(config2) {\n this.signerType = \"lit-actions\";\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 hash2 = ethers.utils._TypedDataEncoder.hash(params.domain || {}, params.types || {}, params.message || {});\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash2),\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 hash2 = ethers.utils.keccak256(ethers.utils.hexConcat([\n \"0x05\",\n ethers.utils.RLP.encode([\n ethers.utils.hexlify(chainId),\n contractAddress,\n ethers.utils.hexlify(nonce)\n ])\n ]));\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash2),\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 // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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 [version9, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].impl, version9];\n }\n return [def.addresses.default.impl, version9];\n }));\n const factoryToVersion = new Map(Object.entries(AccountVersionRegistry[accountType]).map((pair) => {\n const [version9, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].factory, version9];\n }\n return [def.addresses.default.factory, version9];\n }));\n const version8 = fromHex(implAddress, \"bigint\") === 0n ? factoryToVersion.get(factoryAddress.toLowerCase()) : implToVersion.get(implAddress.toLowerCase());\n if (!version8) {\n throw new Error(`Could not determine ${account.source} version for chain ${chain2.id}`);\n }\n return AccountVersionRegistry[accountType][version8];\n }\n var AccountVersionRegistry, defaultLightAccountVersion, getDefaultLightAccountFactoryAddress, getDefaultMultiOwnerLightAccountFactoryAddress, LightAccountUnsupported1271Impls, LightAccountUnsupported1271Factories;\n var init_utils15 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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, version8) => {\n return AccountVersionRegistry.LightAccount[version8].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.LightAccount[version8].addresses.default.factory;\n };\n getDefaultMultiOwnerLightAccountFactoryAddress = (chain2, version8) => {\n return AccountVersionRegistry.MultiOwnerLightAccount[version8].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.MultiOwnerLightAccount[version8].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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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: version8, 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(version8)}`);\n }\n return encodeFunctionData({\n abi: abi2,\n functionName: \"upgradeToAndCall\",\n args: [upgradeToAddress, upgradeToInitData]\n });\n };\n const get1271Wrapper = (hashedMessage, version9) => {\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: version9\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 (version8) {\n case \"v1.0.1\":\n return params;\n case \"v1.0.2\":\n throw new Error(`Version ${String(version8)} 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(version8)} of LightAccount`);\n }\n };\n const formatSign = async (signature) => {\n return version8 === \"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 (version8) {\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 (version8) {\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(version8)}`);\n }\n },\n encodeUpgradeToAndCall\n });\n return {\n ...account,\n source: type,\n getLightAccountVersion: () => version8,\n getSigner: () => signer\n };\n }\n var SignatureType;\n var init_base5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_utils15();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/predictAddress.js\n function predictLightAccountAddress({ factoryAddress, salt, ownerAddress, version: version8 }) {\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[version8].addresses.default.factory ? getContractAddress2({\n from: factoryAddress,\n nonce: 1n\n }) : AccountVersionRegistry.LightAccount[version8].addresses.default.impl\n );\n switch (version8) {\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(version8);\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(version8) {\n throw new Error(`Unknown light account version: ${version8}`);\n }\n var init_predictAddress = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_OZ_ERC1967Proxy();\n init_utils15();\n init_LightAccountAbi_v1();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/account.js\n async function createLightAccount({ transport, chain: chain2, signer, initCode, version: version8 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: AccountVersionRegistry[\"LightAccount\"][version8].entryPointVersion\n }), accountAddress, factoryAddress = getDefaultLightAccountFactoryAddress(chain2, version8), salt: salt_ = 0n }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const accountAbi = version8 === \"v2.0.0\" ? LightAccountAbi_v2 : LightAccountAbi_v1;\n const factoryAbi = version8 === \"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: version8\n });\n const account = await createLightAccountBase({\n transport,\n chain: chain2,\n signer,\n abi: accountAbi,\n type: \"LightAccount\",\n version: version8,\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_LightAccountAbi_v1();\n init_LightAccountAbi_v2();\n init_LightAccountFactoryAbi_v1();\n init_LightAccountFactoryAbi_v2();\n init_utils15();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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 (isAlchemyTransport(transport, chain2)) {\n return createAlchemySmartAccountClient({\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_client3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm11();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/multiOwner.js\n async function createMultiOwnerLightAccount({ transport, chain: chain2, signer, initCode, version: version8 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: \"0.7.0\"\n }), accountAddress, factoryAddress = getDefaultMultiOwnerLightAccountFactoryAddress(chain2, version8), 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: version8,\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_MultiOwnerLightAccountAbi();\n init_MultiOwnerLightAccountFactoryAbi();\n init_utils15();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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 (isAlchemyTransport(transport, chain2)) {\n return createAlchemySmartAccountClient({\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm11();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_plugin2();\n multiOwnerMessageSigner = (client, accountAddress, signer, pluginAddress = MultiOwnerPlugin.meta.addresses[client.chain.id]) => {\n const get712Wrapper = async (msg) => {\n const [, name, version8, 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: version8\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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: custom2(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_utils16 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm11();\n init_esm2();\n init_IPlugin();\n init_MultiOwnerModularAccountFactory();\n init_UpgradeableModularAccount();\n init_multiOwnerAccount();\n init_plugin2();\n getDefaultMultisigModularAccountFactoryAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_MultiOwnerModularAccountFactory();\n init_signer2();\n init_utils16();\n init_standardExecutor();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/plugin.js\n var addresses2, MultisigPlugin, multisigPluginActions, MultisigPluginExecutionFunctionAbi, MultisigPluginAbi;\n var init_plugin3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_plugin3();\n multisigSignMethods = ({ client, accountAddress, signer, threshold, pluginAddress = MultisigPlugin.meta.addresses[client.chain.id] }) => {\n const get712Wrapper = async (msg) => {\n const [, name, version8, 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: version8\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_MultisigModularAccountFactory();\n init_signer3();\n init_utils16();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_IPlugin();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/errors.js\n var InvalidAggregatedSignatureError, InvalidContextSignatureError, MultisigAccountExpectedError, MultisigMissingSignatureError;\n var init_errors7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin3();\n init_errors7();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_errors7();\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 hash2 = 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: hash2, 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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_formatSignatures();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/index.js\n var init_utils17 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_errors7();\n init_utils17();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin3();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/middleware.js\n var multisigSignatureMiddleware, isUsingMaxValues;\n var init_middleware2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_errors7();\n init_utils17();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_middleware2();\n init_plugin3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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 (isAlchemyTransport(transport, chain2)) {\n const { opts } = params;\n return createAlchemySmartAccountClient({\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 (isAlchemyTransport(transport, chain2)) {\n let config2 = {\n ...params,\n chain: chain2,\n transport\n };\n const { opts } = config2;\n return createAlchemySmartAccountClient({\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_client4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_middleware2();\n init_esm11();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_esm6();\n init_src();\n init_plugin2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_utils18 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin4();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin4();\n init_utils18();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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(encode7, param) {\n if (!param)\n return \"0x\";\n return encode7(param);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_utils19 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/utils.js\n var SignatureType2, getDefaultWebauthnValidationModuleAddress, getDefaultSingleSignerValidationModuleAddress;\n var init_utils20 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm11();\n (function(SignatureType3) {\n SignatureType3[\"EOA\"] = \"0x00\";\n SignatureType3[\"CONTRACT\"] = \"0x01\";\n })(SignatureType2 || (SignatureType2 = {}));\n getDefaultWebauthnValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n default:\n return \"0x0000000000001D9d34E07D9834274dF9ae575217\";\n }\n };\n getDefaultSingleSignerValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n default:\n return \"0x00000000000099DE0BF6fA90dEB851E2A2df7d83\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_utils20();\n init_utils21();\n singleSignerMessageSigner = (signer, chain2, accountAddress, entityId, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash2;\n switch (request.type) {\n case \"personal_sign\":\n hash2 = hashMessage(request.data);\n break;\n case \"eth_signTypedData_v4\":\n hash2 = 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: hash2\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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Base64.js\n function toBytes3(value) {\n const base64 = value.replace(/=+$/, \"\");\n const size5 = base64.length;\n const decoded = new Uint8Array(size5 + 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 = (size5 >> 2) * 3 + (size5 % 4 && size5 % 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.8.1_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.2/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.2/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_utils();\n init_modular();\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 = Field(p256_CURVE.p);\n Fp384 = Field(p384_CURVE.p);\n Fp521 = Field(p521_CURVE.p);\n p256 = createCurve({ ...p256_CURVE, Fp: Fp256, lowS: false }, sha256);\n p384 = createCurve({ ...p384_CURVE, Fp: Fp384, lowS: false }, sha384);\n p521 = createCurve({ ...p521_CURVE, Fp: Fp521, lowS: false, allowedPrivateKeyLengths: [130, 131, 132] }, sha512);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.2/node_modules/@noble/curves/esm/p256.js\n var p2562;\n var init_p256 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.2/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.8.1_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(fromBytes(bytes.slice(r_start, r_end)));\n const s4 = BigInt(fromBytes(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.8.1_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_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.8.1_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: Array.isArray(credentialId) ? credentialId.map((id) => ({\n id: toBytes3(id),\n type: \"public-key\"\n })) : [\n {\n id: toBytes3(credentialId),\n type: \"public-key\"\n }\n ]\n } : {},\n challenge: fromHex2(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: fromBytes(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.8.1_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_Bytes();\n init_Errors();\n init_Hex();\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 BaseError3 {\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_utils21();\n init_utils20();\n webauthnSigningFunctions = (credential, getFn, rpId, chain2, accountAddress, entityId, deferredActionData) => {\n const { id, publicKey } = credential;\n const sign3 = async ({ hash: hash2 }) => {\n const { metadata, signature } = await sign2({\n credentialId: id,\n getFn,\n challenge: hash2,\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 hash2 = 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: hash2 }),\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 hash2 = 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: hash2 });\n return isDeferredAction ? pack1271Signature({ validationSignature, entityId }) : validationSignature;\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_utils21();\n init_utils20();\n nativeSMASigner = (signer, chain2, accountAddress, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash2;\n switch (request.type) {\n case \"personal_sign\":\n hash2 = 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 hash2 = 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: hash2\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_modularAccountAbi();\n init_utils19();\n init_signer5();\n init_signingMethods();\n init_utils21();\n init_nativeSMASigner();\n executeUserOpSelector = \"0x8DD7712F\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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: custom2(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_utils21 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_esm11();\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 sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n default:\n return \"0x00000000000017c61b5bEe81050EC8eFc9c6fecd\";\n }\n };\n getDefaultSMAV2BytecodeAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n default:\n return \"0x000000000000c5A9089039570Dd36455b5C07383\";\n }\n };\n getDefaultSMAV2StorageAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/utils.js\n function bytesToHex3(bytes) {\n return `0x${bytesToHex2(bytes)}`;\n }\n function hexToBytes3(value) {\n return hexToBytes2(value.slice(2));\n }\n var init_utils22 = __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\" ? hexToBytes3(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(bytesToHex3(x4)),\n y: BigInt(bytesToHex3(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_utils22();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/index.js\n var init_esm12 = __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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_accountFactoryAbi();\n init_utils21();\n init_modularAccountV2Base();\n init_utils21();\n init_predictAddress2();\n init_esm12();\n init_errors8();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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 (isAlchemyTransport(transport, chain2)) {\n return createAlchemySmartAccountClient({\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_client5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm11();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_client3();\n init_multiOwnerAlchemyClient();\n init_lightAccount();\n init_predictAddress();\n init_predictAddress();\n init_utils15();\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_client4();\n init_multiSigAlchemyClient();\n init_errors7();\n init_decorator2();\n init_installPlugin();\n init_extension();\n init_plugin2();\n init_multisig();\n init_utils17();\n init_extension3();\n init_permissions();\n init_plugin4();\n init_signer4();\n init_utils18();\n init_utils16();\n init_modularAccountV2();\n init_client5();\n init_utils21();\n init_predictAddress2();\n init_semiModularAccountBytecodeAbi();\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-helpers/getAlchemyChainConfig.js\n var require_getAlchemyChainConfig = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-helpers/getAlchemyChainConfig.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_esm11(), __toCommonJS(esm_exports));\n function getAlchemyChainConfig(chainId) {\n const chainMap = {\n [1]: infra_1.mainnet,\n [5]: infra_1.goerli,\n [10]: infra_1.optimism,\n [420]: infra_1.optimismGoerli,\n [11155420]: infra_1.optimismSepolia,\n [11155111]: infra_1.sepolia,\n [137]: infra_1.polygon,\n [80001]: infra_1.polygonMumbai,\n [8453]: infra_1.base,\n [84531]: infra_1.baseGoerli,\n [84532]: infra_1.baseSepolia,\n [42161]: infra_1.arbitrum,\n [42170]: infra_1.arbitrumNova,\n [421613]: infra_1.arbitrumGoerli,\n [421614]: infra_1.arbitrumSepolia,\n [1101]: infra_1.polygonAmoy,\n [324]: infra_1.zora,\n // If zora is mainnet\n [999]: infra_1.zoraSepolia,\n // If zoraSepolia is testnet\n [252]: infra_1.fraxtal,\n // Fraxtal mainnet\n [2523]: infra_1.fraxtalSepolia,\n [480]: infra_1.worldChain,\n [4801]: infra_1.worldChainSepolia,\n [360]: infra_1.shape,\n [11011]: infra_1.shapeSepolia,\n [130]: infra_1.unichainMainnet,\n [1301]: infra_1.unichainSepolia,\n [1946]: infra_1.soneiumMinato,\n [1868]: infra_1.soneiumMainnet,\n [204]: infra_1.opbnbMainnet,\n [5611]: infra_1.opbnbTestnet,\n [80084]: infra_1.beraChainBartio,\n [57073]: infra_1.inkMainnet,\n [763373]: infra_1.inkSepolia,\n [7078815900]: infra_1.mekong,\n [10143]: infra_1.monadTestnet,\n [905905]: infra_1.openlootSepolia,\n [685685]: infra_1.gensynTestnet,\n [11155931]: infra_1.riseTestnet,\n [1514]: infra_1.storyMainnet,\n [1315]: infra_1.storyAeneid,\n [44787]: infra_1.celoAlfajores,\n [42220]: infra_1.celoMainnet,\n [10218]: infra_1.teaSepolia\n // Add more mappings as new chains are supported\n };\n if (chainId in chainMap) {\n return chainMap[chainId];\n }\n throw new Error(`Chain ID ${chainId} not supported`);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/sponsoredGas/sponsoredGasContractCall.js\n var require_sponsoredGasContractCall = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/sponsoredGas/sponsoredGasContractCall.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 infra_1 = (init_esm11(), __toCommonJS(esm_exports));\n var litActionSmartSigner_1 = require_litActionSmartSigner();\n var smart_contracts_1 = (init_src(), __toCommonJS(src_exports));\n var getAlchemyChainConfig_1 = require_getAlchemyChainConfig();\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 const litSigner = new litActionSmartSigner_1.LitActionsSmartSigner({\n pkpPublicKey,\n chainId\n });\n const alchemyChain = (0, getAlchemyChainConfig_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(\"Smart account client created\");\n const userOperation = {\n target: contractAddress,\n value: txValue,\n data: encodedData\n };\n console.log(\"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 (e2) {\n console.log(\"Failed to build user operation, error below\");\n console.log(e2);\n console.log(e2.stack);\n return \"\";\n }\n });\n if (uoStructResponse === \"\") {\n throw new Error(\"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(\"User operation built, starting signing...\", uoStruct);\n const signedUserOperation = await smartAccountClient.signUserOperation({\n account: smartAccountClient.account,\n uoStruct\n });\n console.log(\"User operation signed\", signedUserOperation);\n const entryPoint = smartAccountClient.account.getEntryPoint();\n console.log(\"Entry point\", entryPoint);\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(`[@lit-protocol/vincent-tool-morpho/executeOperationWithGasSponsorship] User operation sent`, { userOpHash: userOpResult });\n return userOpResult;\n } catch (e2) {\n console.log(\"Failed to send user operation, error below\");\n console.log(e2);\n console.log(e2.stack);\n return \"\";\n }\n });\n if (uoHash === \"\") {\n throw new Error(\"Failed to send user operation\");\n }\n return uoHash;\n };\n exports3.sponsoredGasContractCall = sponsoredGasContractCall;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-helpers/toEthAddress.js\n var require_toEthAddress = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-helpers/toEthAddress.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toEthAddress = toEthAddress;\n function toEthAddress(pkpPublicKey) {\n if (!pkpPublicKey.startsWith(\"0x\")) {\n pkpPublicKey = `0x${pkpPublicKey}`;\n }\n return ethers.utils.computeAddress(pkpPublicKey);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/nativeSend.js\n var require_nativeSend = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/nativeSend.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.nativeSend = void 0;\n var signTx_1 = require_signTx();\n var sendTx_1 = require_sendTx();\n var toEthAddress_1 = require_toEthAddress();\n var nativeSend = async ({ provider, pkpPublicKey, amount, to }) => {\n const fromAddress = (0, toEthAddress_1.toEthAddress)(pkpPublicKey);\n const recipientAddress = to;\n const nonce = await provider.getTransactionCount(fromAddress);\n const gasLimit = await provider.estimateGas({\n from: fromAddress,\n to: recipientAddress,\n value: ethers.utils.parseEther(amount)\n });\n const gasPrice = await provider.getGasPrice();\n const txAmount = ethers.utils.parseEther(amount);\n const unsignedTx = {\n to: recipientAddress,\n value: txAmount,\n gasLimit,\n gasPrice,\n nonce,\n chainId: (await provider.getNetwork()).chainId\n };\n const signedTxSignature = await (0, signTx_1.signTx)({\n sigName: \"native-send-tx\",\n pkpPublicKey,\n tx: unsignedTx\n });\n const txHash = await (0, sendTx_1.sendTx)(provider, signedTxSignature);\n return txHash;\n };\n exports3.nativeSend = nativeSend;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/getNonce.js\n var require_getNonce = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/getNonce.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getNonce = void 0;\n var getNonce = async ({ address, chain: chain2 }) => {\n return await Lit.Actions.getLatestNonce({\n address,\n chain: chain2\n });\n };\n exports3.getNonce = getNonce;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/index.js\n var require_la_utils = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-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.laUtils = exports3.toEthAddress = exports3.signTx = exports3.sendTx = exports3.getNonce = exports3.nativeSend = exports3.sponsoredGasContractCall = exports3.contractCall = exports3.yellowstoneConfig = void 0;\n var yellowstoneConfig_1 = require_yellowstoneConfig();\n Object.defineProperty(exports3, \"yellowstoneConfig\", { enumerable: true, get: function() {\n return yellowstoneConfig_1.yellowstoneConfig;\n } });\n var contractCall_1 = require_contractCall();\n Object.defineProperty(exports3, \"contractCall\", { enumerable: true, get: function() {\n return contractCall_1.contractCall;\n } });\n var sponsoredGasContractCall_1 = require_sponsoredGasContractCall();\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return sponsoredGasContractCall_1.sponsoredGasContractCall;\n } });\n var getAlchemyChainConfig_1 = require_getAlchemyChainConfig();\n var nativeSend_1 = require_nativeSend();\n Object.defineProperty(exports3, \"nativeSend\", { enumerable: true, get: function() {\n return nativeSend_1.nativeSend;\n } });\n var getNonce_1 = require_getNonce();\n Object.defineProperty(exports3, \"getNonce\", { enumerable: true, get: function() {\n return getNonce_1.getNonce;\n } });\n var sendTx_1 = require_sendTx();\n Object.defineProperty(exports3, \"sendTx\", { enumerable: true, get: function() {\n return sendTx_1.sendTx;\n } });\n var signTx_1 = require_signTx();\n Object.defineProperty(exports3, \"signTx\", { enumerable: true, get: function() {\n return signTx_1.signTx;\n } });\n var toEthAddress_1 = require_toEthAddress();\n Object.defineProperty(exports3, \"toEthAddress\", { enumerable: true, get: function() {\n return toEthAddress_1.toEthAddress;\n } });\n exports3.laUtils = {\n chain: {\n yellowstoneConfig: yellowstoneConfig_1.yellowstoneConfig\n },\n transaction: {\n handler: {\n contractCall: contractCall_1.contractCall,\n sponsoredGasContractCall: sponsoredGasContractCall_1.sponsoredGasContractCall,\n nativeSend: nativeSend_1.nativeSend\n },\n primitive: {\n getNonce: getNonce_1.getNonce,\n sendTx: sendTx_1.sendTx,\n signTx: signTx_1.signTx\n }\n },\n helpers: {\n toEthAddress: toEthAddress_1.toEthAddress,\n getAlchemyChainConfig: getAlchemyChainConfig_1.getAlchemyChainConfig\n }\n };\n exports3.default = exports3.laUtils;\n }\n });\n\n // src/lib/lit-action.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk2 = __toESM(require_src2());\n\n // src/lib/vincent-ability.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk = __toESM(require_src2());\n\n // src/lib/schemas.ts\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n var MorphoOperation = /* @__PURE__ */ ((MorphoOperation2) => {\n MorphoOperation2[\"DEPOSIT\"] = \"deposit\";\n MorphoOperation2[\"WITHDRAW\"] = \"withdraw\";\n MorphoOperation2[\"REDEEM\"] = \"redeem\";\n return MorphoOperation2;\n })(MorphoOperation || {});\n var abilityParamsSchema = external_exports.object({\n operation: external_exports.nativeEnum(MorphoOperation).describe(\"The Morpho Vault operation to perform (deposit, withdraw, redeem)\"),\n vaultAddress: external_exports.string().regex(/^0x[a-fA-F0-9]{40}$/, \"Invalid vault address\").describe(\"The address of the Morpho Vault contract\"),\n amount: external_exports.string().regex(/^\\d*\\.?\\d+$/, \"Invalid amount format\").refine((val) => parseFloat(val) > 0, \"Amount must be greater than 0\").describe(\"The amount of tokens to deposit/withdraw/redeem, as a string\"),\n onBehalfOf: external_exports.string().regex(/^0x[a-fA-F0-9]{40}$/, \"Invalid address\").optional().describe(\"The address that will receive the vault shares (optional)\"),\n chain: external_exports.string().describe(\"The blockchain network where the vault is deployed\"),\n rpcUrl: external_exports.string().optional().describe(\"Custom RPC URL (optional, uses default if not provided)\"),\n // Gas sponsorship parameters for EIP-7702\n alchemyGasSponsor: external_exports.boolean().optional().default(false).describe(\"Whether to use Alchemy's gas sponsorship (EIP-7702)\"),\n alchemyGasSponsorApiKey: external_exports.string().optional().describe(\"Alchemy API key for gas sponsorship (required if alchemyGasSponsor is true)\"),\n alchemyGasSponsorPolicyId: external_exports.string().optional().describe(\"Alchemy gas policy ID for sponsorship (required if alchemyGasSponsor is true)\")\n });\n var precheckSuccessSchema = external_exports.object({\n operationValid: external_exports.boolean().describe(\"Whether the requested operation is valid\"),\n vaultValid: external_exports.boolean().describe(\"Whether the specified vault address is valid\"),\n amountValid: external_exports.boolean().describe(\"Whether the specified amount is valid\"),\n userBalance: external_exports.string().optional().describe(\"The user's current balance of the underlying asset\"),\n allowance: external_exports.string().optional().describe(\"The current allowance approved for the vault contract\"),\n vaultShares: external_exports.string().optional().describe(\"The user's current balance of vault shares\"),\n estimatedGas: external_exports.number().optional().describe(\"Estimated gas cost for the operation\")\n });\n var precheckFailSchema = external_exports.object({\n error: external_exports.string().describe(\"A string containing the error message if the precheck failed.\")\n });\n var executeSuccessSchema = external_exports.object({\n txHash: external_exports.string().describe(\"The transaction hash of the executed operation\"),\n operation: external_exports.nativeEnum(MorphoOperation).describe(\"The type of Morpho operation that was executed\"),\n vaultAddress: external_exports.string().describe(\"The address of the vault involved in the operation\"),\n amount: external_exports.string().describe(\"The amount of tokens involved in the operation\"),\n timestamp: external_exports.number().describe(\"The Unix timestamp when the operation was executed\")\n });\n var executeFailSchema = external_exports.object({\n error: external_exports.string().describe(\"A string containing the error message if the execution failed.\")\n });\n\n // src/lib/helpers/index.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_scaffold_sdk = __toESM(require_la_utils());\n var import_ethers = __toESM(require_lib32());\n var CHAIN_IDS = {\n ethereum: 1,\n base: 8453,\n arbitrum: 42161,\n optimism: 10,\n polygon: 137,\n sepolia: 11155111\n };\n var ERC4626_VAULT_ABI = [\n // Deposit\n {\n inputs: [\n { internalType: \"uint256\", name: \"assets\", type: \"uint256\" },\n { internalType: \"address\", name: \"receiver\", type: \"address\" }\n ],\n name: \"deposit\",\n outputs: [{ internalType: \"uint256\", name: \"shares\", type: \"uint256\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n // Withdraw\n {\n inputs: [\n { internalType: \"uint256\", name: \"assets\", type: \"uint256\" },\n { internalType: \"address\", name: \"receiver\", type: \"address\" },\n { internalType: \"address\", name: \"owner\", type: \"address\" }\n ],\n name: \"withdraw\",\n outputs: [{ internalType: \"uint256\", name: \"shares\", type: \"uint256\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n // Redeem\n {\n inputs: [\n { internalType: \"uint256\", name: \"shares\", type: \"uint256\" },\n { internalType: \"address\", name: \"receiver\", type: \"address\" },\n { internalType: \"address\", name: \"owner\", type: \"address\" }\n ],\n name: \"redeem\",\n outputs: [{ internalType: \"uint256\", name: \"assets\", type: \"uint256\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n // Asset (underlying token address)\n {\n inputs: [],\n name: \"asset\",\n outputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n // Balance of shares\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 // Convert assets to shares\n {\n inputs: [{ internalType: \"uint256\", name: \"assets\", type: \"uint256\" }],\n name: \"convertToShares\",\n outputs: [{ internalType: \"uint256\", name: \"shares\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n // Convert shares to assets\n {\n inputs: [{ internalType: \"uint256\", name: \"shares\", type: \"uint256\" }],\n name: \"convertToAssets\",\n outputs: [{ internalType: \"uint256\", name: \"assets\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n // Total assets managed by the vault\n {\n inputs: [],\n name: \"totalAssets\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\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 var ERC20_ABI = [\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: \"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: \"amount\", type: \"uint256\" }\n ],\n name: \"approve\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\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 function isValidAddress(address) {\n return /^0x[a-fA-F0-9]{40}$/.test(address);\n }\n function parseAmount(amount, decimals = 18) {\n return import_ethers.ethers.utils.parseUnits(amount, decimals).toString();\n }\n async function validateOperationRequirements(operation, userBalance, allowance, vaultShares, convertedAmount) {\n const userBalanceBN = BigInt(userBalance);\n const allowanceBN = BigInt(allowance);\n const vaultSharesBN = BigInt(vaultShares);\n const convertedAmountBN = BigInt(convertedAmount);\n switch (operation) {\n case \"deposit\":\n if (userBalanceBN < convertedAmountBN) {\n return {\n valid: false,\n error: `Insufficient balance for deposit operation. You have ${userBalance} and need ${convertedAmount}`\n };\n }\n if (allowanceBN < convertedAmountBN) {\n return {\n valid: false,\n error: `Insufficient allowance for deposit operation. Please approve vault to spend your tokens first. You have ${allowance} and need ${convertedAmount}`\n };\n }\n break;\n case \"withdraw\":\n if (vaultSharesBN === 0n) {\n return {\n valid: false,\n error: \"No vault shares available for withdrawal\"\n };\n }\n break;\n case \"redeem\":\n if (vaultSharesBN === 0n) {\n return {\n valid: false,\n error: \"No vault shares available for redeem\"\n };\n }\n if (vaultSharesBN < convertedAmountBN) {\n return {\n valid: false,\n error: `Insufficient vault shares for redeem operation. You have ${vaultShares} shares and need ${convertedAmount} shares`\n };\n }\n break;\n default:\n return { valid: false, error: `Unsupported operation: ${operation}` };\n }\n return { valid: true };\n }\n var MorphoVaultClient = class {\n apiUrl = \"https://blue-api.morpho.org/graphql\";\n /**\n * Fetch vault data from Morpho GraphQL API\n */\n async fetchVaultData(query, variables) {\n try {\n const response = await fetch(this.apiUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n query,\n variables\n })\n });\n if (!response.ok) {\n const body = await response.text();\n throw new Error(`HTTP error! status: ${response.status} and body: ${body}`);\n }\n const data = await response.json();\n if (data.errors) {\n throw new Error(`GraphQL error: ${data.errors.map((e2) => e2.message).join(\", \")}`);\n }\n return data.data;\n } catch (error) {\n console.error(\"Failed to fetch vault data:\", error);\n throw error;\n }\n }\n /**\n * Get all vaults with comprehensive information\n * Now uses proper server-side filtering via GraphQL VaultFilters\n */\n async getAllVaults(options = {}) {\n const whereClause = this.buildVaultFilters(options);\n const query = `\n query GetAllVaults($first: Int, $orderBy: VaultOrderBy, $orderDirection: OrderDirection, $where: VaultFilters) {\n vaults(first: $first, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) {\n items {\n address\n name\n symbol\n whitelisted\n creationTimestamp\n asset {\n address\n symbol\n name\n decimals\n }\n chain {\n id\n network\n }\n state {\n apy\n netApy\n totalAssets\n totalAssetsUsd\n fee\n rewards {\n asset {\n address\n symbol\n }\n supplyApr\n yearlySupplyTokens\n }\n }\n }\n }\n }\n `;\n const calculateFetchLimit = (requestedLimit) => {\n if (!requestedLimit)\n return 100;\n const cappedLimit = Math.min(requestedLimit, 1e3);\n if (options.excludeIdle) {\n return Math.max(cappedLimit, 1e3);\n }\n return cappedLimit;\n };\n const fetchLimit = calculateFetchLimit(options.limit);\n const variables = {\n first: fetchLimit,\n orderBy: this.mapSortBy(options.sortBy || \"totalAssetsUsd\"),\n orderDirection: options.sortOrder === \"asc\" ? \"Asc\" : \"Desc\",\n where: whereClause\n };\n const data = await this.fetchVaultData(query, variables);\n const vaults = data.vaults.items.map((vault) => this.mapVaultData(vault));\n const filtered = this.applyRemainingClientFilters(vaults, options);\n const finalResults = options.limit ? filtered.slice(0, options.limit) : filtered;\n if (options.limit && options.limit > 1e3 && finalResults.length < options.limit) {\n console.warn(\n `Warning: Requested ${options.limit} vaults but GraphQL API limit is 1000. Got ${finalResults.length} results.`\n );\n }\n return finalResults;\n }\n /**\n * Unified function to get vaults with flexible filtering\n * Supports filtering by asset, chain, and all other options\n */\n async getVaults(options = {}) {\n const enhancedOptions = { ...options };\n if (options.chainId) {\n enhancedOptions.chain = options.chainId;\n }\n return this.getAllVaults(enhancedOptions);\n }\n /**\n * Get top vaults by APY\n */\n async getTopVaultsByNetApy(limit = 10, minTvl = 0) {\n return this.getAllVaults({\n sortBy: \"netApy\",\n sortOrder: \"desc\",\n limit,\n minTvl,\n excludeIdle: true\n });\n }\n /**\n * Get top vaults by TVL\n */\n async getTopVaultsByTvl(limit = 10) {\n return this.getAllVaults({\n sortBy: \"totalAssetsUsd\",\n sortOrder: \"desc\",\n limit,\n excludeIdle: true\n });\n }\n /**\n * Search vaults by name, symbol, or asset\n */\n async searchVaults(searchOptions) {\n const allVaults = await this.getAllVaults({ limit: 500 });\n if (!searchOptions.query) {\n return allVaults.slice(0, searchOptions.limit || 50);\n }\n const query = searchOptions.query.toLowerCase();\n const filtered = allVaults.filter(\n (vault) => vault.name.toLowerCase().includes(query) || vault.symbol.toLowerCase().includes(query) || vault.asset.symbol.toLowerCase().includes(query) || vault.asset.name.toLowerCase().includes(query)\n );\n return filtered.slice(0, searchOptions.limit || 50);\n }\n /**\n * Get vault details by address\n */\n async getVaultByAddress(address, chainId) {\n const query = `\n query GetVaultByAddress($address: String!, $chainId: Int!) {\n vaultByAddress(address: $address, chainId: $chainId) {\n address\n name\n symbol\n whitelisted\n creationTimestamp\n asset {\n address\n symbol\n name\n decimals\n }\n chain {\n id\n network\n }\n state {\n apy\n netApy\n totalAssets\n totalAssetsUsd\n fee\n rewards {\n asset {\n address\n symbol\n }\n supplyApr\n yearlySupplyTokens\n }\n }\n }\n }\n `;\n const variables = { address, chainId };\n try {\n const data = await this.fetchVaultData(query, variables);\n return data.vaultByAddress ? this.mapVaultData(data.vaultByAddress) : null;\n } catch (error) {\n console.error(`Failed to fetch vault ${address}:`, error);\n return null;\n }\n }\n /**\n * Get best vaults for a specific asset\n */\n async getBestVaultsForAsset(assetSymbol, limit = 5) {\n const vaults = await this.getAllVaults({\n sortBy: \"netApy\",\n sortOrder: \"desc\",\n limit: 100,\n minTvl: 1e4,\n // Minimum $10k TVL\n excludeIdle: true\n });\n return vaults.filter((vault) => vault.asset.symbol.toLowerCase() === assetSymbol.toLowerCase()).slice(0, limit);\n }\n /**\n * Map vault data from GraphQL response\n */\n mapVaultData(vault) {\n return {\n address: vault.address,\n name: vault.name,\n symbol: vault.symbol,\n asset: {\n address: vault.asset.address,\n symbol: vault.asset.symbol,\n name: vault.asset.name,\n decimals: vault.asset.decimals\n },\n chain: {\n id: vault.chain.id,\n network: vault.chain.network\n },\n metrics: {\n apy: vault.state.apy || 0,\n netApy: vault.state.netApy || 0,\n totalAssets: vault.state.totalAssets || \"0\",\n totalAssetsUsd: vault.state.totalAssetsUsd || 0,\n fee: vault.state.fee || 0,\n rewards: vault.state.rewards?.map((reward) => ({\n asset: reward.asset.address,\n supplyApr: reward.supplyApr,\n yearlySupplyTokens: reward.yearlySupplyTokens\n })) || []\n },\n whitelisted: vault.whitelisted,\n creationTimestamp: vault.creationTimestamp,\n isIdle: vault.state.totalAssetsUsd < 100\n // Consider vaults with < $100 TVL as idle\n };\n }\n /**\n * Build GraphQL VaultFilters from filter options\n * Uses proper server-side filtering for better performance\n */\n buildVaultFilters(options) {\n const filters = {};\n if (options.chain !== void 0 || options.chainId !== void 0) {\n let targetChainId;\n if (options.chainId !== void 0) {\n targetChainId = options.chainId;\n } else if (options.chain !== void 0) {\n targetChainId = typeof options.chain === \"string\" ? CHAIN_IDS[options.chain] : options.chain;\n }\n if (targetChainId !== void 0) {\n filters.chainId_in = [targetChainId];\n }\n }\n if (options.assetAddress) {\n filters.assetAddress_in = [options.assetAddress.toLowerCase()];\n }\n if (options.assetSymbol) {\n filters.assetSymbol_in = [options.assetSymbol.toUpperCase()];\n }\n if (options.whitelistedOnly) {\n filters.whitelisted = true;\n }\n if (options.minNetApy !== void 0) {\n filters.netApy_gte = options.minNetApy;\n }\n if (options.maxNetApy !== void 0) {\n filters.netApy_lte = options.maxNetApy;\n }\n if (options.minTvl !== void 0) {\n filters.totalAssetsUsd_gte = options.minTvl;\n }\n if (options.maxTvl !== void 0) {\n filters.totalAssetsUsd_lte = options.maxTvl;\n }\n if (options.minTotalAssets !== void 0) {\n filters.totalAssets_gte = options.minTotalAssets.toString();\n }\n if (options.maxTotalAssets !== void 0) {\n filters.totalAssets_lte = options.maxTotalAssets.toString();\n }\n return Object.keys(filters).length > 0 ? filters : null;\n }\n /**\n * Apply remaining client-side filters not supported by GraphQL\n * Only handles computed properties like isIdle\n */\n applyRemainingClientFilters(vaults, options) {\n let filtered = vaults;\n if (options.excludeIdle) {\n filtered = filtered.filter((vault) => !vault.isIdle);\n }\n return filtered;\n }\n /**\n * Map sortBy option to GraphQL enum\n */\n mapSortBy(sortBy) {\n switch (sortBy) {\n case \"netApy\":\n return \"NetApy\";\n case \"totalAssets\":\n return \"TotalAssets\";\n case \"totalAssetsUsd\":\n return \"TotalAssetsUsd\";\n case \"creationTimestamp\":\n return \"CreationTimestamp\";\n default:\n return \"TotalAssetsUsd\";\n }\n }\n };\n var morphoVaultClient = new MorphoVaultClient();\n async function executeMorphoOperation({\n provider,\n pkpPublicKey,\n vaultAddress,\n functionName,\n args,\n chainId,\n alchemyGasSponsor,\n alchemyGasSponsorApiKey,\n alchemyGasSponsorPolicyId\n }) {\n console.log(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoOperation] Starting ${functionName} operation`,\n { sponsored: !!alchemyGasSponsor }\n );\n if (alchemyGasSponsor && alchemyGasSponsorApiKey && alchemyGasSponsorPolicyId) {\n console.log(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoOperation] Using EIP-7702 gas sponsorship`,\n { vaultAddress, functionName, args, policyId: alchemyGasSponsorPolicyId }\n );\n try {\n return await import_vincent_scaffold_sdk.laUtils.transaction.handler.sponsoredGasContractCall({\n pkpPublicKey,\n abi: ERC4626_VAULT_ABI,\n contractAddress: vaultAddress,\n functionName,\n args,\n chainId,\n eip7702AlchemyApiKey: alchemyGasSponsorApiKey,\n eip7702AlchemyPolicyId: alchemyGasSponsorPolicyId\n });\n } catch (error) {\n console.error(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoOperation] EIP-7702 operation failed:`,\n error\n );\n throw error;\n }\n } else {\n console.log(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoOperation] Using regular transaction`\n );\n if (!provider) {\n throw new Error(\"Provider is required for non-sponsored transactions\");\n }\n try {\n return await import_vincent_scaffold_sdk.laUtils.transaction.handler.contractCall({\n provider,\n pkpPublicKey,\n callerAddress: import_ethers.ethers.utils.computeAddress(pkpPublicKey),\n abi: ERC4626_VAULT_ABI,\n contractAddress: vaultAddress,\n functionName,\n args,\n chainId\n });\n } catch (error) {\n console.error(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoOperation] Regular transaction failed:`,\n error\n );\n throw error;\n }\n }\n }\n\n // src/lib/vincent-ability.ts\n var import_ethers2 = __toESM(require_lib32());\n var vincentAbility = (0, import_vincent_ability_sdk.createVincentAbility)({\n packageName: \"@lit-protocol/vincent-ability-morpho\",\n abilityDescription: \"Withdraw, deposit, or redeem from a Morpho Vault.\",\n abilityParamsSchema,\n supportedPolicies: (0, import_vincent_ability_sdk.supportedPoliciesForAbility)([]),\n precheckSuccessSchema,\n precheckFailSchema,\n executeSuccessSchema,\n executeFailSchema,\n precheck: async ({ abilityParams: abilityParams2 }, { succeed, fail, delegation: { delegatorPkpInfo } }) => {\n try {\n console.log(\"[@lit-protocol/vincent-ability-morpho/precheck]\");\n console.log(\"[@lit-protocol/vincent-ability-morpho/precheck] params:\", {\n abilityParams: abilityParams2\n });\n const { operation, vaultAddress, amount, onBehalfOf, rpcUrl } = abilityParams2;\n if (!Object.values(MorphoOperation).includes(operation)) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/precheck] Invalid operation. Must be deposit, withdraw, or redeem\"\n });\n }\n if (!isValidAddress(vaultAddress)) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/precheck] Invalid vault address format\"\n });\n }\n if (!amount || isNaN(parseFloat(amount)) || parseFloat(amount) <= 0) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/precheck] Invalid amount format or amount must be greater than 0\"\n });\n }\n console.log(\n \"[@lit-protocol/vincent-ability-morpho/precheck] Starting enhanced validation...\"\n );\n if (!rpcUrl) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/precheck] RPC URL is required for precheck\"\n });\n }\n let provider;\n try {\n provider = new import_ethers2.ethers.providers.JsonRpcProvider(rpcUrl);\n } catch (error) {\n return fail({\n error: `[@lit-protocol/vincent-ability-morpho/precheck] Unable to obtain blockchain provider: ${error instanceof Error ? error.message : String(error)}`\n });\n }\n const pkpAddress = delegatorPkpInfo.ethAddress;\n let vaultAssetAddress;\n let assetDecimals;\n let userBalance = \"0\";\n let allowance = \"0\";\n let vaultShares = \"0\";\n try {\n const vaultContract = new import_ethers2.ethers.Contract(vaultAddress, ERC4626_VAULT_ABI, provider);\n vaultAssetAddress = await vaultContract.asset();\n vaultShares = (await vaultContract.balanceOf(pkpAddress)).toString();\n const assetContract = new import_ethers2.ethers.Contract(vaultAssetAddress, ERC20_ABI, provider);\n userBalance = (await assetContract.balanceOf(pkpAddress)).toString();\n allowance = (await assetContract.allowance(pkpAddress, vaultAddress)).toString();\n if (operation === \"redeem\" /* REDEEM */) {\n assetDecimals = await vaultContract.decimals();\n } else {\n assetDecimals = await assetContract.decimals();\n }\n } catch (error) {\n return fail({\n error: `[@lit-protocol/vincent-ability-morpho/precheck] Invalid vault address or vault not found on network: ${error}`\n });\n }\n const convertedAmount = parseAmount(amount, assetDecimals);\n const operationChecks = await validateOperationRequirements(\n operation,\n userBalance,\n allowance,\n vaultShares,\n convertedAmount\n );\n if (!operationChecks.valid) {\n return fail({\n error: `[@lit-protocol/vincent-ability-morpho/precheck] ${operationChecks.error}`\n });\n }\n let estimatedGas = 0;\n try {\n const vaultContract = new import_ethers2.ethers.Contract(vaultAddress, ERC4626_VAULT_ABI, provider);\n const targetAddress = onBehalfOf || pkpAddress;\n switch (operation) {\n case \"deposit\" /* DEPOSIT */:\n estimatedGas = (await vaultContract.estimateGas.deposit(convertedAmount, targetAddress, {\n from: pkpAddress\n })).toNumber();\n break;\n case \"withdraw\" /* WITHDRAW */:\n estimatedGas = (await vaultContract.estimateGas.withdraw(convertedAmount, pkpAddress, pkpAddress, {\n from: pkpAddress\n })).toNumber();\n break;\n case \"redeem\" /* REDEEM */:\n estimatedGas = (await vaultContract.estimateGas.redeem(convertedAmount, pkpAddress, pkpAddress, {\n from: pkpAddress\n })).toNumber();\n break;\n }\n } catch (error) {\n console.warn(\n \"[@lit-protocol/vincent-ability-morpho/precheck] Gas estimation failed:\",\n error\n );\n return fail({\n error: `[@lit-protocol/vincent-ability-morpho/precheck] Gas estimation failed: ${error instanceof Error ? error.message : String(error)}`\n });\n }\n const successResult = {\n operationValid: true,\n vaultValid: true,\n amountValid: true,\n userBalance,\n allowance,\n vaultShares,\n estimatedGas\n };\n console.log(\n \"[@lit-protocol/vincent-ability-morpho/precheck] Enhanced validation successful:\",\n successResult\n );\n return succeed(successResult);\n } catch (error) {\n console.error(\"[@lit-protocol/vincent-ability-morpho/precheck] Error:\", error);\n return fail({\n error: `[@lit-protocol/vincent-ability-morpho/precheck] Validation failed: ${error instanceof Error ? error.message : \"Unknown error\"}`\n });\n }\n },\n execute: async ({ abilityParams: abilityParams2 }, { succeed, fail, delegation }) => {\n try {\n const {\n operation,\n vaultAddress,\n amount,\n onBehalfOf,\n chain: chain2,\n rpcUrl,\n alchemyGasSponsor,\n alchemyGasSponsorApiKey,\n alchemyGasSponsorPolicyId\n } = abilityParams2;\n console.log(\"[@lit-protocol/vincent-ability-morpho/execute] Executing Morpho Ability\", {\n operation,\n vaultAddress,\n amount,\n chain: chain2\n });\n if (rpcUrl) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/execute] RPC URL is not permitted for execute. Use the `chain` parameter, and the Lit Nodes will provide the RPC URL for you with the Lit.Actions.getRpcUrl() function\"\n });\n }\n if (alchemyGasSponsor && (!alchemyGasSponsorApiKey || !alchemyGasSponsorPolicyId)) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/execute] Alchemy gas sponsor is enabled, but missing Alchemy API key or policy ID\"\n });\n }\n let provider;\n try {\n provider = new import_ethers2.ethers.providers.JsonRpcProvider(await Lit.Actions.getRpcUrl({ chain: chain2 }));\n } catch (error) {\n console.error(\"[@lit-protocol/vincent-ability-morpho/execute] Provider error:\", error);\n throw new Error(\"Unable to obtain blockchain provider for Morpho operations\");\n }\n const { chainId } = await provider.getNetwork();\n const vaultContract = new import_ethers2.ethers.Contract(vaultAddress, ERC4626_VAULT_ABI, provider);\n const vaultAssetAddress = await vaultContract.asset();\n const assetContract = new import_ethers2.ethers.Contract(vaultAssetAddress, ERC20_ABI, provider);\n let assetDecimals;\n if (operation === \"redeem\" /* REDEEM */) {\n assetDecimals = await vaultContract.decimals();\n } else {\n assetDecimals = await assetContract.decimals();\n }\n console.log(\"[@lit-protocol/vincent-ability-morpho/execute] Asset decimals:\", assetDecimals);\n const convertedAmount = parseAmount(amount, assetDecimals);\n console.log(\n \"[@lit-protocol/vincent-ability-morpho/execute] Converted amount:\",\n convertedAmount\n );\n const pkpPublicKey = delegation.delegatorPkpInfo.publicKey;\n if (!pkpPublicKey) {\n throw new Error(\"PKP public key not available from delegation context\");\n }\n const pkpAddress = import_ethers2.ethers.utils.computeAddress(pkpPublicKey);\n console.log(\"[@lit-protocol/vincent-ability-morpho/execute] PKP Address:\", pkpAddress);\n let functionName;\n let args;\n switch (operation) {\n case \"deposit\" /* DEPOSIT */:\n functionName = \"deposit\";\n args = [convertedAmount, onBehalfOf || pkpAddress];\n break;\n case \"withdraw\" /* WITHDRAW */:\n functionName = \"withdraw\";\n args = [convertedAmount, pkpAddress, pkpAddress];\n break;\n case \"redeem\" /* REDEEM */:\n functionName = \"redeem\";\n args = [convertedAmount, pkpAddress, pkpAddress];\n break;\n default:\n throw new Error(`Unsupported operation: ${operation}`);\n }\n const txHash = await executeMorphoOperation({\n provider,\n pkpPublicKey,\n vaultAddress,\n functionName,\n args,\n chainId,\n alchemyGasSponsor,\n alchemyGasSponsorApiKey,\n alchemyGasSponsorPolicyId\n });\n console.log(\"[@lit-protocol/vincent-ability-morpho/execute] Morpho operation successful\", {\n txHash,\n operation,\n vaultAddress,\n amount\n });\n return succeed({\n txHash,\n operation,\n vaultAddress,\n amount,\n timestamp: Date.now()\n });\n } catch (error) {\n console.error(\n \"[@lit-protocol/vincent-ability-morpho/execute] Morpho operation failed\",\n error\n );\n return fail({\n error: error instanceof Error ? error.message : \"Unknown error occurred\"\n });\n }\n }\n });\n\n // src/lib/lit-action.ts\n (async () => {\n const func = (0, import_vincent_ability_sdk2.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/esm/utils.js:\n (*! noble-hashes - 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\nalchemy-sdk/dist/esm/index-f73a5f29.js:\n (*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n \n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n \n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** *)\n\njs-cookie/dist/js.cookie.mjs:\n (*! js-cookie v3.0.1 | MIT *)\n\n@segment/analytics-next/dist/pkg/vendor/tsub/tsub.js:\n (*! For license information please see tsub.js.LICENSE.txt *)\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"; +const code = "\"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, mod2) => function __require() {\n return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;\n };\n var __export = (target, all3) => {\n for (var name in all3)\n __defProp(target, name, { get: all3[name], enumerable: true });\n };\n var __copyProps = (to, from5, except, desc) => {\n if (from5 && typeof from5 === \"object\" || typeof from5 === \"function\") {\n for (let key of __getOwnPropNames(from5))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from5[key], enumerable: !(desc = __getOwnPropDesc(from5, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __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 || !mod2 || !mod2.__esModule ? __defProp(target, \"default\", { value: mod2, enumerable: true }) : target,\n mod2\n ));\n var __toCommonJS = (mod2) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod2);\n\n // ../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js\n var init_dirname = __esm({\n \"../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/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, array) {\n this.fun = fun;\n this.array = array;\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/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/esbuild-plugin-polyfill-node/polyfills/process.js\n var init_process2 = __esm({\n \"../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/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, isLE2, mLen, nBytes) {\n var e2, 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 = isLE2 ? nBytes - 1 : 0;\n var d5 = isLE2 ? -1 : 1;\n var s4 = buffer2[offset + i3];\n i3 += d5;\n e2 = s4 & (1 << -nBits) - 1;\n s4 >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e2 = e2 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n m2 = e2 & (1 << -nBits) - 1;\n e2 >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n if (e2 === 0) {\n e2 = 1 - eBias;\n } else if (e2 === eMax) {\n return m2 ? NaN : (s4 ? -1 : 1) * Infinity;\n } else {\n m2 = m2 + Math.pow(2, mLen);\n e2 = e2 - eBias;\n }\n return (s4 ? -1 : 1) * m2 * Math.pow(2, e2 - mLen);\n };\n exports$1.write = function(buffer2, value, offset, isLE2, mLen, nBytes) {\n var e2, 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 = isLE2 ? 0 : nBytes - 1;\n var d5 = isLE2 ? 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 e2 = eMax;\n } else {\n e2 = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c4 = Math.pow(2, -e2)) < 1) {\n e2--;\n c4 *= 2;\n }\n if (e2 + eBias >= 1) {\n value += rt / c4;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c4 >= 2) {\n e2++;\n c4 /= 2;\n }\n if (e2 + eBias >= eMax) {\n m2 = 0;\n e2 = eMax;\n } else if (e2 + eBias >= 1) {\n m2 = (value * c4 - 1) * Math.pow(2, mLen);\n e2 = e2 + eBias;\n } else {\n m2 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e2 = 0;\n }\n }\n for (; mLen >= 8; buffer2[offset + i3] = m2 & 255, i3 += d5, m2 /= 256, mLen -= 8) {\n }\n e2 = e2 << mLen | m2;\n eLen += mLen;\n for (; eLen > 0; buffer2[offset + i3] = e2 & 255, i3 += d5, e2 /= 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 (e2) {\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(length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n }\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function Buffer3(arg, encodingOrOffset, length) {\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 from5(arg, encodingOrOffset, length);\n }\n Buffer3.poolSize = 8192;\n function from5(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return fromString3(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, length);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length);\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, length);\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, length);\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, length) {\n return from5(value, encodingOrOffset, length);\n };\n Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer3, Uint8Array);\n function assertSize4(size5) {\n if (typeof size5 !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size5 < 0) {\n throw new RangeError('The value \"' + size5 + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size5, fill, encoding) {\n assertSize4(size5);\n if (size5 <= 0) {\n return createBuffer(size5);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size5).fill(fill, encoding) : createBuffer(size5).fill(fill);\n }\n return createBuffer(size5);\n }\n Buffer3.alloc = function(size5, fill, encoding) {\n return alloc(size5, fill, encoding);\n };\n function allocUnsafe(size5) {\n assertSize4(size5);\n return createBuffer(size5 < 0 ? 0 : checked(size5) | 0);\n }\n Buffer3.allocUnsafe = function(size5) {\n return allocUnsafe(size5);\n };\n Buffer3.allocUnsafeSlow = function(size5) {\n return allocUnsafe(size5);\n };\n function fromString3(string, 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 length = byteLength(string, encoding) | 0;\n let buf = createBuffer(length);\n const actual = buf.write(string, encoding);\n if (actual !== length) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0;\n const buf = createBuffer(length);\n for (let i3 = 0; i3 < length; i3 += 1) {\n buf[i3] = array[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(array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n let buf;\n if (byteOffset === void 0 && length === void 0) {\n buf = new Uint8Array(array);\n } else if (length === void 0) {\n buf = new Uint8Array(array, byteOffset);\n } else {\n buf = new Uint8Array(array, byteOffset, length);\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(length) {\n if (length >= 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 length | 0;\n }\n function SlowBuffer(length) {\n if (+length != length) {\n length = 0;\n }\n return Buffer3.alloc(+length);\n }\n Buffer3.isBuffer = function isBuffer2(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, length) {\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 (length === void 0) {\n length = 0;\n for (i3 = 0; i3 < list.length; ++i3) {\n length += list[i3].length;\n }\n }\n const buffer2 = Buffer3.allocUnsafe(length);\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(string, encoding) {\n if (Buffer3.isBuffer(string)) {\n return string.length;\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength;\n }\n if (typeof string !== \"string\") {\n throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);\n }\n const len = string.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 utf8ToBytes2(string).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(string).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes2(string).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 toString3() {\n const length = this.length;\n if (length === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length);\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, string, offset, length) {\n offset = Number(offset) || 0;\n const remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n const strLen = string.length;\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n let i3;\n for (i3 = 0; i3 < length; ++i3) {\n const parsed = parseInt(string.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, string, offset, length) {\n return blitBuffer(utf8ToBytes2(string, buf.length - offset), buf, offset, length);\n }\n function asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n }\n function base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n }\n function ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n }\n Buffer3.prototype.write = function write(string, offset, length, encoding) {\n if (offset === void 0) {\n encoding = \"utf8\";\n length = this.length;\n offset = 0;\n } else if (length === void 0 && typeof offset === \"string\") {\n encoding = offset;\n length = this.length;\n offset = 0;\n } else if (isFinite(offset)) {\n offset = offset >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length;\n length = 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 (length === void 0 || length > remaining)\n length = remaining;\n if (string.length > 0 && (length < 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, string, offset, length);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string, offset, length);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string, offset, length);\n case \"base64\":\n return base64Write(this, string, offset, length);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string, offset, length);\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 toJSON2() {\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 slice3(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, length) {\n if (offset % 1 !== 0 || offset < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset + ext > length)\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, length, 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 (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n }\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", `>= ${0} and <= ${length}`, 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 utf8ToBytes2(string, units) {\n units = units || Infinity;\n let codePoint;\n const length = string.length;\n let leadSurrogate = null;\n const bytes = [];\n for (let i3 = 0; i3 < length; ++i3) {\n codePoint = string.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 === length) {\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, length) {\n let i3;\n for (i3 = 0; i3 < length; ++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/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/esbuild-plugin-polyfill-node/polyfills/buffer.js\n var init_buffer2 = __esm({\n \"../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/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(e2) {\n return obj[e2];\n });\n };\n util3.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, 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(array, separator = \" | \") {\n return array.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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\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 = __importDefault2(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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\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 = __importDefault2(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 } = 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 };\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 };\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(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description\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 regex = `${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 regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n }\n function isValidIP2(ip, version8) {\n if ((version8 === \"v4\" || !version8) && ipv4Regex2.test(ip)) {\n return true;\n }\n if ((version8 === \"v6\" || !version8) && 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, version8) {\n if ((version8 === \"v4\" || !version8) && ipv4CidrRegex2.test(ip)) {\n return true;\n }\n if ((version8 === \"v6\" || !version8) && 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 regex = datetimeRegex2(check);\n if (!regex.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 regex = dateRegex2;\n if (!regex.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 regex = timeRegex2(check);\n if (!regex.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(regex, validation, message) {\n return this.refinement((data) => regex.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(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex,\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(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\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(minLength, message) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength, 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 shape2 = this._def.shape();\n const keys = util_js_1.util.objectKeys(shape2);\n this._cached = { shape: shape2, 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: shape2, 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 = shape2[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 shape2 = {};\n for (const key of util_js_1.util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape2[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape2\n });\n }\n omit(mask) {\n const shape2 = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape2[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape2\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 = (shape2, params) => {\n return new ZodObject2({\n shape: () => shape2,\n unknownKeys: \"strip\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.strictCreate = (shape2, params) => {\n return new ZodObject2({\n shape: () => shape2,\n unknownKeys: \"strict\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.lazycreate = (shape2, params) => {\n return new ZodObject2({\n shape: shape2,\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(size5, message) {\n return this.min(size5, message).max(size5, 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((e2) => {\n error.addIssue(makeArgsIssue(args, e2));\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((e2) => {\n error.addIssue(makeReturnsIssue(result, e2));\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 base3 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!(0, parseUtil_js_1.isValid)(base3))\n return parseUtil_js_1.INVALID;\n const result = effect.transform(base3.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((base3) => {\n if (!(0, parseUtil_js_1.isValid)(base3))\n return parseUtil_js_1.INVALID;\n return Promise.resolve(effect.transform(base3.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 __createBinding2 = 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 __exportStar2 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding2(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n __exportStar2(require_errors(), exports3);\n __exportStar2(require_parseUtil(), exports3);\n __exportStar2(require_typeAliases(), exports3);\n __exportStar2(require_util(), exports3);\n __exportStar2(require_types(), exports3);\n __exportStar2(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 __createBinding2 = 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 __setModuleDefault2 = 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 __importStar2 = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 in mod2)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod2, k4))\n __createBinding2(result, mod2, k4);\n }\n __setModuleDefault2(result, mod2);\n return result;\n };\n var __exportStar2 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding2(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.z = void 0;\n var z2 = __importStar2(require_external());\n exports3.z = z2;\n __exportStar2(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 __createBinding2 = 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 __exportStar2 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding2(exports4, m2, p4);\n };\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var index_js_1 = __importDefault2(require_v3());\n __exportStar2(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(version8, options) {\n options = parseOptions(options);\n if (version8 instanceof _SemVer) {\n if (version8.loose === !!options.loose && version8.includePrerelease === !!options.includePrerelease) {\n return version8;\n } else {\n version8 = version8.version;\n }\n } else if (typeof version8 !== \"string\") {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version8}\".`);\n }\n if (version8.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n );\n }\n debug(\"SemVer\", version8, options);\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n const m2 = version8.trim().match(options.loose ? re[t3.LOOSE] : re[t3.FULL]);\n if (!m2) {\n throw new TypeError(`Invalid Version: ${version8}`);\n }\n this.raw = version8;\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 base3 = Number(identifierBase) ? 1 : 0;\n if (this.prerelease.length === 0) {\n this.prerelease = [base3];\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(base3);\n }\n }\n if (identifier) {\n let prerelease = [identifier, base3];\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 = (version8, options, throwErrors = false) => {\n if (version8 instanceof SemVer) {\n return version8;\n }\n try {\n return new SemVer(version8, 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 = (version8, options) => {\n const v2 = parse(version8, 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 clean2 = (version8, options) => {\n const s4 = parse(version8.trim().replace(/^[=v]+/, \"\"), options);\n return s4 ? s4.version : null;\n };\n module.exports = clean2;\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 = (version8, 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 version8 instanceof SemVer ? version8.version : version8,\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 = (version8, options) => {\n const parsed = parse(version8, 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 = (version8, options) => {\n if (version8 instanceof SemVer) {\n return version8;\n }\n if (typeof version8 === \"number\") {\n version8 = String(version8);\n }\n if (typeof version8 !== \"string\") {\n return null;\n }\n options = options || {};\n let match = null;\n if (!options.rtl) {\n match = version8.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(version8)) && (!match || match.index + match[0].length !== version8.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(version8) {\n if (!version8) {\n return false;\n }\n if (typeof version8 === \"string\") {\n try {\n version8 = new SemVer(version8, 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], version8, 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, from5, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from5 = \"\";\n } else if (isX(fm)) {\n from5 = `>=${fM}.0.0${incPr ? \"-0\" : \"\"}`;\n } else if (isX(fp)) {\n from5 = `>=${fM}.${fm}.0${incPr ? \"-0\" : \"\"}`;\n } else if (fpr) {\n from5 = `>=${from5}`;\n } else {\n from5 = `>=${from5}${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 `${from5} ${to}`.trim();\n };\n var testSet = (set, version8, options) => {\n for (let i3 = 0; i3 < set.length; i3++) {\n if (!set[i3].test(version8)) {\n return false;\n }\n }\n if (version8.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 === version8.major && allowed.minor === version8.minor && allowed.patch === version8.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(version8) {\n debug(\"Comparator.test\", version8, this.options.loose);\n if (this.semver === ANY || version8 === ANY) {\n return true;\n }\n if (typeof version8 === \"string\") {\n try {\n version8 = new SemVer(version8, this.options);\n } catch (er) {\n return false;\n }\n }\n return cmp(version8, 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 = (version8, range, options) => {\n try {\n range = new Range(range, options);\n } catch (er) {\n return false;\n }\n return range.test(version8);\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 = (version8, range, hilo, options) => {\n version8 = new SemVer(version8, 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(version8, 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(version8, low.semver)) {\n return false;\n } else if (low.operator === ecomp && ltfn(version8, 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 = (version8, range, options) => outside(version8, 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 = (version8, range, options) => outside(version8, 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 version8 of v2) {\n const included = satisfies(version8, range, options);\n if (included) {\n prev = version8;\n if (!first) {\n first = version8;\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 clean2 = 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: clean2,\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 assert4(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits2(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(number, base3, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number !== null) {\n if (base3 === \"le\" || base3 === \"be\") {\n endian = base3;\n base3 = 10;\n }\n this._init(number || 0, base3 || 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 (e2) {\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 init2(number, base3, endian) {\n if (typeof number === \"number\") {\n return this._initNumber(number, base3, endian);\n }\n if (typeof number === \"object\") {\n return this._initArray(number, base3, endian);\n }\n if (base3 === \"hex\") {\n base3 = 16;\n }\n assert4(base3 === (base3 | 0) && base3 >= 2 && base3 <= 36);\n number = number.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number.length) {\n if (base3 === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base3, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base3, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number, base3, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 67108864) {\n this.words = [number & 67108863];\n this.length = 1;\n } else if (number < 4503599627370496) {\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert4(number < 9007199254740992);\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base3, endian);\n };\n BN.prototype._initArray = function _initArray(number, base3, endian) {\n assert4(typeof number.length === \"number\");\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number.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 = number.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number[i3] | number[i3 - 1] << 8 | number[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 < number.length; i3 += 3) {\n w3 = number[i3] | number[i3 + 1] << 8 | number[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(string, index2) {\n var c4 = string.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 assert4(false, \"Invalid character in \" + string);\n }\n }\n function parseHexByte(string, lowerBound, index2) {\n var r2 = parseHex4Bits(string, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number, start, endian) {\n this.length = Math.ceil((number.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 = number.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number, 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 = number.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number.length; i3 += 2) {\n w3 = parseHexByte(number, 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 assert4(c4 >= 0 && b4 < mul, \"Invalid character\");\n r2 += b4;\n }\n return r2;\n }\n BN.prototype._parseBase = function _parseBase(number, base3, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base3) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base3 | 0;\n var total = number.length - start;\n var mod2 = total % limbLen;\n var end = Math.min(total, total - mod2) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number, i3, i3 + limbLen, base3);\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 (mod2 !== 0) {\n var pow = 1;\n word = parseBase(number, i3, number.length, base3);\n for (i3 = 0; i3 < mod2; i3++) {\n pow *= base3;\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(size5) {\n while (this.length < size5) {\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 (e2) {\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 toString3(base3, padding) {\n base3 = base3 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base3 === 16 || base3 === \"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 (base3 === (base3 | 0) && base3 >= 2 && base3 <= 36) {\n var groupSize = groupSizes[base3];\n var groupBase = groupBases[base3];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modrn(groupBase).toString(base3);\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 assert4(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber2() {\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 assert4(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON2() {\n return this.toString(16, 2);\n };\n if (Buffer3) {\n BN.prototype.toBuffer = function toBuffer(endian, length) {\n return this.toArrayLike(Buffer3, endian, length);\n };\n }\n BN.prototype.toArray = function toArray2(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n var allocate = function allocate2(ArrayType, size5) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size5);\n }\n return new ArrayType(size5);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert4(byteLength <= reqLength, \"byte array longer than desired length\");\n assert4(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 assert4((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 assert4((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 assert4((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 assert4(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 assert4(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 assert4(carry === 0);\n assert4((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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(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 assert4(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert4(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 assert4(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 assert4(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 assert4(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert4(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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(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 assert4(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod2, 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 mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.iadd(num2);\n }\n }\n return {\n div,\n mod: mod2\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 mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod2\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 mod2(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 mod2 = 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 = mod2.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 assert4(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 assert4(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 assert4(p4.negative === 0);\n assert4(!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 assert4(p4.negative === 0);\n assert4(!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 assert4(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 assert4(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 assert4(!this.red, \"Already a number in reduction context\");\n assert4(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert4(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 assert4(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert4(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert4(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert4(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert4(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert4(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 split3(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 inherits2(K256, MPrime);\n K256.prototype.split = function split3(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 inherits2(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits2(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits2(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 assert4(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 assert4(a3.negative === 0, \"red works only with positives\");\n assert4(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert4((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert4(\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 assert4(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 assert4(!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 assert4(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 inherits2(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 _permanentCensorErrors3 = false;\n var _censorErrors3 = false;\n var LogLevels3 = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\n var _logLevel3 = LogLevels3[\"default\"];\n var _version_1 = require_version();\n var _globalLogger3 = null;\n function _checkNormalize3() {\n try {\n var missing_1 = [];\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach(function(form2) {\n try {\n if (\"test\".normalize(form2) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n } catch (error) {\n missing_1.push(form2);\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 _normalizeError3 = _checkNormalize3();\n var LogLevel4;\n (function(LogLevel5) {\n LogLevel5[\"DEBUG\"] = \"DEBUG\";\n LogLevel5[\"INFO\"] = \"INFO\";\n LogLevel5[\"WARNING\"] = \"WARNING\";\n LogLevel5[\"ERROR\"] = \"ERROR\";\n LogLevel5[\"OFF\"] = \"OFF\";\n })(LogLevel4 = exports3.LogLevel || (exports3.LogLevel = {}));\n var ErrorCode3;\n (function(ErrorCode4) {\n ErrorCode4[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n ErrorCode4[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n ErrorCode4[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n ErrorCode4[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n ErrorCode4[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n ErrorCode4[\"TIMEOUT\"] = \"TIMEOUT\";\n ErrorCode4[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n ErrorCode4[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ErrorCode4[\"MISSING_NEW\"] = \"MISSING_NEW\";\n ErrorCode4[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n ErrorCode4[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n ErrorCode4[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ErrorCode4[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n ErrorCode4[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n ErrorCode4[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n ErrorCode4[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n ErrorCode4[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n ErrorCode4[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ErrorCode4[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n })(ErrorCode3 = exports3.ErrorCode || (exports3.ErrorCode = {}));\n var HEX4 = \"0123456789abcdef\";\n var Logger4 = (\n /** @class */\n function() {\n function Logger5(version8) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version8,\n writable: false\n });\n }\n Logger5.prototype._log = function(logLevel, args) {\n var level = logLevel.toLowerCase();\n if (LogLevels3[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel3 > LogLevels3[level]) {\n return;\n }\n console.log.apply(console, args);\n };\n Logger5.prototype.debug = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger5.levels.DEBUG, args);\n };\n Logger5.prototype.info = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger5.levels.INFO, args);\n };\n Logger5.prototype.warn = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger5.levels.WARNING, args);\n };\n Logger5.prototype.makeError = function(message, code, params) {\n if (_censorErrors3) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger5.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 += HEX4[value[i3] >> 4];\n hex += HEX4[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 ErrorCode3.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 ErrorCode3.CALL_EXCEPTION:\n case ErrorCode3.INSUFFICIENT_FUNDS:\n case ErrorCode3.MISSING_NEW:\n case ErrorCode3.NONCE_EXPIRED:\n case ErrorCode3.REPLACEMENT_UNDERPRICED:\n case ErrorCode3.TRANSACTION_REPLACED:\n case ErrorCode3.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 Logger5.prototype.throwError = function(message, code, params) {\n throw this.makeError(message, code, params);\n };\n Logger5.prototype.throwArgumentError = function(message, name, value) {\n return this.throwError(message, Logger5.errors.INVALID_ARGUMENT, {\n argument: name,\n value\n });\n };\n Logger5.prototype.assert = function(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n };\n Logger5.prototype.assertArgument = function(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n };\n Logger5.prototype.checkNormalize = function(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError3) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger5.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\",\n form: _normalizeError3\n });\n }\n };\n Logger5.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, Logger5.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value\n });\n }\n if (value % 1) {\n this.throwError(message, Logger5.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value\n });\n }\n };\n Logger5.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, Logger5.errors.MISSING_ARGUMENT, {\n count,\n expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger5.errors.UNEXPECTED_ARGUMENT, {\n count,\n expectedCount\n });\n }\n };\n Logger5.prototype.checkNew = function(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger5.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger5.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\", Logger5.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger5.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger5.globalLogger = function() {\n if (!_globalLogger3) {\n _globalLogger3 = new Logger5(_version_1.version);\n }\n return _globalLogger3;\n };\n Logger5.setCensorship = function(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger5.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors3) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger5.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors3 = !!censorship;\n _permanentCensorErrors3 = !!permanent;\n };\n Logger5.setLogLevel = function(logLevel) {\n var level = LogLevels3[logLevel.toLowerCase()];\n if (level == null) {\n Logger5.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel3 = level;\n };\n Logger5.from = function(version8) {\n return new Logger5(version8);\n };\n Logger5.errors = ErrorCode3;\n Logger5.levels = LogLevel4;\n return Logger5;\n }()\n );\n exports3.Logger = Logger4;\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 logger3 = new logger_1.Logger(_version_1.version);\n function isHexable(value) {\n return !!value.toHexString;\n }\n function addSlice(array) {\n if (array.slice) {\n return array;\n }\n array.slice = function() {\n var args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n };\n return array;\n }\n function isBytesLike2(value) {\n return isHexString2(value) && !(value.length % 2) || isBytes5(value);\n }\n exports3.isBytesLike = isBytesLike2;\n function isInteger(value) {\n return typeof value === \"number\" && value == value && value % 1 === 0;\n }\n function isBytes5(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 = isBytes5;\n function arrayify2(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger3.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 (isHexString2(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 logger3.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 (isBytes5(value)) {\n return addSlice(new Uint8Array(value));\n }\n return logger3.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n }\n exports3.arrayify = arrayify2;\n function concat5(items) {\n var objects = items.map(function(item) {\n return arrayify2(item);\n });\n var length = objects.reduce(function(accum, item) {\n return accum + item.length;\n }, 0);\n var result = new Uint8Array(length);\n objects.reduce(function(offset, object) {\n result.set(object, offset);\n return offset + object.length;\n }, 0);\n return addSlice(result);\n }\n exports3.concat = concat5;\n function stripZeros2(value) {\n var result = arrayify2(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 = stripZeros2;\n function zeroPad2(value, length) {\n value = arrayify2(value);\n if (value.length > length) {\n logger3.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n var result = new Uint8Array(length);\n result.set(value, length - value.length);\n return addSlice(result);\n }\n exports3.zeroPad = zeroPad2;\n function isHexString2(value, length) {\n if (typeof value !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (length && value.length !== 2 + 2 * length) {\n return false;\n }\n return true;\n }\n exports3.isHexString = isHexString2;\n var HexCharacters = \"0123456789abcdef\";\n function hexlify2(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger3.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 (isHexString2(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 logger3.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return value.toLowerCase();\n }\n if (isBytes5(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 logger3.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n }\n exports3.hexlify = hexlify2;\n function hexDataLength2(data) {\n if (typeof data !== \"string\") {\n data = hexlify2(data);\n } else if (!isHexString2(data) || data.length % 2) {\n return null;\n }\n return (data.length - 2) / 2;\n }\n exports3.hexDataLength = hexDataLength2;\n function hexDataSlice2(data, offset, endOffset) {\n if (typeof data !== \"string\") {\n data = hexlify2(data);\n } else if (!isHexString2(data) || data.length % 2) {\n logger3.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 = hexDataSlice2;\n function hexConcat2(items) {\n var result = \"0x\";\n items.forEach(function(item) {\n result += hexlify2(item).substring(2);\n });\n return result;\n }\n exports3.hexConcat = hexConcat2;\n function hexValue3(value) {\n var trimmed = hexStripZeros2(hexlify2(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") {\n return \"0x0\";\n }\n return trimmed;\n }\n exports3.hexValue = hexValue3;\n function hexStripZeros2(value) {\n if (typeof value !== \"string\") {\n value = hexlify2(value);\n }\n if (!isHexString2(value)) {\n logger3.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 = hexStripZeros2;\n function hexZeroPad2(value, length) {\n if (typeof value !== \"string\") {\n value = hexlify2(value);\n } else if (!isHexString2(value)) {\n logger3.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n if (value.length > 2 * length + 2) {\n logger3.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n while (value.length < 2 * length + 2) {\n value = \"0x0\" + value.substring(2);\n }\n return value;\n }\n exports3.hexZeroPad = hexZeroPad2;\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 (isBytesLike2(signature)) {\n var bytes = arrayify2(signature);\n if (bytes.length === 64) {\n result.v = 27 + (bytes[32] >> 7);\n bytes[32] &= 127;\n result.r = hexlify2(bytes.slice(0, 32));\n result.s = hexlify2(bytes.slice(32, 64));\n } else if (bytes.length === 65) {\n result.r = hexlify2(bytes.slice(0, 32));\n result.s = hexlify2(bytes.slice(32, 64));\n result.v = bytes[64];\n } else {\n logger3.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 logger3.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 = hexlify2(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 = zeroPad2(arrayify2(result._vs), 32);\n result._vs = hexlify2(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 logger3.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n vs_1[0] &= 127;\n var s4 = hexlify2(vs_1);\n if (result.s == null) {\n result.s = s4;\n } else if (result.s !== s4) {\n logger3.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger3.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 logger3.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n if (result.r == null || !isHexString2(result.r)) {\n logger3.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n } else {\n result.r = hexZeroPad2(result.r, 32);\n }\n if (result.s == null || !isHexString2(result.s)) {\n logger3.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n } else {\n result.s = hexZeroPad2(result.s, 32);\n }\n var vs = arrayify2(result.s);\n if (vs[0] >= 128) {\n logger3.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) {\n vs[0] |= 128;\n }\n var _vs = hexlify2(vs);\n if (result._vs) {\n if (!isHexString2(result._vs)) {\n logger3.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad2(result._vs, 32);\n }\n if (result._vs == null) {\n result._vs = _vs;\n } else if (result._vs !== _vs) {\n logger3.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 joinSignature2(signature) {\n signature = splitSignature2(signature);\n return hexlify2(concat5([\n signature.r,\n signature.s,\n signature.recoveryParam ? \"0x1c\" : \"0x1b\"\n ]));\n }\n exports3.joinSignature = joinSignature2;\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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._base16To36 = exports3._base36To16 = exports3.BigNumber = exports3.isBigNumberish = void 0;\n var bn_js_1 = __importDefault2(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 logger3 = new logger_1.Logger(_version_1.version);\n var _constructorGuard = {};\n var MAX_SAFE = 9007199254740991;\n function isBigNumberish2(value) {\n return value != null && (BigNumber3.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 BigNumber3 = (\n /** @class */\n function() {\n function BigNumber4(constructorGuard, hex) {\n if (constructorGuard !== _constructorGuard) {\n logger3.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 BigNumber4.prototype.fromTwos = function(value) {\n return toBigNumber(toBN(this).fromTwos(value));\n };\n BigNumber4.prototype.toTwos = function(value) {\n return toBigNumber(toBN(this).toTwos(value));\n };\n BigNumber4.prototype.abs = function() {\n if (this._hex[0] === \"-\") {\n return BigNumber4.from(this._hex.substring(1));\n }\n return this;\n };\n BigNumber4.prototype.add = function(other) {\n return toBigNumber(toBN(this).add(toBN(other)));\n };\n BigNumber4.prototype.sub = function(other) {\n return toBigNumber(toBN(this).sub(toBN(other)));\n };\n BigNumber4.prototype.div = function(other) {\n var o5 = BigNumber4.from(other);\n if (o5.isZero()) {\n throwFault(\"division-by-zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n };\n BigNumber4.prototype.mul = function(other) {\n return toBigNumber(toBN(this).mul(toBN(other)));\n };\n BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.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 BigNumber4.prototype.eq = function(other) {\n return toBN(this).eq(toBN(other));\n };\n BigNumber4.prototype.lt = function(other) {\n return toBN(this).lt(toBN(other));\n };\n BigNumber4.prototype.lte = function(other) {\n return toBN(this).lte(toBN(other));\n };\n BigNumber4.prototype.gt = function(other) {\n return toBN(this).gt(toBN(other));\n };\n BigNumber4.prototype.gte = function(other) {\n return toBN(this).gte(toBN(other));\n };\n BigNumber4.prototype.isNegative = function() {\n return this._hex[0] === \"-\";\n };\n BigNumber4.prototype.isZero = function() {\n return toBN(this).isZero();\n };\n BigNumber4.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 BigNumber4.prototype.toBigInt = function() {\n try {\n return BigInt(this.toString());\n } catch (e2) {\n }\n return logger3.throwError(\"this platform does not support BigInt\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n };\n BigNumber4.prototype.toString = function() {\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger3.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n } else if (arguments[0] === 16) {\n logger3.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n } else {\n logger3.throwError(\"BigNumber.toString does not accept parameters\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n }\n }\n return toBN(this).toString(10);\n };\n BigNumber4.prototype.toHexString = function() {\n return this._hex;\n };\n BigNumber4.prototype.toJSON = function(key) {\n return { type: \"BigNumber\", hex: this.toHexString() };\n };\n BigNumber4.from = function(value) {\n if (value instanceof BigNumber4) {\n return value;\n }\n if (typeof value === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber4(_constructorGuard, toHex3(value));\n }\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber4(_constructorGuard, toHex3(new BN(value)));\n }\n return logger3.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 BigNumber4.from(String(value));\n }\n var anyValue = value;\n if (typeof anyValue === \"bigint\") {\n return BigNumber4.from(anyValue.toString());\n }\n if ((0, bytes_1.isBytes)(anyValue)) {\n return BigNumber4.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 BigNumber4.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 BigNumber4.from(hex);\n }\n }\n }\n }\n return logger3.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n };\n BigNumber4.isBigNumber = function(value) {\n return !!(value && value._isBigNumber);\n };\n return BigNumber4;\n }()\n );\n exports3.BigNumber = BigNumber3;\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 logger3.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 BigNumber3.from(toHex3(value));\n }\n function toBN(value) {\n var hex = BigNumber3.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 logger3.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 logger3 = 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 logger3.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 (e2) {\n }\n }\n if (typeof decimals === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return \"1\" + zeros.substring(0, decimals);\n }\n return logger3.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 logger3.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 logger3.throwArgumentError(\"missing value\", \"value\", value);\n }\n var comps = value.split(\".\");\n if (comps.length > 2) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n if (decimals > 80) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = new logger_1.Logger(_version_1.version);\n function defineReadOnly2(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value,\n writable: false\n });\n }\n exports3.defineReadOnly = defineReadOnly2;\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 resolveProperties3(object) {\n return __awaiter3(this, void 0, void 0, function() {\n var promises, results;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n promises = Object.keys(object).map(function(key) {\n var value = object[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 = _a2.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 = resolveProperties3;\n function checkProperties(object, properties) {\n if (!object || typeof object !== \"object\") {\n logger3.throwArgumentError(\"invalid object\", \"object\", object);\n }\n Object.keys(object).forEach(function(key) {\n if (!properties[key]) {\n logger3.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n }\n exports3.checkProperties = checkProperties;\n function shallowCopy(object) {\n var result = {};\n for (var key in object) {\n result[key] = object[key];\n }\n return result;\n }\n exports3.shallowCopy = shallowCopy;\n var opaque2 = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n function _isFrozen2(object) {\n if (object === void 0 || object === null || opaque2[typeof object]) {\n return true;\n }\n if (Array.isArray(object) || typeof object === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n var keys = Object.keys(object);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var value = null;\n try {\n value = object[keys[i3]];\n } catch (error) {\n continue;\n }\n if (!_isFrozen2(value)) {\n return false;\n }\n }\n return true;\n }\n return logger3.throwArgumentError(\"Cannot deepCopy \" + typeof object, \"object\", object);\n }\n function _deepCopy2(object) {\n if (_isFrozen2(object)) {\n return object;\n }\n if (Array.isArray(object)) {\n return Object.freeze(object.map(function(item) {\n return deepCopy2(item);\n }));\n }\n if (typeof object === \"object\") {\n var result = {};\n for (var key in object) {\n var value = object[key];\n if (value === void 0) {\n continue;\n }\n defineReadOnly2(result, key, deepCopy2(value));\n }\n return result;\n }\n return logger3.throwArgumentError(\"Cannot deepCopy \" + typeof object, \"object\", object);\n }\n function deepCopy2(object) {\n return _deepCopy2(object);\n }\n exports3.deepCopy = deepCopy2;\n var Description = (\n /** @class */\n /* @__PURE__ */ function() {\n function Description2(info) {\n for (var key in info) {\n this[key] = deepCopy2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 logger3.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n }\n function parseParamType(param, allowIndexed) {\n var originalParam = param;\n function throwError(i4) {\n logger3.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 logger3.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(object, params) {\n for (var key in params) {\n (0, properties_1.defineReadOnly)(object, 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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 __extends2(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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n return result;\n }\n var ConstructorFragment = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n var state = verifyState(value);\n if (state.constant) {\n logger3.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 logger3.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 __extends2(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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n var parens = comps[0].match(regexParen);\n if (!parens) {\n logger3.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 logger3.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 logger3.throwArgumentError(\"cannot specify user defined \" + sig + \" error\", \"fragment\", fragment);\n }\n return fragment;\n }\n var ErrorFragment = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3 = new logger_1.Logger(_version_1.version);\n function checkResultErrors(result) {\n var errors = [];\n var checkErrors = function(path, object) {\n if (!Array.isArray(object)) {\n return;\n }\n for (var key in object) {\n var childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object[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 logger3.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 logger3.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, length, loose) {\n var alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length <= this._data.length) {\n alignedLength = length;\n } else {\n logger3.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(length, loose) {\n var bytes = this._peekBytes(0, length, !!loose);\n this._offset += bytes.length;\n return bytes.slice(0, length);\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 Keccak2(bits2, padding, bits2).update(message)[outputType]();\n };\n };\n var createShakeOutputMethod = function(bits2, padding, outputType) {\n return function(message, outputBits) {\n return new Keccak2(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 Keccak2(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 Keccak2(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 Keccak2(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 Keccak2(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 Keccak2.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, length = message.length, blockCount = this.blockCount, index2 = 0, s4 = this.s, i4, code;\n while (index2 < length) {\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 < length && i4 < byteCount; ++index2) {\n blocks[i4 >> 2] |= message[index2] << SHIFT[i4++ & 3];\n }\n } else {\n for (i4 = this.start; index2 < length && 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 Keccak2.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 Keccak2.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, length = str.length;\n if (notString) {\n bytes = length;\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 Keccak2.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 Keccak2.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 Keccak2.prototype.toString = Keccak2.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 Keccak2.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 array = new Uint32Array(buffer2);\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n array[j3] = s4[i4];\n }\n if (j3 % blockCount === 0) {\n f6(s4);\n }\n }\n if (extraBytes) {\n array[i4] = s4[i4];\n buffer2 = buffer2.slice(0, bytes);\n }\n return buffer2;\n };\n Keccak2.prototype.buffer = Keccak2.prototype.arrayBuffer;\n Keccak2.prototype.digest = Keccak2.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 array = [], 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 array[offset] = block & 255;\n array[offset + 1] = block >> 8 & 255;\n array[offset + 2] = block >> 16 & 255;\n array[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 array[offset] = block & 255;\n if (extraBytes > 1) {\n array[offset + 1] = block >> 8 & 255;\n }\n if (extraBytes > 2) {\n array[offset + 2] = block >> 16 & 255;\n }\n }\n return array;\n };\n function Kmac(bits2, padding, outputBits) {\n Keccak2.call(this, bits2, padding, outputBits);\n }\n Kmac.prototype = new Keccak2();\n Kmac.prototype.finalize = function() {\n this.encode(this.outputBits, true);\n return Keccak2.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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.keccak256 = void 0;\n var js_sha3_1 = __importDefault2(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 logger3 = 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, length) {\n var result = 0;\n for (var i3 = 0; i3 < length; i3++) {\n result = result * 256 + data[offset + i3];\n }\n return result;\n }\n function _encode(object) {\n if (Array.isArray(object)) {\n var payload_1 = [];\n object.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)(object)) {\n logger3.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object);\n }\n var data = Array.prototype.slice.call((0, bytes_1.arrayify)(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 var length = arrayifyInteger(data.length);\n length.unshift(183 + length.length);\n return length.concat(data);\n }\n function encode7(object) {\n return (0, bytes_1.hexlify)(_encode(object));\n }\n exports3.encode = encode7;\n function _decodeChildren(data, offset, childOffset, length) {\n var result = [];\n while (childOffset < offset + 1 + length) {\n var decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length) {\n logger3.throwError(\"child data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n }\n return { consumed: 1 + length, result };\n }\n function _decode(data, offset) {\n if (data.length === 0) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3 = new logger_1.Logger(_version_1.version);\n function getChecksumAddress(address) {\n if (!(0, bytes_1.isHexString)(address, 20)) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 from5 = null;\n try {\n from5 = getAddress3(transaction.from);\n } catch (error) {\n logger3.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)([from5, nonce])), 12));\n }\n exports3.getContractAddress = getContractAddress3;\n function getCreate2Address2(from5, salt, initCodeHash) {\n if ((0, bytes_1.hexDataLength)(salt) !== 32) {\n logger3.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if ((0, bytes_1.hexDataLength)(initCodeHash) !== 32) {\n logger3.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(from5), 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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n if (coders.length !== arrayValues.length) {\n logger3.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 length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\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 __extends2(ArrayCoder2, _super);\n function ArrayCoder2(coder, length, localName) {\n var _this = this;\n var type = coder.type + \"[\" + (length >= 0 ? length : \"\") + \"]\";\n var dynamic = length === -1 || coder.dynamic;\n _this = _super.call(this, \"array\", type, localName, dynamic) || this;\n _this.coder = coder;\n _this.length = length;\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 logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(FixedBytesCoder2, _super);\n function FixedBytesCoder2(size5, localName) {\n var _this = this;\n var name = \"bytes\" + String(size5);\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size5;\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(NumberCoder2, _super);\n function NumberCoder2(size5, signed, localName) {\n var _this = this;\n var name = (signed ? \"int\" : \"uint\") + size5 * 8;\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size5;\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 logger3 = new logger_1.Logger(_version_1.version);\n var UnicodeNormalizationForm2;\n (function(UnicodeNormalizationForm3) {\n UnicodeNormalizationForm3[\"current\"] = \"\";\n UnicodeNormalizationForm3[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm3[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm3[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm3[\"NFKD\"] = \"NFKD\";\n })(UnicodeNormalizationForm2 = exports3.UnicodeNormalizationForm || (exports3.UnicodeNormalizationForm = {}));\n var Utf8ErrorReason2;\n (function(Utf8ErrorReason3) {\n Utf8ErrorReason3[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n Utf8ErrorReason3[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n Utf8ErrorReason3[\"OVERRUN\"] = \"string overrun\";\n Utf8ErrorReason3[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n Utf8ErrorReason3[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n Utf8ErrorReason3[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n Utf8ErrorReason3[\"OVERLONG\"] = \"overlong representation\";\n })(Utf8ErrorReason2 = exports3.Utf8ErrorReason || (exports3.Utf8ErrorReason = {}));\n function errorFunc2(reason, offset, bytes, output, badCodepoint) {\n return logger3.throwArgumentError(\"invalid codepoint at offset \" + offset + \"; \" + reason, \"bytes\", bytes);\n }\n function ignoreFunc2(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason2.BAD_PREFIX || reason === Utf8ErrorReason2.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 === Utf8ErrorReason2.OVERRUN) {\n return bytes.length - offset - 1;\n }\n return 0;\n }\n function replaceFunc2(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason2.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n output.push(65533);\n return ignoreFunc2(reason, offset, bytes, output, badCodepoint);\n }\n exports3.Utf8ErrorFuncs = Object.freeze({\n error: errorFunc2,\n ignore: ignoreFunc2,\n replace: replaceFunc2\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(Utf8ErrorReason2.UNEXPECTED_CONTINUE, i3 - 1, bytes, result);\n } else {\n i3 += onError(Utf8ErrorReason2.BAD_PREFIX, i3 - 1, bytes, result);\n }\n continue;\n }\n if (i3 - 1 + extraLength >= bytes.length) {\n i3 += onError(Utf8ErrorReason2.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(Utf8ErrorReason2.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(Utf8ErrorReason2.OUT_OF_RANGE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res >= 55296 && res <= 57343) {\n i3 += onError(Utf8ErrorReason2.UTF16_SURROGATE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res <= overlongMask) {\n i3 += onError(Utf8ErrorReason2.OVERLONG, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n }\n function toUtf8Bytes(str, form2) {\n if (form2 === void 0) {\n form2 = UnicodeNormalizationForm2.current;\n }\n if (form2 != UnicodeNormalizationForm2.current) {\n logger3.checkNormalize();\n str = str.normalize(form2);\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, form2) {\n if (form2 === void 0) {\n form2 = UnicodeNormalizationForm2.current;\n }\n return getUtf8CodePoints(toUtf8Bytes(str, form2));\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 length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n return (0, utf8_1.toUtf8String)(data.slice(0, length));\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 bytes22(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 createTable2(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 createRangeTable2(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 = createRangeTable2(\"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 = createTable2(\"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 = createTable2(\"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 = createTable2(\"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\", bytes22);\n var Table_C_ranges = createRangeTable2(\"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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 logger3 = 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 size5 = parseInt(match[2] || \"256\");\n if (size5 === 0 || size5 > 256 || size5 % 8 !== 0) {\n logger3.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new number_1.NumberCoder(size5 / 8, match[1] === \"int\", param.name);\n }\n match = param.type.match(paramTypeBytes);\n if (match) {\n var size5 = parseInt(match[1]);\n if (size5 === 0 || size5 > 32) {\n logger3.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new fixed_bytes_1.FixedBytesCoder(size5, param.name);\n }\n return logger3.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 logger3.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 encode7(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 = encode7;\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(array, depth) {\n if (depth == null) {\n depth = 1;\n }\n var result = [];\n var forEach2 = result.forEach;\n var flatDeep = function(arr, depth2) {\n forEach2.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(array, depth);\n return result;\n }\n function fromEntries(array) {\n var result = {};\n for (var i3 = 0; i3 < array.length; i3++) {\n var value = array[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, _a2 = name.split(\".\"); _i < _a2.length; _i++) {\n var label = _a2[_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(normalize3(name, filter_fe0f));\n }\n exports3.ens_normalize = ens_normalize;\n function normalize3(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 _a2;\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 = (_a2 = node.branches.find(function(x4) {\n return x4.set.has(cp);\n })) === null || _a2 === void 0 ? void 0 : _a2.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 logger3 = 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 logger3.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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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(_a2) {\n var name2 = _a2.name, type = _a2.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"missing primary type\", \"types\", types);\n } else if (primaryTypes.length > 1) {\n logger3.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 logger3.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 logger3.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(_a2) {\n var name = _a2.name, type2 = _a2.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 logger3.throwArgumentError(\"unknown type: \" + type, \"type\", type);\n };\n TypedDataEncoder2.prototype.encodeType = function(name) {\n var result = this._types[name];\n if (!result) {\n logger3.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 logger3.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, _a2) {\n var name = _a2.name, type2 = _a2.type;\n accum[name] = _this._visit(type2, value[name], callback);\n return accum;\n }, {});\n }\n return logger3.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 logger3.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, _a2, _b2, _i, name_4, _c, _d;\n return __generator2(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 _a2 = [];\n for (_b2 in ensCache)\n _a2.push(_b2);\n _i = 0;\n _e.label = 1;\n case 1:\n if (!(_i < _a2.length))\n return [3, 4];\n name_4 = _a2[_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 logger3.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 logger3.throwArgumentError(\"invalid string\", \"value\", value2);\n }\n return value2;\n }\n return logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = new logger_1.Logger(_version_1.version);\n var LogDescription = (\n /** @class */\n function(_super) {\n __extends2(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 __extends2(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 __extends2(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 __extends2(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 wrap = new Error(\"deferred error during ABI decoding triggered accessing \" + property);\n wrap.error = error;\n return wrap;\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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"no matching function\", \"name\", name_2);\n } else if (matching.length > 1) {\n logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"no matching event\", \"name\", name_4);\n } else if (matching.length > 1) {\n logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"no matching error\", \"name\", name_6);\n } else if (matching.length > 1) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = new logger_1.Logger(_version_1.version);\n var ForkEvent = (\n /** @class */\n function(_super) {\n __extends2(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 __extends2(BlockForkEvent2, _super);\n function BlockForkEvent2(blockHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(blockHash, 32)) {\n logger3.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 __extends2(TransactionForkEvent2, _super);\n function TransactionForkEvent2(hash2, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(hash2, 32)) {\n logger3.throwArgumentError(\"invalid transaction hash\", \"hash\", hash2);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: expiry || 0,\n hash: hash2\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 __extends2(TransactionOrderForkEvent2, _super);\n function TransactionOrderForkEvent2(beforeHash, afterHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(beforeHash, 32)) {\n logger3.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!(0, bytes_1.isHexString)(afterHash, 32)) {\n logger3.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 logger3.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 _a2, block, gasPrice, lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas;\n return __generator2(this, function(_b2) {\n switch (_b2.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 _a2 = _b2.sent(), block = _a2.block, gasPrice = _a2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"getBalance\");\n return [4, this.provider.getBalance(this.getAddress(), blockTag)];\n case 1:\n return [2, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype.getTransactionCount = function(blockTag) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"getTransactionCount\");\n return [4, this.provider.getTransactionCount(this.getAddress(), blockTag)];\n case 1:\n return [2, _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"estimateGas\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a2.sent();\n return [4, this.provider.estimateGas(tx)];\n case 2:\n return [2, _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"call\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a2.sent();\n return [4, this.provider.call(tx, blockTag)];\n case 2:\n return [2, _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"sendTransaction\");\n return [4, this.populateTransaction(transaction)];\n case 1:\n tx = _a2.sent();\n return [4, this.signTransaction(tx)];\n case 2:\n signedTx = _a2.sent();\n return [4, this.provider.sendTransaction(signedTx)];\n case 3:\n return [2, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype.getChainId = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var network;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"getChainId\");\n return [4, this.provider.getNetwork()];\n case 1:\n network = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"getGasPrice\");\n return [4, this.provider.getGasPrice()];\n case 1:\n return [2, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype.getFeeData = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"getFeeData\");\n return [4, this.provider.getFeeData()];\n case 1:\n return [2, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype.resolveName = function(name) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this._checkProvider(\"resolveName\");\n return [4, this.provider.resolveName(name)];\n case 1:\n return [2, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype.checkTransaction = function(transaction) {\n for (var key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger3.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a2.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.resolveName(to)];\n case 1:\n address = _a3.sent();\n if (address == null) {\n logger3.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 logger3.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger3.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 = _a2.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 logger3.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 logger3.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 _a2.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 logger3.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 logger3.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, _a2.sent()];\n }\n });\n });\n };\n Signer2.prototype._checkProvider = function(operation) {\n if (!this.provider) {\n logger3.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 __extends2(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 logger3.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 assert4(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits2(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(number, base3, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number !== null) {\n if (base3 === \"le\" || base3 === \"be\") {\n endian = base3;\n base3 = 10;\n }\n this._init(number || 0, base3 || 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 (e2) {\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 init2(number, base3, endian) {\n if (typeof number === \"number\") {\n return this._initNumber(number, base3, endian);\n }\n if (typeof number === \"object\") {\n return this._initArray(number, base3, endian);\n }\n if (base3 === \"hex\") {\n base3 = 16;\n }\n assert4(base3 === (base3 | 0) && base3 >= 2 && base3 <= 36);\n number = number.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number.length) {\n if (base3 === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base3, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base3, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number, base3, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 67108864) {\n this.words = [number & 67108863];\n this.length = 1;\n } else if (number < 4503599627370496) {\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert4(number < 9007199254740992);\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base3, endian);\n };\n BN.prototype._initArray = function _initArray(number, base3, endian) {\n assert4(typeof number.length === \"number\");\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number.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 = number.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number[i3] | number[i3 - 1] << 8 | number[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 < number.length; i3 += 3) {\n w3 = number[i3] | number[i3 + 1] << 8 | number[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(string, index2) {\n var c4 = string.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(string, lowerBound, index2) {\n var r2 = parseHex4Bits(string, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number, start, endian) {\n this.length = Math.ceil((number.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 = number.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number, 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 = number.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number.length; i3 += 2) {\n w3 = parseHexByte(number, 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(number, base3, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base3) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base3 | 0;\n var total = number.length - start;\n var mod2 = total % limbLen;\n var end = Math.min(total, total - mod2) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number, i3, i3 + limbLen, base3);\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 (mod2 !== 0) {\n var pow = 1;\n word = parseBase(number, i3, number.length, base3);\n for (i3 = 0; i3 < mod2; i3++) {\n pow *= base3;\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(size5) {\n while (this.length < size5) {\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 toString3(base3, padding) {\n base3 = base3 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base3 === 16 || base3 === \"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 (base3 === (base3 | 0) && base3 >= 2 && base3 <= 36) {\n var groupSize = groupSizes[base3];\n var groupBase = groupBases[base3];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modn(groupBase).toString(base3);\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 assert4(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber2() {\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 assert4(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON2() {\n return this.toString(16);\n };\n BN.prototype.toBuffer = function toBuffer(endian, length) {\n assert4(typeof Buffer3 !== \"undefined\");\n return this.toArrayLike(Buffer3, endian, length);\n };\n BN.prototype.toArray = function toArray2(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert4(byteLength <= reqLength, \"byte array longer than desired length\");\n assert4(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 assert4((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 assert4((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 assert4((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 assert4(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 assert4(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 assert4(carry === 0);\n assert4((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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(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 assert4(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert4(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 assert4(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 assert4(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 assert4(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert4(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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(typeof num2 === \"number\");\n assert4(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 assert4(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 assert4(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod2, 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 mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.iadd(num2);\n }\n }\n return {\n div,\n mod: mod2\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 mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod2\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 mod2(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 mod2 = 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 = mod2.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 assert4(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 assert4(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 assert4(p4.negative === 0);\n assert4(!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 assert4(p4.negative === 0);\n assert4(!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 assert4(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 assert4(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 assert4(!this.red, \"Already a number in reduction context\");\n assert4(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert4(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 assert4(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert4(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert4(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert4(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert4(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert4(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 assert4(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 split3(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 inherits2(K256, MPrime);\n K256.prototype.split = function split3(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 inherits2(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits2(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits2(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 assert4(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 assert4(a3.negative === 0, \"red works only with positives\");\n assert4(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert4((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert4(\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 assert4(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 assert4(!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 assert4(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 inherits2(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 = assert4;\n function assert4(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n assert4.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 toArray2(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 = toArray2;\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 encode7(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 mod2 = k4.andln(ws - 1);\n if (k4.isOdd()) {\n if (mod2 > (ws >> 1) - 1)\n z2 = (ws >> 1) - mod2;\n else\n z2 = mod2;\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/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/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/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/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 (e2) {\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 assert4 = 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 validate4() {\n throw new Error(\"Not implemented\");\n };\n BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p4, k4) {\n assert4(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 assert4(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 validate4() {\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 assert4(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 7)\n assert4(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 encode7(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 inherits2(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 inherits2(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 inherits2 = require_inherits_browser();\n var Base = require_base();\n var assert4 = 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 inherits2(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 assert4(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 validate4(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 split3 = this._endoSplit(coeffs[i3]);\n var p4 = points[i3];\n var beta = p4._getBeta();\n if (split3.k1.negative) {\n split3.k1.ineg();\n p4 = p4.neg(true);\n }\n if (split3.k2.negative) {\n split3.k2.ineg();\n beta = beta.neg(true);\n }\n npoints[i3 * 2] = p4;\n npoints[i3 * 2 + 1] = beta;\n ncoeffs[i3 * 2] = split3.k1;\n ncoeffs[i3 * 2 + 1] = split3.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 inherits2(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 toJSON2() {\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 inherits2(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 e2 = a3.redAdd(a3).redIAdd(a3);\n var f6 = e2.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 = e2.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 e2 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e2 = e2.redIAdd(e2);\n e2 = e2.redAdd(e2).redIAdd(e2);\n e2 = e2.redISub(mm);\n var ee = e2.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(e2).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(e2.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n var nz = this.z.redAdd(e2).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 inherits2 = 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 inherits2(MontCurve, Base);\n module.exports = MontCurve;\n MontCurve.prototype.validate = function validate4(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 inherits2(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 normalize3() {\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 inherits2 = require_inherits_browser();\n var Base = require_base();\n var assert4 = 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 assert4(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n }\n inherits2(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 validate4(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 inherits2(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 e2 = 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 = e2.redMul(f6);\n var ny = g4.redMul(h4);\n var nt = e2.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 e2;\n var h4;\n var j2;\n if (this.curve.twisted) {\n e2 = this.curve._mulA(c4);\n var f6 = e2.redAdd(d5);\n if (this.zOne) {\n nx = b4.redSub(c4).redSub(d5).redMul(f6.redSub(this.curve.two));\n ny = f6.redMul(e2.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(e2.redSub(d5));\n nz = f6.redMul(j2);\n }\n } else {\n e2 = c4.redAdd(d5);\n h4 = this.curve._mulC(this.z).redSqr();\n j2 = e2.redSub(h4).redSub(h4);\n nx = this.curve._mulC(b4.redISub(e2)).redMul(j2);\n ny = this.curve._mulC(e2).redMul(c4.redISub(d5));\n nz = e2.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 e2 = b4.redSub(a3);\n var f6 = d5.redSub(c4);\n var g4 = d5.redAdd(c4);\n var h4 = b4.redAdd(a3);\n var nx = e2.redMul(f6);\n var ny = g4.redMul(h4);\n var nt = e2.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 e2 = this.curve.d.redMul(c4).redMul(d5);\n var f6 = b4.redSub(e2);\n var g4 = b4.redAdd(e2);\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 normalize3() {\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 assert4 = require_minimalistic_assert();\n var inherits2 = require_inherits_browser();\n exports3.inherits = inherits2;\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 toArray2(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 = toArray2;\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 assert4(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, e2) {\n return a3 + b4 + c4 + d5 + e2 >>> 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 assert4 = 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 assert4(this.pending === null);\n return this._digest(enc);\n };\n BlockHash.prototype._pad = function pad4() {\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 e2 = 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), e2, W[i3], sha1_K[s4]);\n e2 = 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], e2);\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 assert4 = 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 e2 = this.h[4];\n var f6 = this.h[5];\n var g4 = this.h[6];\n var h4 = this.h[7];\n assert4(this.k.length === W.length);\n for (i3 = 0; i3 < W.length; i3++) {\n var T1 = sum32_5(h4, s1_256(e2), ch32(e2, 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 = e2;\n e2 = 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], e2);\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 assert4 = 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 assert4(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 assert4 = require_minimalistic_assert();\n function Hmac(hash2, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash2, key, enc);\n this.Hash = hash2;\n this.blockSize = hash2.blockSize / 8;\n this.outSize = hash2.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 init2(key) {\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert4(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 hash2 = exports3;\n hash2.utils = require_utils4();\n hash2.common = require_common();\n hash2.sha = require_sha();\n hash2.ripemd = require_ripemd();\n hash2.hmac = require_hmac();\n hash2.sha1 = hash2.sha.sha1;\n hash2.sha256 = hash2.sha.sha256;\n hash2.sha224 = hash2.sha.sha224;\n hash2.sha384 = hash2.sha.sha384;\n hash2.sha512 = hash2.sha.sha512;\n hash2.ripemd160 = hash2.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 hash2 = require_hash();\n var curve = require_curve();\n var utils = require_utils3();\n var assert4 = 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 assert4(this.g.validate(), \"Invalid curve\");\n assert4(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: hash2.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: hash2.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: hash2.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: hash2.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: hash2.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: hash2.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: hash2.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 (e2) {\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: hash2.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 hash2 = require_hash();\n var utils = require_utils2();\n var assert4 = 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 assert4(\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 init2(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 hash2.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 assert4(\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 assert4 = 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 validate4() {\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 assert4(key.x, \"Need x coordinate\");\n } else if (this.ec.curve.type === \"short\" || this.ec.curve.type === \"edwards\") {\n assert4(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 assert4(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 assert4 = utils.assert;\n function Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n if (this._importDER(options, enc))\n return;\n assert4(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 = Signature;\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 Signature.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 Signature.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 assert4 = utils.assert;\n var KeyPair = require_key();\n var Signature = require_signature();\n function EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n if (typeof options === \"string\") {\n assert4(\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 assert4(\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 assert4(msg.length >>> 0 === msg.length);\n for (var i3 = 0; i3 < msg.length; i3++)\n assert4((msg[i3] & 255) === msg[i3]);\n }\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(msg, false, options.msgBitLength);\n assert4(!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 assert4(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 Signature({ 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 Signature(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 assert4((3 & j2) === j2, \"The recovery param is more than two bits\");\n signature = new Signature(signature, enc);\n var n2 = this.n;\n var e2 = 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(e2).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(e2, signature, Q2, enc) {\n signature = new Signature(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(e2, signature, i3);\n } catch (e3) {\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 assert4 = 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 hash2 = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n var a3 = hash2.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 hash2() {\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 assert4(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 assert4(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 assert4 = utils.assert;\n var cachedProperty = utils.cachedProperty;\n var parseBytes = utils.parseBytes;\n function Signature(eddsa, sig) {\n this.eddsa = eddsa;\n if (typeof sig !== \"object\")\n sig = parseBytes(sig);\n if (Array.isArray(sig)) {\n assert4(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 assert4(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(Signature, \"S\", function S3() {\n return this.eddsa.decodeInt(this.Sencoded());\n });\n cachedProperty(Signature, \"R\", function R3() {\n return this.eddsa.decodePoint(this.Rencoded());\n });\n cachedProperty(Signature, \"Rencoded\", function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n });\n cachedProperty(Signature, \"Sencoded\", function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n });\n Signature.prototype.toBytes = function toBytes4() {\n return this.Rencoded().concat(this.Sencoded());\n };\n Signature.prototype.toHex = function toHex3() {\n return utils.encode(this.toBytes(), \"hex\").toUpperCase();\n };\n module.exports = Signature;\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 hash2 = require_hash();\n var curves = require_curves();\n var utils = require_utils3();\n var assert4 = utils.assert;\n var parseBytes = utils.parseBytes;\n var KeyPair = require_key2();\n var Signature = require_signature2();\n function EDDSA(curve) {\n assert4(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 = hash2.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 hash3 = this.hash();\n for (var i3 = 0; i3 < arguments.length; i3++)\n hash3.update(arguments[i3]);\n return utils.intFromLE(hash3.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 Signature)\n return sig;\n return new Signature(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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EC = void 0;\n var elliptic_1 = __importDefault2(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 logger3 = 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 logger3.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 logger3.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 recoverPublicKey2(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 = recoverPublicKey2;\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 logger3.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 __createBinding2 = 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 __setModuleDefault2 = 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 __importStar2 = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 in mod2)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod2, k4))\n __createBinding2(result, mod2, k4);\n }\n __setModuleDefault2(result, mod2);\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 = __importStar2(require_lib6());\n var signing_key_1 = require_lib16();\n var logger_1 = require_lib();\n var _version_1 = require_version13();\n var logger3 = 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 recoverAddress2(digest, signature) {\n return computeAddress((0, signing_key_1.recoverPublicKey)((0, bytes_1.arrayify)(digest), signature));\n }\n exports3.recoverAddress = recoverAddress2;\n function formatNumber(value, name) {\n var result = (0, bytes_1.stripZeros)(bignumber_1.BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n } else if (sig.v !== v2) {\n logger3.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 logger3.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 logger3.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 logger3.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 = recoverAddress2(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 logger3.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 logger3.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 logger3.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 = recoverAddress2(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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 __spreadArray2 = exports3 && exports3.__spreadArray || function(to, from5, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from5.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from5)) {\n if (!ar)\n ar = Array.prototype.slice.call(from5, 0, i3);\n ar[i3] = from5[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from5));\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 logger3 = 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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, nameOrPromise];\n case 1:\n name = _a2.sent();\n if (typeof name !== \"string\") {\n logger3.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 logger3.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 = _a2.sent();\n if (address == null) {\n logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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, _a2.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, _a2.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, _a2.sent()];\n case 6:\n if (!(paramType.baseType === \"array\"))\n return [3, 8];\n if (!Array.isArray(value)) {\n return [2, Promise.reject(logger3.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, _a2.sent()];\n case 8:\n return [2, value];\n }\n });\n });\n }\n function populateTransaction(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 __generator2(this, function(_a2) {\n switch (_a2.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 logger3.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 __generator2(this, function(_a3) {\n if ((0, address_1.getAddress)(check.signer) !== check.override) {\n logger3.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 = _a2.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 logger3.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 logger3.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 populateTransaction(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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (!signerOrProvider) {\n logger3.throwError(\"estimate require a provider or signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n });\n }\n return [4, populateTransaction(contract, fragment, args)];\n case 1:\n tx = _a2.sent();\n return [4, signerOrProvider.estimateGas(tx)];\n case 2:\n return [2, _a2.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 (e2) {\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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n _a2.label = 2;\n case 2:\n delete overrides.blockTag;\n args.push(overrides);\n _a2.label = 3;\n case 3:\n if (!(contract.deployTransaction != null))\n return [3, 5];\n return [4, contract._deployed(blockTag)];\n case 4:\n _a2.sent();\n _a2.label = 5;\n case 5:\n return [4, populateTransaction(contract, fragment, args)];\n case 6:\n tx = _a2.sent();\n return [4, signerOrProvider.call(tx, blockTag)];\n case 7:\n result = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (!contract.signer) {\n logger3.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 _a2.sent();\n _a2.label = 2;\n case 2:\n return [4, populateTransaction(contract, fragment, args)];\n case 3:\n txRequest = _a2.sent();\n return [4, contract.signer.sendTransaction(txRequest)];\n case 4:\n tx = _a2.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(filter2) {\n if (filter2.address && (filter2.topics == null || filter2.topics.length === 0)) {\n return \"*\";\n }\n return (filter2.address || \"*\") + \"@\" + (filter2.topics ? filter2.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, filter2) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"filter\", filter2);\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 __extends2(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 __extends2(FragmentRunningEvent2, _super);\n function FragmentRunningEvent2(address, contractInterface, fragment, topics) {\n var _this = this;\n var filter2 = {\n address\n };\n var topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) {\n logger3.throwArgumentError(\"topic mismatch\", \"topics\", topics);\n }\n filter2.topics = topics.slice();\n } else {\n filter2.topics = [topic];\n }\n _this = _super.call(this, getEventTag(filter2), filter2) || 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 __extends2(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 logger3.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 logger3.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 logger3.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 logger3.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(e2) {\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 logger3.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 (e2) {\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 logger3.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 logger3.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 logger3.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 filter2 = {\n address: this.address,\n topics: eventName.topics\n };\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter2), filter2));\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 logger3.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, __spreadArray2([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 filter2 = (0, properties_1.shallowCopy)(runningEvent.filter);\n if (typeof fromBlockOrBlockhash === \"string\" && (0, bytes_1.isHexString)(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger3.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n filter2.blockHash = fromBlockOrBlockhash;\n } else {\n filter2.fromBlock = fromBlockOrBlockhash != null ? fromBlockOrBlockhash : 0;\n filter2.toBlock = toBlock != null ? toBlock : \"latest\";\n }\n return this.provider.getLogs(filter2).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 Contract2 = (\n /** @class */\n function(_super) {\n __extends2(Contract3, _super);\n function Contract3() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Contract3;\n }(BaseContract)\n );\n exports3.Contract = Contract2;\n var ContractFactory2 = (\n /** @class */\n function() {\n function ContractFactory3(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 logger3.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n if (signer && !abstract_signer_1.Signer.isSigner(signer)) {\n logger3.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 ContractFactory3.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 logger3.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 logger3.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 logger3.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 ContractFactory3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n overrides = {};\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n logger3.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 = _a2.sent();\n params.push(overrides);\n unsignedTx = this.getDeployTransaction.apply(this, params);\n return [4, this.signer.sendTransaction(unsignedTx)];\n case 2:\n tx = _a2.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 ContractFactory3.prototype.attach = function(address) {\n return this.constructor.getContract(address, this.interface, this.signer);\n };\n ContractFactory3.prototype.connect = function(signer) {\n return new this.constructor(this.interface, this.bytecode, signer);\n };\n ContractFactory3.fromSolidity = function(compilerOutput, signer) {\n if (compilerOutput == null) {\n logger3.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 ContractFactory3.getInterface = function(contractInterface) {\n return Contract2.getInterface(contractInterface);\n };\n ContractFactory3.getContractAddress = function(tx) {\n return (0, address_1.getContractAddress)(tx);\n };\n ContractFactory3.getContract = function(address, contractInterface, signer) {\n return new Contract2(address, contractInterface, signer);\n };\n return ContractFactory3;\n }()\n );\n exports3.ContractFactory = ContractFactory2;\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 string = \"\";\n for (var k4 = 0; source[k4] === 0 && k4 < source.length - 1; ++k4) {\n string += this._leader;\n }\n for (var q3 = digits.length - 1; q3 >= 0; --q3) {\n string += this.alphabet[digits[q3]];\n }\n return string;\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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computeHmac = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = void 0;\n var hash_js_1 = __importDefault2(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 logger3 = 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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 normalize3(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 = normalize3(a3);\n b4 = normalize3(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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, length) {\n length += 4;\n for (var i3 = 0; i3 < data2.length; i3 += length) {\n var word = \"\";\n for (var j2 = 0; j2 < length; 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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 logger3 = 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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3 = new logger_1.Logger(_version_1.version);\n function getGlobal2() {\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 = getGlobal2();\n var crypto3 = anyGlobal.crypto || anyGlobal.msCrypto;\n if (!crypto3 || !crypto3.getRandomValues) {\n logger3.warn(\"WARNING: Missing strong random number source\");\n crypto3 = {\n getRandomValues: function(buffer2) {\n return logger3.throwError(\"no secure random source avaialble\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n }\n function randomBytes2(length) {\n if (length <= 0 || length > 1024 || length % 1 || length != length) {\n logger3.throwArgumentError(\"invalid length\", \"length\", length);\n }\n var result = new Uint8Array(length);\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(array) {\n array = array.slice();\n for (var i3 = array.length - 1; i3 > 0; i3--) {\n var j2 = Math.floor(Math.random() * (i3 + 1));\n var tmp = array[i3];\n array[i3] = array[j2];\n array[j2] = tmp;\n }\n return array;\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(length) {\n return new Uint8Array(length);\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 toBytes4(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 fromBytes2(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: toBytes4,\n fromBytes: fromBytes2\n };\n }();\n var convertHex = /* @__PURE__ */ function() {\n function toBytes4(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 Hex = \"0123456789abcdef\";\n function fromBytes2(bytes) {\n var result = [];\n for (var i3 = 0; i3 < bytes.length; i3++) {\n var v2 = bytes[i3];\n result.push(Hex[(v2 & 240) >> 4] + Hex[v2 & 15]);\n }\n return result.join(\"\");\n }\n return {\n toBytes: toBytes4,\n fromBytes: fromBytes2\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 length = data.length - padder;\n for (var i3 = 0; i3 < padder; i3++) {\n if (data[length + i3] !== padder) {\n throw new Error(\"PKCS#7 invalid padding byte\");\n }\n }\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\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, length) {\n value = String(value);\n while (value.length < length) {\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(object, path) {\n var currentChild = object;\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decrypt = exports3.CrowdsaleAccount = void 0;\n var aes_js_1 = __importDefault2(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 logger3 = new logger_1.Logger(_version_1.version);\n var utils_1 = require_utils5();\n var CrowdsaleAccount = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.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, e2 = 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 = (((e2 >>> 6 | e2 << 32 - 6) ^ (e2 >>> 11 | e2 << 32 - 11) ^ (e2 >>> 25 | e2 << 32 - 25)) + (e2 & f6 ^ ~e2 & 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 = e2;\n e2 = 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 + e2 | 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, length) {\n while (length--) {\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encrypt = exports3.decrypt = exports3.decryptSync = exports3.KeystoreAccount = void 0;\n var aes_js_1 = __importDefault2(require_aes_js());\n var scrypt_js_1 = __importDefault2(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 logger3 = 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 __extends2(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 logger3.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 logger3.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 (e2) {\n return Promise.reject(e2);\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 now2 = /* @__PURE__ */ new Date();\n var timestamp = now2.getUTCFullYear() + \"-\" + (0, utils_1.zpad)(now2.getUTCMonth() + 1, 2) + \"-\" + (0, utils_1.zpad)(now2.getUTCDate(), 2) + \"T\" + (0, utils_1.zpad)(now2.getUTCHours(), 2) + \"-\" + (0, utils_1.zpad)(now2.getUTCMinutes(), 2) + \"-\" + (0, utils_1.zpad)(now2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 Wallet2 = (\n /** @class */\n function(_super) {\n __extends2(Wallet3, _super);\n function Wallet3(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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider || null);\n return _this;\n }\n Object.defineProperty(Wallet3.prototype, \"mnemonic\", {\n get: function() {\n return this._mnemonic();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet3.prototype, \"privateKey\", {\n get: function() {\n return this._signingKey().privateKey;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet3.prototype, \"publicKey\", {\n get: function() {\n return this._signingKey().publicKey;\n },\n enumerable: false,\n configurable: true\n });\n Wallet3.prototype.getAddress = function() {\n return Promise.resolve(this.address);\n };\n Wallet3.prototype.connect = function(provider) {\n return new Wallet3(this, provider);\n };\n Wallet3.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 logger3.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 Wallet3.prototype.signMessage = function(message) {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator2(this, function(_a2) {\n return [2, (0, bytes_1.joinSignature)(this._signingKey().signDigest((0, hash_1.hashMessage)(message)))];\n });\n });\n };\n Wallet3.prototype._signTypedData = function(domain2, types, value) {\n return __awaiter3(this, void 0, void 0, function() {\n var populated;\n var _this = this;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types, value, function(name) {\n if (_this.provider == null) {\n logger3.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 = _a2.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 Wallet3.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 Wallet3.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 Wallet3.fromMnemonic(mnemonic, options.path, options.locale);\n };\n Wallet3.fromEncryptedJson = function(json, password, progressCallback) {\n return (0, json_wallets_1.decryptJsonWallet)(json, password, progressCallback).then(function(account) {\n return new Wallet3(account);\n });\n };\n Wallet3.fromEncryptedJsonSync = function(json, password) {\n return new Wallet3((0, json_wallets_1.decryptJsonWalletSync)(json, password));\n };\n Wallet3.fromMnemonic = function(mnemonic, path, wordlist) {\n if (!path) {\n path = hdnode_1.defaultPath;\n }\n return new Wallet3(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n };\n return Wallet3;\n }(abstract_signer_1.Signer)\n );\n exports3.Wallet = Wallet2;\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 logger3 = 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 getNetwork3(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 logger3.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger3.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 = getNetwork3;\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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n return [4, response.arrayBuffer()];\n case 2:\n body = _a2.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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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(all3, 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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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(logger3.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 cancel = function() {\n if (timer == null) {\n return;\n }\n clearTimeout(timer);\n timer = null;\n };\n return { promise, cancel };\n }();\n var runningFetch = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var attempt2, response2, location_1, tryAgain, stall, retryAfter, error_1, body_1, result2, error_2, tryAgain, timeout_1;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n attempt2 = 0;\n _a2.label = 1;\n case 1:\n if (!(attempt2 < attemptLimit))\n return [3, 20];\n response2 = null;\n _a2.label = 2;\n case 2:\n _a2.trys.push([2, 9, , 10]);\n return [4, (0, geturl_1.getUrl)(url, options)];\n case 3:\n response2 = _a2.sent();\n if (!(attempt2 < 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(attempt2, url)];\n case 5:\n tryAgain = _a2.sent();\n _a2.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, attempt2)));\n }\n return [4, staller(stall)];\n case 7:\n _a2.sent();\n return [3, 19];\n case 8:\n return [3, 10];\n case 9:\n error_1 = _a2.sent();\n response2 = error_1.response;\n if (response2 == null) {\n runningTimeout.cancel();\n logger3.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 logger3.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 _a2.label = 11;\n case 11:\n _a2.trys.push([11, 13, , 18]);\n return [4, processFunc(body_1, response2)];\n case 12:\n result2 = _a2.sent();\n runningTimeout.cancel();\n return [2, result2];\n case 13:\n error_2 = _a2.sent();\n if (!(error_2.throttleRetry && attempt2 < attemptLimit))\n return [3, 17];\n tryAgain = true;\n if (!throttleCallback)\n return [3, 15];\n return [4, throttleCallback(attempt2, url)];\n case 14:\n tryAgain = _a2.sent();\n _a2.label = 15;\n case 15:\n if (!tryAgain)\n return [3, 17];\n timeout_1 = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt2)));\n return [4, staller(timeout_1)];\n case 16:\n _a2.sent();\n return [3, 19];\n case 17:\n runningTimeout.cancel();\n logger3.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 attempt2++;\n return [3, 1];\n case 20:\n return [2, logger3.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 fetchJson2(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 logger3.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 = fetchJson2;\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 cancel = 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 (cancel()) {\n reject(new Error(\"timeout\"));\n }\n }, options.timeout);\n }\n var retryLimit = options.retryLimit;\n var attempt2 = 0;\n function check() {\n return func().then(function(result) {\n if (result !== void 0) {\n if (cancel()) {\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 attempt2++;\n if (attempt2 > retryLimit) {\n if (cancel()) {\n reject(new Error(\"retry limit reached\"));\n }\n return;\n }\n var timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt2)));\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 (cancel()) {\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 encode7(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 split3 = str.lastIndexOf(\"1\");\n if (split3 === -1)\n return \"No separator character for \" + str;\n if (split3 === 0)\n return \"Missing prefix for \" + str;\n var prefix = str.slice(0, split3);\n var wordChars = str.slice(split3 + 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, pad4) {\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 (pad4) {\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: encode7,\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 logger3 = 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 hash2 = this.hash.bind(this);\n var hex = this.hex.bind(this);\n var number = 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: hash2,\n type,\n accessList: Formatter2.allowNull(this.accessList.bind(this), null),\n blockHash: Formatter2.allowNull(hash2, null),\n blockNumber: Formatter2.allowNull(number, null),\n transactionIndex: Formatter2.allowNull(number, null),\n confirmations: Formatter2.allowNull(number, 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: number,\n data,\n r: Formatter2.allowNull(this.uint256),\n s: Formatter2.allowNull(this.uint256),\n v: Formatter2.allowNull(number),\n creates: Formatter2.allowNull(address, null),\n raw: Formatter2.allowNull(data)\n };\n formats.transactionRequest = {\n from: Formatter2.allowNull(address),\n nonce: Formatter2.allowNull(number),\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(number),\n accessList: Formatter2.allowNull(this.accessList.bind(this), null)\n };\n formats.receiptLog = {\n transactionIndex: number,\n blockNumber: number,\n transactionHash: hash2,\n address,\n topics: Formatter2.arrayOf(hash2),\n data,\n logIndex: number,\n blockHash: hash2\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: number,\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: hash2,\n transactionHash: hash2,\n logs: Formatter2.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number,\n confirmations: Formatter2.allowNull(number, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter2.allowNull(bigNumber),\n status: Formatter2.allowNull(number),\n type\n };\n formats.block = {\n hash: Formatter2.allowNull(hash2),\n parentHash: hash2,\n number,\n timestamp: number,\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(hash2)),\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(hash2, 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(number),\n blockHash: Formatter2.allowNull(hash2),\n transactionIndex: number,\n removed: Formatter2.allowNull(this.boolean.bind(this)),\n address,\n data: Formatter2.allowFalsish(data, \"0x\"),\n topics: Formatter2.arrayOf(hash2),\n transactionHash: hash2,\n logIndex: number\n };\n return formats;\n };\n Formatter2.prototype.accessList = function(accessList) {\n return (0, transactions_1.accessListify)(accessList || []);\n };\n Formatter2.prototype.number = function(number) {\n if (number === \"0x\") {\n return 0;\n }\n return bignumber_1.BigNumber.from(number).toNumber();\n };\n Formatter2.prototype.type = function(number) {\n if (number === \"0x\" || number == null) {\n return 0;\n }\n return bignumber_1.BigNumber.from(number).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 logger3.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 logger3.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 logger3.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 logger3.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n logger3.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, object) {\n var result = {};\n for (var key in format) {\n try {\n var value = format[key](object[key]);\n if (value !== void 0) {\n result[key] = value;\n }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object[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(array) {\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n var result = [];\n array.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\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 = __importDefault2(require_bech32());\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger3 = 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 logger3.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 deserializeTopics2(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 logger3.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 = deserializeTopics2(comps[2]);\n var filter2 = {};\n if (topics.length > 0) {\n filter2.topics = topics;\n }\n if (address && address !== \"*\") {\n filter2.address = address;\n }\n return filter2;\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 length = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, offset, offset + 32)).toNumber();\n return (0, bytes_1.hexDataSlice)(result, offset + 32, offset + 32 + length);\n }\n function getIpfsLink(link2) {\n if (link2.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link2 = link2.substring(12);\n } else if (link2.match(/^ipfs:\\/\\//i)) {\n link2 = link2.substring(7);\n } else {\n logger3.throwArgumentError(\"unsupported IPFS format\", \"link\", link2);\n }\n return \"https://gateway.ipfs.io/ipfs/\" + link2;\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 __generator2(this, function(_a2) {\n switch (_a2.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 (_a2.sent()) {\n parseBytes = true;\n tx.data = (0, bytes_1.hexConcat)([\"0x9061b923\", encodeBytes3([(0, hash_1.dnsEncode)(this.name), tx.data])]);\n }\n _a2.label = 2;\n case 2:\n _a2.trys.push([2, 4, , 5]);\n return [4, this.provider.call(tx)];\n case 3:\n result = _a2.sent();\n if ((0, bytes_1.arrayify)(result).length % 32 === 4) {\n logger3.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 = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this._fetch(selector, parameters)];\n case 1:\n result = _a2.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (coinType == null) {\n coinType = 60;\n }\n if (!(coinType === 60))\n return [3, 4];\n _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, this._fetch(\"0x3b3b57de\")];\n case 2:\n result = _a2.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 = _a2.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 = _a2.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n address = this._getAddress(coinType, hexBytes);\n if (address == null) {\n logger3.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, _a2, selector, owner, _b2, comps, addr, tokenId, tokenOwner, _c, _d, balance, _e, _f, tx, metadataUrl, _g, metadata, imageUrl, ipfs, error_3;\n return __generator2(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 _a2 = scheme;\n switch (_a2) {\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 _b2 = this._resolvedAddress;\n if (_b2)\n return [3, 9];\n return [4, this.getAddress()];\n case 8:\n _b2 = _h.sent();\n _h.label = 9;\n case 9:\n owner = _b2;\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, hash2;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this._fetchBytes(\"0xbc1c58d1\")];\n case 1:\n hexBytes = _a2.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 hash2 = (0, base64_1.encode)(\"0x\" + skynet[1]).replace(/[=+\\/]/g, function(a3) {\n return urlSafe_1[a3];\n });\n return [2, \"sia://\" + hash2];\n }\n }\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 __extends2(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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, this._networkPromise];\n case 2:\n network = _a2.sent();\n return [3, 4];\n case 3:\n error_4 = _a2.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 = _a2.sent();\n _a2.label = 6;\n case 6:\n if (!network) {\n logger3.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 _a2.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 __generator2(this, function(_a2) {\n switch (_a2.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 _a2.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 = _a2.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, logger3.throwError(\"response not found during CCIP fetch: \" + errorMessage, logger_1.Logger.errors.SERVER_ERROR, { url, errorMessage })];\n }\n errorMessages.push(errorMessage);\n _a2.label = 3;\n case 3:\n i3++;\n return [3, 1];\n case 4:\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n _a2.sent();\n if (!(maxAge > 0))\n return [3, 7];\n _a2.label = 2;\n case 2:\n if (!this._internalBlockNumber)\n return [3, 7];\n internalBlockNumber = this._internalBlockNumber;\n _a2.label = 3;\n case 3:\n _a2.trys.push([3, 5, , 6]);\n return [4, internalBlockNumber];\n case 4:\n result = _a2.sent();\n if (getTime() - result.respTime <= maxAge) {\n return [2, result.blockNumber];\n }\n return [3, 7];\n case 5:\n error_5 = _a2.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(_a3) {\n var blockNumber = _a3.blockNumber, networkError = _a3.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, _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n pollId = nextPollId++;\n runners = [];\n blockNumber = null;\n _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, this._getInternalBlockNumber(100 + this.pollingInterval / 2)];\n case 2:\n blockNumber = _a2.sent();\n return [3, 4];\n case 3:\n error_6 = _a2.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 logger3.warn(\"network block skew detected; skipping block events (emitted=\" + this._emitted.block + \" blockNumber\" + blockNumber + \")\");\n this.emit(\"error\", logger3.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 __generator2(this, function(_a2) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n network = _a2.sent();\n return [4, this.detectNetwork()];\n case 2:\n currentNetwork = _a2.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 _a2.sent();\n return [2, this._network];\n case 4:\n error = logger3.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 now2 = getTime();\n if (now2 - this._fastQueryDate > 2 * this._pollingInterval) {\n this._fastQueryDate = now2;\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 __generator2(this, function(_a2) {\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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getTransactionReceipt(transactionHash)];\n case 1:\n receipt = _a2.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, stall(1e3)];\n case 1:\n _a3.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 __generator2(this, function(_a4) {\n switch (_a4.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 = _a4.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 _a4.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 = _a4.sent();\n ti = 0;\n _a4.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 = _a4.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(logger3.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(logger3.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 __generator2(this, function(_a2) {\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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, this.perform(\"getGasPrice\", {})];\n case 2:\n result = _a2.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a2.sent();\n return [4, this.perform(\"getBalance\", params)];\n case 3:\n result = _a2.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a2.sent();\n return [4, this.perform(\"getTransactionCount\", params)];\n case 3:\n result = _a2.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result).toNumber()];\n } catch (error) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a2.sent();\n return [4, this.perform(\"getCode\", params)];\n case 3:\n result = _a2.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.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 = _a2.sent();\n return [4, this.perform(\"getStorageAt\", params)];\n case 3:\n result = _a2.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger3.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, hash2, startBlock) {\n var _this = this;\n if (hash2 != null && (0, bytes_1.hexDataLength)(hash2) !== 32) {\n throw new Error(\"invalid response - sendTransaction\");\n }\n var result = tx;\n if (hash2 != null && tx.hash !== hash2) {\n logger3.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", logger_1.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash2 });\n }\n result.wait = function(confirms, timeout) {\n return __awaiter3(_this, void 0, void 0, function() {\n var replacement, receipt;\n return __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 logger3.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, hash2, error_7;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, Promise.resolve(signedTransaction).then(function(t3) {\n return (0, bytes_1.hexlify)(t3);\n })];\n case 2:\n hexTx = _a2.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 = _a2.sent();\n _a2.label = 4;\n case 4:\n _a2.trys.push([4, 6, , 7]);\n return [4, this.perform(\"sendTransaction\", { signedTransaction: hexTx })];\n case 5:\n hash2 = _a2.sent();\n return [2, this._wrapTransaction(tx, hash2, blockNumber)];\n case 6:\n error_7 = _a2.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, _a2, _b2;\n var _this = this;\n return __generator2(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 _b2 = (_a2 = this.formatter).transactionRequest;\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 2:\n return [2, _b2.apply(_a2, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._getFilter = function(filter2) {\n return __awaiter3(this, void 0, void 0, function() {\n var result, _a2, _b2;\n var _this = this;\n return __generator2(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, filter2];\n case 1:\n filter2 = _c.sent();\n result = {};\n if (filter2.address != null) {\n result.address = this._getAddress(filter2.address);\n }\n [\"blockHash\", \"topics\"].forEach(function(key) {\n if (filter2[key] == null) {\n return;\n }\n result[key] = filter2[key];\n });\n [\"fromBlock\", \"toBlock\"].forEach(function(key) {\n if (filter2[key] == null) {\n return;\n }\n result[key] = _this._getBlockTag(filter2[key]);\n });\n _b2 = (_a2 = this.formatter).filter;\n return [4, (0, properties_1.resolveProperties)(result)];\n case 2:\n return [2, _b2.apply(_a2, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._call = function(transaction, blockTag, attempt2) {\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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (attempt2 >= MAX_CCIP_REDIRECTS) {\n logger3.throwError(\"CCIP read exceeded maximum redirections\", logger_1.Logger.errors.SERVER_ERROR, {\n redirects: attempt2,\n transaction\n });\n }\n txSender = transaction.to;\n return [4, this.perform(\"call\", { transaction, blockTag })];\n case 1:\n result = _a2.sent();\n if (!(attempt2 >= 0 && blockTag === \"latest\" && txSender != null && result.substring(0, 10) === \"0x556f1830\" && (0, bytes_1.hexDataLength)(result) % 32 === 4))\n return [3, 5];\n _a2.label = 2;\n case 2:\n _a2.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 logger3.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 logger3.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 logger3.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 = _a2.sent();\n if (ccipResult == null) {\n logger3.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, attempt2 + 1)];\n case 4:\n error_8 = _a2.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, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.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 = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction)\n })];\n case 2:\n params = _a2.sent();\n return [4, this.perform(\"estimateGas\", params)];\n case 3:\n result = _a2.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, addressOrName];\n case 1:\n addressOrName = _a2.sent();\n if (typeof addressOrName !== \"string\") {\n logger3.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n return [4, this.resolveName(addressOrName)];\n case 2:\n address = _a2.sent();\n if (address == null) {\n logger3.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, _a2, error_9;\n var _this = this;\n return __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _b2.sent();\n return [4, blockHashOrBlockTag];\n case 2:\n blockHashOrBlockTag = _b2.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 _b2.trys.push([3, 5, , 6]);\n _a2 = params;\n return [4, this._getBlockTag(blockHashOrBlockTag)];\n case 4:\n _a2.blockTag = _b2.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 = _b2.sent();\n logger3.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n return [4, this.perform(\"getBlock\", params)];\n case 1:\n block = _a3.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 _a3.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 = _a3.sent();\n _a3.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 _a3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a2.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n return [4, this.perform(\"getTransaction\", params)];\n case 1:\n result = _a3.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 = _a3.sent();\n confirmations = blockNumber - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a2.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n return [4, this.perform(\"getTransactionReceipt\", params)];\n case 1:\n result = _a3.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 = _a3.sent();\n confirmations = blockNumber - receipt.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n receipt.confirmations = confirmations;\n _a3.label = 4;\n case 4:\n return [2, receipt];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getLogs = function(filter2) {\n return __awaiter3(this, void 0, void 0, function() {\n var params, logs;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.sent();\n return [4, (0, properties_1.resolveProperties)({ filter: this._getFilter(filter2) })];\n case 2:\n params = _a2.sent();\n return [4, this.perform(\"getLogs\", params)];\n case 3:\n logs = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, blockTag];\n case 1:\n blockTag = _a2.sent();\n if (!(typeof blockTag === \"number\" && blockTag < 0))\n return [3, 3];\n if (blockTag % 1) {\n logger3.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 2:\n blockNumber = _a2.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, _a2;\n return __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n currentName = name;\n _b2.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 = _b2.sent();\n if (!(addr != null))\n return [3, 5];\n resolver = new Resolver(this, addr, name);\n _a2 = currentName !== name;\n if (!_a2)\n return [3, 4];\n return [4, resolver.supportsWildcard()];\n case 3:\n _a2 = !_b2.sent();\n _b2.label = 4;\n case 4:\n if (_a2) {\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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (operation == null) {\n operation = \"ENS\";\n }\n return [4, this.getNetwork()];\n case 1:\n network = _a2.sent();\n if (!network.ensAddress) {\n logger3.throwError(\"network does not support ENS\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name });\n }\n _a2.label = 2;\n case 2:\n _a2.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 = _a2.sent();\n return [2, this.formatter.callAddress(addrData)];\n case 4:\n error_10 = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, name];\n case 1:\n name = _a2.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 logger3.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n return [4, this.getResolver(name)];\n case 2:\n resolver = _a2.sent();\n if (!resolver) {\n return [2, null];\n }\n return [4, resolver.getAddress()];\n case 3:\n return [2, _a2.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, _a2, addr;\n return __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, address];\n case 1:\n address = _b2.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 = _b2.sent();\n if (resolverAddr == null) {\n return [2, null];\n }\n _a2 = _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 = _a2.apply(void 0, [_b2.sent(), 0]);\n return [4, this.resolveName(name)];\n case 4:\n addr = _b2.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, _a2, error_12, avatar;\n return __generator2(this, function(_b2) {\n switch (_b2.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 = _b2.sent();\n if (!resolverAddress) {\n return [2, null];\n }\n resolver = new Resolver(this, resolverAddress, node);\n _b2.label = 2;\n case 2:\n _b2.trys.push([2, 4, , 5]);\n return [4, resolver.getAvatar()];\n case 3:\n avatar_1 = _b2.sent();\n if (avatar_1) {\n return [2, avatar_1.url];\n }\n return [3, 5];\n case 4:\n error_11 = _b2.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 _b2.trys.push([5, 8, , 9]);\n _a2 = _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 = _a2.apply(void 0, [_b2.sent(), 0]);\n return [4, this.getResolver(name_1)];\n case 7:\n resolver = _b2.sent();\n return [3, 9];\n case 8:\n error_12 = _b2.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 = _b2.sent();\n if (!resolver) {\n return [2, null];\n }\n _b2.label = 12;\n case 12:\n return [4, resolver.getAvatar()];\n case 13:\n avatar = _b2.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 logger3.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(e2) {\n return e2.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._stopEvent = function(event) {\n this.polling = this._events.filter(function(e2) {\n return e2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 getResult2(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 __extends2(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 logger3.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n return _this;\n }\n JsonRpcSigner2.prototype.connect = function(provider) {\n return logger3.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n if (address == null) {\n logger3.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(_a2) {\n var tx = _a2.tx, sender = _a2.sender;\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger3.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(hash2) {\n return hash2;\n }, function(error) {\n if (typeof error.message === \"string\" && error.message.match(/user denied/i)) {\n logger3.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 logger3.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, hash2, error_1;\n var _this = this;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval)];\n case 1:\n blockNumber = _a2.sent();\n return [4, this.sendUncheckedTransaction(transaction)];\n case 2:\n hash2 = _a2.sent();\n _a2.label = 3;\n case 3:\n _a2.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 __generator2(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n return [4, this.provider.getTransaction(hash2)];\n case 1:\n tx = _a3.sent();\n if (tx === null) {\n return [2, void 0];\n }\n return [2, this.provider._wrapTransaction(tx, hash2, blockNumber)];\n }\n });\n });\n }, { oncePoll: this.provider })];\n case 4:\n return [2, _a2.sent()];\n case 5:\n error_1 = _a2.sent();\n error_1.transactionHash = hash2;\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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n _a2.label = 2;\n case 2:\n _a2.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, _a2.sent()];\n case 4:\n error_2 = _a2.sent();\n if (typeof error_2.message === \"string\" && error_2.message.match(/user denied/i)) {\n logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n _a2.label = 2;\n case 2:\n _a2.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, _a2.sent()];\n case 4:\n error_3 = _a2.sent();\n if (typeof error_3.message === \"string\" && error_3.message.match(/user denied/i)) {\n logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n return [4, this.getAddress()];\n case 2:\n address = _a2.sent();\n _a2.label = 3;\n case 3:\n _a2.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, _a2.sent()];\n case 5:\n error_4 = _a2.sent();\n if (typeof error_4.message === \"string\" && error_4.message.match(/user denied/i)) {\n logger3.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 __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n provider = this.provider;\n return [4, this.getAddress()];\n case 1:\n address = _a2.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 __extends2(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(hash2) {\n return {\n hash: hash2,\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(hash2, 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 JsonRpcProvider2 = (\n /** @class */\n function(_super) {\n __extends2(JsonRpcProvider3, _super);\n function JsonRpcProvider3(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(JsonRpcProvider3.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 JsonRpcProvider3.defaultUrl = function() {\n return \"http://localhost:8545\";\n };\n JsonRpcProvider3.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 JsonRpcProvider3.prototype._uncachedDetectNetwork = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var chainId, error_5, error_6, getNetwork3;\n return __generator2(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, timer(0)];\n case 1:\n _a2.sent();\n chainId = null;\n _a2.label = 2;\n case 2:\n _a2.trys.push([2, 4, , 9]);\n return [4, this.send(\"eth_chainId\", [])];\n case 3:\n chainId = _a2.sent();\n return [3, 9];\n case 4:\n error_5 = _a2.sent();\n _a2.label = 5;\n case 5:\n _a2.trys.push([5, 7, , 8]);\n return [4, this.send(\"net_version\", [])];\n case 6:\n chainId = _a2.sent();\n return [3, 8];\n case 7:\n error_6 = _a2.sent();\n return [3, 8];\n case 8:\n return [3, 9];\n case 9:\n if (chainId != null) {\n getNetwork3 = (0, properties_1.getStatic)(this.constructor, \"getNetwork\");\n try {\n return [2, getNetwork3(bignumber_1.BigNumber.from(chainId).toNumber())];\n } catch (error) {\n return [2, logger3.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, logger3.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n })];\n }\n });\n });\n };\n JsonRpcProvider3.prototype.getSigner = function(addressOrIndex) {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n };\n JsonRpcProvider3.prototype.getUncheckedSigner = function(addressOrIndex) {\n return this.getSigner(addressOrIndex).connectUnchecked();\n };\n JsonRpcProvider3.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 JsonRpcProvider3.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), getResult2).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 JsonRpcProvider3.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 JsonRpcProvider3.prototype.perform = function(method, params) {\n return __awaiter3(this, void 0, void 0, function() {\n var tx, feeData, args, error_7;\n return __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 _a2.label = 2;\n case 2:\n args = this.prepareRequest(method, params);\n if (args == null) {\n logger3.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n _a2.label = 3;\n case 3:\n _a2.trys.push([3, 5, , 6]);\n return [4, this.send(args[0], args[1])];\n case 4:\n return [2, _a2.sent()];\n case 5:\n error_7 = _a2.sent();\n return [2, checkError(method, error_7, params)];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcProvider3.prototype._startEvent = function(event) {\n if (event.tag === \"pending\") {\n this._startPending();\n }\n _super.prototype._startEvent.call(this, event);\n };\n JsonRpcProvider3.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(hash2) {\n self2._emitted[\"t:\" + hash2.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self2.getTransaction(hash2).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 JsonRpcProvider3.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 JsonRpcProvider3.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 JsonRpcProvider3;\n }(base_provider_1.BaseProvider)\n );\n exports3.JsonRpcProvider = JsonRpcProvider2;\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = new logger_1.Logger(_version_1.version);\n var NextId = 1;\n var WebSocketProvider2 = (\n /** @class */\n function(_super) {\n __extends2(WebSocketProvider3, _super);\n function WebSocketProvider3(url, network) {\n var _this = this;\n if (network === \"any\") {\n logger3.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(WebSocketProvider3.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 WebSocketProvider3.prototype.detectNetwork = function() {\n return this._detectNetwork;\n };\n Object.defineProperty(WebSocketProvider3.prototype, \"pollingInterval\", {\n get: function() {\n return 0;\n },\n set: function(value) {\n logger3.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 WebSocketProvider3.prototype.resetEventsBlock = function(blockNumber) {\n logger3.throwError(\"cannot reset events block on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n };\n WebSocketProvider3.prototype.poll = function() {\n return __awaiter3(this, void 0, void 0, function() {\n return __generator2(this, function(_a2) {\n return [2, null];\n });\n });\n };\n Object.defineProperty(WebSocketProvider3.prototype, \"polling\", {\n set: function(value) {\n if (!value) {\n return;\n }\n logger3.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 WebSocketProvider3.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 WebSocketProvider3.defaultUrl = function() {\n return \"ws://localhost:8546\";\n };\n WebSocketProvider3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n this._subs[subId] = { tag, processFunc };\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n WebSocketProvider3.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 hash2 = event2.hash;\n _this.getTransactionReceipt(hash2).then(function(receipt) {\n if (!receipt) {\n return;\n }\n _this.emit(hash2, receipt);\n });\n };\n emitReceipt_1(event);\n this._subscribe(\"tx\", [\"newHeads\"], function(result) {\n _this._events.filter(function(e2) {\n return e2.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 WebSocketProvider3.prototype._stopEvent = function(event) {\n var _this = this;\n var tag = event.tag;\n if (event.type === \"tx\") {\n if (this._events.filter(function(e2) {\n return e2.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 WebSocketProvider3.prototype.destroy = function() {\n return __awaiter3(this, void 0, void 0, function() {\n var _this = this;\n return __generator2(this, function(_a2) {\n switch (_a2.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 _a2.sent();\n _a2.label = 2;\n case 2:\n this.websocket.close(1e3);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n return WebSocketProvider3;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.WebSocketProvider = WebSocketProvider2;\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 __extends2(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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.sent();\n if (!network) {\n logger3.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 _a2.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 __extends2(UrlJsonRpcProvider2, _super);\n function UrlJsonRpcProvider2(network, apiKey) {\n var _newTarget = this.constructor;\n var _this = this;\n logger3.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 logger3.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 logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 AlchemyWebSocketProvider2 = (\n /** @class */\n function(_super) {\n __extends2(AlchemyWebSocketProvider3, _super);\n function AlchemyWebSocketProvider3(network, apiKey) {\n var _this = this;\n var provider = new AlchemyProvider2(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 AlchemyWebSocketProvider3.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyWebSocketProvider3;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.AlchemyWebSocketProvider = AlchemyWebSocketProvider2;\n var AlchemyProvider2 = (\n /** @class */\n function(_super) {\n __extends2(AlchemyProvider3, _super);\n function AlchemyProvider3() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AlchemyProvider3.getWebSocketProvider = function(network, apiKey) {\n return new AlchemyWebSocketProvider2(network, apiKey);\n };\n AlchemyProvider3.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n if (apiKey && typeof apiKey !== \"string\") {\n logger3.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n };\n AlchemyProvider3.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 logger3.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return {\n allowGzip: true,\n url: \"https://\" + host + apiKey,\n throttleCallback: function(attempt2, url) {\n if (apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n };\n AlchemyProvider3.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyProvider3;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AlchemyProvider = AlchemyProvider2;\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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 logger3.throwArgumentError(\"unsupported network\", \"name\", name);\n }\n var AnkrProvider = (\n /** @class */\n function(_super) {\n __extends2(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(attempt2, 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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = new logger_1.Logger(_version_1.version);\n var CloudflareProvider = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = 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 getResult2(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 e2 = error.error;\n if (e2 && (e2.message.match(/reverted/i) || e2.message.match(/VM execution error/i))) {\n var data = e2.data;\n if (data) {\n data = \"0x\" + data.replace(/^.*0x/i, \"\");\n }\n if ((0, bytes_1.isHexString)(data)) {\n return data;\n }\n logger3.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 logger3.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 logger3.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 logger3.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 logger3.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 __extends2(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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 : getResult2;\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n connection = {\n url,\n throttleSlotInterval: 1e3,\n throttleCallback: function(attempt2, 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 = _a2.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 __generator2(this, function(_a2) {\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 _a2, postData, error_1, postData, error_2, args, topic0, logs, blocks, i3, log, block, _b2;\n return __generator2(this, function(_c) {\n switch (_c.label) {\n case 0:\n _a2 = method;\n switch (_a2) {\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 logger3.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 logger3.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 _b2 = parseFloat;\n return [4, this.fetch(\"stats\", { action: \"ethprice\" })];\n case 27:\n return [2, _b2.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 _a2;\n var _this = this;\n return __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n _a2 = {\n action: \"txlist\"\n };\n return [4, this.resolveName(addressOrName)];\n case 1:\n params = (_a2.address = _b2.sent(), _a2.startblock = startBlock == null ? 0 : startBlock, _a2.endblock = endBlock == null ? 99999999 : endBlock, _a2.sort = \"asc\", _a2);\n return [4, this.fetch(\"account\", params)];\n case 2:\n result = _b2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __generator2 = 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 (e2) {\n op = [6, e2];\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 logger3 = new logger_1.Logger(_version_1.version);\n function now2() {\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 logger3.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 cancel = null;\n var timer = null;\n var promise = new Promise(function(resolve) {\n cancel = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n };\n timer = setTimeout(cancel, 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, 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, now3) {\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 (now3) {\n result.duration = now3 - 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(normalize3, quorum) {\n return function(configs) {\n var tally = {};\n configs.forEach(function(c4) {\n var value = normalize3(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 normalize3 = 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 normalize3 = 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 normalize3 = 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 normalize3 = 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(normalize3, provider.quorum);\n }\n function waitForSync(config2, blockNumber) {\n return __awaiter3(this, void 0, void 0, function() {\n var provider;\n return __generator2(this, function(_a2) {\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, _a2, filter2;\n return __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n provider = config2.provider;\n _a2 = method;\n switch (_a2) {\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 = _b2.sent();\n _b2.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 = _b2.sent();\n _b2.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 = _b2.sent();\n _b2.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 = _b2.sent();\n _b2.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 filter2 = params.filter;\n if (!(filter2.fromBlock && (0, bytes_1.isHexString)(filter2.fromBlock) || filter2.toBlock && (0, bytes_1.isHexString)(filter2.toBlock)))\n return [3, 18];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 17:\n provider = _b2.sent();\n _b2.label = 18;\n case 18:\n return [2, provider.getLogs(filter2)];\n case 19:\n return [2, logger3.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 __extends2(FallbackProvider2, _super);\n function FallbackProvider2(providers, quorum) {\n var _this = this;\n if (providers.length === 0) {\n logger3.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 logger3.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 logger3.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 __generator2(this, function(_a2) {\n switch (_a2.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 = _a2.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 _a2.sent();\n _a2.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 __generator2(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n t0 = now2();\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 = now2();\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, now2()),\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, now2()),\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 _b2.sent();\n _b2.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 _b2.sent();\n _b2.label = 4;\n case 4:\n first = false;\n _b2.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 e2 = tally.error;\n var props = {};\n ForwardProperties.forEach(function(name) {\n if (e2[name] == null) {\n return;\n }\n props[name] = e2[name];\n });\n logger3.throwError(e2.reason || e2.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 _a2.label = 5;\n case 5:\n if (false)\n return [3, 7];\n return [5, _loop_1()];\n case 6:\n state_1 = _a2.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, logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 __extends2(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 logger3.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 __extends2(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 logger3.assertArgument(typeof apiKey.projectId === \"string\", \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger3.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 logger3.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(attempt2, 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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 __extends2(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 batch2 = _this._pendingBatch;\n _this._pendingBatch = null;\n _this._pendingBatchAggregator = null;\n var request2 = batch2.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 batch2.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 batch2.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"ETHERS_JS_SHARED\";\n var NodesmithProvider = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n NodesmithProvider2.getUrl = function(network, apiKey) {\n logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 __extends2(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 logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\n var QuickNodeProvider = (\n /** @class */\n function(_super) {\n __extends2(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 logger3.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 logger3.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 __extends2 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var 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 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 extendStatics2(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 logger3 = 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 __extends2(Web3Provider2, _super);\n function Web3Provider2(provider, network) {\n var _this = this;\n if (provider == null) {\n logger3.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 logger3.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 logger3 = 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 logger3.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n var n2 = (0, networks_1.getNetwork)(network);\n if (!n2 || !n2._defaultProvider) {\n logger3.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 logger3 = new logger_1.Logger(_version_1.version);\n function _pack(type, value, isArray2) {\n switch (type) {\n case \"address\":\n if (isArray2) {\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 (isArray2) {\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 size5 = parseInt(match[2] || \"256\");\n if (match[2] && String(size5) !== match[2] || size5 % 8 !== 0 || size5 === 0 || size5 > 256) {\n logger3.throwArgumentError(\"invalid number type\", \"type\", type);\n }\n if (isArray2) {\n size5 = 256;\n }\n value = bignumber_1.BigNumber.from(value).toTwos(size5);\n return (0, bytes_1.zeroPad)(value, size5 / 8);\n }\n match = type.match(regexBytes);\n if (match) {\n var size5 = parseInt(match[1]);\n if (String(size5) !== match[1] || size5 === 0 || size5 > 32) {\n logger3.throwArgumentError(\"invalid bytes type\", \"type\", type);\n }\n if ((0, bytes_1.arrayify)(value).byteLength !== size5) {\n logger3.throwArgumentError(\"invalid value for \" + type, \"value\", value);\n }\n if (isArray2) {\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 logger3.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 logger3.throwArgumentError(\"invalid type\", \"type\", type);\n }\n function pack(types, values) {\n if (types.length != values.length) {\n logger3.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 logger3 = 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 logger3.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 formatUnits3(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 = formatUnits3;\n function parseUnits2(value, unitName) {\n if (typeof value !== \"string\") {\n logger3.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 = parseUnits2;\n function formatEther3(wei) {\n return formatUnits3(wei, 18);\n }\n exports3.formatEther = formatEther3;\n function parseEther2(ether) {\n return parseUnits2(ether, 18);\n }\n exports3.parseEther = parseEther2;\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 __createBinding2 = 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 __setModuleDefault2 = 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 __importStar2 = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 in mod2)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod2, k4))\n __createBinding2(result, mod2, k4);\n }\n __setModuleDefault2(result, mod2);\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 = __importStar2(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 = __importStar2(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 __createBinding2 = 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 __setModuleDefault2 = 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 __importStar2 = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 in mod2)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod2, k4))\n __createBinding2(result, mod2, k4);\n }\n __setModuleDefault2(result, mod2);\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 = __importStar2(require_lib8());\n exports3.constants = constants;\n var providers = __importStar2(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 = __importStar2(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 logger3 = new logger_1.Logger(_version_1.version);\n exports3.logger = logger3;\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 __createBinding2 = 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 __setModuleDefault2 = 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 __importStar2 = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 in mod2)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod2, k4))\n __createBinding2(result, mod2, k4);\n }\n __setModuleDefault2(result, mod2);\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 ethers4 = __importStar2(require_ethers());\n exports3.ethers = ethers4;\n try {\n anyGlobal = window;\n if (anyGlobal._ethers == null) {\n anyGlobal._ethers = ethers4;\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, e2) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e2.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 (e2.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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 (e2) {\n op = [6, e2];\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 = [], e2;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e2 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e2)\n throw e2.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, from5, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from5.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from5)) {\n if (!ar)\n ar = Array.prototype.slice.call(from5, 0, i3);\n ar[i3] = from5[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from5));\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 (e2) {\n settle2(q3[0][3], e2);\n }\n }\n function step(r2) {\n r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle2(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 settle2(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(e2) {\n throw e2;\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), settle2(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle2(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(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k4 = ownKeys(mod2), i3 = 0; i3 < k4.length; i3++)\n if (k4[i3] !== \"default\")\n __createBinding(result, mod2, k4[i3]);\n }\n __setModuleDefault(result, mod2);\n return result;\n }\n function __importDefault(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { default: mod2 };\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(env3, 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 (e2) {\n return Promise.reject(e2);\n }\n };\n env3.stack.push({ value, dispose, async });\n } else if (async) {\n env3.stack.push({ async: true });\n }\n return value;\n }\n function __disposeResources(env3) {\n function fail(e2) {\n env3.error = env3.hasError ? new _SuppressedError(e2, env3.error, \"An error was suppressed during disposal.\") : e2;\n env3.hasError = true;\n }\n var r2, s4 = 0;\n function next() {\n while (r2 = env3.stack.pop()) {\n try {\n if (!r2.async && s4 === 1)\n return s4 = 0, env3.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(e2) {\n fail(e2);\n return next();\n });\n } else\n s4 |= 1;\n } catch (e2) {\n fail(e2);\n }\n }\n if (s4 === 1)\n return env3.hasError ? Promise.reject(env3.error) : Promise.resolve();\n if (env3.hasError)\n throw env3.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 __assign2(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 e2 = new Error(message);\n return e2.name = \"SuppressedError\", e2.error = error, e2.suppressed = suppressed, e2;\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"enableAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"registerNextAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"undeleteApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"AppDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"DelegateeAdded\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"AppAlreadyDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyUndeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionAlreadyInRequestedState\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeAlreadyRegisteredToApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"EmptyPolicyIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotAppManager\",\n inputs: [\n {\n name: \"appId\",\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: \"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: \"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: \"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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"version\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n },\n {\n name: \"appVersion\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.AppVersion\",\n components: [\n {\n name: \"version\",\n type: \"uint256\",\n internalType: \"uint256\"\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 outputs: [\n {\n name: \"appsWithVersions\",\n type: \"tuple[]\",\n internalType: \"struct VincentAppViewFacet.AppWithVersions[]\",\n components: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n },\n {\n name: \"versions\",\n type: \"tuple[]\",\n internalType: \"struct VincentAppViewFacet.AppVersion[]\",\n components: [\n {\n name: \"version\",\n type: \"uint256\",\n internalType: \"uint256\"\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 }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getDelegatedAgentPkpTokenIds\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"version\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"limit\",\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: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"InvalidOffsetOrLimit\",\n inputs: []\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: \"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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"setAbilityPolicyParameters\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"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: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\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: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityIpfsCid\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"EmptyPolicyIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidInput\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotAllRegisteredAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"AbilityNotRegisteredForAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"AbilitiesAndPoliciesLengthMismatch\",\n inputs: []\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: \"getAllPermittedAppIdsForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\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: \"getAllRegisteredAgentPkps\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n internalType: \"address\"\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: \"getAllAbilitiesAndPoliciesForApp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"getPermittedAppVersionForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\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: \"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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appVersion\",\n type: \"uint256\",\n internalType: \"uint256\"\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 seen2 = /* @__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 (!seen2.has(signature)) {\n seen2.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 (!seen2.has(fallbackKey)) {\n seen2.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 = \"0xa1979393bbe7D59dfFBEB38fE5eCf9BDdFE6f4aD\";\n exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = \"0xa1979393bbe7D59dfFBEB38fE5eCf9BDdFE6f4aD\";\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 = 100;\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.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: newAppVersion.toNumber()\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 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.getAppVersion = getAppVersion;\n exports3.getAppsByManagerAddress = getAppsByManagerAddress;\n exports3.getAppByDelegateeAddress = getAppByDelegateeAddress;\n exports3.getDelegatedPkpEthAddresses = getDelegatedPkpEthAddresses;\n var constants_1 = require_constants3();\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.toNumber(),\n latestVersion: app.latestVersion.toNumber(),\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 getAppVersion(params) {\n const { args: { appId, version: version8 }, contract } = params;\n try {\n const [, appVersion] = await contract.getAppVersion(appId, version8);\n return {\n appVersion: { ...appVersion, version: appVersion.version.toNumber() }\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 }, contract } = params;\n try {\n const appsWithVersions = await contract.getAppsByManager(managerAddress);\n return appsWithVersions.map(({ app: appChain, versions: versions2 }) => {\n const { delegatees, ...app } = appChain;\n return {\n app: {\n ...app,\n delegateeAddresses: delegatees,\n id: app.id.toNumber(),\n latestVersion: app.latestVersion.toNumber()\n },\n versions: versions2.map(({ enabled, abilities, version: appVersion }) => ({\n version: appVersion.toNumber(),\n enabled,\n abilities\n }))\n };\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.toNumber(),\n latestVersion: app.latestVersion.toNumber()\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, pageOpts, version: version8 }, contract } = params;\n try {\n const delegatedAgentPkpTokenIds = await contract.getDelegatedAgentPkpTokenIds(appId, version8, pageOpts?.offset || 0, pageOpts?.limit || constants_1.DEFAULT_PAGE_SIZE);\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(e2, t3 = void 0) {\n this.tag = e2, this.contents = t3;\n }\n get noChildren() {\n return !!_i.#e.get(this.tag)?.noChildren;\n }\n static registerDecoder(e2, t3, n2) {\n const o5 = this.#e.get(e2);\n return this.#e.set(e2, 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(e2) {\n const t3 = this.#e.get(e2);\n return this.#e.delete(e2), t3;\n }\n static getDecoder(e2) {\n return this.#e.get(e2);\n }\n static getAllDecoders() {\n return new Map(this.#e);\n }\n *[Symbol.iterator]() {\n yield this.contents;\n }\n push(e2) {\n return this.contents = e2, 1;\n }\n decode(e2) {\n const t3 = e2?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n return t3 ? t3(this, e2) : this;\n }\n comment(e2, t3) {\n const n2 = e2?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n if (n2?.comment)\n return n2.comment(this, e2, t3);\n }\n toCBOR() {\n return [this.tag, this.contents];\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](e2, 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, e2) {\n Object.defineProperty(n2, N.ENCODED, { configurable: true, enumerable: false, value: e2 });\n }\n function l(n2, e2) {\n Object.defineProperty(n2, N.LENGTH, { configurable: true, enumerable: false, value: e2 });\n }\n function d(n2, e2) {\n const r2 = Object(n2);\n return u(r2, e2), 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((e2) => t(e2));\n case Map: {\n const e2 = t([...n2.entries()]);\n return e2.every(([r2]) => typeof r2 == \"string\") ? Object.fromEntries(e2) : new Map(e2);\n }\n case i:\n return new i(t(n2.tag), t(n2.contents));\n case Object: {\n const e2 = {};\n for (const [r2, a3] of Object.entries(n2))\n e2[r2] = t(a3);\n return e2;\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 e2 of a3)\n if (e2[0] >= n2 && e2[0] + e2[1] <= t3) {\n const i3 = [...e2];\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((e2, i3) => e2 + i3.length, 0), t3 = r2.some((e2) => l2(e2)), o5 = [], a3 = new Uint8Array(n2);\n let s4 = 0;\n for (const e2 of r2) {\n if (!(e2 instanceof Uint8Array))\n throw new TypeError(`Invalid array: ${e2}`);\n if (a3.set(e2, s4), t3) {\n const i3 = e2[g] ?? [[0, e2.length]];\n for (const u2 of i3)\n u2[0] += s4;\n o5.push(...i3);\n }\n s4 += e2.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(e2, t3) {\n const n2 = this.#e.get(e2);\n return this.#e.set(e2, t3), n2;\n }\n get(e2) {\n return this.#e.get(e2);\n }\n delete(e2) {\n return this.#e.delete(e2);\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 e2 = n2[o5] - t3[o5];\n if (e2 !== 0)\n return e2;\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(e2, n2 = 0, t3 = false) {\n const r2 = e2[n2] & 128 ? -1 : 1, f6 = (e2[n2] & 124) >> 2, a3 = (e2[n2] & 3) << 8 | e2[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(e2) {\n const n2 = new DataView(new ArrayBuffer(4));\n n2.setFloat32(0, e2, 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(e2) {\n if (e2 !== 0) {\n const n2 = new ArrayBuffer(8), t3 = new DataView(n2);\n t3.setFloat64(0, e2, false);\n const r2 = t3.getBigUint64(0, false);\n if ((r2 & 0x7ff0000000000000n) === 0n)\n return r2 & 0x8000000000000000n ? -0 : 0;\n }\n return e2;\n }\n function l3(e2) {\n switch (e2.length) {\n case 2:\n o2(e2, 0, true);\n break;\n case 4: {\n const n2 = new DataView(e2.buffer, e2.byteOffset, e2.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(e2.buffer, e2.byteOffset, e2.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: ${e2}`);\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(e2) {\n const n2 = e2 < 0;\n return typeof e2 == \"bigint\" ? [n2 ? -e2 - 1n : e2, n2] : [n2 ? -e2 - 1 : e2, n2];\n }\n function T2(e2, n2, t3) {\n if (t3.rejectFloats)\n throw new Error(`Attempt to encode an unwanted floating point number: ${e2}`);\n if (isNaN(e2))\n n2.writeUint8(U2), n2.writeUint16(32256);\n else if (!t3.float64 && Math.fround(e2) === e2) {\n const r2 = s3(e2);\n r2 === null ? (n2.writeUint8(h2), n2.writeFloat32(e2)) : (n2.writeUint8(U2), n2.writeUint16(r2));\n } else\n n2.writeUint8(B), n2.writeFloat64(e2);\n }\n function a(e2, n2, t3) {\n const [r2, i3] = y2(e2);\n if (i3 && t3)\n throw new TypeError(`Negative size: ${e2}`);\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(e2, n2, t3) {\n typeof e2 == \"number\" ? a(e2, n2, f.TAG) : typeof e2 == \"object\" && !t3.ignoreOriginalEncoding && N.ENCODED in e2 ? n2.write(e2[N.ENCODED]) : e2 <= Number.MAX_SAFE_INTEGER ? a(Number(e2), n2, f.TAG) : (n2.writeUint8(f.TAG << 5 | o.EIGHT), n2.writeBigUint64(BigInt(e2)));\n }\n function N2(e2, n2, t3) {\n const [r2, i3] = y2(e2);\n if (t3.collapseBigInts && (!t3.largeNegativeAsBigInt || e2 >= -0x8000000000000000n)) {\n if (r2 <= 0xffffffffn) {\n a(Number(e2), 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: ${e2}`);\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(e2, n2, t3) {\n t3.flushToZero && (e2 = i2(e2)), Object.is(e2, -0) ? t3.simplifyNegativeZero ? t3.avoidInts ? T2(0, n2, t3) : a(0, n2) : T2(e2, n2, t3) : !t3.avoidInts && Number.isSafeInteger(e2) ? a(e2, n2) : t3.reduceUnsafeNumbers && Math.floor(e2) === e2 && e2 >= S.MIN && e2 <= S.MAX ? N2(BigInt(e2), n2, t3) : T2(e2, n2, t3);\n }\n function Z(e2, n2, t3) {\n const r2 = t3.stringNormalization ? e2.normalize(t3.stringNormalization) : e2;\n if (t3.wtf8 && !e2.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(e2, n2, t3) {\n const r2 = e2;\n R2(r2, r2.length, f.ARRAY, n2, t3);\n for (const i3 of r2)\n g2(i3, n2, t3);\n }\n function V(e2, n2) {\n a(e2.length, n2, f.BYTE_STRING), n2.write(e2);\n }\n function ce(e2, n2) {\n return b2.registerEncoder(e2, n2);\n }\n function R2(e2, n2, t3, r2, i3) {\n const o5 = s(e2);\n o5 && !i3.ignoreOriginalEncoding ? r2.write(o5) : a(n2, r2, t3);\n }\n function X(e2, n2, t3) {\n if (e2 === null) {\n n2.writeUint8(q);\n return;\n }\n if (!t3.ignoreOriginalEncoding && N.ENCODED in e2) {\n n2.write(e2[N.ENCODED]);\n return;\n }\n const r2 = e2.constructor;\n if (r2) {\n const o5 = t3.types?.get(r2) ?? b2.get(r2);\n if (o5) {\n const c4 = o5(e2, 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 e2.toCBOR == \"function\") {\n const o5 = e2.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 e2.toJSON == \"function\") {\n g2(e2.toJSON(), n2, t3);\n return;\n }\n const i3 = Object.entries(e2).map((o5) => [o5[0], o5[1], Q(o5[0], t3)]);\n t3.sortKeys && i3.sort(t3.sortKeys), R2(e2, 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(e2, n2, t3) {\n switch (typeof e2) {\n case \"number\":\n Y(e2, n2, t3);\n break;\n case \"bigint\":\n N2(e2, n2, t3);\n break;\n case \"string\":\n Z(e2, n2, t3);\n break;\n case \"boolean\":\n n2.writeUint8(e2 ? 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(e2, n2, t3);\n break;\n case \"symbol\":\n throw new TypeError(`Unknown symbol: ${e2.toString()}`);\n default:\n throw new TypeError(`Unknown type: ${typeof e2}, ${String(e2)}`);\n }\n }\n function Q(e2, 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(e2, r2, t3), r2.read();\n }\n function de(e2, 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(e2);\n function c4(s4) {\n if (Object.is(e2, -0))\n throw new Error(\"Invalid integer: -0\");\n const [u2, E2] = y2(e2);\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}: ${e2}`);\n if (u2 > s4)\n throw new TypeError(`Undersized encoding ${n2} for: ${e2}`);\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(e2, -0))\n throw new TypeError(\"Invalid bigint: -0\");\n e2 = BigInt(e2), N2(e2, 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: ${e2}`);\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: ${e2}`);\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(e2, -0))\n throw new Error(\"Invalid integer: -0\");\n if (Number.isSafeInteger(o5))\n a(o5, i3, e2 < 0 ? void 0 : t3);\n else {\n const [s4, u2] = c4(1 / 0);\n u2 > 0xffffffffffffffffn ? (e2 = BigInt(e2), N2(e2, 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(e2, 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 = ((e2) => (e2[e2.NEVER = -1] = \"NEVER\", e2[e2.PREFERRED = 0] = \"PREFERRED\", e2[e2.ALWAYS = 1] = \"ALWAYS\", e2))(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(e2) {\n this.value = e2;\n }\n static create(e2) {\n return _t.KnownSimple.has(e2) ? _t.KnownSimple.get(e2) : new _t(e2);\n }\n toCBOR(e2, i3) {\n if (i3.rejectCustomSimples)\n throw new Error(`Cannot encode non-standard Simple value: ${this.value}`);\n a(this.value, e2, 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\")](e2, 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 e2 = n2, f6 = false, a3 = 0;\n switch (n2) {\n case o.ONE:\n if (a3 = 1, e2 = this.#r.getUint8(this.#e), i3 === f.SIMPLE_FLOAT) {\n if (e2 < 32)\n throw new Error(`Invalid simple encoding in extra byte: ${e2}`);\n f6 = true;\n } else if (this.#i.requirePreferred && e2 < 24)\n throw new Error(`Unexpectedly long integer encoding (1) for ${e2}`);\n break;\n case o.TWO:\n if (a3 = 2, i3 === f.SIMPLE_FLOAT)\n e2 = o2(this.#t, this.#e);\n else if (e2 = this.#r.getUint16(this.#e, false), this.#i.requirePreferred && e2 <= 255)\n throw new Error(`Unexpectedly long integer encoding (2) for ${e2}`);\n break;\n case o.FOUR:\n if (a3 = 4, i3 === f.SIMPLE_FLOAT)\n e2 = this.#r.getFloat32(this.#e, false);\n else if (e2 = this.#r.getUint32(this.#e, false), this.#i.requirePreferred && e2 <= 65535)\n throw new Error(`Unexpectedly long integer encoding (4) for ${e2}`);\n break;\n case o.EIGHT: {\n if (a3 = 8, i3 === f.SIMPLE_FLOAT)\n e2 = this.#r.getFloat64(this.#e, false);\n else if (e2 = this.#r.getBigUint64(this.#e, false), e2 <= Number.MAX_SAFE_INTEGER && (e2 = Number(e2)), this.#i.requirePreferred && e2 <= 4294967295)\n throw new Error(`Unexpectedly long integer encoding (8) for ${e2}`);\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 e2 = 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, e2, r2, a3];\n break;\n case f.NEG_INT:\n yield [i3, n2, typeof e2 == \"bigint\" ? -1n - e2 : -1 - Number(e2), r2, a3];\n break;\n case f.BYTE_STRING:\n e2 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, this.#a(e2), r2, e2];\n break;\n case f.UTF8_STRING:\n e2 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, p3.decode(this.#a(e2)), r2, e2];\n break;\n case f.ARRAY:\n if (e2 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e2);\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 (e2 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e2);\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, e2, r2, a3], yield* this.#n(t3);\n break;\n case f.SIMPLE_FLOAT: {\n const o5 = e2;\n f6 && (e2 = t2.create(Number(e2))), yield [i3, n2, e2, 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), e2 = n2.next(), [f6, a3, o5] = e2.value;\n if (o5 === N.BREAK) {\n yield e2.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 e2.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, e2, t3) {\n if ([this.mt, this.ai, , this.offset] = r2, this.left = i3, this.parent = e2, this.#e = t3, e2 && (this.depth = e2.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, e2, t3) {\n const [s4, l6, n2, c4] = r2;\n switch (s4) {\n case f.POS_INT:\n case f.NEG_INT: {\n if (e2.rejectInts)\n throw new Error(`Unexpected integer: ${n2}`);\n if (e2.rejectLargeNegatives && n2 < -0x8000000000000000n)\n throw new Error(`Invalid 65bit negative number: ${n2}`);\n let o5 = n2;\n return e2.convertUnsafeIntsToFloat && o5 >= S.MIN && o5 <= S.MAX && (o5 = Number(n2)), e2.boxed ? d(o5, t3.toHere(c4)) : o5;\n }\n case f.SIMPLE_FLOAT:\n if (l6 > o.ONE) {\n if (e2.rejectFloats)\n throw new Error(`Decoding unwanted floating point number: ${n2}`);\n if (e2.rejectNegativeZero && Object.is(n2, -0))\n throw new Error(\"Decoding negative zero\");\n if (e2.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 (e2.rejectSubnormals && l3(t3.toHere(c4 + 1)), e2.rejectLongFloats) {\n const o5 = Q(n2, { chunkSize: 9, reduceUnsafeNumbers: e2.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\" && e2.boxed)\n return d(n2, t3.toHere(c4));\n } else {\n if (e2.rejectSimple && n2 instanceof t2)\n throw new Error(`Invalid simple value: ${n2}`);\n if (e2.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 e2.ParentType(r2, 1 / 0, i3, e2);\n if (e2.rejectStringsNotNormalizedAs && typeof n2 == \"string\") {\n const o5 = n2.normalize(e2.rejectStringsNotNormalizedAs);\n if (n2 !== o5)\n throw new Error(`String not normalized as \"${e2.rejectStringsNotNormalizedAs}\", got [${U(n2)}] instead of [${U(o5)}]`);\n }\n return e2.boxed ? d(n2, t3.toHere(c4)) : n2;\n case f.ARRAY:\n return new e2.ParentType(r2, n2, i3, e2);\n case f.MAP:\n return new e2.ParentType(r2, n2 * 2, i3, e2);\n case f.TAG: {\n const o5 = new e2.ParentType(r2, 1, i3, e2);\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, e2) {\n if (this.children.push(r2), this.#t) {\n const t3 = f2(r2) || i3.toHere(e2);\n this.#t.push(t3);\n }\n return --this.left;\n }\n replaceLast(r2, i3, e2) {\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) || e2.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 e2 = this.#r();\n if (this.#e.sortKeys) {\n let t3;\n for (const s4 of e2) {\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 e2) {\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(e2, this.#e);\n break;\n }\n case f.BYTE_STRING:\n return d2(this.children);\n case f.UTF8_STRING: {\n const e2 = this.children.join(\"\");\n i3 = this.#e.boxed ? d(e2, r2.toHere(this.offset)) : e2;\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 e2 = new Array(i3 / 2);\n if (this.#t)\n for (let t3 = 0; t3 < i3; t3 += 2)\n e2[t3 >> 1] = [r2[t3], r2[t3 + 1], this.#t[t3]];\n else\n for (let t3 = 0; t3 < i3; t3 += 2)\n e2[t3 >> 1] = [r2[t3], r2[t3 + 1], A2];\n return e2;\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 e2 = o.ZERO;\n if (Object.is(n2, -0))\n e2 = 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 ? e2 = Number(o5) : o5 <= 255 ? e2 = o.ONE : o5 <= 65535 ? e2 = o.TWO : o5 <= 4294967295 ? e2 = o.FOUR : e2 = o.EIGHT;\n } else\n isFinite(n2) ? Math.fround(n2) === n2 ? s3(n2) == null ? e2 = o.FOUR : e2 = o.TWO : e2 = o.EIGHT : e2 = o.TWO;\n r2 = e2 !== 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, e2 = \"\";\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 ? e2 += \": \" : (e2 += \",\", n2.pretty || (e2 += \" \"))), n2.pretty && (t3.mt !== f.MAP || t3.count % 2 === 0) && (e2 += `\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 e2 += String(i3), e2 += 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 e2 += c4, isFinite(i3) && !/[.e]/.test(c4) && (e2 += \".0\"), e2 += a2(u2, o5, i3, n2);\n } else\n i3 instanceof t2 ? (e2 += \"simple(\", e2 += String(i3.value), e2 += a2(f.POS_INT, o5, i3.value, n2), e2 += \")\") : e2 += String(i3);\n break;\n case f.BYTE_STRING:\n i3 === 1 / 0 ? (e2 += \"(_ \", r2.close = \")\", r2.quote = \"'\") : (e2 += \"h'\", e2 += A(i3), e2 += \"'\", e2 += a2(f.POS_INT, o5, i3.length, n2));\n break;\n case f.UTF8_STRING:\n i3 === 1 / 0 ? (e2 += \"(_ \", r2.close = \")\") : (e2 += JSON.stringify(i3), e2 += a2(f.POS_INT, o5, y4.encode(i3).length, n2));\n break;\n case f.ARRAY: {\n e2 += \"[\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e2 += c4, c4 && (e2 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}]` : r2.close = \"]\";\n break;\n }\n case f.MAP: {\n e2 += \"{\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e2 += c4, c4 && (e2 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}}` : r2.close = \"}\";\n break;\n }\n case f.TAG:\n e2 += String(i3), e2 += a2(f.POS_INT, o5, i3, n2), e2 += \"(\", 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 e2 = e2.slice(0, -3), e2 += `${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 e2 += t3.close;\n }\n t3 = t3.parent;\n }\n }\n return e2;\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 e2 = \"\";\n e2 += y5(t3.depth * 2);\n const n2 = f2(t3);\n e2 += A(n2.subarray(0, 1));\n const r2 = t3.numBytes();\n r2 && (e2 += \" \", e2 += A(n2.subarray(1, r2 + 1))), e2 = e2.padEnd(a3.minCol + 1, \" \"), e2 += \"-- \", f6 !== void 0 && (e2 += y5(t3.depth * 2), f6 !== \"\" && (e2 += `[${f6}] `));\n let p4 = false;\n const [s4] = t3.children;\n switch (t3.mt) {\n case f.POS_INT:\n e2 += `Unsigned: ${s4}`, typeof s4 == \"bigint\" && (e2 += \"n\");\n break;\n case f.NEG_INT:\n e2 += `Negative: ${s4}`, typeof s4 == \"bigint\" && (e2 += \"n\");\n break;\n case f.BYTE_STRING:\n e2 += `Bytes (Length: ${O2(t3.length)})`;\n break;\n case f.UTF8_STRING:\n e2 += `UTF8 (Length: ${O2(t3.length)})`, t3.length !== 1 / 0 && (e2 += `: ${JSON.stringify(s4)}`);\n break;\n case f.ARRAY:\n e2 += `Array (Length: ${O2(t3.value, \"item\")})`;\n break;\n case f.MAP:\n e2 += `Map (Length: ${O2(t3.value, \"pair\")})`;\n break;\n case f.TAG: {\n e2 += `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 && (e2 += \": \", e2 += l6), p4 ||= i3.noChildren;\n break;\n }\n case f.SIMPLE_FLOAT:\n s4 === N.BREAK ? e2 += \"BREAK\" : t3.ai > o.ONE ? Object.is(s4, -0) ? e2 += \"Float: -0\" : e2 += `Float: ${s4}` : (e2 += \"Simple: \", s4 instanceof t2 ? e2 += s4.value : e2 += s4);\n break;\n }\n if (!p4)\n if (t3.leaf) {\n if (e2 += `\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 e2 += y5(a3.minCol + 1), e2 += \"--\", e2 += o5, e2 += \"<< \";\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 e2 += M(d5), e2 += ` >>\n`, e2 += L(d5, { initialDepth: t3.depth + 1, minCol: a3.minCol, noPrefixHex: true });\n continue;\n } else\n g4 === \"'\" && (e2 += y5(a3.minCol + 1), e2 += \"--\", e2 += o5, e2 += \"'\", e2 += H2.decode(n2.subarray(l6, l6 + c4)), e2 += `'\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 e2 += o5, e2 += A(n2.subarray(d5, h4)), e2 += `\n`;\n }\n }\n } else\n for (let i3 = r2 + 1; i3 < n2.length; i3 += 8)\n e2 += o5, e2 += A(n2.subarray(i3, i3 + 8)), e2 += `\n`;\n }\n } else {\n e2 += `\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 = \"\"), e2 += x2(m2, a3, i3);\n }\n o5++;\n }\n }\n return e2;\n }\n function L(t3, a3) {\n const f6 = { ...q2, ...a3, ParentType: A3, saveOriginal: true }, e2 = new y3(t3, f6);\n let n2, r2;\n for (const s4 of e2) {\n if (r2 = w.create(s4, n2, f6, e2), 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, e2.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, e2, s4[3]), n2 = r2; n2?.done; )\n r2 = n2, r2.leaf || u(r2, e2.toHere(r2.offset)), { parent: n2 } = n2;\n }\n a3 && (a3.minCol = f6.minCol);\n let p4 = f6.noPrefixHex ? \"\" : `0x${A(e2.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, e2, n2) {\n super(a3, f6, e2, 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(e2) {\n if (typeof e2 == \"object\" && e2) {\n if (e2.constructor !== Number)\n throw new Error(`Expected number: ${e2}`);\n } else if (typeof e2 != \"number\")\n throw new Error(`Expected number: ${e2}`);\n }\n function E(e2) {\n if (typeof e2 == \"object\" && e2) {\n if (e2.constructor !== String)\n throw new Error(`Expected string: ${e2}`);\n } else if (typeof e2 != \"string\")\n throw new Error(`Expected string: ${e2}`);\n }\n function f5(e2) {\n if (!(e2 instanceof Uint8Array))\n throw new Error(`Expected Uint8Array: ${e2}`);\n }\n function U3(e2) {\n if (!Array.isArray(e2))\n throw new Error(`Expected Array: ${e2}`);\n }\n function h3(e2) {\n return E(e2.contents), new Date(e2.contents);\n }\n function N3(e2) {\n return O3(e2.contents), new Date(e2.contents * 1e3);\n }\n function T3(e2, 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 (e2 && (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(e2, r2) {\n return f5(e2.contents), e2;\n }\n function c2(e2, r2, n2) {\n f5(e2.contents);\n let t3 = e2.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(e2.contents.buffer, e2.contents.byteOffset, e2.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(e2, r2, n2, t3, o5) {\n const d5 = o5.forceEndian ?? S2;\n if (p2(d5 ? r2 : n2, e2, o5), a(t3.byteLength, e2, f.BYTE_STRING), S2 === d5)\n e2.write(new Uint8Array(t3.buffer, t3.byteOffset, t3.byteLength));\n else {\n const y6 = `write${t3.constructor.name.replace(/Array/, \"\")}`, g4 = e2[y6].bind(e2);\n for (const p4 of t3)\n g4(p4, d5);\n }\n }\n function x3(e2) {\n return f5(e2.contents), new Wtf8Decoder().decode(e2.contents);\n }\n function w2(e2) {\n throw new Error(`Encoding ${e2.constructor.name} intentionally unimplmented. It is not concrete enough to interoperate. Convert to Uint8Array first.`);\n }\n function m(e2) {\n return [NaN, e2.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, (e2, r2, n2) => {\n const t3 = [...e2.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(e2, e2.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 = (e2) => (E(e2.contents), `(String Date) ${new Date(e2.contents).toISOString()}`), i.registerDecoder(I.DATE_STRING, h3);\n N3.comment = (e2) => (O3(e2.contents), `(Epoch Date) ${new Date(e2.contents * 1e3).toISOString()}`), i.registerDecoder(I.DATE_EPOCH, N3), ce(Date, (e2) => [I.DATE_EPOCH, e2.valueOf() / 1e3]);\n _ = T3.bind(null, false);\n $2 = T3.bind(null, true);\n _.comment = (e2, r2) => `(Positive BigInt) ${T3(false, e2, r2)}n`, $2.comment = (e2, r2) => `(Negative BigInt) ${T3(true, e2, r2)}n`, i.registerDecoder(I.POS_BIGINT, _), i.registerDecoder(I.NEG_BIGINT, $2);\n D.comment = (e2, r2, n2) => {\n f5(e2.contents);\n const t3 = { ...r2, initialDepth: n2 + 2, noPrefixHex: true }, o5 = f2(e2);\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(e2.contents, t3);\n let I2 = `Embedded CBOR\n`;\n return I2 += `${\"\".padStart((n2 + 1) * 2, \" \")}${g4}`.padEnd(t3.minCol + 1, \" \"), I2 += `-- Bytes (Length: ${e2.contents.length})\n`, I2 += p4, I2;\n }, D.noChildren = true, i.registerDecoder(I.CBOR, D), i.registerDecoder(I.URI, (e2) => (E(e2.contents), new URL(e2.contents)), \"URI\"), ce(URL, (e2) => [I.URI, e2.toString()]), i.registerDecoder(I.BASE64URL, (e2) => (E(e2.contents), x(e2.contents)), \"Base64url-encoded\"), i.registerDecoder(I.BASE64, (e2) => (E(e2.contents), y(e2.contents)), \"Base64-encoded\"), i.registerDecoder(35, (e2) => (E(e2.contents), new RegExp(e2.contents)), \"RegExp\"), i.registerDecoder(21065, (e2) => {\n E(e2.contents);\n const r2 = `^(?:${e2.contents})$`;\n return new RegExp(r2, \"u\");\n }, \"I-RegExp\"), i.registerDecoder(I.REGEXP, (e2) => {\n if (U3(e2.contents), e2.contents.length < 1 || e2.contents.length > 2)\n throw new Error(`Invalid RegExp Array: ${e2.contents}`);\n return new RegExp(e2.contents[0], e2.contents[1]);\n }, \"RegExp\"), ce(RegExp, (e2) => [I.REGEXP, [e2.source, e2.flags]]), i.registerDecoder(64, (e2) => (f5(e2.contents), e2.contents), \"uint8 Typed Array\");\n i.registerDecoder(65, (e2) => c2(e2, Uint16Array, false), \"uint16, big endian, Typed Array\"), i.registerDecoder(66, (e2) => c2(e2, Uint32Array, false), \"uint32, big endian, Typed Array\"), i.registerDecoder(67, (e2) => c2(e2, BigUint64Array, false), \"uint64, big endian, Typed Array\"), i.registerDecoder(68, (e2) => (f5(e2.contents), new Uint8ClampedArray(e2.contents)), \"uint8 Typed Array, clamped arithmetic\"), ce(Uint8ClampedArray, (e2) => [68, new Uint8Array(e2.buffer, e2.byteOffset, e2.byteLength)]), i.registerDecoder(69, (e2) => c2(e2, Uint16Array, true), \"uint16, little endian, Typed Array\"), ce(Uint16Array, (e2, r2, n2) => l4(r2, 69, 65, e2, n2)), i.registerDecoder(70, (e2) => c2(e2, Uint32Array, true), \"uint32, little endian, Typed Array\"), ce(Uint32Array, (e2, r2, n2) => l4(r2, 70, 66, e2, n2)), i.registerDecoder(71, (e2) => c2(e2, BigUint64Array, true), \"uint64, little endian, Typed Array\"), ce(BigUint64Array, (e2, r2, n2) => l4(r2, 71, 67, e2, n2)), i.registerDecoder(72, (e2) => (f5(e2.contents), new Int8Array(e2.contents)), \"sint8 Typed Array\"), ce(Int8Array, (e2) => [72, new Uint8Array(e2.buffer, e2.byteOffset, e2.byteLength)]), i.registerDecoder(73, (e2) => c2(e2, Int16Array, false), \"sint16, big endian, Typed Array\"), i.registerDecoder(74, (e2) => c2(e2, Int32Array, false), \"sint32, big endian, Typed Array\"), i.registerDecoder(75, (e2) => c2(e2, BigInt64Array, false), \"sint64, big endian, Typed Array\"), i.registerDecoder(77, (e2) => c2(e2, Int16Array, true), \"sint16, little endian, Typed Array\"), ce(Int16Array, (e2, r2, n2) => l4(r2, 77, 73, e2, n2)), i.registerDecoder(78, (e2) => c2(e2, Int32Array, true), \"sint32, little endian, Typed Array\"), ce(Int32Array, (e2, r2, n2) => l4(r2, 78, 74, e2, n2)), i.registerDecoder(79, (e2) => c2(e2, BigInt64Array, true), \"sint64, little endian, Typed Array\"), ce(BigInt64Array, (e2, r2, n2) => l4(r2, 79, 75, e2, n2)), i.registerDecoder(81, (e2) => c2(e2, Float32Array, false), \"IEEE 754 binary32, big endian, Typed Array\"), i.registerDecoder(82, (e2) => c2(e2, Float64Array, false), \"IEEE 754 binary64, big endian, Typed Array\"), i.registerDecoder(85, (e2) => c2(e2, Float32Array, true), \"IEEE 754 binary32, little endian, Typed Array\"), ce(Float32Array, (e2, r2, n2) => l4(r2, 85, 81, e2, n2)), i.registerDecoder(86, (e2) => c2(e2, Float64Array, true), \"IEEE 754 binary64, big endian, Typed Array\"), ce(Float64Array, (e2, r2, n2) => l4(r2, 86, 82, e2, n2)), i.registerDecoder(I.SET, (e2, r2) => {\n if (U3(e2.contents), r2.sortKeys) {\n const n2 = w.decodeToEncodeOpts(r2);\n let t3 = null;\n for (const o5 of e2.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(e2.contents);\n }, \"Set\"), ce(Set, (e2, r2, n2) => {\n let t3 = [...e2];\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, (e2) => (E(e2.contents), JSON.parse(e2.contents)), \"JSON-encoded\");\n x3.comment = (e2) => {\n f5(e2.contents);\n const r2 = new Wtf8Decoder();\n return `(WTF8 string): ${JSON.stringify(r2.decode(e2.contents))}`;\n }, i.registerDecoder(I.WTF8, x3), i.registerDecoder(I.SELF_DESCRIBED, (e2) => e2.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 e2 = { ...w.defaultDecodeOptions };\n if (i3.dcbor ? Object.assign(e2, w.dcborDecodeOptions) : i3.cde && Object.assign(e2, w.cdeDecodeOptions), Object.assign(e2, i3), Object.hasOwn(e2, \"rejectLongNumbers\"))\n throw new TypeError(\"rejectLongNumbers has changed to requirePreferred\");\n return e2.boxed && (e2.saveOriginal = true), e2;\n }\n function l5(i3, e2 = {}) {\n const n2 = c3(e2), 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, e2 = {}) {\n const n2 = c3(e2), 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(e2, n2, t3) {\n if (this.ret = w.create(e2, this.parent, n2, t3), e2[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, e2[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(e2, n2 = {}) {\n const t3 = new y3(e2, 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 e2 = this.#e ?? this.#n();\n return this.#e = void 0, e2;\n }\n *[Symbol.iterator]() {\n for (; ; ) {\n const e2 = this.read();\n if (!e2)\n return;\n yield e2;\n }\n }\n #n() {\n const { value: e2, done: n2 } = this.#t.next();\n if (!n2)\n return e2;\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 var cbor2_1 = (init_lib2(), __toCommonJS(lib_exports));\n var utils_1 = require_utils6();\n function encodePermissionDataForChain(permissionData) {\n const abilityIpfsCids = [];\n const policyIpfsCids = [];\n const policyParameterValues = [];\n Object.keys(permissionData).forEach((abilityIpfsCid) => {\n abilityIpfsCids.push(abilityIpfsCid);\n const abilityPolicies = permissionData[abilityIpfsCid];\n const abilityPolicyIpfsCids = [];\n const abilityPolicyParameterValues = [];\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(\"0x\" + Buffer2.from(encodedParams).toString(\"hex\"));\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 if (encodedParams && encodedParams.length > 0) {\n const byteArray = (0, utils_1.arrayify)(encodedParams);\n return (0, cbor2_1.decode)(byteArray);\n }\n return void 0;\n }\n function decodePermissionDataFromChain(abilitiesWithPolicies) {\n const permissionData = {};\n for (const ability of abilitiesWithPolicies) {\n const { abilityIpfsCid } = ability;\n permissionData[abilityIpfsCid] = {};\n for (const policy of ability.policies) {\n const { policyIpfsCid } = policy;\n permissionData[abilityIpfsCid][policyIpfsCid] = decodePolicyParametersFromChain(policy);\n }\n }\n return permissionData;\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.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 setAbilityPolicyParameters(params) {\n const { contract, args: { appId, appVersion, pkpEthAddress, policyParams }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const flattenedParams = (0, policyParams_1.encodePermissionDataForChain)(policyParams);\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.getAllAbilitiesAndPoliciesForApp = getAllAbilitiesAndPoliciesForApp;\n exports3.validateAbilityExecutionAndGetPolicies = validateAbilityExecutionAndGetPolicies;\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 } } = params;\n try {\n const pkpTokenIds = await contract.getAllRegisteredAgentPkps(userPkpAddress);\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.toNumber();\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 } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const appIds = await contract.getAllPermittedAppIdsForPkp(pkpTokenId);\n return appIds.map((appId) => appId.toNumber());\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 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 decodedPolicies = {};\n for (const policy of validationResult.policies) {\n const policyIpfsCid = policy.policyIpfsCid;\n decodedPolicies[policyIpfsCid] = (0, policyParams_1.decodePolicyParametersFromChain)(policy);\n }\n return {\n ...validationResult,\n appId: validationResult.appId.toNumber(),\n appVersion: validationResult.appVersion.toNumber(),\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 }\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 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 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 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 getAllAbilitiesAndPoliciesForApp: (params) => (0, UserView_1.getAllAbilitiesAndPoliciesForApp)({ contract, args: params }),\n validateAbilityExecutionAndGetPolicies: (params) => (0, UserView_1.validateAbilityExecutionAndGetPolicies)({ 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.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 }\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 // ../../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.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 }\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(e2) {\n return obj[e2];\n });\n };\n util2.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, 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(array, separator = \" | \") {\n return array.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_errors2 = __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_errors2();\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 } = 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 };\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 };\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 regex = `${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 regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n }\n function isValidIP(ip, version8) {\n if ((version8 === \"v4\" || !version8) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version8 === \"v6\" || !version8) && 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, version8) {\n if ((version8 === \"v4\" || !version8) && ipv4CidrRegex.test(ip)) {\n return true;\n }\n if ((version8 === \"v6\" || !version8) && 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 custom(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, base64Regex, 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_errors2();\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(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description\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 base64Regex = /^([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 regex = datetimeRegex(check);\n if (!regex.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 regex = dateRegex;\n if (!regex.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 regex = timeRegex(check);\n if (!regex.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 (!base64Regex.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(regex, validation, message) {\n return this.refinement((data) => regex.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(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex,\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(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\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(minLength, message) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength, 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 shape2 = this._def.shape();\n const keys = util.objectKeys(shape2);\n this._cached = { shape: shape2, 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: shape2, 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 = shape2[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 shape2 = {};\n for (const key of util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape2[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape2\n });\n }\n omit(mask) {\n const shape2 = {};\n for (const key of util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape2[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape2\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 = (shape2, params) => {\n return new ZodObject({\n shape: () => shape2,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.strictCreate = (shape2, params) => {\n return new ZodObject({\n shape: () => shape2,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.lazycreate = (shape2, params) => {\n return new ZodObject({\n shape: shape2,\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(size5, message) {\n return this.min(size5, message).max(size5, 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((e2) => {\n error.addIssue(makeArgsIssue(args, e2));\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((e2) => {\n error.addIssue(makeReturnsIssue(result, e2));\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 base3 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!isValid(base3))\n return INVALID;\n const result = effect.transform(base3.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((base3) => {\n if (!isValid(base3))\n return INVALID;\n return Promise.resolve(effect.transform(base3.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 }) => custom((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: () => custom,\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_errors2();\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_esm = __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/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-chain/yellowstone/yellowstoneConfig.js\n var require_yellowstoneConfig = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-chain/yellowstone/yellowstoneConfig.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.yellowstoneConfig = void 0;\n exports3.yellowstoneConfig = {\n id: 175188,\n name: \"Chronicle Yellowstone - Lit Protocol Testnet\",\n nativeCurrency: {\n name: \"Test LPX\",\n symbol: \"tstLPX\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://yellowstone-rpc.litprotocol.com/\"],\n webSocket: []\n },\n public: {\n http: [\"https://yellowstone-rpc.litprotocol.com/\"],\n webSocket: []\n }\n },\n blockExplorers: {\n default: {\n name: \"Yellowstone Explorer\",\n url: \"https://yellowstone-explorer.litprotocol.com/\"\n }\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/signTx.js\n var require_signTx = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/signTx.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.signTx = void 0;\n var signTx = async ({ sigName, pkpPublicKey, tx }) => {\n console.log(`Signing TX: ${sigName}`);\n const pkForLit = pkpPublicKey.startsWith(\"0x\") ? pkpPublicKey.slice(2) : pkpPublicKey;\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(ethers.utils.keccak256(ethers.utils.serializeTransaction(tx))),\n publicKey: pkForLit,\n sigName\n });\n return ethers.utils.serializeTransaction(tx, ethers.utils.joinSignature({\n r: \"0x\" + JSON.parse(sig).r.substring(2),\n s: \"0x\" + JSON.parse(sig).s,\n v: JSON.parse(sig).v\n }));\n };\n exports3.signTx = signTx;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/sendTx.js\n var require_sendTx = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/sendTx.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sendTx = void 0;\n var sendTx = async (provider, signedTx) => {\n console.log(\"Broadcasting transaction...\");\n const responseText = await Lit.Actions.runOnce({ waitForResponse: true, name: \"txnSender\" }, async () => {\n try {\n const receipt = await provider.sendTransaction(signedTx);\n console.log(\"Transaction sent:\", receipt.hash);\n return receipt.hash;\n } catch (error) {\n console.error(\"Error broadcasting transaction:\", error);\n return JSON.stringify(error);\n }\n });\n if (responseText.includes(\"error\")) {\n throw new Error(responseText);\n }\n const txHash = responseText;\n if (!ethers.utils.isHexString(txHash)) {\n throw new Error(`Invalid transaction hash: ${txHash}`);\n }\n return txHash;\n };\n exports3.sendTx = sendTx;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/contractCall.js\n var require_contractCall = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/contractCall.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.contractCall = void 0;\n var yellowstoneConfig_1 = require_yellowstoneConfig();\n var signTx_1 = require_signTx();\n var sendTx_1 = require_sendTx();\n var contractCall = async ({ provider, pkpPublicKey, callerAddress, abi: abi2, contractAddress, functionName, args, overrides = {}, chainId, gasBumpPercentage }) => {\n const iface = new ethers.utils.Interface(abi2);\n const encodedData = iface.encodeFunctionData(functionName, args);\n const fromAddress = callerAddress;\n console.log(\"Encoded data:\", encodedData);\n const txValue = overrides.value ? ethers.BigNumber.from(overrides.value.toString()) : ethers.BigNumber.from(0);\n const gasParamsResponse = await Lit.Actions.runOnce({ waitForResponse: true, name: \"gasParams\" }, async () => {\n let gasLimit2;\n if (overrides.gasLimit) {\n gasLimit2 = ethers.BigNumber.from(overrides.gasLimit.toString());\n } else {\n const estimatedGas = await provider.estimateGas({\n from: fromAddress,\n to: contractAddress,\n data: encodedData,\n value: txValue\n });\n console.log(\"RunOnce Estimated gas:\", estimatedGas);\n if (gasBumpPercentage) {\n gasLimit2 = estimatedGas.mul(gasBumpPercentage + 100).div(100);\n console.log(`RunOnce Bumped gas by ${gasBumpPercentage}% to ${gasLimit2}`);\n } else {\n gasLimit2 = estimatedGas;\n }\n }\n console.log(\"RunOnce Gas limit:\", gasLimit2);\n const nonce2 = await provider.getTransactionCount(callerAddress);\n const gasPrice2 = await provider.getGasPrice();\n console.log(\"RunOnce Gas price:\", gasPrice2.toString());\n return JSON.stringify({\n gasLimit: gasLimit2.toString(),\n gasPrice: gasPrice2.toString(),\n nonce: nonce2\n });\n });\n const parsedGasParamsResponse = JSON.parse(gasParamsResponse);\n const gasLimit = ethers.BigNumber.from(parsedGasParamsResponse.gasLimit);\n const gasPrice = ethers.BigNumber.from(parsedGasParamsResponse.gasPrice);\n const nonce = parseInt(parsedGasParamsResponse.nonce);\n const tx = {\n to: contractAddress,\n data: encodedData,\n value: txValue,\n gasLimit,\n gasPrice,\n nonce,\n chainId: chainId ?? yellowstoneConfig_1.yellowstoneConfig.id\n };\n console.log(\"Transaction:\", tx);\n const signedTx = await (0, signTx_1.signTx)({\n sigName: functionName,\n pkpPublicKey,\n tx\n });\n console.log(\"Signed transaction:\", signedTx);\n const txHash = await (0, sendTx_1.sendTx)(provider, signedTx);\n console.log(\"Transaction sent:\", txHash);\n return txHash;\n };\n exports3.contractCall = contractCall;\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.0.8_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.0.8_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.0.8\";\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.0.8_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/errors.js\n var BaseError;\n var init_errors3 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.0.8_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.0.8_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/regex.js\n function execTyped(regex, string) {\n const match = regex.exec(string);\n return match?.groups;\n }\n var bytesRegex, integerRegex, isTupleRegex;\n var init_regex = __esm({\n \"../../../node_modules/.pnpm/abitype@1.0.8_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.0.8_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 length = abiParameter.components.length;\n for (let i3 = 0; i3 < length; i3++) {\n const component = abiParameter.components[i3];\n type += formatAbiParameter(component);\n if (i3 < length - 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.0.8_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.0.8_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 length = abiParameters.length;\n for (let i3 = 0; i3 < length; i3++) {\n const abiParameter = abiParameters[i3];\n params += formatAbiParameter(abiParameter);\n if (i3 !== length - 1)\n params += \", \";\n }\n return params;\n }\n var init_formatAbiParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.0.8_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.0.8_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.0.8_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.0.8_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.0.8_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.0.8_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.0.8_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_errors3();\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.0.8_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.0.8_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_errors3();\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.0.8_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.0.8_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_errors3();\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.0.8_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.0.8_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_errors3();\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.0.8_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.0.8_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_errors3();\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.0.8_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.0.8_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.0.8_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 length = params.length;\n for (let i3 = 0; i3 < length; 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 length = params.length;\n for (let i3 = 0; i3 < length; 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 length = params.length;\n for (let i3 = 0; i3 < length; 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 length = params.length;\n for (let i3 = 0; i3 < length; 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 {\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 length = params.trim().length;\n for (let i3 = 0; i3 < length; 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, isArray2) {\n return isArray2 || type === \"bytes\" || type === \"string\" || type === \"tuple\";\n }\n var abiParameterWithoutTupleRegex, abiParameterWithTupleRegex, dynamicIntegerRegex, protectedKeywordsRegex;\n var init_utils2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.0.8_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$_]*)(?(?:\\[\\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.0.8_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 length = abiParameters.length;\n for (let i3 = 0; i3 < length; 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, 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${array ?? \"\"}`,\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.0.8_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.0.8_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 length = signatures.length;\n for (let i3 = 0; i3 < length; 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.0.8_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.0.8_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 length = signature.length;\n for (let i3 = 0; i3 < length; 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.0.8_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.0.8_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 length = parameters.length;\n for (let i3 = 0; i3 < length; i3++) {\n abiParameters.push(parseAbiParameter(parameters[i3], { modifiers }));\n }\n } else {\n const structs = parseStructs(params);\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++) {\n const signature = params[i3];\n if (isStructSignature(signature))\n continue;\n const parameters = splitParameters(signature);\n const length2 = parameters.length;\n for (let k4 = 0; k4 < length2; 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.0.8_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.0.8_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.0.8_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_parseAbi();\n init_parseAbiItem();\n init_parseAbiParameters();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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: size5 }) {\n super([`Data size of ${size5} bytes is too small for given parameters.`].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size5} 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 = size5;\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: size5 }) {\n super([\n `Data size of ${size5} bytes is too small for non-indexed event parameters.`\n ].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size5} 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 = size5;\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.31.3_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.31.3_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.31.3_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.31.3_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: size5 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \"${offset}\" is out-of-bounds (size: ${size5}).`, { name: \"SliceOffsetOutOfBoundsError\" });\n }\n };\n SizeExceedsPaddingSizeError = class extends BaseError2 {\n constructor({ size: size5, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size5}) exceeds padding size (${targetSize}).`, { name: \"SizeExceedsPaddingSizeError\" });\n }\n };\n InvalidBytesLengthError = class extends BaseError2 {\n constructor({ size: size5, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size5} ${type} long.`, { name: \"InvalidBytesLengthError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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: size5 = 32 } = {}) {\n if (typeof hexOrBytes === \"string\")\n return padHex(hexOrBytes, { dir, size: size5 });\n return padBytes(hexOrBytes, { dir, size: size5 });\n }\n function padHex(hex_, { dir, size: size5 = 32 } = {}) {\n if (size5 === null)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size5 * 2)\n throw new SizeExceedsPaddingSizeError({\n size: Math.ceil(hex.length / 2),\n targetSize: size5,\n type: \"hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size5 * 2, \"0\")}`;\n }\n function padBytes(bytes, { dir, size: size5 = 32 } = {}) {\n if (size5 === null)\n return bytes;\n if (bytes.length > size5)\n throw new SizeExceedsPaddingSizeError({\n size: bytes.length,\n targetSize: size5,\n type: \"bytes\"\n });\n const paddedBytes = new Uint8Array(size5);\n for (let i3 = 0; i3 < size5; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size5 - 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.31.3_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.31.3_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.31.3_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: size5, value }) {\n super(`Number \"${value}\" is not in safe ${size5 ? `${size5 * 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.31.3_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.31.3_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.31.3_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: size5 }) {\n if (size(hexOrBytes) > size5)\n throw new SizeOverflowError({\n givenSize: size(hexOrBytes),\n maxSize: size5\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 size5 = (hex.length - 2) / 2;\n const max = (1n << BigInt(size5) * 8n - 1n) - 1n;\n if (value <= max)\n return value;\n return value - BigInt(`0x${\"f\".padStart(size5 * 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.31.3_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.31.3_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 string = \"\";\n for (let i3 = 0; i3 < value.length; i3++) {\n string += hexes[value[i3]];\n }\n const hex = `0x${string}`;\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: size5 } = opts;\n const value = BigInt(value_);\n let maxValue;\n if (size5) {\n if (signed)\n maxValue = (1n << BigInt(size5) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size5) * 8n) - 1n;\n } else if (typeof value_ === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value > maxValue || value < minValue) {\n const suffix = typeof value_ === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue}${suffix}`,\n signed,\n size: size5,\n value: `${value_}${suffix}`\n });\n }\n const hex = `0x${(signed && value < 0 ? (1n << BigInt(size5 * 8)) + BigInt(value) : value).toString(16)}`;\n if (size5)\n return pad(hex, { size: size5 });\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.31.3_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.31.3_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 length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index2 = 0, j2 = 0; index2 < length; 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.31.3_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 array = 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 array[ai] = n1 * 16 + n2;\n }\n return array;\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, pad4 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad4);\n pad4 += a3.length;\n }\n return res;\n }\n function checkOpts(defaults3, 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(defaults3, 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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(size5) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size5;\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.31.3_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 hash2 = 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 (hash2[i3 >> 1] >> 4 >= 8 && address[i3]) {\n address[i3] = address[i3].toUpperCase();\n }\n if ((hash2[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.31.3_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.31.3_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.31.3_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.31.3_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 length = 0;\n for (const arr of values) {\n length += arr.length;\n }\n const result = new Uint8Array(length);\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 [length, type] = arrayComponents;\n return encodeArray(value, { length, 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 [, , size5 = \"256\"] = integerRegex2.exec(param.type) ?? [];\n return encodeNumber(value, {\n signed,\n size: Number(size5)\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, param }) {\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError(value);\n if (!dynamic && value.length !== length)\n throw new AbiEncodingArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${param.type}[${length}]`\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 length2 = numberToHex(preparedParams.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParams.length > 0 ? concat([length2, data]) : length2\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))\n throw new AbiEncodingBytesSizeMismatchError({\n expectedSize: Number.parseInt(paramSize),\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: size5 = 256 }) {\n if (typeof size5 === \"number\") {\n const max = 2n ** (BigInt(size5) - (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: size5 / 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 hexValue3 = stringToHex(value);\n const partsLength = Math.ceil(size(hexValue3) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padHex(slice(hexValue3, i3 * 32, (i3 + 1) * 32), {\n dir: \"right\"\n }));\n }\n return {\n dynamic: true,\n encoded: concat([\n padHex(numberToHex(size(hexValue3), { 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 matches2 = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches2 ? (\n // Return `null` if the array is dynamic.\n [matches2[2] ? Number(matches2[2]) : null, matches2[1]]\n ) : void 0;\n }\n var init_encodeAbiParameters = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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 = void 0;\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`, { 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.31.3_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.31.3_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(length, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length - 1);\n return this.bytes.subarray(position, position + length);\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(length, size5) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length);\n this.position += size5 ?? length;\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.31.3_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.31.3_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.31.3_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 [length, type] = arrayComponents;\n return decodeArray(cursor, { ...param, type }, { length, 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, staticPosition }) {\n if (!length) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength;\n cursor.setPosition(start);\n const length2 = bytesToNumber(cursor.readBytes(sizeOfLength));\n const dynamicChild = hasDynamicChild(param);\n let consumed2 = 0;\n const value2 = [];\n for (let i3 = 0; i3 < length2; ++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 < length; ++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 < length; ++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, size5] = param.type.split(\"bytes\");\n if (!size5) {\n const offset = bytesToNumber(cursor.readBytes(32));\n cursor.setPosition(staticPosition + offset);\n const length = bytesToNumber(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"0x\", 32];\n }\n const data = cursor.readBytes(length);\n cursor.setPosition(staticPosition + 32);\n return [bytesToHex(data), 32];\n }\n const value = bytesToHex(cursor.readBytes(Number.parseInt(size5), 32));\n return [value, 32];\n }\n function decodeNumber(cursor, param) {\n const signed = param.type.startsWith(\"int\");\n const size5 = Number.parseInt(param.type.split(\"int\")[1] || \"256\");\n const value = cursor.readBytes(32);\n return [\n size5 > 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 length = bytesToNumber(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"\", 32];\n }\n const data = cursor.readBytes(length, 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 [integer, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals)\n ];\n fraction = fraction.replace(/(0+)$/, \"\");\n return `${negative ? \"-\" : \"\"}${integer || \"0\"}${fraction ? `.${fraction}` : \"\"}`;\n }\n var init_formatUnits = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, WaitForTransactionReceiptTimeoutError;\n var init_transaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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: hash2, 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 (hash2)\n identifier = `Transaction with hash \"${hash2}\"`;\n super(`${identifier} could not be found.`, {\n name: \"TransactionNotFoundError\"\n });\n }\n };\n TransactionReceiptNotFoundError = class extends BaseError2 {\n constructor({ hash: hash2 }) {\n super(`Transaction receipt with hash \"${hash2}\" could not be found. The Transaction may not be processed on a block yet.`, {\n name: \"TransactionReceiptNotFoundError\"\n });\n }\n };\n WaitForTransactionReceiptTimeoutError = class extends BaseError2 {\n constructor({ hash: hash2 }) {\n super(`Timed out while waiting for transaction with hash \"${hash2}\" to be confirmed.`, { name: \"WaitForTransactionReceiptTimeoutError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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 = void 0;\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE2 ? 4 : 0;\n const l6 = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE2);\n view.setUint32(byteOffset + l6, wl, isLE2);\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, isLE2) {\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 = isLE2;\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: isLE2 } = 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), isLE2);\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], isLE2);\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, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % 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(hash2, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash(hash2);\n const key = toBytes2(_key);\n this.iHash = hash2.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 pad4 = new Uint8Array(blockLen);\n pad4.set(key.length > blockLen ? hash2.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad4.length; i3++)\n pad4[i3] ^= 54;\n this.iHash.update(pad4);\n this.oHash = hash2.create();\n for (let i3 = 0; i3 < pad4.length; i3++)\n pad4[i3] ^= 54 ^ 92;\n this.oHash.update(pad4);\n clean(pad4);\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 = (hash2, key, message) => new HMAC(hash2, key).update(message).digest();\n hmac.create = (hash2, key) => new HMAC(hash2, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.2/node_modules/@noble/curves/esm/utils.js\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 bytesToNumberBE(bytes) {\n return hexToNumber2(bytesToHex2(bytes));\n }\n function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber2(bytesToHex2(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE(n2, len) {\n return hexToBytes2(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 = hexToBytes2(hex);\n } catch (e2) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e2);\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 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 const u8n = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\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(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 isHash(val) {\n return typeof val === \"function\" && Number.isSafeInteger(val.outputLen);\n }\n function _validateObject(object, fields, optFields = {}) {\n if (!object || typeof object !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object[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 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, isPosBig, bitMask;\n var init_utils5 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.2/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 _0n2 = /* @__PURE__ */ BigInt(0);\n _1n2 = /* @__PURE__ */ BigInt(1);\n isPosBig = (n2) => typeof n2 === \"bigint\" && _0n2 <= n2;\n bitMask = (n2) => (_1n2 << BigInt(n2)) - _1n2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.2/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(number, modulo) {\n if (number === _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(number, 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: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n _validateObject(field, opts);\n return field;\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, bitLenOrOpts, isLE2 = false, opts = {}) {\n if (ORDER <= _0n3)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE2)\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 isLE2 = _opts.isLE;\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 } = nLength(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: isLE2,\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 // is valid and invertible\n isValidNot0: (num2) => !f6.is0(num2) && f6.isValid(num2),\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: _sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f6, n2);\n }),\n toBytes: (num2) => isLE2 ? 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 isLE2 ? 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 length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField(key, fieldOrder, isLE2 = 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 = isLE2 ? bytesToNumberLE(key) : bytesToNumberBE(key);\n const reduced = mod(num2, fieldOrder - _1n3) + _1n3;\n return isLE2 ? 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.2/node_modules/@noble/curves/esm/abstract/modular.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\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.2/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, property, points) {\n const getz = property === \"pz\" ? (p4) => p4.pz : (p4) => p4.ez;\n const toInv = FpInvertBatch(c4.Fp, points.map(getz));\n const affined = points.map((p4, i3) => p4.toAffine(toInv[i3]));\n return affined.map(c4.fromAffine);\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 assert0(n2) {\n if (n2 !== _0n4)\n throw new Error(\"invalid wNAF\");\n }\n function wNAF(c4, bits) {\n return {\n constTimeNegate: negateCt,\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 base3 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base3 = p4;\n points.push(base3);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base3 = base3.add(p4);\n points.push(base3);\n }\n p4 = base3.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(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 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 assert0(n2);\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 if (typeof transform2 === \"function\")\n comp = transform2(comp);\n pointPrecomputes.set(P2, comp);\n }\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 mulEndoUnsafe(c4, point, k1, k22) {\n let acc = point;\n let p1 = c4.ZERO;\n let p22 = c4.ZERO;\n while (k1 > _0n4 || k22 > _0n4) {\n if (k1 & _1n4)\n p1 = p1.add(acc);\n if (k22 & _1n4)\n p22 = p22.add(acc);\n acc = acc.double();\n k1 >>= _1n4;\n k22 >>= _1n4;\n }\n return { p1, p2: p22 };\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 createField(order, field) {\n if (field) {\n if (field.ORDER !== order)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n validateField(field);\n return field;\n } else {\n return Field(order);\n }\n }\n function _createCurveFields(type, CURVE, curveOpts = {}) {\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 > _0n4))\n throw new Error(`CURVE.${p4} must be positive bigint`);\n }\n const Fp = createField(CURVE.p, curveOpts.Fp);\n const Fn = createField(CURVE.n, curveOpts.Fn);\n const _b2 = type === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b2];\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 return { Fp, Fn };\n }\n var _0n4, _1n4, pointPrecomputes, pointWindowSizes;\n var init_curve = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.2/node_modules/@noble/curves/esm/abstract/curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils5();\n init_modular();\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.2/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 _legacyHelperEquat(Fp, a3, b4) {\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, a3)), b4);\n }\n return weierstrassEquation;\n }\n function _legacyHelperNormPriv(Fn, allowedPrivateKeyLengths, wrapPrivateKey) {\n const { BYTES: expected } = Fn;\n function normPrivateKeyToScalar(key) {\n let num2;\n if (typeof key === \"bigint\") {\n num2 = key;\n } else {\n let bytes = ensureBytes(\"private key\", key);\n if (allowedPrivateKeyLengths) {\n if (!allowedPrivateKeyLengths.includes(bytes.length * 2))\n throw new Error(\"invalid private key\");\n const padded = new Uint8Array(expected);\n padded.set(bytes, padded.length - bytes.length);\n bytes = padded;\n }\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 (wrapPrivateKey)\n num2 = Fn.create(num2);\n if (!Fn.isValidNot0(num2))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num2;\n }\n return normPrivateKeyToScalar;\n }\n function weierstrassN(CURVE, curveOpts = {}) {\n const { Fp, Fn } = _createCurveFields(\"weierstrass\", CURVE, curveOpts);\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n _validateObject(curveOpts, {}, {\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 } = curveOpts;\n if (endo) {\n if (!Fp.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error('invalid endo: expected \"beta\": bigint and \"splitScalar\": function');\n }\n }\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 abool(\"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 abytes(bytes);\n const L2 = Fp.BYTES;\n const LC = L2 + 1;\n const LU = 2 * L2 + 1;\n const length = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length === LC && (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 (length === LU && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(L2 * 0, L2 * 1));\n const y6 = Fp.fromBytes(tail.subarray(L2 * 1, 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 ${length}, expected compressed=${LC} or uncompressed=${LU}`);\n }\n }\n const toBytes4 = curveOpts.toBytes || pointToBytes2;\n const fromBytes2 = curveOpts.fromBytes || pointFromBytes;\n const weierstrassEquation = _legacyHelperEquat(Fp, CURVE.a, CURVE.b);\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 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 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 (curveOpts.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 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.px, endoBeta), k2p.py, k2p.pz);\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(px, py, pz) {\n this.px = acoord(\"x\", px);\n this.py = acoord(\"y\", py, true);\n this.pz = acoord(\"z\", pz);\n Object.freeze(this);\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 get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n static normalizeZ(points) {\n return normalizeZ(Point3, \"pz\", points);\n }\n static fromBytes(bytes) {\n abytes(bytes);\n return Point3.fromHex(bytes);\n }\n /** Converts hash string or Uint8Array to Point. */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes2(ensureBytes(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n /** Multiplies generator point by privateKey. */\n static fromPrivateKey(privateKey) {\n const normPrivateKeyToScalar = _legacyHelperNormPriv(Fn, curveOpts.allowedPrivateKeyLengths, curveOpts.wrapPrivateKey);\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 /**\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.setWindowSize(this, windowSize);\n if (!isLazy)\n this.multiply(_3n2);\n return this;\n }\n /** \"Private method\", don't use it directly */\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\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 { 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 /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\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 /**\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 } = curveOpts;\n if (!Fn.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n2) => wnaf.wNAFCached(this, n2, Point3.normalizeZ);\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(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 Point3.normalizeZ([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 private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = curveOpts;\n const p4 = this;\n if (!Fn.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n5 || p4.is0())\n return Point3.ZERO;\n if (sc === _1n5)\n return p4;\n if (wnaf.hasPrecomputes(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(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.wNAFCachedUnsafe(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 } = curveOpts;\n if (cofactor === _1n5)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n return wnaf.wNAFCachedUnsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = curveOpts;\n if (cofactor === _1n5)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(cofactor);\n }\n toBytes(isCompressed = true) {\n abool(\"isCompressed\", isCompressed);\n this.assertValidity();\n return toBytes4(Point3, this, isCompressed);\n }\n /** @deprecated use `toBytes` */\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n toHex(isCompressed = true) {\n return bytesToHex2(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\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 = wNAF(Point3, curveOpts.endo ? Math.ceil(bits / 2) : bits);\n return Point3;\n }\n function pprefix(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function ecdsa(Point3, ecdsaOpts, curveOpts = {}) {\n _validateObject(ecdsaOpts, { hash: \"function\" }, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes_ = ecdsaOpts.randomBytes || randomBytes;\n const hmac_ = ecdsaOpts.hmac || ((key, ...msgs) => hmac(ecdsaOpts.hash, key, concatBytes(...msgs)));\n const { Fp, Fn } = Point3;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n5;\n return number > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? Fn.neg(s4) : s4;\n }\n function aValidRS(title2, num2) {\n if (!Fn.isValidNot0(num2))\n throw new Error(`invalid signature ${title2}: out of range 1..CURVE.n`);\n }\n class Signature {\n constructor(r2, s4, recovery) {\n aValidRS(\"r\", r2);\n aValidRS(\"s\", s4);\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 L2 = Fn.BYTES;\n const b4 = ensureBytes(\"compactSignature\", hex, L2 * 2);\n return new Signature(Fn.fromBytes(b4.subarray(0, L2)), Fn.fromBytes(b4.subarray(L2, L2 * 2)));\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 Signature(r2, s4);\n }\n /**\n * @todo remove\n * @deprecated\n */\n assertValidity() {\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n // ProjPointType\n recoverPublicKey(msgHash) {\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 * _2n3 < 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.fromHex(concatBytes(pprefix((rec & 1) === 0), x4));\n const ir = Fn.inv(radj);\n const h4 = bits2int_modN(ensureBytes(\"msgHash\", msgHash));\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 normalizeS() {\n return this.hasHighS() ? new Signature(this.r, Fn.neg(this.s), this.recovery) : this;\n }\n toBytes(format) {\n if (format === \"compact\")\n return concatBytes(Fn.toBytes(this.r), Fn.toBytes(this.s));\n if (format === \"der\")\n return hexToBytes2(DER.hexFromSig(this));\n throw new Error(\"invalid format\");\n }\n // DER-encoded\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return bytesToHex2(this.toBytes(\"der\"));\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return bytesToHex2(this.toBytes(\"compact\"));\n }\n }\n const normPrivateKeyToScalar = _legacyHelperNormPriv(Fn, curveOpts.allowedPrivateKeyLengths, curveOpts.wrapPrivateKey);\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 n2 = CURVE_ORDER;\n return mapHashToField(randomBytes_(getMinHashLength(n2)), n2);\n },\n precompute(windowSize = 8, point = Point3.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toBytes(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 length = arr.length;\n const L2 = Fp.BYTES;\n const LC = L2 + 1;\n const LU = 2 * L2 + 1;\n if (curveOpts.allowedPrivateKeyLengths || Fn.BYTES === LC) {\n return void 0;\n } else {\n return length === LC || length === LU;\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)).toBytes(isCompressed);\n }\n const bits2int = ecdsaOpts.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 - fnBits;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function(bytes) {\n return Fn.create(bits2int(bytes));\n };\n const ORDER_MASK = bitMask(fnBits);\n function int2octets(num2) {\n aInRange(\"num < 2^\" + fnBits, num2, _0n5, ORDER_MASK);\n return Fn.toBytes(num2);\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: hash2 } = ecdsaOpts;\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\", hash2(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 e2 = ent === true ? randomBytes_(Fp.BYTES) : ent;\n seedArgs.push(ensureBytes(\"extraEntropy\", e2));\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 === _0n5)\n return;\n const s4 = Fn.create(ik * Fn.create(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 Signature(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: ecdsaOpts.lowS, prehash: false };\n const defaultVerOpts = { lowS: ecdsaOpts.lowS, prehash: false };\n function sign3(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const drbg = createHmacDrbg(ecdsaOpts.hash.outputLen, Fn.BYTES, hmac_);\n return drbg(seed, k2sig);\n }\n Point3.BASE.precompute(8);\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes(\"msgHash\", msgHash);\n publicKey = ensureBytes(\"publicKey\", publicKey);\n validateSigVerOpts(opts);\n const { lowS, prehash, format } = opts;\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n if (format !== void 0 && ![\"compact\", \"der\", \"js\"].includes(format))\n throw new Error('format must be \"compact\", \"der\" or \"js\"');\n const isHex3 = typeof sg === \"string\" || isBytes(sg);\n const isObj = !isHex3 && !format && typeof sg === \"object\" && sg !== null && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex3 && !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 if (format === void 0 || format === \"js\") {\n _sig = new Signature(sg.r, sg.s);\n } else {\n throw new Error(\"invalid format\");\n }\n }\n if (isHex3) {\n try {\n if (format !== \"compact\")\n _sig = Signature.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!_sig && format !== \"der\")\n _sig = Signature.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 = ecdsaOpts.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\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 }\n return Object.freeze({\n getPublicKey,\n getSharedSecret,\n sign: sign3,\n verify,\n utils,\n Point: Point3,\n Signature\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 const Fn = Field(CURVE.n, c4.nBitLength);\n const curveOpts = {\n Fp,\n Fn,\n allowedPrivateKeyLengths: c4.allowedPrivateKeyLengths,\n allowInfinityPoint: c4.allowInfinityPoint,\n endo: c4.endo,\n wrapPrivateKey: c4.wrapPrivateKey,\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 hash: c4.hash,\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, ecdsaOpts };\n }\n function _ecdsa_new_output_to_legacy(c4, ecdsa2) {\n return Object.assign({}, ecdsa2, {\n ProjectivePoint: ecdsa2.Point,\n CURVE: c4\n });\n }\n function weierstrass(c4) {\n const { CURVE, curveOpts, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c4);\n const Point3 = weierstrassN(CURVE, curveOpts);\n const signs = ecdsa(Point3, ecdsaOpts, curveOpts);\n return _ecdsa_new_output_to_legacy(c4, signs);\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 const { A: A4, B: B2, Z: Z2 } = opts;\n if (!Fp.isValid(A4) || !Fp.isValid(B2) || !Fp.isValid(Z2))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio(Fp, Z2);\n if (!Fp.isOdd)\n throw new Error(\"Field does not have .isOdd()\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, Z2);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, B2);\n tv4 = Fp.cmov(Z2, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, A4);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, A4);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, B2);\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.2/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_utils5();\n init_curve();\n init_modular();\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 length = 0;\n if (!isLong)\n length = 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 length = length << 8 | b4;\n pos += lenLen;\n if (length < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length);\n if (v2.length !== length)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length) };\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.2/node_modules/@noble/curves/esm/_shortw_utils.js\n function createCurve(curveDef, defHash) {\n const create = (hash2) => weierstrass({ ...curveDef, hash: hash2 });\n return { ...create(defHash), create };\n }\n var init_shortw_utils = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.2/node_modules/@noble/curves/esm/_shortw_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_weierstrass();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.2/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\n function i2osp(value, length) {\n anum(value);\n anum(length);\n if (value < 0 || value >= 1 << 8 * length)\n throw new Error(\"invalid I2OSP input: \" + value);\n const res = Array.from({ length }).fill(0);\n for (let i3 = length - 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 abytes(msg);\n abytes(DST);\n anum(lenInBytes);\n if (DST.length > 255)\n DST = H3(concatBytes(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 (lenInBytes > 65535 || ell > 255)\n throw new Error(\"expand_message_xmd: invalid lenInBytes\");\n const DST_prime = concatBytes(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(concatBytes(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b4[0] = H3(concatBytes(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(concatBytes(...args));\n }\n const pseudo_random_bytes = concatBytes(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n function expand_message_xof(msg, DST, lenInBytes, k4, H3) {\n abytes(msg);\n abytes(DST);\n anum(lenInBytes);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update(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(i2osp(lenInBytes, 2)).update(DST).update(i2osp(DST.length, 1)).digest();\n }\n function hash_to_field(msg, count, options) {\n _validateObject(options, {\n p: \"bigint\",\n m: \"number\",\n k: \"number\",\n hash: \"function\"\n });\n const { p: p4, k: k4, m: m2, hash: hash2, expand, DST: _DST } = options;\n if (!isBytes(_DST) && typeof _DST !== \"string\")\n throw new Error(\"DST must be string or uint8array\");\n if (!isHash(options.hash))\n throw new Error(\"expected valid hash\");\n abytes(msg);\n anum(count);\n const DST = typeof _DST === \"string\" ? utf8ToBytes(_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, hash2);\n } else if (expand === \"xof\") {\n prb = expand_message_xof(msg, DST, len_in_bytes, k4, hash2);\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 e2 = 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 e2[j2] = mod(os2ip(tv), p4);\n }\n u2[i3] = e2;\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, defaults3) {\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: defaults3,\n hashToCurve(msg, options) {\n const dst = defaults3.DST ? defaults3.DST : {};\n const opts = Object.assign({}, defaults3, dst, options);\n const u2 = hash_to_field(msg, 2, opts);\n const u0 = map(u2[0]);\n const u1 = map(u2[1]);\n return clear(u0.add(u1));\n },\n encodeToCurve(msg, options) {\n const dst = defaults3.encodeDST ? defaults3.encodeDST : {};\n const opts = Object.assign({}, defaults3, dst, options);\n const u2 = hash_to_field(msg, 1, opts);\n return clear(map(u2[0]));\n },\n /** See {@link H2CHasher} */\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.2/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils5();\n init_modular();\n os2ip = bytesToNumberBE;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.2/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 = secp256k1_CURVE.p;\n const _3n3 = 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, _3n3, P2) * b32 % P2;\n const b9 = pow2(b6, _3n3, 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, _3n3, 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 = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n }\n function schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv);\n let p4 = Point.fromPrivateKey(d_);\n const scalar = hasEven(p4.y) ? d_ : modN(-d_);\n return { scalar, bytes: pointToBytes(p4) };\n }\n function lift_x(x4) {\n aInRange(\"x\", x4, _1n6, secp256k1_CURVE.p);\n const xx = modP(x4 * x4);\n const c4 = modP(xx * x4 + BigInt(7));\n let y6 = sqrtMod(c4);\n if (!hasEven(y6))\n y6 = modP(-y6);\n const p4 = Point.fromAffine({ x: x4, y: y6 });\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 e2 = challenge(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k4 + e2 * 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, secp256k1_CURVE.p))\n return false;\n const s4 = num(sig.subarray(32, 64));\n if (!inRange(s4, _1n6, secp256k1_CURVE.n))\n return false;\n const e2 = challenge(numTo32b(r2), pointToBytes(P2), m2);\n const R3 = Point.BASE.multiplyUnsafe(s4).add(P2.multiplyUnsafe(modN(-e2)));\n const { x: x4, y: y6 } = R3.toAffine();\n if (R3.is0() || !hasEven(y6) || x4 !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n var secp256k1_CURVE, _0n6, _1n6, _2n4, divNearest, Fpk1, secp256k1, TAGGED_HASH_PREFIXES, pointToBytes, numTo32b, modP, modN, Point, hasEven, num, schnorr, isoMap, mapSWU, secp256k1_hasher, hashToCurve, encodeToCurve;\n var init_secp256k1 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.2/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_weierstrass();\n init_utils5();\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 _0n6 = BigInt(0);\n _1n6 = BigInt(1);\n _2n4 = BigInt(2);\n divNearest = (a3, b4) => (a3 + b4 / _2n4) / b4;\n Fpk1 = Field(secp256k1_CURVE.p, void 0, void 0, { sqrt: sqrtMod });\n secp256k1 = createCurve({\n ...secp256k1_CURVE,\n Fp: Fpk1,\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 = secp256k1_CURVE.n;\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.toBytes(true).slice(1);\n numTo32b = (n2) => numberToBytesBE(n2, 32);\n modP = (x4) => mod(x4, secp256k1_CURVE.p);\n modN = (x4) => mod(x4, secp256k1_CURVE.n);\n Point = /* @__PURE__ */ (() => secp256k1.Point)();\n hasEven = (y6) => y6 % _2n4 === _0n6;\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.Point, (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.31.3_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: hash2, signature }) {\n const hashHex = isHex(hash2) ? hash2 : toHex(hash2);\n const { secp256k1: secp256k12 } = 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 secp256k12.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 secp256k12.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.31.3_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.31.3_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: hash2, signature }) {\n return publicKeyToAddress(await recoverPublicKey({ hash: hash2, signature }));\n }\n var init_recoverAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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 length = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length,\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: encode7 } of list) {\n encode7(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 length = (() => {\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,\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(length) {\n if (length < 2 ** 8)\n return 1;\n if (length < 2 ** 16)\n return 2;\n if (length < 2 ** 24)\n return 3;\n if (length < 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.31.3_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.31.3_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 hash2 = 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(hash2);\n return hash2;\n }\n var init_hashAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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((e2) => e2?.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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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) => {\n const formatted = format(args);\n if (exclude) {\n for (const key of exclude) {\n delete formatted[key];\n }\n }\n return {\n ...formatted,\n ...overrides(args)\n };\n },\n type\n };\n };\n }\n var init_formatter = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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) {\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 (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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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) {\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.31.3_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.31.3_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) {\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.31.3_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.31.3_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: blockTag_, includeTransactions: includeTransactions_ } = {}) {\n const blockTag = blockTag_ ?? \"latest\";\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);\n }\n var init_getBlock = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 = (base3) => base3 * 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: version8 = 1 } = parameters;\n const to = parameters.to ?? (typeof commitment === \"string\" ? \"hex\" : \"bytes\");\n const versionedHash = sha2563(commitment, \"bytes\");\n versionedHash.set([version8], 0);\n return to === \"bytes\" ? versionedHash : bytesToHex(versionedHash);\n }\n var init_commitmentToVersionedHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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: version8 } = 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: version8\n }));\n }\n return hashes;\n }\n var init_commitmentsToVersionedHashes = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: size5 }) {\n super(\"Blob size is too large.\", {\n metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size5} 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: hash2, size: size5 }) {\n super(`Versioned hash \"${hash2}\" size is invalid.`, {\n metaMessages: [\"Expected: 32\", `Received: ${size5}`],\n name: \"InvalidVersionedHashSizeError\"\n });\n }\n };\n InvalidVersionedHashVersionError = class extends BaseError2 {\n constructor({ hash: hash2, version: version8 }) {\n super(`Versioned hash \"${hash2}\" version is invalid.`, {\n metaMessages: [\n `Expected: ${versionedHashVersionKzg}`,\n `Received: ${version8}`\n ],\n name: \"InvalidVersionedHashVersionError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 size5 = 0;\n while (size5 < 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 size5++;\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: account ? { address: account.address, type: \"json-rpc\" } : account\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.31.3_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.31.3_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 = \"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.31.3_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.31.3_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 } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n try {\n let estimateGas_rpc2 = function(parameters) {\n const { block: block2, request: request2, rpcStateOverride: rpcStateOverride2 } = parameters;\n return client.request({\n method: \"eth_estimateGas\",\n params: rpcStateOverride2 ? [request2, block2 ?? \"latest\", rpcStateOverride2] : block2 ? [request2, block2] : [request2]\n });\n };\n var estimateGas_rpc = estimateGas_rpc2;\n const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = await prepareTransactionRequest(client, {\n ...args,\n parameters: (\n // Some RPC Providers do not compute versioned hashes from blobs. We will need\n // to compute them.\n account?.type === \"local\" ? void 0 : [\"blobVersionedHashes\"]\n )\n });\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 from: account?.address,\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 });\n let estimate = BigInt(await estimateGas_rpc2({ block, request, rpcStateOverride }));\n if (authorizationList) {\n const value2 = await getBalance(client, { address: request.from });\n const estimates = await Promise.all(authorizationList.map(async (authorization) => {\n const { address } = authorization;\n const estimate2 = await estimateGas_rpc2({\n block,\n request: {\n authorizationList: void 0,\n data,\n from: account?.address,\n to: address,\n value: numberToHex(value2)\n },\n rpcStateOverride\n }).catch(() => 100000n);\n return 2n * BigInt(estimate2);\n }));\n estimate += estimates.reduce((acc, curr) => acc + curr, 0n);\n }\n return estimate;\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.31.3_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 init_getBalance();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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_size();\n init_toEventSelector();\n init_cursor();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n docsPath3 = \"/docs/contract/decodeEventLog\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 isEqual(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) => isEqual(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) => isEqual(input, value2, args[key]));\n });\n return false;\n }\n var init_parseEventLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.8.1_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.8.1_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.8.1_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_errors4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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.8.1_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.8.1_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_errors4();\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.8.1_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.8.1_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.8.1_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 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: size5 = 32 } = options;\n if (size5 === 0)\n return bytes;\n if (bytes.length > size5)\n throw new SizeExceedsPaddingSizeError2({\n size: bytes.length,\n targetSize: size5,\n type: \"Bytes\"\n });\n const paddedBytes = new Uint8Array(size5);\n for (let i3 = 0; i3 < size5; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size5 - i3 - 1] = bytes[padEnd ? i3 : bytes.length - i3 - 1];\n }\n return paddedBytes;\n }\n var charCodeMap2;\n var init_bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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.8.1_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 assertStartOffset2(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 assertEndOffset2(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: size5 = 32 } = options;\n if (size5 === 0)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size5 * 2)\n throw new SizeExceedsPaddingSizeError3({\n size: Math.ceil(hex.length / 2),\n targetSize: size5,\n type: \"Hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size5 * 2, \"0\")}`;\n }\n var init_hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\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: size5 } = options;\n let hex = value;\n if (size5) {\n assertSize3(value, size5);\n hex = padRight(value, size5);\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index2 = 0, j2 = 0; index2 < length; 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: size5 } = options;\n const bytes = encoder3.encode(value);\n if (typeof size5 === \"number\") {\n assertSize2(bytes, size5);\n return padRight2(bytes, size5);\n }\n return bytes;\n }\n function padRight2(value, size5) {\n return pad2(value, { dir: \"right\", size: size5 });\n }\n function size2(value) {\n return value.length;\n }\n var encoder3, SizeOverflowError2, SizeExceedsPaddingSizeError2;\n var init_Bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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 encoder3 = /* @__PURE__ */ new TextEncoder();\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 SizeExceedsPaddingSizeError2 = class extends BaseError3 {\n constructor({ size: size5, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size5}\\`) 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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\n function assert2(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 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 string = \"\";\n for (let i3 = 0; i3 < value.length; i3++)\n string += hexes3[value[i3]];\n const hex = `0x${string}`;\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: size5 } = options;\n const value_ = BigInt(value);\n let maxValue;\n if (size5) {\n if (signed)\n maxValue = (1n << BigInt(size5) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size5) * 8n) - 1n;\n } else if (typeof value === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value_ > maxValue || value_ < minValue) {\n const suffix = typeof value === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError2({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue}${suffix}`,\n signed,\n size: size5,\n value: `${value}${suffix}`\n });\n }\n const stringValue = (signed && value_ < 0 ? (1n << BigInt(size5 * 8)) + BigInt(value_) : value_).toString(16);\n const hex = `0x${stringValue}`;\n if (size5)\n return padLeft(hex, size5);\n return hex;\n }\n function fromString2(value, options = {}) {\n return fromBytes(encoder4.encode(value), options);\n }\n function padLeft(value, size5) {\n return pad3(value, { dir: \"left\", size: size5 });\n }\n function padRight(value, size5) {\n return pad3(value, { dir: \"right\", size: size5 });\n }\n function slice2(value, start, end, options = {}) {\n const { strict } = options;\n assertStartOffset2(value, start);\n const value_ = `0x${value.replace(\"0x\", \"\").slice((start ?? 0) * 2, (end ?? value.length) * 2)}`;\n if (strict)\n assertEndOffset2(value_, start, end);\n return value_;\n }\n function size3(value) {\n return Math.ceil((value.length - 2) / 2);\n }\n function validate(value, options = {}) {\n const { strict = false } = options;\n try {\n assert2(value, { strict });\n return true;\n } catch {\n return false;\n }\n }\n var encoder4, hexes3, IntegerOutOfRangeError2, InvalidHexTypeError, InvalidHexValueError, SizeOverflowError3, SliceOffsetOutOfBoundsError3, SizeExceedsPaddingSizeError3;\n var init_Hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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_Json();\n init_hex();\n encoder4 = /* @__PURE__ */ new TextEncoder();\n hexes3 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n IntegerOutOfRangeError2 = class extends BaseError3 {\n constructor({ max, min, signed, size: size5, value }) {\n super(`Number \\`${value}\\` is not in safe${size5 ? ` ${size5 * 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: size5 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size5}\\`).`);\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: size5, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size5}\\`) 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.8.1_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.8.1_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.8.1_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.8.1_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.31.3_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, universalSignatureValidatorAbi;\n var init_abis = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 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 name: \"ResolverNotFound\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"ResolverWildcardNotSupported\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"ResolverNotContract\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"returnData\",\n type: \"bytes\"\n }\n ],\n name: \"ResolverError\",\n type: \"error\"\n },\n {\n inputs: [\n {\n components: [\n {\n name: \"status\",\n type: \"uint16\"\n },\n {\n name: \"message\",\n type: \"string\"\n }\n ],\n name: \"errors\",\n type: \"tuple[]\"\n }\n ],\n name: \"HttpError\",\n type: \"error\"\n }\n ];\n universalResolverResolveAbi = [\n ...universalResolverErrors,\n {\n name: \"resolve\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes\" },\n { name: \"data\", type: \"bytes\" }\n ],\n outputs: [\n { name: \"\", type: \"bytes\" },\n { name: \"address\", type: \"address\" }\n ]\n },\n {\n name: \"resolve\",\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: \"reverse\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ type: \"bytes\", name: \"reverseName\" }],\n outputs: [\n { type: \"string\", name: \"resolvedName\" },\n { type: \"address\", name: \"resolvedAddress\" },\n { type: \"address\", name: \"reverseResolver\" },\n { type: \"address\", name: \"resolver\" }\n ]\n },\n {\n name: \"reverse\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { type: \"bytes\", name: \"reverseName\" },\n { type: \"string[]\", name: \"gateways\" }\n ],\n outputs: [\n { type: \"string\", name: \"resolvedName\" },\n { type: \"address\", name: \"resolvedAddress\" },\n { type: \"address\", name: \"reverseResolver\" },\n { type: \"address\", name: \"resolver\" }\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 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 }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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, universalSignatureValidatorByteCode;\n var init_contracts = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 universalSignatureValidatorByteCode = \"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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 description = abi2.find((x4) => \"type\" in x4 && x4.type === \"constructor\");\n if (!description)\n throw new AbiConstructorNotFoundError({ docsPath: docsPath5 });\n if (!(\"inputs\" in description))\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n if (!description.inputs || description.inputs.length === 0)\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n const data = encodeAbiParameters(description.inputs, args);\n return concatHex([bytecode, data]);\n }\n var docsPath5;\n var init_encodeDeployData = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 split3 = shouldSplitBatch?.([...getBatchedArgs(), args]);\n if (split3)\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.31.3_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.31.3_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.31.3_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.31.3_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 description = abi2.find((x4) => x4.type === \"function\" && signature === toFunctionSelector(formatAbiItem2(x4)));\n if (!description)\n throw new AbiFunctionSignatureNotFoundError(signature, {\n docsPath: \"/docs/contract/decodeFunctionData\"\n });\n return {\n functionName: description.name,\n args: \"inputs\" in description && description.inputs && description.inputs.length > 0 ? decodeAbiParameters(description.inputs, slice(data, 4)) : void 0\n };\n }\n var init_decodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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] = 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.31.3_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.31.3_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.31.3_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.31.3_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: batch2 = Boolean(client.batch?.multicall), blockNumber, 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 from: account?.address,\n accessList,\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 });\n if (batch2 && 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 base3 = [\n request,\n block\n ];\n if (rpcStateOverride && rpcBlockOverrides)\n return [...base3, rpcStateOverride, rpcBlockOverrides];\n if (rpcStateOverride)\n return [...base3, rpcStateOverride];\n if (rpcBlockOverrides)\n return [...base3, {}, rpcBlockOverrides];\n return base3;\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, wait: wait2 = 0 } = typeof client.batch?.multicall === \"object\" ? client.batch.multicall : {};\n const { blockNumber, blockTag = \"latest\", data, multicallAddress: multicallAddress_, to } = args;\n let multicallAddress = multicallAddress_;\n if (!multicallAddress) {\n if (!client.chain)\n throw new ClientChainNotConfiguredError();\n multicallAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\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 size5 = args2.reduce((size6, { data: data2 }) => size6 + (data2.length - 2), 0);\n return size5 > 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 data: calldata,\n to: multicallAddress\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 = void 0;\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.31.3_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.31.3_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 = (/* @__PURE__ */ new Date()).getTime() - 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.31.3_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.31.3_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.31.3_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.31.3_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: filter2 }) {\n const strict = \"strict\" in filter2 && filter2.strict;\n const logs = await filter2.request({\n method: \"eth_getFilterChanges\",\n params: [filter2.id]\n });\n if (typeof logs[0] === \"string\")\n return logs;\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!(\"abi\" in filter2) || !filter2.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter2.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterChanges = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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: filter2 }) {\n return filter2.request({\n method: \"eth_uninstallFilter\",\n params: [filter2.id]\n });\n }\n var init_uninstallFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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: batch2 = 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\")\n return false;\n if (client.transport.type === \"fallback\" && client.transport.transports[0].config.type === \"webSocket\")\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 batch2,\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 filter2;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter2 = 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 (filter2) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter: filter2 });\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 (batch2)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter2 && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter2)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter: filter2 });\n unwatch();\n };\n });\n };\n const subscribeContractEvent = () => {\n const strict = strict_ ?? false;\n const observerId = stringify([\n \"watchContractEvent\",\n address,\n args,\n batch2,\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\");\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 authorizationList,\n blobs,\n chainId,\n data,\n from: account?.address,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n type,\n value\n });\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 (e2) {\n if (isWalletNamespaceSupported === false)\n throw e2;\n const error = e2;\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((hash2) => {\n supportsWalletNamespace.set(client.uid, true);\n return hash2;\n }).catch((e3) => {\n const walletNamespaceError = e3;\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.31.3_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.31.3_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 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, sendTransaction, \"sendTransaction\")({\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 var init_writeContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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) {\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.31.3_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.31.3_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(length = 11) {\n if (!buffer || index + length > 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++ + length);\n }\n var size4, index, buffer;\n var init_uid = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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: batch2, chain: chain2, ccipRead, key = \"base\", name = \"Base Client\", type = \"base\" } = parameters;\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: batch2,\n cacheTime,\n ccipRead,\n chain: chain2,\n key,\n name,\n pollingInterval,\n request,\n transport,\n type,\n uid: uid()\n };\n function extend2(base3) {\n return (extendFn) => {\n const extended = extendFn(base3);\n for (const key2 in client)\n delete extended[key2];\n const combined = { ...base3, ...extended };\n return Object.assign(combined, { extend: extend2(combined) });\n };\n }\n return Object.assign(client, { extend: extend2(client) });\n }\n var init_createClient = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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 delay2 = typeof delay_ === \"function\" ? delay_({ count, error }) : delay_;\n if (delay2)\n await wait(delay2);\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.31.3_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.31.3_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: dedupe2 = 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 = dedupe2 ? 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) * 1e3;\n }\n return ~~(1 << count) * retryDelay;\n },\n retryCount,\n shouldRetry: ({ error }) => shouldRetry(error)\n }), { enabled: dedupe2, 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.31.3_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.31.3_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.31.3_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.31.3_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 custom2(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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, 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 init2 = {\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, init2);\n const args = await onRequest?.(request, init2) ?? { ...init2, url };\n const response2 = await fetch(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.31.3_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.31.3_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: batch2, 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 batch2 === \"object\" ? batch2 : {};\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 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) => batch2 ? 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.31.3_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.31.3_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, callType) {\n if (!(err instanceof BaseError2))\n return false;\n const cause = err.walk((e2) => e2 instanceof ContractFunctionRevertedError);\n if (!(cause instanceof ContractFunctionRevertedError))\n return false;\n if (cause.data?.errorName === \"ResolverNotFound\")\n return true;\n if (cause.data?.errorName === \"ResolverWildcardNotSupported\")\n return true;\n if (cause.data?.errorName === \"ResolverNotContract\")\n return true;\n if (cause.data?.errorName === \"ResolverError\")\n return true;\n if (cause.data?.errorName === \"HttpError\")\n return true;\n if (cause.reason?.includes(\"Wildcard on non-extended resolvers is not supported\"))\n return true;\n if (callType === \"reverse\" && cause.reason === panicReasons[50])\n return true;\n return false;\n }\n var init_errors5 = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_solidity();\n init_base();\n init_contract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 hash2 = `0x${label.slice(1, 65)}`;\n if (!isHex(hash2))\n return null;\n return hash2;\n }\n var init_encodedLabelToLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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(hash2) {\n return `[${hash2.slice(2)}]`;\n }\n var init_encodeLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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((tld2) => name.endsWith(tld2)))\n return null;\n try {\n const functionData = encodeFunctionData({\n abi: addressResolverAbi,\n functionName: \"addr\",\n ...coinType != null ? { args: [namehash(name), BigInt(coinType)] } : { args: [namehash(name)] }\n });\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: \"resolve\",\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: coinType != null ? [namehash(name), BigInt(coinType)] : void 0,\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, \"resolve\"))\n return null;\n throw err;\n }\n }\n var init_getEnsAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_errors5();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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 (!globalThis.hasOwnProperty(\"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 = base64Regex2.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),\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, base64Regex2, dataURIRegex;\n var init_utils6 = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 base64Regex2 = /^data:([a-zA-Z\\-/+]*);base64,([^\"].*)/;\n dataURIRegex = /^data:([a-zA-Z\\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 }) {\n if (/eip155:/i.test(record))\n return parseNftAvatarUri(client, { gatewayUrls, record });\n return parseAvatarUri({ uri: record, gatewayUrls });\n }\n async function parseNftAvatarUri(client, { gatewayUrls, record }) {\n const nft = parseNftUri(record);\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.31.3_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.31.3_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((tld2) => name.endsWith(tld2)))\n return null;\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: \"resolve\",\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 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 record = decodeFunctionResult({\n abi: textResolverAbi,\n functionName: \"text\",\n data: res[0]\n });\n return record === \"\" ? null : record;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err, \"resolve\"))\n return null;\n throw err;\n }\n }\n var init_getEnsText = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_errors5();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 record = await getAction(client, getEnsText, \"getEnsText\")({\n blockNumber,\n blockTag,\n key: \"avatar\",\n name,\n universalResolverAddress,\n gatewayUrls,\n strict\n });\n if (!record)\n return null;\n try {\n return await parseAvatarRecord(client, {\n record,\n gatewayUrls: assetGatewayUrls\n });\n } catch {\n return null;\n }\n }\n var init_getEnsAvatar = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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, { address, blockNumber, blockTag, gatewayUrls, strict, universalResolverAddress: universalResolverAddress_ }) {\n let universalResolverAddress = universalResolverAddress_;\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"ensUniversalResolver\"\n });\n }\n const reverseNode = `${address.toLowerCase().substring(2)}.addr.reverse`;\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverReverseAbi,\n functionName: \"reverse\",\n args: [toHex(packetToBytes(reverseNode))],\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const [name, resolvedAddress] = gatewayUrls ? await readContractAction({\n ...readContractParameters,\n args: [...readContractParameters.args, gatewayUrls]\n }) : await readContractAction(readContractParameters);\n if (address.toLowerCase() !== resolvedAddress.toLowerCase())\n return null;\n return name;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err, \"reverse\"))\n return null;\n throw err;\n }\n }\n var init_getEnsName = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_toHex();\n init_errors5();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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((tld2) => name.endsWith(tld2)))\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: [{ type: \"address\" }, { type: \"bytes32\" }],\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.31.3_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.31.3_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 from: account?.address,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n to,\n value\n });\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, version8, 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: version8,\n chainId: Number(chainId),\n verifyingContract,\n salt\n },\n extensions,\n fields\n };\n } catch (e2) {\n const error = e2;\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: filter2 }) {\n const strict = filter2.strict ?? false;\n const logs = await filter2.request({\n method: \"eth_getFilterLogs\",\n params: [filter2.id]\n });\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!filter2.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter2.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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, base3, size_] = integerMatch;\n numberToHex(value, {\n signed: base3 === \"int\",\n size: Number.parseInt(size_) / 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_))\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size_),\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.31.3_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.31.3_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, isArray2 = 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: isArray2 ? 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: isArray2 ? 32 : 1 });\n const intMatch = type.match(integerRegex2);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size5 = Number.parseInt(bits) / 8;\n return numberToHex(value, {\n size: isArray2 ? 32 : size5,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex2);\n if (bytesMatch) {\n const [_type, size5] = bytesMatch;\n if (Number.parseInt(size5) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size5),\n givenSize: (value.length - 2) / 2\n });\n return pad(value, { dir: \"right\", size: isArray2 ? 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.31.3_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.31.3_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 hash2 of blobVersionedHashes) {\n const size_ = size(hash2);\n const version8 = hexToNumber(slice(hash2, 0, 1));\n if (size_ !== 32)\n throw new InvalidVersionedHashSizeError({ hash: hash2, size: size_ });\n if (version8 !== versionedHashVersionKzg)\n throw new InvalidVersionedHashVersionError({\n hash: hash2,\n version: version8\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 isBytes2(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.31.3_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.31.3_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 from5 = 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([from5, nonce], \"bytes\")).slice(26)}`);\n }\n function getCreate2Address(opts) {\n const from5 = toBytes(getAddress(opts.from));\n const salt = pad(isBytes2(opts.salt) ? opts.salt : toBytes(opts.salt), {\n size: 32\n });\n const bytecodeHash = (() => {\n if (\"bytecodeHash\" in opts) {\n if (isBytes2(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\"), from5, salt, bytecodeHash])), 12));\n }\n var init_getContractAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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/@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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 erc6492MagicBytes, zeroHash;\n var init_bytes2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 erc6492MagicBytes = \"0x6492649264926492649264926492649264926492649264926492649264926492\";\n zeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/isErc6492Signature.js\n function isErc6492Signature(signature) {\n return sliceHex(signature, -32) === erc6492MagicBytes;\n }\n var init_isErc6492Signature = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/isErc6492Signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bytes2();\n init_slice();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeErc6492Signature.js\n function serializeErc6492Signature(parameters) {\n const { address, data, signature, to = \"hex\" } = parameters;\n const signature_ = concatHex([\n encodeAbiParameters([{ type: \"address\" }, { type: \"bytes\" }, { type: \"bytes\" }], [address, data, signature]),\n erc6492MagicBytes\n ]);\n if (to === \"hex\")\n return signature_;\n return hexToBytes(signature_);\n }\n var init_serializeErc6492Signature = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeErc6492Signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bytes2();\n init_encodeAbiParameters();\n init_concat();\n init_toBytes();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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_encodeFunctionData();\n init_fromHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: hash2, index: index2 }) {\n const blockTag = blockTag_ || \"latest\";\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let transaction = null;\n if (hash2) {\n transaction = await client.request({\n method: \"eth_getTransactionByHash\",\n params: [hash2]\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: hash2,\n index: index2\n });\n const format = client.chain?.formatters?.transaction?.format || formatTransaction;\n return format(transaction);\n }\n var init_getTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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: hash2, transactionReceipt }) {\n const [blockNumber, transaction] = await Promise.all([\n getAction(client, getBlockNumber, \"getBlockNumber\")({}),\n hash2 ? getAction(client, getTransaction, \"getTransaction\")({ hash: hash2 }) : 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.31.3_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.31.3_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: hash2 }) {\n const receipt = await client.request({\n method: \"eth_getTransactionReceipt\",\n params: [hash2]\n }, { dedupe: true });\n if (!receipt)\n throw new TransactionReceiptNotFoundError({ hash: hash2 });\n const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;\n return format(receipt);\n }\n var init_getTransactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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, allowFailure = true, batchSize: batchSize_, blockNumber, blockTag, multicallAddress: multicallAddress_, stateOverride } = parameters;\n const contracts2 = parameters.contracts;\n const batchSize = batchSize_ ?? (typeof client.batch?.multicall === \"object\" && client.batch.multicall.batchSize || 1024);\n let multicallAddress = multicallAddress_;\n if (!multicallAddress) {\n if (!client.chain)\n throw new Error(\"client chain not configured. multicallAddress is required.\");\n multicallAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\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 abi: multicall3Abi,\n account,\n address: multicallAddress,\n args: [calls],\n blockNumber,\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.31.3_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_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.31.3_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 = \"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 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 = void 0;\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 (e2) {\n const cause = e2;\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.31.3_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.8.1_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.8.1_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.8.1_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.8.1_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(size5) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size5;\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.8.1_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.8.1_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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Address.js\n function assert3(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 assert3(address, { strict: false });\n const hexAddress = address.substring(2).toLowerCase();\n const hash2 = keccak2562(fromString(hexAddress), { as: \"Bytes\" });\n const characters = hexAddress.split(\"\");\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hash2[i3 >> 1] >> 4 >= 8 && characters[i3]) {\n characters[i3] = characters[i3].toUpperCase();\n }\n if ((hash2[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 validate2(address, options = {}) {\n const { strict = true } = options ?? {};\n try {\n assert3(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.8.1_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 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.8.1_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 validate2(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 validate2(args[parameterIndex], {\n strict: false\n });\n if (types.includes(\"address\") && types.includes(\"bytes\"))\n return validate2(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.8.1_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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiItem.js\n function from2(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 = validate(name, { strict: false });\n const abiItems = abi2.filter((abiItem2) => {\n if (isSelector) {\n if (abiItem2.type === \"function\" || abiItem2.type === \"error\")\n return getSelector(abiItem2) === slice2(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 = void 0;\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(abiItem) {\n return slice2(getSignatureHash(abiItem), 0, 4);\n }\n function getSignature(abiItem) {\n const signature = (() => {\n if (typeof abiItem === \"string\")\n return abiItem;\n return formatAbiItem(abiItem);\n })();\n return normalizeSignature2(signature);\n }\n function getSignatureHash(abiItem) {\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.8.1_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.8.1_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.8.1_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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiParameters.js\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 [length, type] = arrayComponents;\n return encodeArray2(value, {\n checksumAddress: checksumAddress2,\n length,\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 [, , size5 = \"256\"] = integerRegex3.exec(parameter.type) ?? [];\n return encodeNumber2(value, {\n signed,\n size: Number(size5)\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 assert3(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, parameter } = options;\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError2(value);\n if (!dynamic && value.length !== length)\n throw new ArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${parameter.type}[${length}]`\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 length2 = fromNumber(preparedParameters.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParameters.length > 0 ? concat2(length2, data) : length2\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))\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(parametersize),\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: size5 }) {\n if (typeof size5 === \"number\") {\n const max = 2n ** (BigInt(size5) - (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: size5 / 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 hexValue3 = fromString2(value);\n const partsLength = Math.ceil(size3(hexValue3) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padRight(slice2(hexValue3, i3 * 32, (i3 + 1) * 32)));\n }\n return {\n dynamic: true,\n encoded: concat2(padRight(fromNumber(size3(hexValue3), { 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 matches2 = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches2 ? (\n // Return `null` if the array is dynamic.\n [matches2[2] ? Number(matches2[2]) : null, matches2[1]]\n ) : void 0;\n }\n var init_abiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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_Errors();\n init_Hex();\n init_Solidity();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiParameters.js\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 var ArrayLengthMismatchError, BytesSizeMismatchError2, LengthMismatchError, InvalidArrayError2, InvalidTypeError;\n var init_AbiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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_Address();\n init_Errors();\n init_Hex();\n init_Solidity();\n init_abiParameters();\n (function(encodePacked3) {\n function encode7(type, value, isArray2 = false) {\n if (type === \"address\") {\n const address = value;\n assert3(address);\n return padLeft(address.toLowerCase(), isArray2 ? 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), isArray2 ? 32 : 1);\n const intMatch = type.match(integerRegex3);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size5 = Number.parseInt(bits) / 8;\n return fromNumber(value, {\n size: isArray2 ? 32 : size5,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex3);\n if (bytesMatch) {\n const [_type, size5] = bytesMatch;\n if (Number.parseInt(size5) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(size5),\n value\n });\n return padRight(value, isArray2 ? 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(encode7(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 = encode7;\n })(encodePacked2 || (encodePacked2 = {}));\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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiConstructor.js\n function encode4(abiConstructor, options) {\n const { bytecode, args } = options;\n return concat2(bytecode, abiConstructor.inputs?.length && args?.length ? encode3(abiConstructor.inputs, args) : \"0x\");\n }\n function from3(abiConstructor) {\n return from2(abiConstructor);\n }\n var init_AbiConstructor = __esm({\n \"../../../node_modules/.pnpm/ox@0.8.1_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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiFunction.js\n function encodeData2(abiFunction, ...args) {\n const { overloads } = abiFunction;\n const item = overloads ? fromAbi2([abiFunction, ...overloads], abiFunction.name, {\n args: args[0]\n }) : abiFunction;\n const selector = getSelector2(item);\n const data = args.length > 0 ? encode3(item.inputs, args[0]) : void 0;\n return data ? concat2(selector, data) : selector;\n }\n function from4(abiFunction, options = {}) {\n return from2(abiFunction, options);\n }\n function fromAbi2(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.8.1_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.31.3_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.31.3_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.31.3_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(from3(\"constructor(bytes, bytes)\"), {\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [\n getBalanceCode,\n encodeData2(from4(\"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 from4(\"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 from4(\"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 from4(\"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 from4(\"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: [from4(\"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.31.3_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/viem@2.31.3_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.31.3_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.31.3_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, factory, factoryData, hash: hash2, signature, universalSignatureVerifierAddress = client.chain?.contracts?.universalSignatureVerifier?.address, ...rest } = parameters;\n const signatureHex = (() => {\n if (isHex(signature))\n return signature;\n if (typeof signature === \"object\" && \"r\" in signature && \"s\" in signature)\n return serializeSignature(signature);\n return bytesToHex(signature);\n })();\n const wrappedSignature = await (async () => {\n if (!factory && !factoryData)\n return signatureHex;\n if (isErc6492Signature(signatureHex))\n return signatureHex;\n return serializeErc6492Signature({\n address: factory,\n data: factoryData,\n signature: signatureHex\n });\n })();\n try {\n const args = universalSignatureVerifierAddress ? {\n to: universalSignatureVerifierAddress,\n data: encodeFunctionData({\n abi: universalSignatureValidatorAbi,\n functionName: \"isValidSig\",\n args: [address, hash2, wrappedSignature]\n }),\n ...rest\n } : {\n data: encodeDeployData({\n abi: universalSignatureValidatorAbi,\n args: [address, hash2, wrappedSignature],\n bytecode: universalSignatureValidatorByteCode\n }),\n ...rest\n };\n const { data } = await getAction(client, call, \"call\")(args);\n return hexToBool(data ?? \"0x0\");\n } catch (error) {\n try {\n const verified = isAddressEqual(getAddress(address), await recoverAddress({ hash: hash2, signature }));\n if (verified)\n return true;\n } catch {\n }\n if (error instanceof CallExecutionError) {\n return false;\n }\n throw error;\n }\n }\n var init_verifyHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_abis();\n init_contracts();\n init_contract();\n init_encodeDeployData();\n init_getAddress();\n init_isAddressEqual();\n init_isHex();\n init_toHex();\n init_getAction();\n init_utils7();\n init_isErc6492Signature();\n init_recoverAddress();\n init_serializeErc6492Signature();\n init_serializeSignature();\n init_call();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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 hash2 = hashMessage(message);\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash2,\n signature,\n ...callRequest\n });\n }\n var init_verifyMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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 hash2 = hashTypedData({ message, primaryType, types, domain: domain2 });\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash2,\n signature,\n ...callRequest\n });\n }\n var init_verifyTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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\")\n return false;\n if (client.transport.type === \"fallback\" && client.transport.transports[0].config.type === \"webSocket\")\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) {\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 || 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\");\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.31.3_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.31.3_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, {\n confirmations = 1,\n hash: hash2,\n onReplaced,\n pollingInterval = client.pollingInterval,\n retryCount = 6,\n retryDelay = ({ count }) => ~~(1 << count) * 200,\n // exponential backoff\n timeout = 18e4\n }) {\n const observerId = stringify([\"waitForTransactionReceipt\", client.uid, hash2]);\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: hash2 }));\n }, timeout) : void 0;\n _unobserve = observe(observerId, { onReplaced, resolve, reject }, (emit2) => {\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 (!transaction) {\n retrying = true;\n await withRetry(async () => {\n transaction = await getAction(client, getTransaction, \"getTransaction\")({ hash: hash2 });\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: hash2 });\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: from5, nonce }) => from5 === 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.31.3_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.31.3_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 = \"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\")\n return false;\n if (client.transport.type === \"fallback\" && client.transport.transports[0].config.type === \"webSocket\")\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\");\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.31.3_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.31.3_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: batch2 = 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\")\n return false;\n if (client.transport.type === \"fallback\" && client.transport.transports[0].config.type === \"webSocket\")\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 batch2,\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 filter2;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter2 = 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 (filter2) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter: filter2 });\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 (batch2)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter2 && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter2)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter: filter2 });\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\");\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.31.3_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_encodeEventTopics();\n init_observe();\n init_poll();\n init_stringify();\n init_abi();\n init_rpc();\n init_decodeEventLog();\n init_log2();\n init_getAction();\n init_createEventFilter();\n init_getBlockNumber();\n init_getFilterChanges();\n init_getLogs();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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: batch2 = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = typeof poll_ !== \"undefined\" ? poll_ : client.transport.type !== \"webSocket\";\n const pollPendingTransactions = () => {\n const observerId = stringify([\n \"watchPendingTransactions\",\n client.uid,\n batch2,\n pollingInterval\n ]);\n return observe(observerId, { onTransactions, onError }, (emit2) => {\n let filter2;\n const unwatch = poll(async () => {\n try {\n if (!filter2) {\n try {\n filter2 = 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: filter2 });\n if (hashes.length === 0)\n return;\n if (batch2)\n emit2.onTransactions(hashes);\n else\n for (const hash2 of hashes)\n emit2.onTransactions([hash2]);\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter2)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter: filter2 });\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 hash2 = hashMessage(message);\n return verifyHash(client, {\n address: parsed.address,\n hash: hash2,\n signature,\n ...callRequest\n });\n }\n var init_verifySiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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 simulate: (args) => simulateBlocks(client, args),\n simulateBlocks: (args) => simulateBlocks(client, args),\n simulateCalls: (args) => simulateCalls(client, args),\n simulateContract: (args) => simulateContract(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.31.3_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_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 }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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_esm2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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_custom();\n init_http2();\n init_public();\n init_createTransport();\n init_address2();\n init_number();\n init_bytes2();\n init_base();\n init_address();\n init_stateOverride();\n init_decodeErrorResult();\n init_encodeAbiParameters();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_encodeFunctionResult();\n init_getContractAddress();\n init_hashTypedData();\n init_recoverAddress();\n init_toBytes();\n init_toHex();\n init_concat();\n init_defineChain();\n init_encodePacked();\n init_fromHex();\n init_hashMessage();\n init_isAddress();\n init_isHex();\n init_keccak256();\n init_pad();\n init_size();\n init_trim();\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js\n function isBytes3(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function isArrayOf(isString3, arr) {\n if (!Array.isArray(arr))\n return false;\n if (arr.length === 0)\n return true;\n if (isString3) {\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 wrap = (a3, b4) => (c4) => a3(b4(c4));\n const encode7 = args.map((x4) => x4.encode).reduceRight(wrap, id);\n const decode2 = args.map((x4) => x4.decode).reduce(wrap, id);\n return { encode: encode7, 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: (from5) => {\n astrArr(\"join.decode\", from5);\n return from5.join(separator);\n },\n decode: (to) => {\n astr(\"join.decode\", to);\n return to.split(separator);\n }\n };\n }\n function convertRadix(data, from5, to) {\n if (from5 < 2)\n throw new Error(`convertRadix: invalid from=${from5}, 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 >= from5)\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 = from5 * carry;\n const digitBase = fromCarry + digit;\n if (!Number.isSafeInteger(digitBase) || fromCarry / from5 !== 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 (!isBytes3(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 (!isBytes3(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 (!isBytes3(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_esm3 = __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_esm4 = __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_modular();\n init_secp256k1();\n init_hmac();\n init_legacy();\n init_sha2();\n init_utils3();\n init_esm3();\n Point2 = secp256k1.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 version8 = 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 (version8 !== 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 (!secp256k1.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 = secp256k1.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 (!secp256k1.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 = mod(this.privKey + childTweak, secp256k1.CURVE.n);\n if (!secp256k1.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(hash2) {\n if (!this.privateKey) {\n throw new Error(\"No privateKey set!\");\n }\n abytes(hash2, 32);\n return secp256k1.sign(hash2, this.privKey).toCompactRawBytes();\n }\n verify(hash2, signature) {\n abytes(hash2, 32);\n abytes(signature, 64);\n if (!this.publicKey) {\n throw new Error(\"No publicKey set!\");\n }\n let sig;\n try {\n sig = secp256k1.Signature.fromCompact(signature);\n } catch (error) {\n return false;\n }\n return secp256k1.verify(sig, hash2, 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(version8, key) {\n if (!this.chainCode) {\n throw new Error(\"No chainCode set\");\n }\n abytes(key, 33);\n return concatBytes(toU32(version8), 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(hash2, _password, _salt, _opts) {\n ahash(hash2);\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(hash2, 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(hash2, password, salt, opts) {\n const { c: c4, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash2, 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_esm5 = __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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: hash2, privateKey, to = \"object\" }) {\n const { r: r2, s: s4, recovery } = secp256k1.sign(hash2.slice(2), privateKey.slice(2), { lowS: true, extraEntropy });\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.31.3_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_toHex();\n init_serializeSignature();\n extraEntropy = false;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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(serializer(signableTransaction)),\n privateKey\n });\n return serializer(transaction, signature);\n }\n var init_signTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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: hash2 }) {\n return sign({ hash: hash2, 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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_esm4();\n init_esm5();\n init_hdKeyToAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2\";\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 (hash2) => getUserOperationByHash(client, { hash: hash2 }),\n getSupportedEntryPoints: async () => getSupportedEntryPoints(client),\n getUserOperationReceipt: async (hash2) => getUserOperationReceipt(client, { hash: hash2 })\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_client();\n init_version5();\n init_bundlerClient();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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(LogLevel4) {\n LogLevel4[LogLevel4[\"VERBOSE\"] = 5] = \"VERBOSE\";\n LogLevel4[LogLevel4[\"DEBUG\"] = 4] = \"DEBUG\";\n LogLevel4[LogLevel4[\"INFO\"] = 3] = \"INFO\";\n LogLevel4[LogLevel4[\"WARN\"] = 2] = \"WARN\";\n LogLevel4[LogLevel4[\"ERROR\"] = 1] = \"ERROR\";\n LogLevel4[LogLevel4[\"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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils8 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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: signTypedData3, 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: signTypedData3,\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_accounts();\n init_bundlerClient2();\n init_account2();\n init_client();\n init_entrypoint();\n init_logger();\n init_utils8();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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(hash2) {\n super(`Failed to find transaction for user operation ${hash2}`);\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_esm();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 = (base3, 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(base3) * BigInt(Math.round(multiplier * 10 ** decimalPlaces)) + BigInt(10 ** decimalPlaces - 1) : BigInt(base3) * BigInt(Math.round(multiplier * 10 ** decimalPlaces));\n return val / BigInt(10 ** decimalPlaces);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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: from5, gas, isSystemTx, mint, to, value } = transaction;\n const serializedTransaction = [\n sourceHash,\n from5,\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: from5, to } = transaction;\n if (from5 && !isAddress(from5))\n throw new InvalidAddressError({ address: from5 });\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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 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.31.3_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;\n var init_base3 = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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;\n var init_baseSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.31.3_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 }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 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 ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n ensUniversalResolver: {\n address: \"0xce01f8eee7E479C928F8919abD53E553a36CeF67\",\n blockCreated: 19258213\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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 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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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://sepolia.drpc.org\"]\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 ensRegistry: { address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\" },\n ensUniversalResolver: {\n address: \"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC\",\n blockCreated: 5317080\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.31.3_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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n bypassPaymasterAndData = (overrides) => !!overrides && (\"paymasterAndData\" in overrides || \"paymasterData\" in overrides);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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(object) {\n const promises = Object.keys(object).map((key) => {\n const value = object[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_utils9 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 batch2 = 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: batch2,\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: batch2,\n overrides: _overrides\n };\n }\n var init_buildUserOperationFromTxs = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_utils9();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_account2();\n init_utils9();\n init__();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n init_runMiddlewareStack();\n init_sendUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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: hash2, 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(hash2).catch((e2) => {\n Logger.error(`[SmartAccountProvider] waitForUserOperationTransaction error fetching receipt for ${hash2}: ${e2}`);\n });\n if (receipt) {\n return receipt?.receipt.transactionHash;\n }\n }\n throw new FailedToFindTransactionError(hash2);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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: hash2, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash2 }).catch((e2) => {\n throw new WaitForUserOperationError(request, e2);\n });\n }\n var init_sendTransaction2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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: hash2, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash2 }).catch((e2) => {\n throw new WaitForUserOperationError(request, e2);\n });\n }\n var init_sendTransactions = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 hash2 = result.hash;\n if (waitForTx) {\n hash2 = await waitForUserOperationTransaction(client, result);\n }\n return hash2;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm();\n init_utils9();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 custom2({\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({ method, params: params2 });\n }\n }\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_esm();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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: version8 = defaultEntryPointVersion, addressOverride } = options ?? {\n version: defaultEntryPointVersion\n };\n const entryPoint = entryPointRegistry[version8 ?? defaultEntryPointVersion];\n const address = addressOverride ?? entryPoint.address[chain2.id] ?? entryPoint.address.default;\n if (!address) {\n throw new EntryPointNotFoundError(chain2, version8);\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, version8);\n }\n var defaultEntryPointVersion, entryPointRegistry;\n var init_entrypoint2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\n init_client();\n init_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_esm2();\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) => custom2({\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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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 [version8, 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 (version8 !== \"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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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.52.2_typescript@5.8.3_viem@2.31.3_bufferutil@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_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/api/utils.js\n function _checkNormalize() {\n try {\n const missing = [];\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form2) => {\n try {\n if (\"test\".normalize(form2) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n } catch (error) {\n missing.push(form2);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.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 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 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 === 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);\n }\n function bytes2(data) {\n if (data.length % 4 !== 0) {\n throw new Error(\"bad data\");\n }\n let result = [];\n for (let 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 let lo = 0;\n let result = {};\n data.split(\",\").forEach((pair) => {\n let 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 let hi = 0;\n return data.split(\",\").map((v2) => {\n let comps = v2.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n } else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n let lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n }\n var import_bytes4, import_units, version$1, _permanentCensorErrors, _censorErrors, LogLevels, _logLevel, _globalLogger, _normalizeError, LogLevel2, ErrorCode, HEX, Logger2, version5, logger, UnicodeNormalizationForm, Utf8ErrorReason, Utf8ErrorFuncs;\n var init_utils10 = __esm({\n \"../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/api/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n import_bytes4 = __toESM(require_lib2());\n import_units = __toESM(require_lib31());\n version$1 = \"logger/5.7.0\";\n _permanentCensorErrors = false;\n _censorErrors = false;\n LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\n _logLevel = LogLevels[\"default\"];\n _globalLogger = null;\n _normalizeError = _checkNormalize();\n (function(LogLevel4) {\n LogLevel4[\"DEBUG\"] = \"DEBUG\";\n LogLevel4[\"INFO\"] = \"INFO\";\n LogLevel4[\"WARNING\"] = \"WARNING\";\n LogLevel4[\"ERROR\"] = \"ERROR\";\n LogLevel4[\"OFF\"] = \"OFF\";\n })(LogLevel2 || (LogLevel2 = {}));\n (function(ErrorCode3) {\n ErrorCode3[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n ErrorCode3[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n ErrorCode3[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n ErrorCode3[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n ErrorCode3[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n ErrorCode3[\"TIMEOUT\"] = \"TIMEOUT\";\n ErrorCode3[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n ErrorCode3[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ErrorCode3[\"MISSING_NEW\"] = \"MISSING_NEW\";\n ErrorCode3[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n ErrorCode3[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n ErrorCode3[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ErrorCode3[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n ErrorCode3[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n ErrorCode3[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n ErrorCode3[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n ErrorCode3[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n ErrorCode3[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ErrorCode3[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n })(ErrorCode || (ErrorCode = {}));\n HEX = \"0123456789abcdef\";\n Logger2 = class _Logger {\n constructor(version8) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version8,\n writable: false\n });\n }\n _log(logLevel, args) {\n const 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 debug(...args) {\n this._log(_Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(_Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(_Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = _Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let 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 const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const 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 const 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 throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, _Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", _Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\",\n form: _normalizeError\n });\n }\n }\n checkSafeUint53(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, _Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value\n });\n }\n if (value % 1) {\n this.throwError(message, _Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value\n });\n }\n }\n checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, _Logger.errors.MISSING_ARGUMENT, {\n count,\n expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, _Logger.errors.UNEXPECTED_ARGUMENT, {\n count,\n expectedCount\n });\n }\n }\n checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", _Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", _Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", _Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new _Logger(version$1);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", _Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", _Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n _Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n static from(version8) {\n return new _Logger(version8);\n }\n };\n Logger2.errors = ErrorCode;\n Logger2.levels = LogLevel2;\n version5 = \"strings/5.7.0\";\n logger = new Logger2(version5);\n (function(UnicodeNormalizationForm2) {\n UnicodeNormalizationForm2[\"current\"] = \"\";\n UnicodeNormalizationForm2[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm2[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm2[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm2[\"NFKD\"] = \"NFKD\";\n })(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));\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 || (Utf8ErrorReason = {}));\n Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n });\n 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 \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map((v2) => parseInt(v2, 16));\n 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 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 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 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 }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/bind.js\n function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n }\n var init_bind = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/bind.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/utils.js\n function isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n }\n function isArrayBufferView2(val) {\n let result;\n if (typeof ArrayBuffer !== \"undefined\" && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && isArrayBuffer(val.buffer);\n }\n return result;\n }\n function forEach(obj, fn, { allOwnKeys = false } = {}) {\n if (obj === null || typeof obj === \"undefined\") {\n return;\n }\n let i3;\n let l6;\n if (typeof obj !== \"object\") {\n obj = [obj];\n }\n if (isArray(obj)) {\n for (i3 = 0, l6 = obj.length; i3 < l6; i3++) {\n fn.call(null, obj[i3], i3, obj);\n }\n } else {\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n for (i3 = 0; i3 < len; i3++) {\n key = keys[i3];\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n function findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i3 = keys.length;\n let _key;\n while (i3-- > 0) {\n _key = keys[i3];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n }\n function merge() {\n const { caseless } = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n for (let i3 = 0, l6 = arguments.length; i3 < l6; i3++) {\n arguments[i3] && forEach(arguments[i3], assignValue);\n }\n return result;\n }\n function isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[toStringTag] === \"FormData\" && thing[iterator]);\n }\n var toString, getPrototypeOf, iterator, toStringTag, kindOf, kindOfTest, typeOfTest, isArray, isUndefined, isArrayBuffer, isString, isFunction, isNumber, isObject, isBoolean, isPlainObject, isDate, isFile, isBlob, isFileList, isStream, isFormData, isURLSearchParams, isReadableStream, isRequest, isResponse, isHeaders, trim4, _global, isContextDefined, extend, stripBOM, inherits, toFlatObject, endsWith, toArray, isTypedArray, forEachEntry, matchAll, isHTMLForm, toCamelCase, hasOwnProperty, isRegExp, reduceDescriptors, freezeMethods, toObjectSet, noop2, toFiniteNumber, toJSONObject, isAsyncFn, isThenable, _setImmediate, asap, isIterable, utils_default;\n var init_utils11 = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bind();\n ({ toString } = Object.prototype);\n ({ getPrototypeOf } = Object);\n ({ iterator, toStringTag } = Symbol);\n kindOf = /* @__PURE__ */ ((cache) => (thing) => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n })(/* @__PURE__ */ Object.create(null));\n kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type;\n };\n typeOfTest = (type) => (thing) => typeof thing === type;\n ({ isArray } = Array);\n isUndefined = typeOfTest(\"undefined\");\n isArrayBuffer = kindOfTest(\"ArrayBuffer\");\n isString = typeOfTest(\"string\");\n isFunction = typeOfTest(\"function\");\n isNumber = typeOfTest(\"number\");\n isObject = (thing) => thing !== null && typeof thing === \"object\";\n isBoolean = (thing) => thing === true || thing === false;\n isPlainObject = (val) => {\n if (kindOf(val) !== \"object\") {\n return false;\n }\n const prototype3 = getPrototypeOf(val);\n return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(toStringTag in val) && !(iterator in val);\n };\n isDate = kindOfTest(\"Date\");\n isFile = kindOfTest(\"File\");\n isBlob = kindOfTest(\"Blob\");\n isFileList = kindOfTest(\"FileList\");\n isStream = (val) => isObject(val) && isFunction(val.pipe);\n isFormData = (thing) => {\n let kind;\n return thing && (typeof FormData === \"function\" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === \"formdata\" || // detect form-data instance\n kind === \"object\" && isFunction(thing.toString) && thing.toString() === \"[object FormData]\"));\n };\n isURLSearchParams = kindOfTest(\"URLSearchParams\");\n [isReadableStream, isRequest, isResponse, isHeaders] = [\"ReadableStream\", \"Request\", \"Response\", \"Headers\"].map(kindOfTest);\n trim4 = (str) => str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, \"\");\n _global = (() => {\n if (typeof globalThis !== \"undefined\")\n return globalThis;\n return typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : global;\n })();\n isContextDefined = (context2) => !isUndefined(context2) && context2 !== _global;\n extend = (a3, b4, thisArg, { allOwnKeys } = {}) => {\n forEach(b4, (val, key) => {\n if (thisArg && isFunction(val)) {\n a3[key] = bind(val, thisArg);\n } else {\n a3[key] = val;\n }\n }, { allOwnKeys });\n return a3;\n };\n stripBOM = (content) => {\n if (content.charCodeAt(0) === 65279) {\n content = content.slice(1);\n }\n return content;\n };\n inherits = (constructor, superConstructor, props, descriptors2) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors2);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, \"super\", {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n };\n toFlatObject = (sourceObj, destObj, filter2, propFilter) => {\n let props;\n let i3;\n let prop;\n const merged = {};\n destObj = destObj || {};\n if (sourceObj == null)\n return destObj;\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i3 = props.length;\n while (i3-- > 0) {\n prop = props[i3];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter2 !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);\n return destObj;\n };\n endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === void 0 || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n };\n toArray = (thing) => {\n if (!thing)\n return null;\n if (isArray(thing))\n return thing;\n let i3 = thing.length;\n if (!isNumber(i3))\n return null;\n const arr = new Array(i3);\n while (i3-- > 0) {\n arr[i3] = thing[i3];\n }\n return arr;\n };\n isTypedArray = /* @__PURE__ */ ((TypedArray) => {\n return (thing) => {\n return TypedArray && thing instanceof TypedArray;\n };\n })(typeof Uint8Array !== \"undefined\" && getPrototypeOf(Uint8Array));\n forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n const _iterator = generator.call(obj);\n let result;\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n };\n matchAll = (regExp, str) => {\n let matches2;\n const arr = [];\n while ((matches2 = regExp.exec(str)) !== null) {\n arr.push(matches2);\n }\n return arr;\n };\n isHTMLForm = kindOfTest(\"HTMLFormElement\");\n toCamelCase = (str) => {\n return str.toLowerCase().replace(\n /[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m2, p1, p22) {\n return p1.toUpperCase() + p22;\n }\n );\n };\n hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);\n isRegExp = kindOfTest(\"RegExp\");\n reduceDescriptors = (obj, reducer) => {\n const descriptors2 = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n forEach(descriptors2, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n Object.defineProperties(obj, reducedDescriptors);\n };\n freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n if (isFunction(obj) && [\"arguments\", \"caller\", \"callee\"].indexOf(name) !== -1) {\n return false;\n }\n const value = obj[name];\n if (!isFunction(value))\n return;\n descriptor.enumerable = false;\n if (\"writable\" in descriptor) {\n descriptor.writable = false;\n return;\n }\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n };\n }\n });\n };\n toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n const define2 = (arr) => {\n arr.forEach((value) => {\n obj[value] = true;\n });\n };\n isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));\n return obj;\n };\n noop2 = () => {\n };\n toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n };\n toJSONObject = (obj) => {\n const stack = new Array(10);\n const visit = (source, i3) => {\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n if (!(\"toJSON\" in source)) {\n stack[i3] = source;\n const target = isArray(source) ? [] : {};\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i3 + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n stack[i3] = void 0;\n return target;\n }\n }\n return source;\n };\n return visit(obj, 0);\n };\n isAsyncFn = kindOfTest(\"AsyncFunction\");\n isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({ source, data }) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n };\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n })(\n typeof setImmediate === \"function\",\n isFunction(_global.postMessage)\n );\n asap = typeof queueMicrotask !== \"undefined\" ? queueMicrotask.bind(_global) : typeof process_exports !== \"undefined\" && process_exports.nextTick || _setImmediate;\n isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n utils_default = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView: isArrayBufferView2,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim: trim4,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty,\n // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop: noop2,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosError.js\n function AxiosError(message, code, config2, request, response) {\n Error.call(this);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = new Error().stack;\n }\n this.message = message;\n this.name = \"AxiosError\";\n code && (this.code = code);\n config2 && (this.config = config2);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n }\n var prototype, descriptors, AxiosError_default;\n var init_AxiosError = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n utils_default.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils_default.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n });\n prototype = AxiosError.prototype;\n descriptors = {};\n [\n \"ERR_BAD_OPTION_VALUE\",\n \"ERR_BAD_OPTION\",\n \"ECONNABORTED\",\n \"ETIMEDOUT\",\n \"ERR_NETWORK\",\n \"ERR_FR_TOO_MANY_REDIRECTS\",\n \"ERR_DEPRECATED\",\n \"ERR_BAD_RESPONSE\",\n \"ERR_BAD_REQUEST\",\n \"ERR_CANCELED\",\n \"ERR_NOT_SUPPORT\",\n \"ERR_INVALID_URL\"\n // eslint-disable-next-line func-names\n ].forEach((code) => {\n descriptors[code] = { value: code };\n });\n Object.defineProperties(AxiosError, descriptors);\n Object.defineProperty(prototype, \"isAxiosError\", { value: true });\n AxiosError.from = (error, code, config2, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n utils_default.toFlatObject(error, axiosError, function filter2(obj) {\n return obj !== Error.prototype;\n }, (prop) => {\n return prop !== \"isAxiosError\";\n });\n AxiosError.call(axiosError, error.message, code, config2, request, response);\n axiosError.cause = error;\n axiosError.name = error.name;\n customProps && Object.assign(axiosError, customProps);\n return axiosError;\n };\n AxiosError_default = AxiosError;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/null.js\n var null_default;\n var init_null = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/null.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n null_default = null;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/toFormData.js\n function isVisitable(thing) {\n return utils_default.isPlainObject(thing) || utils_default.isArray(thing);\n }\n function removeBrackets(key) {\n return utils_default.endsWith(key, \"[]\") ? key.slice(0, -2) : key;\n }\n function renderKey(path, key, dots) {\n if (!path)\n return key;\n return path.concat(key).map(function each(token, i3) {\n token = removeBrackets(token);\n return !dots && i3 ? \"[\" + token + \"]\" : token;\n }).join(dots ? \".\" : \"\");\n }\n function isFlatArray(arr) {\n return utils_default.isArray(arr) && !arr.some(isVisitable);\n }\n function toFormData(obj, formData, options) {\n if (!utils_default.isObject(obj)) {\n throw new TypeError(\"target must be an object\");\n }\n formData = formData || new (null_default || FormData)();\n options = utils_default.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n return !utils_default.isUndefined(source[option]);\n });\n const metaTokens = options.metaTokens;\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== \"undefined\" && Blob;\n const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);\n if (!utils_default.isFunction(visitor)) {\n throw new TypeError(\"visitor must be a function\");\n }\n function convertValue(value) {\n if (value === null)\n return \"\";\n if (utils_default.isDate(value)) {\n return value.toISOString();\n }\n if (utils_default.isBoolean(value)) {\n return value.toString();\n }\n if (!useBlob && utils_default.isBlob(value)) {\n throw new AxiosError_default(\"Blob is not supported. Use a Buffer instead.\");\n }\n if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {\n return useBlob && typeof Blob === \"function\" ? new Blob([value]) : Buffer2.from(value);\n }\n return value;\n }\n function defaultVisitor(value, key, path) {\n let arr = value;\n if (value && !path && typeof value === \"object\") {\n if (utils_default.endsWith(key, \"{}\")) {\n key = metaTokens ? key : key.slice(0, -2);\n value = JSON.stringify(value);\n } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, \"[]\")) && (arr = utils_default.toArray(value))) {\n key = removeBrackets(key);\n arr.forEach(function each(el, index2) {\n !(utils_default.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + \"[]\",\n convertValue(el)\n );\n });\n return false;\n }\n }\n if (isVisitable(value)) {\n return true;\n }\n formData.append(renderKey(path, key, dots), convertValue(value));\n return false;\n }\n const stack = [];\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n function build(value, path) {\n if (utils_default.isUndefined(value))\n return;\n if (stack.indexOf(value) !== -1) {\n throw Error(\"Circular reference detected in \" + path.join(\".\"));\n }\n stack.push(value);\n utils_default.forEach(value, function each(el, key) {\n const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(\n formData,\n el,\n utils_default.isString(key) ? key.trim() : key,\n path,\n exposedHelpers\n );\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n stack.pop();\n }\n if (!utils_default.isObject(obj)) {\n throw new TypeError(\"data must be an object\");\n }\n build(obj);\n return formData;\n }\n var predicates, toFormData_default;\n var init_toFormData = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/toFormData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_AxiosError();\n init_null();\n predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n });\n toFormData_default = toFormData;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js\n function encode5(str) {\n const charMap = {\n \"!\": \"%21\",\n \"'\": \"%27\",\n \"(\": \"%28\",\n \")\": \"%29\",\n \"~\": \"%7E\",\n \"%20\": \"+\",\n \"%00\": \"\\0\"\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n }\n function AxiosURLSearchParams(params, options) {\n this._pairs = [];\n params && toFormData_default(params, this, options);\n }\n var prototype2, AxiosURLSearchParams_default;\n var init_AxiosURLSearchParams = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toFormData();\n prototype2 = AxiosURLSearchParams.prototype;\n prototype2.append = function append(name, value) {\n this._pairs.push([name, value]);\n };\n prototype2.toString = function toString2(encoder6) {\n const _encode = encoder6 ? function(value) {\n return encoder6.call(this, value, encode5);\n } : encode5;\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + \"=\" + _encode(pair[1]);\n }, \"\").join(\"&\");\n };\n AxiosURLSearchParams_default = AxiosURLSearchParams;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/buildURL.js\n function encode6(val) {\n return encodeURIComponent(val).replace(/%3A/gi, \":\").replace(/%24/g, \"$\").replace(/%2C/gi, \",\").replace(/%20/g, \"+\").replace(/%5B/gi, \"[\").replace(/%5D/gi, \"]\");\n }\n function buildURL(url, params, options) {\n if (!params) {\n return url;\n }\n const _encode = options && options.encode || encode6;\n if (utils_default.isFunction(options)) {\n options = {\n serialize: options\n };\n }\n const serializeFn = options && options.serialize;\n let serializedParams;\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode);\n }\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf(\"?\") === -1 ? \"?\" : \"&\") + serializedParams;\n }\n return url;\n }\n var init_buildURL = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/buildURL.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_AxiosURLSearchParams();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/InterceptorManager.js\n var InterceptorManager, InterceptorManager_default;\n var init_InterceptorManager = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/InterceptorManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n InterceptorManager = class {\n constructor() {\n this.handlers = [];\n }\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils_default.forEach(this.handlers, function forEachHandler(h4) {\n if (h4 !== null) {\n fn(h4);\n }\n });\n }\n };\n InterceptorManager_default = InterceptorManager;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/defaults/transitional.js\n var transitional_default;\n var init_transitional = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/defaults/transitional.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n transitional_default = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js\n var URLSearchParams_default;\n var init_URLSearchParams = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AxiosURLSearchParams();\n URLSearchParams_default = typeof URLSearchParams !== \"undefined\" ? URLSearchParams : AxiosURLSearchParams_default;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/FormData.js\n var FormData_default;\n var init_FormData = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/FormData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n FormData_default = typeof FormData !== \"undefined\" ? FormData : null;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/Blob.js\n var Blob_default;\n var init_Blob = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/Blob.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Blob_default = typeof Blob !== \"undefined\" ? Blob : null;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/index.js\n var browser_default;\n var init_browser = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_URLSearchParams();\n init_FormData();\n init_Blob();\n browser_default = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams_default,\n FormData: FormData_default,\n Blob: Blob_default\n },\n protocols: [\"http\", \"https\", \"file\", \"blob\", \"url\", \"data\"]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/common/utils.js\n var utils_exports = {};\n __export(utils_exports, {\n hasBrowserEnv: () => hasBrowserEnv,\n hasStandardBrowserEnv: () => hasStandardBrowserEnv,\n hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,\n navigator: () => _navigator,\n origin: () => origin\n });\n var hasBrowserEnv, _navigator, hasStandardBrowserEnv, hasStandardBrowserWebWorkerEnv, origin;\n var init_utils12 = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/common/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n hasBrowserEnv = typeof window !== \"undefined\" && typeof document !== \"undefined\";\n _navigator = typeof navigator === \"object\" && navigator || void 0;\n hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || [\"ReactNative\", \"NativeScript\", \"NS\"].indexOf(_navigator.product) < 0);\n hasStandardBrowserWebWorkerEnv = (() => {\n return typeof WorkerGlobalScope !== \"undefined\" && // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope && typeof self.importScripts === \"function\";\n })();\n origin = hasBrowserEnv && window.location.href || \"http://localhost\";\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/index.js\n var platform_default;\n var init_platform = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_browser();\n init_utils12();\n platform_default = {\n ...utils_exports,\n ...browser_default\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/toURLEncodedForm.js\n function toURLEncodedForm(data, options) {\n return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform_default.isNode && utils_default.isBuffer(value)) {\n this.append(key, value.toString(\"base64\"));\n return false;\n }\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n }\n var init_toURLEncodedForm = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/toURLEncodedForm.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_toFormData();\n init_platform();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/formDataToJSON.js\n function parsePropPath(name) {\n return utils_default.matchAll(/\\w+|\\[(\\w*)]/g, name).map((match) => {\n return match[0] === \"[]\" ? \"\" : match[1] || match[0];\n });\n }\n function arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i3;\n const len = keys.length;\n let key;\n for (i3 = 0; i3 < len; i3++) {\n key = keys[i3];\n obj[key] = arr[key];\n }\n return obj;\n }\n function formDataToJSON(formData) {\n function buildPath(path, value, target, index2) {\n let name = path[index2++];\n if (name === \"__proto__\")\n return true;\n const isNumericKey = Number.isFinite(+name);\n const isLast = index2 >= path.length;\n name = !name && utils_default.isArray(target) ? target.length : name;\n if (isLast) {\n if (utils_default.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n return !isNumericKey;\n }\n if (!target[name] || !utils_default.isObject(target[name])) {\n target[name] = [];\n }\n const result = buildPath(path, value, target[name], index2);\n if (result && utils_default.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n return !isNumericKey;\n }\n if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {\n const obj = {};\n utils_default.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n return obj;\n }\n return null;\n }\n var formDataToJSON_default;\n var init_formDataToJSON = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/formDataToJSON.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n formDataToJSON_default = formDataToJSON;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/defaults/index.js\n function stringifySafely(rawValue, parser, encoder6) {\n if (utils_default.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils_default.trim(rawValue);\n } catch (e2) {\n if (e2.name !== \"SyntaxError\") {\n throw e2;\n }\n }\n }\n return (encoder6 || JSON.stringify)(rawValue);\n }\n var defaults, defaults_default;\n var init_defaults2 = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/defaults/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_AxiosError();\n init_transitional();\n init_toFormData();\n init_toURLEncodedForm();\n init_platform();\n init_formDataToJSON();\n defaults = {\n transitional: transitional_default,\n adapter: [\"xhr\", \"http\", \"fetch\"],\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || \"\";\n const hasJSONContentType = contentType.indexOf(\"application/json\") > -1;\n const isObjectPayload = utils_default.isObject(data);\n if (isObjectPayload && utils_default.isHTMLForm(data)) {\n data = new FormData(data);\n }\n const isFormData2 = utils_default.isFormData(data);\n if (isFormData2) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;\n }\n if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {\n return data;\n }\n if (utils_default.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils_default.isURLSearchParams(data)) {\n headers.setContentType(\"application/x-www-form-urlencoded;charset=utf-8\", false);\n return data.toString();\n }\n let isFileList2;\n if (isObjectPayload) {\n if (contentType.indexOf(\"application/x-www-form-urlencoded\") > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf(\"multipart/form-data\") > -1) {\n const _FormData = this.env && this.env.FormData;\n return toFormData_default(\n isFileList2 ? { \"files[]\": data } : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n if (isObjectPayload || hasJSONContentType) {\n headers.setContentType(\"application/json\", false);\n return stringifySafely(data);\n }\n return data;\n }],\n transformResponse: [function transformResponse(data) {\n const transitional2 = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;\n const JSONRequested = this.responseType === \"json\";\n if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {\n return data;\n }\n if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {\n const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n try {\n return JSON.parse(data);\n } catch (e2) {\n if (strictJSONParsing) {\n if (e2.name === \"SyntaxError\") {\n throw AxiosError_default.from(e2, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e2;\n }\n }\n }\n return data;\n }],\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n xsrfCookieName: \"XSRF-TOKEN\",\n xsrfHeaderName: \"X-XSRF-TOKEN\",\n maxContentLength: -1,\n maxBodyLength: -1,\n env: {\n FormData: platform_default.classes.FormData,\n Blob: platform_default.classes.Blob\n },\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n headers: {\n common: {\n \"Accept\": \"application/json, text/plain, */*\",\n \"Content-Type\": void 0\n }\n }\n };\n utils_default.forEach([\"delete\", \"get\", \"head\", \"post\", \"put\", \"patch\"], (method) => {\n defaults.headers[method] = {};\n });\n defaults_default = defaults;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/parseHeaders.js\n var ignoreDuplicateOf, parseHeaders_default;\n var init_parseHeaders = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/parseHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n ignoreDuplicateOf = utils_default.toObjectSet([\n \"age\",\n \"authorization\",\n \"content-length\",\n \"content-type\",\n \"etag\",\n \"expires\",\n \"from\",\n \"host\",\n \"if-modified-since\",\n \"if-unmodified-since\",\n \"last-modified\",\n \"location\",\n \"max-forwards\",\n \"proxy-authorization\",\n \"referer\",\n \"retry-after\",\n \"user-agent\"\n ]);\n parseHeaders_default = (rawHeaders) => {\n const parsed = {};\n let key;\n let val;\n let i3;\n rawHeaders && rawHeaders.split(\"\\n\").forEach(function parser(line) {\n i3 = line.indexOf(\":\");\n key = line.substring(0, i3).trim().toLowerCase();\n val = line.substring(i3 + 1).trim();\n if (!key || parsed[key] && ignoreDuplicateOf[key]) {\n return;\n }\n if (key === \"set-cookie\") {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + \", \" + val : val;\n }\n });\n return parsed;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosHeaders.js\n function normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n }\n function normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);\n }\n function parseTokens(str) {\n const tokens = /* @__PURE__ */ Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n while (match = tokensRE.exec(str)) {\n tokens[match[1]] = match[2];\n }\n return tokens;\n }\n function matchHeaderValue(context2, value, header, filter2, isHeaderNameFilter) {\n if (utils_default.isFunction(filter2)) {\n return filter2.call(this, value, header);\n }\n if (isHeaderNameFilter) {\n value = header;\n }\n if (!utils_default.isString(value))\n return;\n if (utils_default.isString(filter2)) {\n return value.indexOf(filter2) !== -1;\n }\n if (utils_default.isRegExp(filter2)) {\n return filter2.test(value);\n }\n }\n function formatHeader(header) {\n return header.trim().toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w3, char, str) => {\n return char.toUpperCase() + str;\n });\n }\n function buildAccessors(obj, header) {\n const accessorName = utils_default.toCamelCase(\" \" + header);\n [\"get\", \"set\", \"has\"].forEach((methodName) => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n }\n var $internals, isValidHeaderName, AxiosHeaders, AxiosHeaders_default;\n var init_AxiosHeaders = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_parseHeaders();\n $internals = Symbol(\"internals\");\n isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n AxiosHeaders = class {\n constructor(headers) {\n headers && this.set(headers);\n }\n set(header, valueOrRewrite, rewrite) {\n const self2 = this;\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n if (!lHeader) {\n throw new Error(\"header name must be a non-empty string\");\n }\n const key = utils_default.findKey(self2, lHeader);\n if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {\n self2[key || _header] = normalizeValue(_value);\n }\n }\n const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n if (utils_default.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders_default(header), valueOrRewrite);\n } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {\n let obj = {}, dest, key;\n for (const entry of header) {\n if (!utils_default.isArray(entry)) {\n throw TypeError(\"Object iterator must return a key-value pair\");\n }\n obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];\n }\n setHeaders(obj, valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n return this;\n }\n get(header, parser) {\n header = normalizeHeader(header);\n if (header) {\n const key = utils_default.findKey(this, header);\n if (key) {\n const value = this[key];\n if (!parser) {\n return value;\n }\n if (parser === true) {\n return parseTokens(value);\n }\n if (utils_default.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n if (utils_default.isRegExp(parser)) {\n return parser.exec(value);\n }\n throw new TypeError(\"parser must be boolean|regexp|function\");\n }\n }\n }\n has(header, matcher) {\n header = normalizeHeader(header);\n if (header) {\n const key = utils_default.findKey(this, header);\n return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n return false;\n }\n delete(header, matcher) {\n const self2 = this;\n let deleted = false;\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n if (_header) {\n const key = utils_default.findKey(self2, _header);\n if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {\n delete self2[key];\n deleted = true;\n }\n }\n }\n if (utils_default.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n return deleted;\n }\n clear(matcher) {\n const keys = Object.keys(this);\n let i3 = keys.length;\n let deleted = false;\n while (i3--) {\n const key = keys[i3];\n if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n return deleted;\n }\n normalize(format) {\n const self2 = this;\n const headers = {};\n utils_default.forEach(this, (value, header) => {\n const key = utils_default.findKey(headers, header);\n if (key) {\n self2[key] = normalizeValue(value);\n delete self2[header];\n return;\n }\n const normalized = format ? formatHeader(header) : String(header).trim();\n if (normalized !== header) {\n delete self2[header];\n }\n self2[normalized] = normalizeValue(value);\n headers[normalized] = true;\n });\n return this;\n }\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n toJSON(asStrings) {\n const obj = /* @__PURE__ */ Object.create(null);\n utils_default.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(\", \") : value);\n });\n return obj;\n }\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + \": \" + value).join(\"\\n\");\n }\n getSetCookie() {\n return this.get(\"set-cookie\") || [];\n }\n get [Symbol.toStringTag]() {\n return \"AxiosHeaders\";\n }\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n static concat(first, ...targets) {\n const computed = new this(first);\n targets.forEach((target) => computed.set(target));\n return computed;\n }\n static accessor(header) {\n const internals = this[$internals] = this[$internals] = {\n accessors: {}\n };\n const accessors = internals.accessors;\n const prototype3 = this.prototype;\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n if (!accessors[lHeader]) {\n buildAccessors(prototype3, _header);\n accessors[lHeader] = true;\n }\n }\n utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n return this;\n }\n };\n AxiosHeaders.accessor([\"Content-Type\", \"Content-Length\", \"Accept\", \"Accept-Encoding\", \"User-Agent\", \"Authorization\"]);\n utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1);\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n };\n });\n utils_default.freezeMethods(AxiosHeaders);\n AxiosHeaders_default = AxiosHeaders;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/transformData.js\n function transformData(fns, response) {\n const config2 = this || defaults_default;\n const context2 = response || config2;\n const headers = AxiosHeaders_default.from(context2.headers);\n let data = context2.data;\n utils_default.forEach(fns, function transform2(fn) {\n data = fn.call(config2, data, headers.normalize(), response ? response.status : void 0);\n });\n headers.normalize();\n return data;\n }\n var init_transformData = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/transformData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_defaults2();\n init_AxiosHeaders();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/isCancel.js\n function isCancel(value) {\n return !!(value && value.__CANCEL__);\n }\n var init_isCancel = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/isCancel.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/CanceledError.js\n function CanceledError(message, config2, request) {\n AxiosError_default.call(this, message == null ? \"canceled\" : message, AxiosError_default.ERR_CANCELED, config2, request);\n this.name = \"CanceledError\";\n }\n var CanceledError_default;\n var init_CanceledError = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/CanceledError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AxiosError();\n init_utils11();\n utils_default.inherits(CanceledError, AxiosError_default, {\n __CANCEL__: true\n });\n CanceledError_default = CanceledError;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/settle.js\n function settle(resolve, reject, response) {\n const validateStatus2 = response.config.validateStatus;\n if (!response.status || !validateStatus2 || validateStatus2(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError_default(\n \"Request failed with status code \" + response.status,\n [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n }\n var init_settle = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/settle.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AxiosError();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/parseProtocol.js\n function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || \"\";\n }\n var init_parseProtocol = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/parseProtocol.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/speedometer.js\n function speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n min = min !== void 0 ? min : 1e3;\n return function push(chunkLength) {\n const now2 = Date.now();\n const startedAt = timestamps[tail];\n if (!firstSampleTS) {\n firstSampleTS = now2;\n }\n bytes[head] = chunkLength;\n timestamps[head] = now2;\n let i3 = tail;\n let bytesCount = 0;\n while (i3 !== head) {\n bytesCount += bytes[i3++];\n i3 = i3 % samplesCount;\n }\n head = (head + 1) % samplesCount;\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n if (now2 - firstSampleTS < min) {\n return;\n }\n const passed = startedAt && now2 - startedAt;\n return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;\n };\n }\n var speedometer_default;\n var init_speedometer = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/speedometer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n speedometer_default = speedometer;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/throttle.js\n function throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1e3 / freq;\n let lastArgs;\n let timer;\n const invoke = (args, now2 = Date.now()) => {\n timestamp = now2;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n };\n const throttled = (...args) => {\n const now2 = Date.now();\n const passed = now2 - timestamp;\n if (passed >= threshold) {\n invoke(args, now2);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n const flush = () => lastArgs && invoke(lastArgs);\n return [throttled, flush];\n }\n var throttle_default;\n var init_throttle = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/throttle.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n throttle_default = throttle;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/progressEventReducer.js\n var progressEventReducer, progressEventDecorator, asyncDecorator;\n var init_progressEventReducer = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/progressEventReducer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_speedometer();\n init_throttle();\n init_utils11();\n progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer_default(50, 250);\n return throttle_default((e2) => {\n const loaded = e2.loaded;\n const total = e2.lengthComputable ? e2.total : void 0;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange2 = loaded <= total;\n bytesNotified = loaded;\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : void 0,\n bytes: progressBytes,\n rate: rate ? rate : void 0,\n estimated: rate && total && inRange2 ? (total - loaded) / rate : void 0,\n event: e2,\n lengthComputable: total != null,\n [isDownloadStream ? \"download\" : \"upload\"]: true\n };\n listener(data);\n }, freq);\n };\n progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n };\n asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isURLSameOrigin.js\n var isURLSameOrigin_default;\n var init_isURLSameOrigin = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isURLSameOrigin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_platform();\n isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {\n url = new URL(url, platform_default.origin);\n return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);\n })(\n new URL(platform_default.origin),\n platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)\n ) : () => true;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/cookies.js\n var cookies_default;\n var init_cookies = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/cookies.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_platform();\n cookies_default = platform_default.hasStandardBrowserEnv ? (\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain2, secure) {\n const cookie = [name + \"=\" + encodeURIComponent(value)];\n utils_default.isNumber(expires) && cookie.push(\"expires=\" + new Date(expires).toGMTString());\n utils_default.isString(path) && cookie.push(\"path=\" + path);\n utils_default.isString(domain2) && cookie.push(\"domain=\" + domain2);\n secure === true && cookie.push(\"secure\");\n document.cookie = cookie.join(\"; \");\n },\n read(name) {\n const match = document.cookie.match(new RegExp(\"(^|;\\\\s*)(\" + name + \")=([^;]*)\"));\n return match ? decodeURIComponent(match[3]) : null;\n },\n remove(name) {\n this.write(name, \"\", Date.now() - 864e5);\n }\n }\n ) : (\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {\n },\n read() {\n return null;\n },\n remove() {\n }\n }\n );\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isAbsoluteURL.js\n function isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n }\n var init_isAbsoluteURL = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isAbsoluteURL.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/combineURLs.js\n function combineURLs(baseURL, relativeURL) {\n return relativeURL ? baseURL.replace(/\\/?\\/$/, \"\") + \"/\" + relativeURL.replace(/^\\/+/, \"\") : baseURL;\n }\n var init_combineURLs = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/combineURLs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/buildFullPath.js\n function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n }\n var init_buildFullPath = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/buildFullPath.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isAbsoluteURL();\n init_combineURLs();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/mergeConfig.js\n function mergeConfig(config1, config2) {\n config2 = config2 || {};\n const config3 = {};\n function getMergedValue(target, source, prop, caseless) {\n if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {\n return utils_default.merge.call({ caseless }, target, source);\n } else if (utils_default.isPlainObject(source)) {\n return utils_default.merge({}, source);\n } else if (utils_default.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n function mergeDeepProperties(a3, b4, prop, caseless) {\n if (!utils_default.isUndefined(b4)) {\n return getMergedValue(a3, b4, prop, caseless);\n } else if (!utils_default.isUndefined(a3)) {\n return getMergedValue(void 0, a3, prop, caseless);\n }\n }\n function valueFromConfig2(a3, b4) {\n if (!utils_default.isUndefined(b4)) {\n return getMergedValue(void 0, b4);\n }\n }\n function defaultToConfig2(a3, b4) {\n if (!utils_default.isUndefined(b4)) {\n return getMergedValue(void 0, b4);\n } else if (!utils_default.isUndefined(a3)) {\n return getMergedValue(void 0, a3);\n }\n }\n function mergeDirectKeys(a3, b4, prop) {\n if (prop in config2) {\n return getMergedValue(a3, b4);\n } else if (prop in config1) {\n return getMergedValue(void 0, a3);\n }\n }\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a3, b4, prop) => mergeDeepProperties(headersToObject(a3), headersToObject(b4), prop, true)\n };\n utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge2 = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge2(config1[prop], config2[prop], prop);\n utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config3[prop] = configValue);\n });\n return config3;\n }\n var headersToObject;\n var init_mergeConfig = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/mergeConfig.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_AxiosHeaders();\n headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/resolveConfig.js\n var resolveConfig_default;\n var init_resolveConfig = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/resolveConfig.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_platform();\n init_utils11();\n init_isURLSameOrigin();\n init_cookies();\n init_buildFullPath();\n init_mergeConfig();\n init_AxiosHeaders();\n init_buildURL();\n resolveConfig_default = (config2) => {\n const newConfig = mergeConfig({}, config2);\n let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;\n newConfig.headers = headers = AxiosHeaders_default.from(headers);\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config2.params, config2.paramsSerializer);\n if (auth) {\n headers.set(\n \"Authorization\",\n \"Basic \" + btoa((auth.username || \"\") + \":\" + (auth.password ? unescape(encodeURIComponent(auth.password)) : \"\"))\n );\n }\n let contentType;\n if (utils_default.isFormData(data)) {\n if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(void 0);\n } else if ((contentType = headers.getContentType()) !== false) {\n const [type, ...tokens] = contentType ? contentType.split(\";\").map((token) => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || \"multipart/form-data\", ...tokens].join(\"; \"));\n }\n }\n if (platform_default.hasStandardBrowserEnv) {\n withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n return newConfig;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/xhr.js\n var isXHRAdapterSupported, xhr_default;\n var init_xhr = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/xhr.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_settle();\n init_transitional();\n init_AxiosError();\n init_CanceledError();\n init_parseProtocol();\n init_platform();\n init_AxiosHeaders();\n init_progressEventReducer();\n init_resolveConfig();\n isXHRAdapterSupported = typeof XMLHttpRequest !== \"undefined\";\n xhr_default = isXHRAdapterSupported && function(config2) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig_default(config2);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();\n let { responseType, onUploadProgress, onDownloadProgress } = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n function done() {\n flushUpload && flushUpload();\n flushDownload && flushDownload();\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n _config.signal && _config.signal.removeEventListener(\"abort\", onCanceled);\n }\n let request = new XMLHttpRequest();\n request.open(_config.method.toUpperCase(), _config.url, true);\n request.timeout = _config.timeout;\n function onloadend() {\n if (!request) {\n return;\n }\n const responseHeaders = AxiosHeaders_default.from(\n \"getAllResponseHeaders\" in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === \"text\" || responseType === \"json\" ? request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config2,\n request\n };\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n request = null;\n }\n if (\"onloadend\" in request) {\n request.onloadend = onloadend;\n } else {\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf(\"file:\") === 0)) {\n return;\n }\n setTimeout(onloadend);\n };\n }\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n reject(new AxiosError_default(\"Request aborted\", AxiosError_default.ECONNABORTED, config2, request));\n request = null;\n };\n request.onerror = function handleError() {\n reject(new AxiosError_default(\"Network Error\", AxiosError_default.ERR_NETWORK, config2, request));\n request = null;\n };\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? \"timeout of \" + _config.timeout + \"ms exceeded\" : \"timeout exceeded\";\n const transitional2 = _config.transitional || transitional_default;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError_default(\n timeoutErrorMessage,\n transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,\n config2,\n request\n ));\n request = null;\n };\n requestData === void 0 && requestHeaders.setContentType(null);\n if (\"setRequestHeader\" in request) {\n utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n if (!utils_default.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n if (responseType && responseType !== \"json\") {\n request.responseType = _config.responseType;\n }\n if (onDownloadProgress) {\n [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);\n request.addEventListener(\"progress\", downloadThrottled);\n }\n if (onUploadProgress && request.upload) {\n [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n request.upload.addEventListener(\"progress\", uploadThrottled);\n request.upload.addEventListener(\"loadend\", flushUpload);\n }\n if (_config.cancelToken || _config.signal) {\n onCanceled = (cancel) => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError_default(null, config2, request) : cancel);\n request.abort();\n request = null;\n };\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener(\"abort\", onCanceled);\n }\n }\n const protocol = parseProtocol(_config.url);\n if (protocol && platform_default.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError_default(\"Unsupported protocol \" + protocol + \":\", AxiosError_default.ERR_BAD_REQUEST, config2));\n return;\n }\n request.send(requestData || null);\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/composeSignals.js\n var composeSignals, composeSignals_default;\n var init_composeSignals = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/composeSignals.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_CanceledError();\n init_AxiosError();\n init_utils11();\n composeSignals = (signals, timeout) => {\n const { length } = signals = signals ? signals.filter(Boolean) : [];\n if (timeout || length) {\n let controller = new AbortController();\n let aborted;\n const onabort = function(reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));\n }\n };\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));\n }, timeout);\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach((signal2) => {\n signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener(\"abort\", onabort);\n });\n signals = null;\n }\n };\n signals.forEach((signal2) => signal2.addEventListener(\"abort\", onabort));\n const { signal } = controller;\n signal.unsubscribe = () => utils_default.asap(unsubscribe);\n return signal;\n }\n };\n composeSignals_default = composeSignals;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/trackStream.js\n var streamChunk, readBytes, readStream, trackStream;\n var init_trackStream = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/trackStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n let pos = 0;\n let end;\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n };\n readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n };\n readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n const reader = stream.getReader();\n try {\n for (; ; ) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n };\n trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator2 = readBytes(stream, chunkSize);\n let bytes = 0;\n let done;\n let _onFinish = (e2) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e2);\n }\n };\n return new ReadableStream({\n async pull(controller) {\n try {\n const { done: done2, value } = await iterator2.next();\n if (done2) {\n _onFinish();\n controller.close();\n return;\n }\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator2.return();\n }\n }, {\n highWaterMark: 2\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/fetch.js\n var isFetchSupported, isReadableStreamSupported, encodeText, test, supportsRequestStream, DEFAULT_CHUNK_SIZE, supportsResponseStream, resolvers, getBodyLength, resolveBodyLength, fetch_default;\n var init_fetch = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/fetch.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_platform();\n init_utils11();\n init_AxiosError();\n init_composeSignals();\n init_trackStream();\n init_AxiosHeaders();\n init_progressEventReducer();\n init_resolveConfig();\n init_settle();\n isFetchSupported = typeof fetch === \"function\" && typeof Request === \"function\" && typeof Response === \"function\";\n isReadableStreamSupported = isFetchSupported && typeof ReadableStream === \"function\";\n encodeText = isFetchSupported && (typeof TextEncoder === \"function\" ? /* @__PURE__ */ ((encoder6) => (str) => encoder6.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));\n test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e2) {\n return false;\n }\n };\n supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n const hasContentType = new Request(platform_default.origin, {\n body: new ReadableStream(),\n method: \"POST\",\n get duplex() {\n duplexAccessed = true;\n return \"half\";\n }\n }).headers.has(\"Content-Type\");\n return duplexAccessed && !hasContentType;\n });\n DEFAULT_CHUNK_SIZE = 64 * 1024;\n supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response(\"\").body));\n resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n };\n isFetchSupported && ((res) => {\n [\"text\", \"arrayBuffer\", \"blob\", \"formData\", \"stream\"].forEach((type) => {\n !resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_2, config2) => {\n throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config2);\n });\n });\n })(new Response());\n getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n if (utils_default.isBlob(body)) {\n return body.size;\n }\n if (utils_default.isSpecCompliantForm(body)) {\n const _request = new Request(platform_default.origin, {\n method: \"POST\",\n body\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {\n return body.byteLength;\n }\n if (utils_default.isURLSearchParams(body)) {\n body = body + \"\";\n }\n if (utils_default.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n };\n resolveBodyLength = async (headers, body) => {\n const length = utils_default.toFiniteNumber(headers.getContentLength());\n return length == null ? getBodyLength(body) : length;\n };\n fetch_default = isFetchSupported && (async (config2) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = \"same-origin\",\n fetchOptions\n } = resolveConfig_default(config2);\n responseType = responseType ? (responseType + \"\").toLowerCase() : \"text\";\n let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n let request;\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n let requestContentLength;\n try {\n if (onUploadProgress && supportsRequestStream && method !== \"get\" && method !== \"head\" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {\n let _request = new Request(url, {\n method: \"POST\",\n body: data,\n duplex: \"half\"\n });\n let contentTypeHeader;\n if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get(\"content-type\"))) {\n headers.setContentType(contentTypeHeader);\n }\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n if (!utils_default.isString(withCredentials)) {\n withCredentials = withCredentials ? \"include\" : \"omit\";\n }\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : void 0\n });\n let response = await fetch(request, fetchOptions);\n const isStreamResponse = supportsResponseStream && (responseType === \"stream\" || responseType === \"response\");\n if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {\n const options = {};\n [\"status\", \"statusText\", \"headers\"].forEach((prop) => {\n options[prop] = response[prop];\n });\n const responseContentLength = utils_default.toFiniteNumber(response.headers.get(\"content-length\"));\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n responseType = responseType || \"text\";\n let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || \"text\"](response, config2);\n !isStreamResponse && unsubscribe && unsubscribe();\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders_default.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config: config2,\n request\n });\n });\n } catch (err) {\n unsubscribe && unsubscribe();\n if (err && err.name === \"TypeError\" && /Load failed|fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError_default(\"Network Error\", AxiosError_default.ERR_NETWORK, config2, request),\n {\n cause: err.cause || err\n }\n );\n }\n throw AxiosError_default.from(err, err && err.code, config2, request);\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/adapters.js\n var knownAdapters, renderReason, isResolvedHandle, adapters_default;\n var init_adapters = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/adapters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_null();\n init_xhr();\n init_fetch();\n init_AxiosError();\n knownAdapters = {\n http: null_default,\n xhr: xhr_default,\n fetch: fetch_default\n };\n utils_default.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, \"name\", { value });\n } catch (e2) {\n }\n Object.defineProperty(fn, \"adapterName\", { value });\n }\n });\n renderReason = (reason) => `- ${reason}`;\n isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;\n adapters_default = {\n getAdapter: (adapters) => {\n adapters = utils_default.isArray(adapters) ? adapters : [adapters];\n const { length } = adapters;\n let nameOrAdapter;\n let adapter;\n const rejectedReasons = {};\n for (let i3 = 0; i3 < length; i3++) {\n nameOrAdapter = adapters[i3];\n let id;\n adapter = nameOrAdapter;\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n if (adapter === void 0) {\n throw new AxiosError_default(`Unknown adapter '${id}'`);\n }\n }\n if (adapter) {\n break;\n }\n rejectedReasons[id || \"#\" + i3] = adapter;\n }\n if (!adapter) {\n const reasons = Object.entries(rejectedReasons).map(\n ([id, state]) => `adapter ${id} ` + (state === false ? \"is not supported by the environment\" : \"is not available in the build\")\n );\n let s4 = length ? reasons.length > 1 ? \"since :\\n\" + reasons.map(renderReason).join(\"\\n\") : \" \" + renderReason(reasons[0]) : \"as no adapter specified\";\n throw new AxiosError_default(\n `There is no suitable adapter to dispatch the request ` + s4,\n \"ERR_NOT_SUPPORT\"\n );\n }\n return adapter;\n },\n adapters: knownAdapters\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/dispatchRequest.js\n function throwIfCancellationRequested(config2) {\n if (config2.cancelToken) {\n config2.cancelToken.throwIfRequested();\n }\n if (config2.signal && config2.signal.aborted) {\n throw new CanceledError_default(null, config2);\n }\n }\n function dispatchRequest(config2) {\n throwIfCancellationRequested(config2);\n config2.headers = AxiosHeaders_default.from(config2.headers);\n config2.data = transformData.call(\n config2,\n config2.transformRequest\n );\n if ([\"post\", \"put\", \"patch\"].indexOf(config2.method) !== -1) {\n config2.headers.setContentType(\"application/x-www-form-urlencoded\", false);\n }\n const adapter = adapters_default.getAdapter(config2.adapter || defaults_default.adapter);\n return adapter(config2).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config2);\n response.data = transformData.call(\n config2,\n config2.transformResponse,\n response\n );\n response.headers = AxiosHeaders_default.from(response.headers);\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config2);\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config2,\n config2.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders_default.from(reason.response.headers);\n }\n }\n return Promise.reject(reason);\n });\n }\n var init_dispatchRequest = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/dispatchRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transformData();\n init_isCancel();\n init_defaults2();\n init_CanceledError();\n init_AxiosHeaders();\n init_adapters();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/env/data.js\n var VERSION2;\n var init_data2 = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/env/data.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION2 = \"1.10.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/validator.js\n function assertOptions(options, schema, allowUnknown) {\n if (typeof options !== \"object\") {\n throw new AxiosError_default(\"options must be an object\", AxiosError_default.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i3 = keys.length;\n while (i3-- > 0) {\n const opt = keys[i3];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === void 0 || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError_default(\"option \" + opt + \" must be \" + result, AxiosError_default.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError_default(\"Unknown option \" + opt, AxiosError_default.ERR_BAD_OPTION);\n }\n }\n }\n var validators, deprecatedWarnings, validator_default;\n var init_validator = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/validator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_data2();\n init_AxiosError();\n validators = {};\n [\"object\", \"boolean\", \"number\", \"function\", \"string\", \"symbol\"].forEach((type, i3) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || \"a\" + (i3 < 1 ? \"n \" : \" \") + type;\n };\n });\n deprecatedWarnings = {};\n validators.transitional = function transitional(validator, version8, message) {\n function formatMessage(opt, desc) {\n return \"[Axios v\" + VERSION2 + \"] Transitional option '\" + opt + \"'\" + desc + (message ? \". \" + message : \"\");\n }\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError_default(\n formatMessage(opt, \" has been removed\" + (version8 ? \" in \" + version8 : \"\")),\n AxiosError_default.ERR_DEPRECATED\n );\n }\n if (version8 && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n console.warn(\n formatMessage(\n opt,\n \" has been deprecated since v\" + version8 + \" and will be removed in the near future\"\n )\n );\n }\n return validator ? validator(value, opt, opts) : true;\n };\n };\n validators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n };\n };\n validator_default = {\n assertOptions,\n validators\n };\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/Axios.js\n var validators2, Axios, Axios_default;\n var init_Axios = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/Axios.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_buildURL();\n init_InterceptorManager();\n init_dispatchRequest();\n init_mergeConfig();\n init_buildFullPath();\n init_validator();\n init_AxiosHeaders();\n validators2 = validator_default.validators;\n Axios = class {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager_default(),\n response: new InterceptorManager_default()\n };\n }\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config2) {\n try {\n return await this._request(configOrUrl, config2);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, \"\") : \"\";\n try {\n if (!err.stack) {\n err.stack = stack;\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, \"\"))) {\n err.stack += \"\\n\" + stack;\n }\n } catch (e2) {\n }\n }\n throw err;\n }\n }\n _request(configOrUrl, config2) {\n if (typeof configOrUrl === \"string\") {\n config2 = config2 || {};\n config2.url = configOrUrl;\n } else {\n config2 = configOrUrl || {};\n }\n config2 = mergeConfig(this.defaults, config2);\n const { transitional: transitional2, paramsSerializer, headers } = config2;\n if (transitional2 !== void 0) {\n validator_default.assertOptions(transitional2, {\n silentJSONParsing: validators2.transitional(validators2.boolean),\n forcedJSONParsing: validators2.transitional(validators2.boolean),\n clarifyTimeoutError: validators2.transitional(validators2.boolean)\n }, false);\n }\n if (paramsSerializer != null) {\n if (utils_default.isFunction(paramsSerializer)) {\n config2.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator_default.assertOptions(paramsSerializer, {\n encode: validators2.function,\n serialize: validators2.function\n }, true);\n }\n }\n if (config2.allowAbsoluteUrls !== void 0) {\n } else if (this.defaults.allowAbsoluteUrls !== void 0) {\n config2.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config2.allowAbsoluteUrls = true;\n }\n validator_default.assertOptions(config2, {\n baseUrl: validators2.spelling(\"baseURL\"),\n withXsrfToken: validators2.spelling(\"withXSRFToken\")\n }, true);\n config2.method = (config2.method || this.defaults.method || \"get\").toLowerCase();\n let contextHeaders = headers && utils_default.merge(\n headers.common,\n headers[config2.method]\n );\n headers && utils_default.forEach(\n [\"delete\", \"get\", \"head\", \"post\", \"put\", \"patch\", \"common\"],\n (method) => {\n delete headers[method];\n }\n );\n config2.headers = AxiosHeaders_default.concat(contextHeaders, headers);\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === \"function\" && interceptor.runWhen(config2) === false) {\n return;\n }\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n let promise;\n let i3 = 0;\n let len;\n if (!synchronousRequestInterceptors) {\n const chain2 = [dispatchRequest.bind(this), void 0];\n chain2.unshift.apply(chain2, requestInterceptorChain);\n chain2.push.apply(chain2, responseInterceptorChain);\n len = chain2.length;\n promise = Promise.resolve(config2);\n while (i3 < len) {\n promise = promise.then(chain2[i3++], chain2[i3++]);\n }\n return promise;\n }\n len = requestInterceptorChain.length;\n let newConfig = config2;\n i3 = 0;\n while (i3 < len) {\n const onFulfilled = requestInterceptorChain[i3++];\n const onRejected = requestInterceptorChain[i3++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n i3 = 0;\n len = responseInterceptorChain.length;\n while (i3 < len) {\n promise = promise.then(responseInterceptorChain[i3++], responseInterceptorChain[i3++]);\n }\n return promise;\n }\n getUri(config2) {\n config2 = mergeConfig(this.defaults, config2);\n const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls);\n return buildURL(fullPath, config2.params, config2.paramsSerializer);\n }\n };\n utils_default.forEach([\"delete\", \"get\", \"head\", \"options\"], function forEachMethodNoData(method) {\n Axios.prototype[method] = function(url, config2) {\n return this.request(mergeConfig(config2 || {}, {\n method,\n url,\n data: (config2 || {}).data\n }));\n };\n });\n utils_default.forEach([\"post\", \"put\", \"patch\"], function forEachMethodWithData(method) {\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config2) {\n return this.request(mergeConfig(config2 || {}, {\n method,\n headers: isForm ? {\n \"Content-Type\": \"multipart/form-data\"\n } : {},\n url,\n data\n }));\n };\n }\n Axios.prototype[method] = generateHTTPMethod();\n Axios.prototype[method + \"Form\"] = generateHTTPMethod(true);\n });\n Axios_default = Axios;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/CancelToken.js\n var CancelToken, CancelToken_default;\n var init_CancelToken = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/CancelToken.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_CanceledError();\n CancelToken = class _CancelToken {\n constructor(executor) {\n if (typeof executor !== \"function\") {\n throw new TypeError(\"executor must be a function.\");\n }\n let resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n const token = this;\n this.promise.then((cancel) => {\n if (!token._listeners)\n return;\n let i3 = token._listeners.length;\n while (i3-- > 0) {\n token._listeners[i3](cancel);\n }\n token._listeners = null;\n });\n this.promise.then = (onfulfilled) => {\n let _resolve;\n const promise = new Promise((resolve) => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n return promise;\n };\n executor(function cancel(message, config2, request) {\n if (token.reason) {\n return;\n }\n token.reason = new CanceledError_default(message, config2, request);\n resolvePromise(token.reason);\n });\n }\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n /**\n * Subscribe to the cancel signal\n */\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n /**\n * Unsubscribe from the cancel signal\n */\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index2 = this._listeners.indexOf(listener);\n if (index2 !== -1) {\n this._listeners.splice(index2, 1);\n }\n }\n toAbortSignal() {\n const controller = new AbortController();\n const abort2 = (err) => {\n controller.abort(err);\n };\n this.subscribe(abort2);\n controller.signal.unsubscribe = () => this.unsubscribe(abort2);\n return controller.signal;\n }\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new _CancelToken(function executor(c4) {\n cancel = c4;\n });\n return {\n token,\n cancel\n };\n }\n };\n CancelToken_default = CancelToken;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/spread.js\n function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n }\n var init_spread = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/spread.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isAxiosError.js\n function isAxiosError(payload) {\n return utils_default.isObject(payload) && payload.isAxiosError === true;\n }\n var init_isAxiosError = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isAxiosError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/HttpStatusCode.js\n var HttpStatusCode, HttpStatusCode_default;\n var init_HttpStatusCode = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/HttpStatusCode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511\n };\n Object.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n });\n HttpStatusCode_default = HttpStatusCode;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js\n function createInstance(defaultConfig) {\n const context2 = new Axios_default(defaultConfig);\n const instance = bind(Axios_default.prototype.request, context2);\n utils_default.extend(instance, Axios_default.prototype, context2, { allOwnKeys: true });\n utils_default.extend(instance, context2, null, { allOwnKeys: true });\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n return instance;\n }\n var axios, axios_default;\n var init_axios = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils11();\n init_bind();\n init_Axios();\n init_mergeConfig();\n init_defaults2();\n init_formDataToJSON();\n init_CanceledError();\n init_CancelToken();\n init_isCancel();\n init_data2();\n init_toFormData();\n init_AxiosError();\n init_spread();\n init_isAxiosError();\n init_AxiosHeaders();\n init_adapters();\n init_HttpStatusCode();\n axios = createInstance(defaults_default);\n axios.Axios = Axios_default;\n axios.CanceledError = CanceledError_default;\n axios.CancelToken = CancelToken_default;\n axios.isCancel = isCancel;\n axios.VERSION = VERSION2;\n axios.toFormData = toFormData_default;\n axios.AxiosError = AxiosError_default;\n axios.Cancel = axios.CanceledError;\n axios.all = function all(promises) {\n return Promise.all(promises);\n };\n axios.spread = spread;\n axios.isAxiosError = isAxiosError;\n axios.mergeConfig = mergeConfig;\n axios.AxiosHeaders = AxiosHeaders_default;\n axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);\n axios.getAdapter = adapters_default.getAdapter;\n axios.HttpStatusCode = HttpStatusCode_default;\n axios.default = axios;\n axios_default = axios;\n }\n });\n\n // ../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js\n var Axios2, AxiosError2, CanceledError2, isCancel2, CancelToken2, VERSION3, all2, Cancel, isAxiosError2, spread2, toFormData2, AxiosHeaders2, HttpStatusCode2, formToJSON, getAdapter, mergeConfig2;\n var init_axios2 = __esm({\n \"../../../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_axios();\n ({\n Axios: Axios2,\n AxiosError: AxiosError2,\n CanceledError: CanceledError2,\n isCancel: isCancel2,\n CancelToken: CancelToken2,\n VERSION: VERSION3,\n all: all2,\n Cancel,\n isAxiosError: isAxiosError2,\n spread: spread2,\n toFormData: toFormData2,\n AxiosHeaders: AxiosHeaders2,\n HttpStatusCode: HttpStatusCode2,\n formToJSON,\n getAdapter,\n mergeConfig: mergeConfig2\n } = axios_default);\n }\n });\n\n // ../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/alchemy-provider-6bbed8a2.js\n var alchemy_provider_6bbed8a2_exports = {};\n __export(alchemy_provider_6bbed8a2_exports, {\n AlchemyProvider: () => AlchemyProvider\n });\n function getResult(payload) {\n if (payload.error) {\n const 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 var import_networks, import_providers, import_web, DEFAULT_MAX_REQUEST_BATCH_SIZE, DEFAULT_REQUEST_BATCH_DELAY_MS, RequestBatcher, AlchemyProvider;\n var init_alchemy_provider_6bbed8a2 = __esm({\n \"../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/alchemy-provider-6bbed8a2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_index_f73a5f29();\n import_networks = __toESM(require_lib27());\n import_providers = __toESM(require_lib29());\n import_web = __toESM(require_lib28());\n DEFAULT_MAX_REQUEST_BATCH_SIZE = 100;\n DEFAULT_REQUEST_BATCH_DELAY_MS = 10;\n RequestBatcher = class {\n constructor(sendBatchFn, maxBatchSize = DEFAULT_MAX_REQUEST_BATCH_SIZE) {\n this.sendBatchFn = sendBatchFn;\n this.maxBatchSize = maxBatchSize;\n this.pendingBatch = [];\n }\n /**\n * Enqueues the provided request. The batch is immediately sent if the maximum\n * batch size is reached. Otherwise, the request is enqueued onto a batch that\n * is sent after 10ms.\n *\n * Returns a promise that resolves with the result of the request.\n */\n enqueueRequest(request) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const inflightRequest = {\n request,\n resolve: void 0,\n reject: void 0\n };\n const promise = new Promise((resolve, reject) => {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n this.pendingBatch.push(inflightRequest);\n if (this.pendingBatch.length === this.maxBatchSize) {\n void this.sendBatchRequest();\n } else if (!this.pendingBatchTimer) {\n this.pendingBatchTimer = setTimeout(() => this.sendBatchRequest(), DEFAULT_REQUEST_BATCH_DELAY_MS);\n }\n return promise;\n });\n }\n /**\n * Sends the currently queued batches and resets the batch and timer. Processes\n * the batched response results back to the original promises.\n */\n sendBatchRequest() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const batch2 = this.pendingBatch;\n this.pendingBatch = [];\n if (this.pendingBatchTimer) {\n clearTimeout(this.pendingBatchTimer);\n this.pendingBatchTimer = void 0;\n }\n const request = batch2.map((inflight) => inflight.request);\n return this.sendBatchFn(request).then((result) => {\n batch2.forEach((inflightRequest, index2) => {\n const payload = result[index2];\n if (payload.error) {\n const error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n inflightRequest.reject(error);\n } else {\n inflightRequest.resolve(payload.result);\n }\n });\n }, (error) => {\n batch2.forEach((inflightRequest) => {\n inflightRequest.reject(error);\n });\n });\n });\n }\n };\n AlchemyProvider = class _AlchemyProvider extends import_providers.JsonRpcProvider {\n /** @internal */\n constructor(config2) {\n const apiKey = _AlchemyProvider.getApiKey(config2.apiKey);\n const alchemyNetwork = _AlchemyProvider.getAlchemyNetwork(config2.network);\n let connection = _AlchemyProvider.getAlchemyConnectionInfo(alchemyNetwork, apiKey, \"http\");\n if (config2.url !== void 0) {\n connection.url = config2.url;\n }\n connection.throttleLimit = config2.maxRetries;\n if (config2.connectionInfoOverrides) {\n connection = Object.assign(Object.assign({}, connection), config2.connectionInfoOverrides);\n }\n const ethersNetwork = EthersNetwork[alchemyNetwork];\n if (!ethersNetwork) {\n throw new Error(`Unsupported network: ${alchemyNetwork}`);\n }\n super(connection, ethersNetwork);\n this.apiKey = config2.apiKey;\n this.maxRetries = config2.maxRetries;\n this.batchRequests = config2.batchRequests;\n const batcherConnection = Object.assign(Object.assign({}, this.connection), { headers: Object.assign(Object.assign({}, this.connection.headers), { \"Alchemy-Ethers-Sdk-Method\": \"batchSend\" }) });\n const sendBatchFn = (requests) => {\n return (0, import_web.fetchJson)(batcherConnection, JSON.stringify(requests));\n };\n this.batcher = new RequestBatcher(sendBatchFn);\n this.modifyFormatter();\n }\n /**\n * Overrides the `UrlJsonRpcProvider.getApiKey` method as implemented by\n * ethers.js. Returns the API key for an Alchemy provider.\n *\n * @internal\n * @override\n */\n static getApiKey(apiKey) {\n if (apiKey == null) {\n return DEFAULT_ALCHEMY_API_KEY;\n }\n if (apiKey && typeof apiKey !== \"string\") {\n throw new Error(`Invalid apiKey '${apiKey}' provided. apiKey must be a string.`);\n }\n return apiKey;\n }\n /**\n * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js.\n *\n * This override allows the SDK to set the provider's network to values not\n * yet supported by ethers.js.\n *\n * @internal\n * @override\n */\n static getNetwork(network) {\n if (typeof network === \"string\" && network in CustomNetworks) {\n return CustomNetworks[network];\n }\n return (0, import_networks.getNetwork)(network);\n }\n /**\n * Converts the `Networkish` input to the network enum used by Alchemy.\n *\n * @internal\n */\n static getAlchemyNetwork(network) {\n if (network === void 0) {\n return DEFAULT_NETWORK;\n }\n if (typeof network === \"number\") {\n throw new Error(`Invalid network '${network}' provided. Network must be a string.`);\n }\n const isValidNetwork = Object.values(Network).includes(network);\n if (!isValidNetwork) {\n throw new Error(`Invalid network '${network}' provided. Network must be one of: ${Object.values(Network).join(\", \")}.`);\n }\n return network;\n }\n /**\n * Returns a {@link ConnectionInfo} object compatible with ethers that contains\n * the correct URLs for Alchemy.\n *\n * @internal\n */\n static getAlchemyConnectionInfo(network, apiKey, type) {\n const url = type === \"http\" ? getAlchemyHttpUrl(network, apiKey) : getAlchemyWsUrl(network, apiKey);\n return {\n headers: IS_BROWSER ? {\n \"Alchemy-Ethers-Sdk-Version\": VERSION4\n } : {\n \"Alchemy-Ethers-Sdk-Version\": VERSION4,\n \"Accept-Encoding\": \"gzip\"\n },\n allowGzip: true,\n url\n };\n }\n /**\n * Overrides the method in ethers.js's `StaticJsonRpcProvider` class. This\n * method is called when calling methods on the parent class `BaseProvider`.\n *\n * @override\n */\n detectNetwork() {\n const _super = Object.create(null, {\n detectNetwork: { get: () => super.detectNetwork }\n });\n return __awaiter$1(this, void 0, void 0, function* () {\n let network = this.network;\n if (network == null) {\n network = yield _super.detectNetwork.call(this);\n if (!network) {\n throw new Error(\"No network detected\");\n }\n }\n return network;\n });\n }\n _startPending() {\n logWarn(\"WARNING: Alchemy Provider does not support pending filters\");\n }\n /**\n * Overrides the ether's `isCommunityResource()` method. Returns true if the\n * current api key is the default key.\n *\n * @override\n */\n isCommunityResource() {\n return this.apiKey === DEFAULT_ALCHEMY_API_KEY;\n }\n /**\n * Overrides the base {@link JsonRpcProvider.send} method to implement custom\n * logic for sending requests to Alchemy.\n *\n * @param method The method name to use for the request.\n * @param params The parameters to use for the request.\n * @override\n * @public\n */\n // TODO: Add headers for `perform()` override.\n send(method, params) {\n return this._send(method, params, \"send\");\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `JsonRpcProvider.send()`.\n *\n * This method is copied over directly in order to implement custom headers\n *\n * @internal\n */\n _send(method, params, methodName) {\n const request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n const connection = Object.assign({}, this.connection);\n connection.headers[\"Alchemy-Ethers-Sdk-Method\"] = methodName;\n if (this.batchRequests) {\n return this.batcher.enqueueRequest(request);\n }\n this.emit(\"debug\", {\n action: \"request\",\n request: deepCopy(request),\n provider: this\n });\n const cache = [\"eth_chainId\", \"eth_blockNumber\"].indexOf(method) >= 0;\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n const result = (0, import_web.fetchJson)(this.connection, JSON.stringify(request), getResult).then((result2) => {\n this.emit(\"debug\", {\n action: \"response\",\n request,\n response: result2,\n provider: this\n });\n return result2;\n }, (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(() => {\n this._cache[method] = null;\n }, 0);\n }\n return result;\n }\n /**\n * Overrides the base `Formatter` class inherited from ethers to support\n * returning custom fields in Ethers response types.\n *\n * For context, ethers has a `Formatter` class that is used to format the\n * response from a JSON-RPC request. Any fields that are not defined in the\n * `Formatter` class are removed from the returned response. By modifying the\n * `Formatter` class in this method, we can add support for fields that are\n * not defined in ethers.\n */\n modifyFormatter() {\n this.formatter.formats[\"receiptLog\"][\"removed\"] = (val) => {\n if (typeof val === \"boolean\") {\n return val;\n }\n return void 0;\n };\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/sturdy-websocket@0.2.1/node_modules/sturdy-websocket/dist/index.js\n var require_dist = __commonJS({\n \"../../../node_modules/.pnpm/sturdy-websocket@0.2.1/node_modules/sturdy-websocket/dist/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var SHOULD_RECONNECT_FALSE_MESSAGE = \"Provided shouldReconnect() returned false. Closing permanently.\";\n var SHOULD_RECONNECT_PROMISE_FALSE_MESSAGE = \"Provided shouldReconnect() resolved to false. Closing permanently.\";\n var SturdyWebSocket2 = (\n /** @class */\n function() {\n function SturdyWebSocket3(url, protocolsOrOptions, options) {\n if (options === void 0) {\n options = {};\n }\n this.url = url;\n this.onclose = null;\n this.onerror = null;\n this.onmessage = null;\n this.onopen = null;\n this.ondown = null;\n this.onreopen = null;\n this.CONNECTING = SturdyWebSocket3.CONNECTING;\n this.OPEN = SturdyWebSocket3.OPEN;\n this.CLOSING = SturdyWebSocket3.CLOSING;\n this.CLOSED = SturdyWebSocket3.CLOSED;\n this.hasBeenOpened = false;\n this.isClosed = false;\n this.messageBuffer = [];\n this.nextRetryTime = 0;\n this.reconnectCount = 0;\n this.lastKnownExtensions = \"\";\n this.lastKnownProtocol = \"\";\n this.listeners = {};\n if (protocolsOrOptions == null || typeof protocolsOrOptions === \"string\" || Array.isArray(protocolsOrOptions)) {\n this.protocols = protocolsOrOptions;\n } else {\n options = protocolsOrOptions;\n }\n this.options = applyDefaultOptions(options);\n if (!this.options.wsConstructor) {\n if (typeof WebSocket !== \"undefined\") {\n this.options.wsConstructor = WebSocket;\n } else {\n throw new Error(\"WebSocket not present in global scope and no wsConstructor option was provided.\");\n }\n }\n this.openNewWebSocket();\n }\n Object.defineProperty(SturdyWebSocket3.prototype, \"binaryType\", {\n get: function() {\n return this.binaryTypeInternal || \"blob\";\n },\n set: function(binaryType) {\n this.binaryTypeInternal = binaryType;\n if (this.ws) {\n this.ws.binaryType = binaryType;\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SturdyWebSocket3.prototype, \"bufferedAmount\", {\n get: function() {\n var sum = this.ws ? this.ws.bufferedAmount : 0;\n var hasUnknownAmount = false;\n this.messageBuffer.forEach(function(data) {\n var byteLength = getDataByteLength(data);\n if (byteLength != null) {\n sum += byteLength;\n } else {\n hasUnknownAmount = true;\n }\n });\n if (hasUnknownAmount) {\n this.debugLog(\"Some buffered data had unknown length. bufferedAmount() return value may be below the correct amount.\");\n }\n return sum;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SturdyWebSocket3.prototype, \"extensions\", {\n get: function() {\n return this.ws ? this.ws.extensions : this.lastKnownExtensions;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SturdyWebSocket3.prototype, \"protocol\", {\n get: function() {\n return this.ws ? this.ws.protocol : this.lastKnownProtocol;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SturdyWebSocket3.prototype, \"readyState\", {\n get: function() {\n return this.isClosed ? SturdyWebSocket3.CLOSED : SturdyWebSocket3.OPEN;\n },\n enumerable: true,\n configurable: true\n });\n SturdyWebSocket3.prototype.close = function(code, reason) {\n this.disposeSocket(code, reason);\n this.shutdown();\n this.debugLog(\"WebSocket permanently closed by client.\");\n };\n SturdyWebSocket3.prototype.send = function(data) {\n if (this.isClosed) {\n throw new Error(\"WebSocket is already in CLOSING or CLOSED state.\");\n } else if (this.ws && this.ws.readyState === this.OPEN) {\n this.ws.send(data);\n } else {\n this.messageBuffer.push(data);\n }\n };\n SturdyWebSocket3.prototype.reconnect = function() {\n if (this.isClosed) {\n throw new Error(\"Cannot call reconnect() on socket which is permanently closed.\");\n }\n this.disposeSocket(1e3, \"Client requested reconnect.\");\n this.handleClose(void 0);\n };\n SturdyWebSocket3.prototype.addEventListener = function(type, listener) {\n if (!this.listeners[type]) {\n this.listeners[type] = [];\n }\n this.listeners[type].push(listener);\n };\n SturdyWebSocket3.prototype.dispatchEvent = function(event) {\n return this.dispatchEventOfType(event.type, event);\n };\n SturdyWebSocket3.prototype.removeEventListener = function(type, listener) {\n if (this.listeners[type]) {\n this.listeners[type] = this.listeners[type].filter(function(l6) {\n return l6 !== listener;\n });\n }\n };\n SturdyWebSocket3.prototype.openNewWebSocket = function() {\n var _this = this;\n if (this.isClosed) {\n return;\n }\n var _a2 = this.options, connectTimeout = _a2.connectTimeout, wsConstructor = _a2.wsConstructor;\n this.debugLog(\"Opening new WebSocket to \" + this.url + \".\");\n var ws = new wsConstructor(this.url, this.protocols);\n ws.onclose = function(event) {\n return _this.handleClose(event);\n };\n ws.onerror = function(event) {\n return _this.handleError(event);\n };\n ws.onmessage = function(event) {\n return _this.handleMessage(event);\n };\n ws.onopen = function(event) {\n return _this.handleOpen(event);\n };\n this.connectTimeoutId = setTimeout(function() {\n _this.clearConnectTimeout();\n _this.disposeSocket();\n _this.handleClose(void 0);\n }, connectTimeout);\n this.ws = ws;\n };\n SturdyWebSocket3.prototype.handleOpen = function(event) {\n var _this = this;\n if (!this.ws || this.isClosed) {\n return;\n }\n var allClearResetTime = this.options.allClearResetTime;\n this.debugLog(\"WebSocket opened.\");\n if (this.binaryTypeInternal != null) {\n this.ws.binaryType = this.binaryTypeInternal;\n } else {\n this.binaryTypeInternal = this.ws.binaryType;\n }\n this.clearConnectTimeout();\n if (this.hasBeenOpened) {\n this.dispatchEventOfType(\"reopen\", event);\n } else {\n this.dispatchEventOfType(\"open\", event);\n this.hasBeenOpened = true;\n }\n this.messageBuffer.forEach(function(message) {\n return _this.send(message);\n });\n this.messageBuffer = [];\n this.allClearTimeoutId = setTimeout(function() {\n _this.clearAllClearTimeout();\n _this.nextRetryTime = 0;\n _this.reconnectCount = 0;\n var openTime = allClearResetTime / 1e3 | 0;\n _this.debugLog(\"WebSocket remained open for \" + openTime + \" seconds. Resetting retry time and count.\");\n }, allClearResetTime);\n };\n SturdyWebSocket3.prototype.handleMessage = function(event) {\n if (this.isClosed) {\n return;\n }\n this.dispatchEventOfType(\"message\", event);\n };\n SturdyWebSocket3.prototype.handleClose = function(event) {\n var _this = this;\n if (this.isClosed) {\n return;\n }\n var _a2 = this.options, maxReconnectAttempts = _a2.maxReconnectAttempts, shouldReconnect = _a2.shouldReconnect;\n this.clearConnectTimeout();\n this.clearAllClearTimeout();\n if (this.ws) {\n this.lastKnownExtensions = this.ws.extensions;\n this.lastKnownProtocol = this.ws.protocol;\n this.disposeSocket();\n }\n this.dispatchEventOfType(\"down\", event);\n if (this.reconnectCount >= maxReconnectAttempts) {\n this.stopReconnecting(event, this.getTooManyFailedReconnectsMessage());\n return;\n }\n var willReconnect = !event || shouldReconnect(event);\n if (typeof willReconnect === \"boolean\") {\n this.handleWillReconnect(willReconnect, event, SHOULD_RECONNECT_FALSE_MESSAGE);\n } else {\n willReconnect.then(function(willReconnectResolved) {\n if (_this.isClosed) {\n return;\n }\n _this.handleWillReconnect(willReconnectResolved, event, SHOULD_RECONNECT_PROMISE_FALSE_MESSAGE);\n });\n }\n };\n SturdyWebSocket3.prototype.handleError = function(event) {\n this.dispatchEventOfType(\"error\", event);\n this.debugLog(\"WebSocket encountered an error.\");\n };\n SturdyWebSocket3.prototype.handleWillReconnect = function(willReconnect, event, denialReason) {\n if (willReconnect) {\n this.reestablishConnection();\n } else {\n this.stopReconnecting(event, denialReason);\n }\n };\n SturdyWebSocket3.prototype.reestablishConnection = function() {\n var _this = this;\n var _a2 = this.options, minReconnectDelay = _a2.minReconnectDelay, maxReconnectDelay = _a2.maxReconnectDelay, reconnectBackoffFactor = _a2.reconnectBackoffFactor;\n this.reconnectCount++;\n var retryTime = this.nextRetryTime;\n this.nextRetryTime = Math.max(minReconnectDelay, Math.min(this.nextRetryTime * reconnectBackoffFactor, maxReconnectDelay));\n setTimeout(function() {\n return _this.openNewWebSocket();\n }, retryTime);\n var retryTimeSeconds = retryTime / 1e3 | 0;\n this.debugLog(\"WebSocket was closed. Re-opening in \" + retryTimeSeconds + \" seconds.\");\n };\n SturdyWebSocket3.prototype.stopReconnecting = function(event, debugReason) {\n this.debugLog(debugReason);\n this.shutdown();\n if (event) {\n this.dispatchEventOfType(\"close\", event);\n }\n };\n SturdyWebSocket3.prototype.shutdown = function() {\n this.isClosed = true;\n this.clearAllTimeouts();\n this.messageBuffer = [];\n this.disposeSocket();\n };\n SturdyWebSocket3.prototype.disposeSocket = function(closeCode, reason) {\n if (!this.ws) {\n return;\n }\n this.ws.onerror = noop4;\n this.ws.onclose = noop4;\n this.ws.onmessage = noop4;\n this.ws.onopen = noop4;\n this.ws.close(closeCode, reason);\n this.ws = void 0;\n };\n SturdyWebSocket3.prototype.clearAllTimeouts = function() {\n this.clearConnectTimeout();\n this.clearAllClearTimeout();\n };\n SturdyWebSocket3.prototype.clearConnectTimeout = function() {\n if (this.connectTimeoutId != null) {\n clearTimeout(this.connectTimeoutId);\n this.connectTimeoutId = void 0;\n }\n };\n SturdyWebSocket3.prototype.clearAllClearTimeout = function() {\n if (this.allClearTimeoutId != null) {\n clearTimeout(this.allClearTimeoutId);\n this.allClearTimeoutId = void 0;\n }\n };\n SturdyWebSocket3.prototype.dispatchEventOfType = function(type, event) {\n var _this = this;\n switch (type) {\n case \"close\":\n if (this.onclose) {\n this.onclose(event);\n }\n break;\n case \"error\":\n if (this.onerror) {\n this.onerror(event);\n }\n break;\n case \"message\":\n if (this.onmessage) {\n this.onmessage(event);\n }\n break;\n case \"open\":\n if (this.onopen) {\n this.onopen(event);\n }\n break;\n case \"down\":\n if (this.ondown) {\n this.ondown(event);\n }\n break;\n case \"reopen\":\n if (this.onreopen) {\n this.onreopen(event);\n }\n break;\n }\n if (type in this.listeners) {\n this.listeners[type].slice().forEach(function(listener) {\n return _this.callListener(listener, event);\n });\n }\n return !event || !event.defaultPrevented;\n };\n SturdyWebSocket3.prototype.callListener = function(listener, event) {\n if (typeof listener === \"function\") {\n listener.call(this, event);\n } else {\n listener.handleEvent.call(this, event);\n }\n };\n SturdyWebSocket3.prototype.debugLog = function(message) {\n if (this.options.debug) {\n console.log(message);\n }\n };\n SturdyWebSocket3.prototype.getTooManyFailedReconnectsMessage = function() {\n var maxReconnectAttempts = this.options.maxReconnectAttempts;\n return \"Failed to reconnect after \" + maxReconnectAttempts + \" \" + pluralize(\"attempt\", maxReconnectAttempts) + \". Closing permanently.\";\n };\n SturdyWebSocket3.DEFAULT_OPTIONS = {\n allClearResetTime: 5e3,\n connectTimeout: 5e3,\n debug: false,\n minReconnectDelay: 1e3,\n maxReconnectDelay: 3e4,\n maxReconnectAttempts: Number.POSITIVE_INFINITY,\n reconnectBackoffFactor: 1.5,\n shouldReconnect: function() {\n return true;\n },\n wsConstructor: void 0\n };\n SturdyWebSocket3.CONNECTING = 0;\n SturdyWebSocket3.OPEN = 1;\n SturdyWebSocket3.CLOSING = 2;\n SturdyWebSocket3.CLOSED = 3;\n return SturdyWebSocket3;\n }()\n );\n exports3.default = SturdyWebSocket2;\n function applyDefaultOptions(options) {\n var result = {};\n Object.keys(SturdyWebSocket2.DEFAULT_OPTIONS).forEach(function(key) {\n var value = options[key];\n result[key] = value === void 0 ? SturdyWebSocket2.DEFAULT_OPTIONS[key] : value;\n });\n return result;\n }\n function getDataByteLength(data) {\n if (typeof data === \"string\") {\n return 2 * data.length;\n } else if (data instanceof ArrayBuffer) {\n return data.byteLength;\n } else if (data instanceof Blob) {\n return data.size;\n } else {\n return void 0;\n }\n }\n function pluralize(s4, n2) {\n return n2 === 1 ? s4 : s4 + \"s\";\n }\n function noop4() {\n }\n }\n });\n\n // ../../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/global.js\n var require_global = __commonJS({\n \"../../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/global.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var naiveFallback = function() {\n if (typeof self === \"object\" && self)\n return self;\n if (typeof window === \"object\" && window)\n return window;\n throw new Error(\"Unable to resolve global `this`\");\n };\n module.exports = function() {\n if (this)\n return this;\n if (typeof globalThis === \"object\" && globalThis)\n return globalThis;\n try {\n Object.defineProperty(Object.prototype, \"__global__\", {\n get: function() {\n return this;\n },\n configurable: true\n });\n } catch (error) {\n return naiveFallback();\n }\n try {\n if (!__global__)\n return naiveFallback();\n return __global__;\n } finally {\n delete Object.prototype.__global__;\n }\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/package.json\n var require_package2 = __commonJS({\n \"../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/package.json\"(exports3, module) {\n module.exports = {\n name: \"websocket\",\n description: \"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.\",\n keywords: [\n \"websocket\",\n \"websockets\",\n \"socket\",\n \"networking\",\n \"comet\",\n \"push\",\n \"RFC-6455\",\n \"realtime\",\n \"server\",\n \"client\"\n ],\n author: \"Brian McKelvey (https://github.com/theturtle32)\",\n contributors: [\n \"I\\xF1aki Baz Castillo (http://dev.sipdoc.net)\"\n ],\n version: \"1.0.35\",\n repository: {\n type: \"git\",\n url: \"https://github.com/theturtle32/WebSocket-Node.git\"\n },\n homepage: \"https://github.com/theturtle32/WebSocket-Node\",\n engines: {\n node: \">=4.0.0\"\n },\n dependencies: {\n bufferutil: \"^4.0.1\",\n debug: \"^2.2.0\",\n \"es5-ext\": \"^0.10.63\",\n \"typedarray-to-buffer\": \"^3.1.5\",\n \"utf-8-validate\": \"^5.0.2\",\n yaeti: \"^0.0.6\"\n },\n devDependencies: {\n \"buffer-equal\": \"^1.0.0\",\n gulp: \"^4.0.2\",\n \"gulp-jshint\": \"^2.0.4\",\n \"jshint-stylish\": \"^2.2.1\",\n jshint: \"^2.0.0\",\n tape: \"^4.9.1\"\n },\n config: {\n verbose: false\n },\n scripts: {\n test: \"tape test/unit/*.js\",\n gulp: \"gulp\"\n },\n main: \"index\",\n directories: {\n lib: \"./lib\"\n },\n browser: \"lib/browser.js\",\n license: \"Apache-2.0\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/lib/version.js\n var require_version27 = __commonJS({\n \"../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/lib/version.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = require_package2().version;\n }\n });\n\n // ../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/lib/browser.js\n var require_browser = __commonJS({\n \"../../../node_modules/.pnpm/websocket@1.0.35/node_modules/websocket/lib/browser.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _globalThis;\n if (typeof globalThis === \"object\") {\n _globalThis = globalThis;\n } else {\n try {\n _globalThis = require_global();\n } catch (error) {\n } finally {\n if (!_globalThis && typeof window !== \"undefined\") {\n _globalThis = window;\n }\n if (!_globalThis) {\n throw new Error(\"Could not determine global this\");\n }\n }\n }\n var NativeWebSocket = _globalThis.WebSocket || _globalThis.MozWebSocket;\n var websocket_version = require_version27();\n function W3CWebSocket(uri, protocols) {\n var native_instance;\n if (protocols) {\n native_instance = new NativeWebSocket(uri, protocols);\n } else {\n native_instance = new NativeWebSocket(uri);\n }\n return native_instance;\n }\n if (NativeWebSocket) {\n [\"CONNECTING\", \"OPEN\", \"CLOSING\", \"CLOSED\"].forEach(function(prop) {\n Object.defineProperty(W3CWebSocket, prop, {\n get: function() {\n return NativeWebSocket[prop];\n }\n });\n });\n }\n module.exports = {\n \"w3cwebsocket\": NativeWebSocket ? W3CWebSocket : null,\n \"version\": websocket_version\n };\n }\n });\n\n // ../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/alchemy-websocket-provider-bdfaf8f9.js\n var alchemy_websocket_provider_bdfaf8f9_exports = {};\n __export(alchemy_websocket_provider_bdfaf8f9_exports, {\n AlchemyWebSocketProvider: () => AlchemyWebSocketProvider\n });\n function toNewHeadsEvent(head) {\n const result = Object.assign({}, head);\n delete result.totalDifficulty;\n delete result.transactions;\n delete result.uncles;\n return result;\n }\n function dedupeNewHeads(events) {\n return dedupe(events, (event) => event.hash);\n }\n function dedupeLogs(events) {\n return dedupe(events, (event) => `${event.blockHash}/${event.logIndex}`);\n }\n function dedupe(items, getKey) {\n const keysSeen = /* @__PURE__ */ new Set();\n const result = [];\n items.forEach((item) => {\n const key = getKey(item);\n if (!keysSeen.has(key)) {\n keysSeen.add(key);\n result.push(item);\n }\n });\n return result;\n }\n function throwIfCancelled(isCancelled) {\n if (isCancelled()) {\n throw CANCELLED;\n }\n }\n function getWebsocketConstructor() {\n return isNodeEnvironment() ? require_browser().w3cwebsocket : WebSocket;\n }\n function isNodeEnvironment() {\n return typeof process_exports !== \"undefined\" && process_exports != null && process_exports.versions != null && process_exports.versions.node != null;\n }\n function makeCancelToken() {\n let cancelled = false;\n return { cancel: () => cancelled = true, isCancelled: () => cancelled };\n }\n function withBackoffRetries(f6, retryCount, shouldRetry2 = () => true) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let nextWaitTime = 0;\n let i3 = 0;\n while (true) {\n try {\n return yield f6();\n } catch (error) {\n i3++;\n if (i3 >= retryCount || !shouldRetry2(error)) {\n throw error;\n }\n yield delay(nextWaitTime);\n if (!shouldRetry2(error)) {\n throw error;\n }\n nextWaitTime = nextWaitTime === 0 ? MIN_RETRY_DELAY : Math.min(MAX_RETRY_DELAY, RETRY_BACKOFF_FACTOR * nextWaitTime);\n }\n }\n });\n }\n function delay(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n function withTimeout2(promise, ms) {\n return Promise.race([\n promise,\n new Promise((_2, reject) => setTimeout(() => reject(new Error(\"Timeout\")), ms))\n ]);\n }\n function getNewHeadsBlockNumber(event) {\n return fromHex3(event.number);\n }\n function getLogsBlockNumber(event) {\n return fromHex3(event.blockNumber);\n }\n function isResponse2(message) {\n return Array.isArray(message) || message.jsonrpc === \"2.0\" && message.id !== void 0;\n }\n function isSubscriptionEvent(message) {\n return !isResponse2(message);\n }\n function addToNewHeadsEventsBuffer(pastEvents, event) {\n addToPastEventsBuffer(pastEvents, event, getNewHeadsBlockNumber);\n }\n function addToLogsEventsBuffer(pastEvents, event) {\n addToPastEventsBuffer(pastEvents, event, getLogsBlockNumber);\n }\n function addToPastEventsBuffer(pastEvents, event, getBlockNumber2) {\n const currentBlockNumber = getBlockNumber2(event);\n const firstGoodIndex = pastEvents.findIndex((e2) => getBlockNumber2(e2) > currentBlockNumber - RETAINED_EVENT_BLOCK_COUNT);\n if (firstGoodIndex === -1) {\n pastEvents.length = 0;\n } else {\n pastEvents.splice(0, firstGoodIndex);\n }\n pastEvents.push(event);\n }\n var import_sturdy_websocket, import_bignumber, import_networks2, import_providers2, MAX_BACKFILL_BLOCKS, WebsocketBackfiller, CANCELLED, HEARTBEAT_INTERVAL, HEARTBEAT_WAIT_TIME, BACKFILL_TIMEOUT, BACKFILL_RETRIES, RETAINED_EVENT_BLOCK_COUNT, AlchemyWebSocketProvider, MIN_RETRY_DELAY, RETRY_BACKOFF_FACTOR, MAX_RETRY_DELAY;\n var init_alchemy_websocket_provider_bdfaf8f9 = __esm({\n \"../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/alchemy-websocket-provider-bdfaf8f9.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_index_f73a5f29();\n import_sturdy_websocket = __toESM(require_dist());\n import_bignumber = __toESM(require_lib3());\n import_networks2 = __toESM(require_lib27());\n import_providers2 = __toESM(require_lib29());\n init_alchemy_provider_6bbed8a2();\n MAX_BACKFILL_BLOCKS = 120;\n WebsocketBackfiller = class {\n constructor(provider) {\n this.provider = provider;\n this.maxBackfillBlocks = MAX_BACKFILL_BLOCKS;\n }\n /**\n * Runs backfill for `newHeads` events.\n *\n * @param isCancelled Whether the backfill request is cancelled.\n * @param previousHeads Previous head requests that were sent.\n * @param fromBlockNumber The block number to start backfilling from.\n * @returns A list of `newHeads` events that were sent since the last backfill.\n */\n getNewHeadsBackfill(isCancelled, previousHeads, fromBlockNumber) {\n return __awaiter$1(this, void 0, void 0, function* () {\n throwIfCancelled(isCancelled);\n const toBlockNumber = yield this.getBlockNumber();\n throwIfCancelled(isCancelled);\n if (previousHeads.length === 0) {\n return this.getHeadEventsInRange(Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1, toBlockNumber + 1);\n }\n const lastSeenBlockNumber = fromHex3(previousHeads[previousHeads.length - 1].number);\n const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1;\n if (lastSeenBlockNumber <= minBlockNumber) {\n return this.getHeadEventsInRange(minBlockNumber, toBlockNumber + 1);\n }\n const reorgHeads = yield this.getReorgHeads(isCancelled, previousHeads);\n throwIfCancelled(isCancelled);\n const intermediateHeads = yield this.getHeadEventsInRange(lastSeenBlockNumber + 1, toBlockNumber + 1);\n throwIfCancelled(isCancelled);\n return [...reorgHeads, ...intermediateHeads];\n });\n }\n /**\n * Runs backfill for `logs` events.\n *\n * @param isCancelled Whether the backfill request is cancelled.\n * @param filter The filter object that accompanies a logs subscription.\n * @param previousLogs Previous log requests that were sent.\n * @param fromBlockNumber The block number to start backfilling from.\n */\n getLogsBackfill(isCancelled, filter2, previousLogs, fromBlockNumber) {\n return __awaiter$1(this, void 0, void 0, function* () {\n throwIfCancelled(isCancelled);\n const toBlockNumber = yield this.getBlockNumber();\n throwIfCancelled(isCancelled);\n if (previousLogs.length === 0) {\n return this.getLogsInRange(filter2, Math.max(fromBlockNumber, toBlockNumber - this.maxBackfillBlocks) + 1, toBlockNumber + 1);\n }\n const lastSeenBlockNumber = fromHex3(previousLogs[previousLogs.length - 1].blockNumber);\n const minBlockNumber = toBlockNumber - this.maxBackfillBlocks + 1;\n if (lastSeenBlockNumber < minBlockNumber) {\n return this.getLogsInRange(filter2, minBlockNumber, toBlockNumber + 1);\n }\n const commonAncestor = yield this.getCommonAncestor(isCancelled, previousLogs);\n throwIfCancelled(isCancelled);\n const removedLogs = previousLogs.filter((log) => fromHex3(log.blockNumber) > commonAncestor.blockNumber).map((log) => Object.assign(Object.assign({}, log), { removed: true }));\n const fromBlockInclusive = commonAncestor.blockNumber === Number.NEGATIVE_INFINITY ? fromHex3(previousLogs[0].blockNumber) : commonAncestor.blockNumber;\n let addedLogs = yield this.getLogsInRange(filter2, fromBlockInclusive, toBlockNumber + 1);\n addedLogs = addedLogs.filter((log) => log && (fromHex3(log.blockNumber) > commonAncestor.blockNumber || fromHex3(log.logIndex) > commonAncestor.logIndex));\n throwIfCancelled(isCancelled);\n return [...removedLogs, ...addedLogs];\n });\n }\n /**\n * Sets a new max backfill blocks. VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n setMaxBackfillBlock(newMax) {\n this.maxBackfillBlocks = newMax;\n }\n /**\n * Gets the current block number as a number.\n *\n * @private\n */\n getBlockNumber() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const blockNumberHex = yield this.provider.send(\"eth_blockNumber\");\n return fromHex3(blockNumberHex);\n });\n }\n /**\n * Gets all `newHead` events in the provided range. Note that the returned\n * heads do not include re-orged heads. Use {@link getReorgHeads} to find heads\n * that were part of a re-org.\n *\n * @private\n */\n getHeadEventsInRange(fromBlockInclusive, toBlockExclusive) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (fromBlockInclusive >= toBlockExclusive) {\n return [];\n }\n const batchParts = [];\n for (let i3 = fromBlockInclusive; i3 < toBlockExclusive; i3++) {\n batchParts.push({\n method: \"eth_getBlockByNumber\",\n params: [toHex2(i3), false]\n });\n }\n const blockHeads = yield this.provider.sendBatch(batchParts);\n return blockHeads.map(toNewHeadsEvent);\n });\n }\n /**\n * Returns all heads that were part of a reorg event.\n *\n * @private\n */\n getReorgHeads(isCancelled, previousHeads) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const result = [];\n for (let i3 = previousHeads.length - 1; i3 >= 0; i3--) {\n const oldEvent = previousHeads[i3];\n const blockHead = yield this.getBlockByNumber(fromHex3(oldEvent.number));\n throwIfCancelled(isCancelled);\n if (oldEvent.hash === blockHead.hash) {\n break;\n }\n result.push(toNewHeadsEvent(blockHead));\n }\n return result.reverse();\n });\n }\n /**\n * Simple wrapper around `eth_getBlockByNumber` that returns the complete\n * block information for the provided block number.\n *\n * @private\n */\n getBlockByNumber(blockNumber) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return this.provider.send(\"eth_getBlockByNumber\", [\n toHex2(blockNumber),\n false\n ]);\n });\n }\n /**\n * Given a list of previous log events, finds the common block number from the\n * logs that matches the block head.\n *\n * This can be used to identify which logs are part of a re-org.\n *\n * Returns 1 less than the oldest log's block number if no common ancestor was found.\n *\n * @private\n */\n getCommonAncestor(isCancelled, previousLogs) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let blockHead = yield this.getBlockByNumber(fromHex3(previousLogs[previousLogs.length - 1].blockNumber));\n throwIfCancelled(isCancelled);\n for (let i3 = previousLogs.length - 1; i3 >= 0; i3--) {\n const oldLog = previousLogs[i3];\n if (oldLog.blockNumber !== blockHead.number) {\n blockHead = yield this.getBlockByNumber(fromHex3(oldLog.blockNumber));\n }\n if (oldLog.blockHash === blockHead.hash) {\n return {\n blockNumber: fromHex3(oldLog.blockNumber),\n logIndex: fromHex3(oldLog.logIndex)\n };\n }\n }\n return {\n blockNumber: Number.NEGATIVE_INFINITY,\n logIndex: Number.NEGATIVE_INFINITY\n };\n });\n }\n /**\n * Gets all `logs` events in the provided range. Note that the returned logs\n * do not include removed logs.\n *\n * @private\n */\n getLogsInRange(filter2, fromBlockInclusive, toBlockExclusive) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (fromBlockInclusive >= toBlockExclusive) {\n return [];\n }\n const rangeFilter = Object.assign(Object.assign({}, filter2), { fromBlock: toHex2(fromBlockInclusive), toBlock: toHex2(toBlockExclusive - 1) });\n return this.provider.send(\"eth_getLogs\", [rangeFilter]);\n });\n }\n };\n CANCELLED = new Error(\"Cancelled\");\n HEARTBEAT_INTERVAL = 3e4;\n HEARTBEAT_WAIT_TIME = 1e4;\n BACKFILL_TIMEOUT = 6e4;\n BACKFILL_RETRIES = 5;\n RETAINED_EVENT_BLOCK_COUNT = 10;\n AlchemyWebSocketProvider = class extends import_providers2.WebSocketProvider {\n /** @internal */\n constructor(config2, wsConstructor) {\n var _a2;\n const apiKey = AlchemyProvider.getApiKey(config2.apiKey);\n const alchemyNetwork = AlchemyProvider.getAlchemyNetwork(config2.network);\n const connection = AlchemyProvider.getAlchemyConnectionInfo(alchemyNetwork, apiKey, \"wss\");\n const protocol = `alchemy-sdk-${VERSION4}`;\n const ws = new import_sturdy_websocket.default((_a2 = config2.url) !== null && _a2 !== void 0 ? _a2 : connection.url, protocol, {\n wsConstructor: wsConstructor !== null && wsConstructor !== void 0 ? wsConstructor : getWebsocketConstructor()\n });\n const ethersNetwork = EthersNetwork[alchemyNetwork];\n super(ws, ethersNetwork !== null && ethersNetwork !== void 0 ? ethersNetwork : void 0);\n this._events = [];\n this.virtualSubscriptionsById = /* @__PURE__ */ new Map();\n this.virtualIdsByPhysicalId = /* @__PURE__ */ new Map();\n this.handleMessage = (event) => {\n const message = JSON.parse(event.data);\n if (!isSubscriptionEvent(message)) {\n return;\n }\n const physicalId = message.params.subscription;\n const virtualId = this.virtualIdsByPhysicalId.get(physicalId);\n if (!virtualId) {\n return;\n }\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (subscription.method !== \"eth_subscribe\") {\n return;\n }\n switch (subscription.params[0]) {\n case \"newHeads\": {\n const newHeadsSubscription = subscription;\n const newHeadsMessage = message;\n const { isBackfilling, backfillBuffer } = newHeadsSubscription;\n const { result } = newHeadsMessage.params;\n if (isBackfilling) {\n addToNewHeadsEventsBuffer(backfillBuffer, result);\n } else if (physicalId !== virtualId) {\n this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber);\n } else {\n this.rememberEvent(virtualId, result, getNewHeadsBlockNumber);\n }\n break;\n }\n case \"logs\": {\n const logsSubscription = subscription;\n const logsMessage = message;\n const { isBackfilling, backfillBuffer } = logsSubscription;\n const { result } = logsMessage.params;\n if (isBackfilling) {\n addToLogsEventsBuffer(backfillBuffer, result);\n } else if (virtualId !== physicalId) {\n this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber);\n } else {\n this.rememberEvent(virtualId, result, getLogsBlockNumber);\n }\n break;\n }\n default:\n if (physicalId !== virtualId) {\n const { result } = message.params;\n this.emitEvent(virtualId, result);\n }\n }\n };\n this.handleReopen = () => {\n this.virtualIdsByPhysicalId.clear();\n const { cancel, isCancelled } = makeCancelToken();\n this.cancelBackfill = cancel;\n for (const subscription of this.virtualSubscriptionsById.values()) {\n void (() => __awaiter$1(this, void 0, void 0, function* () {\n try {\n yield this.resubscribeAndBackfill(isCancelled, subscription);\n } catch (error) {\n if (!isCancelled()) {\n console.error(`Error while backfilling \"${subscription.params[0]}\" subscription. Some events may be missing.`, error);\n }\n }\n }))();\n }\n this.startHeartbeat();\n };\n this.stopHeartbeatAndBackfill = () => {\n if (this.heartbeatIntervalId != null) {\n clearInterval(this.heartbeatIntervalId);\n this.heartbeatIntervalId = void 0;\n }\n this.cancelBackfill();\n };\n this.apiKey = apiKey;\n this.backfiller = new WebsocketBackfiller(this);\n this.addSocketListeners();\n this.startHeartbeat();\n this.cancelBackfill = noop3;\n }\n /**\n * Overrides the `BaseProvider.getNetwork` method as implemented by ethers.js.\n *\n * This override allows the SDK to set the provider's network to values not\n * yet supported by ethers.js.\n *\n * @internal\n * @override\n */\n static getNetwork(network) {\n if (typeof network === \"string\" && network in CustomNetworks) {\n return CustomNetworks[network];\n }\n return (0, import_networks2.getNetwork)(network);\n }\n /**\n * Overridden implementation of ethers that includes Alchemy based subscriptions.\n *\n * @param eventName Event to subscribe to\n * @param listener The listener function to call when the event is triggered.\n * @override\n * @public\n */\n // TODO: Override `Listener` type to get type autocompletions.\n on(eventName, listener) {\n return this._addEventListener(eventName, listener, false);\n }\n /**\n * Overridden implementation of ethers that includes Alchemy based\n * subscriptions. Adds a listener to the triggered for only the next\n * {@link eventName} event, after which it will be removed.\n *\n * @param eventName Event to subscribe to\n * @param listener The listener function to call when the event is triggered.\n * @override\n * @public\n */\n // TODO: Override `Listener` type to get type autocompletions.\n once(eventName, listener) {\n return this._addEventListener(eventName, listener, true);\n }\n /**\n * Removes the provided {@link listener} for the {@link eventName} event. If no\n * listener is provided, all listeners for the event will be removed.\n *\n * @param eventName Event to unlisten to.\n * @param listener The listener function to remove.\n * @override\n * @public\n */\n off(eventName, listener) {\n if (isAlchemyEvent(eventName)) {\n return this._off(eventName, listener);\n } else {\n return super.off(eventName, listener);\n }\n }\n /**\n * Remove all listeners for the provided {@link eventName} event. If no event\n * is provided, all events and their listeners are removed.\n *\n * @param eventName The event to remove all listeners for.\n * @override\n * @public\n */\n removeAllListeners(eventName) {\n if (eventName !== void 0 && isAlchemyEvent(eventName)) {\n return this._removeAllListeners(eventName);\n } else {\n return super.removeAllListeners(eventName);\n }\n }\n /**\n * Returns the number of listeners for the provided {@link eventName} event. If\n * no event is provided, the total number of listeners for all events is returned.\n *\n * @param eventName The event to get the number of listeners for.\n * @public\n * @override\n */\n listenerCount(eventName) {\n if (eventName !== void 0 && isAlchemyEvent(eventName)) {\n return this._listenerCount(eventName);\n } else {\n return super.listenerCount(eventName);\n }\n }\n /**\n * Returns an array of listeners for the provided {@link eventName} event. If\n * no event is provided, all listeners will be included.\n *\n * @param eventName The event to get the listeners for.\n * @public\n * @override\n */\n listeners(eventName) {\n if (eventName !== void 0 && isAlchemyEvent(eventName)) {\n return this._listeners(eventName);\n } else {\n return super.listeners(eventName);\n }\n }\n /**\n * Overrides the method in `BaseProvider` in order to properly format the\n * Alchemy subscription events.\n *\n * @internal\n * @override\n */\n _addEventListener(eventName, listener, once2) {\n if (isAlchemyEvent(eventName)) {\n verifyAlchemyEventName(eventName);\n const event = new EthersEvent(getAlchemyEventTag(eventName), listener, once2);\n this._events.push(event);\n this._startEvent(event);\n return this;\n } else {\n return super._addEventListener(eventName, listener, once2);\n }\n }\n /**\n * Overrides the `_startEvent()` method in ethers.js's\n * {@link WebSocketProvider} to include additional alchemy methods.\n *\n * @param event\n * @override\n * @internal\n */\n _startEvent(event) {\n const customLogicTypes = [...ALCHEMY_EVENT_TYPES, \"block\", \"filter\"];\n if (customLogicTypes.includes(event.type)) {\n this.customStartEvent(event);\n } else {\n super._startEvent(event);\n }\n }\n /**\n * Overridden from ethers.js's {@link WebSocketProvider}\n *\n * Modified in order to add mappings for backfilling.\n *\n * @internal\n * @override\n */\n _subscribe(tag, param, processFunc, event) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let subIdPromise = this._subIds[tag];\n const startingBlockNumber = yield this.getBlockNumber();\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then((param2) => {\n return this.send(\"eth_subscribe\", param2);\n });\n this._subIds[tag] = subIdPromise;\n }\n const subId = yield subIdPromise;\n const resolvedParams = yield Promise.all(param);\n this.virtualSubscriptionsById.set(subId, {\n event,\n method: \"eth_subscribe\",\n params: resolvedParams,\n startingBlockNumber,\n virtualId: subId,\n physicalId: subId,\n sentEvents: [],\n isBackfilling: false,\n backfillBuffer: []\n });\n this.virtualIdsByPhysicalId.set(subId, subId);\n this._subs[subId] = { tag, processFunc };\n });\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @internal\n * @override\n */\n emit(eventName, ...args) {\n if (isAlchemyEvent(eventName)) {\n let result = false;\n const stopped = [];\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) {\n return true;\n }\n setTimeout(() => {\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((event) => {\n this._stopEvent(event);\n });\n return result;\n } else {\n return super.emit(eventName, ...args);\n }\n }\n /** @internal */\n sendBatch(parts) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let nextId = 0;\n const payload = parts.map(({ method, params }) => {\n return {\n method,\n params,\n jsonrpc: \"2.0\",\n id: `alchemy-sdk:${nextId++}`\n };\n });\n return this.sendBatchConcurrently(payload);\n });\n }\n /** @override */\n destroy() {\n this.removeSocketListeners();\n this.stopHeartbeatAndBackfill();\n return super.destroy();\n }\n /**\n * Overrides the ether's `isCommunityResource()` method. Returns true if the\n * current api key is the default key.\n *\n * @override\n */\n isCommunityResource() {\n return this.apiKey === DEFAULT_ALCHEMY_API_KEY;\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `WebSocketProvider._stopEvent()`.\n *\n * This method is copied over directly in order to support Alchemy's\n * subscription type by allowing the provider to properly stop Alchemy's\n * subscription events.\n *\n * @internal\n */\n _stopEvent(event) {\n let tag = event.tag;\n if (ALCHEMY_EVENT_TYPES.includes(event.type)) {\n if (this._events.filter((e2) => ALCHEMY_EVENT_TYPES.includes(e2.type)).length) {\n return;\n }\n } else if (event.type === \"tx\") {\n if (this._events.filter((e2) => e2.type === \"tx\").length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n return;\n }\n const subId = this._subIds[tag];\n if (!subId) {\n return;\n }\n delete this._subIds[tag];\n void subId.then((subId2) => {\n if (!this._subs[subId2]) {\n return;\n }\n delete this._subs[subId2];\n void this.send(\"eth_unsubscribe\", [subId2]);\n });\n }\n /** @internal */\n addSocketListeners() {\n this._websocket.addEventListener(\"message\", this.handleMessage);\n this._websocket.addEventListener(\"reopen\", this.handleReopen);\n this._websocket.addEventListener(\"down\", this.stopHeartbeatAndBackfill);\n }\n /** @internal */\n removeSocketListeners() {\n this._websocket.removeEventListener(\"message\", this.handleMessage);\n this._websocket.removeEventListener(\"reopen\", this.handleReopen);\n this._websocket.removeEventListener(\"down\", this.stopHeartbeatAndBackfill);\n }\n /**\n * Reopens the backfill based on\n *\n * @param isCancelled\n * @param subscription\n * @internal\n */\n resubscribeAndBackfill(isCancelled, subscription) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const { virtualId, method, params, sentEvents, backfillBuffer, startingBlockNumber } = subscription;\n subscription.isBackfilling = true;\n backfillBuffer.length = 0;\n try {\n const physicalId = yield this.send(method, params);\n throwIfCancelled(isCancelled);\n subscription.physicalId = physicalId;\n this.virtualIdsByPhysicalId.set(physicalId, virtualId);\n switch (params[0]) {\n case \"newHeads\": {\n const backfillEvents = yield withBackoffRetries(() => withTimeout2(this.backfiller.getNewHeadsBackfill(isCancelled, sentEvents, startingBlockNumber), BACKFILL_TIMEOUT), BACKFILL_RETRIES, () => !isCancelled());\n throwIfCancelled(isCancelled);\n const events = dedupeNewHeads([...backfillEvents, ...backfillBuffer]);\n events.forEach((event) => this.emitNewHeadsEvent(virtualId, event));\n break;\n }\n case \"logs\": {\n const filter2 = params[1] || {};\n const backfillEvents = yield withBackoffRetries(() => withTimeout2(this.backfiller.getLogsBackfill(isCancelled, filter2, sentEvents, startingBlockNumber), BACKFILL_TIMEOUT), BACKFILL_RETRIES, () => !isCancelled());\n throwIfCancelled(isCancelled);\n const events = dedupeLogs([...backfillEvents, ...backfillBuffer]);\n events.forEach((event) => this.emitLogsEvent(virtualId, event));\n break;\n }\n default:\n break;\n }\n } finally {\n subscription.isBackfilling = false;\n backfillBuffer.length = 0;\n }\n });\n }\n /** @internal */\n emitNewHeadsEvent(virtualId, result) {\n this.emitAndRememberEvent(virtualId, result, getNewHeadsBlockNumber);\n }\n /** @internal */\n emitLogsEvent(virtualId, result) {\n this.emitAndRememberEvent(virtualId, result, getLogsBlockNumber);\n }\n /**\n * Emits an event to consumers, but also remembers it in its subscriptions's\n * `sentEvents` buffer so that we can detect re-orgs if the connection drops\n * and needs to be reconnected.\n *\n * @internal\n */\n emitAndRememberEvent(virtualId, result, getBlockNumber2) {\n this.rememberEvent(virtualId, result, getBlockNumber2);\n this.emitEvent(virtualId, result);\n }\n emitEvent(virtualId, result) {\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (!subscription) {\n return;\n }\n this.emitGenericEvent(subscription, result);\n }\n /** @internal */\n rememberEvent(virtualId, result, getBlockNumber2) {\n const subscription = this.virtualSubscriptionsById.get(virtualId);\n if (!subscription) {\n return;\n }\n addToPastEventsBuffer(subscription.sentEvents, Object.assign({}, result), getBlockNumber2);\n }\n /** @internal */\n emitGenericEvent(subscription, result) {\n const emitFunction = this.emitProcessFn(subscription.event);\n emitFunction(result);\n }\n /**\n * Starts a heartbeat that pings the websocket server periodically to ensure\n * that the connection stays open.\n *\n * @internal\n */\n startHeartbeat() {\n if (this.heartbeatIntervalId != null) {\n return;\n }\n this.heartbeatIntervalId = setInterval(() => __awaiter$1(this, void 0, void 0, function* () {\n try {\n yield withTimeout2(this.send(\"net_version\"), HEARTBEAT_WAIT_TIME);\n } catch (_a2) {\n this._websocket.reconnect();\n }\n }), HEARTBEAT_INTERVAL);\n }\n /**\n * This method sends the batch concurrently as individual requests rather than\n * as a batch, which was the original implementation. The original batch logic\n * is preserved in this implementation in order for faster porting.\n *\n * @param payload\n * @internal\n */\n // TODO(cleanup): Refactor and remove usages of `sendBatch()`.\n // TODO(errors): Use allSettled() once we have more error handling.\n sendBatchConcurrently(payload) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return Promise.all(payload.map((req) => this.send(req.method, req.params)));\n });\n }\n /** @internal */\n customStartEvent(event) {\n if (event.type === ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n const { fromAddress, toAddress, hashesOnly } = event;\n void this._subscribe(event.tag, [\n AlchemySubscription.PENDING_TRANSACTIONS,\n { fromAddress, toAddress, hashesOnly }\n ], this.emitProcessFn(event), event);\n } else if (event.type === ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n const { addresses: addresses4, includeRemoved, hashesOnly } = event;\n void this._subscribe(event.tag, [\n AlchemySubscription.MINED_TRANSACTIONS,\n { addresses: addresses4, includeRemoved, hashesOnly }\n ], this.emitProcessFn(event), event);\n } else if (event.type === \"block\") {\n void this._subscribe(\"block\", [\"newHeads\"], this.emitProcessFn(event), event);\n } else if (event.type === \"filter\") {\n void this._subscribe(event.tag, [\"logs\", this._getFilter(event.filter)], this.emitProcessFn(event), event);\n }\n }\n /** @internal */\n emitProcessFn(event) {\n switch (event.type) {\n case ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE:\n return (result) => this.emit({\n method: AlchemySubscription.PENDING_TRANSACTIONS,\n fromAddress: event.fromAddress,\n toAddress: event.toAddress,\n hashesOnly: event.hashesOnly\n }, result);\n case ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE:\n return (result) => this.emit({\n method: AlchemySubscription.MINED_TRANSACTIONS,\n addresses: event.addresses,\n includeRemoved: event.includeRemoved,\n hashesOnly: event.hashesOnly\n }, result);\n case \"block\":\n return (result) => {\n const blockNumber = import_bignumber.BigNumber.from(result.number).toNumber();\n this._emitted.block = blockNumber;\n this.emit(\"block\", blockNumber);\n };\n case \"filter\":\n return (result) => {\n if (result.removed == null) {\n result.removed = false;\n }\n this.emit(event.filter, this.formatter.filterLog(result));\n };\n default:\n throw new Error(\"Invalid event type to `emitProcessFn()`\");\n }\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.off()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n _off(eventName, listener) {\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n const stopped = [];\n let found = false;\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter((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((event) => {\n this._stopEvent(event);\n });\n return this;\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.removeAllListeners()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n _removeAllListeners(eventName) {\n let stopped = [];\n if (eventName == null) {\n stopped = this._events;\n this._events = [];\n } else {\n const eventTag = getAlchemyEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n stopped.forEach((event) => {\n this._stopEvent(event);\n });\n return this;\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.listenerCount()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n _listenerCount(eventName) {\n if (!eventName) {\n return this._events.length;\n }\n const eventTag = getAlchemyEventTag(eventName);\n return this._events.filter((event) => {\n return event.tag === eventTag;\n }).length;\n }\n /**\n * DO NOT MODIFY.\n *\n * Original code copied over from ether.js's `BaseProvider.listeners()`.\n *\n * This method is copied over directly in order to implement Alchemy's unique\n * subscription types. The only difference is that this method calls\n * {@link getAlchemyEventTag} instead of the original `getEventTag()` method in\n * order to parse the Alchemy subscription event.\n *\n * @private\n */\n _listeners(eventName) {\n if (eventName == null) {\n return this._events.map((event) => event.listener);\n }\n const eventTag = getAlchemyEventTag(eventName);\n return this._events.filter((event) => event.tag === eventTag).map((event) => event.listener);\n }\n };\n MIN_RETRY_DELAY = 1e3;\n RETRY_BACKOFF_FACTOR = 2;\n MAX_RETRY_DELAY = 3e4;\n }\n });\n\n // ../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/index-f73a5f29.js\n function __awaiter$1(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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 __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 __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 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function verb(n2) {\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 }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e2) {\n settle2(q3[0][3], e2);\n }\n }\n function step(r2) {\n r2.value instanceof __await2 ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle2(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 settle2(f6, v2) {\n if (f6(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\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), settle2(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle2(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v3) {\n resolve({ value: v3, done: d5 });\n }, reject);\n }\n }\n function getAlchemyHttpUrl(network, apiKey) {\n return `https://${network}.g.alchemy.com/v2/${apiKey}`;\n }\n function getAlchemyNftHttpUrl(network, apiKey) {\n return `https://${network}.g.alchemy.com/nft/v3/${apiKey}`;\n }\n function getAlchemyWsUrl(network, apiKey) {\n return `wss://${network}.g.alchemy.com/v2/${apiKey}`;\n }\n function getAlchemyWebhookHttpUrl() {\n return \"https://dashboard.alchemy.com/api\";\n }\n function getPricesBaseUrl(apiKey) {\n return `https://api.g.alchemy.com/prices/v1/${apiKey}`;\n }\n function getDataBaseUrl(apiKey) {\n return `https://api.g.alchemy.com/data/v1/${apiKey}`;\n }\n function noop3() {\n }\n function _checkNormalize2() {\n try {\n const missing = [];\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form2) => {\n try {\n if (\"test\".normalize(form2) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n } catch (error) {\n missing.push(form2);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.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 function defineReadOnly(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value,\n writable: false\n });\n }\n function resolveProperties2(object) {\n return __awaiter2(this, void 0, void 0, function* () {\n const promises = Object.keys(object).map((key) => {\n const value = object[key];\n return Promise.resolve(value).then((v2) => ({ key, value: v2 }));\n });\n const results = yield Promise.all(promises);\n return results.reduce((accum, result) => {\n accum[result.key] = result.value;\n return accum;\n }, {});\n });\n }\n function _isFrozen(object) {\n if (object === void 0 || object === null || opaque[typeof object]) {\n return true;\n }\n if (Array.isArray(object) || typeof object === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n const keys = Object.keys(object);\n for (let i3 = 0; i3 < keys.length; i3++) {\n let value = null;\n try {\n value = object[keys[i3]];\n } catch (error) {\n continue;\n }\n if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger2.throwArgumentError(`Cannot deepCopy ${typeof object}`, \"object\", object);\n }\n function _deepCopy(object) {\n if (_isFrozen(object)) {\n return object;\n }\n if (Array.isArray(object)) {\n return Object.freeze(object.map((item) => deepCopy(item)));\n }\n if (typeof object === \"object\") {\n const result = {};\n for (const key in object) {\n const value = object[key];\n if (value === void 0) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger2.throwArgumentError(`Cannot deepCopy ${typeof object}`, \"object\", object);\n }\n function deepCopy(object) {\n return _deepCopy(object);\n }\n function fromHex3(hexString) {\n return import_bignumber2.BigNumber.from(hexString).toNumber();\n }\n function toHex2(num2) {\n return (0, import_bytes5.hexValue)(num2);\n }\n function formatBlock2(block) {\n if (typeof block === \"string\") {\n return block;\n } else if (Number.isInteger(block)) {\n return toHex2(block);\n }\n return block.toString();\n }\n function stringToEnum(x4, enumb) {\n return Object.values(enumb).includes(x4) ? x4 : null;\n }\n function getNftContractForNftFromRaw(rawNftContract) {\n return nullsToUndefined(Object.assign(Object.assign({}, getNftContractFromRaw(rawNftContract)), { spamClassifications: rawNftContract.spamClassifications.map(parseNftSpamClassification) }));\n }\n function getNftContractsForOwnerFromRaw(rawNftContract) {\n return nullsToUndefined(Object.assign(Object.assign({}, getNftContractFromRaw(rawNftContract)), { displayNft: rawNftContract.displayNft, image: rawNftContract.image, totalBalance: rawNftContract.totalBalance, numDistinctTokensOwned: rawNftContract.numDistinctTokensOwned, isSpam: rawNftContract.isSpam }));\n }\n function getNftContractFromRaw(rawNftContract) {\n var _a2;\n return nullsToUndefined(Object.assign(Object.assign({}, rawNftContract), { tokenType: parseNftTokenType(rawNftContract.tokenType), openSeaMetadata: Object.assign(Object.assign({}, rawNftContract.openSeaMetadata), { safelistRequestStatus: ((_a2 = rawNftContract.openSeaMetadata) === null || _a2 === void 0 ? void 0 : _a2.safelistRequestStatus) ? stringToEnum(rawNftContract.openSeaMetadata.safelistRequestStatus, OpenSeaSafelistRequestStatus) : null }) }));\n }\n function getNftCollectionFromRaw(rawNftCollection) {\n return nullsToUndefined(Object.assign(Object.assign({}, rawNftCollection), { floorPrice: Object.assign(Object.assign({}, rawNftCollection.floorPrice), { marketplace: parseNftCollectionMarketplace(rawNftCollection.floorPrice.marketplace) }) }));\n }\n function getBaseNftFromRaw(rawBaseNft, contractAddress) {\n return {\n contractAddress: contractAddress ? contractAddress : rawBaseNft.contractAddress,\n tokenId: rawBaseNft.tokenId\n };\n }\n function getNftFromRaw(rawNft) {\n return nullsToUndefined(Object.assign(Object.assign({}, rawNft), { contract: getNftContractForNftFromRaw(rawNft.contract), tokenType: parseNftTokenType(rawNft.tokenType), acquiredAt: rawNft.acquiredAt, collection: rawNft.collection, mint: rawNft.mint }));\n }\n function getNftSalesFromRaw(rawNftSales) {\n return nullsToUndefined({\n nftSales: rawNftSales.nftSales.map((rawNftSale) => Object.assign(Object.assign({}, rawNftSale), { marketplace: parseNftSaleMarketplace(rawNftSale.marketplace), taker: parseNftTaker(rawNftSale.taker) })),\n validAt: rawNftSales.validAt,\n pageKey: rawNftSales.pageKey\n });\n }\n function parseNftSaleMarketplace(marketplace) {\n switch (marketplace) {\n case \"looksrare\":\n return NftSaleMarketplace.LOOKSRARE;\n case \"seaport\":\n return NftSaleMarketplace.SEAPORT;\n case \"x2y2\":\n return NftSaleMarketplace.X2Y2;\n case \"wyvern\":\n return NftSaleMarketplace.WYVERN;\n case \"cryptopunks\":\n return NftSaleMarketplace.CRYPTOPUNKS;\n case \"blur\":\n return NftSaleMarketplace.BLUR;\n default:\n return NftSaleMarketplace.UNKNOWN;\n }\n }\n function parseNftCollectionMarketplace(marketplace) {\n switch (marketplace) {\n case \"OpenSea\":\n return NftCollectionMarketplace.OPENSEA;\n default:\n return void 0;\n }\n }\n function parseNftTaker(taker) {\n switch (taker.toLowerCase()) {\n case \"buyer\":\n return NftSaleTakerType.BUYER;\n case \"seller\":\n return NftSaleTakerType.SELLER;\n default:\n throw new Error(`Unsupported NftSaleTakerType ${taker}`);\n }\n }\n function parseNftSpamClassification(s4) {\n const res = stringToEnum(s4, NftSpamClassification);\n if (res == null) {\n return NftSpamClassification.Unknown;\n }\n return res;\n }\n function parseNftTokenType(tokenType) {\n switch (tokenType) {\n case \"erc721\":\n case \"ERC721\":\n return NftTokenType.ERC721;\n case \"erc1155\":\n case \"ERC1155\":\n return NftTokenType.ERC1155;\n case \"no_supported_nft_standard\":\n case \"NO_SUPPORTED_NFT_STANDARD\":\n return NftTokenType.NO_SUPPORTED_NFT_STANDARD;\n case \"not_a_contract\":\n case \"NOT_A_CONTRACT\":\n return NftTokenType.NOT_A_CONTRACT;\n default:\n return NftTokenType.UNKNOWN;\n }\n }\n function nullsToUndefined(obj) {\n if (obj === null || obj === void 0) {\n return void 0;\n }\n if (obj.constructor.name === \"Object\" || Array.isArray(obj)) {\n for (const key in obj) {\n obj[key] = nullsToUndefined(obj[key]);\n }\n }\n return obj;\n }\n function getAssetTransfers(config2, params, srcMethod = \"getAssetTransfers\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n if (params.fromAddress) {\n params.fromAddress = yield provider._getAddress(params.fromAddress);\n }\n if (params.toAddress) {\n params.toAddress = yield provider._getAddress(params.toAddress);\n }\n return provider._send(\"alchemy_getAssetTransfers\", [\n Object.assign(Object.assign({}, params), { fromBlock: params.fromBlock != null ? formatBlock2(params.fromBlock) : void 0, toBlock: params.toBlock != null ? formatBlock2(params.toBlock) : void 0, maxCount: params.maxCount != null ? toHex2(params.maxCount) : void 0 })\n ], srcMethod);\n });\n }\n function getTransactionReceipts(config2, params, srcMethod = \"getTransactionReceipts\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n return provider._send(\"alchemy_getTransactionReceipts\", [params], srcMethod);\n });\n }\n function getLogs2(config2, filter2) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n yield provider.getNetwork();\n const params = yield resolveProperties2({\n filter: getFilter(config2, filter2)\n });\n const logs = yield provider.send(\"eth_getLogs\", [params.filter]);\n logs.forEach((log) => {\n if (log.removed == null) {\n log.removed = false;\n }\n });\n return arrayOf(provider.formatter.filterLog.bind(provider.formatter))(logs);\n });\n }\n function getFilter(config2, filter2) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n const resolvedFilter = yield filter2;\n let result = {};\n [\"blockHash\", \"topics\"].forEach((key) => {\n if (resolvedFilter[key] == null) {\n return;\n }\n result[key] = resolvedFilter[key];\n });\n [\"fromBlock\", \"toBlock\"].forEach((key) => {\n if (resolvedFilter[key] == null) {\n return;\n }\n result[key] = provider._getBlockTag(resolvedFilter[key]);\n });\n result = provider.formatter.filter(yield resolveProperties2(result));\n if (Array.isArray(resolvedFilter.address)) {\n result.address = yield Promise.all(resolvedFilter.address.map((address) => __awaiter$1(this, void 0, void 0, function* () {\n return provider._getAddress(address);\n })));\n } else if (resolvedFilter.address != null) {\n result.address = yield provider._getAddress(resolvedFilter.address);\n }\n return result;\n });\n }\n function arrayOf(format) {\n return function(array) {\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n const result = [];\n array.forEach((value) => {\n result.push(format(value));\n });\n return result;\n };\n }\n function binarySearchFirstBlock(start, end, address, config2) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (start >= end) {\n return end;\n }\n const mid = Math.floor((start + end) / 2);\n const provider = yield config2.getProvider();\n const code = yield provider.getCode(address, mid);\n if (code === ETH_NULL_VALUE) {\n return binarySearchFirstBlock(mid + 1, end, address, config2);\n }\n return binarySearchFirstBlock(start, mid, address, config2);\n });\n }\n function parseTracerParams(tracer, timeout) {\n return Object.assign({ tracer: tracer.type }, tracer.onlyTopCall !== void 0 && {\n tracerConfig: {\n onlyTopCall: tracer.onlyTopCall,\n timeout\n }\n });\n }\n function sanitizeTokenType(tokenType) {\n if (tokenType === NftTokenType.ERC1155 || tokenType === NftTokenType.ERC721) {\n return tokenType;\n }\n return void 0;\n }\n function logDebug(message, ...args) {\n loggerClient.debug(message, args);\n }\n function logInfo(message, ...args) {\n loggerClient.info(message, args);\n }\n function logWarn(message, ...args) {\n loggerClient.warn(message, args);\n }\n function stringify3(obj) {\n if (typeof obj === \"string\") {\n return obj;\n } else {\n try {\n return JSON.stringify(obj);\n } catch (e2) {\n return obj;\n }\n }\n }\n function sendAxiosRequest(baseUrl, restApiName, methodName, params, overrides) {\n var _a2;\n const requestUrl = baseUrl + \"/\" + restApiName;\n const config2 = Object.assign(Object.assign({}, overrides), { headers: Object.assign(Object.assign(Object.assign({}, overrides === null || overrides === void 0 ? void 0 : overrides.headers), !IS_BROWSER && { \"Accept-Encoding\": \"gzip\" }), { \"Alchemy-Ethers-Sdk-Version\": VERSION4, \"Alchemy-Ethers-Sdk-Method\": methodName }), method: (_a2 = overrides === null || overrides === void 0 ? void 0 : overrides.method) !== null && _a2 !== void 0 ? _a2 : \"GET\", url: requestUrl, params });\n return axios_default(config2);\n }\n function requestHttpWithBackoff(config2, apiType, restApiName, methodName, params, overrides) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let lastError = void 0;\n const backoff2 = new ExponentialBackoff(config2.maxRetries);\n for (let attempt2 = 0; attempt2 < config2.maxRetries + 1; attempt2++) {\n try {\n if (lastError !== void 0) {\n logInfo(\"requestHttp\", `Retrying after error: ${lastError.message}`);\n }\n try {\n yield backoff2.backoff();\n } catch (err) {\n break;\n }\n const response = yield sendAxiosRequest(config2._getRequestUrl(apiType), restApiName, methodName, params, Object.assign(Object.assign({}, overrides), { timeout: config2.requestTimeout }));\n if (response.status === 200) {\n logDebug(restApiName, `Successful request: ${restApiName}`);\n return response.data;\n } else {\n logInfo(restApiName, `Request failed: ${restApiName}, ${response.status}, ${response.data}`);\n lastError = new Error(response.status + \": \" + response.data);\n }\n } catch (err) {\n if (!axios_default.isAxiosError(err) || err.response === void 0) {\n throw err;\n }\n lastError = new Error(err.response.status + \": \" + JSON.stringify(err.response.data));\n if (!isRetryableHttpError(err, apiType)) {\n break;\n }\n }\n }\n return Promise.reject(lastError);\n });\n }\n function isRetryableHttpError(err, apiType) {\n const retryableCodes = apiType === AlchemyApiType.WEBHOOK ? [429, 500] : [429];\n return err.response !== void 0 && retryableCodes.includes(err.response.status);\n }\n function paginateEndpoint(config2, apiType, restApiName, methodName, reqPageKey, resPageKey, params) {\n return __asyncGenerator2(this, arguments, function* paginateEndpoint_1() {\n let hasNext = true;\n const requestParams = Object.assign({}, params);\n while (hasNext) {\n const response = yield __await2(requestHttpWithBackoff(config2, apiType, restApiName, methodName, requestParams));\n yield yield __await2(response);\n if (response[resPageKey] !== null) {\n requestParams[reqPageKey] = response[resPageKey];\n } else {\n hasNext = false;\n }\n }\n });\n }\n function getNftMetadata(config2, contractAddress, tokenId, options, srcMethod = \"getNftMetadata\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTMetadata\", srcMethod, {\n contractAddress,\n tokenId: import_bignumber2.BigNumber.from(tokenId).toString(),\n tokenType: sanitizeTokenType(options === null || options === void 0 ? void 0 : options.tokenType),\n tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs,\n refreshCache: options === null || options === void 0 ? void 0 : options.refreshCache\n });\n return getNftFromRaw(response);\n });\n }\n function getNftMetadataBatch(config2, tokens, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n tokens,\n tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs,\n refreshCache: options === null || options === void 0 ? void 0 : options.refreshCache\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTMetadataBatch\", \"getNftMetadataBatch\", {}, {\n method: \"POST\",\n data\n });\n return {\n nfts: response.nfts.map((nft) => getNftFromRaw(nft))\n };\n });\n }\n function getContractMetadata(config2, contractAddress, srcMethod = \"getContractMetadata\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getContractMetadata\", srcMethod, {\n contractAddress\n });\n return getNftContractFromRaw(response);\n });\n }\n function getContractMetadataBatch(config2, contractAddresses) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getContractMetadataBatch\", \"getContractMetadataBatch\", {}, {\n method: \"POST\",\n data: { contractAddresses }\n });\n return {\n contracts: response.contracts.map(getNftContractFromRaw)\n };\n });\n }\n function getCollectionMetadata(config2, collectionSlug, srcMethod = \"getCollectionMetadata\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getCollectionMetadata\", srcMethod, {\n collectionSlug\n });\n return getNftCollectionFromRaw(response);\n });\n }\n function getNftsForOwnerIterator(config2, owner, options, srcMethod = \"getNftsForOwnerIterator\") {\n return __asyncGenerator2(this, arguments, function* getNftsForOwnerIterator_1() {\n var e_1, _a2;\n const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata);\n try {\n for (var _b2 = __asyncValues2(paginateEndpoint(config2, AlchemyApiType.NFT, \"getNFTsForOwner\", srcMethod, \"pageKey\", \"pageKey\", {\n contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey,\n excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters,\n includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters,\n owner,\n withMetadata,\n tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs,\n orderBy: options === null || options === void 0 ? void 0 : options.orderBy\n })), _c; _c = yield __await2(_b2.next()), !_c.done; ) {\n const response = _c.value;\n for (const ownedNft of response.ownedNfts) {\n yield yield __await2(Object.assign(Object.assign({}, nftFromGetNftResponse(ownedNft)), { balance: ownedNft.balance }));\n }\n }\n } catch (e_1_1) {\n e_1 = { error: e_1_1 };\n } finally {\n try {\n if (_c && !_c.done && (_a2 = _b2.return))\n yield __await2(_a2.call(_b2));\n } finally {\n if (e_1)\n throw e_1.error;\n }\n }\n });\n }\n function getNftsForOwner(config2, owner, options, srcMethod = \"getNftsForOwner\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata);\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTsForOwner\", srcMethod, {\n contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey,\n excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters,\n includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters,\n owner,\n pageSize: options === null || options === void 0 ? void 0 : options.pageSize,\n withMetadata,\n tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs,\n orderBy: options === null || options === void 0 ? void 0 : options.orderBy\n });\n if (withMetadata) {\n return nullsToUndefined({\n ownedNfts: response.ownedNfts.map((res) => Object.assign(Object.assign({}, getNftFromRaw(res)), { balance: res.balance })),\n pageKey: response.pageKey,\n totalCount: response.totalCount,\n validAt: response.validAt\n });\n }\n return nullsToUndefined({\n ownedNfts: response.ownedNfts.map((res) => Object.assign(Object.assign({}, getBaseNftFromRaw(res)), { balance: res.balance })),\n pageKey: response.pageKey,\n totalCount: response.totalCount,\n validAt: response.validAt\n });\n });\n }\n function getNftsForContract(config2, contractAddress, options, srcMethod = \"getNftsForContract\") {\n var _a2;\n return __awaiter$1(this, void 0, void 0, function* () {\n const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata);\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTsForContract\", srcMethod, {\n contractAddress,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey,\n withMetadata,\n limit: (_a2 = options === null || options === void 0 ? void 0 : options.pageSize) !== null && _a2 !== void 0 ? _a2 : void 0,\n tokenUriTimeoutInMs: options === null || options === void 0 ? void 0 : options.tokenUriTimeoutInMs\n });\n if (withMetadata) {\n return nullsToUndefined({\n nfts: response.nfts.map((res) => getNftFromRaw(res)),\n pageKey: response.pageKey\n });\n }\n return nullsToUndefined({\n nfts: response.nfts.map((res) => getBaseNftFromRaw(res, contractAddress)),\n pageKey: response.pageKey\n });\n });\n }\n function getNftsForContractIterator(config2, contractAddress, options, srcMethod = \"getNftsForContractIterator\") {\n return __asyncGenerator2(this, arguments, function* getNftsForContractIterator_1() {\n var e_2, _a2;\n const withMetadata = omitMetadataToWithMetadata(options === null || options === void 0 ? void 0 : options.omitMetadata);\n try {\n for (var _b2 = __asyncValues2(paginateEndpoint(config2, AlchemyApiType.NFT, \"getNFTsForContract\", srcMethod, \"pageKey\", \"pageKey\", {\n contractAddress,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey,\n withMetadata\n })), _c; _c = yield __await2(_b2.next()), !_c.done; ) {\n const response = _c.value;\n for (const nft of response.nfts) {\n yield yield __await2(nftFromGetNftContractResponse(nft, contractAddress));\n }\n }\n } catch (e_2_1) {\n e_2 = { error: e_2_1 };\n } finally {\n try {\n if (_c && !_c.done && (_a2 = _b2.return))\n yield __await2(_a2.call(_b2));\n } finally {\n if (e_2)\n throw e_2.error;\n }\n }\n });\n }\n function getOwnersForContract(config2, contractAddress, options, srcMethod = \"getOwnersForContract\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getOwnersForContract\", srcMethod, Object.assign(Object.assign({}, options), { contractAddress }));\n if (options === null || options === void 0 ? void 0 : options.withTokenBalances) {\n return nullsToUndefined({\n owners: response.owners,\n pageKey: response.pageKey\n });\n }\n return nullsToUndefined({\n owners: response.owners,\n pageKey: response.pageKey\n });\n });\n }\n function getContractsForOwner(config2, owner, options, srcMethod = \"getContractsForOwner\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getContractsForOwner\", srcMethod, {\n owner,\n excludeFilters: options === null || options === void 0 ? void 0 : options.excludeFilters,\n includeFilters: options === null || options === void 0 ? void 0 : options.includeFilters,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey,\n pageSize: options === null || options === void 0 ? void 0 : options.pageSize,\n orderBy: options === null || options === void 0 ? void 0 : options.orderBy\n });\n return nullsToUndefined({\n contracts: response.contracts.map(getNftContractsForOwnerFromRaw),\n pageKey: response.pageKey,\n totalCount: response.totalCount\n });\n });\n }\n function getOwnersForNft(config2, contractAddress, tokenId, options, srcMethod = \"getOwnersForNft\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n return requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getOwnersForNFT\", srcMethod, Object.assign({ contractAddress, tokenId: import_bignumber2.BigNumber.from(tokenId).toString() }, options));\n });\n }\n function getMintedNfts(config2, owner, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n const ownerAddress = yield provider._getAddress(owner);\n const category = nftTokenTypeToCategory(options === null || options === void 0 ? void 0 : options.tokenType);\n const params = {\n fromBlock: \"0x0\",\n fromAddress: ETH_NULL_ADDRESS,\n toAddress: ownerAddress,\n excludeZeroValue: true,\n contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses,\n category,\n maxCount: 100,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey\n };\n const response = yield getAssetTransfers(config2, params, \"getMintedNfts\");\n return getNftsForTransfers(config2, response);\n });\n }\n function getTransfersForOwner(config2, owner, transferType, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield config2.getProvider();\n const ownerAddress = yield provider._getAddress(owner);\n const category = nftTokenTypeToCategory(options === null || options === void 0 ? void 0 : options.tokenType);\n const params = {\n fromBlock: \"0x0\",\n excludeZeroValue: true,\n contractAddresses: options === null || options === void 0 ? void 0 : options.contractAddresses,\n category,\n maxCount: 100,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey\n };\n if (transferType === GetTransfersForOwnerTransferType.TO) {\n params.toAddress = ownerAddress;\n } else {\n params.fromAddress = ownerAddress;\n }\n const transfersResponse = yield getAssetTransfers(config2, params, \"getTransfersForOwner\");\n return getNftsForTransfers(config2, transfersResponse);\n });\n }\n function getTransfersForContract(config2, contract, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const category = [\n AssetTransfersCategory.ERC721,\n AssetTransfersCategory.ERC1155,\n AssetTransfersCategory.SPECIALNFT\n ];\n const provider = yield config2.getProvider();\n const fromBlock = (options === null || options === void 0 ? void 0 : options.fromBlock) ? provider.formatter.blockTag(yield provider._getBlockTag(options.fromBlock)) : \"0x0\";\n const toBlock = (options === null || options === void 0 ? void 0 : options.toBlock) ? provider.formatter.blockTag(yield provider._getBlockTag(options.toBlock)) : void 0;\n const params = {\n fromBlock,\n toBlock,\n excludeZeroValue: true,\n contractAddresses: [contract],\n order: options === null || options === void 0 ? void 0 : options.order,\n category,\n maxCount: 100,\n pageKey: options === null || options === void 0 ? void 0 : options.pageKey\n };\n const transfersResponse = yield getAssetTransfers(config2, params, \"getTransfersForContract\");\n return getNftsForTransfers(config2, transfersResponse);\n });\n }\n function nftTokenTypeToCategory(tokenType) {\n switch (tokenType) {\n case NftTokenType.ERC721:\n return [AssetTransfersCategory.ERC721];\n case NftTokenType.ERC1155:\n return [AssetTransfersCategory.ERC1155];\n default:\n return [\n AssetTransfersCategory.ERC721,\n AssetTransfersCategory.ERC1155,\n AssetTransfersCategory.SPECIALNFT\n ];\n }\n }\n function parse1155Transfer(transfer) {\n return transfer.erc1155Metadata.map((metadata) => ({\n contractAddress: transfer.rawContract.address,\n tokenId: metadata.tokenId,\n tokenType: NftTokenType.ERC1155\n }));\n }\n function verifyNftOwnership(config2, owner, contractAddresses, srcMethod = \"verifyNftOwnership\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (typeof contractAddresses === \"string\") {\n const response = yield getNftsForOwner(config2, owner, {\n contractAddresses: [contractAddresses],\n omitMetadata: true\n }, srcMethod);\n return response.ownedNfts.length > 0;\n } else {\n if (contractAddresses.length === 0) {\n throw new Error(\"Must provide at least one contract address\");\n }\n const response = yield getNftsForOwner(config2, owner, {\n contractAddresses,\n omitMetadata: true\n }, srcMethod);\n const result = contractAddresses.reduce((acc, curr) => {\n acc[curr] = false;\n return acc;\n }, {});\n for (const nft of response.ownedNfts) {\n result[nft.contractAddress] = true;\n }\n return result;\n }\n });\n }\n function isSpamContract(config2, contractAddress, srcMethod = \"isSpamContract\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n return requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"isSpamContract\", srcMethod, {\n contractAddress\n });\n });\n }\n function getSpamContracts(config2, srcMethod = \"getSpamContracts\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n return requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getSpamContracts\", srcMethod, void 0);\n });\n }\n function reportSpam(config2, contractAddress, srcMethod = \"reportSpam\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n void requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"reportSpam\", srcMethod, {\n contractAddress\n });\n });\n }\n function isAirdropNft(config2, contractAddress, tokenId, srcMethod = \"isAirdropNft\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n return requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"isAirdropNFT\", srcMethod, {\n contractAddress,\n tokenId\n });\n });\n }\n function getFloorPrice(config2, contractAddress, srcMethod = \"getFloorPrice\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getFloorPrice\", srcMethod, {\n contractAddress\n });\n return nullsToUndefined(response);\n });\n }\n function getNftSales(config2, options = {}, srcMethod = \"getNftSales\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const params = Object.assign({}, options);\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTSales\", srcMethod, {\n fromBlock: params === null || params === void 0 ? void 0 : params.fromBlock,\n toBlock: params === null || params === void 0 ? void 0 : params.toBlock,\n order: params === null || params === void 0 ? void 0 : params.order,\n marketplace: params === null || params === void 0 ? void 0 : params.marketplace,\n contractAddress: params === null || params === void 0 ? void 0 : params.contractAddress,\n tokenId: (params === null || params === void 0 ? void 0 : params.tokenId) ? import_bignumber2.BigNumber.from(params === null || params === void 0 ? void 0 : params.tokenId).toString() : void 0,\n sellerAddress: params === null || params === void 0 ? void 0 : params.sellerAddress,\n buyerAddress: params === null || params === void 0 ? void 0 : params.buyerAddress,\n taker: params === null || params === void 0 ? void 0 : params.taker,\n limit: params === null || params === void 0 ? void 0 : params.limit,\n pageKey: params === null || params === void 0 ? void 0 : params.pageKey\n });\n return getNftSalesFromRaw(response);\n });\n }\n function computeRarity(config2, contractAddress, tokenId, srcMethod = \"computeRarity\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"computeRarity\", srcMethod, {\n contractAddress,\n tokenId: import_bignumber2.BigNumber.from(tokenId).toString()\n });\n return nullsToUndefined(response);\n });\n }\n function searchContractMetadata(config2, query, srcMethod = \"searchContractMetadata\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"searchContractMetadata\", srcMethod, {\n query\n });\n return {\n contracts: response.contracts.map(getNftContractFromRaw)\n };\n });\n }\n function summarizeNftAttributes(config2, contractAddress, srcMethod = \"summarizeNftAttributes\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n return requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"summarizeNFTAttributes\", srcMethod, {\n contractAddress\n });\n });\n }\n function refreshNftMetadata(config2, contractAddress, tokenId, srcMethod = \"refreshNftMetadata\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const tokenIdString = import_bignumber2.BigNumber.from(tokenId).toString();\n const first = yield getNftMetadata(config2, contractAddress, tokenIdString, void 0, srcMethod);\n const second = yield refresh(config2, contractAddress, tokenIdString, srcMethod);\n return first.timeLastUpdated !== second.timeLastUpdated;\n });\n }\n function refreshContract(config2, contractAddress, srcMethod = \"refreshContract\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"reingestContract\", srcMethod, {\n contractAddress\n });\n return {\n contractAddress: response.contractAddress,\n refreshState: parseReingestionState(response.reingestionState),\n progress: response.progress\n };\n });\n }\n function refresh(config2, contractAddress, tokenId, srcMethod) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.NFT, \"getNFTMetadata\", srcMethod, {\n contractAddress,\n tokenId: import_bignumber2.BigNumber.from(tokenId).toString(),\n refreshCache: true\n });\n return getNftFromRaw(response);\n });\n }\n function nftFromGetNftResponse(ownedNft) {\n if (isNftWithMetadata(ownedNft)) {\n return getNftFromRaw(ownedNft);\n } else {\n return getBaseNftFromRaw(ownedNft);\n }\n }\n function nftFromGetNftContractResponse(ownedNft, contractAddress) {\n if (isNftWithMetadata(ownedNft)) {\n return getNftFromRaw(ownedNft);\n } else {\n return getBaseNftFromRaw(ownedNft, contractAddress);\n }\n }\n function isNftWithMetadata(response) {\n return response.name !== void 0;\n }\n function getNftsForTransfers(config2, response) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const metadataTransfers = response.transfers.filter((transfer) => transfer.rawContract.address !== null).flatMap((transfer) => {\n var _a2;\n const tokens = getTokensFromTransfer(transfer);\n const metadata = {\n from: transfer.from,\n to: (_a2 = transfer.to) !== null && _a2 !== void 0 ? _a2 : void 0,\n transactionHash: transfer.hash,\n blockNumber: transfer.blockNum\n };\n return tokens.map((token) => ({ metadata, token }));\n });\n if (metadataTransfers.length === 0) {\n return { nfts: [] };\n }\n const batchSize = 100;\n const requestBatches = [];\n for (let i3 = 0; i3 < metadataTransfers.length; i3 += batchSize) {\n requestBatches.push(metadataTransfers.slice(i3, i3 + batchSize));\n }\n const responseBatches = yield Promise.all(requestBatches.map((batch2) => getNftMetadataBatch(config2, batch2.map((transfer) => transfer.token))));\n const nfts = responseBatches.map((r2) => r2.nfts).flat();\n const nftsByTokenId = /* @__PURE__ */ new Map();\n nfts.forEach((nft) => {\n const key = `${nft.contract.address.toLowerCase()}-${import_bignumber2.BigNumber.from(nft.tokenId).toString()}`;\n nftsByTokenId.set(key, nft);\n });\n const transferredNfts = metadataTransfers.map((t3) => {\n const key = `${t3.token.contractAddress.toLowerCase()}-${import_bignumber2.BigNumber.from(t3.token.tokenId).toString()}`;\n return Object.assign(Object.assign({}, nftsByTokenId.get(key)), t3.metadata);\n });\n return {\n nfts: transferredNfts,\n pageKey: response.pageKey\n };\n });\n }\n function getTokensFromTransfer(transfer) {\n if (transfer.category === AssetTransfersCategory.ERC1155) {\n return parse1155Transfer(transfer);\n } else {\n return [\n {\n contractAddress: transfer.rawContract.address,\n tokenId: transfer.tokenId,\n tokenType: transfer.category === AssetTransfersCategory.ERC721 ? NftTokenType.ERC721 : void 0\n }\n ];\n }\n }\n function omitMetadataToWithMetadata(omitMetadata) {\n return omitMetadata === void 0 ? true : !omitMetadata;\n }\n function parseReingestionState(reingestionState) {\n switch (reingestionState) {\n case \"does_not_exist\":\n return NftRefreshState.DOES_NOT_EXIST;\n case \"already_queued\":\n return NftRefreshState.ALREADY_QUEUED;\n case \"in_progress\":\n return NftRefreshState.IN_PROGRESS;\n case \"finished\":\n return NftRefreshState.FINISHED;\n case \"queued\":\n return NftRefreshState.QUEUED;\n case \"queue_failed\":\n return NftRefreshState.QUEUE_FAILED;\n default:\n throw new Error(\"Unknown reingestion state: \" + reingestionState);\n }\n }\n function parseRawWebhookResponse(response) {\n return response.data.map(parseRawWebhook);\n }\n function parseRawWebhook(rawWebhook) {\n return Object.assign(Object.assign({ id: rawWebhook.id, network: WEBHOOK_NETWORK_TO_NETWORK[rawWebhook.network], type: rawWebhook.webhook_type, url: rawWebhook.webhook_url, isActive: rawWebhook.is_active, timeCreated: new Date(rawWebhook.time_created).toISOString(), signingKey: rawWebhook.signing_key, version: rawWebhook.version }, rawWebhook.app_id !== void 0 && { appId: rawWebhook.app_id }), rawWebhook.name !== void 0 && { name: rawWebhook.name });\n }\n function parseRawAddressActivityResponse(response) {\n return {\n addresses: response.data,\n totalCount: response.pagination.total_count,\n pageKey: response.pagination.cursors.after\n };\n }\n function parseRawCustomGraphqlWebhookResponse(response) {\n return {\n graphqlQuery: response.data.graphql_query\n };\n }\n function parseRawNftFiltersResponse(response) {\n return {\n filters: response.data.map((f6) => f6.token_id ? {\n contractAddress: f6.contract_address,\n tokenId: import_bignumber2.BigNumber.from(f6.token_id).toString()\n } : {\n contractAddress: f6.contract_address\n }),\n totalCount: response.pagination.total_count,\n pageKey: response.pagination.cursors.after\n };\n }\n function nftFilterToParam(filter2) {\n return filter2.tokenId ? {\n contract_address: filter2.contractAddress,\n token_id: import_bignumber2.BigNumber.from(filter2.tokenId).toString()\n } : {\n contract_address: filter2.contractAddress\n };\n }\n function getTokensByWallet(config2, addresses4, withMetadata = true, withPrices = true, includeNativeTokens = true, srcMethod = \"getTokensByWallet\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n addresses: addresses4,\n withMetadata,\n withPrices,\n includeNativeTokens\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PORTFOLIO, \"assets/tokens/by-address\", srcMethod, {}, {\n data,\n method: \"POST\"\n });\n return nullsToUndefined(response);\n });\n }\n function getTokenBalancesByWallet(config2, addresses4, includeNativeTokens = true, srcMethod = \"getTokenBalancesByWallet\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n addresses: addresses4,\n includeNativeTokens\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PORTFOLIO, \"assets/tokens/balances/by-address\", srcMethod, {}, {\n method: \"POST\",\n data\n });\n return nullsToUndefined(response);\n });\n }\n function getNftsByWallet(config2, addresses4, withMetadata = true, pageKey = void 0, pageSize = void 0, srcMethod = \"getNftsByWallet\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n addresses: addresses4,\n withMetadata,\n pageKey,\n pageSize\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PORTFOLIO, \"assets/nfts/by-address\", srcMethod, {}, {\n method: \"POST\",\n data\n });\n return nullsToUndefined(response);\n });\n }\n function getNftCollectionsByWallet(config2, addresses4, withMetadata = true, pageKey = void 0, pageSize = void 0, srcMethod = \"getNftCollectionsByWallet\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n addresses: addresses4,\n pageKey,\n pageSize,\n withMetadata\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PORTFOLIO, \"assets/nfts/contracts/by-address\", srcMethod, {}, {\n method: \"POST\",\n data\n });\n return nullsToUndefined(response);\n });\n }\n function getTransactionsByWallet(config2, addresses4, before = void 0, after = void 0, limit = void 0, srcMethod = \"getTransactionsByWallet\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const data = {\n addresses: addresses4,\n before,\n after,\n limit\n };\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PORTFOLIO, \"transactions/history/by-address\", srcMethod, {}, {\n method: \"POST\",\n data\n });\n return nullsToUndefined(response);\n });\n }\n function getTokenPriceByAddress(config2, addresses4, srcMethod = \"getTokenPriceByAddress\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PRICES, \"tokens/by-address\", srcMethod, {}, {\n method: \"POST\",\n data: { addresses: addresses4 }\n });\n return nullsToUndefined(response);\n });\n }\n function getTokenPriceBySymbol(config2, symbols, srcMethod = \"getTokenPriceBySymbol\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PRICES, \"tokens/by-symbol\", srcMethod, {\n symbols\n }, {\n // We need to serialize the symbols array as URLSearchParams since the\n // Alchemy API expects a query parameter for each symbol. The axios default\n // serializer will not work here because the symbols array is an array of\n // strings.\n // Axios default encoding: ?symbols[]=AAVE&symbols[]=UNI\n // Alchemy requires: ?symbols=AAVE&symbols=UNI\n paramsSerializer: (params) => {\n const searchParams = new URLSearchParams();\n Object.entries(params).forEach(([key, value]) => {\n value.forEach((v2) => searchParams.append(key, v2));\n });\n return searchParams.toString();\n }\n });\n return nullsToUndefined(response);\n });\n }\n function getHistoricalPriceBySymbol(config2, symbol, startTime, endTime, interval, srcMethod = \"getHistoricalPriceBySymbol\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PRICES, \"tokens/historical\", srcMethod, {}, {\n method: \"POST\",\n data: {\n symbol,\n startTime,\n endTime,\n interval\n }\n });\n return nullsToUndefined(response);\n });\n }\n function getHistoricalPriceByAddress(config2, network, address, startTime, endTime, interval, srcMethod = \"getHistoricalPriceByAddress\") {\n return __awaiter$1(this, void 0, void 0, function* () {\n const response = yield requestHttpWithBackoff(config2, AlchemyApiType.PRICES, \"tokens/historical\", srcMethod, {}, {\n method: \"POST\",\n data: {\n network,\n address,\n startTime,\n endTime,\n interval\n }\n });\n return nullsToUndefined(response);\n });\n }\n function generateGasSpreadTransactions(transaction, gasLimit, baseFee, priorityFee) {\n return GAS_OPTIMIZED_TX_FEE_MULTIPLES.map((feeMultiplier) => {\n return Object.assign(Object.assign({}, transaction), { gasLimit, maxFeePerGas: Math.round(baseFee * feeMultiplier + priorityFee * feeMultiplier), maxPriorityFeePerGas: Math.round(feeMultiplier * priorityFee) });\n });\n }\n function isAlchemyEvent(event) {\n return typeof event === \"object\" && \"method\" in event;\n }\n function getAlchemyEventTag(event) {\n if (!isAlchemyEvent(event)) {\n throw new Error(\"Event tag requires AlchemyEventType\");\n }\n if (event.method === AlchemySubscription.PENDING_TRANSACTIONS) {\n return serializePendingTransactionsEvent(event);\n } else if (event.method === AlchemySubscription.MINED_TRANSACTIONS) {\n return serializeMinedTransactionsEvent(event);\n } else {\n throw new Error(`Unrecognized AlchemyFilterEvent: ${event}`);\n }\n }\n function verifyAlchemyEventName(eventName) {\n if (!Object.values(AlchemySubscription).includes(eventName.method)) {\n throw new Error(`Invalid method name ${eventName.method}. Accepted method names: ${Object.values(AlchemySubscription)}`);\n }\n }\n function serializePendingTransactionsEvent(event) {\n const fromAddress = serializeAddressField(event.fromAddress);\n const toAddress = serializeAddressField(event.toAddress);\n const hashesOnly = serializeBooleanField(event.hashesOnly);\n return ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE + \":\" + fromAddress + \":\" + toAddress + \":\" + hashesOnly;\n }\n function serializeMinedTransactionsEvent(event) {\n const addresses4 = serializeAddressesField(event.addresses);\n const includeRemoved = serializeBooleanField(event.includeRemoved);\n const hashesOnly = serializeBooleanField(event.hashesOnly);\n return ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE + \":\" + addresses4 + \":\" + includeRemoved + \":\" + hashesOnly;\n }\n function serializeAddressesField(addresses4) {\n if (addresses4 === void 0) {\n return \"*\";\n }\n return addresses4.map((filter2) => serializeAddressField(filter2.to) + \",\" + serializeAddressField(filter2.from)).join(\"|\");\n }\n function serializeAddressField(field) {\n if (field === void 0) {\n return \"*\";\n } else if (Array.isArray(field)) {\n return field.join(\"|\");\n } else {\n return field;\n }\n }\n function serializeBooleanField(field) {\n if (field === void 0) {\n return \"*\";\n } else {\n return field.toString();\n }\n }\n function deserializeTopics(data) {\n if (data === \"\") {\n return [];\n }\n return data.split(/&/g).map((topic) => {\n if (topic === \"\") {\n return [];\n }\n const comps = topic.split(\"|\").map((topic2) => {\n return topic2 === \"null\" ? null : topic2;\n });\n return comps.length === 1 ? comps[0] : comps;\n });\n }\n function deserializeAddressField(data) {\n if (data === \"\") {\n return void 0;\n }\n const addresses4 = data.split(\"|\");\n return addresses4.length === 1 ? addresses4[0] : addresses4;\n }\n function deserializeAddressesField(data) {\n if (data === \"\") {\n return void 0;\n }\n return data.split(\"|\").map((addressStr) => addressStr.split(\",\")).map((addressPair) => Object.assign(Object.assign({}, addressPair[0] !== \"*\" && { to: addressPair[0] }), addressPair[1] !== \"*\" && { from: addressPair[1] }));\n }\n var import_bignumber2, import_bytes5, Network, TokenBalanceType, AssetTransfersCategory, GetTransfersForOwnerTransferType, SortingOrder, OpenSeaSafelistRequestStatus, AlchemySubscription, SimulateAssetType, SimulateChangeType, DecodingAuthority, DebugCallType, GasOptimizedTransactionStatus, WebhookVersion, WebhookType, CommitmentLevel, DebugTracerType, NftTokenType, NftSpamClassification, NftFilters, NftOrdering, NftSaleMarketplace, NftSaleTakerType, NftRefreshState, NftCollectionMarketplace, HistoricalPriceInterval, DEFAULT_ALCHEMY_API_KEY, DEFAULT_NETWORK, DEFAULT_MAX_RETRIES, DEFAULT_REQUEST_TIMEOUT, AlchemyApiType, EthersNetwork, CustomNetworks, ETH_NULL_VALUE, ETH_NULL_ADDRESS, AlchemyConfig, version$12, _permanentCensorErrors2, _censorErrors2, LogLevels2, _logLevel2, _globalLogger2, _normalizeError2, LogLevel$1, ErrorCode2, HEX2, Logger$1, version6, __awaiter2, logger2, opaque, IS_BROWSER, CoreNamespace, DebugNamespace, LogLevel3, logLevelStringToEnum, logLevelToConsoleFn, DEFAULT_LOG_LEVEL, Logger3, loggerClient, VERSION4, DEFAULT_BACKOFF_INITIAL_DELAY_MS, DEFAULT_BACKOFF_MULTIPLIER, DEFAULT_BACKOFF_MAX_DELAY_MS, DEFAULT_BACKOFF_MAX_ATTEMPTS, ExponentialBackoff, NftNamespace, NotifyNamespace, WEBHOOK_NETWORK_TO_NETWORK, NETWORK_TO_WEBHOOK_NETWORK, PortfolioNamespace, PricesNamespace, GAS_OPTIMIZED_TX_FEE_MULTIPLES, TransactNamespace, ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE, ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE, ALCHEMY_EVENT_TYPES, Event, EthersEvent, WebSocketNamespace, Alchemy;\n var init_index_f73a5f29 = __esm({\n \"../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/index-f73a5f29.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils10();\n import_bignumber2 = __toESM(require_lib3());\n import_bytes5 = __toESM(require_lib2());\n init_axios2();\n (function(Network2) {\n Network2[\"ETH_MAINNET\"] = \"eth-mainnet\";\n Network2[\"ETH_GOERLI\"] = \"eth-goerli\";\n Network2[\"ETH_SEPOLIA\"] = \"eth-sepolia\";\n Network2[\"ETH_HOLESKY\"] = \"eth-holesky\";\n Network2[\"ETH_HOODI\"] = \"eth-hoodi\";\n Network2[\"OPT_MAINNET\"] = \"opt-mainnet\";\n Network2[\"OPT_GOERLI\"] = \"opt-goerli\";\n Network2[\"OPT_SEPOLIA\"] = \"opt-sepolia\";\n Network2[\"ARB_MAINNET\"] = \"arb-mainnet\";\n Network2[\"ARB_GOERLI\"] = \"arb-goerli\";\n Network2[\"ARB_SEPOLIA\"] = \"arb-sepolia\";\n Network2[\"MATIC_MAINNET\"] = \"polygon-mainnet\";\n Network2[\"MATIC_MUMBAI\"] = \"polygon-mumbai\";\n Network2[\"MATIC_AMOY\"] = \"polygon-amoy\";\n Network2[\"ASTAR_MAINNET\"] = \"astar-mainnet\";\n Network2[\"POLYGONZKEVM_MAINNET\"] = \"polygonzkevm-mainnet\";\n Network2[\"POLYGONZKEVM_TESTNET\"] = \"polygonzkevm-testnet\";\n Network2[\"POLYGONZKEVM_CARDONA\"] = \"polygonzkevm-cardona\";\n Network2[\"BASE_MAINNET\"] = \"base-mainnet\";\n Network2[\"BASE_GOERLI\"] = \"base-goerli\";\n Network2[\"BASE_SEPOLIA\"] = \"base-sepolia\";\n Network2[\"ZKSYNC_MAINNET\"] = \"zksync-mainnet\";\n Network2[\"ZKSYNC_SEPOLIA\"] = \"zksync-sepolia\";\n Network2[\"SHAPE_MAINNET\"] = \"shape-mainnet\";\n Network2[\"SHAPE_SEPOLIA\"] = \"shape-sepolia\";\n Network2[\"LINEA_MAINNET\"] = \"linea-mainnet\";\n Network2[\"LINEA_SEPOLIA\"] = \"linea-sepolia\";\n Network2[\"FANTOM_MAINNET\"] = \"fantom-mainnet\";\n Network2[\"FANTOM_TESTNET\"] = \"fantom-testnet\";\n Network2[\"ZETACHAIN_MAINNET\"] = \"zetachain-mainnet\";\n Network2[\"ZETACHAIN_TESTNET\"] = \"zetachain-testnet\";\n Network2[\"ARBNOVA_MAINNET\"] = \"arbnova-mainnet\";\n Network2[\"BLAST_MAINNET\"] = \"blast-mainnet\";\n Network2[\"BLAST_SEPOLIA\"] = \"blast-sepolia\";\n Network2[\"MANTLE_MAINNET\"] = \"mantle-mainnet\";\n Network2[\"MANTLE_SEPOLIA\"] = \"mantle-sepolia\";\n Network2[\"SCROLL_MAINNET\"] = \"scroll-mainnet\";\n Network2[\"SCROLL_SEPOLIA\"] = \"scroll-sepolia\";\n Network2[\"GNOSIS_MAINNET\"] = \"gnosis-mainnet\";\n Network2[\"GNOSIS_CHIADO\"] = \"gnosis-chiado\";\n Network2[\"BNB_MAINNET\"] = \"bnb-mainnet\";\n Network2[\"BNB_TESTNET\"] = \"bnb-testnet\";\n Network2[\"AVAX_MAINNET\"] = \"avax-mainnet\";\n Network2[\"AVAX_FUJI\"] = \"avax-fuji\";\n Network2[\"CELO_MAINNET\"] = \"celo-mainnet\";\n Network2[\"CELO_ALFAJORES\"] = \"celo-alfajores\";\n Network2[\"CELO_BAKLAVA\"] = \"celo-baklava\";\n Network2[\"METIS_MAINNET\"] = \"metis-mainnet\";\n Network2[\"OPBNB_MAINNET\"] = \"opbnb-mainnet\";\n Network2[\"OPBNB_TESTNET\"] = \"opbnb-testnet\";\n Network2[\"BERACHAIN_BARTIO\"] = \"berachain-bartio\";\n Network2[\"BERACHAIN_MAINNET\"] = \"berachain-mainnet\";\n Network2[\"BERACHAIN_BEPOLIA\"] = \"berachain-bepolia\";\n Network2[\"SONEIUM_MAINNET\"] = \"soneium-mainnet\";\n Network2[\"SONEIUM_MINATO\"] = \"soneium-minato\";\n Network2[\"WORLDCHAIN_MAINNET\"] = \"worldchain-mainnet\";\n Network2[\"WORLDCHAIN_SEPOLIA\"] = \"worldchain-sepolia\";\n Network2[\"ROOTSTOCK_MAINNET\"] = \"rootstock-mainnet\";\n Network2[\"ROOTSTOCK_TESTNET\"] = \"rootstock-testnet\";\n Network2[\"FLOW_MAINNET\"] = \"flow-mainnet\";\n Network2[\"FLOW_TESTNET\"] = \"flow-testnet\";\n Network2[\"ZORA_MAINNET\"] = \"zora-mainnet\";\n Network2[\"ZORA_SEPOLIA\"] = \"zora-sepolia\";\n Network2[\"FRAX_MAINNET\"] = \"frax-mainnet\";\n Network2[\"FRAX_SEPOLIA\"] = \"frax-sepolia\";\n Network2[\"POLYNOMIAL_MAINNET\"] = \"polynomial-mainnet\";\n Network2[\"POLYNOMIAL_SEPOLIA\"] = \"polynomial-sepolia\";\n Network2[\"CROSSFI_MAINNET\"] = \"crossfi-mainnet\";\n Network2[\"CROSSFI_TESTNET\"] = \"crossfi-testnet\";\n Network2[\"APECHAIN_MAINNET\"] = \"apechain-mainnet\";\n Network2[\"APECHAIN_CURTIS\"] = \"apechain-curtis\";\n Network2[\"LENS_MAINNET\"] = \"lens-mainnet\";\n Network2[\"LENS_SEPOLIA\"] = \"lens-sepolia\";\n Network2[\"GEIST_MAINNET\"] = \"geist-mainnet\";\n Network2[\"GEIST_POLTER\"] = \"geist-polter\";\n Network2[\"LUMIA_PRISM\"] = \"lumia-prism\";\n Network2[\"LUMIA_TESTNET\"] = \"lumia-testnet\";\n Network2[\"UNICHAIN_MAINNET\"] = \"unichain-mainnet\";\n Network2[\"UNICHAIN_SEPOLIA\"] = \"unichain-sepolia\";\n Network2[\"SONIC_MAINNET\"] = \"sonic-mainnet\";\n Network2[\"SONIC_BLAZE\"] = \"sonic-blaze\";\n Network2[\"XMTP_TESTNET\"] = \"xmtp-testnet\";\n Network2[\"ABSTRACT_MAINNET\"] = \"abstract-mainnet\";\n Network2[\"ABSTRACT_TESTNET\"] = \"abstract-testnet\";\n Network2[\"DEGEN_MAINNET\"] = \"degen-mainnet\";\n Network2[\"INK_MAINNET\"] = \"ink-mainnet\";\n Network2[\"INK_SEPOLIA\"] = \"ink-sepolia\";\n Network2[\"SEI_MAINNET\"] = \"sei-mainnet\";\n Network2[\"SEI_TESTNET\"] = \"sei-testnet\";\n Network2[\"RONIN_MAINNET\"] = \"ronin-mainnet\";\n Network2[\"RONIN_SAIGON\"] = \"ronin-saigon\";\n Network2[\"MONAD_TESTNET\"] = \"monad-testnet\";\n Network2[\"SETTLUS_SEPTESTNET\"] = \"settlus-septestnet\";\n Network2[\"SETTLUS_MAINNET\"] = \"settlus-mainnet\";\n Network2[\"SOLANA_MAINNET\"] = \"solana-mainnet\";\n Network2[\"SOLANA_DEVNET\"] = \"solana-devnet\";\n Network2[\"GENSYN_TESTNET\"] = \"gensyn-testnet\";\n Network2[\"SUPERSEED_MAINNET\"] = \"superseed-mainnet\";\n Network2[\"SUPERSEED_SEPOLIA\"] = \"superseed-sepolia\";\n Network2[\"TEA_SEPOLIA\"] = \"tea-sepolia\";\n Network2[\"ANIME_MAINNET\"] = \"anime-mainnet\";\n Network2[\"ANIME_SEPOLIA\"] = \"anime-sepolia\";\n Network2[\"STORY_MAINNET\"] = \"story-mainnet\";\n Network2[\"STORY_AENEID\"] = \"story-aeneid\";\n Network2[\"MEGAETH_TESTNET\"] = \"megaeth-testnet\";\n Network2[\"BOTANIX_MAINNET\"] = \"botanix-mainnet\";\n Network2[\"BOTANIX_TESTNET\"] = \"botanix-testnet\";\n Network2[\"HUMANITY_MAINNET\"] = \"humanity-mainnet\";\n Network2[\"RISE_TESTNET\"] = \"rise-testnet\";\n })(Network || (Network = {}));\n (function(TokenBalanceType2) {\n TokenBalanceType2[\"DEFAULT_TOKENS\"] = \"DEFAULT_TOKENS\";\n TokenBalanceType2[\"ERC20\"] = \"erc20\";\n })(TokenBalanceType || (TokenBalanceType = {}));\n (function(AssetTransfersCategory2) {\n AssetTransfersCategory2[\"EXTERNAL\"] = \"external\";\n AssetTransfersCategory2[\"INTERNAL\"] = \"internal\";\n AssetTransfersCategory2[\"ERC20\"] = \"erc20\";\n AssetTransfersCategory2[\"ERC721\"] = \"erc721\";\n AssetTransfersCategory2[\"ERC1155\"] = \"erc1155\";\n AssetTransfersCategory2[\"SPECIALNFT\"] = \"specialnft\";\n })(AssetTransfersCategory || (AssetTransfersCategory = {}));\n (function(GetTransfersForOwnerTransferType2) {\n GetTransfersForOwnerTransferType2[\"TO\"] = \"TO\";\n GetTransfersForOwnerTransferType2[\"FROM\"] = \"FROM\";\n })(GetTransfersForOwnerTransferType || (GetTransfersForOwnerTransferType = {}));\n (function(SortingOrder2) {\n SortingOrder2[\"ASCENDING\"] = \"asc\";\n SortingOrder2[\"DESCENDING\"] = \"desc\";\n })(SortingOrder || (SortingOrder = {}));\n (function(OpenSeaSafelistRequestStatus2) {\n OpenSeaSafelistRequestStatus2[\"VERIFIED\"] = \"verified\";\n OpenSeaSafelistRequestStatus2[\"APPROVED\"] = \"approved\";\n OpenSeaSafelistRequestStatus2[\"REQUESTED\"] = \"requested\";\n OpenSeaSafelistRequestStatus2[\"NOT_REQUESTED\"] = \"not_requested\";\n })(OpenSeaSafelistRequestStatus || (OpenSeaSafelistRequestStatus = {}));\n (function(AlchemySubscription2) {\n AlchemySubscription2[\"PENDING_TRANSACTIONS\"] = \"alchemy_pendingTransactions\";\n AlchemySubscription2[\"MINED_TRANSACTIONS\"] = \"alchemy_minedTransactions\";\n })(AlchemySubscription || (AlchemySubscription = {}));\n (function(SimulateAssetType2) {\n SimulateAssetType2[\"NATIVE\"] = \"NATIVE\";\n SimulateAssetType2[\"ERC20\"] = \"ERC20\";\n SimulateAssetType2[\"ERC721\"] = \"ERC721\";\n SimulateAssetType2[\"ERC1155\"] = \"ERC1155\";\n SimulateAssetType2[\"SPECIAL_NFT\"] = \"SPECIAL_NFT\";\n })(SimulateAssetType || (SimulateAssetType = {}));\n (function(SimulateChangeType2) {\n SimulateChangeType2[\"APPROVE\"] = \"APPROVE\";\n SimulateChangeType2[\"TRANSFER\"] = \"TRANSFER\";\n })(SimulateChangeType || (SimulateChangeType = {}));\n (function(DecodingAuthority2) {\n DecodingAuthority2[\"ETHERSCAN\"] = \"ETHERSCAN\";\n })(DecodingAuthority || (DecodingAuthority = {}));\n (function(DebugCallType2) {\n DebugCallType2[\"CREATE\"] = \"CREATE\";\n DebugCallType2[\"CALL\"] = \"CALL\";\n DebugCallType2[\"STATICCALL\"] = \"STATICCALL\";\n DebugCallType2[\"DELEGATECALL\"] = \"DELEGATECALL\";\n })(DebugCallType || (DebugCallType = {}));\n (function(GasOptimizedTransactionStatus2) {\n GasOptimizedTransactionStatus2[\"UNSPECIFIED\"] = \"TRANSACTION_JOB_STATUS_UNSPECIFIED\";\n GasOptimizedTransactionStatus2[\"IN_PROGRESS\"] = \"IN_PROGRESS\";\n GasOptimizedTransactionStatus2[\"COMPLETE\"] = \"COMPLETE\";\n GasOptimizedTransactionStatus2[\"ABANDONED\"] = \"ABANDONED\";\n })(GasOptimizedTransactionStatus || (GasOptimizedTransactionStatus = {}));\n (function(WebhookVersion2) {\n WebhookVersion2[\"V1\"] = \"V1\";\n WebhookVersion2[\"V2\"] = \"V2\";\n })(WebhookVersion || (WebhookVersion = {}));\n (function(WebhookType2) {\n WebhookType2[\"MINED_TRANSACTION\"] = \"MINED_TRANSACTION\";\n WebhookType2[\"DROPPED_TRANSACTION\"] = \"DROPPED_TRANSACTION\";\n WebhookType2[\"ADDRESS_ACTIVITY\"] = \"ADDRESS_ACTIVITY\";\n WebhookType2[\"NFT_ACTIVITY\"] = \"NFT_ACTIVITY\";\n WebhookType2[\"NFT_METADATA_UPDATE\"] = \"NFT_METADATA_UPDATE\";\n WebhookType2[\"GRAPHQL\"] = \"GRAPHQL\";\n })(WebhookType || (WebhookType = {}));\n (function(CommitmentLevel2) {\n CommitmentLevel2[\"PENDING\"] = \"pending\";\n CommitmentLevel2[\"LATEST\"] = \"latest\";\n CommitmentLevel2[\"SAFE\"] = \"safe\";\n CommitmentLevel2[\"FINALIZED\"] = \"finalized\";\n CommitmentLevel2[\"EARLIEST\"] = \"earliest\";\n })(CommitmentLevel || (CommitmentLevel = {}));\n (function(DebugTracerType2) {\n DebugTracerType2[\"CALL_TRACER\"] = \"callTracer\";\n DebugTracerType2[\"PRESTATE_TRACER\"] = \"prestateTracer\";\n })(DebugTracerType || (DebugTracerType = {}));\n (function(NftTokenType2) {\n NftTokenType2[\"ERC721\"] = \"ERC721\";\n NftTokenType2[\"ERC1155\"] = \"ERC1155\";\n NftTokenType2[\"NO_SUPPORTED_NFT_STANDARD\"] = \"NO_SUPPORTED_NFT_STANDARD\";\n NftTokenType2[\"NOT_A_CONTRACT\"] = \"NOT_A_CONTRACT\";\n NftTokenType2[\"UNKNOWN\"] = \"UNKNOWN\";\n })(NftTokenType || (NftTokenType = {}));\n (function(NftSpamClassification2) {\n NftSpamClassification2[\"Erc721TooManyOwners\"] = \"Erc721TooManyOwners\";\n NftSpamClassification2[\"Erc721TooManyTokens\"] = \"Erc721TooManyTokens\";\n NftSpamClassification2[\"Erc721DishonestTotalSupply\"] = \"Erc721DishonestTotalSupply\";\n NftSpamClassification2[\"MostlyHoneyPotOwners\"] = \"MostlyHoneyPotOwners\";\n NftSpamClassification2[\"OwnedByMostHoneyPots\"] = \"OwnedByMostHoneyPots\";\n NftSpamClassification2[\"LowDistinctOwnersPercent\"] = \"LowDistinctOwnersPercent\";\n NftSpamClassification2[\"HighHoneyPotOwnerPercent\"] = \"HighHoneyPotOwnerPercent\";\n NftSpamClassification2[\"HighHoneyPotPercent\"] = \"HighHoneyPotPercent\";\n NftSpamClassification2[\"HoneyPotsOwnMultipleTokens\"] = \"HoneyPotsOwnMultipleTokens\";\n NftSpamClassification2[\"NoSalesActivity\"] = \"NoSalesActivity\";\n NftSpamClassification2[\"HighAirdropPercent\"] = \"HighAirdropPercent\";\n NftSpamClassification2[\"Unknown\"] = \"Unknown\";\n })(NftSpamClassification || (NftSpamClassification = {}));\n (function(NftFilters2) {\n NftFilters2[\"SPAM\"] = \"SPAM\";\n NftFilters2[\"AIRDROPS\"] = \"AIRDROPS\";\n })(NftFilters || (NftFilters = {}));\n (function(NftOrdering2) {\n NftOrdering2[\"TRANSFERTIME\"] = \"TRANSFERTIME\";\n })(NftOrdering || (NftOrdering = {}));\n (function(NftSaleMarketplace2) {\n NftSaleMarketplace2[\"SEAPORT\"] = \"seaport\";\n NftSaleMarketplace2[\"LOOKSRARE\"] = \"looksrare\";\n NftSaleMarketplace2[\"X2Y2\"] = \"x2y2\";\n NftSaleMarketplace2[\"WYVERN\"] = \"wyvern\";\n NftSaleMarketplace2[\"CRYPTOPUNKS\"] = \"cryptopunks\";\n NftSaleMarketplace2[\"BLUR\"] = \"blur\";\n NftSaleMarketplace2[\"UNKNOWN\"] = \"unknown\";\n })(NftSaleMarketplace || (NftSaleMarketplace = {}));\n (function(NftSaleTakerType2) {\n NftSaleTakerType2[\"BUYER\"] = \"buyer\";\n NftSaleTakerType2[\"SELLER\"] = \"seller\";\n })(NftSaleTakerType || (NftSaleTakerType = {}));\n (function(NftRefreshState2) {\n NftRefreshState2[\"DOES_NOT_EXIST\"] = \"does_not_exist\";\n NftRefreshState2[\"ALREADY_QUEUED\"] = \"already_queued\";\n NftRefreshState2[\"IN_PROGRESS\"] = \"in_progress\";\n NftRefreshState2[\"FINISHED\"] = \"finished\";\n NftRefreshState2[\"QUEUED\"] = \"queued\";\n NftRefreshState2[\"QUEUE_FAILED\"] = \"queue_failed\";\n })(NftRefreshState || (NftRefreshState = {}));\n (function(NftCollectionMarketplace2) {\n NftCollectionMarketplace2[\"OPENSEA\"] = \"OpenSea\";\n })(NftCollectionMarketplace || (NftCollectionMarketplace = {}));\n (function(HistoricalPriceInterval2) {\n HistoricalPriceInterval2[\"FIVE_MINUTE\"] = \"5m\";\n HistoricalPriceInterval2[\"ONE_HOUR\"] = \"1h\";\n HistoricalPriceInterval2[\"ONE_DAY\"] = \"1d\";\n })(HistoricalPriceInterval || (HistoricalPriceInterval = {}));\n DEFAULT_ALCHEMY_API_KEY = \"demo\";\n DEFAULT_NETWORK = Network.ETH_MAINNET;\n DEFAULT_MAX_RETRIES = 5;\n DEFAULT_REQUEST_TIMEOUT = 0;\n (function(AlchemyApiType2) {\n AlchemyApiType2[AlchemyApiType2[\"BASE\"] = 0] = \"BASE\";\n AlchemyApiType2[AlchemyApiType2[\"NFT\"] = 1] = \"NFT\";\n AlchemyApiType2[AlchemyApiType2[\"WEBHOOK\"] = 2] = \"WEBHOOK\";\n AlchemyApiType2[AlchemyApiType2[\"PRICES\"] = 3] = \"PRICES\";\n AlchemyApiType2[AlchemyApiType2[\"PORTFOLIO\"] = 4] = \"PORTFOLIO\";\n })(AlchemyApiType || (AlchemyApiType = {}));\n EthersNetwork = {\n [Network.ETH_MAINNET]: \"mainnet\",\n [Network.ETH_GOERLI]: \"goerli\",\n [Network.ETH_SEPOLIA]: \"sepolia\",\n [Network.ETH_HOLESKY]: \"holesky\",\n [Network.ETH_HOODI]: \"hoodi\",\n [Network.OPT_MAINNET]: \"opt-mainnet\",\n [Network.OPT_GOERLI]: \"optimism-goerli\",\n [Network.OPT_SEPOLIA]: \"optimism-sepolia\",\n [Network.ARB_MAINNET]: \"arbitrum\",\n [Network.ARB_GOERLI]: \"arbitrum-goerli\",\n [Network.ARB_SEPOLIA]: \"arbitrum-sepolia\",\n [Network.MATIC_MAINNET]: \"matic\",\n [Network.MATIC_MUMBAI]: \"maticmum\",\n [Network.MATIC_AMOY]: \"maticamoy\",\n [Network.SOLANA_MAINNET]: null,\n [Network.SOLANA_DEVNET]: null,\n [Network.ASTAR_MAINNET]: \"astar-mainnet\",\n [Network.POLYGONZKEVM_MAINNET]: \"polygonzkevm-mainnet\",\n [Network.POLYGONZKEVM_TESTNET]: \"polygonzkevm-testnet\",\n [Network.POLYGONZKEVM_CARDONA]: \"polygonzkevm-cardona\",\n [Network.BASE_MAINNET]: \"base-mainnet\",\n [Network.BASE_GOERLI]: \"base-goerli\",\n [Network.BASE_SEPOLIA]: \"base-sepolia\",\n [Network.ZKSYNC_MAINNET]: \"zksync-mainnet\",\n [Network.ZKSYNC_SEPOLIA]: \"zksync-sepolia\",\n [Network.SHAPE_MAINNET]: \"shape-mainnet\",\n [Network.SHAPE_SEPOLIA]: \"shape-sepolia\",\n [Network.LINEA_MAINNET]: \"linea-mainnet\",\n [Network.LINEA_SEPOLIA]: \"linea-sepolia\",\n [Network.FANTOM_MAINNET]: \"fantom-mainnet\",\n [Network.FANTOM_TESTNET]: \"fantom-testnet\",\n [Network.ZETACHAIN_MAINNET]: \"zetachain-mainnet\",\n [Network.ZETACHAIN_TESTNET]: \"zetachain-testnet\",\n [Network.ARBNOVA_MAINNET]: \"arbnova-mainnet\",\n [Network.BLAST_MAINNET]: \"blast-mainnet\",\n [Network.BLAST_SEPOLIA]: \"blast-sepolia\",\n [Network.MANTLE_MAINNET]: \"mantle-mainnet\",\n [Network.MANTLE_SEPOLIA]: \"mantle-sepolia\",\n [Network.SCROLL_MAINNET]: \"scroll-mainnet\",\n [Network.SCROLL_SEPOLIA]: \"scroll-sepolia\",\n [Network.GNOSIS_MAINNET]: \"gnosis-mainnet\",\n [Network.GNOSIS_CHIADO]: \"gnosis-chiado\",\n [Network.BNB_MAINNET]: \"bnb-mainnet\",\n [Network.BNB_TESTNET]: \"bnb-testnet\",\n [Network.AVAX_MAINNET]: \"avax-mainnet\",\n [Network.AVAX_FUJI]: \"avax-fuji\",\n [Network.CELO_MAINNET]: \"celo-mainnet\",\n [Network.CELO_ALFAJORES]: \"celo-alfajores\",\n [Network.CELO_BAKLAVA]: \"celo-baklava\",\n [Network.METIS_MAINNET]: \"metis-mainnet\",\n [Network.OPBNB_MAINNET]: \"opbnb-mainnet\",\n [Network.OPBNB_TESTNET]: \"opbnb-testnet\",\n [Network.BERACHAIN_BARTIO]: \"berachain-bartio\",\n [Network.BERACHAIN_MAINNET]: \"berachain-mainnet\",\n [Network.BERACHAIN_BEPOLIA]: \"berachain-bepolia\",\n [Network.SONEIUM_MAINNET]: \"soneium-mainnet\",\n [Network.SONEIUM_MINATO]: \"soneium-minato\",\n [Network.WORLDCHAIN_MAINNET]: \"worldchain-mainnet\",\n [Network.WORLDCHAIN_SEPOLIA]: \"worldchain-sepolia\",\n [Network.ROOTSTOCK_MAINNET]: \"rootstock-mainnet\",\n [Network.ROOTSTOCK_TESTNET]: \"rootstock-testnet\",\n [Network.FLOW_MAINNET]: \"flow-mainnet\",\n [Network.FLOW_TESTNET]: \"flow-testnet\",\n [Network.ZORA_MAINNET]: \"zora-mainnet\",\n [Network.ZORA_SEPOLIA]: \"zora-sepolia\",\n [Network.FRAX_MAINNET]: \"frax-mainnet\",\n [Network.FRAX_SEPOLIA]: \"frax-sepolia\",\n [Network.POLYNOMIAL_MAINNET]: \"polynomial-mainnet\",\n [Network.POLYNOMIAL_SEPOLIA]: \"polynomial-sepolia\",\n [Network.CROSSFI_MAINNET]: \"crossfi-mainnet\",\n [Network.CROSSFI_TESTNET]: \"crossfi-testnet\",\n [Network.APECHAIN_MAINNET]: \"apechain-mainnet\",\n [Network.APECHAIN_CURTIS]: \"apechain-curtis\",\n [Network.LENS_MAINNET]: \"lens-mainnet\",\n [Network.LENS_SEPOLIA]: \"lens-sepolia\",\n [Network.GEIST_MAINNET]: \"geist-mainnet\",\n [Network.GEIST_POLTER]: \"geist-polter\",\n [Network.LUMIA_PRISM]: \"lumia-prism\",\n [Network.LUMIA_TESTNET]: \"lumia-testnet\",\n [Network.UNICHAIN_MAINNET]: \"unichain-mainnet\",\n [Network.UNICHAIN_SEPOLIA]: \"unichain-sepolia\",\n [Network.SONIC_MAINNET]: \"sonic-mainnet\",\n [Network.SONIC_BLAZE]: \"sonic-blaze\",\n [Network.XMTP_TESTNET]: \"xmtp-testnet\",\n [Network.ABSTRACT_MAINNET]: \"abstract-mainnet\",\n [Network.ABSTRACT_TESTNET]: \"abstract-testnet\",\n [Network.DEGEN_MAINNET]: \"degen-mainnet\",\n [Network.INK_MAINNET]: \"ink-mainnet\",\n [Network.INK_SEPOLIA]: \"ink-sepolia\",\n [Network.SEI_MAINNET]: \"sei-mainnet\",\n [Network.SEI_TESTNET]: \"sei-testnet\",\n [Network.RONIN_MAINNET]: \"ronin-mainnet\",\n [Network.RONIN_SAIGON]: \"ronin-saigon\",\n [Network.MONAD_TESTNET]: \"monad-testnet\",\n [Network.SETTLUS_MAINNET]: \"settlus-mainnet\",\n [Network.SETTLUS_SEPTESTNET]: \"settlus-septestnet\",\n [Network.GENSYN_TESTNET]: \"gensyn-testnet\",\n [Network.SUPERSEED_MAINNET]: \"superseed-mainnet\",\n [Network.SUPERSEED_SEPOLIA]: \"superseed-sepolia\",\n [Network.TEA_SEPOLIA]: \"tea-sepolia\",\n [Network.ANIME_MAINNET]: \"anime-mainnet\",\n [Network.ANIME_SEPOLIA]: \"anime-sepolia\",\n [Network.STORY_MAINNET]: \"story-mainnet\",\n [Network.STORY_AENEID]: \"story-aeneid\",\n [Network.MEGAETH_TESTNET]: \"megaeth-testnet\",\n [Network.BOTANIX_MAINNET]: \"botanix-mainnet\",\n [Network.BOTANIX_TESTNET]: \"botanix-testnet\",\n [Network.HUMANITY_MAINNET]: \"humanity-mainnet\",\n [Network.RISE_TESTNET]: \"rise-testnet\"\n };\n CustomNetworks = {\n \"arbitrum-goerli\": {\n chainId: 421613,\n name: \"arbitrum-goerli\"\n },\n \"arbitrum-sepolia\": {\n chainId: 421614,\n name: \"arbitrum-sepolia\"\n },\n \"astar-mainnet\": {\n chainId: 592,\n name: \"astar-mainnet\"\n },\n sepolia: {\n chainId: 11155111,\n name: \"sepolia\"\n },\n holesky: {\n chainId: 17e3,\n name: \"holesky\"\n },\n hoodi: {\n chainId: 560048,\n name: \"hoodi\"\n },\n \"opt-mainnet\": {\n chainId: 10,\n name: \"opt-mainnet\"\n },\n \"optimism-sepolia\": {\n chainId: 11155420,\n name: \"optimism-sepolia\"\n },\n \"polygonzkevm-mainnet\": {\n chainId: 1101,\n name: \"polygonzkevm-mainnet\"\n },\n \"polygonzkevm-testnet\": {\n chainId: 1442,\n name: \"polygonzkevm-testnet\"\n },\n \"polygonzkevm-cardona\": {\n chainId: 2442,\n name: \"polygonzkevm-cardona\"\n },\n \"base-mainnet\": {\n chainId: 8453,\n name: \"base-mainnet\"\n },\n \"base-goerli\": {\n chainId: 84531,\n name: \"base-goerli\"\n },\n \"base-sepolia\": {\n chainId: 84532,\n name: \"base-sepolia\"\n },\n maticamoy: {\n chainId: 80002,\n name: \"maticamoy\"\n },\n \"zksync-mainnet\": {\n chainId: 324,\n name: \"zksync-mainnet\"\n },\n \"zksync-sepolia\": {\n chainId: 300,\n name: \"zksync-sepolia\"\n },\n \"shape-mainnet\": {\n chainId: 360,\n name: \"shape-mainnet\"\n },\n \"shape-sepolia\": {\n chainId: 11011,\n name: \"shape-sepolia\"\n },\n \"linea-mainnet\": {\n chainId: 59144,\n name: \"linea-mainnet\"\n },\n \"linea-sepolia\": {\n chainId: 59141,\n name: \"linea-sepolia\"\n },\n \"fantom-mainnet\": {\n chainId: 250,\n name: \"fantom-mainnet\"\n },\n \"fantom-testnet\": {\n chainId: 4002,\n name: \"fantom-testnet\"\n },\n \"zetachain-mainnet\": {\n chainId: 7e3,\n name: \"zetachain-mainnet\"\n },\n \"zetachain-testnet\": {\n chainId: 7001,\n name: \"zetachain-testnet\"\n },\n \"arbnova-mainnet\": {\n chainId: 42170,\n name: \"arbnova-mainnet\"\n },\n \"blast-mainnet\": {\n chainId: 81457,\n name: \"blast-mainnet\"\n },\n \"blast-sepolia\": {\n chainId: 168587773,\n name: \"blast-sepolia\"\n },\n \"mantle-mainnet\": {\n chainId: 5e3,\n name: \"mantle-mainnet\"\n },\n \"mantle-sepolia\": {\n chainId: 5003,\n name: \"mantle-sepolia\"\n },\n \"scroll-mainnet\": {\n chainId: 534352,\n name: \"scroll-mainnet\"\n },\n \"scroll-sepolia\": {\n chainId: 534351,\n name: \"scroll-sepolia\"\n },\n \"gnosis-mainnet\": {\n chainId: 100,\n name: \"gnosis-mainnet\"\n },\n \"gnosis-chiado\": {\n chainId: 10200,\n name: \"gnosis-chiado\"\n },\n \"bnb-mainnet\": {\n chainId: 56,\n name: \"bnb-mainnet\"\n },\n \"bnb-testnet\": {\n chainId: 97,\n name: \"bnb-testnet\"\n },\n \"avax-mainnet\": {\n chainId: 43114,\n name: \"avax-mainnet\"\n },\n \"avax-fuji\": {\n chainId: 43113,\n name: \"avax-fuji\"\n },\n \"celo-mainnet\": {\n chainId: 42220,\n name: \"celo-mainnet\"\n },\n \"celo-alfajores\": {\n chainId: 44787,\n name: \"celo-alfajores\"\n },\n \"celo-baklava\": {\n chainId: 62320,\n name: \"celo-baklava\"\n },\n \"metis-mainnet\": {\n chainId: 1088,\n name: \"metis-mainnet\"\n },\n \"opbnb-mainnet\": {\n chainId: 204,\n name: \"opbnb-mainnet\"\n },\n \"opbnb-testnet\": {\n chainId: 5611,\n name: \"opbnb-testnet\"\n },\n \"berachain-bartio\": {\n chainId: 80084,\n name: \"berachain-bartio\"\n },\n \"berachain-mainnet\": {\n chainId: 80094,\n name: \"berachain-mainnet\"\n },\n \"berachain-bepolia\": {\n chainId: 80069,\n name: \"berachain-bepolia\"\n },\n \"soneium-mainnet\": {\n chainId: 1868,\n name: \"soneium-mainnet\"\n },\n \"soneium-minato\": {\n chainId: 1946,\n name: \"soneium-minato\"\n },\n \"worldchain-mainnet\": {\n chainId: 480,\n name: \"worldchain-mainnet\"\n },\n \"worldchain-sepolia\": {\n chainId: 4801,\n name: \"worldchain-sepolia\"\n },\n \"rootstock-mainnet\": {\n chainId: 30,\n name: \"rootstock-mainnet\"\n },\n \"rootstock-testnet\": {\n chainId: 31,\n name: \"rootstock-testnet\"\n },\n \"flow-mainnet\": {\n chainId: 747,\n name: \"flow-mainnet\"\n },\n \"flow-testnet\": {\n chainId: 545,\n name: \"flow-testnet\"\n },\n \"zora-mainnet\": {\n chainId: 7777777,\n name: \"zora-mainnet\"\n },\n \"zora-sepolia\": {\n chainId: 999999999,\n name: \"zora-sepolia\"\n },\n \"frax-mainnet\": {\n chainId: 252,\n name: \"frax-mainnet\"\n },\n \"frax-sepolia\": {\n chainId: 2522,\n name: \"frax-sepolia\"\n },\n \"polynomial-mainnet\": {\n chainId: 8008,\n name: \"polynomial-mainnet\"\n },\n \"polynomial-sepolia\": {\n chainId: 8009,\n name: \"polynomial-sepolia\"\n },\n \"crossfi-mainnet\": {\n chainId: 4158,\n name: \"crossfi-mainnet\"\n },\n \"crossfi-testnet\": {\n chainId: 4157,\n name: \"crossfi-testnet\"\n },\n \"apechain-mainnet\": {\n chainId: 33139,\n name: \"apechain-mainnet\"\n },\n \"apechain-curtis\": {\n chainId: 33111,\n name: \"apechain-curtis\"\n },\n \"lens-mainnet\": {\n chainId: 232,\n name: \"lens-mainnet\"\n },\n \"lens-sepolia\": {\n chainId: 37111,\n name: \"lens-sepolia\"\n },\n \"geist-mainnet\": {\n chainId: 63157,\n name: \"geist-mainnet\"\n },\n \"geist-polter\": {\n chainId: 631571,\n name: \"geist-polter\"\n },\n \"lumia-prism\": {\n chainId: 994873017,\n name: \"lumia-prism\"\n },\n \"lumia-testnet\": {\n chainId: 1952959480,\n name: \"lumia-testnet\"\n },\n \"unichain-mainnet\": {\n chainId: 130,\n name: \"unichain-mainnet\"\n },\n \"unichain-sepolia\": {\n chainId: 1301,\n name: \"unichain-sepolia\"\n },\n \"sonic-mainnet\": {\n chainId: 146,\n name: \"sonic-mainnet\"\n },\n \"sonic-blaze\": {\n chainId: 57054,\n name: \"sonic-blaze\"\n },\n \"xmtp-testnet\": {\n chainId: 241320161,\n name: \"xmtp-testnet\"\n },\n \"abstract-mainnet\": {\n chainId: 2741,\n name: \"abstract-mainnet\"\n },\n \"abstract-testnet\": {\n chainId: 11124,\n name: \"abstract-testnet\"\n },\n \"degen-mainnet\": {\n chainId: 666666666,\n name: \"degen-mainnet\"\n },\n \"ink-mainnet\": {\n chainId: 57073,\n name: \"ink-mainnet\"\n },\n \"ink-sepolia\": {\n chainId: 763373,\n name: \"ink-sepolia\"\n },\n \"sei-mainnet\": {\n chainId: 1329,\n name: \"sei-mainnet\"\n },\n \"sei-testnet\": {\n chainId: 1328,\n name: \"sei-testnet\"\n },\n \"ronin-mainnet\": {\n chainId: 2020,\n name: \"ronin-mainnet\"\n },\n \"ronin-saigon\": {\n chainId: 2021,\n name: \"ronin-saigon\"\n },\n \"monad-testnet\": {\n chainId: 10143,\n name: \"monad-testnet\"\n },\n \"settlus-mainnet\": {\n chainId: 5371,\n name: \"settlus-mainnet\"\n },\n \"settlus-septestnet\": {\n chainId: 5373,\n name: \"settlus-septestnet\"\n },\n \"gensyn-testnet\": {\n chainId: 685685,\n name: \"gensyn-testnet\"\n },\n \"superseed-mainnet\": {\n chainId: 5330,\n name: \"superseed-mainnet\"\n },\n \"superseed-sepolia\": {\n chainId: 53302,\n name: \"superseed-sepolia\"\n },\n \"tea-sepolia\": {\n chainId: 10218,\n name: \"tea-sepolia\"\n },\n \"anime-mainnet\": {\n chainId: 69e3,\n name: \"anime-mainnet\"\n },\n \"anime-sepolia\": {\n chainId: 6900,\n name: \"anime-sepolia\"\n },\n \"story-mainnet\": {\n chainId: 1514,\n name: \"story-mainnet\"\n },\n \"story-aeneid\": {\n chainId: 1315,\n name: \"story-aeneid\"\n },\n \"megaeth-testnet\": {\n chainId: 6342,\n name: \"megaeth-testnet\"\n },\n \"botanix-mainnet\": {\n chainId: 3636,\n name: \"botanix-mainnet\"\n },\n \"botanix-testnet\": {\n chainId: 3637,\n name: \"botanix-testnet\"\n },\n \"humanity-mainnet\": {\n chainId: 6985385,\n name: \"humanity-mainnet\"\n },\n \"rise-testnet\": {\n chainId: 11155931,\n name: \"rise-testnet\"\n }\n };\n ETH_NULL_VALUE = \"0x\";\n ETH_NULL_ADDRESS = \"0x0000000000000000000000000000000000000000\";\n AlchemyConfig = class {\n constructor(config2) {\n this.apiKey = (config2 === null || config2 === void 0 ? void 0 : config2.apiKey) || DEFAULT_ALCHEMY_API_KEY;\n this.network = (config2 === null || config2 === void 0 ? void 0 : config2.network) || DEFAULT_NETWORK;\n this.maxRetries = (config2 === null || config2 === void 0 ? void 0 : config2.maxRetries) || DEFAULT_MAX_RETRIES;\n this.url = config2 === null || config2 === void 0 ? void 0 : config2.url;\n this.authToken = config2 === null || config2 === void 0 ? void 0 : config2.authToken;\n this.batchRequests = (config2 === null || config2 === void 0 ? void 0 : config2.batchRequests) || false;\n this.requestTimeout = (config2 === null || config2 === void 0 ? void 0 : config2.requestTimeout) || DEFAULT_REQUEST_TIMEOUT;\n this.connectionInfoOverrides = config2 === null || config2 === void 0 ? void 0 : config2.connectionInfoOverrides;\n }\n /**\n * Returns the URL endpoint to send the HTTP request to. If a custom URL was\n * provided in the config, that URL is returned. Otherwise, the default URL is\n * from the network and API key.\n *\n * @param apiType - The type of API to get the URL for.\n * @internal\n */\n _getRequestUrl(apiType) {\n if (this.url !== void 0) {\n return this.url;\n } else if (apiType === AlchemyApiType.NFT) {\n return getAlchemyNftHttpUrl(this.network, this.apiKey);\n } else if (apiType === AlchemyApiType.WEBHOOK) {\n return getAlchemyWebhookHttpUrl();\n } else if (apiType === AlchemyApiType.PRICES) {\n return getPricesBaseUrl(this.apiKey);\n } else if (apiType === AlchemyApiType.PORTFOLIO) {\n return getDataBaseUrl(this.apiKey);\n } else {\n return getAlchemyHttpUrl(this.network, this.apiKey);\n }\n }\n /**\n * Returns an AlchemyProvider instance. Only one provider is created per\n * Alchemy instance.\n *\n * The AlchemyProvider is a wrapper around ether's `AlchemyProvider` class and\n * has been expanded to support Alchemy's Enhanced APIs.\n *\n * Most common methods on the provider are available as top-level methods on\n * the {@link Alchemy} instance, but the provider is exposed here to access\n * other less-common methods.\n *\n * @public\n */\n getProvider() {\n if (!this._baseAlchemyProvider) {\n this._baseAlchemyProvider = (() => __awaiter$1(this, void 0, void 0, function* () {\n const { AlchemyProvider: AlchemyProvider2 } = yield Promise.resolve().then(() => (init_alchemy_provider_6bbed8a2(), alchemy_provider_6bbed8a2_exports));\n return new AlchemyProvider2(this);\n }))();\n }\n return this._baseAlchemyProvider;\n }\n /**\n * Returns an AlchemyWebsocketProvider instance. Only one provider is created\n * per Alchemy instance.\n *\n * The AlchemyWebSocketProvider is a wrapper around ether's\n * `AlchemyWebSocketProvider` class and has been expanded to support Alchemy's\n * Subscription APIs, automatic backfilling, and other performance improvements.\n *\n * Most common methods on the provider are available as top-level methods on\n * the {@link Alchemy} instance, but the provider is exposed here to access\n * other less-common methods.\n */\n getWebSocketProvider() {\n if (!this._baseAlchemyWssProvider) {\n this._baseAlchemyWssProvider = (() => __awaiter$1(this, void 0, void 0, function* () {\n const { AlchemyWebSocketProvider: AlchemyWebSocketProvider2 } = yield Promise.resolve().then(() => (init_alchemy_websocket_provider_bdfaf8f9(), alchemy_websocket_provider_bdfaf8f9_exports));\n return new AlchemyWebSocketProvider2(this);\n }))();\n }\n return this._baseAlchemyWssProvider;\n }\n };\n version$12 = \"logger/5.7.0\";\n _permanentCensorErrors2 = false;\n _censorErrors2 = false;\n LogLevels2 = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\n _logLevel2 = LogLevels2[\"default\"];\n _globalLogger2 = null;\n _normalizeError2 = _checkNormalize2();\n (function(LogLevel4) {\n LogLevel4[\"DEBUG\"] = \"DEBUG\";\n LogLevel4[\"INFO\"] = \"INFO\";\n LogLevel4[\"WARNING\"] = \"WARNING\";\n LogLevel4[\"ERROR\"] = \"ERROR\";\n LogLevel4[\"OFF\"] = \"OFF\";\n })(LogLevel$1 || (LogLevel$1 = {}));\n (function(ErrorCode3) {\n ErrorCode3[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n ErrorCode3[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n ErrorCode3[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n ErrorCode3[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n ErrorCode3[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n ErrorCode3[\"TIMEOUT\"] = \"TIMEOUT\";\n ErrorCode3[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n ErrorCode3[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ErrorCode3[\"MISSING_NEW\"] = \"MISSING_NEW\";\n ErrorCode3[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n ErrorCode3[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n ErrorCode3[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ErrorCode3[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n ErrorCode3[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n ErrorCode3[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n ErrorCode3[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n ErrorCode3[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n ErrorCode3[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ErrorCode3[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n })(ErrorCode2 || (ErrorCode2 = {}));\n HEX2 = \"0123456789abcdef\";\n Logger$1 = class _Logger$1 {\n constructor(version8) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version8,\n writable: false\n });\n }\n _log(logLevel, args) {\n const level = logLevel.toLowerCase();\n if (LogLevels2[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel2 > LogLevels2[level]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(_Logger$1.levels.DEBUG, args);\n }\n info(...args) {\n this._log(_Logger$1.levels.INFO, args);\n }\n warn(...args) {\n this._log(_Logger$1.levels.WARNING, args);\n }\n makeError(message, code, params) {\n if (_censorErrors2) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = _Logger$1.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i3 = 0; i3 < value.length; i3++) {\n hex += HEX2[value[i3] >> 4];\n hex += HEX2[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 const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode2.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const 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 ErrorCode2.CALL_EXCEPTION:\n case ErrorCode2.INSUFFICIENT_FUNDS:\n case ErrorCode2.MISSING_NEW:\n case ErrorCode2.NONCE_EXPIRED:\n case ErrorCode2.REPLACEMENT_UNDERPRICED:\n case ErrorCode2.TRANSACTION_REPLACED:\n case ErrorCode2.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 const 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 throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, _Logger$1.errors.INVALID_ARGUMENT, {\n argument: name,\n value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (_normalizeError2) {\n this.throwError(\"platform missing String.prototype.normalize\", _Logger$1.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\",\n form: _normalizeError2\n });\n }\n }\n checkSafeUint53(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, _Logger$1.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value\n });\n }\n if (value % 1) {\n this.throwError(message, _Logger$1.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value\n });\n }\n }\n checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, _Logger$1.errors.MISSING_ARGUMENT, {\n count,\n expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, _Logger$1.errors.UNEXPECTED_ARGUMENT, {\n count,\n expectedCount\n });\n }\n }\n checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", _Logger$1.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", _Logger$1.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", _Logger$1.errors.MISSING_NEW, { name: kind.name });\n }\n }\n static globalLogger() {\n if (!_globalLogger2) {\n _globalLogger2 = new _Logger$1(version$12);\n }\n return _globalLogger2;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", _Logger$1.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors2) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", _Logger$1.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors2 = !!censorship;\n _permanentCensorErrors2 = !!permanent;\n }\n static setLogLevel(logLevel) {\n const level = LogLevels2[logLevel.toLowerCase()];\n if (level == null) {\n _Logger$1.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel2 = level;\n }\n static from(version8) {\n return new _Logger$1(version8);\n }\n };\n Logger$1.errors = ErrorCode2;\n Logger$1.levels = LogLevel$1;\n version6 = \"properties/5.7.0\";\n __awaiter2 = 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 (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\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 logger2 = new Logger$1(version6);\n opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n IS_BROWSER = typeof window !== \"undefined\" && window !== null;\n CoreNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Returns the balance of a given address as of the provided block.\n *\n * @param addressOrName The address or name of the account to get the balance for.\n * @param blockTag The optional block number or hash to get the balance for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n getBalance(addressOrName, blockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getBalance(addressOrName, blockTag);\n });\n }\n /**\n * Checks if the provided address is a smart contract.\n *\n * @param address The address to check type for.\n * @public\n */\n isContractAddress(address) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const code = yield provider.getCode(address);\n return code !== \"0x\";\n });\n }\n /**\n * Returns the contract code of the provided address at the block. If there is\n * no contract deployed, the result is `0x`.\n *\n * @param addressOrName The address or name of the account to get the code for.\n * @param blockTag The optional block number or hash to get the code for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n getCode(addressOrName, blockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getCode(addressOrName, blockTag);\n });\n }\n /**\n * Return the value of the provided position at the provided address, at the\n * provided block in `Bytes32` format.\n *\n * @param addressOrName The address or name of the account to get the code for.\n * @param position The position of the storage slot to get.\n * @param blockTag The optional block number or hash to get the code for.\n * Defaults to 'latest' if unspecified.\n * @public\n */\n getStorageAt(addressOrName, position, blockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getStorageAt(addressOrName, position, blockTag);\n });\n }\n /**\n * Returns the number of transactions ever sent from the provided address, as\n * of the provided block tag. This value is used as the nonce for the next\n * transaction from the address sent to the network.\n *\n * @param addressOrName The address or name of the account to get the nonce for.\n * @param blockTag The optional block number or hash to get the nonce for.\n * @public\n */\n getTransactionCount(addressOrName, blockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getTransactionCount(addressOrName, blockTag);\n });\n }\n /**\n * Returns the block from the network based on the provided block number or\n * hash. Transactions on the block are represented as an array of transaction\n * hashes. To get the full transaction details on the block, use\n * {@link getBlockWithTransactions} instead.\n *\n * @param blockHashOrBlockTag The block number or hash to get the block for.\n * @public\n */\n getBlock(blockHashOrBlockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getBlock(blockHashOrBlockTag);\n });\n }\n /**\n * Returns the block from the network based on the provided block number or\n * hash. Transactions on the block are represented as an array of\n * {@link TransactionResponse} objects.\n *\n * @param blockHashOrBlockTag The block number or hash to get the block for.\n * @public\n */\n getBlockWithTransactions(blockHashOrBlockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getBlockWithTransactions(blockHashOrBlockTag);\n });\n }\n /**\n * Returns the {@link EthersNetworkAlias} Alchemy is connected to.\n *\n * @public\n */\n getNetwork() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getNetwork();\n });\n }\n /**\n * Returns the block number of the most recently mined block.\n *\n * @public\n */\n getBlockNumber() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getBlockNumber();\n });\n }\n /**\n * Returns the best guess of the current gas price to use in a transaction.\n *\n * @public\n */\n getGasPrice() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getGasPrice();\n });\n }\n /**\n * Returns the recommended fee data to use in a transaction.\n *\n * For an EIP-1559 transaction, the maxFeePerGas and maxPriorityFeePerGas\n * should be used.\n *\n * For legacy transactions and networks which do not support EIP-1559, the\n * gasPrice should be used.\n *\n * @public\n */\n getFeeData() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getFeeData();\n });\n }\n /**\n * Returns a Promise which will stall until the network has heen established,\n * ignoring errors due to the target node not being active yet.\n *\n * This can be used for testing or attaching scripts to wait until the node is\n * up and running smoothly.\n *\n * @public\n */\n ready() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.ready;\n });\n }\n /**\n * Returns the result of executing the transaction, using call. A call does\n * not require any ether, but cannot change any state. This is useful for\n * calling getters on Contracts.\n *\n * @param transaction The transaction to execute.\n * @param blockTag The optional block number or hash to get the call for.\n * @public\n */\n call(transaction, blockTag) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.call(transaction, blockTag);\n });\n }\n /**\n * Returns an estimate of the amount of gas that would be required to submit\n * transaction to the network.\n *\n * An estimate may not be accurate since there could be another transaction on\n * the network that was not accounted for, but after being mined affects the\n * relevant state.\n *\n * This is an alias for {@link TransactNamespace.estimateGas}.\n *\n * @param transaction The transaction to estimate gas for.\n * @public\n */\n estimateGas(transaction) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.estimateGas(transaction);\n });\n }\n /**\n * Returns the transaction with hash or null if the transaction is unknown.\n *\n * If a transaction has not been mined, this method will search the\n * transaction pool. Various backends may have more restrictive transaction\n * pool access (e.g. if the gas price is too low or the transaction was only\n * recently sent and not yet indexed) in which case this method may also return null.\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n getTransaction(transactionHash) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getTransaction(transactionHash);\n });\n }\n /**\n * Returns the transaction receipt for hash or null if the transaction has not\n * been mined.\n *\n * To stall until the transaction has been mined, consider the\n * waitForTransaction method below.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n getTransactionReceipt(transactionHash) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getTransactionReceipt(transactionHash);\n });\n }\n /**\n * Submits transaction to the network to be mined. The transaction must be\n * signed, and be valid (i.e. the nonce is correct and the account has\n * sufficient balance to pay for the transaction).\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param signedTransaction The signed transaction to send.\n * @public\n */\n sendTransaction(signedTransaction) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.sendTransaction(signedTransaction);\n });\n }\n /**\n * Returns a promise which will not resolve until specified transaction hash is mined.\n *\n * If {@link confirmations} is 0, this method is non-blocking and if the\n * transaction has not been mined returns null. Otherwise, this method will\n * block until the transaction has confirmed blocks mined on top of the block\n * in which it was mined.\n *\n * NOTE: This is an alias for {@link TransactNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to wait for.\n * @param confirmations The number of blocks to wait for.\n * @param timeout The maximum time to wait for the transaction to confirm.\n * @public\n */\n waitForTransaction(transactionHash, confirmations, timeout) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.waitForTransaction(transactionHash, confirmations, timeout);\n });\n }\n /**\n * Returns an array of logs that match the provided filter.\n *\n * @param filter The filter object to use.\n * @public\n */\n getLogs(filter2) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return getLogs2(this.config, filter2);\n });\n }\n /**\n * Allows sending a raw message to the Alchemy backend.\n *\n * @param method The method to call.\n * @param params The parameters to pass to the method.\n * @public\n */\n send(method, params) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.send(method, params);\n });\n }\n /**\n * Finds the address that deployed the provided contract and block number it\n * was deployed in.\n *\n * NOTE: This method performs a binary search across all blocks since genesis\n * and can take a long time to complete. This method is a convenience method\n * that will eventually be replaced by a single call to an Alchemy endpoint\n * with this information cached.\n *\n * @param contractAddress - The contract address to find the deployer for.\n * @beta\n */\n findContractDeployer(contractAddress) {\n var _a2;\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const currentBlockNum = yield provider.getBlockNumber();\n if ((yield provider.getCode(contractAddress, currentBlockNum)) === ETH_NULL_VALUE) {\n throw new Error(`Contract '${contractAddress}' does not exist`);\n }\n const firstBlock = yield binarySearchFirstBlock(0, currentBlockNum + 1, contractAddress, this.config);\n const txReceipts = yield getTransactionReceipts(this.config, {\n blockNumber: toHex2(firstBlock)\n }, \"findContractDeployer\");\n const matchingReceipt = (_a2 = txReceipts.receipts) === null || _a2 === void 0 ? void 0 : _a2.find((receipt) => receipt.contractAddress === contractAddress.toLowerCase());\n return {\n deployerAddress: matchingReceipt === null || matchingReceipt === void 0 ? void 0 : matchingReceipt.from,\n blockNumber: firstBlock\n };\n });\n }\n getTokenBalances(addressOrName, contractAddressesOrOptions) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const address = yield provider._getAddress(addressOrName);\n if (Array.isArray(contractAddressesOrOptions)) {\n if (contractAddressesOrOptions.length > 1500) {\n throw new Error(\"You cannot pass in more than 1500 contract addresses to getTokenBalances()\");\n }\n if (contractAddressesOrOptions.length === 0) {\n throw new Error(\"getTokenBalances() requires at least one contractAddress when using an array\");\n }\n return provider._send(\"alchemy_getTokenBalances\", [address, contractAddressesOrOptions], \"getTokenBalances\");\n } else {\n const tokenType = contractAddressesOrOptions === void 0 ? TokenBalanceType.ERC20 : contractAddressesOrOptions.type;\n const params = [address, tokenType];\n if ((contractAddressesOrOptions === null || contractAddressesOrOptions === void 0 ? void 0 : contractAddressesOrOptions.type) === TokenBalanceType.ERC20 && contractAddressesOrOptions.pageKey) {\n params.push({ pageKey: contractAddressesOrOptions.pageKey });\n }\n return provider._send(\"alchemy_getTokenBalances\", params, \"getTokenBalances\");\n }\n });\n }\n /**\n * Returns the tokens that the specified address owns, along with the amount\n * of each token and the relevant metadata.\n *\n * @param addressOrName The owner address to get the tokens with balances for.\n * @param options Additional options to pass to the request.\n * @public\n */\n getTokensForOwner(addressOrName, options) {\n var _a2;\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const address = yield provider._getAddress(addressOrName);\n const params = [\n address,\n (_a2 = options === null || options === void 0 ? void 0 : options.contractAddresses) !== null && _a2 !== void 0 ? _a2 : TokenBalanceType.ERC20\n ];\n if (options === null || options === void 0 ? void 0 : options.pageKey) {\n params.push({ pageKey: options.pageKey });\n }\n const response = yield provider._send(\"alchemy_getTokenBalances\", params, \"getTokensForOwner\");\n const formattedBalances = response.tokenBalances.map((balance) => ({\n contractAddress: balance.contractAddress,\n rawBalance: import_bignumber2.BigNumber.from(balance.tokenBalance).toString()\n }));\n const metadataPromises = yield Promise.allSettled(response.tokenBalances.map((token) => provider._send(\"alchemy_getTokenMetadata\", [token.contractAddress], \"getTokensForOwner\")));\n const metadata = metadataPromises.map((p4) => p4.status === \"fulfilled\" ? p4.value : {\n name: null,\n symbol: null,\n decimals: null,\n logo: null\n });\n const ownedTokens = formattedBalances.map((balance, index2) => Object.assign(Object.assign(Object.assign({}, balance), metadata[index2]), { balance: metadata[index2].decimals !== null ? (0, import_units.formatUnits)(balance.rawBalance, metadata[index2].decimals) : void 0 }));\n return {\n tokens: ownedTokens.map((t3) => nullsToUndefined(t3)),\n pageKey: response.pageKey\n };\n });\n }\n /**\n * Returns metadata for a given token contract address.\n *\n * @param address The contract address to get metadata for.\n * @public\n */\n getTokenMetadata(address) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider._send(\"alchemy_getTokenMetadata\", [address], \"getTokenMetadata\");\n });\n }\n getAssetTransfers(params) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return getAssetTransfers(this.config, params);\n });\n }\n /**\n * Gets all transaction receipts for a given block by number or block hash.\n *\n * @param params An object containing fields for the transaction receipt query.\n * @public\n */\n getTransactionReceipts(params) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return getTransactionReceipts(this.config, params);\n });\n }\n /**\n * Returns the underlying owner address for the provided ENS address, or `null`\n * if the ENS name does not have an underlying address.\n *\n * @param name The ENS address name to resolve.\n */\n resolveName(name) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.resolveName(name);\n });\n }\n /**\n * Performs a reverse lookup of the address in ENS using the Reverse Registrar. If the name does not exist, or the forward lookup does not match, null is returned.\n *\n * An ENS name requires additional configuration to setup a reverse record, so not all ENS addresses will map back to the original ENS domain.\n *\n * @param address The address to look up the ENS domain name for.\n */\n lookupAddress(address) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.lookupAddress(address);\n });\n }\n };\n DebugNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n traceCall(transaction, blockIdentifier, tracer) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = [transaction, blockIdentifier, parseTracerParams(tracer)];\n return provider._send(\"debug_traceCall\", params, \"traceCall\");\n });\n }\n traceTransaction(transactionHash, tracer, timeout) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = [transactionHash, parseTracerParams(tracer, timeout)];\n return provider._send(\"debug_traceTransaction\", params, \"traceTransaction\");\n });\n }\n traceBlock(blockIdentifier, tracer) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n let method;\n let params;\n if ((0, import_bytes4.isHexString)(blockIdentifier, 32)) {\n method = \"debug_traceBlockByHash\";\n params = [blockIdentifier, parseTracerParams(tracer)];\n } else {\n method = \"debug_traceBlockByNumber\";\n const block = typeof blockIdentifier === \"number\" ? (0, import_bytes4.hexStripZeros)((0, import_bytes4.hexValue)(blockIdentifier)) : blockIdentifier;\n params = [block, parseTracerParams(tracer)];\n }\n return provider._send(method, params, \"traceBlock\");\n });\n }\n };\n (function(LogLevel4) {\n LogLevel4[LogLevel4[\"DEBUG\"] = 0] = \"DEBUG\";\n LogLevel4[LogLevel4[\"INFO\"] = 1] = \"INFO\";\n LogLevel4[LogLevel4[\"WARN\"] = 2] = \"WARN\";\n LogLevel4[LogLevel4[\"ERROR\"] = 3] = \"ERROR\";\n LogLevel4[LogLevel4[\"SILENT\"] = 4] = \"SILENT\";\n })(LogLevel3 || (LogLevel3 = {}));\n logLevelStringToEnum = {\n debug: LogLevel3.DEBUG,\n info: LogLevel3.INFO,\n warn: LogLevel3.WARN,\n error: LogLevel3.ERROR,\n silent: LogLevel3.SILENT\n };\n logLevelToConsoleFn = {\n [LogLevel3.DEBUG]: \"log\",\n [LogLevel3.INFO]: \"info\",\n [LogLevel3.WARN]: \"warn\",\n [LogLevel3.ERROR]: \"error\"\n };\n DEFAULT_LOG_LEVEL = LogLevel3.INFO;\n Logger3 = class {\n constructor() {\n this._logLevel = DEFAULT_LOG_LEVEL;\n }\n get logLevel() {\n return this._logLevel;\n }\n set logLevel(val) {\n if (!(val in LogLevel3)) {\n throw new TypeError(`Invalid value \"${val}\" assigned to \\`logLevel\\``);\n }\n this._logLevel = val;\n }\n debug(...args) {\n this._log(LogLevel3.DEBUG, ...args);\n }\n info(...args) {\n this._log(LogLevel3.INFO, ...args);\n }\n warn(...args) {\n this._log(LogLevel3.WARN, ...args);\n }\n error(...args) {\n this._log(LogLevel3.ERROR, ...args);\n }\n /**\n * Forwards log messages to their corresponding console counterparts if the\n * log level allows it.\n */\n _log(logLevel, ...args) {\n if (logLevel < this._logLevel) {\n return;\n }\n const now2 = (/* @__PURE__ */ new Date()).toISOString();\n const method = logLevelToConsoleFn[logLevel];\n if (method) {\n console[method](`[${now2}] Alchemy:`, ...args.map(stringify3));\n } else {\n throw new Error(`Logger received an invalid logLevel (value: ${logLevel})`);\n }\n }\n };\n loggerClient = new Logger3();\n VERSION4 = \"3.6.2\";\n DEFAULT_BACKOFF_INITIAL_DELAY_MS = 1e3;\n DEFAULT_BACKOFF_MULTIPLIER = 1.5;\n DEFAULT_BACKOFF_MAX_DELAY_MS = 30 * 1e3;\n DEFAULT_BACKOFF_MAX_ATTEMPTS = 5;\n ExponentialBackoff = class {\n constructor(maxAttempts = DEFAULT_BACKOFF_MAX_ATTEMPTS) {\n this.maxAttempts = maxAttempts;\n this.initialDelayMs = DEFAULT_BACKOFF_INITIAL_DELAY_MS;\n this.backoffMultiplier = DEFAULT_BACKOFF_MULTIPLIER;\n this.maxDelayMs = DEFAULT_BACKOFF_MAX_DELAY_MS;\n this.numAttempts = 0;\n this.currentDelayMs = 0;\n this.isInBackoff = false;\n }\n /**\n * Returns a promise that resolves after the the backoff delay. The delay is\n * increased for each attempt. The promise is rejected if the maximum number\n * of attempts is exceeded.\n */\n // TODO: beautify this into an async iterator.\n backoff() {\n if (this.numAttempts >= this.maxAttempts) {\n return Promise.reject(new Error(`Exceeded maximum number of attempts: ${this.maxAttempts}`));\n }\n if (this.isInBackoff) {\n return Promise.reject(new Error(\"A backoff operation is already in progress\"));\n }\n const backoffDelayWithJitterMs = this.withJitterMs(this.currentDelayMs);\n if (backoffDelayWithJitterMs > 0) {\n logDebug(\"ExponentialBackoff.backoff\", `Backing off for ${backoffDelayWithJitterMs}ms`);\n }\n this.currentDelayMs *= this.backoffMultiplier;\n this.currentDelayMs = Math.max(this.currentDelayMs, this.initialDelayMs);\n this.currentDelayMs = Math.min(this.currentDelayMs, this.maxDelayMs);\n this.numAttempts += 1;\n return new Promise((resolve) => {\n this.isInBackoff = true;\n setTimeout(() => {\n this.isInBackoff = false;\n resolve();\n }, backoffDelayWithJitterMs);\n });\n }\n /**\n * Applies +/- 50% jitter to the backoff delay, up to the max delay cap.\n *\n * @private\n * @param delayMs\n */\n withJitterMs(delayMs) {\n return Math.min(delayMs + (Math.random() - 0.5) * delayMs, this.maxDelayMs);\n }\n };\n NftNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n getNftMetadata(contractAddress, tokenId, optionsOrTokenType, tokenUriTimeoutInMs) {\n let options;\n if (typeof optionsOrTokenType === \"object\") {\n options = {\n tokenType: optionsOrTokenType.tokenType,\n tokenUriTimeoutInMs: optionsOrTokenType.tokenUriTimeoutInMs,\n refreshCache: optionsOrTokenType.refreshCache\n };\n } else {\n options = {\n tokenType: optionsOrTokenType,\n tokenUriTimeoutInMs\n };\n }\n return getNftMetadata(this.config, contractAddress, tokenId, options);\n }\n /**\n * Gets the NFT metadata for multiple NFT tokens.\n *\n * @param tokens An array of NFT tokens to fetch metadata for.\n * @param options Configuration options for making the request.\n */\n getNftMetadataBatch(tokens, options) {\n return getNftMetadataBatch(this.config, tokens, options);\n }\n /**\n * Get the NFT contract metadata associated with the provided parameters.\n *\n * @param contractAddress - The contract address of the NFT.\n * @public\n */\n getContractMetadata(contractAddress) {\n return getContractMetadata(this.config, contractAddress);\n }\n /**\n * Get the NFT contract metadata for multiple NFT contracts in a single request.\n *\n * @param contractAddresses - An array of contract addresses to fetch metadata for.\n */\n getContractMetadataBatch(contractAddresses) {\n return getContractMetadataBatch(this.config, contractAddresses);\n }\n /**\n * Get the NFT collection metadata associated with the provided parameters.\n *\n * @param collectionSlug - The OpenSea collection slug of the NFT.\n * @beta\n */\n getCollectionMetadata(collectionSlug) {\n return getCollectionMetadata(this.config, collectionSlug);\n }\n getNftsForOwnerIterator(owner, options) {\n return getNftsForOwnerIterator(this.config, owner, options);\n }\n getNftsForOwner(owner, options) {\n return getNftsForOwner(this.config, owner, options);\n }\n getNftsForContract(contractAddress, options) {\n return getNftsForContract(this.config, contractAddress, options);\n }\n getNftsForContractIterator(contractAddress, options) {\n return getNftsForContractIterator(this.config, contractAddress, options);\n }\n getOwnersForContract(contractAddress, options) {\n return getOwnersForContract(this.config, contractAddress, options);\n }\n /**\n * Gets all the owners for a given NFT contract address and token ID.\n *\n * @param contractAddress - The NFT contract address.\n * @param tokenId - Token id of the NFT.\n * @param options - Optional parameters to use for the request.\n * @beta\n */\n getOwnersForNft(contractAddress, tokenId, options) {\n return getOwnersForNft(this.config, contractAddress, tokenId, options);\n }\n /**\n * Gets all NFT contracts held by the specified owner address.\n *\n * @param owner - Address for NFT owner (can be in ENS format!).\n * @param options - The optional parameters to use for the request.\n * @public\n */\n // TODO(v3): Add overload for withMetadata=false\n getContractsForOwner(owner, options) {\n return getContractsForOwner(this.config, owner, options);\n }\n /**\n * Gets all NFT transfers for a given owner's address.\n *\n * @param owner The owner to get transfers for.\n * @param category Whether to get transfers to or from the owner address.\n * @param options Additional options for the request.\n */\n getTransfersForOwner(owner, category, options) {\n return getTransfersForOwner(this.config, owner, category, options);\n }\n /**\n * Gets all NFT transfers for a given NFT contract address.\n *\n * Defaults to all transfers for the contract. To get transfers for a specific\n * block range, use {@link GetTransfersForContractOptions}.\n *\n * @param contract The NFT contract to get transfers for.\n * @param options Additional options for the request.\n */\n getTransfersForContract(contract, options) {\n return getTransfersForContract(this.config, contract, options);\n }\n /**\n * Get all the NFTs minted by a specified owner address.\n *\n * @param owner - Address for the NFT owner (can be in ENS format).\n * @param options - The optional parameters to use for the request.\n */\n getMintedNfts(owner, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n return getMintedNfts(this.config, owner, options);\n });\n }\n verifyNftOwnership(owner, contractAddress) {\n return verifyNftOwnership(this.config, owner, contractAddress);\n }\n /**\n * Returns whether a contract is marked as spam or not by Alchemy. For more\n * information on how we classify spam, go to our NFT API FAQ at\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n *\n * @param contractAddress - The contract address to check.\n */\n isSpamContract(contractAddress) {\n return isSpamContract(this.config, contractAddress);\n }\n /**\n * Returns a list of all spam contracts marked by Alchemy. For details on how\n * Alchemy marks spam contracts, go to\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n */\n getSpamContracts() {\n return getSpamContracts(this.config);\n }\n /**\n * Returns whether a contract is marked as spam or not by Alchemy. For more\n * information on how we classify spam, go to our NFT API FAQ at\n * https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-faq#nft-spam-classification.\n *\n * @param contractAddress - The contract address to check.\n */\n reportSpam(contractAddress) {\n return reportSpam(this.config, contractAddress);\n }\n /**\n * Returns whether a token is marked as an airdrop or not.\n * Airdrops are defined as NFTs that were minted to a user address in a transaction\n * sent by a different address.\n *\n * @param contractAddress - The contract address to check.\n * @param tokenId - Token id of the NFT.\n */\n isAirdropNft(contractAddress, tokenId) {\n return isAirdropNft(this.config, contractAddress, tokenId);\n }\n /**\n * Returns the floor prices of a NFT contract by marketplace.\n *\n * @param contractAddress - The contract address for the NFT collection.\n * @beta\n */\n getFloorPrice(contractAddress) {\n return getFloorPrice(this.config, contractAddress);\n }\n getNftSales(options) {\n return getNftSales(this.config, options);\n }\n /**\n * Get the rarity of each attribute of an NFT.\n *\n * @param contractAddress - Contract address for the NFT collection.\n * @param tokenId - Token id of the NFT.\n */\n computeRarity(contractAddress, tokenId) {\n return computeRarity(this.config, contractAddress, tokenId);\n }\n /**\n * Search for a keyword across metadata of all ERC-721 and ERC-1155 smart contracts.\n *\n * @param query - The search string that you want to search for in contract metadata.\n */\n searchContractMetadata(query) {\n return searchContractMetadata(this.config, query);\n }\n /**\n * Get a summary of attribute prevalence for an NFT collection.\n *\n * @param contractAddress - Contract address for the NFT collection.\n */\n summarizeNftAttributes(contractAddress) {\n return summarizeNftAttributes(this.config, contractAddress);\n }\n /**\n * Refreshes the cached metadata for a provided NFT contract address and token\n * id. Returns a boolean value indicating whether the metadata was refreshed.\n *\n * This method is useful when you want to refresh the metadata for a NFT that\n * has been updated since the last time it was fetched. Note that the backend\n * only allows one refresh per token every 15 minutes, globally for all users.\n * The last refresh time for an NFT can be accessed on the\n * {@link Nft.timeLastUpdated} field.\n *\n * To trigger a refresh for all NFTs in a contract, use {@link refreshContract} instead.\n *\n * @param contractAddress - The contract address of the NFT.\n * @param tokenId - The token id of the NFT.\n */\n refreshNftMetadata(contractAddress, tokenId) {\n return refreshNftMetadata(this.config, contractAddress, tokenId);\n }\n /**\n * Triggers a metadata refresh all NFTs in the provided contract address. This\n * method is useful after an NFT collection is revealed.\n *\n * Refreshes are queued on the Alchemy backend and may take time to fully\n * process. To refresh the metadata for a specific token, use the\n * {@link refreshNftMetadata} method instead.\n *\n * @param contractAddress - The contract address of the NFT collection.\n * @beta\n */\n refreshContract(contractAddress) {\n return refreshContract(this.config, contractAddress);\n }\n };\n NotifyNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Get all webhooks on your team.\n *\n * The team is determined by the `authToken` provided into the {@link AlchemySettings}\n * object when creating a new {@link Alchemy} instance.\n *\n * This method returns a response object containing all the webhooks\n */\n getAllWebhooks() {\n return __awaiter$1(this, void 0, void 0, function* () {\n this.verifyConfig();\n const response = yield this.sendWebhookRequest(\"team-webhooks\", \"getAllWebhooks\", {});\n return {\n webhooks: parseRawWebhookResponse(response),\n totalCount: response.data.length\n };\n });\n }\n getAddresses(webhookOrId, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n this.verifyConfig();\n const webhookId = typeof webhookOrId === \"string\" ? webhookOrId : webhookOrId.id;\n const response = yield this.sendWebhookRequest(\"webhook-addresses\", \"getAddresses\", {\n webhook_id: webhookId,\n limit: options === null || options === void 0 ? void 0 : options.limit,\n after: options === null || options === void 0 ? void 0 : options.pageKey\n });\n return parseRawAddressActivityResponse(response);\n });\n }\n getGraphqlQuery(webhookOrId) {\n return __awaiter$1(this, void 0, void 0, function* () {\n this.verifyConfig();\n const webhookId = typeof webhookOrId === \"string\" ? webhookOrId : webhookOrId.id;\n const response = yield this.sendWebhookRequest(\"dashboard-webhook-graphql-query\", \"getGraphqlQuery\", {\n webhook_id: webhookId\n });\n return parseRawCustomGraphqlWebhookResponse(response);\n });\n }\n getNftFilters(webhookOrId, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n this.verifyConfig();\n const webhookId = typeof webhookOrId === \"string\" ? webhookOrId : webhookOrId.id;\n const response = yield this.sendWebhookRequest(\"webhook-nft-filters\", \"getNftFilters\", {\n webhook_id: webhookId,\n limit: options === null || options === void 0 ? void 0 : options.limit,\n after: options === null || options === void 0 ? void 0 : options.pageKey\n });\n return parseRawNftFiltersResponse(response);\n });\n }\n updateWebhook(webhookOrId, update) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const webhookId = typeof webhookOrId === \"string\" ? webhookOrId : webhookOrId.id;\n let restApiName;\n let methodName;\n let method;\n let data;\n if (\"isActive\" in update) {\n restApiName = \"update-webhook\";\n methodName = \"updateWebhook\";\n method = \"PUT\";\n data = {\n webhook_id: webhookId,\n is_active: update.isActive\n };\n } else if (\"addFilters\" in update || \"removeFilters\" in update) {\n restApiName = \"update-webhook-nft-filters\";\n methodName = \"updateWebhookNftFilters\";\n method = \"PATCH\";\n data = {\n webhook_id: webhookId,\n nft_filters_to_add: update.addFilters ? update.addFilters.map(nftFilterToParam) : [],\n nft_filters_to_remove: update.removeFilters ? update.removeFilters.map(nftFilterToParam) : []\n };\n } else if (\"addMetadataFilters\" in update || \"removeMetadataFilters\" in update) {\n restApiName = \"update-webhook-nft-metadata-filters\";\n methodName = \"updateWebhookNftMetadataFilters\";\n method = \"PATCH\";\n data = {\n webhook_id: webhookId,\n nft_metadata_filters_to_add: update.addMetadataFilters ? update.addMetadataFilters.map(nftFilterToParam) : [],\n nft_metadata_filters_to_remove: update.removeMetadataFilters ? update.removeMetadataFilters.map(nftFilterToParam) : []\n };\n } else if (\"addAddresses\" in update || \"removeAddresses\" in update) {\n restApiName = \"update-webhook-addresses\";\n methodName = \"webhook:updateWebhookAddresses\";\n method = \"PATCH\";\n data = {\n webhook_id: webhookId,\n addresses_to_add: yield this.resolveAddresses(update.addAddresses),\n addresses_to_remove: yield this.resolveAddresses(update.removeAddresses)\n };\n } else if (\"newAddresses\" in update) {\n restApiName = \"update-webhook-addresses\";\n methodName = \"webhook:updateWebhookAddress\";\n method = \"PUT\";\n data = {\n webhook_id: webhookId,\n addresses: yield this.resolveAddresses(update.newAddresses)\n };\n } else {\n throw new Error(\"Invalid `update` param passed into `updateWebhook`\");\n }\n yield this.sendWebhookRequest(restApiName, methodName, {}, {\n method,\n data\n });\n });\n }\n createWebhook(url, type, params) {\n return __awaiter$1(this, void 0, void 0, function* () {\n let appId;\n if (type === WebhookType.MINED_TRANSACTION || type === WebhookType.DROPPED_TRANSACTION || type === WebhookType.GRAPHQL) {\n if (!(\"appId\" in params)) {\n throw new Error(\"Transaction and GraphQL Webhooks require an app id.\");\n }\n appId = params.appId;\n }\n let network = NETWORK_TO_WEBHOOK_NETWORK.get(this.config.network);\n let nftFilterObj;\n let addresses4;\n let graphqlQuery;\n let skipEmptyMessages;\n if (type === WebhookType.NFT_ACTIVITY || type === WebhookType.NFT_METADATA_UPDATE) {\n if (!(\"filters\" in params) || params.filters.length === 0) {\n throw new Error(\"Nft Activity Webhooks require a non-empty array input.\");\n }\n network = params.network ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) : network;\n const filters = params.filters.map((filter2) => filter2.tokenId ? {\n contract_address: filter2.contractAddress,\n token_id: import_bignumber2.BigNumber.from(filter2.tokenId).toString()\n } : {\n contract_address: filter2.contractAddress\n });\n nftFilterObj = type === WebhookType.NFT_ACTIVITY ? { nft_filters: filters } : { nft_metadata_filters: filters };\n } else if (type === WebhookType.ADDRESS_ACTIVITY) {\n if (params === void 0 || !(\"addresses\" in params) || params.addresses.length === 0) {\n throw new Error(\"Address Activity Webhooks require a non-empty array input.\");\n }\n network = params.network ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) : network;\n addresses4 = yield this.resolveAddresses(params.addresses);\n } else if (type == WebhookType.GRAPHQL) {\n if (params === void 0 || !(\"graphqlQuery\" in params) || params.graphqlQuery.length === 0) {\n throw new Error(\"Custom Webhooks require a non-empty graphql query.\");\n }\n network = params.network ? NETWORK_TO_WEBHOOK_NETWORK.get(params.network) : network;\n graphqlQuery = params.graphqlQuery;\n skipEmptyMessages = params.skipEmptyMessages;\n }\n const data = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ network, webhook_type: type, webhook_url: url }, appId && { app_id: appId }), params.name && { name: params.name }), nftFilterObj), addresses4 && { addresses: addresses4 }), graphqlQuery && {\n graphql_query: {\n query: graphqlQuery,\n skip_empty_messages: !!skipEmptyMessages\n }\n });\n const response = yield this.sendWebhookRequest(\"create-webhook\", \"createWebhook\", {}, {\n method: \"POST\",\n data\n });\n return parseRawWebhook(response.data);\n });\n }\n deleteWebhook(webhookOrId) {\n return __awaiter$1(this, void 0, void 0, function* () {\n this.verifyConfig();\n const webhookId = typeof webhookOrId === \"string\" ? webhookOrId : webhookOrId.id;\n const response = yield this.sendWebhookRequest(\"delete-webhook\", \"deleteWebhook\", {\n webhook_id: webhookId\n }, {\n method: \"DELETE\"\n });\n if (\"message\" in response) {\n throw new Error(`Webhook not found. Failed to delete webhook: ${webhookId}`);\n }\n });\n }\n verifyConfig() {\n if (this.config.authToken === void 0) {\n throw new Error(\"Using the Notify API requires setting the Alchemy Auth Token in the settings object when initializing Alchemy.\");\n }\n }\n sendWebhookRequest(restApiName, methodName, params, overrides) {\n return requestHttpWithBackoff(this.config, AlchemyApiType.WEBHOOK, restApiName, methodName, params, Object.assign(Object.assign({}, overrides), { headers: Object.assign({ \"X-Alchemy-Token\": this.config.authToken }, overrides === null || overrides === void 0 ? void 0 : overrides.headers) }));\n }\n /** Resolves ENS addresses to the raw address.\n * @internal */\n resolveAddresses(addresses4) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (addresses4 === void 0) {\n return [];\n }\n const resolvedAddresses = [];\n const provider = yield this.config.getProvider();\n for (const address of addresses4) {\n const rawAddress = yield provider.resolveName(address);\n if (rawAddress === null) {\n throw new Error(`Unable to resolve the ENS address: ${address}`);\n }\n resolvedAddresses.push(rawAddress);\n }\n return resolvedAddresses;\n });\n }\n };\n WEBHOOK_NETWORK_TO_NETWORK = Object.fromEntries(Object.entries(Network));\n NETWORK_TO_WEBHOOK_NETWORK = Object.keys(Network).reduce((map, key) => {\n if (key in WEBHOOK_NETWORK_TO_NETWORK) {\n map.set(WEBHOOK_NETWORK_TO_NETWORK[key], key);\n }\n return map;\n }, /* @__PURE__ */ new Map());\n PortfolioNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Fetches fungible tokens (native and ERC-20) for multiple wallet addresses\n * and networks.\n *\n * @param addresses - Array of network/address pairs\n * (limit 2 pairs, max 5 networks each).\n * @param withMetadata - Boolean. If set to true, returns metadata. Setting\n * this to false will reduce payload size and\n * may result in a faster API call.\n * (default: true)\n * @param withPrices - Boolean. If set to true, returns token prices. Setting\n * this to false will reduce payload size and may\n * result in a faster API call. (default: true)\n * @param includeNativeTokens - Boolean. Whether to include each chain’s\n * native token in the response\n * (e.g. ETH on Ethereum). The native\n * token will have a null contract\n * address. (default: true)\n *\n * @returns Promise containing a list of tokens with balances, prices, and\n * metadata for each wallet/network combination.\n *\n * @public\n */\n getTokensByWallet(addresses4, withMetadata = true, withPrices = true, includeNativeTokens = true) {\n return getTokensByWallet(this.config, addresses4, withMetadata, withPrices, includeNativeTokens);\n }\n /**\n * Fetches fungible tokens (native and ERC-20) for multiple wallet addresses and networks.\n *\n * @param addresses - Array of network/address pairs (limit 2 pairs, max 5 networks each).\n * @param includeNativeTokens - Boolean. Whether to include each chain’s native token in the response (e.g. ETH on Ethereum). The native token will have a null contract address. (default: true) * @returns Promise containing a list of tokens with balances for each wallet/network combination\n * @public\n */\n getTokenBalancesByWallet(addresses4, includeNativeTokens = true) {\n return getTokenBalancesByWallet(this.config, addresses4, includeNativeTokens);\n }\n /**\n * Fetches NFTs for multiple wallet addresses and networks.\n *\n * @param addresses - Array of network/address pairs to fetch NFTs for.\n * @param withMetadata - Boolean. If set to true, returns metadata. Setting this to false will reduce payload size and may result in a faster API call. (default: true)\n * @param pageKey - Optional. The cursor that points to the current set of results.\n * @param pageSize - Optional. Sets the number of items per page.\n * @returns Promise containing a list of NFTs and metadata for each wallet/network combination.\n *\n * @public\n */\n getNftsByWallet(addresses4, withMetadata = true, pageKey, pageSize) {\n return getNftsByWallet(this.config, addresses4, withMetadata, pageKey, pageSize);\n }\n /**\n * Fetches NFT collections (contracts) for multiple wallet addresses and networks. Returns a list of\n * collections and metadata for each wallet/network combination.\n *\n * @param addresses - Array of address and networks pairs (limit 2 pairs, max 15 networks each).\n * @param withMetadata - Boolean. If set to true, returns metadata. (default: true)\n * @param pageKey - Optional. The cursor that points to the current set of results.\n * @param pageSize - Optional. Sets the number of items per page.\n * @returns Promise containing a list of NFT collections for each wallet/network combination.\n * @public\n */\n getNftCollectionsByWallet(addresses4, withMetadata = true, pageKey, pageSize) {\n return getNftCollectionsByWallet(this.config, addresses4, withMetadata, pageKey, pageSize);\n }\n /**\n * Fetches all historical transactions (internal & external) for multiple wallet addresses and networks.\n *\n * @param addresses - Array of network/address pairs to fetch transactions for.\n * @param before - Optional. The cursor that points to the previous set of results.\n * @param after - Optional. The cursor that points to the end of the current set of results.\n * @param limit - Optional. Sets the maximum number of items per page (Max: 100)\n * @returns Promise containing a list of transaction objects with metadata and log information.\n *\n * @public\n */\n getTransactionsByWallet(addresses4, before, after, limit) {\n return getTransactionsByWallet(this.config, addresses4, before, after, limit);\n }\n };\n PricesNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Get token prices by network and contract address pairs.\n *\n * @param addresses - Array of network/address pairs to get prices for\n * @returns Promise containing token price data\n * @public\n */\n getTokenPriceByAddress(addresses4) {\n return getTokenPriceByAddress(this.config, addresses4);\n }\n /**\n * Get token prices by token symbol.\n *\n * @param symbols - Array of token symbols to get prices for\n * @returns Promise containing token price data\n * @public\n */\n getTokenPriceBySymbol(symbols) {\n return getTokenPriceBySymbol(this.config, symbols);\n }\n /**\n * Get historical token prices by token symbol.\n *\n * @param symbol - The token symbol to get historical prices for\n * @param startTime - Start time in ISO-8601 string format or Unix timestamp in seconds\n * @param endTime - End time in ISO-8601 string format or Unix timestamp in seconds\n * @param interval - Time interval between data points\n * @returns Promise containing historical token price data\n * @public\n */\n getHistoricalPriceBySymbol(symbol, startTime, endTime, interval) {\n return getHistoricalPriceBySymbol(this.config, symbol, startTime, endTime, interval);\n }\n /**\n * Get historical token prices by network and contract address.\n *\n * @param network - The network where the token contract is deployed\n * @param address - The token contract address\n * @param startTime - Start time in ISO-8601 string format or Unix timestamp in seconds\n * @param endTime - End time in ISO-8601 string format or Unix timestamp in seconds\n * @param interval - Time interval between data points\n * @returns Promise containing historical token price data\n * @public\n */\n getHistoricalPriceByAddress(network, address, startTime, endTime, interval) {\n return getHistoricalPriceByAddress(this.config, network, address, startTime, endTime, interval);\n }\n };\n GAS_OPTIMIZED_TX_FEE_MULTIPLES = [0.9, 1, 1.1, 1.2, 1.3];\n TransactNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Used to send a single transaction to Flashbots. Flashbots will attempt to\n * send the transaction to miners for the next 25 blocks.\n *\n * Returns the transaction hash of the submitted transaction.\n *\n * @param signedTransaction The raw, signed transaction as a hash.\n * @param maxBlockNumber Optional highest block number in which the\n * transaction should be included.\n * @param options Options to configure the request.\n */\n sendPrivateTransaction(signedTransaction, maxBlockNumber, options) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const hexBlockNumber = maxBlockNumber ? toHex2(maxBlockNumber) : void 0;\n return provider._send(\"eth_sendPrivateTransaction\", [\n {\n tx: signedTransaction,\n maxBlockNumber: hexBlockNumber,\n preferences: options\n }\n ], \"sendPrivateTransaction\");\n });\n }\n /**\n * Stops the provided private transaction from being submitted for future\n * blocks. A transaction can only be cancelled if the request is signed by the\n * same key as the {@link sendPrivateTransaction} call submitting the\n * transaction in first place.\n *\n * Please note that fast mode transactions cannot be cancelled using this method.\n *\n * Returns a boolean indicating whether the cancellation was successful.\n *\n * @param transactionHash Transaction hash of private tx to be cancelled\n */\n cancelPrivateTransaction(transactionHash) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider._send(\"eth_cancelPrivateTransaction\", [\n {\n txHash: transactionHash\n }\n ], \"cancelPrivateTransaction\");\n });\n }\n /**\n * Simulates the asset changes resulting from a list of transactions simulated\n * in sequence.\n *\n * Returns a list of asset changes for each transaction during simulation.\n *\n * @param transactions Transactions list of max 3 transactions to simulate.\n * @param blockIdentifier Optional block identifier to simulate the\n * transaction in.\n */\n simulateAssetChangesBundle(transactions, blockIdentifier) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = blockIdentifier !== void 0 ? [transactions, blockIdentifier] : [transactions];\n const res = yield provider._send(\"alchemy_simulateAssetChangesBundle\", params, \"simulateAssetChangesBundle\");\n return nullsToUndefined(res);\n });\n }\n /**\n * Simulates the asset changes resulting from a single transaction.\n *\n * Returns list of asset changes that occurred during the transaction\n * simulation. Note that this method does not run the transaction on the\n * blockchain.\n *\n * @param transaction The transaction to simulate.\n * @param blockIdentifier Optional block identifier to simulate the\n * transaction in.\n */\n simulateAssetChanges(transaction, blockIdentifier) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = blockIdentifier !== void 0 ? [transaction, blockIdentifier] : [transaction];\n const res = yield provider._send(\"alchemy_simulateAssetChanges\", params, \"simulateAssetChanges\");\n return nullsToUndefined(res);\n });\n }\n /**\n * Simulates a list of transactions in sequence and returns list of decoded\n * traces and logs that occurred for each transaction during simulation.\n *\n * Note that this method does not run any transactions on the blockchain.\n *\n * @param transactions Transactions list of max 3 transactions to simulate.\n * @param blockIdentifier Optional block identifier to simulate the\n * transaction in.\n */\n simulateExecutionBundle(transactions, blockIdentifier) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = blockIdentifier !== void 0 ? [transactions, blockIdentifier] : [transactions];\n const res = provider._send(\"alchemy_simulateExecutionBundle\", params, \"simulateExecutionBundle\");\n return nullsToUndefined(res);\n });\n }\n /**\n * Simulates a single transaction and the resulting and returns list of\n * decoded traces and logs that occurred during the transaction simulation.\n *\n * Note that this method does not run the transaction on the blockchain.\n *\n * @param transaction The transaction to simulate.\n * @param blockIdentifier Optional block identifier to simulate the\n * transaction in.\n */\n simulateExecution(transaction, blockIdentifier) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const params = blockIdentifier !== void 0 ? [transaction, blockIdentifier] : [transaction];\n const res = provider._send(\"alchemy_simulateExecution\", params, \"simulateExecution\");\n return nullsToUndefined(res);\n });\n }\n /**\n * Returns the transaction with hash or null if the transaction is unknown.\n *\n * If a transaction has not been mined, this method will search the\n * transaction pool. Various backends may have more restrictive transaction\n * pool access (e.g. if the gas price is too low or the transaction was only\n * recently sent and not yet indexed) in which case this method may also return null.\n *\n * NOTE: This is an alias for {@link CoreNamespace.getTransaction}.\n *\n * @param transactionHash The hash of the transaction to get.\n * @public\n */\n getTransaction(transactionHash) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.getTransaction(transactionHash);\n });\n }\n /**\n * Submits transaction to the network to be mined. The transaction must be\n * signed, and be valid (i.e. the nonce is correct and the account has\n * sufficient balance to pay for the transaction).\n *\n * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}.\n *\n * @param signedTransaction The signed transaction to send.\n * @public\n */\n sendTransaction(signedTransaction) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.sendTransaction(signedTransaction);\n });\n }\n /**\n * Returns an estimate of the amount of gas that would be required to submit\n * transaction to the network.\n *\n * An estimate may not be accurate since there could be another transaction on\n * the network that was not accounted for, but after being mined affects the\n * relevant state.\n *\n * This is an alias for {@link CoreNamespace.estimateGas}.\n *\n * @param transaction The transaction to estimate gas for.\n * @public\n */\n estimateGas(transaction) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.estimateGas(transaction);\n });\n }\n /**\n * Returns a fee per gas (in wei) that is an estimate of how much you can pay\n * as a priority fee, or \"tip\", to get a transaction included in the current block.\n *\n * This number is generally used to set the `maxPriorityFeePerGas` field in a\n * transaction request.\n *\n * @public\n */\n getMaxPriorityFeePerGas() {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const feeHex = yield provider._send(\"eth_maxPriorityFeePerGas\", [], \"getMaxPriorityFeePerGas\");\n return fromHex3(feeHex);\n });\n }\n /**\n * Returns a promise which will not resolve until specified transaction hash is mined.\n *\n * If {@link confirmations} is 0, this method is non-blocking and if the\n * transaction has not been mined returns null. Otherwise, this method will\n * block until the transaction has confirmed blocks mined on top of the block\n * in which it was mined.\n *\n * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}.\n *\n * @param transactionHash The hash of the transaction to wait for.\n * @param confirmations The number of blocks to wait for.\n * @param timeout The maximum time to wait for the transaction to confirm.\n * @public\n */\n waitForTransaction(transactionHash, confirmations, timeout) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider.waitForTransaction(transactionHash, confirmations, timeout);\n });\n }\n sendGasOptimizedTransaction(transactionOrSignedTxs, wallet) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (Array.isArray(transactionOrSignedTxs)) {\n return this._sendGasOptimizedTransaction(transactionOrSignedTxs, \"sendGasOptimizedTransactionPreSigned\");\n }\n let gasLimit;\n let priorityFee;\n let baseFee;\n const provider = yield this.config.getProvider();\n try {\n gasLimit = yield this.estimateGas(transactionOrSignedTxs);\n priorityFee = yield this.getMaxPriorityFeePerGas();\n const currentBlock = yield provider.getBlock(\"latest\");\n baseFee = currentBlock.baseFeePerGas.toNumber();\n } catch (e2) {\n throw new Error(`Failed to estimate gas for transaction: ${e2}`);\n }\n const gasSpreadTransactions = generateGasSpreadTransactions(transactionOrSignedTxs, gasLimit.toNumber(), baseFee, priorityFee);\n const signedTransactions = yield Promise.all(gasSpreadTransactions.map((tx) => wallet.signTransaction(tx)));\n return this._sendGasOptimizedTransaction(signedTransactions, \"sendGasOptimizedTransactionGenerated\");\n });\n }\n /**\n * Returns the state of the transaction job returned by the\n * {@link sendGasOptimizedTransaction}.\n *\n * @param trackingId The tracking id from the response of the sent gas optimized transaction.\n * @internal\n */\n // TODO(txjob): Remove internal tag once this feature is released.\n getGasOptimizedTransactionStatus(trackingId) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider._send(\"alchemy_getGasOptimizedTransactionStatus\", [trackingId], \"getGasOptimizedTransactionStatus\");\n });\n }\n /** @internal */\n _sendGasOptimizedTransaction(signedTransactions, methodName) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n return provider._send(\"alchemy_sendGasOptimizedTransaction\", [\n {\n rawTransactions: signedTransactions\n }\n ], methodName);\n });\n }\n };\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE = \"alchemy-pending-transactions\";\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE = \"alchemy-mined-transactions\";\n ALCHEMY_EVENT_TYPES = [\n ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE,\n ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE\n ];\n Event = class {\n constructor(tag, listener, once2) {\n this.listener = listener;\n this.tag = tag;\n this.once = once2;\n this._lastBlockNumber = -2;\n this._inflight = false;\n }\n get event() {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n default:\n return this.tag;\n }\n }\n get type() {\n return this.tag.split(\":\")[0];\n }\n get hash() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") {\n throw new Error(\"Not a transaction event\");\n }\n return comps[1];\n }\n get filter() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") {\n throw new Error(\"Not a transaction event\");\n }\n const address = comps[1];\n const topics = deserializeTopics(comps[2]);\n const filter2 = {};\n if (topics.length > 0) {\n filter2.topics = topics;\n }\n if (address && address !== \"*\") {\n filter2.address = address;\n }\n return filter2;\n }\n pollable() {\n const PollableEvents = [\"block\", \"network\", \"pending\", \"poll\"];\n return this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0;\n }\n };\n EthersEvent = class extends Event {\n /**\n * Converts the event tag into the original `fromAddress` field in\n * {@link AlchemyPendingTransactionsEventFilter}.\n */\n get fromAddress() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n return void 0;\n }\n if (comps[1] && comps[1] !== \"*\") {\n return deserializeAddressField(comps[1]);\n } else {\n return void 0;\n }\n }\n /**\n * Converts the event tag into the original `toAddress` field in\n * {@link AlchemyPendingTransactionsEventFilter}.\n */\n get toAddress() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== ALCHEMY_PENDING_TRANSACTIONS_EVENT_TYPE) {\n return void 0;\n }\n if (comps[2] && comps[2] !== \"*\") {\n return deserializeAddressField(comps[2]);\n } else {\n return void 0;\n }\n }\n /**\n * Converts the event tag into the original `hashesOnly` field in\n * {@link AlchemyPendingTransactionsEventFilter} and {@link AlchemyMinedTransactionsEventFilter}.\n */\n get hashesOnly() {\n const comps = this.tag.split(\":\");\n if (!ALCHEMY_EVENT_TYPES.includes(comps[0])) {\n return void 0;\n }\n if (comps[3] && comps[3] !== \"*\") {\n return comps[3] === \"true\";\n } else {\n return void 0;\n }\n }\n get includeRemoved() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n return void 0;\n }\n if (comps[2] && comps[2] !== \"*\") {\n return comps[2] === \"true\";\n } else {\n return void 0;\n }\n }\n get addresses() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== ALCHEMY_MINED_TRANSACTIONS_EVENT_TYPE) {\n return void 0;\n }\n if (comps[1] && comps[1] !== \"*\") {\n return deserializeAddressesField(comps[1]);\n } else {\n return void 0;\n }\n }\n };\n WebSocketNamespace = class {\n /** @internal */\n constructor(config2) {\n this.config = config2;\n }\n /**\n * Adds a listener to be triggered for each {@link eventName} event. Also\n * includes Alchemy's Subscription API events. See {@link AlchemyEventType} for\n * how to use them.\n *\n * @param eventName The event to listen for.\n * @param listener The listener to call when the event is triggered.\n * @public\n */\n on(eventName, listener) {\n void (() => __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = yield this._resolveEnsAlchemyEvent(eventName);\n provider.on(processedEvent, listener);\n }))();\n return this;\n }\n /**\n * Adds a listener to be triggered for only the next {@link eventName} event,\n * after which it will be removed. Also includes Alchemy's Subscription API\n * events. See {@link AlchemyEventType} for how to use them.\n *\n * @param eventName The event to listen for.\n * @param listener The listener to call when the event is triggered.\n * @public\n */\n once(eventName, listener) {\n void (() => __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = yield this._resolveEnsAlchemyEvent(eventName);\n provider.once(processedEvent, listener);\n }))();\n return this;\n }\n /**\n * Removes the provided {@link listener} for the {@link eventName} event. If no\n * listener is provided, all listeners for the event will be removed.\n *\n * @param eventName The event to unlisten to.\n * @param listener The listener to remove.\n * @public\n */\n off(eventName, listener) {\n void (() => __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = yield this._resolveEnsAlchemyEvent(eventName);\n return provider.off(processedEvent, listener);\n }))();\n return this;\n }\n /**\n * Remove all listeners for the provided {@link eventName} event. If no event\n * is provided, all events and their listeners are removed.\n *\n * @param eventName The event to remove all listeners for.\n * @public\n */\n removeAllListeners(eventName) {\n void (() => __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = eventName ? yield this._resolveEnsAlchemyEvent(eventName) : void 0;\n provider.removeAllListeners(processedEvent);\n }))();\n return this;\n }\n /**\n * Returns the number of listeners for the provided {@link eventName} event. If\n * no event is provided, the total number of listeners for all events is returned.\n *\n * @param eventName The event to get the number of listeners for.\n * @public\n */\n listenerCount(eventName) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = eventName ? yield this._resolveEnsAlchemyEvent(eventName) : void 0;\n return provider.listenerCount(processedEvent);\n });\n }\n /**\n * Returns an array of listeners for the provided {@link eventName} event. If\n * no event is provided, all listeners will be included.\n *\n * @param eventName The event to get the listeners for.\n */\n listeners(eventName) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getWebSocketProvider();\n const processedEvent = eventName ? yield this._resolveEnsAlchemyEvent(eventName) : void 0;\n return provider.listeners(processedEvent);\n });\n }\n /**\n * Converts ENS addresses in an Alchemy Event to the underlying resolved\n * address.\n *\n * VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n _resolveEnsAlchemyEvent(eventName) {\n return __awaiter$1(this, void 0, void 0, function* () {\n if (!isAlchemyEvent(eventName)) {\n return eventName;\n }\n if (eventName.method === AlchemySubscription.MINED_TRANSACTIONS && eventName.addresses) {\n const processedAddresses = [];\n for (const address of eventName.addresses) {\n if (address.to) {\n address.to = yield this._resolveNameOrError(address.to);\n }\n if (address.from) {\n address.from = yield this._resolveNameOrError(address.from);\n }\n processedAddresses.push(address);\n }\n eventName.addresses = processedAddresses;\n } else if (eventName.method === AlchemySubscription.PENDING_TRANSACTIONS) {\n if (eventName.fromAddress) {\n if (typeof eventName.fromAddress === \"string\") {\n eventName.fromAddress = yield this._resolveNameOrError(eventName.fromAddress);\n } else {\n eventName.fromAddress = yield Promise.all(eventName.fromAddress.map((address) => this._resolveNameOrError(address)));\n }\n }\n if (eventName.toAddress) {\n if (typeof eventName.toAddress === \"string\") {\n eventName.toAddress = yield this._resolveNameOrError(eventName.toAddress);\n } else {\n eventName.toAddress = yield Promise.all(eventName.toAddress.map((address) => this._resolveNameOrError(address)));\n }\n }\n }\n return eventName;\n });\n }\n /**\n * Converts the provided ENS address or throws an error. This improves code\n * readability and type safety in other methods.\n *\n * VISIBLE ONLY FOR TESTING.\n *\n * @internal\n */\n _resolveNameOrError(name) {\n return __awaiter$1(this, void 0, void 0, function* () {\n const provider = yield this.config.getProvider();\n const resolved = yield provider.resolveName(name);\n if (resolved === null) {\n throw new Error(`Unable to resolve the ENS address: ${name}`);\n }\n return resolved;\n });\n }\n };\n Alchemy = class {\n /**\n * @param {string} [settings.apiKey] - The API key to use for Alchemy\n * @param {Network} [settings.network] - The network to use for Alchemy\n * @param {number} [settings.maxRetries] - The maximum number of retries to attempt\n * @param {number} [settings.requestTimeout] - The timeout after which request should fail\n * @public\n */\n constructor(settings) {\n this.config = new AlchemyConfig(settings);\n this.core = new CoreNamespace(this.config);\n this.nft = new NftNamespace(this.config);\n this.ws = new WebSocketNamespace(this.config);\n this.transact = new TransactNamespace(this.config);\n this.notify = new NotifyNamespace(this.config);\n this.debug = new DebugNamespace(this.config);\n this.prices = new PricesNamespace(this.config);\n this.portfolio = new PortfolioNamespace(this.config);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/index.js\n var init_esm7 = __esm({\n \"../../../node_modules/.pnpm/alchemy-sdk@3.6.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/alchemy-sdk/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_index_f73a5f29();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/schema.js\n var AlchemyChainSchema, AlchemySdkClientSchema;\n var init_schema3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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_esm7();\n init_esm();\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 AlchemySdkClientSchema = esm_default.instanceof(Alchemy);\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/version.js\n var VERSION5;\n var init_version6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION5 = \"4.52.2\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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\": VERSION5\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 })\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(opts).request,\n retryCount: retryCount ?? opts?.retryCount,\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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;\n var init_chains2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/chains.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm2();\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 }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/client/decorators/alchemyEnhancedApis.js\n function alchemyEnhancedApiActions(alchemy2) {\n return (client) => {\n const alchemySdk = AlchemySdkClientSchema.parse(alchemy2);\n if (alchemy2.config.url && alchemy2.config.url !== client.transport.alchemyRpcUrl) {\n throw new Error(\"Alchemy SDK client JSON-RPC URL must match AlchemyProvider JSON-RPC URL\");\n }\n return {\n core: alchemySdk.core,\n nft: alchemySdk.nft,\n transact: alchemySdk.transact,\n debug: alchemySdk.debug,\n ws: alchemySdk.ws,\n notify: alchemySdk.notify,\n config: alchemySdk.config\n };\n };\n }\n var init_alchemyEnhancedApis = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/client/decorators/alchemyEnhancedApis.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_schema3();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/emitter/interface.js\n var init_interface = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/emitter/interface.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/plugins/index.js\n var init_plugins = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/plugins/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/events/interfaces.js\n var init_interfaces = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/events/interfaces.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/dset@3.1.4/node_modules/dset/dist/index.mjs\n function dset(obj, keys, val) {\n keys.split && (keys = keys.split(\".\"));\n var i3 = 0, l6 = keys.length, t3 = obj, x4, k4;\n while (i3 < l6) {\n k4 = \"\" + keys[i3++];\n if (k4 === \"__proto__\" || k4 === \"constructor\" || k4 === \"prototype\")\n break;\n t3 = t3[k4] = i3 === l6 ? val : typeof (x4 = t3[k4]) === typeof keys ? x4 : keys[i3] * 0 !== 0 || !!~(\"\" + keys[i3]).indexOf(\".\") ? {} : [];\n }\n }\n var init_dist = __esm({\n \"../../../node_modules/.pnpm/dset@3.1.4/node_modules/dset/dist/index.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/pick.js\n var pickBy;\n var init_pick = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/pick.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n pickBy = function(obj, fn) {\n return Object.keys(obj).filter(function(k4) {\n return fn(k4, obj[k4]);\n }).reduce(function(acc, key) {\n return acc[key] = obj[key], acc;\n }, {});\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/errors.js\n var ValidationError;\n var init_errors6 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n ValidationError = /** @class */\n function(_super) {\n __extends(ValidationError2, _super);\n function ValidationError2(field, message) {\n var _this = _super.call(this, \"\".concat(field, \" \").concat(message)) || this;\n _this.field = field;\n return _this;\n }\n return ValidationError2;\n }(Error);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/helpers.js\n function isString2(obj) {\n return typeof obj === \"string\";\n }\n function isNumber2(obj) {\n return typeof obj === \"number\";\n }\n function isFunction2(obj) {\n return typeof obj === \"function\";\n }\n function exists(val) {\n return val !== void 0 && val !== null;\n }\n function isPlainObject2(obj) {\n return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase() === \"object\";\n }\n var init_helpers = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/helpers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/assertions.js\n function assertEventExists(event) {\n if (!exists(event)) {\n throw new ValidationError(\"Event\", nilError);\n }\n if (typeof event !== \"object\") {\n throw new ValidationError(\"Event\", objError);\n }\n }\n function assertEventType(event) {\n if (!isString2(event.type)) {\n throw new ValidationError(\".type\", stringError);\n }\n }\n function assertTrackEventName(event) {\n if (!isString2(event.event)) {\n throw new ValidationError(\".event\", stringError);\n }\n }\n function assertTrackEventProperties(event) {\n if (!isPlainObject2(event.properties)) {\n throw new ValidationError(\".properties\", objError);\n }\n }\n function assertTraits(event) {\n if (!isPlainObject2(event.traits)) {\n throw new ValidationError(\".traits\", objError);\n }\n }\n function assertMessageId(event) {\n if (!isString2(event.messageId)) {\n throw new ValidationError(\".messageId\", stringError);\n }\n }\n function validateEvent(event) {\n assertEventExists(event);\n assertEventType(event);\n assertMessageId(event);\n if (event.type === \"track\") {\n assertTrackEventName(event);\n assertTrackEventProperties(event);\n }\n if ([\"group\", \"identify\"].includes(event.type)) {\n assertTraits(event);\n }\n }\n var stringError, objError, nilError;\n var init_assertions = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/validation/assertions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors6();\n init_helpers();\n stringError = \"is not a string\";\n objError = \"is not an object\";\n nilError = \"is nil\";\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/events/index.js\n var InternalEventFactorySettings, CoreEventFactory;\n var init_events = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/events/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_interfaces();\n init_dist();\n init_pick();\n init_assertions();\n InternalEventFactorySettings = /** @class */\n /* @__PURE__ */ function() {\n function InternalEventFactorySettings2(settings) {\n var _a2, _b2;\n this.settings = settings;\n this.createMessageId = settings.createMessageId;\n this.onEventMethodCall = (_a2 = settings.onEventMethodCall) !== null && _a2 !== void 0 ? _a2 : function() {\n };\n this.onFinishedEvent = (_b2 = settings.onFinishedEvent) !== null && _b2 !== void 0 ? _b2 : function() {\n };\n }\n return InternalEventFactorySettings2;\n }();\n CoreEventFactory = /** @class */\n function() {\n function CoreEventFactory2(settings) {\n this.settings = new InternalEventFactorySettings(settings);\n }\n CoreEventFactory2.prototype.track = function(event, properties, options, globalIntegrations) {\n this.settings.onEventMethodCall({ type: \"track\", options });\n return this.normalize(__assign(__assign({}, this.baseEvent()), { event, type: \"track\", properties: properties !== null && properties !== void 0 ? properties : {}, options: __assign({}, options), integrations: __assign({}, globalIntegrations) }));\n };\n CoreEventFactory2.prototype.page = function(category, page, properties, options, globalIntegrations) {\n var _a2;\n this.settings.onEventMethodCall({ type: \"page\", options });\n var event = {\n type: \"page\",\n properties: __assign({}, properties),\n options: __assign({}, options),\n integrations: __assign({}, globalIntegrations)\n };\n if (category !== null) {\n event.category = category;\n event.properties = (_a2 = event.properties) !== null && _a2 !== void 0 ? _a2 : {};\n event.properties.category = category;\n }\n if (page !== null) {\n event.name = page;\n }\n return this.normalize(__assign(__assign({}, this.baseEvent()), event));\n };\n CoreEventFactory2.prototype.screen = function(category, screen, properties, options, globalIntegrations) {\n this.settings.onEventMethodCall({ type: \"screen\", options });\n var event = {\n type: \"screen\",\n properties: __assign({}, properties),\n options: __assign({}, options),\n integrations: __assign({}, globalIntegrations)\n };\n if (category !== null) {\n event.category = category;\n }\n if (screen !== null) {\n event.name = screen;\n }\n return this.normalize(__assign(__assign({}, this.baseEvent()), event));\n };\n CoreEventFactory2.prototype.identify = function(userId, traits, options, globalIntegrations) {\n this.settings.onEventMethodCall({ type: \"identify\", options });\n return this.normalize(__assign(__assign({}, this.baseEvent()), { type: \"identify\", userId, traits: traits !== null && traits !== void 0 ? traits : {}, options: __assign({}, options), integrations: globalIntegrations }));\n };\n CoreEventFactory2.prototype.group = function(groupId, traits, options, globalIntegrations) {\n this.settings.onEventMethodCall({ type: \"group\", options });\n return this.normalize(__assign(__assign({}, this.baseEvent()), {\n type: \"group\",\n traits: traits !== null && traits !== void 0 ? traits : {},\n options: __assign({}, options),\n integrations: __assign({}, globalIntegrations),\n //\n groupId\n }));\n };\n CoreEventFactory2.prototype.alias = function(to, from5, options, globalIntegrations) {\n this.settings.onEventMethodCall({ type: \"alias\", options });\n var base3 = {\n userId: to,\n type: \"alias\",\n options: __assign({}, options),\n integrations: __assign({}, globalIntegrations)\n };\n if (from5 !== null) {\n base3.previousId = from5;\n }\n if (to === void 0) {\n return this.normalize(__assign(__assign({}, base3), this.baseEvent()));\n }\n return this.normalize(__assign(__assign({}, this.baseEvent()), base3));\n };\n CoreEventFactory2.prototype.baseEvent = function() {\n return {\n integrations: {},\n options: {}\n };\n };\n CoreEventFactory2.prototype.context = function(options) {\n var _a2;\n var eventOverrideKeys = [\n \"userId\",\n \"anonymousId\",\n \"timestamp\",\n \"messageId\"\n ];\n delete options[\"integrations\"];\n var providedOptionsKeys = Object.keys(options);\n var context2 = (_a2 = options.context) !== null && _a2 !== void 0 ? _a2 : {};\n var eventOverrides = {};\n providedOptionsKeys.forEach(function(key) {\n if (key === \"context\") {\n return;\n }\n if (eventOverrideKeys.includes(key)) {\n dset(eventOverrides, key, options[key]);\n } else {\n dset(context2, key, options[key]);\n }\n });\n return [context2, eventOverrides];\n };\n CoreEventFactory2.prototype.normalize = function(event) {\n var _a2, _b2;\n var integrationBooleans = Object.keys((_a2 = event.integrations) !== null && _a2 !== void 0 ? _a2 : {}).reduce(function(integrationNames, name) {\n var _a3;\n var _b3;\n return __assign(__assign({}, integrationNames), (_a3 = {}, _a3[name] = Boolean((_b3 = event.integrations) === null || _b3 === void 0 ? void 0 : _b3[name]), _a3));\n }, {});\n event.options = pickBy(event.options || {}, function(_2, value) {\n return value !== void 0;\n });\n var allIntegrations = __assign(__assign({}, integrationBooleans), (_b2 = event.options) === null || _b2 === void 0 ? void 0 : _b2.integrations);\n var _c = event.options ? this.context(event.options) : [], context2 = _c[0], overrides = _c[1];\n var options = event.options, rest = __rest(event, [\"options\"]);\n var evt = __assign(__assign(__assign(__assign({ timestamp: /* @__PURE__ */ new Date() }, rest), { context: context2, integrations: allIntegrations }), overrides), { messageId: options.messageId || this.settings.createMessageId() });\n this.settings.onFinishedEvent(evt);\n validateEvent(evt);\n return evt;\n };\n return CoreEventFactory2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/callback/index.js\n function pTimeout(promise, timeout) {\n return new Promise(function(resolve, reject) {\n var timeoutId = setTimeout(function() {\n reject(Error(\"Promise timed out\"));\n }, timeout);\n promise.then(function(val) {\n clearTimeout(timeoutId);\n return resolve(val);\n }).catch(reject);\n });\n }\n function sleep(timeoutInMs) {\n return new Promise(function(resolve) {\n return setTimeout(resolve, timeoutInMs);\n });\n }\n function invokeCallback(ctx, callback, delay2) {\n var cb = function() {\n try {\n return Promise.resolve(callback(ctx));\n } catch (err) {\n return Promise.reject(err);\n }\n };\n return sleep(delay2).then(function() {\n return pTimeout(cb(), 1e3);\n }).catch(function(err) {\n ctx === null || ctx === void 0 ? void 0 : ctx.log(\"warn\", \"Callback Error\", { error: err });\n ctx === null || ctx === void 0 ? void 0 : ctx.stats.increment(\"callback_error\");\n }).then(function() {\n return ctx;\n });\n }\n var init_callback = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/callback/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/create-deferred.js\n var createDeferred;\n var init_create_deferred = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/create-deferred.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n createDeferred = function() {\n var resolve;\n var reject;\n var settled = false;\n var promise = new Promise(function(_resolve, _reject) {\n resolve = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n settled = true;\n _resolve.apply(void 0, args);\n };\n reject = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n settled = true;\n _reject.apply(void 0, args);\n };\n });\n return {\n resolve,\n reject,\n promise,\n isSettled: function() {\n return settled;\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/index.js\n var init_create_deferred2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_create_deferred();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/emitter/emitter.js\n var Emitter;\n var init_emitter = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/emitter/emitter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Emitter = /** @class */\n function() {\n function Emitter2(options) {\n var _a2;\n this.callbacks = {};\n this.warned = false;\n this.maxListeners = (_a2 = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _a2 !== void 0 ? _a2 : 10;\n }\n Emitter2.prototype.warnIfPossibleMemoryLeak = function(event) {\n if (this.warned) {\n return;\n }\n if (this.maxListeners && this.callbacks[event].length > this.maxListeners) {\n console.warn(\"Event Emitter: Possible memory leak detected; \".concat(String(event), \" has exceeded \").concat(this.maxListeners, \" listeners.\"));\n this.warned = true;\n }\n };\n Emitter2.prototype.on = function(event, callback) {\n if (!this.callbacks[event]) {\n this.callbacks[event] = [callback];\n } else {\n this.callbacks[event].push(callback);\n this.warnIfPossibleMemoryLeak(event);\n }\n return this;\n };\n Emitter2.prototype.once = function(event, callback) {\n var _this = this;\n var on2 = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this.off(event, on2);\n callback.apply(_this, args);\n };\n this.on(event, on2);\n return this;\n };\n Emitter2.prototype.off = function(event, callback) {\n var _a2;\n var fns = (_a2 = this.callbacks[event]) !== null && _a2 !== void 0 ? _a2 : [];\n var without = fns.filter(function(fn) {\n return fn !== callback;\n });\n this.callbacks[event] = without;\n return this;\n };\n Emitter2.prototype.emit = function(event) {\n var _this = this;\n var _a2;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var callbacks = (_a2 = this.callbacks[event]) !== null && _a2 !== void 0 ? _a2 : [];\n callbacks.forEach(function(callback) {\n callback.apply(_this, args);\n });\n return this;\n };\n return Emitter2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/emitter/index.js\n var init_emitter2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/emitter/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_emitter();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/index.js\n var init_esm8 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-generic-utils@1.2.0/node_modules/@segment/analytics-generic-utils/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_create_deferred2();\n init_emitter2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/priority-queue/backoff.js\n function backoff(params) {\n var random = Math.random() + 1;\n var _a2 = params.minTimeout, minTimeout = _a2 === void 0 ? 500 : _a2, _b2 = params.factor, factor = _b2 === void 0 ? 2 : _b2, attempt2 = params.attempt, _c = params.maxTimeout, maxTimeout = _c === void 0 ? Infinity : _c;\n return Math.min(random * minTimeout * Math.pow(factor, attempt2), maxTimeout);\n }\n var init_backoff = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/priority-queue/backoff.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/priority-queue/index.js\n var ON_REMOVE_FROM_FUTURE, PriorityQueue;\n var init_priority_queue = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/priority-queue/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_esm8();\n init_backoff();\n ON_REMOVE_FROM_FUTURE = \"onRemoveFromFuture\";\n PriorityQueue = /** @class */\n function(_super) {\n __extends(PriorityQueue2, _super);\n function PriorityQueue2(maxAttempts, queue2, seen2) {\n var _this = _super.call(this) || this;\n _this.future = [];\n _this.maxAttempts = maxAttempts;\n _this.queue = queue2;\n _this.seen = seen2 !== null && seen2 !== void 0 ? seen2 : {};\n return _this;\n }\n PriorityQueue2.prototype.push = function() {\n var _this = this;\n var items = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n items[_i] = arguments[_i];\n }\n var accepted = items.map(function(operation) {\n var attempts = _this.updateAttempts(operation);\n if (attempts > _this.maxAttempts || _this.includes(operation)) {\n return false;\n }\n _this.queue.push(operation);\n return true;\n });\n this.queue = this.queue.sort(function(a3, b4) {\n return _this.getAttempts(a3) - _this.getAttempts(b4);\n });\n return accepted;\n };\n PriorityQueue2.prototype.pushWithBackoff = function(item, minTimeout) {\n var _this = this;\n if (minTimeout === void 0) {\n minTimeout = 0;\n }\n if (minTimeout == 0 && this.getAttempts(item) === 0) {\n return this.push(item)[0];\n }\n var attempt2 = this.updateAttempts(item);\n if (attempt2 > this.maxAttempts || this.includes(item)) {\n return false;\n }\n var timeout = backoff({ attempt: attempt2 - 1 });\n if (minTimeout > 0 && timeout < minTimeout) {\n timeout = minTimeout;\n }\n setTimeout(function() {\n _this.queue.push(item);\n _this.future = _this.future.filter(function(f6) {\n return f6.id !== item.id;\n });\n _this.emit(ON_REMOVE_FROM_FUTURE);\n }, timeout);\n this.future.push(item);\n return true;\n };\n PriorityQueue2.prototype.getAttempts = function(item) {\n var _a2;\n return (_a2 = this.seen[item.id]) !== null && _a2 !== void 0 ? _a2 : 0;\n };\n PriorityQueue2.prototype.updateAttempts = function(item) {\n this.seen[item.id] = this.getAttempts(item) + 1;\n return this.getAttempts(item);\n };\n PriorityQueue2.prototype.includes = function(item) {\n return this.queue.includes(item) || this.future.includes(item) || Boolean(this.queue.find(function(i3) {\n return i3.id === item.id;\n })) || Boolean(this.future.find(function(i3) {\n return i3.id === item.id;\n }));\n };\n PriorityQueue2.prototype.pop = function() {\n return this.queue.shift();\n };\n Object.defineProperty(PriorityQueue2.prototype, \"length\", {\n get: function() {\n return this.queue.length;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(PriorityQueue2.prototype, \"todo\", {\n get: function() {\n return this.queue.length + this.future.length;\n },\n enumerable: false,\n configurable: true\n });\n return PriorityQueue2;\n }(Emitter);\n }\n });\n\n // ../../../node_modules/.pnpm/@lukeed+uuid@2.0.1/node_modules/@lukeed/uuid/dist/index.mjs\n function v4() {\n var i3 = 0, num2, out = \"\";\n if (!BUFFER || IDX + 16 > 256) {\n BUFFER = Array(i3 = 256);\n while (i3--)\n BUFFER[i3] = 256 * Math.random() | 0;\n i3 = IDX = 0;\n }\n for (; i3 < 16; i3++) {\n num2 = BUFFER[IDX + i3];\n if (i3 == 6)\n out += HEX3[num2 & 15 | 64];\n else if (i3 == 8)\n out += HEX3[num2 & 63 | 128];\n else\n out += HEX3[num2];\n if (i3 & 1 && i3 > 1 && i3 < 11)\n out += \"-\";\n }\n IDX++;\n return out;\n }\n var IDX, HEX3, BUFFER;\n var init_dist2 = __esm({\n \"../../../node_modules/.pnpm/@lukeed+uuid@2.0.1/node_modules/@lukeed/uuid/dist/index.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IDX = 256;\n HEX3 = [];\n while (IDX--)\n HEX3[IDX] = (IDX + 256).toString(16).substring(1);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/logger/index.js\n var CoreLogger;\n var init_logger2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/logger/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n CoreLogger = /** @class */\n function() {\n function CoreLogger2() {\n this._logs = [];\n }\n CoreLogger2.prototype.log = function(level, message, extras) {\n var time = /* @__PURE__ */ new Date();\n this._logs.push({\n level,\n message,\n time,\n extras\n });\n };\n Object.defineProperty(CoreLogger2.prototype, \"logs\", {\n get: function() {\n return this._logs;\n },\n enumerable: false,\n configurable: true\n });\n CoreLogger2.prototype.flush = function() {\n if (this.logs.length > 1) {\n var formatted = this._logs.reduce(function(logs, log) {\n var _a2;\n var _b2, _c;\n var line = __assign(__assign({}, log), { json: JSON.stringify(log.extras, null, \" \"), extras: log.extras });\n delete line[\"time\"];\n var key = (_c = (_b2 = log.time) === null || _b2 === void 0 ? void 0 : _b2.toISOString()) !== null && _c !== void 0 ? _c : \"\";\n if (logs[key]) {\n key = \"\".concat(key, \"-\").concat(Math.random());\n }\n return __assign(__assign({}, logs), (_a2 = {}, _a2[key] = line, _a2));\n }, {});\n if (console.table) {\n console.table(formatted);\n } else {\n console.log(formatted);\n }\n } else {\n this.logs.forEach(function(logEntry) {\n var level = logEntry.level, message = logEntry.message, extras = logEntry.extras;\n if (level === \"info\" || level === \"debug\") {\n console.log(message, extras !== null && extras !== void 0 ? extras : \"\");\n } else {\n console[level](message, extras !== null && extras !== void 0 ? extras : \"\");\n }\n });\n }\n this._logs = [];\n };\n return CoreLogger2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/stats/index.js\n var compactMetricType, CoreStats, NullStats;\n var init_stats = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/stats/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n compactMetricType = function(type) {\n var enums = {\n gauge: \"g\",\n counter: \"c\"\n };\n return enums[type];\n };\n CoreStats = /** @class */\n function() {\n function CoreStats2() {\n this.metrics = [];\n }\n CoreStats2.prototype.increment = function(metric, by, tags) {\n if (by === void 0) {\n by = 1;\n }\n this.metrics.push({\n metric,\n value: by,\n tags: tags !== null && tags !== void 0 ? tags : [],\n type: \"counter\",\n timestamp: Date.now()\n });\n };\n CoreStats2.prototype.gauge = function(metric, value, tags) {\n this.metrics.push({\n metric,\n value,\n tags: tags !== null && tags !== void 0 ? tags : [],\n type: \"gauge\",\n timestamp: Date.now()\n });\n };\n CoreStats2.prototype.flush = function() {\n var formatted = this.metrics.map(function(m2) {\n return __assign(__assign({}, m2), { tags: m2.tags.join(\",\") });\n });\n if (console.table) {\n console.table(formatted);\n } else {\n console.log(formatted);\n }\n this.metrics = [];\n };\n CoreStats2.prototype.serialize = function() {\n return this.metrics.map(function(m2) {\n return {\n m: m2.metric,\n v: m2.value,\n t: m2.tags,\n k: compactMetricType(m2.type),\n e: m2.timestamp\n };\n });\n };\n return CoreStats2;\n }();\n NullStats = /** @class */\n function(_super) {\n __extends(NullStats2, _super);\n function NullStats2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NullStats2.prototype.gauge = function() {\n var _args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n _args[_i] = arguments[_i];\n }\n };\n NullStats2.prototype.increment = function() {\n var _args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n _args[_i] = arguments[_i];\n }\n };\n NullStats2.prototype.flush = function() {\n var _args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n _args[_i] = arguments[_i];\n }\n };\n NullStats2.prototype.serialize = function() {\n var _args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n _args[_i] = arguments[_i];\n }\n return [];\n };\n return NullStats2;\n }(CoreStats);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/context/index.js\n var ContextCancelation, CoreContext;\n var init_context = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/context/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_dist2();\n init_dist();\n init_logger2();\n init_stats();\n ContextCancelation = /** @class */\n /* @__PURE__ */ function() {\n function ContextCancelation2(options) {\n var _a2, _b2, _c;\n this.retry = (_a2 = options.retry) !== null && _a2 !== void 0 ? _a2 : true;\n this.type = (_b2 = options.type) !== null && _b2 !== void 0 ? _b2 : \"plugin Error\";\n this.reason = (_c = options.reason) !== null && _c !== void 0 ? _c : \"\";\n }\n return ContextCancelation2;\n }();\n CoreContext = /** @class */\n function() {\n function CoreContext2(event, id, stats, logger3) {\n if (id === void 0) {\n id = v4();\n }\n if (stats === void 0) {\n stats = new NullStats();\n }\n if (logger3 === void 0) {\n logger3 = new CoreLogger();\n }\n this.attempts = 0;\n this.event = event;\n this._id = id;\n this.logger = logger3;\n this.stats = stats;\n }\n CoreContext2.system = function() {\n };\n CoreContext2.prototype.isSame = function(other) {\n return other.id === this.id;\n };\n CoreContext2.prototype.cancel = function(error) {\n if (error) {\n throw error;\n }\n throw new ContextCancelation({ reason: \"Context Cancel\" });\n };\n CoreContext2.prototype.log = function(level, message, extras) {\n this.logger.log(level, message, extras);\n };\n Object.defineProperty(CoreContext2.prototype, \"id\", {\n get: function() {\n return this._id;\n },\n enumerable: false,\n configurable: true\n });\n CoreContext2.prototype.updateEvent = function(path, val) {\n var _a2;\n if (path.split(\".\")[0] === \"integrations\") {\n var integrationName = path.split(\".\")[1];\n if (((_a2 = this.event.integrations) === null || _a2 === void 0 ? void 0 : _a2[integrationName]) === false) {\n return this.event;\n }\n }\n dset(this.event, path, val);\n return this.event;\n };\n CoreContext2.prototype.failedDelivery = function() {\n return this._failedDelivery;\n };\n CoreContext2.prototype.setFailedDelivery = function(options) {\n this._failedDelivery = options;\n };\n CoreContext2.prototype.logs = function() {\n return this.logger.logs;\n };\n CoreContext2.prototype.flush = function() {\n this.logger.flush();\n this.stats.flush();\n };\n CoreContext2.prototype.toJSON = function() {\n return {\n id: this._id,\n event: this.event,\n logs: this.logger.logs,\n metrics: this.stats.metrics\n };\n };\n return CoreContext2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/group-by.js\n function groupBy(collection, grouper) {\n var results = {};\n collection.forEach(function(item) {\n var _a2;\n var key = void 0;\n if (typeof grouper === \"string\") {\n var suggestedKey = item[grouper];\n key = typeof suggestedKey !== \"string\" ? JSON.stringify(suggestedKey) : suggestedKey;\n } else if (grouper instanceof Function) {\n key = grouper(item);\n }\n if (key === void 0) {\n return;\n }\n results[key] = __spreadArray(__spreadArray([], (_a2 = results[key]) !== null && _a2 !== void 0 ? _a2 : [], true), [item], false);\n });\n return results;\n }\n var init_group_by = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/group-by.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/is-thenable.js\n var isThenable2;\n var init_is_thenable = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/is-thenable.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n isThenable2 = function(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value && typeof value.then === \"function\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/task/task-group.js\n var createTaskGroup;\n var init_task_group = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/task/task-group.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_is_thenable();\n createTaskGroup = function() {\n var taskCompletionPromise;\n var resolvePromise;\n var count = 0;\n return {\n done: function() {\n return taskCompletionPromise;\n },\n run: function(op) {\n var returnValue = op();\n if (isThenable2(returnValue)) {\n if (++count === 1) {\n taskCompletionPromise = new Promise(function(res) {\n return resolvePromise = res;\n });\n }\n returnValue.finally(function() {\n return --count === 0 && resolvePromise();\n });\n }\n return returnValue;\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/queue/delivery.js\n function tryAsync(fn) {\n return __awaiter(this, void 0, void 0, function() {\n var err_1;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n _a2.trys.push([0, 2, , 3]);\n return [4, fn()];\n case 1:\n return [2, _a2.sent()];\n case 2:\n err_1 = _a2.sent();\n return [2, Promise.reject(err_1)];\n case 3:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }\n function attempt(ctx, plugin) {\n ctx.log(\"debug\", \"plugin\", { plugin: plugin.name });\n var start = (/* @__PURE__ */ new Date()).getTime();\n var hook = plugin[ctx.event.type];\n if (hook === void 0) {\n return Promise.resolve(ctx);\n }\n var newCtx = tryAsync(function() {\n return hook.apply(plugin, [ctx]);\n }).then(function(ctx2) {\n var done = (/* @__PURE__ */ new Date()).getTime() - start;\n ctx2.stats.gauge(\"plugin_time\", done, [\"plugin:\".concat(plugin.name)]);\n return ctx2;\n }).catch(function(err) {\n if (err instanceof ContextCancelation && err.type === \"middleware_cancellation\") {\n throw err;\n }\n if (err instanceof ContextCancelation) {\n ctx.log(\"warn\", err.type, {\n plugin: plugin.name,\n error: err\n });\n return err;\n }\n ctx.log(\"error\", \"plugin Error\", {\n plugin: plugin.name,\n error: err\n });\n ctx.stats.increment(\"plugin_error\", 1, [\"plugin:\".concat(plugin.name)]);\n return err;\n });\n return newCtx;\n }\n function ensure(ctx, plugin) {\n return attempt(ctx, plugin).then(function(newContext) {\n if (newContext instanceof CoreContext) {\n return newContext;\n }\n ctx.log(\"debug\", \"Context canceled\");\n ctx.stats.increment(\"context_canceled\");\n ctx.cancel(newContext);\n });\n }\n var init_delivery = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/queue/delivery.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_context();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/queue/event-queue.js\n var CoreEventQueue;\n var init_event_queue = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/queue/event-queue.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_group_by();\n init_priority_queue();\n init_context();\n init_esm8();\n init_task_group();\n init_delivery();\n CoreEventQueue = /** @class */\n function(_super) {\n __extends(CoreEventQueue2, _super);\n function CoreEventQueue2(priorityQueue) {\n var _this = _super.call(this) || this;\n _this.criticalTasks = createTaskGroup();\n _this.plugins = [];\n _this.failedInitializations = [];\n _this.flushing = false;\n _this.queue = priorityQueue;\n _this.queue.on(ON_REMOVE_FROM_FUTURE, function() {\n _this.scheduleFlush(0);\n });\n return _this;\n }\n CoreEventQueue2.prototype.register = function(ctx, plugin, instance) {\n return __awaiter(this, void 0, void 0, function() {\n var handleLoadError, err_1;\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n this.plugins.push(plugin);\n handleLoadError = function(err) {\n _this.failedInitializations.push(plugin.name);\n _this.emit(\"initialization_failure\", plugin);\n console.warn(plugin.name, err);\n ctx.log(\"warn\", \"Failed to load destination\", {\n plugin: plugin.name,\n error: err\n });\n _this.plugins = _this.plugins.filter(function(p4) {\n return p4 !== plugin;\n });\n };\n if (!(plugin.type === \"destination\" && plugin.name !== \"Segment.io\"))\n return [3, 1];\n plugin.load(ctx, instance).catch(handleLoadError);\n return [3, 4];\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, plugin.load(ctx, instance)];\n case 2:\n _a2.sent();\n return [3, 4];\n case 3:\n err_1 = _a2.sent();\n handleLoadError(err_1);\n return [3, 4];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n CoreEventQueue2.prototype.deregister = function(ctx, plugin, instance) {\n return __awaiter(this, void 0, void 0, function() {\n var e_1;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n _a2.trys.push([0, 3, , 4]);\n if (!plugin.unload)\n return [3, 2];\n return [4, Promise.resolve(plugin.unload(ctx, instance))];\n case 1:\n _a2.sent();\n _a2.label = 2;\n case 2:\n this.plugins = this.plugins.filter(function(p4) {\n return p4.name !== plugin.name;\n });\n return [3, 4];\n case 3:\n e_1 = _a2.sent();\n ctx.log(\"warn\", \"Failed to unload destination\", {\n plugin: plugin.name,\n error: e_1\n });\n return [3, 4];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n CoreEventQueue2.prototype.dispatch = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var willDeliver;\n return __generator(this, function(_a2) {\n ctx.log(\"debug\", \"Dispatching\");\n ctx.stats.increment(\"message_dispatched\");\n this.queue.push(ctx);\n willDeliver = this.subscribeToDelivery(ctx);\n this.scheduleFlush(0);\n return [2, willDeliver];\n });\n });\n };\n CoreEventQueue2.prototype.subscribeToDelivery = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var _this = this;\n return __generator(this, function(_a2) {\n return [2, new Promise(function(resolve) {\n var onDeliver = function(flushed, delivered) {\n if (flushed.isSame(ctx)) {\n _this.off(\"flush\", onDeliver);\n if (delivered) {\n resolve(flushed);\n } else {\n resolve(flushed);\n }\n }\n };\n _this.on(\"flush\", onDeliver);\n })];\n });\n });\n };\n CoreEventQueue2.prototype.dispatchSingle = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var _this = this;\n return __generator(this, function(_a2) {\n ctx.log(\"debug\", \"Dispatching\");\n ctx.stats.increment(\"message_dispatched\");\n this.queue.updateAttempts(ctx);\n ctx.attempts = 1;\n return [2, this.deliver(ctx).catch(function(err) {\n var accepted = _this.enqueuRetry(err, ctx);\n if (!accepted) {\n ctx.setFailedDelivery({ reason: err });\n return ctx;\n }\n return _this.subscribeToDelivery(ctx);\n })];\n });\n });\n };\n CoreEventQueue2.prototype.isEmpty = function() {\n return this.queue.length === 0;\n };\n CoreEventQueue2.prototype.scheduleFlush = function(timeout) {\n var _this = this;\n if (timeout === void 0) {\n timeout = 500;\n }\n if (this.flushing) {\n return;\n }\n this.flushing = true;\n setTimeout(function() {\n _this.flush().then(function() {\n setTimeout(function() {\n _this.flushing = false;\n if (_this.queue.length) {\n _this.scheduleFlush(0);\n }\n }, 0);\n });\n }, timeout);\n };\n CoreEventQueue2.prototype.deliver = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var start, done, err_2, error;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.criticalTasks.done()];\n case 1:\n _a2.sent();\n start = Date.now();\n _a2.label = 2;\n case 2:\n _a2.trys.push([2, 4, , 5]);\n return [4, this.flushOne(ctx)];\n case 3:\n ctx = _a2.sent();\n done = Date.now() - start;\n this.emit(\"delivery_success\", ctx);\n ctx.stats.gauge(\"delivered\", done);\n ctx.log(\"debug\", \"Delivered\", ctx.event);\n return [2, ctx];\n case 4:\n err_2 = _a2.sent();\n error = err_2;\n ctx.log(\"error\", \"Failed to deliver\", error);\n this.emit(\"delivery_failure\", ctx, error);\n ctx.stats.increment(\"delivery_failed\");\n throw err_2;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n CoreEventQueue2.prototype.enqueuRetry = function(err, ctx) {\n var retriable = !(err instanceof ContextCancelation) || err.retry;\n if (!retriable) {\n return false;\n }\n return this.queue.pushWithBackoff(ctx);\n };\n CoreEventQueue2.prototype.flush = function() {\n return __awaiter(this, void 0, void 0, function() {\n var ctx, err_3, accepted;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (this.queue.length === 0) {\n return [2, []];\n }\n ctx = this.queue.pop();\n if (!ctx) {\n return [2, []];\n }\n ctx.attempts = this.queue.getAttempts(ctx);\n _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, this.deliver(ctx)];\n case 2:\n ctx = _a2.sent();\n this.emit(\"flush\", ctx, true);\n return [3, 4];\n case 3:\n err_3 = _a2.sent();\n accepted = this.enqueuRetry(err_3, ctx);\n if (!accepted) {\n ctx.setFailedDelivery({ reason: err_3 });\n this.emit(\"flush\", ctx, false);\n }\n return [2, []];\n case 4:\n return [2, [ctx]];\n }\n });\n });\n };\n CoreEventQueue2.prototype.isReady = function() {\n return true;\n };\n CoreEventQueue2.prototype.availableExtensions = function(denyList) {\n var available = this.plugins.filter(function(p4) {\n var _a3, _b3, _c2;\n if (p4.type !== \"destination\" && p4.name !== \"Segment.io\") {\n return true;\n }\n var alternativeNameMatch = void 0;\n (_a3 = p4.alternativeNames) === null || _a3 === void 0 ? void 0 : _a3.forEach(function(name) {\n if (denyList[name] !== void 0) {\n alternativeNameMatch = denyList[name];\n }\n });\n return (_c2 = (_b3 = denyList[p4.name]) !== null && _b3 !== void 0 ? _b3 : alternativeNameMatch) !== null && _c2 !== void 0 ? _c2 : (p4.name === \"Segment.io\" ? true : denyList.All) !== false;\n });\n var _a2 = groupBy(available, \"type\"), _b2 = _a2.before, before = _b2 === void 0 ? [] : _b2, _c = _a2.enrichment, enrichment = _c === void 0 ? [] : _c, _d = _a2.destination, destination = _d === void 0 ? [] : _d, _e = _a2.after, after = _e === void 0 ? [] : _e;\n return {\n before,\n enrichment,\n destinations: destination,\n after\n };\n };\n CoreEventQueue2.prototype.flushOne = function(ctx) {\n var _a2, _b2;\n return __awaiter(this, void 0, void 0, function() {\n var _c, before, enrichment, _i, before_1, beforeWare, temp, _d, enrichment_1, enrichmentWare, temp, _e, destinations, after, afterCalls;\n return __generator(this, function(_f) {\n switch (_f.label) {\n case 0:\n if (!this.isReady()) {\n throw new Error(\"Not ready\");\n }\n if (ctx.attempts > 1) {\n this.emit(\"delivery_retry\", ctx);\n }\n _c = this.availableExtensions((_a2 = ctx.event.integrations) !== null && _a2 !== void 0 ? _a2 : {}), before = _c.before, enrichment = _c.enrichment;\n _i = 0, before_1 = before;\n _f.label = 1;\n case 1:\n if (!(_i < before_1.length))\n return [3, 4];\n beforeWare = before_1[_i];\n return [4, ensure(ctx, beforeWare)];\n case 2:\n temp = _f.sent();\n if (temp instanceof CoreContext) {\n ctx = temp;\n }\n this.emit(\"message_enriched\", ctx, beforeWare);\n _f.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n _d = 0, enrichment_1 = enrichment;\n _f.label = 5;\n case 5:\n if (!(_d < enrichment_1.length))\n return [3, 8];\n enrichmentWare = enrichment_1[_d];\n return [4, attempt(ctx, enrichmentWare)];\n case 6:\n temp = _f.sent();\n if (temp instanceof CoreContext) {\n ctx = temp;\n }\n this.emit(\"message_enriched\", ctx, enrichmentWare);\n _f.label = 7;\n case 7:\n _d++;\n return [3, 5];\n case 8:\n _e = this.availableExtensions((_b2 = ctx.event.integrations) !== null && _b2 !== void 0 ? _b2 : {}), destinations = _e.destinations, after = _e.after;\n return [4, new Promise(function(resolve, reject) {\n setTimeout(function() {\n var attempts = destinations.map(function(destination) {\n return attempt(ctx, destination);\n });\n Promise.all(attempts).then(resolve).catch(reject);\n }, 0);\n })];\n case 9:\n _f.sent();\n ctx.stats.increment(\"message_delivered\");\n this.emit(\"message_delivered\", ctx);\n afterCalls = after.map(function(after2) {\n return attempt(ctx, after2);\n });\n return [4, Promise.all(afterCalls)];\n case 10:\n _f.sent();\n return [2, ctx];\n }\n });\n });\n };\n return CoreEventQueue2;\n }(Emitter);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/analytics/index.js\n var init_analytics = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/analytics/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/analytics/dispatch.js\n function dispatch(ctx, queue2, emitter, options) {\n return __awaiter(this, void 0, void 0, function() {\n var startTime, dispatched;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n emitter.emit(\"dispatch_start\", ctx);\n startTime = Date.now();\n if (!queue2.isEmpty())\n return [3, 2];\n return [4, queue2.dispatchSingle(ctx)];\n case 1:\n dispatched = _a2.sent();\n return [3, 4];\n case 2:\n return [4, queue2.dispatch(ctx)];\n case 3:\n dispatched = _a2.sent();\n _a2.label = 4;\n case 4:\n if (!(options === null || options === void 0 ? void 0 : options.callback))\n return [3, 6];\n return [4, invokeCallback(dispatched, options.callback, getDelay(startTime, options.timeout))];\n case 5:\n dispatched = _a2.sent();\n _a2.label = 6;\n case 6:\n if (options === null || options === void 0 ? void 0 : options.debug) {\n dispatched.flush();\n }\n return [2, dispatched];\n }\n });\n });\n }\n var getDelay;\n var init_dispatch = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/analytics/dispatch.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_callback();\n getDelay = function(startTimeInEpochMS, timeoutInMS) {\n var elapsedTime = Date.now() - startTimeInEpochMS;\n return Math.max((timeoutInMS !== null && timeoutInMS !== void 0 ? timeoutInMS : 300) - elapsedTime, 0);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/bind-all.js\n var init_bind_all = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/utils/bind-all.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/index.js\n var init_esm9 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-core@1.8.0/node_modules/@segment/analytics-core/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_interface();\n init_plugins();\n init_interfaces();\n init_events();\n init_callback();\n init_priority_queue();\n init_context();\n init_event_queue();\n init_analytics();\n init_dispatch();\n init_helpers();\n init_errors6();\n init_assertions();\n init_bind_all();\n init_stats();\n init_delivery();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/arguments-resolver/index.js\n function resolveArguments(eventName, properties, options, callback) {\n var _a2;\n var args = [eventName, properties, options, callback];\n var name = isPlainObject2(eventName) ? eventName.event : eventName;\n if (!name || !isString2(name)) {\n throw new Error(\"Event missing\");\n }\n var data = isPlainObject2(eventName) ? (_a2 = eventName.properties) !== null && _a2 !== void 0 ? _a2 : {} : isPlainObject2(properties) ? properties : {};\n var opts = {};\n if (!isFunction2(options)) {\n opts = options !== null && options !== void 0 ? options : {};\n }\n if (isPlainObject2(eventName) && !isFunction2(properties)) {\n opts = properties !== null && properties !== void 0 ? properties : {};\n }\n var cb = args.find(isFunction2);\n return [name, data, opts, cb];\n }\n function resolvePageArguments(category, name, properties, options, callback) {\n var _a2, _b2;\n var resolvedCategory = null;\n var resolvedName = null;\n var args = [category, name, properties, options, callback];\n var strings = args.filter(isString2);\n if (strings[0] !== void 0 && strings[1] !== void 0) {\n resolvedCategory = strings[0];\n resolvedName = strings[1];\n }\n if (strings.length === 1) {\n resolvedCategory = null;\n resolvedName = strings[0];\n }\n var resolvedCallback = args.find(isFunction2);\n var objects = args.filter(function(obj) {\n if (resolvedName === null) {\n return isPlainObject2(obj);\n }\n return isPlainObject2(obj) || obj === null;\n });\n var resolvedProperties = (_a2 = objects[0]) !== null && _a2 !== void 0 ? _a2 : {};\n var resolvedOptions = (_b2 = objects[1]) !== null && _b2 !== void 0 ? _b2 : {};\n return [\n resolvedCategory,\n resolvedName,\n resolvedProperties,\n resolvedOptions,\n resolvedCallback\n ];\n }\n function resolveAliasArguments(to, from5, options, callback) {\n if (isNumber2(to))\n to = to.toString();\n if (isNumber2(from5))\n from5 = from5.toString();\n var args = [to, from5, options, callback];\n var _a2 = args.filter(isString2), _b2 = _a2[0], aliasTo = _b2 === void 0 ? to : _b2, _c = _a2[1], aliasFrom = _c === void 0 ? null : _c;\n var _d = args.filter(isPlainObject2)[0], opts = _d === void 0 ? {} : _d;\n var resolvedCallback = args.find(isFunction2);\n return [aliasTo, aliasFrom, opts, resolvedCallback];\n }\n var resolveUserArguments;\n var init_arguments_resolver = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/arguments-resolver/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm9();\n resolveUserArguments = function(user) {\n return function() {\n var _a2, _b2, _c;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var values = {};\n var orderStack = [\n \"callback\",\n \"options\",\n \"traits\",\n \"id\"\n ];\n for (var _d = 0, args_1 = args; _d < args_1.length; _d++) {\n var arg = args_1[_d];\n var current = orderStack.pop();\n if (current === \"id\") {\n if (isString2(arg) || isNumber2(arg)) {\n values.id = arg.toString();\n continue;\n }\n if (arg === null || arg === void 0) {\n continue;\n }\n current = orderStack.pop();\n }\n if ((current === \"traits\" || current === \"options\") && (arg === null || arg === void 0 || isPlainObject2(arg))) {\n values[current] = arg;\n }\n if (isFunction2(arg)) {\n values.callback = arg;\n break;\n }\n }\n return [\n (_a2 = values.id) !== null && _a2 !== void 0 ? _a2 : user.id(),\n (_b2 = values.traits) !== null && _b2 !== void 0 ? _b2 : {},\n (_c = values.options) !== null && _c !== void 0 ? _c : {},\n values.callback\n ];\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/environment/index.js\n function isBrowser() {\n return typeof window !== \"undefined\";\n }\n function isServer() {\n return !isBrowser();\n }\n var init_environment = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/environment/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/connection/index.js\n function isOnline() {\n if (isBrowser()) {\n return window.navigator.onLine;\n }\n return true;\n }\n function isOffline() {\n return !isOnline();\n }\n var init_connection = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/connection/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_environment();\n }\n });\n\n // ../../../node_modules/.pnpm/unfetch@4.2.0/node_modules/unfetch/dist/unfetch.module.js\n function unfetch_module_default(e2, n2) {\n return n2 = n2 || {}, new Promise(function(t3, r2) {\n var s4 = new XMLHttpRequest(), o5 = [], u2 = [], i3 = {}, a3 = function() {\n return { ok: 2 == (s4.status / 100 | 0), statusText: s4.statusText, status: s4.status, url: s4.responseURL, text: function() {\n return Promise.resolve(s4.responseText);\n }, json: function() {\n return Promise.resolve(s4.responseText).then(JSON.parse);\n }, blob: function() {\n return Promise.resolve(new Blob([s4.response]));\n }, clone: a3, headers: { keys: function() {\n return o5;\n }, entries: function() {\n return u2;\n }, get: function(e3) {\n return i3[e3.toLowerCase()];\n }, has: function(e3) {\n return e3.toLowerCase() in i3;\n } } };\n };\n for (var l6 in s4.open(n2.method || \"get\", e2, true), s4.onload = function() {\n s4.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm, function(e3, n3, t4) {\n o5.push(n3 = n3.toLowerCase()), u2.push([n3, t4]), i3[n3] = i3[n3] ? i3[n3] + \",\" + t4 : t4;\n }), t3(a3());\n }, s4.onerror = r2, s4.withCredentials = \"include\" == n2.credentials, n2.headers)\n s4.setRequestHeader(l6, n2.headers[l6]);\n s4.send(n2.body || null);\n });\n }\n var init_unfetch_module = __esm({\n \"../../../node_modules/.pnpm/unfetch@4.2.0/node_modules/unfetch/dist/unfetch.module.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/get-global.js\n var getGlobal;\n var init_get_global = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/get-global.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getGlobal = function() {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\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 return null;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/fetch.js\n var fetch2;\n var init_fetch2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/fetch.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_unfetch_module();\n init_get_global();\n fetch2 = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var global3 = getGlobal();\n return (global3 && global3.fetch || unfetch_module_default).apply(void 0, args);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/generated/version.js\n var version7;\n var init_version7 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/generated/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version7 = \"1.74.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/version-type.js\n function getVersionType() {\n return _version;\n }\n var _version;\n var init_version_type = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/version-type.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _version = \"npm\";\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/constants/index.js\n var SEGMENT_API_HOST;\n var init_constants2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/constants/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n SEGMENT_API_HOST = \"api.segment.io/v1\";\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/remote-metrics.js\n function logError(err) {\n console.error(\"Error sending segment performance metrics\", err);\n }\n var createRemoteMetric, RemoteMetrics;\n var init_remote_metrics = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/remote-metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_fetch2();\n init_version7();\n init_version_type();\n init_constants2();\n createRemoteMetric = function(metric, tags, versionType) {\n var formattedTags = tags.reduce(function(acc, t3) {\n var _a2 = t3.split(\":\"), k4 = _a2[0], v2 = _a2[1];\n acc[k4] = v2;\n return acc;\n }, {});\n return {\n type: \"Counter\",\n metric,\n value: 1,\n tags: __assign(__assign({}, formattedTags), { library: \"analytics.js\", library_version: versionType === \"web\" ? \"next-\".concat(version7) : \"npm:next-\".concat(version7) })\n };\n };\n RemoteMetrics = /** @class */\n function() {\n function RemoteMetrics2(options) {\n var _this = this;\n var _a2, _b2, _c, _d, _e;\n this.host = (_a2 = options === null || options === void 0 ? void 0 : options.host) !== null && _a2 !== void 0 ? _a2 : SEGMENT_API_HOST;\n this.sampleRate = (_b2 = options === null || options === void 0 ? void 0 : options.sampleRate) !== null && _b2 !== void 0 ? _b2 : 1;\n this.flushTimer = (_c = options === null || options === void 0 ? void 0 : options.flushTimer) !== null && _c !== void 0 ? _c : 30 * 1e3;\n this.maxQueueSize = (_d = options === null || options === void 0 ? void 0 : options.maxQueueSize) !== null && _d !== void 0 ? _d : 20;\n this.protocol = (_e = options === null || options === void 0 ? void 0 : options.protocol) !== null && _e !== void 0 ? _e : \"https\";\n this.queue = [];\n if (this.sampleRate > 0) {\n var flushing_1 = false;\n var run_1 = function() {\n if (flushing_1) {\n return;\n }\n flushing_1 = true;\n _this.flush().catch(logError);\n flushing_1 = false;\n setTimeout(run_1, _this.flushTimer);\n };\n run_1();\n }\n }\n RemoteMetrics2.prototype.increment = function(metric, tags) {\n if (!metric.includes(\"analytics_js.\")) {\n return;\n }\n if (tags.length === 0) {\n return;\n }\n if (Math.random() > this.sampleRate) {\n return;\n }\n if (this.queue.length >= this.maxQueueSize) {\n return;\n }\n var remoteMetric = createRemoteMetric(metric, tags, getVersionType());\n this.queue.push(remoteMetric);\n if (metric.includes(\"error\")) {\n this.flush().catch(logError);\n }\n };\n RemoteMetrics2.prototype.flush = function() {\n return __awaiter(this, void 0, void 0, function() {\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (this.queue.length <= 0) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.send().catch(function(error) {\n logError(error);\n _this.sampleRate = 0;\n })];\n case 1:\n _a2.sent();\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n RemoteMetrics2.prototype.send = function() {\n return __awaiter(this, void 0, void 0, function() {\n var payload, headers, url;\n return __generator(this, function(_a2) {\n payload = { series: this.queue };\n this.queue = [];\n headers = { \"Content-Type\": \"text/plain\" };\n url = \"\".concat(this.protocol, \"://\").concat(this.host, \"/m\");\n return [2, fetch2(url, {\n headers,\n body: JSON.stringify(payload),\n method: \"POST\"\n })];\n });\n });\n };\n return RemoteMetrics2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/index.js\n var remoteMetrics, Stats;\n var init_stats2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_esm9();\n init_remote_metrics();\n Stats = /** @class */\n function(_super) {\n __extends(Stats2, _super);\n function Stats2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Stats2.initRemoteMetrics = function(options) {\n remoteMetrics = new RemoteMetrics(options);\n };\n Stats2.prototype.increment = function(metric, by, tags) {\n _super.prototype.increment.call(this, metric, by, tags);\n remoteMetrics === null || remoteMetrics === void 0 ? void 0 : remoteMetrics.increment(metric, tags !== null && tags !== void 0 ? tags : []);\n };\n return Stats2;\n }(CoreStats);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/context/index.js\n var Context;\n var init_context2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/context/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_esm9();\n init_stats2();\n Context = /** @class */\n function(_super) {\n __extends(Context2, _super);\n function Context2(event, id) {\n return _super.call(this, event, id, new Stats()) || this;\n }\n Context2.system = function() {\n return new this({ type: \"track\", event: \"system\" });\n };\n return Context2;\n }(CoreContext);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/get-page-context.js\n function isBufferedPageContext(bufferedPageCtx) {\n if (!isPlainObject2(bufferedPageCtx))\n return false;\n if (bufferedPageCtx.__t !== BufferedPageContextDiscriminant)\n return false;\n for (var k4 in bufferedPageCtx) {\n if (!BUFFERED_PAGE_CONTEXT_KEYS.includes(k4)) {\n return false;\n }\n }\n return true;\n }\n var BufferedPageContextDiscriminant, createBufferedPageContext, BUFFERED_PAGE_CONTEXT_KEYS, createCanonicalURL, removeHash, parseCanonicalPath, createPageContext, getDefaultBufferedPageContext, getDefaultPageContext;\n var init_get_page_context = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/get-page-context.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm9();\n BufferedPageContextDiscriminant = \"bpc\";\n createBufferedPageContext = function(url, canonicalUrl, search, path, title2, referrer) {\n return {\n __t: BufferedPageContextDiscriminant,\n c: canonicalUrl,\n p: path,\n u: url,\n s: search,\n t: title2,\n r: referrer\n };\n };\n BUFFERED_PAGE_CONTEXT_KEYS = Object.keys(createBufferedPageContext(\"\", \"\", \"\", \"\", \"\", \"\"));\n createCanonicalURL = function(canonicalUrl, searchParams) {\n return canonicalUrl.indexOf(\"?\") > -1 ? canonicalUrl : canonicalUrl + searchParams;\n };\n removeHash = function(href) {\n var hashIdx = href.indexOf(\"#\");\n return hashIdx === -1 ? href : href.slice(0, hashIdx);\n };\n parseCanonicalPath = function(canonicalUrl) {\n try {\n return new URL(canonicalUrl).pathname;\n } catch (_e) {\n return canonicalUrl[0] === \"/\" ? canonicalUrl : \"/\" + canonicalUrl;\n }\n };\n createPageContext = function(_a2) {\n var canonicalUrl = _a2.c, pathname = _a2.p, search = _a2.s, url = _a2.u, referrer = _a2.r, title2 = _a2.t;\n var newPath = canonicalUrl ? parseCanonicalPath(canonicalUrl) : pathname;\n var newUrl = canonicalUrl ? createCanonicalURL(canonicalUrl, search) : removeHash(url);\n return {\n path: newPath,\n referrer,\n search,\n title: title2,\n url: newUrl\n };\n };\n getDefaultBufferedPageContext = function() {\n var c4 = document.querySelector(\"link[rel='canonical']\");\n return createBufferedPageContext(location.href, c4 && c4.getAttribute(\"href\") || void 0, location.search, location.pathname, document.title, document.referrer);\n };\n getDefaultPageContext = function() {\n return createPageContext(getDefaultBufferedPageContext());\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/pick.js\n function pick2(object, keys) {\n return Object.assign.apply(Object, __spreadArray([{}], keys.map(function(key) {\n var _a2;\n if (object && Object.prototype.hasOwnProperty.call(object, key)) {\n return _a2 = {}, _a2[key] = object[key], _a2;\n }\n }), false));\n }\n var init_pick2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/pick.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/add-page-context.js\n var addPageContext;\n var init_add_page_context = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/add-page-context.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_pick2();\n init_get_page_context();\n addPageContext = function(event, pageCtx) {\n if (pageCtx === void 0) {\n pageCtx = getDefaultPageContext();\n }\n var evtCtx = event.context;\n var pageContextFromEventProps;\n if (event.type === \"page\") {\n pageContextFromEventProps = event.properties && pick2(event.properties, Object.keys(pageCtx));\n event.properties = __assign(__assign(__assign({}, pageCtx), event.properties), event.name ? { name: event.name } : {});\n }\n evtCtx.page = __assign(__assign(__assign({}, pageCtx), pageContextFromEventProps), evtCtx.page);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/index.js\n var init_page = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/page/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_get_page_context();\n init_add_page_context();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/events/interfaces.js\n var init_interfaces2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/events/interfaces.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/events/index.js\n var EventFactory;\n var init_events2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/events/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_dist2();\n init_page();\n init_esm9();\n init_interfaces2();\n EventFactory = /** @class */\n function(_super) {\n __extends(EventFactory2, _super);\n function EventFactory2(user) {\n var _this = _super.call(this, {\n createMessageId: function() {\n return \"ajs-next-\".concat(Date.now(), \"-\").concat(v4());\n },\n onEventMethodCall: function(_a2) {\n var options = _a2.options;\n _this.maybeUpdateAnonId(options);\n },\n onFinishedEvent: function(event) {\n _this.addIdentity(event);\n return event;\n }\n }) || this;\n _this.user = user;\n return _this;\n }\n EventFactory2.prototype.maybeUpdateAnonId = function(options) {\n (options === null || options === void 0 ? void 0 : options.anonymousId) && this.user.anonymousId(options.anonymousId);\n };\n EventFactory2.prototype.addIdentity = function(event) {\n if (this.user.id()) {\n event.userId = this.user.id();\n }\n if (this.user.anonymousId()) {\n event.anonymousId = this.user.anonymousId();\n }\n };\n EventFactory2.prototype.track = function(event, properties, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.track.call(this, event, properties, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n EventFactory2.prototype.page = function(category, page, properties, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.page.call(this, category, page, properties, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n EventFactory2.prototype.screen = function(category, screen, properties, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.screen.call(this, category, screen, properties, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n EventFactory2.prototype.identify = function(userId, traits, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.identify.call(this, userId, traits, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n EventFactory2.prototype.group = function(groupId, traits, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.group.call(this, groupId, traits, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n EventFactory2.prototype.alias = function(to, from5, options, globalIntegrations, pageCtx) {\n var ev = _super.prototype.alias.call(this, to, from5, options, globalIntegrations);\n addPageContext(ev, pageCtx);\n return ev;\n };\n return EventFactory2;\n }(CoreEventFactory);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/plugin/index.js\n var isDestinationPluginWithAddMiddleware;\n var init_plugin = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/plugin/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n isDestinationPluginWithAddMiddleware = function(plugin) {\n return \"addMiddleware\" in plugin && plugin.type === \"destination\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/index.js\n var init_priority_queue2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm9();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/persisted.js\n function persisted(key) {\n var items = loc.getItem(key);\n return (items ? JSON.parse(items) : []).map(function(p4) {\n return new Context(p4.event, p4.id);\n });\n }\n function persistItems(key, items) {\n var existing = persisted(key);\n var all3 = __spreadArray(__spreadArray([], items, true), existing, true);\n var merged = all3.reduce(function(acc, item) {\n var _a2;\n return __assign(__assign({}, acc), (_a2 = {}, _a2[item.id] = item, _a2));\n }, {});\n loc.setItem(key, JSON.stringify(Object.values(merged)));\n }\n function seen(key) {\n var stored = loc.getItem(key);\n return stored ? JSON.parse(stored) : {};\n }\n function persistSeen(key, memory) {\n var stored = seen(key);\n loc.setItem(key, JSON.stringify(__assign(__assign({}, stored), memory)));\n }\n function remove(key) {\n loc.removeItem(key);\n }\n function mutex(key, onUnlock, attempt2) {\n if (attempt2 === void 0) {\n attempt2 = 0;\n }\n var lockTimeout = 50;\n var lockKey = \"persisted-queue:v1:\".concat(key, \":lock\");\n var expired = function(lock2) {\n return (/* @__PURE__ */ new Date()).getTime() > lock2;\n };\n var rawLock = loc.getItem(lockKey);\n var lock = rawLock ? JSON.parse(rawLock) : null;\n var allowed = lock === null || expired(lock);\n if (allowed) {\n loc.setItem(lockKey, JSON.stringify(now() + lockTimeout));\n onUnlock();\n loc.removeItem(lockKey);\n return;\n }\n if (!allowed && attempt2 < 3) {\n setTimeout(function() {\n mutex(key, onUnlock, attempt2 + 1);\n }, lockTimeout);\n } else {\n console.error(\"Unable to retrieve lock\");\n }\n }\n var loc, now, PersistedPriorityQueue;\n var init_persisted = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/persisted.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_priority_queue2();\n init_context2();\n init_environment();\n loc = {\n getItem: function() {\n },\n setItem: function() {\n },\n removeItem: function() {\n }\n };\n try {\n loc = isBrowser() && window.localStorage ? window.localStorage : loc;\n } catch (err) {\n console.warn(\"Unable to access localStorage\", err);\n }\n now = function() {\n return (/* @__PURE__ */ new Date()).getTime();\n };\n PersistedPriorityQueue = /** @class */\n function(_super) {\n __extends(PersistedPriorityQueue2, _super);\n function PersistedPriorityQueue2(maxAttempts, key) {\n var _this = _super.call(this, maxAttempts, []) || this;\n var itemsKey = \"persisted-queue:v1:\".concat(key, \":items\");\n var seenKey = \"persisted-queue:v1:\".concat(key, \":seen\");\n var saved = [];\n var lastSeen = {};\n mutex(key, function() {\n try {\n saved = persisted(itemsKey);\n lastSeen = seen(seenKey);\n remove(itemsKey);\n remove(seenKey);\n _this.queue = __spreadArray(__spreadArray([], saved, true), _this.queue, true);\n _this.seen = __assign(__assign({}, lastSeen), _this.seen);\n } catch (err) {\n console.error(err);\n }\n });\n window.addEventListener(\"pagehide\", function() {\n if (_this.todo > 0) {\n var items_1 = __spreadArray(__spreadArray([], _this.queue, true), _this.future, true);\n try {\n mutex(key, function() {\n persistItems(itemsKey, items_1);\n persistSeen(seenKey, _this.seen);\n });\n } catch (err) {\n console.error(err);\n }\n }\n });\n return _this;\n }\n return PersistedPriorityQueue2;\n }(PriorityQueue);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/queue/event-queue.js\n var EventQueue;\n var init_event_queue2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/queue/event-queue.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_persisted();\n init_esm9();\n init_connection();\n EventQueue = /** @class */\n function(_super) {\n __extends(EventQueue2, _super);\n function EventQueue2(nameOrQueue) {\n return _super.call(this, typeof nameOrQueue === \"string\" ? new PersistedPriorityQueue(4, nameOrQueue) : nameOrQueue) || this;\n }\n EventQueue2.prototype.flush = function() {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n if (isOffline())\n return [2, []];\n return [2, _super.prototype.flush.call(this)];\n });\n });\n };\n return EventQueue2;\n }(CoreEventQueue);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/bind-all.js\n function bindAll(obj) {\n var proto = obj.constructor.prototype;\n for (var _i = 0, _a2 = Object.getOwnPropertyNames(proto); _i < _a2.length; _i++) {\n var key = _a2[_i];\n if (key !== \"constructor\") {\n var desc = Object.getOwnPropertyDescriptor(obj.constructor.prototype, key);\n if (!!desc && typeof desc.value === \"function\") {\n obj[key] = obj[key].bind(obj);\n }\n }\n }\n return obj;\n }\n var init_bind_all2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/bind-all.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/js-cookie@3.0.1/node_modules/js-cookie/dist/js.cookie.mjs\n function assign(target) {\n for (var i3 = 1; i3 < arguments.length; i3++) {\n var source = arguments[i3];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target;\n }\n function init(converter, defaultAttributes) {\n function set(key, value, attributes) {\n if (typeof document === \"undefined\") {\n return;\n }\n attributes = assign({}, defaultAttributes, attributes);\n if (typeof attributes.expires === \"number\") {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n key = encodeURIComponent(key).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);\n var stringifiedAttributes = \"\";\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue;\n }\n stringifiedAttributes += \"; \" + attributeName;\n if (attributes[attributeName] === true) {\n continue;\n }\n stringifiedAttributes += \"=\" + attributes[attributeName].split(\";\")[0];\n }\n return document.cookie = key + \"=\" + converter.write(value, key) + stringifiedAttributes;\n }\n function get(key) {\n if (typeof document === \"undefined\" || arguments.length && !key) {\n return;\n }\n var cookies = document.cookie ? document.cookie.split(\"; \") : [];\n var jar = {};\n for (var i3 = 0; i3 < cookies.length; i3++) {\n var parts = cookies[i3].split(\"=\");\n var value = parts.slice(1).join(\"=\");\n try {\n var foundKey = decodeURIComponent(parts[0]);\n jar[foundKey] = converter.read(value, foundKey);\n if (key === foundKey) {\n break;\n }\n } catch (e2) {\n }\n }\n return key ? jar[key] : jar;\n }\n return Object.create(\n {\n set,\n get,\n remove: function(key, attributes) {\n set(\n key,\n \"\",\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function(attributes) {\n return init(this.converter, assign({}, this.attributes, attributes));\n },\n withConverter: function(converter2) {\n return init(assign({}, this.converter, converter2), this.attributes);\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n );\n }\n var defaultConverter, api, js_cookie_default;\n var init_js_cookie = __esm({\n \"../../../node_modules/.pnpm/js-cookie@3.0.1/node_modules/js-cookie/dist/js.cookie.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n defaultConverter = {\n read: function(value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent);\n },\n write: function(value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n );\n }\n };\n api = init(defaultConverter, { path: \"/\" });\n js_cookie_default = api;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/user/tld.js\n function levels(url) {\n var host = url.hostname;\n var parts = host.split(\".\");\n var last = parts[parts.length - 1];\n var levels2 = [];\n if (parts.length === 4 && parseInt(last, 10) > 0) {\n return levels2;\n }\n if (parts.length <= 1) {\n return levels2;\n }\n for (var i3 = parts.length - 2; i3 >= 0; --i3) {\n levels2.push(parts.slice(i3).join(\".\"));\n }\n return levels2;\n }\n function parseUrl(url) {\n try {\n return new URL(url);\n } catch (_a2) {\n return;\n }\n }\n function tld(url) {\n var parsedUrl = parseUrl(url);\n if (!parsedUrl)\n return;\n var lvls = levels(parsedUrl);\n for (var i3 = 0; i3 < lvls.length; ++i3) {\n var cname = \"__tld__\";\n var domain2 = lvls[i3];\n var opts = { domain: \".\" + domain2 };\n try {\n js_cookie_default.set(cname, \"1\", opts);\n if (js_cookie_default.get(cname)) {\n js_cookie_default.remove(cname, opts);\n return domain2;\n }\n } catch (_2) {\n return;\n }\n }\n }\n var init_tld = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/user/tld.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_js_cookie();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/cookieStorage.js\n var ONE_YEAR, CookieStorage;\n var init_cookieStorage = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/cookieStorage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_js_cookie();\n init_tld();\n ONE_YEAR = 365;\n CookieStorage = /** @class */\n function() {\n function CookieStorage2(options) {\n if (options === void 0) {\n options = CookieStorage2.defaults;\n }\n this.options = __assign(__assign({}, CookieStorage2.defaults), options);\n }\n Object.defineProperty(CookieStorage2, \"defaults\", {\n get: function() {\n return {\n maxage: ONE_YEAR,\n domain: tld(window.location.href),\n path: \"/\",\n sameSite: \"Lax\"\n };\n },\n enumerable: false,\n configurable: true\n });\n CookieStorage2.prototype.opts = function() {\n return {\n sameSite: this.options.sameSite,\n expires: this.options.maxage,\n domain: this.options.domain,\n path: this.options.path,\n secure: this.options.secure\n };\n };\n CookieStorage2.prototype.get = function(key) {\n var _a2;\n try {\n var value = js_cookie_default.get(key);\n if (value === void 0 || value === null) {\n return null;\n }\n try {\n return (_a2 = JSON.parse(value)) !== null && _a2 !== void 0 ? _a2 : null;\n } catch (e2) {\n return value !== null && value !== void 0 ? value : null;\n }\n } catch (e2) {\n return null;\n }\n };\n CookieStorage2.prototype.set = function(key, value) {\n if (typeof value === \"string\") {\n js_cookie_default.set(key, value, this.opts());\n } else if (value === null) {\n js_cookie_default.remove(key, this.opts());\n } else {\n js_cookie_default.set(key, JSON.stringify(value), this.opts());\n }\n };\n CookieStorage2.prototype.remove = function(key) {\n return js_cookie_default.remove(key, this.opts());\n };\n return CookieStorage2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/localStorage.js\n var LocalStorage;\n var init_localStorage = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/localStorage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LocalStorage = /** @class */\n function() {\n function LocalStorage2() {\n }\n LocalStorage2.prototype.localStorageWarning = function(key, state) {\n console.warn(\"Unable to access \".concat(key, \", localStorage may be \").concat(state));\n };\n LocalStorage2.prototype.get = function(key) {\n var _a2;\n try {\n var val = localStorage.getItem(key);\n if (val === null) {\n return null;\n }\n try {\n return (_a2 = JSON.parse(val)) !== null && _a2 !== void 0 ? _a2 : null;\n } catch (e2) {\n return val !== null && val !== void 0 ? val : null;\n }\n } catch (err) {\n this.localStorageWarning(key, \"unavailable\");\n return null;\n }\n };\n LocalStorage2.prototype.set = function(key, value) {\n try {\n localStorage.setItem(key, JSON.stringify(value));\n } catch (_a2) {\n this.localStorageWarning(key, \"full\");\n }\n };\n LocalStorage2.prototype.remove = function(key) {\n try {\n return localStorage.removeItem(key);\n } catch (err) {\n this.localStorageWarning(key, \"unavailable\");\n }\n };\n return LocalStorage2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/memoryStorage.js\n var MemoryStorage;\n var init_memoryStorage = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/memoryStorage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MemoryStorage = /** @class */\n function() {\n function MemoryStorage2() {\n this.cache = {};\n }\n MemoryStorage2.prototype.get = function(key) {\n var _a2;\n return (_a2 = this.cache[key]) !== null && _a2 !== void 0 ? _a2 : null;\n };\n MemoryStorage2.prototype.set = function(key, value) {\n this.cache[key] = value;\n };\n MemoryStorage2.prototype.remove = function(key) {\n delete this.cache[key];\n };\n return MemoryStorage2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/types.js\n var StoreType;\n var init_types3 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/types.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n StoreType = {\n Cookie: \"cookie\",\n LocalStorage: \"localStorage\",\n Memory: \"memory\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/settings.js\n function isArrayOfStoreType(s4) {\n return s4 && s4.stores && Array.isArray(s4.stores) && s4.stores.every(function(e2) {\n return Object.values(StoreType).includes(e2);\n });\n }\n function isStoreTypeWithSettings(s4) {\n return typeof s4 === \"object\" && s4.name !== void 0;\n }\n var init_settings = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/settings.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_types3();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/universalStorage.js\n var _logStoreKeyError, UniversalStorage;\n var init_universalStorage = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/universalStorage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _logStoreKeyError = function(store, action, key, err) {\n console.warn(\"\".concat(store.constructor.name, \": Can't \").concat(action, ' key \"').concat(key, '\" | Err: ').concat(err));\n };\n UniversalStorage = /** @class */\n function() {\n function UniversalStorage2(stores) {\n this.stores = stores;\n }\n UniversalStorage2.prototype.get = function(key) {\n var val = null;\n for (var _i = 0, _a2 = this.stores; _i < _a2.length; _i++) {\n var store = _a2[_i];\n try {\n val = store.get(key);\n if (val !== void 0 && val !== null) {\n return val;\n }\n } catch (e2) {\n _logStoreKeyError(store, \"get\", key, e2);\n }\n }\n return null;\n };\n UniversalStorage2.prototype.set = function(key, value) {\n this.stores.forEach(function(store) {\n try {\n store.set(key, value);\n } catch (e2) {\n _logStoreKeyError(store, \"set\", key, e2);\n }\n });\n };\n UniversalStorage2.prototype.clear = function(key) {\n this.stores.forEach(function(store) {\n try {\n store.remove(key);\n } catch (e2) {\n _logStoreKeyError(store, \"remove\", key, e2);\n }\n });\n };\n UniversalStorage2.prototype.getAndSync = function(key) {\n var val = this.get(key);\n var coercedValue = typeof val === \"number\" ? val.toString() : val;\n this.set(key, coercedValue);\n return coercedValue;\n };\n return UniversalStorage2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/index.js\n function initializeStorages(args) {\n var storages = args.map(function(s4) {\n var type;\n var settings;\n if (isStoreTypeWithSettings(s4)) {\n type = s4.name;\n settings = s4.settings;\n } else {\n type = s4;\n }\n switch (type) {\n case StoreType.Cookie:\n return new CookieStorage(settings);\n case StoreType.LocalStorage:\n return new LocalStorage();\n case StoreType.Memory:\n return new MemoryStorage();\n default:\n throw new Error(\"Unknown Store Type: \".concat(s4));\n }\n });\n return storages;\n }\n function applyCookieOptions(storeTypes, cookieOptions2) {\n return storeTypes.map(function(s4) {\n if (cookieOptions2 && s4 === StoreType.Cookie) {\n return {\n name: s4,\n settings: cookieOptions2\n };\n }\n return s4;\n });\n }\n var init_storage = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/storage/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_cookieStorage();\n init_localStorage();\n init_memoryStorage();\n init_settings();\n init_types3();\n init_types3();\n init_localStorage();\n init_cookieStorage();\n init_memoryStorage();\n init_universalStorage();\n init_settings();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/user/index.js\n var defaults2, User, groupDefaults, Group;\n var init_user = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/user/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_dist2();\n init_bind_all2();\n init_storage();\n defaults2 = {\n persist: true,\n cookie: {\n key: \"ajs_user_id\",\n oldKey: \"ajs_user\"\n },\n localStorage: {\n key: \"ajs_user_traits\"\n }\n };\n User = /** @class */\n function() {\n function User2(options, cookieOptions2) {\n if (options === void 0) {\n options = defaults2;\n }\n var _this = this;\n var _a2, _b2, _c, _d;\n this.options = {};\n this.id = function(id) {\n if (_this.options.disable) {\n return null;\n }\n var prevId = _this.identityStore.getAndSync(_this.idKey);\n if (id !== void 0) {\n _this.identityStore.set(_this.idKey, id);\n var changingIdentity = id !== prevId && prevId !== null && id !== null;\n if (changingIdentity) {\n _this.anonymousId(null);\n }\n }\n var retId = _this.identityStore.getAndSync(_this.idKey);\n if (retId)\n return retId;\n var retLeg = _this.legacyUserStore.get(defaults2.cookie.oldKey);\n return retLeg ? typeof retLeg === \"object\" ? retLeg.id : retLeg : null;\n };\n this.anonymousId = function(id) {\n var _a3, _b3;\n if (_this.options.disable) {\n return null;\n }\n if (id === void 0) {\n var val = (_a3 = _this.identityStore.getAndSync(_this.anonKey)) !== null && _a3 !== void 0 ? _a3 : (_b3 = _this.legacySIO()) === null || _b3 === void 0 ? void 0 : _b3[0];\n if (val) {\n return val;\n }\n }\n if (id === null) {\n _this.identityStore.set(_this.anonKey, null);\n return _this.identityStore.getAndSync(_this.anonKey);\n }\n _this.identityStore.set(_this.anonKey, id !== null && id !== void 0 ? id : v4());\n return _this.identityStore.getAndSync(_this.anonKey);\n };\n this.traits = function(traits) {\n var _a3;\n if (_this.options.disable) {\n return;\n }\n if (traits === null) {\n traits = {};\n }\n if (traits) {\n _this.traitsStore.set(_this.traitsKey, traits !== null && traits !== void 0 ? traits : {});\n }\n return (_a3 = _this.traitsStore.get(_this.traitsKey)) !== null && _a3 !== void 0 ? _a3 : {};\n };\n this.options = __assign(__assign({}, defaults2), options);\n this.cookieOptions = cookieOptions2;\n this.idKey = (_b2 = (_a2 = options.cookie) === null || _a2 === void 0 ? void 0 : _a2.key) !== null && _b2 !== void 0 ? _b2 : defaults2.cookie.key;\n this.traitsKey = (_d = (_c = options.localStorage) === null || _c === void 0 ? void 0 : _c.key) !== null && _d !== void 0 ? _d : defaults2.localStorage.key;\n this.anonKey = \"ajs_anonymous_id\";\n this.identityStore = this.createStorage(this.options, cookieOptions2);\n this.legacyUserStore = this.createStorage(this.options, cookieOptions2, function(s4) {\n return s4 === StoreType.Cookie;\n });\n this.traitsStore = this.createStorage(this.options, cookieOptions2, function(s4) {\n return s4 !== StoreType.Cookie;\n });\n var legacyUser = this.legacyUserStore.get(defaults2.cookie.oldKey);\n if (legacyUser && typeof legacyUser === \"object\") {\n legacyUser.id && this.id(legacyUser.id);\n legacyUser.traits && this.traits(legacyUser.traits);\n }\n bindAll(this);\n }\n User2.prototype.legacySIO = function() {\n var val = this.legacyUserStore.get(\"_sio\");\n if (!val) {\n return null;\n }\n var _a2 = val.split(\"----\"), anon = _a2[0], user = _a2[1];\n return [anon, user];\n };\n User2.prototype.identify = function(id, traits) {\n if (this.options.disable) {\n return;\n }\n traits = traits !== null && traits !== void 0 ? traits : {};\n var currentId = this.id();\n if (currentId === null || currentId === id) {\n traits = __assign(__assign({}, this.traits()), traits);\n }\n if (id) {\n this.id(id);\n }\n this.traits(traits);\n };\n User2.prototype.logout = function() {\n this.anonymousId(null);\n this.id(null);\n this.traits({});\n };\n User2.prototype.reset = function() {\n this.logout();\n this.identityStore.clear(this.idKey);\n this.identityStore.clear(this.anonKey);\n this.traitsStore.clear(this.traitsKey);\n };\n User2.prototype.load = function() {\n return new User2(this.options, this.cookieOptions);\n };\n User2.prototype.save = function() {\n return true;\n };\n User2.prototype.createStorage = function(options, cookieOpts, filterStores) {\n var stores = [\n StoreType.LocalStorage,\n StoreType.Cookie,\n StoreType.Memory\n ];\n if (options.disable) {\n return new UniversalStorage([]);\n }\n if (!options.persist) {\n return new UniversalStorage([new MemoryStorage()]);\n }\n if (options.storage !== void 0 && options.storage !== null) {\n if (isArrayOfStoreType(options.storage)) {\n stores = options.storage.stores;\n }\n }\n if (options.localStorageFallbackDisabled) {\n stores = stores.filter(function(s4) {\n return s4 !== StoreType.LocalStorage;\n });\n }\n if (filterStores) {\n stores = stores.filter(filterStores);\n }\n return new UniversalStorage(initializeStorages(applyCookieOptions(stores, cookieOpts)));\n };\n User2.defaults = defaults2;\n return User2;\n }();\n groupDefaults = {\n persist: true,\n cookie: {\n key: \"ajs_group_id\"\n },\n localStorage: {\n key: \"ajs_group_properties\"\n }\n };\n Group = /** @class */\n function(_super) {\n __extends(Group4, _super);\n function Group4(options, cookie) {\n if (options === void 0) {\n options = groupDefaults;\n }\n var _this = _super.call(this, __assign(__assign({}, groupDefaults), options), cookie) || this;\n _this.anonymousId = function(_id) {\n return void 0;\n };\n bindAll(_this);\n return _this;\n }\n return Group4;\n }(User);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/global-analytics-helper.js\n function getGlobalAnalytics() {\n return window[_globalAnalyticsKey];\n }\n function setGlobalAnalyticsKey(key) {\n _globalAnalyticsKey = key;\n }\n function setGlobalAnalytics(analytics) {\n ;\n window[_globalAnalyticsKey] = analytics;\n }\n var _globalAnalyticsKey;\n var init_global_analytics_helper = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/global-analytics-helper.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _globalAnalyticsKey = \"analytics\";\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/is-thenable.js\n var isThenable3;\n var init_is_thenable2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/is-thenable.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n isThenable3 = function(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value && typeof value.then === \"function\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/buffer/index.js\n function callAnalyticsMethod(analytics, call2) {\n return __awaiter(this, void 0, void 0, function() {\n var result, err_1;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n _a2.trys.push([0, 3, , 4]);\n if (call2.called) {\n return [2, void 0];\n }\n call2.called = true;\n result = analytics[call2.method].apply(analytics, call2.args);\n if (!isThenable3(result))\n return [3, 2];\n return [4, result];\n case 1:\n _a2.sent();\n _a2.label = 2;\n case 2:\n call2.resolve(result);\n return [3, 4];\n case 3:\n err_1 = _a2.sent();\n call2.reject(err_1);\n return [3, 4];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }\n var flushSyncAnalyticsCalls, flushAddSourceMiddleware, flushRegister, flushOn, flushSetAnonymousID, flushAnalyticsCallsInNewTask, popPageContext, hasBufferedPageContextAsLastArg, PreInitMethodCall, PreInitMethodCallBuffer, AnalyticsBuffered;\n var init_buffer3 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/buffer/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_is_thenable2();\n init_version7();\n init_global_analytics_helper();\n init_page();\n init_version_type();\n flushSyncAnalyticsCalls = function(name, analytics, buffer2) {\n buffer2.getAndRemove(name).forEach(function(c4) {\n callAnalyticsMethod(analytics, c4).catch(console.error);\n });\n };\n flushAddSourceMiddleware = function(analytics, buffer2) {\n return __awaiter(void 0, void 0, void 0, function() {\n var _i, _a2, c4;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n _i = 0, _a2 = buffer2.getAndRemove(\"addSourceMiddleware\");\n _b2.label = 1;\n case 1:\n if (!(_i < _a2.length))\n return [3, 4];\n c4 = _a2[_i];\n return [4, callAnalyticsMethod(analytics, c4).catch(console.error)];\n case 2:\n _b2.sent();\n _b2.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n flushRegister = function(analytics, buffer2) {\n return __awaiter(void 0, void 0, void 0, function() {\n var _i, _a2, c4;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n _i = 0, _a2 = buffer2.getAndRemove(\"register\");\n _b2.label = 1;\n case 1:\n if (!(_i < _a2.length))\n return [3, 4];\n c4 = _a2[_i];\n return [4, callAnalyticsMethod(analytics, c4).catch(console.error)];\n case 2:\n _b2.sent();\n _b2.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n flushOn = flushSyncAnalyticsCalls.bind(void 0, \"on\");\n flushSetAnonymousID = flushSyncAnalyticsCalls.bind(void 0, \"setAnonymousId\");\n flushAnalyticsCallsInNewTask = function(analytics, buffer2) {\n ;\n Object.keys(buffer2.calls).forEach(function(m2) {\n buffer2.getAndRemove(m2).forEach(function(c4) {\n setTimeout(function() {\n callAnalyticsMethod(analytics, c4).catch(console.error);\n }, 0);\n });\n });\n };\n popPageContext = function(args) {\n if (hasBufferedPageContextAsLastArg(args)) {\n var ctx = args.pop();\n return createPageContext(ctx);\n }\n };\n hasBufferedPageContextAsLastArg = function(args) {\n var lastArg = args[args.length - 1];\n return isBufferedPageContext(lastArg);\n };\n PreInitMethodCall = /** @class */\n /* @__PURE__ */ function() {\n function PreInitMethodCall2(method, args, resolve, reject) {\n if (resolve === void 0) {\n resolve = function() {\n };\n }\n if (reject === void 0) {\n reject = console.error;\n }\n this.method = method;\n this.resolve = resolve;\n this.reject = reject;\n this.called = false;\n this.args = args;\n }\n return PreInitMethodCall2;\n }();\n PreInitMethodCallBuffer = /** @class */\n function() {\n function PreInitMethodCallBuffer2() {\n var calls = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n calls[_i] = arguments[_i];\n }\n this._callMap = {};\n this.add.apply(this, calls);\n }\n Object.defineProperty(PreInitMethodCallBuffer2.prototype, \"calls\", {\n /**\n * Pull any buffered method calls from the window object, and use them to hydrate the instance buffer.\n */\n get: function() {\n this._pushSnippetWindowBuffer();\n return this._callMap;\n },\n set: function(calls) {\n this._callMap = calls;\n },\n enumerable: false,\n configurable: true\n });\n PreInitMethodCallBuffer2.prototype.get = function(methodName) {\n var _a2;\n return (_a2 = this.calls[methodName]) !== null && _a2 !== void 0 ? _a2 : [];\n };\n PreInitMethodCallBuffer2.prototype.getAndRemove = function(methodName) {\n var calls = this.get(methodName);\n this.calls[methodName] = [];\n return calls;\n };\n PreInitMethodCallBuffer2.prototype.add = function() {\n var _this = this;\n var calls = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n calls[_i] = arguments[_i];\n }\n calls.forEach(function(call2) {\n var eventsExpectingPageContext = [\n \"track\",\n \"screen\",\n \"alias\",\n \"group\",\n \"page\",\n \"identify\"\n ];\n if (eventsExpectingPageContext.includes(call2.method) && !hasBufferedPageContextAsLastArg(call2.args)) {\n call2.args = __spreadArray(__spreadArray([], call2.args, true), [getDefaultBufferedPageContext()], false);\n }\n if (_this.calls[call2.method]) {\n _this.calls[call2.method].push(call2);\n } else {\n _this.calls[call2.method] = [call2];\n }\n });\n };\n PreInitMethodCallBuffer2.prototype.clear = function() {\n this._pushSnippetWindowBuffer();\n this.calls = {};\n };\n PreInitMethodCallBuffer2.prototype.toArray = function() {\n var _a2;\n return (_a2 = []).concat.apply(_a2, Object.values(this.calls));\n };\n PreInitMethodCallBuffer2.prototype._pushSnippetWindowBuffer = function() {\n if (getVersionType() === \"npm\") {\n return void 0;\n }\n var wa = getGlobalAnalytics();\n if (!Array.isArray(wa))\n return void 0;\n var buffered = wa.splice(0, wa.length);\n var calls = buffered.map(function(_a2) {\n var methodName = _a2[0], args = _a2.slice(1);\n return new PreInitMethodCall(methodName, args);\n });\n this.add.apply(this, calls);\n };\n return PreInitMethodCallBuffer2;\n }();\n AnalyticsBuffered = /** @class */\n function() {\n function AnalyticsBuffered2(loader) {\n var _this = this;\n this.trackSubmit = this._createMethod(\"trackSubmit\");\n this.trackClick = this._createMethod(\"trackClick\");\n this.trackLink = this._createMethod(\"trackLink\");\n this.pageView = this._createMethod(\"pageview\");\n this.identify = this._createMethod(\"identify\");\n this.reset = this._createMethod(\"reset\");\n this.group = this._createMethod(\"group\");\n this.track = this._createMethod(\"track\");\n this.ready = this._createMethod(\"ready\");\n this.alias = this._createMethod(\"alias\");\n this.debug = this._createChainableMethod(\"debug\");\n this.page = this._createMethod(\"page\");\n this.once = this._createChainableMethod(\"once\");\n this.off = this._createChainableMethod(\"off\");\n this.on = this._createChainableMethod(\"on\");\n this.addSourceMiddleware = this._createMethod(\"addSourceMiddleware\");\n this.setAnonymousId = this._createMethod(\"setAnonymousId\");\n this.addDestinationMiddleware = this._createMethod(\"addDestinationMiddleware\");\n this.screen = this._createMethod(\"screen\");\n this.register = this._createMethod(\"register\");\n this.deregister = this._createMethod(\"deregister\");\n this.user = this._createMethod(\"user\");\n this.VERSION = version7;\n this._preInitBuffer = new PreInitMethodCallBuffer();\n this._promise = loader(this._preInitBuffer);\n this._promise.then(function(_a2) {\n var ajs = _a2[0], ctx = _a2[1];\n _this.instance = ajs;\n _this.ctx = ctx;\n }).catch(function() {\n });\n }\n AnalyticsBuffered2.prototype.then = function() {\n var _a2;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return (_a2 = this._promise).then.apply(_a2, args);\n };\n AnalyticsBuffered2.prototype.catch = function() {\n var _a2;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return (_a2 = this._promise).catch.apply(_a2, args);\n };\n AnalyticsBuffered2.prototype.finally = function() {\n var _a2;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return (_a2 = this._promise).finally.apply(_a2, args);\n };\n AnalyticsBuffered2.prototype._createMethod = function(methodName) {\n var _this = this;\n return function() {\n var _a2;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (_this.instance) {\n var result = (_a2 = _this.instance)[methodName].apply(_a2, args);\n return Promise.resolve(result);\n }\n return new Promise(function(resolve, reject) {\n _this._preInitBuffer.add(new PreInitMethodCall(methodName, args, resolve, reject));\n });\n };\n };\n AnalyticsBuffered2.prototype._createChainableMethod = function(methodName) {\n var _this = this;\n return function() {\n var _a2;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (_this.instance) {\n void (_a2 = _this.instance)[methodName].apply(_a2, args);\n return _this;\n } else {\n _this._preInitBuffer.add(new PreInitMethodCall(methodName, args));\n }\n return _this;\n };\n };\n return AnalyticsBuffered2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/callback/index.js\n var init_callback2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/callback/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm9();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js\n var auto_track_exports = {};\n __export(auto_track_exports, {\n form: () => form,\n link: () => link\n });\n function userNewTab(event) {\n var typedEvent = event;\n if (typedEvent.ctrlKey || typedEvent.shiftKey || typedEvent.metaKey || typedEvent.button && typedEvent.button == 1) {\n return true;\n }\n return false;\n }\n function linkNewTab(element, href) {\n if (element.target === \"_blank\" && href) {\n return true;\n }\n return false;\n }\n function link(links, event, properties, options) {\n var _this = this;\n var elements = [];\n if (!links) {\n return this;\n }\n if (links instanceof Element) {\n elements = [links];\n } else if (\"toArray\" in links) {\n elements = links.toArray();\n } else {\n elements = links;\n }\n elements.forEach(function(el) {\n el.addEventListener(\"click\", function(elementEvent) {\n var _a2, _b2;\n var ev = event instanceof Function ? event(el) : event;\n var props = properties instanceof Function ? properties(el) : properties;\n var href = el.getAttribute(\"href\") || el.getAttributeNS(\"http://www.w3.org/1999/xlink\", \"href\") || el.getAttribute(\"xlink:href\") || ((_a2 = el.getElementsByTagName(\"a\")[0]) === null || _a2 === void 0 ? void 0 : _a2.getAttribute(\"href\"));\n var trackEvent = pTimeout(_this.track(ev, props, options !== null && options !== void 0 ? options : {}), (_b2 = _this.settings.timeout) !== null && _b2 !== void 0 ? _b2 : 500);\n if (!linkNewTab(el, href) && !userNewTab(elementEvent)) {\n if (href) {\n elementEvent.preventDefault ? elementEvent.preventDefault() : elementEvent.returnValue = false;\n trackEvent.catch(console.error).then(function() {\n window.location.href = href;\n }).catch(console.error);\n }\n }\n }, false);\n });\n return this;\n }\n function form(forms, event, properties, options) {\n var _this = this;\n if (!forms)\n return this;\n if (forms instanceof HTMLFormElement)\n forms = [forms];\n var elements = forms;\n elements.forEach(function(el) {\n if (!(el instanceof Element))\n throw new TypeError(\"Must pass HTMLElement to trackForm/trackSubmit.\");\n var handler = function(elementEvent) {\n var _a2;\n elementEvent.preventDefault ? elementEvent.preventDefault() : elementEvent.returnValue = false;\n var ev = event instanceof Function ? event(el) : event;\n var props = properties instanceof Function ? properties(el) : properties;\n var trackEvent = pTimeout(_this.track(ev, props, options !== null && options !== void 0 ? options : {}), (_a2 = _this.settings.timeout) !== null && _a2 !== void 0 ? _a2 : 500);\n trackEvent.catch(console.error).then(function() {\n el.submit();\n }).catch(console.error);\n };\n var $3 = window.jQuery || window.Zepto;\n if ($3) {\n $3(el).submit(handler);\n } else {\n el.addEventListener(\"submit\", handler, false);\n }\n });\n return this;\n }\n var init_auto_track = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_callback2();\n }\n });\n\n // ../../../node_modules/.pnpm/obj-case@0.2.1/node_modules/obj-case/index.js\n var require_obj_case = __commonJS({\n \"../../../node_modules/.pnpm/obj-case@0.2.1/node_modules/obj-case/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = multiple(find);\n module.exports.find = module.exports;\n module.exports.replace = function(obj, key, val, options) {\n multiple(replace).call(this, obj, key, val, options);\n return obj;\n };\n module.exports.del = function(obj, key, options) {\n multiple(del).call(this, obj, key, null, options);\n return obj;\n };\n function multiple(fn) {\n return function(obj, path, val, options) {\n var normalize3 = options && isFunction3(options.normalizer) ? options.normalizer : defaultNormalize;\n path = normalize3(path);\n var key;\n var finished = false;\n while (!finished)\n loop();\n function loop() {\n for (key in obj) {\n var normalizedKey = normalize3(key);\n if (0 === path.indexOf(normalizedKey)) {\n var temp = path.substr(normalizedKey.length);\n if (temp.charAt(0) === \".\" || temp.length === 0) {\n path = temp.substr(1);\n var child = obj[key];\n if (null == child) {\n finished = true;\n return;\n }\n if (!path.length) {\n finished = true;\n return;\n }\n obj = child;\n return;\n }\n }\n }\n key = void 0;\n finished = true;\n }\n if (!key)\n return;\n if (null == obj)\n return obj;\n return fn(obj, key, val);\n };\n }\n function find(obj, key) {\n if (obj.hasOwnProperty(key))\n return obj[key];\n }\n function del(obj, key) {\n if (obj.hasOwnProperty(key))\n delete obj[key];\n return obj;\n }\n function replace(obj, key, val) {\n if (obj.hasOwnProperty(key))\n obj[key] = val;\n return obj;\n }\n function defaultNormalize(path) {\n return path.replace(/[^a-zA-Z0-9\\.]+/g, \"\").toLowerCase();\n }\n function isFunction3(val) {\n return typeof val === \"function\";\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/address.js\n var require_address2 = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var obj_case_1 = __importDefault2(require_obj_case());\n function trait(a3, b4) {\n return function() {\n var traits = this.traits();\n var props = this.properties ? this.properties() : {};\n return obj_case_1.default(traits, \"address.\" + a3) || obj_case_1.default(traits, a3) || (b4 ? obj_case_1.default(traits, \"address.\" + b4) : null) || (b4 ? obj_case_1.default(traits, b4) : null) || obj_case_1.default(props, \"address.\" + a3) || obj_case_1.default(props, a3) || (b4 ? obj_case_1.default(props, \"address.\" + b4) : null) || (b4 ? obj_case_1.default(props, b4) : null);\n };\n }\n function default_1(proto) {\n proto.zip = trait(\"postalCode\", \"zip\");\n proto.country = trait(\"country\");\n proto.street = trait(\"street\");\n proto.state = trait(\"state\");\n proto.city = trait(\"city\");\n proto.region = trait(\"region\");\n }\n exports3.default = default_1;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/clone.js\n var require_clone = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/clone.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.clone = void 0;\n function clone(properties) {\n if (typeof properties !== \"object\")\n return properties;\n if (Object.prototype.toString.call(properties) === \"[object Object]\") {\n var temp = {};\n for (var key in properties) {\n if (Object.prototype.hasOwnProperty.call(properties, key)) {\n temp[key] = clone(properties[key]);\n }\n }\n return temp;\n } else if (Array.isArray(properties)) {\n return properties.map(clone);\n } else {\n return properties;\n }\n }\n exports3.clone = clone;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/is-enabled.js\n var require_is_enabled = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/is-enabled.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var disabled = {\n Salesforce: true\n };\n function default_1(integration) {\n return !disabled[integration];\n }\n exports3.default = default_1;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+isodate@1.0.3/node_modules/@segment/isodate/lib/index.js\n var require_lib33 = __commonJS({\n \"../../../node_modules/.pnpm/@segment+isodate@1.0.3/node_modules/@segment/isodate/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var matcher = /^(\\d{4})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:([ T])(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,\\.](\\d{1,}))?)?(?:(Z)|([+\\-])(\\d{2})(?::?(\\d{2}))?)?)?$/;\n exports3.parse = function(iso) {\n var numericKeys = [1, 5, 6, 7, 11, 12];\n var arr = matcher.exec(iso);\n var offset = 0;\n if (!arr) {\n return new Date(iso);\n }\n for (var i3 = 0, val; val = numericKeys[i3]; i3++) {\n arr[val] = parseInt(arr[val], 10) || 0;\n }\n arr[2] = parseInt(arr[2], 10) || 1;\n arr[3] = parseInt(arr[3], 10) || 1;\n arr[2]--;\n arr[8] = arr[8] ? (arr[8] + \"00\").substring(0, 3) : 0;\n if (arr[4] === \" \") {\n offset = (/* @__PURE__ */ new Date()).getTimezoneOffset();\n } else if (arr[9] !== \"Z\" && arr[10]) {\n offset = arr[11] * 60 + arr[12];\n if (arr[10] === \"+\") {\n offset = 0 - offset;\n }\n }\n var millis = Date.UTC(arr[1], arr[2], arr[3], arr[5], arr[6] + offset, arr[7], arr[8]);\n return new Date(millis);\n };\n exports3.is = function(string, strict) {\n if (typeof string !== \"string\") {\n return false;\n }\n if (strict && /^\\d{4}-\\d{2}-\\d{2}/.test(string) === false) {\n return false;\n }\n return matcher.test(string);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/milliseconds.js\n var require_milliseconds = __commonJS({\n \"../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/milliseconds.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var matcher = /\\d{13}/;\n exports3.is = function(string) {\n return matcher.test(string);\n };\n exports3.parse = function(millis) {\n millis = parseInt(millis, 10);\n return new Date(millis);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/seconds.js\n var require_seconds = __commonJS({\n \"../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/seconds.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var matcher = /\\d{10}/;\n exports3.is = function(string) {\n return matcher.test(string);\n };\n exports3.parse = function(seconds) {\n var millis = parseInt(seconds, 10) * 1e3;\n return new Date(millis);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/index.js\n var require_lib34 = __commonJS({\n \"../../../node_modules/.pnpm/new-date@1.0.3/node_modules/new-date/lib/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var isodate = require_lib33();\n var milliseconds = require_milliseconds();\n var seconds = require_seconds();\n var objProto = Object.prototype;\n var toStr = objProto.toString;\n function isDate2(value) {\n return toStr.call(value) === \"[object Date]\";\n }\n function isNumber3(value) {\n return toStr.call(value) === \"[object Number]\";\n }\n module.exports = function newDate(val) {\n if (isDate2(val))\n return val;\n if (isNumber3(val))\n return new Date(toMs(val));\n if (isodate.is(val)) {\n return isodate.parse(val);\n }\n if (milliseconds.is(val)) {\n return milliseconds.parse(val);\n }\n if (seconds.is(val)) {\n return seconds.parse(val);\n }\n return new Date(val);\n };\n function toMs(num2) {\n if (num2 < 315576e5)\n return num2 * 1e3;\n return num2;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+isodate-traverse@1.1.1/node_modules/@segment/isodate-traverse/lib/index.js\n var require_lib35 = __commonJS({\n \"../../../node_modules/.pnpm/@segment+isodate-traverse@1.1.1/node_modules/@segment/isodate-traverse/lib/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var isodate = require_lib33();\n module.exports = traverse;\n function traverse(input, strict) {\n if (strict === void 0)\n strict = true;\n if (input && typeof input === \"object\") {\n return traverseObject(input, strict);\n } else if (Array.isArray(input)) {\n return traverseArray(input, strict);\n } else if (isodate.is(input, strict)) {\n return isodate.parse(input);\n }\n return input;\n }\n function traverseObject(obj, strict) {\n Object.keys(obj).forEach(function(key) {\n obj[key] = traverse(obj[key], strict);\n });\n return obj;\n }\n function traverseArray(arr, strict) {\n arr.forEach(function(value, index2) {\n arr[index2] = traverse(value, strict);\n });\n return arr;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/facade.js\n var require_facade = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/facade.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Facade = void 0;\n var address_1 = __importDefault2(require_address2());\n var clone_1 = require_clone();\n var is_enabled_1 = __importDefault2(require_is_enabled());\n var new_date_1 = __importDefault2(require_lib34());\n var obj_case_1 = __importDefault2(require_obj_case());\n var isodate_traverse_1 = __importDefault2(require_lib35());\n function Facade2(obj, opts) {\n opts = opts || {};\n this.raw = clone_1.clone(obj);\n if (!(\"clone\" in opts))\n opts.clone = true;\n if (opts.clone)\n obj = clone_1.clone(obj);\n if (!(\"traverse\" in opts))\n opts.traverse = true;\n if (!(\"timestamp\" in obj))\n obj.timestamp = /* @__PURE__ */ new Date();\n else\n obj.timestamp = new_date_1.default(obj.timestamp);\n if (opts.traverse)\n isodate_traverse_1.default(obj);\n this.opts = opts;\n this.obj = obj;\n }\n exports3.Facade = Facade2;\n var f6 = Facade2.prototype;\n f6.proxy = function(field) {\n var fields = field.split(\".\");\n field = fields.shift();\n var obj = this[field] || this.obj[field];\n if (!obj)\n return obj;\n if (typeof obj === \"function\")\n obj = obj.call(this) || {};\n if (fields.length === 0)\n return this.opts.clone ? transform2(obj) : obj;\n obj = obj_case_1.default(obj, fields.join(\".\"));\n return this.opts.clone ? transform2(obj) : obj;\n };\n f6.field = function(field) {\n var obj = this.obj[field];\n return this.opts.clone ? transform2(obj) : obj;\n };\n Facade2.proxy = function(field) {\n return function() {\n return this.proxy(field);\n };\n };\n Facade2.field = function(field) {\n return function() {\n return this.field(field);\n };\n };\n Facade2.multi = function(path) {\n return function() {\n var multi = this.proxy(path + \"s\");\n if (Array.isArray(multi))\n return multi;\n var one = this.proxy(path);\n if (one)\n one = [this.opts.clone ? clone_1.clone(one) : one];\n return one || [];\n };\n };\n Facade2.one = function(path) {\n return function() {\n var one = this.proxy(path);\n if (one)\n return one;\n var multi = this.proxy(path + \"s\");\n if (Array.isArray(multi))\n return multi[0];\n };\n };\n f6.json = function() {\n var ret = this.opts.clone ? clone_1.clone(this.obj) : this.obj;\n if (this.type)\n ret.type = this.type();\n return ret;\n };\n f6.rawEvent = function() {\n return this.raw;\n };\n f6.options = function(integration) {\n var obj = this.obj.options || this.obj.context || {};\n var options = this.opts.clone ? clone_1.clone(obj) : obj;\n if (!integration)\n return options;\n if (!this.enabled(integration))\n return;\n var integrations = this.integrations();\n var value = integrations[integration] || obj_case_1.default(integrations, integration);\n if (typeof value !== \"object\")\n value = obj_case_1.default(this.options(), integration);\n return typeof value === \"object\" ? value : {};\n };\n f6.context = f6.options;\n f6.enabled = function(integration) {\n var allEnabled = this.proxy(\"options.providers.all\");\n if (typeof allEnabled !== \"boolean\")\n allEnabled = this.proxy(\"options.all\");\n if (typeof allEnabled !== \"boolean\")\n allEnabled = this.proxy(\"integrations.all\");\n if (typeof allEnabled !== \"boolean\")\n allEnabled = true;\n var enabled = allEnabled && is_enabled_1.default(integration);\n var options = this.integrations();\n if (options.providers && options.providers.hasOwnProperty(integration)) {\n enabled = options.providers[integration];\n }\n if (options.hasOwnProperty(integration)) {\n var settings = options[integration];\n if (typeof settings === \"boolean\") {\n enabled = settings;\n } else {\n enabled = true;\n }\n }\n return !!enabled;\n };\n f6.integrations = function() {\n return this.obj.integrations || this.proxy(\"options.providers\") || this.options();\n };\n f6.active = function() {\n var active = this.proxy(\"options.active\");\n if (active === null || active === void 0)\n active = true;\n return active;\n };\n f6.anonymousId = function() {\n return this.field(\"anonymousId\") || this.field(\"sessionId\");\n };\n f6.sessionId = f6.anonymousId;\n f6.groupId = Facade2.proxy(\"options.groupId\");\n f6.traits = function(aliases) {\n var ret = this.proxy(\"options.traits\") || {};\n var id = this.userId();\n aliases = aliases || {};\n if (id)\n ret.id = id;\n for (var alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n var value = this[alias] == null ? this.proxy(\"options.traits.\" + alias) : this[alias]();\n if (value == null)\n continue;\n ret[aliases[alias]] = value;\n delete ret[alias];\n }\n }\n return ret;\n };\n f6.library = function() {\n var library = this.proxy(\"options.library\");\n if (!library)\n return { name: \"unknown\", version: null };\n if (typeof library === \"string\")\n return { name: library, version: null };\n return library;\n };\n f6.device = function() {\n var device = this.proxy(\"context.device\");\n if (typeof device !== \"object\" || device === null) {\n device = {};\n }\n var library = this.library().name;\n if (device.type)\n return device;\n if (library.indexOf(\"ios\") > -1)\n device.type = \"ios\";\n if (library.indexOf(\"android\") > -1)\n device.type = \"android\";\n return device;\n };\n f6.userAgent = Facade2.proxy(\"context.userAgent\");\n f6.timezone = Facade2.proxy(\"context.timezone\");\n f6.timestamp = Facade2.field(\"timestamp\");\n f6.channel = Facade2.field(\"channel\");\n f6.ip = Facade2.proxy(\"context.ip\");\n f6.userId = Facade2.field(\"userId\");\n address_1.default(f6);\n function transform2(obj) {\n return clone_1.clone(obj);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/alias.js\n var require_alias = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/alias.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Alias = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var facade_1 = require_facade();\n function Alias3(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Alias = Alias3;\n inherits_1.default(Alias3, facade_1.Facade);\n Alias3.prototype.action = function() {\n return \"alias\";\n };\n Alias3.prototype.type = Alias3.prototype.action;\n Alias3.prototype.previousId = function() {\n return this.field(\"previousId\") || this.field(\"from\");\n };\n Alias3.prototype.from = Alias3.prototype.previousId;\n Alias3.prototype.userId = function() {\n return this.field(\"userId\") || this.field(\"to\");\n };\n Alias3.prototype.to = Alias3.prototype.userId;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/is-email.js\n var require_is_email = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/is-email.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var matcher = /.+\\@.+\\..+/;\n function isEmail(string) {\n return matcher.test(string);\n }\n exports3.default = isEmail;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/group.js\n var require_group = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/group.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Group = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var is_email_1 = __importDefault2(require_is_email());\n var new_date_1 = __importDefault2(require_lib34());\n var facade_1 = require_facade();\n function Group4(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Group = Group4;\n inherits_1.default(Group4, facade_1.Facade);\n var g4 = Group4.prototype;\n g4.action = function() {\n return \"group\";\n };\n g4.type = g4.action;\n g4.groupId = facade_1.Facade.field(\"groupId\");\n g4.created = function() {\n var created = this.proxy(\"traits.createdAt\") || this.proxy(\"traits.created\") || this.proxy(\"properties.createdAt\") || this.proxy(\"properties.created\");\n if (created)\n return new_date_1.default(created);\n };\n g4.email = function() {\n var email = this.proxy(\"traits.email\");\n if (email)\n return email;\n var groupId = this.groupId();\n if (is_email_1.default(groupId))\n return groupId;\n };\n g4.traits = function(aliases) {\n var ret = this.properties();\n var id = this.groupId();\n aliases = aliases || {};\n if (id)\n ret.id = id;\n for (var alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n var value = this[alias] == null ? this.proxy(\"traits.\" + alias) : this[alias]();\n if (value == null)\n continue;\n ret[aliases[alias]] = value;\n delete ret[alias];\n }\n }\n return ret;\n };\n g4.name = facade_1.Facade.proxy(\"traits.name\");\n g4.industry = facade_1.Facade.proxy(\"traits.industry\");\n g4.employees = facade_1.Facade.proxy(\"traits.employees\");\n g4.properties = function() {\n return this.field(\"traits\") || this.field(\"properties\") || {};\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/identify.js\n var require_identify = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/identify.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Identify = void 0;\n var facade_1 = require_facade();\n var obj_case_1 = __importDefault2(require_obj_case());\n var inherits_1 = __importDefault2(require_inherits_browser());\n var is_email_1 = __importDefault2(require_is_email());\n var new_date_1 = __importDefault2(require_lib34());\n var trim5 = function(str) {\n return str.trim();\n };\n function Identify3(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Identify = Identify3;\n inherits_1.default(Identify3, facade_1.Facade);\n var i3 = Identify3.prototype;\n i3.action = function() {\n return \"identify\";\n };\n i3.type = i3.action;\n i3.traits = function(aliases) {\n var ret = this.field(\"traits\") || {};\n var id = this.userId();\n aliases = aliases || {};\n if (id)\n ret.id = id;\n for (var alias in aliases) {\n var value = this[alias] == null ? this.proxy(\"traits.\" + alias) : this[alias]();\n if (value == null)\n continue;\n ret[aliases[alias]] = value;\n if (alias !== aliases[alias])\n delete ret[alias];\n }\n return ret;\n };\n i3.email = function() {\n var email = this.proxy(\"traits.email\");\n if (email)\n return email;\n var userId = this.userId();\n if (is_email_1.default(userId))\n return userId;\n };\n i3.created = function() {\n var created = this.proxy(\"traits.created\") || this.proxy(\"traits.createdAt\");\n if (created)\n return new_date_1.default(created);\n };\n i3.companyCreated = function() {\n var created = this.proxy(\"traits.company.created\") || this.proxy(\"traits.company.createdAt\");\n if (created) {\n return new_date_1.default(created);\n }\n };\n i3.companyName = function() {\n return this.proxy(\"traits.company.name\");\n };\n i3.name = function() {\n var name = this.proxy(\"traits.name\");\n if (typeof name === \"string\") {\n return trim5(name);\n }\n var firstName = this.firstName();\n var lastName = this.lastName();\n if (firstName && lastName) {\n return trim5(firstName + \" \" + lastName);\n }\n };\n i3.firstName = function() {\n var firstName = this.proxy(\"traits.firstName\");\n if (typeof firstName === \"string\") {\n return trim5(firstName);\n }\n var name = this.proxy(\"traits.name\");\n if (typeof name === \"string\") {\n return trim5(name).split(\" \")[0];\n }\n };\n i3.lastName = function() {\n var lastName = this.proxy(\"traits.lastName\");\n if (typeof lastName === \"string\") {\n return trim5(lastName);\n }\n var name = this.proxy(\"traits.name\");\n if (typeof name !== \"string\") {\n return;\n }\n var space = trim5(name).indexOf(\" \");\n if (space === -1) {\n return;\n }\n return trim5(name.substr(space + 1));\n };\n i3.uid = function() {\n return this.userId() || this.username() || this.email();\n };\n i3.description = function() {\n return this.proxy(\"traits.description\") || this.proxy(\"traits.background\");\n };\n i3.age = function() {\n var date = this.birthday();\n var age = obj_case_1.default(this.traits(), \"age\");\n if (age != null)\n return age;\n if (!(date instanceof Date))\n return;\n var now2 = /* @__PURE__ */ new Date();\n return now2.getFullYear() - date.getFullYear();\n };\n i3.avatar = function() {\n var traits = this.traits();\n return obj_case_1.default(traits, \"avatar\") || obj_case_1.default(traits, \"photoUrl\") || obj_case_1.default(traits, \"avatarUrl\");\n };\n i3.position = function() {\n var traits = this.traits();\n return obj_case_1.default(traits, \"position\") || obj_case_1.default(traits, \"jobTitle\");\n };\n i3.username = facade_1.Facade.proxy(\"traits.username\");\n i3.website = facade_1.Facade.one(\"traits.website\");\n i3.websites = facade_1.Facade.multi(\"traits.website\");\n i3.phone = facade_1.Facade.one(\"traits.phone\");\n i3.phones = facade_1.Facade.multi(\"traits.phone\");\n i3.address = facade_1.Facade.proxy(\"traits.address\");\n i3.gender = facade_1.Facade.proxy(\"traits.gender\");\n i3.birthday = facade_1.Facade.proxy(\"traits.birthday\");\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/track.js\n var require_track = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/track.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Track = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var facade_1 = require_facade();\n var identify_1 = require_identify();\n var is_email_1 = __importDefault2(require_is_email());\n var obj_case_1 = __importDefault2(require_obj_case());\n function Track3(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Track = Track3;\n inherits_1.default(Track3, facade_1.Facade);\n var t3 = Track3.prototype;\n t3.action = function() {\n return \"track\";\n };\n t3.type = t3.action;\n t3.event = facade_1.Facade.field(\"event\");\n t3.value = facade_1.Facade.proxy(\"properties.value\");\n t3.category = facade_1.Facade.proxy(\"properties.category\");\n t3.id = facade_1.Facade.proxy(\"properties.id\");\n t3.productId = function() {\n return this.proxy(\"properties.product_id\") || this.proxy(\"properties.productId\");\n };\n t3.promotionId = function() {\n return this.proxy(\"properties.promotion_id\") || this.proxy(\"properties.promotionId\");\n };\n t3.cartId = function() {\n return this.proxy(\"properties.cart_id\") || this.proxy(\"properties.cartId\");\n };\n t3.checkoutId = function() {\n return this.proxy(\"properties.checkout_id\") || this.proxy(\"properties.checkoutId\");\n };\n t3.paymentId = function() {\n return this.proxy(\"properties.payment_id\") || this.proxy(\"properties.paymentId\");\n };\n t3.couponId = function() {\n return this.proxy(\"properties.coupon_id\") || this.proxy(\"properties.couponId\");\n };\n t3.wishlistId = function() {\n return this.proxy(\"properties.wishlist_id\") || this.proxy(\"properties.wishlistId\");\n };\n t3.reviewId = function() {\n return this.proxy(\"properties.review_id\") || this.proxy(\"properties.reviewId\");\n };\n t3.orderId = function() {\n return this.proxy(\"properties.id\") || this.proxy(\"properties.order_id\") || this.proxy(\"properties.orderId\");\n };\n t3.sku = facade_1.Facade.proxy(\"properties.sku\");\n t3.tax = facade_1.Facade.proxy(\"properties.tax\");\n t3.name = facade_1.Facade.proxy(\"properties.name\");\n t3.price = facade_1.Facade.proxy(\"properties.price\");\n t3.total = facade_1.Facade.proxy(\"properties.total\");\n t3.repeat = facade_1.Facade.proxy(\"properties.repeat\");\n t3.coupon = facade_1.Facade.proxy(\"properties.coupon\");\n t3.shipping = facade_1.Facade.proxy(\"properties.shipping\");\n t3.discount = facade_1.Facade.proxy(\"properties.discount\");\n t3.shippingMethod = function() {\n return this.proxy(\"properties.shipping_method\") || this.proxy(\"properties.shippingMethod\");\n };\n t3.paymentMethod = function() {\n return this.proxy(\"properties.payment_method\") || this.proxy(\"properties.paymentMethod\");\n };\n t3.description = facade_1.Facade.proxy(\"properties.description\");\n t3.plan = facade_1.Facade.proxy(\"properties.plan\");\n t3.subtotal = function() {\n var subtotal = obj_case_1.default(this.properties(), \"subtotal\");\n var total = this.total() || this.revenue();\n if (subtotal)\n return subtotal;\n if (!total)\n return 0;\n if (this.total()) {\n var n2 = this.tax();\n if (n2)\n total -= n2;\n n2 = this.shipping();\n if (n2)\n total -= n2;\n n2 = this.discount();\n if (n2)\n total += n2;\n }\n return total;\n };\n t3.products = function() {\n var props = this.properties();\n var products = obj_case_1.default(props, \"products\");\n if (Array.isArray(products)) {\n return products.filter(function(item) {\n return item !== null;\n });\n }\n return [];\n };\n t3.quantity = function() {\n var props = this.obj.properties || {};\n return props.quantity || 1;\n };\n t3.currency = function() {\n var props = this.obj.properties || {};\n return props.currency || \"USD\";\n };\n t3.referrer = function() {\n return this.proxy(\"context.referrer.url\") || this.proxy(\"context.page.referrer\") || this.proxy(\"properties.referrer\");\n };\n t3.query = facade_1.Facade.proxy(\"options.query\");\n t3.properties = function(aliases) {\n var ret = this.field(\"properties\") || {};\n aliases = aliases || {};\n for (var alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n var value = this[alias] == null ? this.proxy(\"properties.\" + alias) : this[alias]();\n if (value == null)\n continue;\n ret[aliases[alias]] = value;\n delete ret[alias];\n }\n }\n return ret;\n };\n t3.username = function() {\n return this.proxy(\"traits.username\") || this.proxy(\"properties.username\") || this.userId() || this.sessionId();\n };\n t3.email = function() {\n var email = this.proxy(\"traits.email\") || this.proxy(\"properties.email\") || this.proxy(\"options.traits.email\");\n if (email)\n return email;\n var userId = this.userId();\n if (is_email_1.default(userId))\n return userId;\n };\n t3.revenue = function() {\n var revenue = this.proxy(\"properties.revenue\");\n var event = this.event();\n var orderCompletedRegExp = /^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;\n if (!revenue && event && event.match(orderCompletedRegExp)) {\n revenue = this.proxy(\"properties.total\");\n }\n return currency(revenue);\n };\n t3.cents = function() {\n var revenue = this.revenue();\n return typeof revenue !== \"number\" ? this.value() || 0 : revenue * 100;\n };\n t3.identify = function() {\n var json = this.json();\n json.traits = this.traits();\n return new identify_1.Identify(json, this.opts);\n };\n function currency(val) {\n if (!val)\n return;\n if (typeof val === \"number\") {\n return val;\n }\n if (typeof val !== \"string\") {\n return;\n }\n val = val.replace(/\\$/g, \"\");\n val = parseFloat(val);\n if (!isNaN(val)) {\n return val;\n }\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/page.js\n var require_page = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/page.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Page = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var facade_1 = require_facade();\n var track_1 = require_track();\n var is_email_1 = __importDefault2(require_is_email());\n function Page3(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Page = Page3;\n inherits_1.default(Page3, facade_1.Facade);\n var p4 = Page3.prototype;\n p4.action = function() {\n return \"page\";\n };\n p4.type = p4.action;\n p4.category = facade_1.Facade.field(\"category\");\n p4.name = facade_1.Facade.field(\"name\");\n p4.title = facade_1.Facade.proxy(\"properties.title\");\n p4.path = facade_1.Facade.proxy(\"properties.path\");\n p4.url = facade_1.Facade.proxy(\"properties.url\");\n p4.referrer = function() {\n return this.proxy(\"context.referrer.url\") || this.proxy(\"context.page.referrer\") || this.proxy(\"properties.referrer\");\n };\n p4.properties = function(aliases) {\n var props = this.field(\"properties\") || {};\n var category = this.category();\n var name = this.name();\n aliases = aliases || {};\n if (category)\n props.category = category;\n if (name)\n props.name = name;\n for (var alias in aliases) {\n if (Object.prototype.hasOwnProperty.call(aliases, alias)) {\n var value = this[alias] == null ? this.proxy(\"properties.\" + alias) : this[alias]();\n if (value == null)\n continue;\n props[aliases[alias]] = value;\n if (alias !== aliases[alias])\n delete props[alias];\n }\n }\n return props;\n };\n p4.email = function() {\n var email = this.proxy(\"context.traits.email\") || this.proxy(\"properties.email\");\n if (email)\n return email;\n var userId = this.userId();\n if (is_email_1.default(userId))\n return userId;\n };\n p4.fullName = function() {\n var category = this.category();\n var name = this.name();\n return name && category ? category + \" \" + name : name;\n };\n p4.event = function(name) {\n return name ? \"Viewed \" + name + \" Page\" : \"Loaded a Page\";\n };\n p4.track = function(name) {\n var json = this.json();\n json.event = this.event(name);\n json.timestamp = this.timestamp();\n json.properties = this.properties();\n return new track_1.Track(json, this.opts);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/screen.js\n var require_screen = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/screen.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Screen = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var page_1 = require_page();\n var track_1 = require_track();\n function Screen2(dictionary, opts) {\n page_1.Page.call(this, dictionary, opts);\n }\n exports3.Screen = Screen2;\n inherits_1.default(Screen2, page_1.Page);\n Screen2.prototype.action = function() {\n return \"screen\";\n };\n Screen2.prototype.type = Screen2.prototype.action;\n Screen2.prototype.event = function(name) {\n return name ? \"Viewed \" + name + \" Screen\" : \"Loaded a Screen\";\n };\n Screen2.prototype.track = function(name) {\n var json = this.json();\n json.event = this.event(name);\n json.timestamp = this.timestamp();\n json.properties = this.properties();\n return new track_1.Track(json, this.opts);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/delete.js\n var require_delete = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/delete.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault2 = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Delete = void 0;\n var inherits_1 = __importDefault2(require_inherits_browser());\n var facade_1 = require_facade();\n function Delete(dictionary, opts) {\n facade_1.Facade.call(this, dictionary, opts);\n }\n exports3.Delete = Delete;\n inherits_1.default(Delete, facade_1.Facade);\n Delete.prototype.type = function() {\n return \"delete\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/index.js\n var require_dist2 = __commonJS({\n \"../../../node_modules/.pnpm/@segment+facade@3.4.10/node_modules/@segment/facade/dist/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __assign2 = exports3 && exports3.__assign || function() {\n __assign2 = Object.assign || function(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 Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Delete = exports3.Screen = exports3.Page = exports3.Track = exports3.Identify = exports3.Group = exports3.Alias = exports3.Facade = void 0;\n var facade_1 = require_facade();\n Object.defineProperty(exports3, \"Facade\", { enumerable: true, get: function() {\n return facade_1.Facade;\n } });\n var alias_1 = require_alias();\n Object.defineProperty(exports3, \"Alias\", { enumerable: true, get: function() {\n return alias_1.Alias;\n } });\n var group_1 = require_group();\n Object.defineProperty(exports3, \"Group\", { enumerable: true, get: function() {\n return group_1.Group;\n } });\n var identify_1 = require_identify();\n Object.defineProperty(exports3, \"Identify\", { enumerable: true, get: function() {\n return identify_1.Identify;\n } });\n var track_1 = require_track();\n Object.defineProperty(exports3, \"Track\", { enumerable: true, get: function() {\n return track_1.Track;\n } });\n var page_1 = require_page();\n Object.defineProperty(exports3, \"Page\", { enumerable: true, get: function() {\n return page_1.Page;\n } });\n var screen_1 = require_screen();\n Object.defineProperty(exports3, \"Screen\", { enumerable: true, get: function() {\n return screen_1.Screen;\n } });\n var delete_1 = require_delete();\n Object.defineProperty(exports3, \"Delete\", { enumerable: true, get: function() {\n return delete_1.Delete;\n } });\n exports3.default = __assign2(__assign2({}, facade_1.Facade), {\n Alias: alias_1.Alias,\n Group: group_1.Group,\n Identify: identify_1.Identify,\n Track: track_1.Track,\n Page: page_1.Page,\n Screen: screen_1.Screen,\n Delete: delete_1.Delete\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/to-facade.js\n function toFacade(evt, options) {\n var fcd = new import_facade.Facade(evt, options);\n if (evt.type === \"track\") {\n fcd = new import_facade.Track(evt, options);\n }\n if (evt.type === \"identify\") {\n fcd = new import_facade.Identify(evt, options);\n }\n if (evt.type === \"page\") {\n fcd = new import_facade.Page(evt, options);\n }\n if (evt.type === \"alias\") {\n fcd = new import_facade.Alias(evt, options);\n }\n if (evt.type === \"group\") {\n fcd = new import_facade.Group(evt, options);\n }\n if (evt.type === \"screen\") {\n fcd = new import_facade.Screen(evt, options);\n }\n Object.defineProperty(fcd, \"obj\", {\n value: evt,\n writable: true\n });\n return fcd;\n }\n var import_facade;\n var init_to_facade = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/to-facade.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n import_facade = __toESM(require_dist2());\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js\n var middleware_exports = {};\n __export(middleware_exports, {\n applyDestinationMiddleware: () => applyDestinationMiddleware,\n sourceMiddlewarePlugin: () => sourceMiddlewarePlugin\n });\n function applyDestinationMiddleware(destination, evt, middleware) {\n return __awaiter(this, void 0, void 0, function() {\n function applyMiddleware(event, fn) {\n return __awaiter(this, void 0, void 0, function() {\n var nextCalled, returnedEvent;\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n nextCalled = false;\n returnedEvent = null;\n return [4, fn({\n payload: toFacade(event, {\n clone: true,\n traverse: false\n }),\n integration: destination,\n next: function(evt2) {\n nextCalled = true;\n if (evt2 === null) {\n returnedEvent = null;\n }\n if (evt2) {\n returnedEvent = evt2.obj;\n }\n }\n })];\n case 1:\n _b2.sent();\n if (!nextCalled && returnedEvent !== null) {\n returnedEvent = returnedEvent;\n returnedEvent.integrations = __assign(__assign({}, event.integrations), (_a2 = {}, _a2[destination] = false, _a2));\n }\n return [2, returnedEvent];\n }\n });\n });\n }\n var modifiedEvent, _i, middleware_1, md, result;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n modifiedEvent = toFacade(evt, {\n clone: true,\n traverse: false\n }).rawEvent();\n _i = 0, middleware_1 = middleware;\n _a2.label = 1;\n case 1:\n if (!(_i < middleware_1.length))\n return [3, 4];\n md = middleware_1[_i];\n return [4, applyMiddleware(modifiedEvent, md)];\n case 2:\n result = _a2.sent();\n if (result === null) {\n return [2, null];\n }\n modifiedEvent = result;\n _a2.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n return [2, modifiedEvent];\n }\n });\n });\n }\n function sourceMiddlewarePlugin(fn, integrations) {\n function apply(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var nextCalled;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n nextCalled = false;\n return [4, fn({\n payload: toFacade(ctx.event, {\n clone: true,\n traverse: false\n }),\n integrations: integrations !== null && integrations !== void 0 ? integrations : {},\n next: function(evt) {\n nextCalled = true;\n if (evt) {\n ctx.event = evt.obj;\n }\n }\n })];\n case 1:\n _a2.sent();\n if (!nextCalled) {\n throw new ContextCancelation({\n retry: false,\n type: \"middleware_cancellation\",\n reason: \"Middleware `next` function skipped\"\n });\n }\n return [2, ctx];\n }\n });\n });\n }\n return {\n name: \"Source Middleware \".concat(fn.name),\n type: \"before\",\n version: \"0.1.0\",\n isLoaded: function() {\n return true;\n },\n load: function(ctx) {\n return Promise.resolve(ctx);\n },\n track: apply,\n page: apply,\n identify: apply,\n alias: apply,\n group: apply\n };\n }\n var init_middleware = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_context2();\n init_to_facade();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/pickPrefix.js\n function pickPrefix(prefix, object) {\n return Object.keys(object).reduce(function(acc, key) {\n if (key.startsWith(prefix)) {\n var field = key.substr(prefix.length);\n acc[field] = object[key];\n }\n return acc;\n }, {});\n }\n var init_pickPrefix = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/pickPrefix.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/gracefulDecodeURIComponent.js\n function gracefulDecodeURIComponent(encodedURIComponent) {\n try {\n return decodeURIComponent(encodedURIComponent.replace(/\\+/g, \" \"));\n } catch (_a2) {\n return encodedURIComponent;\n }\n }\n var init_gracefulDecodeURIComponent = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/gracefulDecodeURIComponent.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/index.js\n var query_string_exports = {};\n __export(query_string_exports, {\n queryString: () => queryString\n });\n function queryString(analytics, query) {\n var a3 = document.createElement(\"a\");\n a3.href = query;\n var parsed = a3.search.slice(1);\n var params = parsed.split(\"&\").reduce(function(acc, str) {\n var _a3 = str.split(\"=\"), k4 = _a3[0], v2 = _a3[1];\n acc[k4] = gracefulDecodeURIComponent(v2);\n return acc;\n }, {});\n var calls = [];\n var ajs_uid = params.ajs_uid, ajs_event = params.ajs_event, ajs_aid = params.ajs_aid;\n var _a2 = isPlainObject2(analytics.options.useQueryString) ? analytics.options.useQueryString : {}, _b2 = _a2.aid, aidPattern = _b2 === void 0 ? /.+/ : _b2, _c = _a2.uid, uidPattern = _c === void 0 ? /.+/ : _c;\n if (ajs_aid) {\n var anonId = Array.isArray(params.ajs_aid) ? params.ajs_aid[0] : params.ajs_aid;\n if (aidPattern.test(anonId)) {\n analytics.setAnonymousId(anonId);\n }\n }\n if (ajs_uid) {\n var uid2 = Array.isArray(params.ajs_uid) ? params.ajs_uid[0] : params.ajs_uid;\n if (uidPattern.test(uid2)) {\n var traits = pickPrefix(\"ajs_trait_\", params);\n calls.push(analytics.identify(uid2, traits));\n }\n }\n if (ajs_event) {\n var event_1 = Array.isArray(params.ajs_event) ? params.ajs_event[0] : params.ajs_event;\n var props = pickPrefix(\"ajs_prop_\", params);\n calls.push(analytics.track(event_1, props));\n }\n return Promise.all(calls);\n }\n var init_query_string = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/query-string/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_pickPrefix();\n init_gracefulDecodeURIComponent();\n init_esm9();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/analytics/index.js\n function createDefaultQueue(name, retryQueue, disablePersistance) {\n if (retryQueue === void 0) {\n retryQueue = false;\n }\n if (disablePersistance === void 0) {\n disablePersistance = false;\n }\n var maxAttempts = retryQueue ? 10 : 1;\n var priorityQueue = disablePersistance ? new PriorityQueue(maxAttempts, []) : new PersistedPriorityQueue(maxAttempts, name);\n return new EventQueue(priorityQueue);\n }\n function _stub() {\n console.warn(deprecationWarning);\n }\n var deprecationWarning, global2, _analytics, AnalyticsInstanceSettings, Analytics, NullAnalytics;\n var init_analytics2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/analytics/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_arguments_resolver();\n init_connection();\n init_context2();\n init_esm9();\n init_esm8();\n init_events2();\n init_plugin();\n init_event_queue2();\n init_user();\n init_bind_all2();\n init_persisted();\n init_version7();\n init_priority_queue2();\n init_get_global();\n init_storage();\n init_global_analytics_helper();\n init_buffer3();\n deprecationWarning = \"This is being deprecated and will be not be available in future releases of Analytics JS\";\n global2 = getGlobal();\n _analytics = global2 === null || global2 === void 0 ? void 0 : global2.analytics;\n AnalyticsInstanceSettings = /** @class */\n /* @__PURE__ */ function() {\n function AnalyticsInstanceSettings2(settings) {\n var _a2;\n this.timeout = 300;\n this.writeKey = settings.writeKey;\n this.cdnSettings = (_a2 = settings.cdnSettings) !== null && _a2 !== void 0 ? _a2 : {\n integrations: {},\n edgeFunction: {}\n };\n this.cdnURL = settings.cdnURL;\n }\n return AnalyticsInstanceSettings2;\n }();\n Analytics = /** @class */\n function(_super) {\n __extends(Analytics2, _super);\n function Analytics2(settings, options, queue2, user, group) {\n var _this = this;\n var _a2, _b2;\n _this = _super.call(this) || this;\n _this._debug = false;\n _this.initialized = false;\n _this.user = function() {\n return _this._user;\n };\n _this.init = _this.initialize.bind(_this);\n _this.log = _stub;\n _this.addIntegrationMiddleware = _stub;\n _this.listeners = _stub;\n _this.addEventListener = _stub;\n _this.removeAllListeners = _stub;\n _this.removeListener = _stub;\n _this.removeEventListener = _stub;\n _this.hasListeners = _stub;\n _this.add = _stub;\n _this.addIntegration = _stub;\n var cookieOptions2 = options === null || options === void 0 ? void 0 : options.cookie;\n var disablePersistance = (_a2 = options === null || options === void 0 ? void 0 : options.disableClientPersistence) !== null && _a2 !== void 0 ? _a2 : false;\n _this.settings = new AnalyticsInstanceSettings(settings);\n _this.queue = queue2 !== null && queue2 !== void 0 ? queue2 : createDefaultQueue(\"\".concat(settings.writeKey, \":event-queue\"), options === null || options === void 0 ? void 0 : options.retryQueue, disablePersistance);\n var storageSetting = options === null || options === void 0 ? void 0 : options.storage;\n _this._universalStorage = _this.createStore(disablePersistance, storageSetting, cookieOptions2);\n _this._user = user !== null && user !== void 0 ? user : new User(__assign({ persist: !disablePersistance, storage: options === null || options === void 0 ? void 0 : options.storage }, options === null || options === void 0 ? void 0 : options.user), cookieOptions2).load();\n _this._group = group !== null && group !== void 0 ? group : new Group(__assign({ persist: !disablePersistance, storage: options === null || options === void 0 ? void 0 : options.storage }, options === null || options === void 0 ? void 0 : options.group), cookieOptions2).load();\n _this.eventFactory = new EventFactory(_this._user);\n _this.integrations = (_b2 = options === null || options === void 0 ? void 0 : options.integrations) !== null && _b2 !== void 0 ? _b2 : {};\n _this.options = options !== null && options !== void 0 ? options : {};\n bindAll(_this);\n return _this;\n }\n Analytics2.prototype.createStore = function(disablePersistance, storageSetting, cookieOptions2) {\n if (disablePersistance) {\n return new UniversalStorage([new MemoryStorage()]);\n } else {\n if (storageSetting) {\n if (isArrayOfStoreType(storageSetting)) {\n return new UniversalStorage(initializeStorages(applyCookieOptions(storageSetting.stores, cookieOptions2)));\n }\n }\n }\n return new UniversalStorage(initializeStorages([\n StoreType.LocalStorage,\n {\n name: StoreType.Cookie,\n settings: cookieOptions2\n },\n StoreType.Memory\n ]));\n };\n Object.defineProperty(Analytics2.prototype, \"storage\", {\n get: function() {\n return this._universalStorage;\n },\n enumerable: false,\n configurable: true\n });\n Analytics2.prototype.track = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pageCtx, _a2, name, data, opts, cb, segmentEvent;\n var _this = this;\n return __generator(this, function(_b2) {\n pageCtx = popPageContext(args);\n _a2 = resolveArguments.apply(void 0, args), name = _a2[0], data = _a2[1], opts = _a2[2], cb = _a2[3];\n segmentEvent = this.eventFactory.track(name, data, opts, this.integrations, pageCtx);\n return [2, this._dispatch(segmentEvent, cb).then(function(ctx) {\n _this.emit(\"track\", name, ctx.event.properties, ctx.event.options);\n return ctx;\n })];\n });\n });\n };\n Analytics2.prototype.page = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pageCtx, _a2, category, page, properties, options, callback, segmentEvent;\n var _this = this;\n return __generator(this, function(_b2) {\n pageCtx = popPageContext(args);\n _a2 = resolvePageArguments.apply(void 0, args), category = _a2[0], page = _a2[1], properties = _a2[2], options = _a2[3], callback = _a2[4];\n segmentEvent = this.eventFactory.page(category, page, properties, options, this.integrations, pageCtx);\n return [2, this._dispatch(segmentEvent, callback).then(function(ctx) {\n _this.emit(\"page\", category, page, ctx.event.properties, ctx.event.options);\n return ctx;\n })];\n });\n });\n };\n Analytics2.prototype.identify = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pageCtx, _a2, id, _traits, options, callback, segmentEvent;\n var _this = this;\n return __generator(this, function(_b2) {\n pageCtx = popPageContext(args);\n _a2 = resolveUserArguments(this._user).apply(void 0, args), id = _a2[0], _traits = _a2[1], options = _a2[2], callback = _a2[3];\n this._user.identify(id, _traits);\n segmentEvent = this.eventFactory.identify(this._user.id(), this._user.traits(), options, this.integrations, pageCtx);\n return [2, this._dispatch(segmentEvent, callback).then(function(ctx) {\n _this.emit(\"identify\", ctx.event.userId, ctx.event.traits, ctx.event.options);\n return ctx;\n })];\n });\n });\n };\n Analytics2.prototype.group = function() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var pageCtx = popPageContext(args);\n if (args.length === 0) {\n return this._group;\n }\n var _a2 = resolveUserArguments(this._group).apply(void 0, args), id = _a2[0], _traits = _a2[1], options = _a2[2], callback = _a2[3];\n this._group.identify(id, _traits);\n var groupId = this._group.id();\n var groupTraits = this._group.traits();\n var segmentEvent = this.eventFactory.group(groupId, groupTraits, options, this.integrations, pageCtx);\n return this._dispatch(segmentEvent, callback).then(function(ctx) {\n _this.emit(\"group\", ctx.event.groupId, ctx.event.traits, ctx.event.options);\n return ctx;\n });\n };\n Analytics2.prototype.alias = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pageCtx, _a2, to, from5, options, callback, segmentEvent;\n var _this = this;\n return __generator(this, function(_b2) {\n pageCtx = popPageContext(args);\n _a2 = resolveAliasArguments.apply(void 0, args), to = _a2[0], from5 = _a2[1], options = _a2[2], callback = _a2[3];\n segmentEvent = this.eventFactory.alias(to, from5, options, this.integrations, pageCtx);\n return [2, this._dispatch(segmentEvent, callback).then(function(ctx) {\n _this.emit(\"alias\", to, from5, ctx.event.options);\n return ctx;\n })];\n });\n });\n };\n Analytics2.prototype.screen = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pageCtx, _a2, category, page, properties, options, callback, segmentEvent;\n var _this = this;\n return __generator(this, function(_b2) {\n pageCtx = popPageContext(args);\n _a2 = resolvePageArguments.apply(void 0, args), category = _a2[0], page = _a2[1], properties = _a2[2], options = _a2[3], callback = _a2[4];\n segmentEvent = this.eventFactory.screen(category, page, properties, options, this.integrations, pageCtx);\n return [2, this._dispatch(segmentEvent, callback).then(function(ctx) {\n _this.emit(\"screen\", category, page, ctx.event.properties, ctx.event.options);\n return ctx;\n })];\n });\n });\n };\n Analytics2.prototype.trackClick = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var autotrack;\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, Promise.resolve().then(() => (init_auto_track(), auto_track_exports))];\n case 1:\n autotrack = _b2.sent();\n return [2, (_a2 = autotrack.link).call.apply(_a2, __spreadArray([this], args, false))];\n }\n });\n });\n };\n Analytics2.prototype.trackLink = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var autotrack;\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, Promise.resolve().then(() => (init_auto_track(), auto_track_exports))];\n case 1:\n autotrack = _b2.sent();\n return [2, (_a2 = autotrack.link).call.apply(_a2, __spreadArray([this], args, false))];\n }\n });\n });\n };\n Analytics2.prototype.trackSubmit = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var autotrack;\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, Promise.resolve().then(() => (init_auto_track(), auto_track_exports))];\n case 1:\n autotrack = _b2.sent();\n return [2, (_a2 = autotrack.form).call.apply(_a2, __spreadArray([this], args, false))];\n }\n });\n });\n };\n Analytics2.prototype.trackForm = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var autotrack;\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n return [4, Promise.resolve().then(() => (init_auto_track(), auto_track_exports))];\n case 1:\n autotrack = _b2.sent();\n return [2, (_a2 = autotrack.form).call.apply(_a2, __spreadArray([this], args, false))];\n }\n });\n });\n };\n Analytics2.prototype.register = function() {\n var plugins = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n plugins[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var ctx, registrations;\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n ctx = Context.system();\n registrations = plugins.map(function(xt) {\n return _this.queue.register(ctx, xt, _this);\n });\n return [4, Promise.all(registrations)];\n case 1:\n _a2.sent();\n return [2, ctx];\n }\n });\n });\n };\n Analytics2.prototype.deregister = function() {\n var plugins = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n plugins[_i] = arguments[_i];\n }\n return __awaiter(this, void 0, void 0, function() {\n var ctx, deregistrations;\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n ctx = Context.system();\n deregistrations = plugins.map(function(pl) {\n var plugin = _this.queue.plugins.find(function(p4) {\n return p4.name === pl;\n });\n if (plugin) {\n return _this.queue.deregister(ctx, plugin, _this);\n } else {\n ctx.log(\"warn\", \"plugin \".concat(pl, \" not found\"));\n }\n });\n return [4, Promise.all(deregistrations)];\n case 1:\n _a2.sent();\n return [2, ctx];\n }\n });\n });\n };\n Analytics2.prototype.debug = function(toggle) {\n if (toggle === false && localStorage.getItem(\"debug\")) {\n localStorage.removeItem(\"debug\");\n }\n this._debug = toggle;\n return this;\n };\n Analytics2.prototype.reset = function() {\n this._user.reset();\n this._group.reset();\n this.emit(\"reset\");\n };\n Analytics2.prototype.timeout = function(timeout) {\n this.settings.timeout = timeout;\n };\n Analytics2.prototype._dispatch = function(event, callback) {\n return __awaiter(this, void 0, void 0, function() {\n var ctx;\n return __generator(this, function(_a2) {\n ctx = new Context(event);\n if (isOffline() && !this.options.retryQueue) {\n return [2, ctx];\n }\n return [2, dispatch(ctx, this.queue, this, {\n callback,\n debug: this._debug,\n timeout: this.settings.timeout\n })];\n });\n });\n };\n Analytics2.prototype.addSourceMiddleware = function(fn) {\n return __awaiter(this, void 0, void 0, function() {\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.queue.criticalTasks.run(function() {\n return __awaiter(_this, void 0, void 0, function() {\n var sourceMiddlewarePlugin2, integrations, plugin;\n return __generator(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n return [4, Promise.resolve().then(() => (init_middleware(), middleware_exports))];\n case 1:\n sourceMiddlewarePlugin2 = _a3.sent().sourceMiddlewarePlugin;\n integrations = {};\n this.queue.plugins.forEach(function(plugin2) {\n if (plugin2.type === \"destination\") {\n return integrations[plugin2.name] = true;\n }\n });\n plugin = sourceMiddlewarePlugin2(fn, integrations);\n return [4, this.register(plugin)];\n case 2:\n _a3.sent();\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n })];\n case 1:\n _a2.sent();\n return [2, this];\n }\n });\n });\n };\n Analytics2.prototype.addDestinationMiddleware = function(integrationName) {\n var middlewares = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n middlewares[_i - 1] = arguments[_i];\n }\n this.queue.plugins.filter(isDestinationPluginWithAddMiddleware).forEach(function(p4) {\n if (integrationName === \"*\" || p4.name.toLowerCase() === integrationName.toLowerCase()) {\n p4.addMiddleware.apply(p4, middlewares);\n }\n });\n return Promise.resolve(this);\n };\n Analytics2.prototype.setAnonymousId = function(id) {\n return this._user.anonymousId(id);\n };\n Analytics2.prototype.queryString = function(query) {\n return __awaiter(this, void 0, void 0, function() {\n var queryString2;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (this.options.useQueryString === false) {\n return [2, []];\n }\n return [4, Promise.resolve().then(() => (init_query_string(), query_string_exports))];\n case 1:\n queryString2 = _a2.sent().queryString;\n return [2, queryString2(this, query)];\n }\n });\n });\n };\n Analytics2.prototype.use = function(legacyPluginFactory) {\n legacyPluginFactory(this);\n return this;\n };\n Analytics2.prototype.ready = function(callback) {\n if (callback === void 0) {\n callback = function(res) {\n return res;\n };\n }\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n return [2, Promise.all(this.queue.plugins.map(function(i3) {\n return i3.ready ? i3.ready() : Promise.resolve();\n })).then(function(res) {\n callback(res);\n return res;\n })];\n });\n });\n };\n Analytics2.prototype.noConflict = function() {\n console.warn(deprecationWarning);\n setGlobalAnalytics(_analytics !== null && _analytics !== void 0 ? _analytics : this);\n return this;\n };\n Analytics2.prototype.normalize = function(msg) {\n console.warn(deprecationWarning);\n return this.eventFactory[\"normalize\"](msg);\n };\n Object.defineProperty(Analytics2.prototype, \"failedInitializations\", {\n get: function() {\n console.warn(deprecationWarning);\n return this.queue.failedInitializations;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Analytics2.prototype, \"VERSION\", {\n get: function() {\n return version7;\n },\n enumerable: false,\n configurable: true\n });\n Analytics2.prototype.initialize = function(_settings, _options) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n console.warn(deprecationWarning);\n return [2, Promise.resolve(this)];\n });\n });\n };\n Analytics2.prototype.pageview = function(url) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n console.warn(deprecationWarning);\n return [4, this.page({ path: url })];\n case 1:\n _a2.sent();\n return [2, this];\n }\n });\n });\n };\n Object.defineProperty(Analytics2.prototype, \"plugins\", {\n get: function() {\n var _a2;\n console.warn(deprecationWarning);\n return (_a2 = this._plugins) !== null && _a2 !== void 0 ? _a2 : {};\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Analytics2.prototype, \"Integrations\", {\n get: function() {\n console.warn(deprecationWarning);\n var integrations = this.queue.plugins.filter(function(plugin) {\n return plugin.type === \"destination\";\n }).reduce(function(acc, plugin) {\n var name = \"\".concat(plugin.name.toLowerCase().replace(\".\", \"\").split(\" \").join(\"-\"), \"Integration\");\n var integration = window[name];\n if (!integration) {\n return acc;\n }\n var nested = integration.Integration;\n if (nested) {\n acc[plugin.name] = nested;\n return acc;\n }\n acc[plugin.name] = integration;\n return acc;\n }, {});\n return integrations;\n },\n enumerable: false,\n configurable: true\n });\n Analytics2.prototype.push = function(args) {\n var an = this;\n var method = args.shift();\n if (method) {\n if (!an[method])\n return;\n }\n an[method].apply(this, args);\n };\n return Analytics2;\n }(Emitter);\n NullAnalytics = /** @class */\n function(_super) {\n __extends(NullAnalytics2, _super);\n function NullAnalytics2() {\n var _this = _super.call(this, { writeKey: \"\" }, { disableClientPersistence: true }) || this;\n _this.initialized = true;\n return _this;\n }\n return NullAnalytics2;\n }(Analytics);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/get-process-env.js\n function getProcessEnv() {\n if (typeof process_exports === \"undefined\" || !process_exports.env) {\n return {};\n }\n return process_exports.env;\n }\n var init_get_process_env = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/get-process-env.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/parse-cdn.js\n var analyticsScriptRegex, getCDNUrlFromScriptTag, _globalCDN, getGlobalCDNUrl, setGlobalCDNUrl, getCDN, getNextIntegrationsURL;\n var init_parse_cdn = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/parse-cdn.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_global_analytics_helper();\n analyticsScriptRegex = /(https:\\/\\/.*)\\/analytics\\.js\\/v1\\/(?:.*?)\\/(?:platform|analytics.*)?/;\n getCDNUrlFromScriptTag = function() {\n var cdn;\n var scripts = Array.prototype.slice.call(document.querySelectorAll(\"script\"));\n scripts.forEach(function(s4) {\n var _a2;\n var src = (_a2 = s4.getAttribute(\"src\")) !== null && _a2 !== void 0 ? _a2 : \"\";\n var result = analyticsScriptRegex.exec(src);\n if (result && result[1]) {\n cdn = result[1];\n }\n });\n return cdn;\n };\n getGlobalCDNUrl = function() {\n var _a2;\n var result = _globalCDN !== null && _globalCDN !== void 0 ? _globalCDN : (_a2 = getGlobalAnalytics()) === null || _a2 === void 0 ? void 0 : _a2._cdn;\n return result;\n };\n setGlobalCDNUrl = function(cdn) {\n var globalAnalytics = getGlobalAnalytics();\n if (globalAnalytics) {\n globalAnalytics._cdn = cdn;\n }\n _globalCDN = cdn;\n };\n getCDN = function() {\n var globalCdnUrl = getGlobalCDNUrl();\n if (globalCdnUrl)\n return globalCdnUrl;\n var cdnFromScriptTag = getCDNUrlFromScriptTag();\n if (cdnFromScriptTag) {\n return cdnFromScriptTag;\n } else {\n return \"https://cdn.segment.com\";\n }\n };\n getNextIntegrationsURL = function() {\n var cdn = getCDN();\n return \"\".concat(cdn, \"/next-integrations\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/merged-options.js\n function mergedOptions(cdnSettings, options) {\n var _a2;\n var optionOverrides = Object.entries((_a2 = options.integrations) !== null && _a2 !== void 0 ? _a2 : {}).reduce(function(overrides, _a3) {\n var _b2, _c;\n var integration = _a3[0], options2 = _a3[1];\n if (typeof options2 === \"object\") {\n return __assign(__assign({}, overrides), (_b2 = {}, _b2[integration] = options2, _b2));\n }\n return __assign(__assign({}, overrides), (_c = {}, _c[integration] = {}, _c));\n }, {});\n return Object.entries(cdnSettings.integrations).reduce(function(integrationSettings, _a3) {\n var _b2;\n var integration = _a3[0], settings = _a3[1];\n return __assign(__assign({}, integrationSettings), (_b2 = {}, _b2[integration] = __assign(__assign({}, settings), optionOverrides[integration]), _b2));\n }, {});\n }\n var init_merged_options = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/merged-options.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/client-hints/index.js\n function clientHints(hints) {\n return __awaiter(this, void 0, void 0, function() {\n var userAgentData;\n return __generator(this, function(_a2) {\n userAgentData = navigator.userAgentData;\n if (!userAgentData)\n return [2, void 0];\n if (!hints)\n return [2, userAgentData.toJSON()];\n return [2, userAgentData.getHighEntropyValues(hints).catch(function() {\n return userAgentData.toJSON();\n })];\n });\n });\n }\n var init_client_hints = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/client-hints/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/env-enrichment/index.js\n function getCookieOptions() {\n if (cookieOptions) {\n return cookieOptions;\n }\n var domain2 = tld(window.location.href);\n cookieOptions = {\n expires: 31536e6,\n secure: false,\n path: \"/\"\n };\n if (domain2) {\n cookieOptions.domain = domain2;\n }\n return cookieOptions;\n }\n function ads(query) {\n var queryIds = {\n btid: \"dataxu\",\n urid: \"millennial-media\"\n };\n if (query.startsWith(\"?\")) {\n query = query.substring(1);\n }\n query = query.replace(/\\?/g, \"&\");\n var parts = query.split(\"&\");\n for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {\n var part = parts_1[_i];\n var _a2 = part.split(\"=\"), k4 = _a2[0], v2 = _a2[1];\n if (queryIds[k4]) {\n return {\n id: v2,\n type: queryIds[k4]\n };\n }\n }\n }\n function utm(query) {\n if (query.startsWith(\"?\")) {\n query = query.substring(1);\n }\n query = query.replace(/\\?/g, \"&\");\n return query.split(\"&\").reduce(function(acc, str) {\n var _a2 = str.split(\"=\"), k4 = _a2[0], _b2 = _a2[1], v2 = _b2 === void 0 ? \"\" : _b2;\n if (k4.includes(\"utm_\") && k4.length > 4) {\n var utmParam = k4.slice(4);\n if (utmParam === \"campaign\") {\n utmParam = \"name\";\n }\n acc[utmParam] = gracefulDecodeURIComponent(v2);\n }\n return acc;\n }, {});\n }\n function ampId() {\n var ampId2 = js_cookie_default.get(\"_ga\");\n if (ampId2 && ampId2.startsWith(\"amp\")) {\n return ampId2;\n }\n }\n function referrerId(query, ctx, disablePersistance) {\n var _a2;\n var storage = new UniversalStorage(disablePersistance ? [] : [new CookieStorage(getCookieOptions())]);\n var stored = storage.get(\"s:context.referrer\");\n var ad = (_a2 = ads(query)) !== null && _a2 !== void 0 ? _a2 : stored;\n if (!ad) {\n return;\n }\n if (ctx) {\n ctx.referrer = __assign(__assign({}, ctx.referrer), ad);\n }\n storage.set(\"s:context.referrer\", ad);\n }\n var cookieOptions, objectToQueryString, EnvironmentEnrichmentPlugin, envEnrichment;\n var init_env_enrichment = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/env-enrichment/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_js_cookie();\n init_version7();\n init_version_type();\n init_tld();\n init_gracefulDecodeURIComponent();\n init_storage();\n init_client_hints();\n objectToQueryString = function(obj) {\n try {\n var searchParams_1 = new URLSearchParams();\n Object.entries(obj).forEach(function(_a2) {\n var k4 = _a2[0], v2 = _a2[1];\n if (Array.isArray(v2)) {\n v2.forEach(function(value) {\n return searchParams_1.append(k4, value);\n });\n } else {\n searchParams_1.append(k4, v2);\n }\n });\n return searchParams_1.toString();\n } catch (_a2) {\n return \"\";\n }\n };\n EnvironmentEnrichmentPlugin = /** @class */\n /* @__PURE__ */ function() {\n function EnvironmentEnrichmentPlugin2() {\n var _this = this;\n this.name = \"Page Enrichment\";\n this.type = \"before\";\n this.version = \"0.1.0\";\n this.isLoaded = function() {\n return true;\n };\n this.load = function(_ctx, instance) {\n return __awaiter(_this, void 0, void 0, function() {\n var _a2, _1;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n this.instance = instance;\n _b2.label = 1;\n case 1:\n _b2.trys.push([1, 3, , 4]);\n _a2 = this;\n return [4, clientHints(this.instance.options.highEntropyValuesClientHints)];\n case 2:\n _a2.userAgentData = _b2.sent();\n return [3, 4];\n case 3:\n _1 = _b2.sent();\n return [3, 4];\n case 4:\n return [2, Promise.resolve()];\n }\n });\n });\n };\n this.enrich = function(ctx) {\n var _a2, _b2;\n var evtCtx = ctx.event.context;\n var search = evtCtx.page.search || \"\";\n var query = typeof search === \"object\" ? objectToQueryString(search) : search;\n evtCtx.userAgent = navigator.userAgent;\n evtCtx.userAgentData = _this.userAgentData;\n var locale = navigator.userLanguage || navigator.language;\n if (typeof evtCtx.locale === \"undefined\" && typeof locale !== \"undefined\") {\n evtCtx.locale = locale;\n }\n (_a2 = evtCtx.library) !== null && _a2 !== void 0 ? _a2 : evtCtx.library = {\n name: \"analytics.js\",\n version: \"\".concat(getVersionType() === \"web\" ? \"next\" : \"npm:next\", \"-\").concat(version7)\n };\n if (query && !evtCtx.campaign) {\n evtCtx.campaign = utm(query);\n }\n var amp = ampId();\n if (amp) {\n evtCtx.amp = { id: amp };\n }\n referrerId(query, evtCtx, (_b2 = _this.instance.options.disableClientPersistence) !== null && _b2 !== void 0 ? _b2 : false);\n try {\n evtCtx.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n } catch (_2) {\n }\n return ctx;\n };\n this.track = this.enrich;\n this.identify = this.enrich;\n this.page = this.enrich;\n this.group = this.enrich;\n this.alias = this.enrich;\n this.screen = this.enrich;\n }\n return EnvironmentEnrichmentPlugin2;\n }();\n envEnrichment = new EnvironmentEnrichmentPlugin();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/load-script.js\n function findScript(src) {\n var scripts = Array.prototype.slice.call(window.document.querySelectorAll(\"script\"));\n return scripts.find(function(s4) {\n return s4.src === src;\n });\n }\n function loadScript(src, attributes) {\n var found = findScript(src);\n if (found !== void 0) {\n var status_1 = found === null || found === void 0 ? void 0 : found.getAttribute(\"status\");\n if (status_1 === \"loaded\") {\n return Promise.resolve(found);\n }\n if (status_1 === \"loading\") {\n return new Promise(function(resolve, reject) {\n found.addEventListener(\"load\", function() {\n return resolve(found);\n });\n found.addEventListener(\"error\", function(err) {\n return reject(err);\n });\n });\n }\n }\n return new Promise(function(resolve, reject) {\n var _a2;\n var script = window.document.createElement(\"script\");\n script.type = \"text/javascript\";\n script.src = src;\n script.async = true;\n script.setAttribute(\"status\", \"loading\");\n for (var _i = 0, _b2 = Object.entries(attributes !== null && attributes !== void 0 ? attributes : {}); _i < _b2.length; _i++) {\n var _c = _b2[_i], k4 = _c[0], v2 = _c[1];\n script.setAttribute(k4, v2);\n }\n script.onload = function() {\n script.onerror = script.onload = null;\n script.setAttribute(\"status\", \"loaded\");\n resolve(script);\n };\n script.onerror = function() {\n script.onerror = script.onload = null;\n script.setAttribute(\"status\", \"error\");\n reject(new Error(\"Failed to load \".concat(src)));\n };\n var firstExistingScript = window.document.querySelector(\"script\");\n if (!firstExistingScript) {\n window.document.head.appendChild(script);\n } else {\n (_a2 = firstExistingScript.parentElement) === null || _a2 === void 0 ? void 0 : _a2.insertBefore(script, firstExistingScript);\n }\n });\n }\n function unloadScript(src) {\n var found = findScript(src);\n if (found !== void 0) {\n found.remove();\n }\n return Promise.resolve();\n }\n var init_load_script = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/load-script.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/metric-helpers.js\n function recordIntegrationMetric(ctx, _a2) {\n var methodName = _a2.methodName, integrationName = _a2.integrationName, type = _a2.type, _b2 = _a2.didError, didError = _b2 === void 0 ? false : _b2;\n ctx.stats.increment(\"analytics_js.integration.invoke\".concat(didError ? \".error\" : \"\"), 1, [\n \"method:\".concat(methodName),\n \"integration_name:\".concat(integrationName),\n \"type:\".concat(type)\n ]);\n }\n var init_metric_helpers = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/stats/metric-helpers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/remote-loader/index.js\n function validate3(pluginLike) {\n if (!Array.isArray(pluginLike)) {\n throw new Error(\"Not a valid list of plugins\");\n }\n var required = [\"load\", \"isLoaded\", \"name\", \"version\", \"type\"];\n pluginLike.forEach(function(plugin) {\n required.forEach(function(method) {\n var _a2;\n if (plugin[method] === void 0) {\n throw new Error(\"Plugin: \".concat((_a2 = plugin.name) !== null && _a2 !== void 0 ? _a2 : \"unknown\", \" missing required function \").concat(method));\n }\n });\n });\n return true;\n }\n function isPluginDisabled(userIntegrations, remotePlugin) {\n var creationNameEnabled = userIntegrations[remotePlugin.creationName];\n var currentNameEnabled = userIntegrations[remotePlugin.name];\n if (userIntegrations.All === false && !creationNameEnabled && !currentNameEnabled) {\n return true;\n }\n if (creationNameEnabled === false || currentNameEnabled === false) {\n return true;\n }\n return false;\n }\n function loadPluginFactory(remotePlugin, obfuscate) {\n return __awaiter(this, void 0, void 0, function() {\n var defaultCdn, cdn, urlSplit, name_1, obfuscatedURL, error_3, err_1;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n _a2.trys.push([0, 9, , 10]);\n defaultCdn = new RegExp(\"https://cdn.segment.(com|build)\");\n cdn = getCDN();\n if (!obfuscate)\n return [3, 6];\n urlSplit = remotePlugin.url.split(\"/\");\n name_1 = urlSplit[urlSplit.length - 2];\n obfuscatedURL = remotePlugin.url.replace(name_1, btoa(name_1).replace(/=/g, \"\"));\n _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 5]);\n return [4, loadScript(obfuscatedURL.replace(defaultCdn, cdn))];\n case 2:\n _a2.sent();\n return [3, 5];\n case 3:\n error_3 = _a2.sent();\n return [4, loadScript(remotePlugin.url.replace(defaultCdn, cdn))];\n case 4:\n _a2.sent();\n return [3, 5];\n case 5:\n return [3, 8];\n case 6:\n return [4, loadScript(remotePlugin.url.replace(defaultCdn, cdn))];\n case 7:\n _a2.sent();\n _a2.label = 8;\n case 8:\n if (typeof window[remotePlugin.libraryName] === \"function\") {\n return [2, window[remotePlugin.libraryName]];\n }\n return [3, 10];\n case 9:\n err_1 = _a2.sent();\n console.error(\"Failed to create PluginFactory\", remotePlugin);\n throw err_1;\n case 10:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }\n function remoteLoader(settings, userIntegrations, mergedIntegrations, options, routingMiddleware, pluginSources) {\n var _a2, _b2, _c;\n return __awaiter(this, void 0, void 0, function() {\n var allPlugins, routingRules, pluginPromises;\n var _this = this;\n return __generator(this, function(_d) {\n switch (_d.label) {\n case 0:\n allPlugins = [];\n routingRules = (_b2 = (_a2 = settings.middlewareSettings) === null || _a2 === void 0 ? void 0 : _a2.routingRules) !== null && _b2 !== void 0 ? _b2 : [];\n pluginPromises = ((_c = settings.remotePlugins) !== null && _c !== void 0 ? _c : []).map(function(remotePlugin) {\n return __awaiter(_this, void 0, void 0, function() {\n var pluginFactory, _a3, plugin, plugins, routing_1, error_4;\n return __generator(this, function(_b3) {\n switch (_b3.label) {\n case 0:\n if (isPluginDisabled(userIntegrations, remotePlugin))\n return [\n 2\n /*return*/\n ];\n _b3.label = 1;\n case 1:\n _b3.trys.push([1, 6, , 7]);\n _a3 = pluginSources === null || pluginSources === void 0 ? void 0 : pluginSources.find(function(_a4) {\n var pluginName = _a4.pluginName;\n return pluginName === remotePlugin.name;\n });\n if (_a3)\n return [3, 3];\n return [4, loadPluginFactory(remotePlugin, options === null || options === void 0 ? void 0 : options.obfuscate)];\n case 2:\n _a3 = _b3.sent();\n _b3.label = 3;\n case 3:\n pluginFactory = _a3;\n if (!pluginFactory)\n return [3, 5];\n return [4, pluginFactory(__assign(__assign({}, remotePlugin.settings), mergedIntegrations[remotePlugin.name]))];\n case 4:\n plugin = _b3.sent();\n plugins = Array.isArray(plugin) ? plugin : [plugin];\n validate3(plugins);\n routing_1 = routingRules.filter(function(rule) {\n return rule.destinationName === remotePlugin.creationName;\n });\n plugins.forEach(function(plugin2) {\n var wrapper = new ActionDestination(remotePlugin.creationName, plugin2);\n if (routing_1.length && routingMiddleware) {\n wrapper.addMiddleware(routingMiddleware);\n }\n allPlugins.push(wrapper);\n });\n _b3.label = 5;\n case 5:\n return [3, 7];\n case 6:\n error_4 = _b3.sent();\n console.warn(\"Failed to load Remote Plugin\", error_4);\n return [3, 7];\n case 7:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n });\n return [4, Promise.all(pluginPromises)];\n case 1:\n _d.sent();\n return [2, allPlugins.filter(Boolean)];\n }\n });\n });\n }\n var ActionDestination;\n var init_remote_loader = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/remote-loader/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_load_script();\n init_parse_cdn();\n init_middleware();\n init_context2();\n init_metric_helpers();\n init_esm8();\n ActionDestination = /** @class */\n function() {\n function ActionDestination2(name, action) {\n this.version = \"1.0.0\";\n this.alternativeNames = [];\n this.loadPromise = createDeferred();\n this.middleware = [];\n this.alias = this._createMethod(\"alias\");\n this.group = this._createMethod(\"group\");\n this.identify = this._createMethod(\"identify\");\n this.page = this._createMethod(\"page\");\n this.screen = this._createMethod(\"screen\");\n this.track = this._createMethod(\"track\");\n this.action = action;\n this.name = name;\n this.type = action.type;\n this.alternativeNames.push(action.name);\n }\n ActionDestination2.prototype.addMiddleware = function() {\n var _a2;\n var fn = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fn[_i] = arguments[_i];\n }\n if (this.type === \"destination\") {\n (_a2 = this.middleware).push.apply(_a2, fn);\n }\n };\n ActionDestination2.prototype.transform = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var modifiedEvent;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, applyDestinationMiddleware(this.name, ctx.event, this.middleware)];\n case 1:\n modifiedEvent = _a2.sent();\n if (modifiedEvent === null) {\n ctx.cancel(new ContextCancelation({\n retry: false,\n reason: \"dropped by destination middleware\"\n }));\n }\n return [2, new Context(modifiedEvent)];\n }\n });\n });\n };\n ActionDestination2.prototype._createMethod = function(methodName) {\n var _this = this;\n return function(ctx) {\n return __awaiter(_this, void 0, void 0, function() {\n var transformedContext, error_1;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (!this.action[methodName])\n return [2, ctx];\n transformedContext = ctx;\n if (!(this.type === \"destination\"))\n return [3, 2];\n return [4, this.transform(ctx)];\n case 1:\n transformedContext = _a2.sent();\n _a2.label = 2;\n case 2:\n _a2.trys.push([2, 5, , 6]);\n return [4, this.ready()];\n case 3:\n if (!_a2.sent()) {\n throw new Error(\"Something prevented the destination from getting ready\");\n }\n recordIntegrationMetric(ctx, {\n integrationName: this.action.name,\n methodName,\n type: \"action\"\n });\n return [4, this.action[methodName](transformedContext)];\n case 4:\n _a2.sent();\n return [3, 6];\n case 5:\n error_1 = _a2.sent();\n recordIntegrationMetric(ctx, {\n integrationName: this.action.name,\n methodName,\n type: \"action\",\n didError: true\n });\n throw error_1;\n case 6:\n return [2, ctx];\n }\n });\n });\n };\n };\n ActionDestination2.prototype.isLoaded = function() {\n return this.action.isLoaded();\n };\n ActionDestination2.prototype.ready = function() {\n return __awaiter(this, void 0, void 0, function() {\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n _b2.trys.push([0, 2, , 3]);\n return [4, this.loadPromise.promise];\n case 1:\n _b2.sent();\n return [2, true];\n case 2:\n _a2 = _b2.sent();\n return [2, false];\n case 3:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n ActionDestination2.prototype.load = function(ctx, analytics) {\n return __awaiter(this, void 0, void 0, function() {\n var loadP, _a2, _b2, error_2;\n return __generator(this, function(_c) {\n switch (_c.label) {\n case 0:\n if (this.loadPromise.isSettled()) {\n return [2, this.loadPromise.promise];\n }\n _c.label = 1;\n case 1:\n _c.trys.push([1, 3, , 4]);\n recordIntegrationMetric(ctx, {\n integrationName: this.action.name,\n methodName: \"load\",\n type: \"action\"\n });\n loadP = this.action.load(ctx, analytics);\n _b2 = (_a2 = this.loadPromise).resolve;\n return [4, loadP];\n case 2:\n _b2.apply(_a2, [_c.sent()]);\n return [2, loadP];\n case 3:\n error_2 = _c.sent();\n recordIntegrationMetric(ctx, {\n integrationName: this.action.name,\n methodName: \"load\",\n type: \"action\",\n didError: true\n });\n this.loadPromise.reject(error_2);\n throw error_2;\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n ActionDestination2.prototype.unload = function(ctx, analytics) {\n var _a2, _b2;\n return (_b2 = (_a2 = this.action).unload) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, ctx, analytics);\n };\n return ActionDestination2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/on-page-change.js\n var onPageChange;\n var init_on_page_change = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/on-page-change.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n onPageChange = function(cb) {\n var unloaded = false;\n window.addEventListener(\"pagehide\", function() {\n if (unloaded)\n return;\n unloaded = true;\n cb(unloaded);\n });\n document.addEventListener(\"visibilitychange\", function() {\n if (document.visibilityState == \"hidden\") {\n if (unloaded)\n return;\n unloaded = true;\n } else {\n unloaded = false;\n }\n cb(unloaded);\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/ratelimit-error.js\n var RateLimitError;\n var init_ratelimit_error = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/ratelimit-error.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n RateLimitError = /** @class */\n function(_super) {\n __extends(RateLimitError2, _super);\n function RateLimitError2(message, retryTimeout) {\n var _this = _super.call(this, message) || this;\n _this.retryTimeout = retryTimeout;\n _this.name = \"RateLimitError\";\n return _this;\n }\n return RateLimitError2;\n }(Error);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/batched-dispatcher.js\n function kilobytes(buffer2) {\n var size5 = encodeURI(JSON.stringify(buffer2)).split(/%..|./).length - 1;\n return size5 / 1024;\n }\n function approachingTrackingAPILimit(buffer2) {\n return kilobytes(buffer2) >= MAX_PAYLOAD_SIZE - 50;\n }\n function passedKeepaliveLimit(buffer2) {\n return kilobytes(buffer2) >= MAX_KEEPALIVE_SIZE - 10;\n }\n function chunks(batch2) {\n var result = [];\n var index2 = 0;\n batch2.forEach(function(item) {\n var size5 = kilobytes(result[index2]);\n if (size5 >= 64) {\n index2++;\n }\n if (result[index2]) {\n result[index2].push(item);\n } else {\n result[index2] = [item];\n }\n });\n return result;\n }\n function batch(apiHost, config2) {\n var _a2, _b2;\n var buffer2 = [];\n var pageUnloaded = false;\n var limit = (_a2 = config2 === null || config2 === void 0 ? void 0 : config2.size) !== null && _a2 !== void 0 ? _a2 : 10;\n var timeout = (_b2 = config2 === null || config2 === void 0 ? void 0 : config2.timeout) !== null && _b2 !== void 0 ? _b2 : 5e3;\n var rateLimitTimeout = 0;\n function sendBatch(batch2) {\n var _a3;\n if (batch2.length === 0) {\n return;\n }\n var writeKey = (_a3 = batch2[0]) === null || _a3 === void 0 ? void 0 : _a3.writeKey;\n var updatedBatch = batch2.map(function(event) {\n var _a4 = event, sentAt = _a4.sentAt, newEvent = __rest(_a4, [\"sentAt\"]);\n return newEvent;\n });\n return fetch2(\"https://\".concat(apiHost, \"/b\"), {\n keepalive: (config2 === null || config2 === void 0 ? void 0 : config2.keepalive) || pageUnloaded,\n headers: {\n \"Content-Type\": \"text/plain\"\n },\n method: \"post\",\n body: JSON.stringify({\n writeKey,\n batch: updatedBatch,\n sentAt: (/* @__PURE__ */ new Date()).toISOString()\n })\n }).then(function(res) {\n var _a4;\n if (res.status >= 500) {\n throw new Error(\"Bad response from server: \".concat(res.status));\n }\n if (res.status === 429) {\n var retryTimeoutStringSecs = (_a4 = res.headers) === null || _a4 === void 0 ? void 0 : _a4.get(\"x-ratelimit-reset\");\n var retryTimeoutMS = typeof retryTimeoutStringSecs == \"string\" ? parseInt(retryTimeoutStringSecs) * 1e3 : timeout;\n throw new RateLimitError(\"Rate limit exceeded: \".concat(res.status), retryTimeoutMS);\n }\n });\n }\n function flush(attempt2) {\n var _a3;\n if (attempt2 === void 0) {\n attempt2 = 1;\n }\n return __awaiter(this, void 0, void 0, function() {\n var batch_1;\n return __generator(this, function(_b3) {\n if (buffer2.length) {\n batch_1 = buffer2;\n buffer2 = [];\n return [2, (_a3 = sendBatch(batch_1)) === null || _a3 === void 0 ? void 0 : _a3.catch(function(error) {\n var _a4;\n var ctx = Context.system();\n ctx.log(\"error\", \"Error sending batch\", error);\n if (attempt2 <= ((_a4 = config2 === null || config2 === void 0 ? void 0 : config2.maxRetries) !== null && _a4 !== void 0 ? _a4 : 10)) {\n if (error.name === \"RateLimitError\") {\n rateLimitTimeout = error.retryTimeout;\n }\n buffer2.push.apply(buffer2, batch_1);\n buffer2.map(function(event) {\n if (\"_metadata\" in event) {\n var segmentEvent = event;\n segmentEvent._metadata = __assign(__assign({}, segmentEvent._metadata), { retryCount: attempt2 });\n }\n });\n scheduleFlush2(attempt2 + 1);\n }\n })];\n }\n return [\n 2\n /*return*/\n ];\n });\n });\n }\n var schedule;\n function scheduleFlush2(attempt2) {\n if (attempt2 === void 0) {\n attempt2 = 1;\n }\n if (schedule) {\n return;\n }\n schedule = setTimeout(function() {\n schedule = void 0;\n flush(attempt2).catch(console.error);\n }, rateLimitTimeout ? rateLimitTimeout : timeout);\n rateLimitTimeout = 0;\n }\n onPageChange(function(unloaded) {\n pageUnloaded = unloaded;\n if (pageUnloaded && buffer2.length) {\n var reqs = chunks(buffer2).map(sendBatch);\n Promise.all(reqs).catch(console.error);\n }\n });\n function dispatch2(_url, body) {\n return __awaiter(this, void 0, void 0, function() {\n var bufferOverflow;\n return __generator(this, function(_a3) {\n buffer2.push(body);\n bufferOverflow = buffer2.length >= limit || approachingTrackingAPILimit(buffer2) || (config2 === null || config2 === void 0 ? void 0 : config2.keepalive) && passedKeepaliveLimit(buffer2);\n return [2, bufferOverflow || pageUnloaded ? flush() : scheduleFlush2()];\n });\n });\n }\n return {\n dispatch: dispatch2\n };\n }\n var MAX_PAYLOAD_SIZE, MAX_KEEPALIVE_SIZE;\n var init_batched_dispatcher = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/batched-dispatcher.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_fetch2();\n init_on_page_change();\n init_ratelimit_error();\n init_context2();\n MAX_PAYLOAD_SIZE = 500;\n MAX_KEEPALIVE_SIZE = 64;\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/fetch-dispatcher.js\n function fetch_dispatcher_default(config2) {\n function dispatch2(url, body) {\n return fetch2(url, {\n keepalive: config2 === null || config2 === void 0 ? void 0 : config2.keepalive,\n headers: { \"Content-Type\": \"text/plain\" },\n method: \"post\",\n body: JSON.stringify(body)\n }).then(function(res) {\n var _a2;\n if (res.status >= 500) {\n throw new Error(\"Bad response from server: \".concat(res.status));\n }\n if (res.status === 429) {\n var retryTimeoutStringSecs = (_a2 = res.headers) === null || _a2 === void 0 ? void 0 : _a2.get(\"x-ratelimit-reset\");\n var retryTimeoutMS = retryTimeoutStringSecs ? parseInt(retryTimeoutStringSecs) * 1e3 : 5e3;\n throw new RateLimitError(\"Rate limit exceeded: \".concat(res.status), retryTimeoutMS);\n }\n });\n }\n return {\n dispatch: dispatch2\n };\n }\n var init_fetch_dispatcher = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/fetch-dispatcher.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fetch2();\n init_ratelimit_error();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/normalize.js\n function normalize2(analytics, json, settings, integrations, ctx) {\n var _a2;\n var user = analytics.user();\n delete json.options;\n json.writeKey = settings === null || settings === void 0 ? void 0 : settings.apiKey;\n json.userId = json.userId || user.id();\n json.anonymousId = json.anonymousId || user.anonymousId();\n json.sentAt = /* @__PURE__ */ new Date();\n var failed = analytics.queue.failedInitializations || [];\n if (failed.length > 0) {\n json._metadata = { failedInitializations: failed };\n }\n if (ctx != null) {\n if (ctx.attempts > 1) {\n json._metadata = __assign(__assign({}, json._metadata), { retryCount: ctx.attempts });\n }\n ctx.attempts++;\n }\n var bundled = [];\n var unbundled = [];\n for (var key in integrations) {\n var integration = integrations[key];\n if (key === \"Segment.io\") {\n bundled.push(key);\n }\n if (integration.bundlingStatus === \"bundled\") {\n bundled.push(key);\n }\n if (integration.bundlingStatus === \"unbundled\") {\n unbundled.push(key);\n }\n }\n for (var _i = 0, _b2 = (settings === null || settings === void 0 ? void 0 : settings.unbundledIntegrations) || []; _i < _b2.length; _i++) {\n var settingsUnbundled = _b2[_i];\n if (!unbundled.includes(settingsUnbundled)) {\n unbundled.push(settingsUnbundled);\n }\n }\n var configIds = (_a2 = settings === null || settings === void 0 ? void 0 : settings.maybeBundledConfigIds) !== null && _a2 !== void 0 ? _a2 : {};\n var bundledConfigIds = [];\n bundled.sort().forEach(function(name) {\n var _a3;\n ;\n ((_a3 = configIds[name]) !== null && _a3 !== void 0 ? _a3 : []).forEach(function(id) {\n bundledConfigIds.push(id);\n });\n });\n if ((settings === null || settings === void 0 ? void 0 : settings.addBundledMetadata) !== false) {\n json._metadata = __assign(__assign({}, json._metadata), { bundled: bundled.sort(), unbundled: unbundled.sort(), bundledIds: bundledConfigIds });\n }\n return json;\n }\n var init_normalize = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/normalize.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/p-while.js\n var pWhile;\n var init_p_while = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/p-while.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n pWhile = function(condition, action) {\n return __awaiter(void 0, void 0, void 0, function() {\n var loop;\n return __generator(this, function(_a2) {\n loop = function(actionResult) {\n return __awaiter(void 0, void 0, void 0, function() {\n var _a3;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n if (!condition(actionResult))\n return [3, 2];\n _a3 = loop;\n return [4, action()];\n case 1:\n return [2, _a3.apply(void 0, [_b2.sent()])];\n case 2:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n return [2, loop(void 0)];\n });\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/schedule-flush.js\n function flushQueue(xt, queue2) {\n return __awaiter(this, void 0, void 0, function() {\n var failedQueue;\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n failedQueue = [];\n if (isOffline()) {\n return [2, queue2];\n }\n return [\n 4,\n pWhile(function() {\n return queue2.length > 0 && !isOffline();\n }, function() {\n return __awaiter(_this, void 0, void 0, function() {\n var ctx, result, success;\n return __generator(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n ctx = queue2.pop();\n if (!ctx) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, attempt(ctx, xt)];\n case 1:\n result = _a3.sent();\n success = result instanceof Context;\n if (!success) {\n failedQueue.push(ctx);\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n })\n // re-add failed tasks\n ];\n case 1:\n _a2.sent();\n failedQueue.map(function(failed) {\n return queue2.pushWithBackoff(failed);\n });\n return [2, queue2];\n }\n });\n });\n }\n function scheduleFlush(flushing, buffer2, xt, scheduleFlush2) {\n var _this = this;\n if (flushing) {\n return;\n }\n setTimeout(function() {\n return __awaiter(_this, void 0, void 0, function() {\n var isFlushing, newBuffer;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n isFlushing = true;\n return [4, flushQueue(xt, buffer2)];\n case 1:\n newBuffer = _a2.sent();\n isFlushing = false;\n if (buffer2.todo > 0) {\n scheduleFlush2(isFlushing, newBuffer, xt, scheduleFlush2);\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }, Math.random() * 5e3);\n }\n var init_schedule_flush = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/schedule-flush.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_connection();\n init_context2();\n init_esm9();\n init_p_while();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/index.js\n function onAlias(analytics, json) {\n var _a2, _b2, _c, _d;\n var user = analytics.user();\n json.previousId = (_c = (_b2 = (_a2 = json.previousId) !== null && _a2 !== void 0 ? _a2 : json.from) !== null && _b2 !== void 0 ? _b2 : user.id()) !== null && _c !== void 0 ? _c : user.anonymousId();\n json.userId = (_d = json.userId) !== null && _d !== void 0 ? _d : json.to;\n delete json.from;\n delete json.to;\n return json;\n }\n function segmentio(analytics, settings, integrations) {\n var _a2, _b2, _c;\n window.addEventListener(\"pagehide\", function() {\n buffer2.push.apply(buffer2, Array.from(inflightEvents));\n inflightEvents.clear();\n });\n var writeKey = (_a2 = settings === null || settings === void 0 ? void 0 : settings.apiKey) !== null && _a2 !== void 0 ? _a2 : \"\";\n var buffer2 = analytics.options.disableClientPersistence ? new PriorityQueue(analytics.queue.queue.maxAttempts, []) : new PersistedPriorityQueue(analytics.queue.queue.maxAttempts, \"\".concat(writeKey, \":dest-Segment.io\"));\n var inflightEvents = /* @__PURE__ */ new Set();\n var flushing = false;\n var apiHost = (_b2 = settings === null || settings === void 0 ? void 0 : settings.apiHost) !== null && _b2 !== void 0 ? _b2 : SEGMENT_API_HOST;\n var protocol = (_c = settings === null || settings === void 0 ? void 0 : settings.protocol) !== null && _c !== void 0 ? _c : \"https\";\n var remote = \"\".concat(protocol, \"://\").concat(apiHost);\n var deliveryStrategy = settings === null || settings === void 0 ? void 0 : settings.deliveryStrategy;\n var client = (deliveryStrategy === null || deliveryStrategy === void 0 ? void 0 : deliveryStrategy.strategy) === \"batching\" ? batch(apiHost, deliveryStrategy.config) : fetch_dispatcher_default(deliveryStrategy === null || deliveryStrategy === void 0 ? void 0 : deliveryStrategy.config);\n function send(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n var path, json;\n return __generator(this, function(_a3) {\n if (isOffline()) {\n buffer2.push(ctx);\n scheduleFlush(flushing, buffer2, segmentio2, scheduleFlush);\n return [2, ctx];\n }\n inflightEvents.add(ctx);\n path = ctx.event.type.charAt(0);\n json = toFacade(ctx.event).json();\n if (ctx.event.type === \"track\") {\n delete json.traits;\n }\n if (ctx.event.type === \"alias\") {\n json = onAlias(analytics, json);\n }\n return [2, client.dispatch(\"\".concat(remote, \"/\").concat(path), normalize2(analytics, json, settings, integrations, ctx)).then(function() {\n return ctx;\n }).catch(function(error) {\n ctx.log(\"error\", \"Error sending event\", error);\n if (error.name === \"RateLimitError\") {\n var timeout = error.retryTimeout;\n buffer2.pushWithBackoff(ctx, timeout);\n } else {\n buffer2.pushWithBackoff(ctx);\n }\n scheduleFlush(flushing, buffer2, segmentio2, scheduleFlush);\n return ctx;\n }).finally(function() {\n inflightEvents.delete(ctx);\n })];\n });\n });\n }\n var segmentio2 = {\n name: \"Segment.io\",\n type: \"destination\",\n version: \"0.1.0\",\n isLoaded: function() {\n return true;\n },\n load: function() {\n return Promise.resolve();\n },\n track: send,\n identify: send,\n page: send,\n alias: send,\n group: send,\n screen: send\n };\n if (buffer2.todo) {\n scheduleFlush(flushing, buffer2, segmentio2, scheduleFlush);\n }\n return segmentio2;\n }\n var init_segmentio = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/segmentio/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_connection();\n init_priority_queue2();\n init_persisted();\n init_to_facade();\n init_batched_dispatcher();\n init_fetch_dispatcher();\n init_normalize();\n init_schedule_flush();\n init_constants2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/inspector/index.js\n var _a, _b, env2, inspectorHost, attachInspector;\n var init_inspector = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/core/inspector/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_get_global();\n env2 = getGlobal();\n inspectorHost = (_a = (_b = env2)[\"__SEGMENT_INSPECTOR__\"]) !== null && _a !== void 0 ? _a : _b[\"__SEGMENT_INSPECTOR__\"] = {};\n attachInspector = function(analytics) {\n var _a2;\n return (_a2 = inspectorHost.attach) === null || _a2 === void 0 ? void 0 : _a2.call(inspectorHost, analytics);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/vendor/tsub/tsub.js\n var require_tsub = __commonJS({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/vendor/tsub/tsub.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n !function(t3, r2) {\n if (\"object\" == typeof exports3 && \"object\" == typeof module)\n module.exports = r2();\n else if (\"function\" == typeof define && define.amd)\n define([], r2);\n else {\n var e2 = r2();\n for (var n2 in e2)\n (\"object\" == typeof exports3 ? exports3 : t3)[n2] = e2[n2];\n }\n }(self, function() {\n return function() {\n var t3 = { 2870: function(t4, r3, e3) {\n \"use strict\";\n var n2 = this && this.__importDefault || function(t5) {\n return t5 && t5.__esModule ? t5 : { default: t5 };\n };\n Object.defineProperty(r3, \"__esModule\", { value: true }), r3.Store = r3.matches = r3.transform = void 0;\n var o5 = e3(4303);\n Object.defineProperty(r3, \"transform\", { enumerable: true, get: function() {\n return n2(o5).default;\n } });\n var s4 = e3(2370);\n Object.defineProperty(r3, \"matches\", { enumerable: true, get: function() {\n return n2(s4).default;\n } });\n var i3 = e3(1444);\n Object.defineProperty(r3, \"Store\", { enumerable: true, get: function() {\n return n2(i3).default;\n } });\n }, 2370: function(t4, r3, e3) {\n \"use strict\";\n var n2 = this && this.__importDefault || function(t5) {\n return t5 && t5.__esModule ? t5 : { default: t5 };\n };\n Object.defineProperty(r3, \"__esModule\", { value: true });\n var o5 = n2(e3(7843));\n function s4(t5, r4) {\n if (!Array.isArray(t5))\n return true === i3(t5, r4);\n var e4, n3, o6, f7, p4 = t5[0];\n switch (p4) {\n case \"!\":\n return !s4(t5[1], r4);\n case \"or\":\n for (var l6 = 1; l6 < t5.length; l6++)\n if (s4(t5[l6], r4))\n return true;\n return false;\n case \"and\":\n for (l6 = 1; l6 < t5.length; l6++)\n if (!s4(t5[l6], r4))\n return false;\n return true;\n case \"=\":\n case \"!=\":\n return function(t6, r5, e5, n4) {\n switch (u2(t6) && (t6 = s4(t6, n4)), u2(r5) && (r5 = s4(r5, n4)), \"object\" == typeof t6 && \"object\" == typeof r5 && (t6 = JSON.stringify(t6), r5 = JSON.stringify(r5)), e5) {\n case \"=\":\n return t6 === r5;\n case \"!=\":\n return t6 !== r5;\n default:\n throw new Error(\"Invalid operator in compareItems: \".concat(e5));\n }\n }(i3(t5[1], r4), i3(t5[2], r4), p4, r4);\n case \"<=\":\n case \"<\":\n case \">\":\n case \">=\":\n return function(t6, r5, e5, n4) {\n if (u2(t6) && (t6 = s4(t6, n4)), u2(r5) && (r5 = s4(r5, n4)), \"number\" != typeof t6 || \"number\" != typeof r5)\n return false;\n switch (e5) {\n case \"<=\":\n return t6 <= r5;\n case \">=\":\n return t6 >= r5;\n case \"<\":\n return t6 < r5;\n case \">\":\n return t6 > r5;\n default:\n throw new Error(\"Invalid operator in compareNumbers: \".concat(e5));\n }\n }(i3(t5[1], r4), i3(t5[2], r4), p4, r4);\n case \"in\":\n return function(t6, r5, e5) {\n return void 0 !== r5.find(function(r6) {\n return i3(r6, e5) === t6;\n });\n }(i3(t5[1], r4), i3(t5[2], r4), r4);\n case \"contains\":\n return o6 = i3(t5[1], r4), f7 = i3(t5[2], r4), \"string\" == typeof o6 && \"string\" == typeof f7 && -1 !== o6.indexOf(f7);\n case \"match\":\n return e4 = i3(t5[1], r4), n3 = i3(t5[2], r4), \"string\" == typeof e4 && \"string\" == typeof n3 && function(t6, r5) {\n var e5, n4;\n t:\n for (; t6.length > 0; ) {\n var o7, s5;\n if (o7 = (e5 = a3(t6)).star, s5 = e5.chunk, t6 = e5.pattern, o7 && \"\" === s5)\n return true;\n var i4 = c4(s5, r5), u3 = i4.t, f8 = i4.ok, p5 = i4.err;\n if (p5)\n return false;\n if (!f8 || !(0 === u3.length || t6.length > 0)) {\n if (o7)\n for (var l7 = 0; l7 < r5.length; l7++) {\n if (u3 = (n4 = c4(s5, r5.slice(l7 + 1))).t, f8 = n4.ok, p5 = n4.err, f8) {\n if (0 === t6.length && u3.length > 0)\n continue;\n r5 = u3;\n continue t;\n }\n if (p5)\n return false;\n }\n return false;\n }\n r5 = u3;\n }\n return 0 === r5.length;\n }(n3, e4);\n case \"lowercase\":\n var v2 = i3(t5[1], r4);\n return \"string\" != typeof v2 ? null : v2.toLowerCase();\n case \"typeof\":\n return typeof i3(t5[1], r4);\n case \"length\":\n return function(t6) {\n return null === t6 ? 0 : Array.isArray(t6) || \"string\" == typeof t6 ? t6.length : NaN;\n }(i3(t5[1], r4));\n default:\n throw new Error(\"FQL IR could not evaluate for token: \".concat(p4));\n }\n }\n function i3(t5, r4) {\n return Array.isArray(t5) ? t5 : \"object\" == typeof t5 ? t5.value : (0, o5.default)(r4, t5);\n }\n function u2(t5) {\n return !!Array.isArray(t5) && ((\"lowercase\" === t5[0] || \"length\" === t5[0] || \"typeof\" === t5[0]) && 2 === t5.length || (\"contains\" === t5[0] || \"match\" === t5[0]) && 3 === t5.length);\n }\n function a3(t5) {\n for (var r4 = { star: false, chunk: \"\", pattern: \"\" }; t5.length > 0 && \"*\" === t5[0]; )\n t5 = t5.slice(1), r4.star = true;\n var e4, n3 = false;\n t:\n for (e4 = 0; e4 < t5.length; e4++)\n switch (t5[e4]) {\n case \"\\\\\":\n e4 + 1 < t5.length && e4++;\n break;\n case \"[\":\n n3 = true;\n break;\n case \"]\":\n n3 = false;\n break;\n case \"*\":\n if (!n3)\n break t;\n }\n return r4.chunk = t5.slice(0, e4), r4.pattern = t5.slice(e4), r4;\n }\n function c4(t5, r4) {\n for (var e4, n3, o6 = { t: \"\", ok: false, err: false }; t5.length > 0; ) {\n if (0 === r4.length)\n return o6;\n switch (t5[0]) {\n case \"[\":\n var s5 = r4[0];\n r4 = r4.slice(1);\n var i4 = true;\n (t5 = t5.slice(1)).length > 0 && \"^\" === t5[0] && (i4 = false, t5 = t5.slice(1));\n for (var u3 = false, a4 = 0; ; ) {\n if (t5.length > 0 && \"]\" === t5[0] && a4 > 0) {\n t5 = t5.slice(1);\n break;\n }\n var c5, p4 = \"\";\n if (c5 = (e4 = f6(t5)).char, t5 = e4.newChunk, e4.err)\n return o6;\n if (p4 = c5, \"-\" === t5[0] && (p4 = (n3 = f6(t5.slice(1))).char, t5 = n3.newChunk, n3.err))\n return o6;\n c5 <= s5 && s5 <= p4 && (u3 = true), a4++;\n }\n if (u3 !== i4)\n return o6;\n break;\n case \"?\":\n r4 = r4.slice(1), t5 = t5.slice(1);\n break;\n case \"\\\\\":\n if (0 === (t5 = t5.slice(1)).length)\n return o6.err = true, o6;\n default:\n if (t5[0] !== r4[0])\n return o6;\n r4 = r4.slice(1), t5 = t5.slice(1);\n }\n }\n return o6.t = r4, o6.ok = true, o6.err = false, o6;\n }\n function f6(t5) {\n var r4 = { char: \"\", newChunk: \"\", err: false };\n return 0 === t5.length || \"-\" === t5[0] || \"]\" === t5[0] || \"\\\\\" === t5[0] && 0 === (t5 = t5.slice(1)).length ? (r4.err = true, r4) : (r4.char = t5[0], r4.newChunk = t5.slice(1), 0 === r4.newChunk.length && (r4.err = true), r4);\n }\n r3.default = function(t5, r4) {\n if (!r4)\n throw new Error(\"No matcher supplied!\");\n switch (r4.type) {\n case \"all\":\n return true;\n case \"fql\":\n return function(t6, r5) {\n if (!t6)\n return false;\n try {\n t6 = JSON.parse(t6);\n } catch (r6) {\n throw new Error('Failed to JSON.parse FQL intermediate representation \"'.concat(t6, '\": ').concat(r6));\n }\n var e4 = s4(t6, r5);\n return \"boolean\" == typeof e4 && e4;\n }(r4.ir, t5);\n default:\n throw new Error(\"Matcher of type \".concat(r4.type, \" unsupported.\"));\n }\n };\n }, 1444: function(t4, r3) {\n \"use strict\";\n Object.defineProperty(r3, \"__esModule\", { value: true });\n var e3 = function() {\n function t5(t6) {\n this.rules = [], this.rules = t6 || [];\n }\n return t5.prototype.getRulesByDestinationName = function(t6) {\n for (var r4 = [], e4 = 0, n2 = this.rules; e4 < n2.length; e4++) {\n var o5 = n2[e4];\n o5.destinationName !== t6 && void 0 !== o5.destinationName || r4.push(o5);\n }\n return r4;\n }, t5;\n }();\n r3.default = e3;\n }, 4303: function(t4, r3, e3) {\n \"use strict\";\n var n2 = this && this.__importDefault || function(t5) {\n return t5 && t5.__esModule ? t5 : { default: t5 };\n };\n Object.defineProperty(r3, \"__esModule\", { value: true });\n var o5 = n2(e3(374)), s4 = n2(e3(7843)), i3 = n2(e3(5500)), u2 = e3(9014), a3 = e3(4966);\n function c4(t5, r4) {\n p4(t5, r4.drop, function(t6, r5) {\n r5.forEach(function(r6) {\n return delete t6[r6];\n });\n });\n }\n function f6(t5, r4) {\n p4(t5, r4.allow, function(t6, r5) {\n Object.keys(t6).forEach(function(e4) {\n r5.includes(e4) || delete t6[e4];\n });\n });\n }\n function p4(t5, r4, e4) {\n Object.entries(r4).forEach(function(r5) {\n var n3 = r5[0], o6 = r5[1], i4 = function(t6) {\n \"object\" == typeof t6 && null !== t6 && e4(t6, o6);\n }, u3 = \"\" === n3 ? t5 : (0, s4.default)(t5, n3);\n Array.isArray(u3) ? u3.forEach(i4) : i4(u3);\n });\n }\n function l6(t5, r4) {\n var e4 = JSON.parse(JSON.stringify(t5));\n for (var n3 in r4.map)\n if (r4.map.hasOwnProperty(n3)) {\n var o6 = r4.map[n3], i4 = n3.split(\".\"), c5 = void 0;\n if (i4.length > 1 ? (i4.pop(), c5 = (0, s4.default)(e4, i4.join(\".\"))) : c5 = t5, \"object\" == typeof c5) {\n if (o6.copy) {\n var f7 = (0, s4.default)(e4, o6.copy);\n void 0 !== f7 && (0, u2.dset)(t5, n3, f7);\n } else if (o6.move) {\n var p5 = (0, s4.default)(e4, o6.move);\n void 0 !== p5 && (0, u2.dset)(t5, n3, p5), (0, a3.unset)(t5, o6.move);\n } else\n o6.hasOwnProperty(\"set\") && (0, u2.dset)(t5, n3, o6.set);\n if (o6.to_string) {\n var l7 = (0, s4.default)(t5, n3);\n if (\"string\" == typeof l7 || \"object\" == typeof l7 && null !== l7)\n continue;\n void 0 !== l7 ? (0, u2.dset)(t5, n3, JSON.stringify(l7)) : (0, u2.dset)(t5, n3, \"undefined\");\n }\n }\n }\n }\n function v2(t5, r4) {\n return !(r4.sample.percent <= 0) && (r4.sample.percent >= 1 || (r4.sample.path ? function(t6, r5) {\n var e5 = (0, s4.default)(t6, r5.sample.path), n3 = (0, o5.default)(JSON.stringify(e5)), u3 = -64, a4 = [];\n y6(n3.slice(0, 8), a4);\n for (var c5 = 0, f7 = 0; f7 < 64 && 1 !== a4[f7]; f7++)\n c5++;\n if (0 !== c5) {\n var p5 = [];\n y6(n3.slice(9, 16), p5), u3 -= c5, a4.splice(0, c5), p5.splice(64 - c5), a4 = a4.concat(p5);\n }\n return a4[63] = 0 === a4[63] ? 1 : 0, (0, i3.default)(parseInt(a4.join(\"\"), 2), u3) < r5.sample.percent;\n }(t5, r4) : (e4 = r4.sample.percent, Math.random() <= e4)));\n var e4;\n }\n function y6(t5, r4) {\n for (var e4 = 0; e4 < 8; e4++)\n for (var n3 = t5[e4], o6 = 128; o6 >= 1; o6 /= 2)\n n3 - o6 >= 0 ? (n3 -= o6, r4.push(1)) : r4.push(0);\n }\n r3.default = function(t5, r4) {\n for (var e4 = t5, n3 = 0, o6 = r4; n3 < o6.length; n3++) {\n var s5 = o6[n3];\n switch (s5.type) {\n case \"drop\":\n return null;\n case \"drop_properties\":\n c4(e4, s5.config);\n break;\n case \"allow_properties\":\n f6(e4, s5.config);\n break;\n case \"sample_event\":\n if (v2(e4, s5.config))\n break;\n return null;\n case \"map_properties\":\n l6(e4, s5.config);\n break;\n case \"hash_properties\":\n break;\n default:\n throw new Error('Transformer of type \"'.concat(s5.type, '\" is unsupported.'));\n }\n }\n return e4;\n };\n }, 4966: function(t4, r3, e3) {\n \"use strict\";\n var n2 = this && this.__importDefault || function(t5) {\n return t5 && t5.__esModule ? t5 : { default: t5 };\n };\n Object.defineProperty(r3, \"__esModule\", { value: true }), r3.unset = void 0;\n var o5 = n2(e3(7843));\n r3.unset = function(t5, r4) {\n if ((0, o5.default)(t5, r4)) {\n for (var e4 = r4.split(\".\"), n3 = e4.pop(); e4.length && \"\\\\\" === e4[e4.length - 1].slice(-1); )\n n3 = e4.pop().slice(0, -1) + \".\" + n3;\n for (; e4.length; )\n t5 = t5[r4 = e4.shift()];\n return delete t5[n3];\n }\n return true;\n };\n }, 9014: function(t4, r3) {\n r3.dset = function(t5, r4, e3) {\n r4.split && (r4 = r4.split(\".\"));\n for (var n2, o5, s4 = 0, i3 = r4.length, u2 = t5; s4 < i3 && \"__proto__\" !== (o5 = r4[s4++]) && \"constructor\" !== o5 && \"prototype\" !== o5; )\n u2 = u2[o5] = s4 === i3 ? e3 : typeof (n2 = u2[o5]) == typeof r4 ? n2 : 0 * r4[s4] != 0 || ~(\"\" + r4[s4]).indexOf(\".\") ? {} : [];\n };\n }, 3304: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Float64Array ? Float64Array : void 0;\n t4.exports = r3;\n }, 7382: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(5569), s4 = e3(3304), i3 = e3(8482);\n n2 = o5() ? s4 : i3, t4.exports = n2;\n }, 8482: function(t4) {\n \"use strict\";\n t4.exports = function() {\n throw new Error(\"not implemented\");\n };\n }, 6322: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(2508), s4 = e3(5679), i3 = e3(882);\n n2 = o5() ? s4 : i3, t4.exports = n2;\n }, 882: function(t4) {\n \"use strict\";\n t4.exports = function() {\n throw new Error(\"not implemented\");\n };\n }, 5679: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint16Array ? Uint16Array : void 0;\n t4.exports = r3;\n }, 4773: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(9773), s4 = e3(3004), i3 = e3(3078);\n n2 = o5() ? s4 : i3, t4.exports = n2;\n }, 3078: function(t4) {\n \"use strict\";\n t4.exports = function() {\n throw new Error(\"not implemented\");\n };\n }, 3004: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint32Array ? Uint32Array : void 0;\n t4.exports = r3;\n }, 7980: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(8114), s4 = e3(6737), i3 = e3(3357);\n n2 = o5() ? s4 : i3, t4.exports = n2;\n }, 3357: function(t4) {\n \"use strict\";\n t4.exports = function() {\n throw new Error(\"not implemented\");\n };\n }, 6737: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint8Array ? Uint8Array : void 0;\n t4.exports = r3;\n }, 2684: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Float64Array ? Float64Array : null;\n t4.exports = r3;\n }, 5569: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(3876);\n t4.exports = n2;\n }, 3876: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(1448), o5 = e3(2684);\n t4.exports = function() {\n var t5, r4;\n if (\"function\" != typeof o5)\n return false;\n try {\n r4 = new o5([1, 3.14, -3.14, NaN]), t5 = n2(r4) && 1 === r4[0] && 3.14 === r4[1] && -3.14 === r4[2] && r4[3] != r4[3];\n } catch (r5) {\n t5 = false;\n }\n return t5;\n };\n }, 9048: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(3763);\n t4.exports = n2;\n }, 3763: function(t4) {\n \"use strict\";\n var r3 = Object.prototype.hasOwnProperty;\n t4.exports = function(t5, e3) {\n return null != t5 && r3.call(t5, e3);\n };\n }, 7009: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6784);\n t4.exports = n2;\n }, 6784: function(t4) {\n \"use strict\";\n t4.exports = function() {\n return \"function\" == typeof Symbol && \"symbol\" == typeof Symbol(\"foo\");\n };\n }, 3123: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(8481);\n t4.exports = n2;\n }, 8481: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7009)();\n t4.exports = function() {\n return n2 && \"symbol\" == typeof Symbol.toStringTag;\n };\n }, 2508: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(3403);\n t4.exports = n2;\n }, 3403: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(768), o5 = e3(9668), s4 = e3(187);\n t4.exports = function() {\n var t5, r4;\n if (\"function\" != typeof s4)\n return false;\n try {\n r4 = new s4(r4 = [1, 3.14, -3.14, o5 + 1, o5 + 2]), t5 = n2(r4) && 1 === r4[0] && 3 === r4[1] && r4[2] === o5 - 2 && 0 === r4[3] && 1 === r4[4];\n } catch (r5) {\n t5 = false;\n }\n return t5;\n };\n }, 187: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint16Array ? Uint16Array : null;\n t4.exports = r3;\n }, 9773: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(2822);\n t4.exports = n2;\n }, 2822: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(2744), o5 = e3(3899), s4 = e3(746);\n t4.exports = function() {\n var t5, r4;\n if (\"function\" != typeof s4)\n return false;\n try {\n r4 = new s4(r4 = [1, 3.14, -3.14, o5 + 1, o5 + 2]), t5 = n2(r4) && 1 === r4[0] && 3 === r4[1] && r4[2] === o5 - 2 && 0 === r4[3] && 1 === r4[4];\n } catch (r5) {\n t5 = false;\n }\n return t5;\n };\n }, 746: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint32Array ? Uint32Array : null;\n t4.exports = r3;\n }, 8114: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(8066);\n t4.exports = n2;\n }, 8066: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(8279), o5 = e3(3443), s4 = e3(2731);\n t4.exports = function() {\n var t5, r4;\n if (\"function\" != typeof s4)\n return false;\n try {\n r4 = new s4(r4 = [1, 3.14, -3.14, o5 + 1, o5 + 2]), t5 = n2(r4) && 1 === r4[0] && 3 === r4[1] && r4[2] === o5 - 2 && 0 === r4[3] && 1 === r4[4];\n } catch (r5) {\n t5 = false;\n }\n return t5;\n };\n }, 2731: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Uint8Array ? Uint8Array : null;\n t4.exports = r3;\n }, 1448: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(1453);\n t4.exports = n2;\n }, 1453: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6208), o5 = \"function\" == typeof Float64Array;\n t4.exports = function(t5) {\n return o5 && t5 instanceof Float64Array || \"[object Float64Array]\" === n2(t5);\n };\n }, 9331: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7980), o5 = { uint16: e3(6322), uint8: n2 };\n t4.exports = o5;\n }, 5902: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4106);\n t4.exports = n2;\n }, 4106: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5, s4 = e3(9331);\n (o5 = new s4.uint16(1))[0] = 4660, n2 = 52 === new s4.uint8(o5.buffer)[0], t4.exports = n2;\n }, 768: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(3823);\n t4.exports = n2;\n }, 3823: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6208), o5 = \"function\" == typeof Uint16Array;\n t4.exports = function(t5) {\n return o5 && t5 instanceof Uint16Array || \"[object Uint16Array]\" === n2(t5);\n };\n }, 2744: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(2326);\n t4.exports = n2;\n }, 2326: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6208), o5 = \"function\" == typeof Uint32Array;\n t4.exports = function(t5) {\n return o5 && t5 instanceof Uint32Array || \"[object Uint32Array]\" === n2(t5);\n };\n }, 8279: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(208);\n t4.exports = n2;\n }, 208: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6208), o5 = \"function\" == typeof Uint8Array;\n t4.exports = function(t5) {\n return o5 && t5 instanceof Uint8Array || \"[object Uint8Array]\" === n2(t5);\n };\n }, 6315: function(t4) {\n \"use strict\";\n t4.exports = 1023;\n }, 1686: function(t4) {\n \"use strict\";\n t4.exports = 2147483647;\n }, 3105: function(t4) {\n \"use strict\";\n t4.exports = 2146435072;\n }, 3449: function(t4) {\n \"use strict\";\n t4.exports = 2147483648;\n }, 6988: function(t4) {\n \"use strict\";\n t4.exports = -1023;\n }, 9777: function(t4) {\n \"use strict\";\n t4.exports = 1023;\n }, 3690: function(t4) {\n \"use strict\";\n t4.exports = -1074;\n }, 2918: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4772).NEGATIVE_INFINITY;\n t4.exports = n2;\n }, 4165: function(t4) {\n \"use strict\";\n var r3 = Number.POSITIVE_INFINITY;\n t4.exports = r3;\n }, 6488: function(t4) {\n \"use strict\";\n t4.exports = 22250738585072014e-324;\n }, 9668: function(t4) {\n \"use strict\";\n t4.exports = 65535;\n }, 3899: function(t4) {\n \"use strict\";\n t4.exports = 4294967295;\n }, 3443: function(t4) {\n \"use strict\";\n t4.exports = 255;\n }, 7011: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(812);\n t4.exports = n2;\n }, 812: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4165), o5 = e3(2918);\n t4.exports = function(t5) {\n return t5 === n2 || t5 === o5;\n };\n }, 1883: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(1797);\n t4.exports = n2;\n }, 1797: function(t4) {\n \"use strict\";\n t4.exports = function(t5) {\n return t5 != t5;\n };\n }, 513: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(5760);\n t4.exports = n2;\n }, 5760: function(t4) {\n \"use strict\";\n t4.exports = function(t5) {\n return Math.abs(t5);\n };\n }, 5848: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(677);\n t4.exports = n2;\n }, 677: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(3449), o5 = e3(1686), s4 = e3(7838), i3 = e3(1921), u2 = e3(2490), a3 = [0, 0];\n t4.exports = function(t5, r4) {\n var e4, c4;\n return s4.assign(t5, a3, 1, 0), e4 = a3[0], e4 &= o5, c4 = i3(r4), u2(e4 |= c4 &= n2, a3[1]);\n };\n }, 5500: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(8397);\n t4.exports = n2;\n }, 8397: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4165), o5 = e3(2918), s4 = e3(6315), i3 = e3(9777), u2 = e3(6988), a3 = e3(3690), c4 = e3(1883), f6 = e3(7011), p4 = e3(5848), l6 = e3(4948), v2 = e3(8478), y6 = e3(7838), d5 = e3(2490), h4 = [0, 0], x4 = [0, 0];\n t4.exports = function(t5, r4) {\n var e4, b4;\n return 0 === t5 || c4(t5) || f6(t5) ? t5 : (l6(h4, t5), r4 += h4[1], (r4 += v2(t5 = h4[0])) < a3 ? p4(0, t5) : r4 > i3 ? t5 < 0 ? o5 : n2 : (r4 <= u2 ? (r4 += 52, b4 = 2220446049250313e-31) : b4 = 1, y6(x4, t5), e4 = x4[0], e4 &= 2148532223, b4 * d5(e4 |= r4 + s4 << 20, x4[1])));\n };\n }, 4772: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7548);\n t4.exports = n2;\n }, 7548: function(t4) {\n \"use strict\";\n t4.exports = Number;\n }, 8478: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4500);\n t4.exports = n2;\n }, 4500: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(1921), o5 = e3(3105), s4 = e3(6315);\n t4.exports = function(t5) {\n var r4 = n2(t5);\n return (r4 = (r4 & o5) >>> 20) - s4 | 0;\n };\n }, 2490: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(9639);\n t4.exports = n2;\n }, 4445: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5, s4;\n true === e3(5902) ? (o5 = 1, s4 = 0) : (o5 = 0, s4 = 1), n2 = { HIGH: o5, LOW: s4 }, t4.exports = n2;\n }, 9639: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4773), o5 = e3(7382), s4 = e3(4445), i3 = new o5(1), u2 = new n2(i3.buffer), a3 = s4.HIGH, c4 = s4.LOW;\n t4.exports = function(t5, r4) {\n return u2[a3] = t5, u2[c4] = r4, i3[0];\n };\n }, 5646: function(t4, r3, e3) {\n \"use strict\";\n var n2;\n n2 = true === e3(5902) ? 1 : 0, t4.exports = n2;\n }, 1921: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6285);\n t4.exports = n2;\n }, 6285: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4773), o5 = e3(7382), s4 = e3(5646), i3 = new o5(1), u2 = new n2(i3.buffer);\n t4.exports = function(t5) {\n return i3[0] = t5, u2[s4];\n };\n }, 9024: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6488), o5 = e3(7011), s4 = e3(1883), i3 = e3(513);\n t4.exports = function(t5, r4, e4, u2) {\n return s4(t5) || o5(t5) ? (r4[u2] = t5, r4[u2 + e4] = 0, r4) : 0 !== t5 && i3(t5) < n2 ? (r4[u2] = 4503599627370496 * t5, r4[u2 + e4] = -52, r4) : (r4[u2] = t5, r4[u2 + e4] = 0, r4);\n };\n }, 4948: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7576), o5 = e3(9422);\n n2(o5, \"assign\", e3(9024)), t4.exports = o5;\n }, 9422: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(9024);\n t4.exports = function(t5) {\n return n2(t5, [0, 0], 1, 0);\n };\n }, 5239: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(4773), o5 = e3(7382), s4 = e3(5782), i3 = new o5(1), u2 = new n2(i3.buffer), a3 = s4.HIGH, c4 = s4.LOW;\n t4.exports = function(t5, r4, e4, n3) {\n return i3[0] = t5, r4[n3] = u2[a3], r4[n3 + e4] = u2[c4], r4;\n };\n }, 7838: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7576), o5 = e3(4010);\n n2(o5, \"assign\", e3(5239)), t4.exports = o5;\n }, 5782: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5, s4;\n true === e3(5902) ? (o5 = 1, s4 = 0) : (o5 = 0, s4 = 1), n2 = { HIGH: o5, LOW: s4 }, t4.exports = n2;\n }, 4010: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(5239);\n t4.exports = function(t5) {\n return n2(t5, [0, 0], 1, 0);\n };\n }, 7576: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(7063);\n t4.exports = n2;\n }, 7063: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(6691);\n t4.exports = function(t5, r4, e4) {\n n2(t5, r4, { configurable: false, enumerable: false, writable: false, value: e4 });\n };\n }, 2073: function(t4) {\n \"use strict\";\n var r3 = Object.defineProperty;\n t4.exports = r3;\n }, 1680: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Object.defineProperty ? Object.defineProperty : null;\n t4.exports = r3;\n }, 1471: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(1680);\n t4.exports = function() {\n try {\n return n2({}, \"x\", {}), true;\n } catch (t5) {\n return false;\n }\n };\n }, 6691: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(1471), s4 = e3(2073), i3 = e3(1309);\n n2 = o5() ? s4 : i3, t4.exports = n2;\n }, 1309: function(t4) {\n \"use strict\";\n var r3 = Object.prototype, e3 = r3.toString, n2 = r3.__defineGetter__, o5 = r3.__defineSetter__, s4 = r3.__lookupGetter__, i3 = r3.__lookupSetter__;\n t4.exports = function(t5, u2, a3) {\n var c4, f6, p4, l6;\n if (\"object\" != typeof t5 || null === t5 || \"[object Array]\" === e3.call(t5))\n throw new TypeError(\"invalid argument. First argument must be an object. Value: `\" + t5 + \"`.\");\n if (\"object\" != typeof a3 || null === a3 || \"[object Array]\" === e3.call(a3))\n throw new TypeError(\"invalid argument. Property descriptor must be an object. Value: `\" + a3 + \"`.\");\n if ((f6 = \"value\" in a3) && (s4.call(t5, u2) || i3.call(t5, u2) ? (c4 = t5.__proto__, t5.__proto__ = r3, delete t5[u2], t5[u2] = a3.value, t5.__proto__ = c4) : t5[u2] = a3.value), p4 = \"get\" in a3, l6 = \"set\" in a3, f6 && (p4 || l6))\n throw new Error(\"invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.\");\n return p4 && n2 && n2.call(t5, u2, a3.get), l6 && o5 && o5.call(t5, u2, a3.set), t5;\n };\n }, 6208: function(t4, r3, e3) {\n \"use strict\";\n var n2, o5 = e3(3123), s4 = e3(7407), i3 = e3(4210);\n n2 = o5() ? i3 : s4, t4.exports = n2;\n }, 7407: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(173);\n t4.exports = function(t5) {\n return n2.call(t5);\n };\n }, 4210: function(t4, r3, e3) {\n \"use strict\";\n var n2 = e3(9048), o5 = e3(1403), s4 = e3(173);\n t4.exports = function(t5) {\n var r4, e4, i3;\n if (null == t5)\n return s4.call(t5);\n e4 = t5[o5], r4 = n2(t5, o5);\n try {\n t5[o5] = void 0;\n } catch (r5) {\n return s4.call(t5);\n }\n return i3 = s4.call(t5), r4 ? t5[o5] = e4 : delete t5[o5], i3;\n };\n }, 173: function(t4) {\n \"use strict\";\n var r3 = Object.prototype.toString;\n t4.exports = r3;\n }, 1403: function(t4) {\n \"use strict\";\n var r3 = \"function\" == typeof Symbol ? Symbol.toStringTag : \"\";\n t4.exports = r3;\n }, 7843: function(t4) {\n t4.exports = function(t5, r3, e3, n2, o5) {\n for (r3 = r3.split ? r3.split(\".\") : r3, n2 = 0; n2 < r3.length; n2++)\n t5 = t5 ? t5[r3[n2]] : o5;\n return t5 === o5 ? e3 : t5;\n };\n }, 374: function(t4, r3, e3) {\n \"use strict\";\n e3.r(r3), e3.d(r3, { default: function() {\n return s4;\n } });\n for (var n2 = [], o5 = 0; o5 < 64; )\n n2[o5] = 0 | 4294967296 * Math.sin(++o5 % Math.PI);\n function s4(t5) {\n var r4, e4, s5, i3 = [r4 = 1732584193, e4 = 4023233417, ~r4, ~e4], u2 = [], a3 = unescape(encodeURI(t5)) + \"\\x80\", c4 = a3.length;\n for (t5 = --c4 / 4 + 2 | 15, u2[--t5] = 8 * c4; ~c4; )\n u2[c4 >> 2] |= a3.charCodeAt(c4) << 8 * c4--;\n for (o5 = a3 = 0; o5 < t5; o5 += 16) {\n for (c4 = i3; a3 < 64; c4 = [s5 = c4[3], r4 + ((s5 = c4[0] + [r4 & e4 | ~r4 & s5, s5 & r4 | ~s5 & e4, r4 ^ e4 ^ s5, e4 ^ (r4 | ~s5)][c4 = a3 >> 4] + n2[a3] + ~~u2[o5 | 15 & [a3, 5 * a3 + 1, 3 * a3 + 5, 7 * a3][c4]]) << (c4 = [7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21][4 * c4 + a3++ % 4]) | s5 >>> -c4), r4, e4])\n r4 = 0 | c4[1], e4 = c4[2];\n for (a3 = 4; a3; )\n i3[--a3] += c4[a3];\n }\n for (t5 = \"\"; a3 < 32; )\n t5 += (i3[a3 >> 3] >> 4 * (1 ^ a3++) & 15).toString(16);\n return t5;\n }\n } }, r2 = {};\n function e2(n2) {\n var o5 = r2[n2];\n if (void 0 !== o5)\n return o5.exports;\n var s4 = r2[n2] = { exports: {} };\n return t3[n2].call(s4.exports, s4, s4.exports, e2), s4.exports;\n }\n return e2.d = function(t4, r3) {\n for (var n2 in r3)\n e2.o(r3, n2) && !e2.o(t4, n2) && Object.defineProperty(t4, n2, { enumerable: true, get: r3[n2] });\n }, e2.o = function(t4, r3) {\n return Object.prototype.hasOwnProperty.call(t4, r3);\n }, e2.r = function(t4) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t4, Symbol.toStringTag, { value: \"Module\" }), Object.defineProperty(t4, \"__esModule\", { value: true });\n }, e2(2870);\n }();\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/routing-middleware/index.js\n var routing_middleware_exports = {};\n __export(routing_middleware_exports, {\n tsubMiddleware: () => tsubMiddleware\n });\n var tsub, tsubMiddleware;\n var init_routing_middleware = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/routing-middleware/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n tsub = __toESM(require_tsub());\n tsubMiddleware = function(rules) {\n return function(_a2) {\n var payload = _a2.payload, integration = _a2.integration, next = _a2.next;\n var store = new tsub.Store(rules);\n var rulesToApply = store.getRulesByDestinationName(integration);\n rulesToApply.forEach(function(rule) {\n var matchers = rule.matchers, transformers = rule.transformers;\n for (var i3 = 0; i3 < matchers.length; i3++) {\n if (tsub.matches(payload.obj, matchers[i3])) {\n payload.obj = tsub.transform(payload.obj, transformers[i3]);\n if (payload.obj === null) {\n return next(null);\n }\n }\n }\n });\n next(payload);\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js\n function isPlanEventEnabled(plan, planEvent) {\n var _a2, _b2;\n if (typeof (planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) === \"boolean\") {\n return planEvent.enabled;\n }\n return (_b2 = (_a2 = plan === null || plan === void 0 ? void 0 : plan.__default) === null || _a2 === void 0 ? void 0 : _a2.enabled) !== null && _b2 !== void 0 ? _b2 : true;\n }\n var init_is_plan_event_enabled = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js\n function normalizeName(name) {\n return name.toLowerCase().replace(\".\", \"\").replace(/\\s+/g, \"-\");\n }\n function obfuscatePathName(pathName, obfuscate) {\n if (obfuscate === void 0) {\n obfuscate = false;\n }\n return obfuscate ? btoa(pathName).replace(/=/g, \"\") : void 0;\n }\n function resolveIntegrationNameFromSource(integrationSource) {\n return (\"Integration\" in integrationSource ? integrationSource.Integration : integrationSource).prototype.name;\n }\n function recordLoadMetrics(fullPath, ctx, name) {\n var _a2, _b2;\n try {\n var metric = ((_b2 = (_a2 = window === null || window === void 0 ? void 0 : window.performance) === null || _a2 === void 0 ? void 0 : _a2.getEntriesByName(fullPath, \"resource\")) !== null && _b2 !== void 0 ? _b2 : [])[0];\n metric && ctx.stats.gauge(\"legacy_destination_time\", Math.round(metric.duration), __spreadArray([\n name\n ], metric.duration < 100 ? [\"cached\"] : [], true));\n } catch (_2) {\n }\n }\n function buildIntegration(integrationSource, integrationSettings, analyticsInstance) {\n var integrationCtr;\n if (\"Integration\" in integrationSource) {\n var analyticsStub = {\n user: function() {\n return analyticsInstance.user();\n },\n addIntegration: function() {\n }\n };\n integrationSource(analyticsStub);\n integrationCtr = integrationSource.Integration;\n } else {\n integrationCtr = integrationSource;\n }\n var integration = new integrationCtr(integrationSettings);\n integration.analytics = analyticsInstance;\n return integration;\n }\n function loadIntegration(ctx, name, version8, obfuscate) {\n return __awaiter(this, void 0, void 0, function() {\n var pathName, obfuscatedPathName, path, fullPath, err_1, deps;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n pathName = normalizeName(name);\n obfuscatedPathName = obfuscatePathName(pathName, obfuscate);\n path = getNextIntegrationsURL();\n fullPath = \"\".concat(path, \"/integrations/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \"/\").concat(version8, \"/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \".dynamic.js.gz\");\n _a2.label = 1;\n case 1:\n _a2.trys.push([1, 3, , 4]);\n return [4, loadScript(fullPath)];\n case 2:\n _a2.sent();\n recordLoadMetrics(fullPath, ctx, name);\n return [3, 4];\n case 3:\n err_1 = _a2.sent();\n ctx.stats.gauge(\"legacy_destination_time\", -1, [\"plugin:\".concat(name), \"failed\"]);\n throw err_1;\n case 4:\n deps = window[\"\".concat(pathName, \"Deps\")];\n return [\n 4,\n Promise.all(deps.map(function(dep) {\n return loadScript(path + dep + \".gz\");\n }))\n // @ts-ignore\n ];\n case 5:\n _a2.sent();\n window[\"\".concat(pathName, \"Loader\")]();\n return [2, window[\n // @ts-ignore\n \"\".concat(pathName, \"Integration\")\n ]];\n }\n });\n });\n }\n function unloadIntegration(name, version8, obfuscate) {\n return __awaiter(this, void 0, void 0, function() {\n var path, pathName, obfuscatedPathName, fullPath;\n return __generator(this, function(_a2) {\n path = getNextIntegrationsURL();\n pathName = normalizeName(name);\n obfuscatedPathName = obfuscatePathName(name, obfuscate);\n fullPath = \"\".concat(path, \"/integrations/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \"/\").concat(version8, \"/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \".dynamic.js.gz\");\n return [2, unloadScript(fullPath)];\n });\n });\n }\n function resolveVersion(integrationConfig) {\n var _a2, _b2, _c, _d;\n return (_d = (_b2 = (_a2 = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.versionSettings) === null || _a2 === void 0 ? void 0 : _a2.override) !== null && _b2 !== void 0 ? _b2 : (_c = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.versionSettings) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : \"latest\";\n }\n var init_loader = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_parse_cdn();\n init_load_script();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js\n var isInstallableIntegration, isDisabledIntegration;\n var init_utils13 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n isInstallableIntegration = function(name, integrationSettings) {\n var _a2;\n var type = integrationSettings.type, bundlingStatus = integrationSettings.bundlingStatus, versionSettings = integrationSettings.versionSettings;\n var deviceMode = bundlingStatus !== \"unbundled\" && (type === \"browser\" || ((_a2 = versionSettings === null || versionSettings === void 0 ? void 0 : versionSettings.componentTypes) === null || _a2 === void 0 ? void 0 : _a2.includes(\"browser\")));\n return !name.startsWith(\"Segment\") && name !== \"Iterable\" && deviceMode;\n };\n isDisabledIntegration = function(integrationName, globalIntegrations) {\n var allDisableAndNotDefined = globalIntegrations.All === false && globalIntegrations[integrationName] === void 0;\n return globalIntegrations[integrationName] === false || allDisableAndNotDefined;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js\n var ajs_destination_exports = {};\n __export(ajs_destination_exports, {\n LegacyDestination: () => LegacyDestination,\n ajsDestinations: () => ajsDestinations\n });\n function flushQueue2(xt, queue2) {\n return __awaiter(this, void 0, void 0, function() {\n var failedQueue;\n var _this = this;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n failedQueue = [];\n if (isOffline()) {\n return [2, queue2];\n }\n return [\n 4,\n pWhile(function() {\n return queue2.length > 0 && isOnline();\n }, function() {\n return __awaiter(_this, void 0, void 0, function() {\n var ctx, result, success;\n return __generator(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n ctx = queue2.pop();\n if (!ctx) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, attempt(ctx, xt)];\n case 1:\n result = _a3.sent();\n success = result instanceof Context;\n if (!success) {\n failedQueue.push(ctx);\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n })\n // re-add failed tasks\n ];\n case 1:\n _a2.sent();\n failedQueue.map(function(failed) {\n return queue2.pushWithBackoff(failed);\n });\n return [2, queue2];\n }\n });\n });\n }\n function ajsDestinations(writeKey, settings, globalIntegrations, options, routingMiddleware, legacyIntegrationSources) {\n var _a2, _b2;\n if (globalIntegrations === void 0) {\n globalIntegrations = {};\n }\n if (options === void 0) {\n options = {};\n }\n if (isServer()) {\n return [];\n }\n if (settings.plan) {\n options = options !== null && options !== void 0 ? options : {};\n options.plan = settings.plan;\n }\n var routingRules = (_b2 = (_a2 = settings.middlewareSettings) === null || _a2 === void 0 ? void 0 : _a2.routingRules) !== null && _b2 !== void 0 ? _b2 : [];\n var remoteIntegrationsConfig = settings.integrations;\n var localIntegrationsConfig = options.integrations;\n var integrationOptions = mergedOptions(settings, options !== null && options !== void 0 ? options : {});\n var adhocIntegrationSources = legacyIntegrationSources === null || legacyIntegrationSources === void 0 ? void 0 : legacyIntegrationSources.reduce(function(acc, integrationSource) {\n var _a3;\n return __assign(__assign({}, acc), (_a3 = {}, _a3[resolveIntegrationNameFromSource(integrationSource)] = integrationSource, _a3));\n }, {});\n var installableIntegrations = new Set(__spreadArray(__spreadArray([], Object.keys(remoteIntegrationsConfig).filter(function(name) {\n return isInstallableIntegration(name, remoteIntegrationsConfig[name]);\n }), true), Object.keys(adhocIntegrationSources || {}).filter(function(name) {\n return isPlainObject2(remoteIntegrationsConfig[name]) || isPlainObject2(localIntegrationsConfig === null || localIntegrationsConfig === void 0 ? void 0 : localIntegrationsConfig[name]);\n }), true));\n return Array.from(installableIntegrations).filter(function(name) {\n return !isDisabledIntegration(name, globalIntegrations);\n }).map(function(name) {\n var integrationSettings = remoteIntegrationsConfig[name];\n var version8 = resolveVersion(integrationSettings);\n var destination = new LegacyDestination(name, version8, writeKey, integrationOptions[name], options, adhocIntegrationSources === null || adhocIntegrationSources === void 0 ? void 0 : adhocIntegrationSources[name]);\n var routing = routingRules.filter(function(rule) {\n return rule.destinationName === name;\n });\n if (routing.length > 0 && routingMiddleware) {\n destination.addMiddleware(routingMiddleware);\n }\n return destination;\n });\n }\n var import_facade2, LegacyDestination;\n var init_ajs_destination = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n import_facade2 = __toESM(require_dist2());\n init_connection();\n init_context2();\n init_environment();\n init_esm9();\n init_is_plan_event_enabled();\n init_merged_options();\n init_p_while();\n init_priority_queue2();\n init_persisted();\n init_middleware();\n init_loader();\n init_esm9();\n init_utils13();\n init_metric_helpers();\n init_esm8();\n LegacyDestination = /** @class */\n function() {\n function LegacyDestination2(name, version8, writeKey, settings, options, integrationSource) {\n if (settings === void 0) {\n settings = {};\n }\n var _this = this;\n this.options = {};\n this.type = \"destination\";\n this.middleware = [];\n this.initializePromise = createDeferred();\n this.flushing = false;\n this.name = name;\n this.version = version8;\n this.settings = __assign({}, settings);\n this.disableAutoISOConversion = options.disableAutoISOConversion || false;\n this.integrationSource = integrationSource;\n if (this.settings[\"type\"] && this.settings[\"type\"] === \"browser\") {\n delete this.settings[\"type\"];\n }\n this.initializePromise.promise.then(function(isInitialized) {\n return _this._initialized = isInitialized;\n }, function() {\n });\n this.options = options;\n this.buffer = options.disableClientPersistence ? new PriorityQueue(4, []) : new PersistedPriorityQueue(4, \"\".concat(writeKey, \":dest-\").concat(name));\n this.scheduleFlush();\n }\n LegacyDestination2.prototype.isLoaded = function() {\n return !!this._ready;\n };\n LegacyDestination2.prototype.ready = function() {\n var _this = this;\n return this.initializePromise.promise.then(function() {\n var _a2;\n return (_a2 = _this.onReady) !== null && _a2 !== void 0 ? _a2 : Promise.resolve();\n });\n };\n LegacyDestination2.prototype.load = function(ctx, analyticsInstance) {\n var _a2;\n return __awaiter(this, void 0, void 0, function() {\n var integrationSource, _b2;\n var _this = this;\n return __generator(this, function(_c) {\n switch (_c.label) {\n case 0:\n if (this._ready || this.onReady !== void 0) {\n return [\n 2\n /*return*/\n ];\n }\n if (!((_a2 = this.integrationSource) !== null && _a2 !== void 0))\n return [3, 1];\n _b2 = _a2;\n return [3, 3];\n case 1:\n return [4, loadIntegration(ctx, this.name, this.version, this.options.obfuscate)];\n case 2:\n _b2 = _c.sent();\n _c.label = 3;\n case 3:\n integrationSource = _b2;\n this.integration = buildIntegration(integrationSource, this.settings, analyticsInstance);\n this.onReady = new Promise(function(resolve) {\n var onReadyFn = function() {\n _this._ready = true;\n resolve(true);\n };\n _this.integration.once(\"ready\", onReadyFn);\n });\n this.integration.on(\"initialize\", function() {\n _this.initializePromise.resolve(true);\n });\n try {\n recordIntegrationMetric(ctx, {\n integrationName: this.name,\n methodName: \"initialize\",\n type: \"classic\"\n });\n this.integration.initialize();\n } catch (error) {\n recordIntegrationMetric(ctx, {\n integrationName: this.name,\n methodName: \"initialize\",\n type: \"classic\",\n didError: true\n });\n this.initializePromise.resolve(false);\n throw error;\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n LegacyDestination2.prototype.unload = function(_ctx, _analyticsInstance) {\n return unloadIntegration(this.name, this.version, this.options.obfuscate);\n };\n LegacyDestination2.prototype.addMiddleware = function() {\n var _a2;\n var fn = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fn[_i] = arguments[_i];\n }\n this.middleware = (_a2 = this.middleware).concat.apply(_a2, fn);\n };\n LegacyDestination2.prototype.shouldBuffer = function(ctx) {\n return (\n // page events can't be buffered because of destinations that automatically add page views\n ctx.event.type !== \"page\" && (isOffline() || this._ready !== true || this._initialized !== true)\n );\n };\n LegacyDestination2.prototype.send = function(ctx, clz, eventType) {\n var _a2, _b2;\n return __awaiter(this, void 0, void 0, function() {\n var plan, ev, planEvent, afterMiddleware, event, err_1;\n return __generator(this, function(_c) {\n switch (_c.label) {\n case 0:\n if (this.shouldBuffer(ctx)) {\n this.buffer.push(ctx);\n this.scheduleFlush();\n return [2, ctx];\n }\n plan = (_b2 = (_a2 = this.options) === null || _a2 === void 0 ? void 0 : _a2.plan) === null || _b2 === void 0 ? void 0 : _b2.track;\n ev = ctx.event.event;\n if (plan && ev && this.name !== \"Segment.io\") {\n planEvent = plan[ev];\n if (!isPlanEventEnabled(plan, planEvent)) {\n ctx.updateEvent(\"integrations\", __assign(__assign({}, ctx.event.integrations), { All: false, \"Segment.io\": true }));\n ctx.cancel(new ContextCancelation({\n retry: false,\n reason: \"Event \".concat(ev, \" disabled for integration \").concat(this.name, \" in tracking plan\"),\n type: \"Dropped by plan\"\n }));\n } else {\n ctx.updateEvent(\"integrations\", __assign(__assign({}, ctx.event.integrations), planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations));\n }\n if ((planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) && (planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations[this.name]) === false) {\n ctx.cancel(new ContextCancelation({\n retry: false,\n reason: \"Event \".concat(ev, \" disabled for integration \").concat(this.name, \" in tracking plan\"),\n type: \"Dropped by plan\"\n }));\n }\n }\n return [4, applyDestinationMiddleware(this.name, ctx.event, this.middleware)];\n case 1:\n afterMiddleware = _c.sent();\n if (afterMiddleware === null) {\n return [2, ctx];\n }\n event = new clz(afterMiddleware, {\n traverse: !this.disableAutoISOConversion\n });\n recordIntegrationMetric(ctx, {\n integrationName: this.name,\n methodName: eventType,\n type: \"classic\"\n });\n _c.label = 2;\n case 2:\n _c.trys.push([2, 5, , 6]);\n if (!this.integration)\n return [3, 4];\n return [4, this.integration.invoke.call(this.integration, eventType, event)];\n case 3:\n _c.sent();\n _c.label = 4;\n case 4:\n return [3, 6];\n case 5:\n err_1 = _c.sent();\n recordIntegrationMetric(ctx, {\n integrationName: this.name,\n methodName: eventType,\n type: \"classic\",\n didError: true\n });\n throw err_1;\n case 6:\n return [2, ctx];\n }\n });\n });\n };\n LegacyDestination2.prototype.track = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n return [2, this.send(ctx, import_facade2.Track, \"track\")];\n });\n });\n };\n LegacyDestination2.prototype.page = function(ctx) {\n var _a2;\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n if (((_a2 = this.integration) === null || _a2 === void 0 ? void 0 : _a2._assumesPageview) && !this._initialized) {\n this.integration.initialize();\n }\n return [4, this.initializePromise.promise];\n case 1:\n _b2.sent();\n return [2, this.send(ctx, import_facade2.Page, \"page\")];\n }\n });\n });\n };\n LegacyDestination2.prototype.identify = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n return [2, this.send(ctx, import_facade2.Identify, \"identify\")];\n });\n });\n };\n LegacyDestination2.prototype.alias = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n return [2, this.send(ctx, import_facade2.Alias, \"alias\")];\n });\n });\n };\n LegacyDestination2.prototype.group = function(ctx) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n return [2, this.send(ctx, import_facade2.Group, \"group\")];\n });\n });\n };\n LegacyDestination2.prototype.scheduleFlush = function() {\n var _this = this;\n if (this.flushing) {\n return;\n }\n setTimeout(function() {\n return __awaiter(_this, void 0, void 0, function() {\n var _a2;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n if (isOffline() || this._ready !== true || this._initialized !== true) {\n this.scheduleFlush();\n return [\n 2\n /*return*/\n ];\n }\n this.flushing = true;\n _a2 = this;\n return [4, flushQueue2(this, this.buffer)];\n case 1:\n _a2.buffer = _b2.sent();\n this.flushing = false;\n if (this.buffer.todo > 0) {\n this.scheduleFlush();\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }, Math.random() * 5e3);\n };\n return LegacyDestination2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics.js-video-plugins@0.2.1/node_modules/@segment/analytics.js-video-plugins/dist/index.umd.js\n var require_index_umd = __commonJS({\n \"../../../node_modules/.pnpm/@segment+analytics.js-video-plugins@0.2.1/node_modules/@segment/analytics.js-video-plugins/dist/index.umd.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n !function(e2, t3) {\n \"object\" == typeof exports3 && \"object\" == typeof module ? module.exports = t3() : \"function\" == typeof define && define.amd ? define([], t3) : \"object\" == typeof exports3 ? exports3.analyticsVideoPlugins = t3() : e2.analyticsVideoPlugins = t3();\n }(window, function() {\n return function(e2) {\n var t3 = {};\n function a3(n2) {\n if (t3[n2])\n return t3[n2].exports;\n var i3 = t3[n2] = { i: n2, l: false, exports: {} };\n return e2[n2].call(i3.exports, i3, i3.exports, a3), i3.l = true, i3.exports;\n }\n return a3.m = e2, a3.c = t3, a3.d = function(e3, t4, n2) {\n a3.o(e3, t4) || Object.defineProperty(e3, t4, { enumerable: true, get: n2 });\n }, a3.r = function(e3) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e3, Symbol.toStringTag, { value: \"Module\" }), Object.defineProperty(e3, \"__esModule\", { value: true });\n }, a3.t = function(e3, t4) {\n if (1 & t4 && (e3 = a3(e3)), 8 & t4)\n return e3;\n if (4 & t4 && \"object\" == typeof e3 && e3 && e3.__esModule)\n return e3;\n var n2 = /* @__PURE__ */ Object.create(null);\n if (a3.r(n2), Object.defineProperty(n2, \"default\", { enumerable: true, value: e3 }), 2 & t4 && \"string\" != typeof e3)\n for (var i3 in e3)\n a3.d(n2, i3, function(t5) {\n return e3[t5];\n }.bind(null, i3));\n return n2;\n }, a3.n = function(e3) {\n var t4 = e3 && e3.__esModule ? function() {\n return e3.default;\n } : function() {\n return e3;\n };\n return a3.d(t4, \"a\", t4), t4;\n }, a3.o = function(e3, t4) {\n return Object.prototype.hasOwnProperty.call(e3, t4);\n }, a3.p = \"\", a3(a3.s = 2);\n }([function(e2, t3, a3) {\n \"use strict\";\n a3.r(t3);\n var n2 = \"function\" == typeof fetch ? fetch.bind() : function(e3, t4) {\n return t4 = t4 || {}, new Promise(function(a4, n3) {\n var i3 = new XMLHttpRequest();\n for (var r2 in i3.open(t4.method || \"get\", e3, true), t4.headers)\n i3.setRequestHeader(r2, t4.headers[r2]);\n function o5() {\n var e4, t5 = [], a5 = [], n4 = {};\n return i3.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm, function(i4, r3, o6) {\n t5.push(r3 = r3.toLowerCase()), a5.push([r3, o6]), e4 = n4[r3], n4[r3] = e4 ? e4 + \",\" + o6 : o6;\n }), { ok: 2 == (i3.status / 100 | 0), status: i3.status, statusText: i3.statusText, url: i3.responseURL, clone: o5, text: function() {\n return Promise.resolve(i3.responseText);\n }, json: function() {\n return Promise.resolve(i3.responseText).then(JSON.parse);\n }, blob: function() {\n return Promise.resolve(new Blob([i3.response]));\n }, headers: { keys: function() {\n return t5;\n }, entries: function() {\n return a5;\n }, get: function(e5) {\n return n4[e5.toLowerCase()];\n }, has: function(e5) {\n return e5.toLowerCase() in n4;\n } } };\n }\n i3.withCredentials = \"include\" == t4.credentials, i3.onload = function() {\n a4(o5());\n }, i3.onerror = n3, i3.send(t4.body);\n });\n };\n t3.default = n2;\n }, function(e2, t3, a3) {\n \"use strict\";\n Object.defineProperty(t3, \"__esModule\", { value: true });\n var n2 = /* @__PURE__ */ function() {\n function e3(e4, t4) {\n for (var a4 = 0; a4 < t4.length; a4++) {\n var n3 = t4[a4];\n n3.enumerable = n3.enumerable || false, n3.configurable = true, \"value\" in n3 && (n3.writable = true), Object.defineProperty(e4, n3.key, n3);\n }\n }\n return function(t4, a4, n3) {\n return a4 && e3(t4.prototype, a4), n3 && e3(t4, n3), t4;\n };\n }();\n var i3 = function() {\n function e3(t4, a4) {\n !function(e4, t5) {\n if (!(e4 instanceof t5))\n throw new TypeError(\"Cannot call a class as a function\");\n }(this, e3), this.pluginName = t4;\n }\n return n2(e3, [{ key: \"track\", value: function(e4, t4) {\n window.analytics.track(e4, t4, { integration: { name: this.pluginName } });\n } }]), e3;\n }();\n t3.default = i3;\n }, function(e2, t3, a3) {\n \"use strict\";\n Object.defineProperty(t3, \"__esModule\", { value: true }), t3.YouTubeAnalytics = t3.VimeoAnalytics = void 0;\n var n2 = r2(a3(3)), i3 = r2(a3(4));\n function r2(e3) {\n return e3 && e3.__esModule ? e3 : { default: e3 };\n }\n t3.VimeoAnalytics = n2.default, t3.YouTubeAnalytics = i3.default;\n }, function(e2, t3, a3) {\n \"use strict\";\n Object.defineProperty(t3, \"__esModule\", { value: true });\n var n2 = /* @__PURE__ */ function() {\n function e3(e4, t4) {\n for (var a4 = 0; a4 < t4.length; a4++) {\n var n3 = t4[a4];\n n3.enumerable = n3.enumerable || false, n3.configurable = true, \"value\" in n3 && (n3.writable = true), Object.defineProperty(e4, n3.key, n3);\n }\n }\n return function(t4, a4, n3) {\n return a4 && e3(t4.prototype, a4), n3 && e3(t4, n3), t4;\n };\n }(), i3 = r2(a3(0));\n function r2(e3) {\n return e3 && e3.__esModule ? e3 : { default: e3 };\n }\n var o5 = function(e3) {\n function t4(e4, a4) {\n !function(e5, t5) {\n if (!(e5 instanceof t5))\n throw new TypeError(\"Cannot call a class as a function\");\n }(this, t4);\n var n3 = function(e5, t5) {\n if (!e5)\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return !t5 || \"object\" != typeof t5 && \"function\" != typeof t5 ? e5 : t5;\n }(this, (t4.__proto__ || Object.getPrototypeOf(t4)).call(this, \"VimeoAnalytics\"));\n return n3.authToken = a4, n3.player = e4, n3.metadata = { content: {}, playback: { videoPlayer: \"Vimeo\" } }, n3.mostRecentHeartbeat = 0, n3.isPaused = false, n3;\n }\n return function(e4, t5) {\n if (\"function\" != typeof t5 && null !== t5)\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof t5);\n e4.prototype = Object.create(t5 && t5.prototype, { constructor: { value: e4, enumerable: false, writable: true, configurable: true } }), t5 && (Object.setPrototypeOf ? Object.setPrototypeOf(e4, t5) : e4.__proto__ = t5);\n }(t4, e3), n2(t4, [{ key: \"initialize\", value: function() {\n var e4 = this, t5 = { loaded: this.retrieveMetadata, play: this.trackPlay, pause: this.trackPause, ended: this.trackEnded, timeupdate: this.trackHeartbeat };\n for (var a4 in t5)\n this.registerHandler(a4, t5[a4]);\n this.player.getVideoId().then(function(t6) {\n e4.retrieveMetadata({ id: t6 });\n }).catch(console.error);\n } }, { key: \"registerHandler\", value: function(e4, t5) {\n var a4 = this;\n this.player.on(e4, function(e5) {\n a4.updateMetadata(e5), t5.call(a4, e5);\n });\n } }, { key: \"trackPlay\", value: function() {\n this.isPaused ? (this.track(\"Video Playback Resumed\", this.metadata.playback), this.isPaused = false) : (this.track(\"Video Playback Started\", this.metadata.playback), this.track(\"Video Content Started\", this.metadata.content));\n } }, { key: \"trackEnded\", value: function() {\n this.track(\"Video Playback Completed\", this.metadata.playback), this.track(\"Video Content Completed\", this.metadata.content);\n } }, { key: \"trackHeartbeat\", value: function() {\n var e4 = this.mostRecentHeartbeat, t5 = this.metadata.playback.position;\n t5 !== e4 && t5 - e4 >= 10 && (this.track(\"Video Content Playing\", this.metadata.content), this.mostRecentHeartbeat = Math.floor(t5));\n } }, { key: \"trackPause\", value: function() {\n this.isPaused = true, this.track(\"Video Playback Paused\", this.metadata.playback);\n } }, { key: \"retrieveMetadata\", value: function(e4) {\n var t5 = this;\n return new Promise(function(a4, n3) {\n var r3 = e4.id;\n (0, i3.default)(\"https://api.vimeo.com/videos/\" + r3, { headers: { Authorization: \"Bearer \" + t5.authToken } }).then(function(e5) {\n return e5.ok ? e5.json() : n3(e5);\n }).then(function(e5) {\n t5.metadata.content.title = e5.name, t5.metadata.content.description = e5.description, t5.metadata.content.publisher = e5.user.name, t5.metadata.playback.position = 0, t5.metadata.playback.totalLength = e5.duration;\n }).catch(function(e5) {\n return console.error(\"Request to Vimeo API Failed with: \", e5), n3(e5);\n });\n });\n } }, { key: \"updateMetadata\", value: function(e4) {\n var t5 = this;\n return new Promise(function(a4, n3) {\n t5.player.getVolume().then(function(n4) {\n n4 && (t5.metadata.playback.sound = 100 * n4), t5.metadata.playback.position = e4.seconds, a4();\n }).catch(n3);\n });\n } }]), t4;\n }(r2(a3(1)).default);\n t3.default = o5;\n }, function(e2, t3, a3) {\n \"use strict\";\n Object.defineProperty(t3, \"__esModule\", { value: true });\n var n2 = /* @__PURE__ */ function() {\n function e3(e4, t4) {\n for (var a4 = 0; a4 < t4.length; a4++) {\n var n3 = t4[a4];\n n3.enumerable = n3.enumerable || false, n3.configurable = true, \"value\" in n3 && (n3.writable = true), Object.defineProperty(e4, n3.key, n3);\n }\n }\n return function(t4, a4, n3) {\n return a4 && e3(t4.prototype, a4), n3 && e3(t4, n3), t4;\n };\n }(), i3 = o5(a3(0)), r2 = o5(a3(1));\n function o5(e3) {\n return e3 && e3.__esModule ? e3 : { default: e3 };\n }\n var s4 = function(e3) {\n function t4(e4, a4) {\n !function(e5, t5) {\n if (!(e5 instanceof t5))\n throw new TypeError(\"Cannot call a class as a function\");\n }(this, t4);\n var n3 = function(e5, t5) {\n if (!e5)\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return !t5 || \"object\" != typeof t5 && \"function\" != typeof t5 ? e5 : t5;\n }(this, (t4.__proto__ || Object.getPrototypeOf(t4)).call(this, \"YoutubeAnalytics\"));\n return n3.player = e4, n3.apiKey = a4, n3.playerLoaded = false, n3.playbackStarted = false, n3.contentStarted = false, n3.isPaused = false, n3.isBuffering = false, n3.isSeeking = false, n3.lastRecordedTime = { timeReported: Date.now(), timeElapsed: 0 }, n3.metadata = [{ playback: { video_player: \"youtube\" }, content: {} }], n3.playlistIndex = 0, n3;\n }\n return function(e4, t5) {\n if (\"function\" != typeof t5 && null !== t5)\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof t5);\n e4.prototype = Object.create(t5 && t5.prototype, { constructor: { value: e4, enumerable: false, writable: true, configurable: true } }), t5 && (Object.setPrototypeOf ? Object.setPrototypeOf(e4, t5) : e4.__proto__ = t5);\n }(t4, e3), n2(t4, [{ key: \"initialize\", value: function() {\n window.segmentYoutubeOnStateChange = this.onPlayerStateChange.bind(this), window.segmentYoutubeOnReady = this.onPlayerReady.bind(this), this.player.addEventListener(\"onReady\", \"segmentYoutubeOnReady\"), this.player.addEventListener(\"onStateChange\", \"segmentYoutubeOnStateChange\");\n } }, { key: \"onPlayerReady\", value: function(e4) {\n this.retrieveMetadata();\n } }, { key: \"onPlayerStateChange\", value: function(e4) {\n var t5 = this.player.getCurrentTime();\n switch (this.metadata[this.playlistIndex] && (this.metadata[this.playlistIndex].playback.position = this.metadata[this.playlistIndex].content.position = t5, this.metadata[this.playlistIndex].playback.quality = this.player.getPlaybackQuality(), this.metadata[this.playlistIndex].playback.sound = this.player.isMuted() ? 0 : this.player.getVolume()), e4.data) {\n case -1:\n if (this.playerLoaded)\n break;\n this.retrieveMetadata(), this.playerLoaded = true;\n break;\n case YT.PlayerState.BUFFERING:\n this.handleBuffer();\n break;\n case YT.PlayerState.PLAYING:\n this.handlePlay();\n break;\n case YT.PlayerState.PAUSED:\n this.handlePause();\n break;\n case YT.PlayerState.ENDED:\n this.handleEnd();\n }\n this.lastRecordedTime = { timeReported: Date.now(), timeElapsed: 1e3 * this.player.getCurrentTime() };\n } }, { key: \"retrieveMetadata\", value: function() {\n var e4 = this;\n return new Promise(function(t5, a4) {\n var n3 = e4.player.getVideoData(), r3 = e4.player.getPlaylist() || [n3.video_id], o6 = r3.join();\n (0, i3.default)(\"https://www.googleapis.com/youtube/v3/videos?id=\" + o6 + \"&part=snippet,contentDetails&key=\" + e4.apiKey).then(function(e5) {\n if (!e5.ok) {\n var t6 = new Error(\"Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)\");\n throw t6.response = e5, t6;\n }\n return e5.json();\n }).then(function(a5) {\n e4.metadata = [];\n for (var n4 = 0, i4 = 0; i4 < r3.length; i4++) {\n var o7 = a5.items[i4];\n e4.metadata.push({ content: { title: o7.snippet.title, description: o7.snippet.description, keywords: o7.snippet.tags, channel: o7.snippet.channelTitle, airdate: o7.snippet.publishedAt } }), n4 += l6(o7.contentDetails.duration);\n }\n for (i4 = 0; i4 < r3.length; i4++)\n e4.metadata[i4].playback = { total_length: n4, video_player: \"youtube\" };\n t5();\n }).catch(function(t6) {\n e4.metadata = r3.map(function(e5) {\n return { playback: { video_player: \"youtube\" }, content: {} };\n }), a4(t6);\n });\n });\n } }, { key: \"handleBuffer\", value: function() {\n var e4 = this.determineSeek();\n this.playbackStarted || (this.playbackStarted = true, this.track(\"Video Playback Started\", this.metadata[this.playlistIndex].playback)), e4 && !this.isSeeking && (this.isSeeking = true, this.track(\"Video Playback Seek Started\", this.metadata[this.playlistIndex].playback)), this.isSeeking && (this.track(\"Video Playback Seek Completed\", this.metadata[this.playlistIndex].playback), this.isSeeking = false);\n var t5 = this.player.getPlaylist();\n t5 && 0 === this.player.getCurrentTime() && this.player.getPlaylistIndex() !== this.playlistIndex && (this.contentStarted = false, this.playlistIndex === t5.length - 1 && 0 === this.player.getPlaylistIndex() && (this.track(\"Video Playback Completed\", this.metadata[this.player.getPlaylistIndex()].playback), this.track(\"Video Playback Started\", this.metadata[this.player.getPlaylistIndex()].playback))), this.track(\"Video Playback Buffer Started\", this.metadata[this.playlistIndex].playback), this.isBuffering = true;\n } }, { key: \"handlePlay\", value: function() {\n this.contentStarted || (this.playlistIndex = this.player.getPlaylistIndex(), -1 === this.playlistIndex && (this.playlistIndex = 0), this.track(\"Video Content Started\", this.metadata[this.playlistIndex].content), this.contentStarted = true), this.isBuffering && (this.track(\"Video Playback Buffer Completed\", this.metadata[this.playlistIndex].playback), this.isBuffering = false), this.isPaused && (this.track(\"Video Playback Resumed\", this.metadata[this.playlistIndex].playback), this.isPaused = false);\n } }, { key: \"handlePause\", value: function() {\n var e4 = this.determineSeek();\n this.isBuffering && (this.track(\"Video Playback Buffer Completed\", this.metadata[this.playlistIndex].playback), this.isBuffering = false), this.isPaused || (e4 ? (this.track(\"Video Playback Seek Started\", this.metadata[this.playlistIndex].playback), this.isSeeking = true) : (this.track(\"Video Playback Paused\", this.metadata[this.playlistIndex].playback), this.isPaused = true));\n } }, { key: \"handleEnd\", value: function() {\n this.track(\"Video Content Completed\", this.metadata[this.playlistIndex].content), this.contentStarted = false;\n var e4 = this.player.getPlaylistIndex(), t5 = this.player.getPlaylist();\n (t5 && e4 === t5.length - 1 || -1 === e4) && (this.track(\"Video Playback Completed\", this.metadata[this.playlistIndex].playback), this.playbackStarted = false);\n } }, { key: \"determineSeek\", value: function() {\n var e4 = this.isPaused || this.isBuffering ? 0 : Date.now() - this.lastRecordedTime.timeReported, t5 = 1e3 * this.player.getCurrentTime() - this.lastRecordedTime.timeElapsed;\n return Math.abs(e4 - t5) > 2e3;\n } }]), t4;\n }(r2.default);\n function l6(e3) {\n var t4 = e3.match(/PT(\\d+H)?(\\d+M)?(\\d+S)?/);\n return t4 = t4.slice(1).map(function(e4) {\n if (null != e4)\n return e4.replace(/\\D/, \"\");\n }), 3600 * (parseInt(t4[0]) || 0) + 60 * (parseInt(t4[1]) || 0) + (parseInt(t4[2]) || 0);\n }\n t3.default = s4;\n }]);\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/legacy-video-plugins/index.js\n var legacy_video_plugins_exports = {};\n __export(legacy_video_plugins_exports, {\n loadLegacyVideoPlugins: () => loadLegacyVideoPlugins\n });\n function loadLegacyVideoPlugins(analytics) {\n return __awaiter(this, void 0, void 0, function() {\n var plugins;\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [\n 4,\n Promise.resolve().then(() => __toESM(require_index_umd()))\n // This is super gross, but we need to support the `window.analytics.plugins` namespace\n // that is linked in the segment docs in order to be backwards compatible with ajs-classic\n // @ts-expect-error\n ];\n case 1:\n plugins = _a2.sent();\n analytics._plugins = plugins;\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }\n var init_legacy_video_plugins = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/legacy-video-plugins/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/schema-filter/index.js\n var schema_filter_exports = {};\n __export(schema_filter_exports, {\n schemaFilter: () => schemaFilter\n });\n function disabledActionDestinations(plan, settings) {\n var _a2, _b2;\n if (!plan || !Object.keys(plan)) {\n return {};\n }\n var disabledIntegrations = plan.integrations ? Object.keys(plan.integrations).filter(function(i3) {\n return plan.integrations[i3] === false;\n }) : [];\n var disabledRemotePlugins = [];\n ((_a2 = settings.remotePlugins) !== null && _a2 !== void 0 ? _a2 : []).forEach(function(p4) {\n disabledIntegrations.forEach(function(int) {\n if (p4.creationName == int) {\n disabledRemotePlugins.push(p4.name);\n }\n });\n });\n return ((_b2 = settings.remotePlugins) !== null && _b2 !== void 0 ? _b2 : []).reduce(function(acc, p4) {\n if (p4.settings[\"subscriptions\"]) {\n if (disabledRemotePlugins.includes(p4.name)) {\n p4.settings[\"subscriptions\"].forEach(\n // @ts-expect-error parameter 'sub' implicitly has an 'any' type\n function(sub) {\n return acc[\"\".concat(p4.name, \" \").concat(sub.partnerAction)] = false;\n }\n );\n }\n }\n return acc;\n }, {});\n }\n function schemaFilter(track, settings) {\n function filter2(ctx) {\n var plan = track;\n var ev = ctx.event.event;\n if (plan && ev) {\n var planEvent = plan[ev];\n if (!isPlanEventEnabled(plan, planEvent)) {\n ctx.updateEvent(\"integrations\", __assign(__assign({}, ctx.event.integrations), { All: false, \"Segment.io\": true }));\n return ctx;\n } else {\n var disabledActions = disabledActionDestinations(planEvent, settings);\n ctx.updateEvent(\"integrations\", __assign(__assign(__assign({}, ctx.event.integrations), planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations), disabledActions));\n }\n }\n return ctx;\n }\n return {\n name: \"Schema Filter\",\n version: \"0.1.0\",\n isLoaded: function() {\n return true;\n },\n load: function() {\n return Promise.resolve();\n },\n type: \"before\",\n page: filter2,\n alias: filter2,\n track: filter2,\n identify: filter2,\n group: filter2\n };\n }\n var init_schema_filter = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/schema-filter/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_is_plan_event_enabled();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/remote-middleware/index.js\n var remote_middleware_exports = {};\n __export(remote_middleware_exports, {\n remoteMiddlewares: () => remoteMiddlewares\n });\n function remoteMiddlewares(ctx, settings, obfuscate) {\n var _a2;\n return __awaiter(this, void 0, void 0, function() {\n var path, remoteMiddleware, names, scripts, middleware;\n var _this = this;\n return __generator(this, function(_b2) {\n switch (_b2.label) {\n case 0:\n if (isServer()) {\n return [2, []];\n }\n path = getNextIntegrationsURL();\n remoteMiddleware = (_a2 = settings.enabledMiddleware) !== null && _a2 !== void 0 ? _a2 : {};\n names = Object.entries(remoteMiddleware).filter(function(_a3) {\n var _2 = _a3[0], enabled = _a3[1];\n return enabled;\n }).map(function(_a3) {\n var name = _a3[0];\n return name;\n });\n scripts = names.map(function(name) {\n return __awaiter(_this, void 0, void 0, function() {\n var nonNamespaced, bundleName, fullPath, error_1;\n return __generator(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n nonNamespaced = name.replace(\"@segment/\", \"\");\n bundleName = nonNamespaced;\n if (obfuscate) {\n bundleName = btoa(nonNamespaced).replace(/=/g, \"\");\n }\n fullPath = \"\".concat(path, \"/middleware/\").concat(bundleName, \"/latest/\").concat(bundleName, \".js.gz\");\n _a3.label = 1;\n case 1:\n _a3.trys.push([1, 3, , 4]);\n return [\n 4,\n loadScript(fullPath)\n // @ts-ignore\n ];\n case 2:\n _a3.sent();\n return [2, window[\"\".concat(nonNamespaced, \"Middleware\")]];\n case 3:\n error_1 = _a3.sent();\n ctx.log(\"error\", error_1);\n ctx.stats.increment(\"failed_remote_middleware\");\n return [3, 4];\n case 4:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n });\n return [4, Promise.all(scripts)];\n case 1:\n middleware = _b2.sent();\n middleware = middleware.filter(Boolean);\n return [2, middleware];\n }\n });\n });\n }\n var init_remote_middleware = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/plugins/remote-middleware/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_environment();\n init_load_script();\n init_parse_cdn();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/browser/index.js\n function loadCDNSettings(writeKey, baseUrl) {\n return fetch2(\"\".concat(baseUrl, \"/v1/projects/\").concat(writeKey, \"/settings\")).then(function(res) {\n if (!res.ok) {\n return res.text().then(function(errorResponseMessage) {\n throw new Error(errorResponseMessage);\n });\n }\n return res.json();\n }).catch(function(err) {\n console.error(err.message);\n throw err;\n });\n }\n function hasLegacyDestinations(settings) {\n return getProcessEnv().NODE_ENV !== \"test\" && // just one integration means segmentio\n Object.keys(settings.integrations).length > 1;\n }\n function hasTsubMiddleware(settings) {\n var _a2, _b2, _c;\n return getProcessEnv().NODE_ENV !== \"test\" && ((_c = (_b2 = (_a2 = settings.middlewareSettings) === null || _a2 === void 0 ? void 0 : _a2.routingRules) === null || _b2 === void 0 ? void 0 : _b2.length) !== null && _c !== void 0 ? _c : 0) > 0;\n }\n function flushPreBuffer(analytics, buffer2) {\n flushSetAnonymousID(analytics, buffer2);\n flushOn(analytics, buffer2);\n }\n function flushFinalBuffer(analytics, buffer2) {\n return __awaiter(this, void 0, void 0, function() {\n return __generator(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, flushAddSourceMiddleware(analytics, buffer2)];\n case 1:\n _a2.sent();\n flushAnalyticsCallsInNewTask(analytics, buffer2);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }\n function registerPlugins(writeKey, cdnSettings, analytics, options, pluginLikes, legacyIntegrationSources, preInitBuffer) {\n var _a2, _b2, _c;\n if (pluginLikes === void 0) {\n pluginLikes = [];\n }\n return __awaiter(this, void 0, void 0, function() {\n var pluginsFromSettings, pluginSources, tsubMiddleware2, _d, legacyDestinations, _e, schemaFilter2, _f, mergedSettings, remotePlugins, basePlugins, shouldIgnoreSegmentio, _g, _h, ctx;\n var _this = this;\n return __generator(this, function(_j) {\n switch (_j.label) {\n case 0:\n flushPreBuffer(analytics, preInitBuffer);\n pluginsFromSettings = pluginLikes === null || pluginLikes === void 0 ? void 0 : pluginLikes.filter(function(pluginLike) {\n return typeof pluginLike === \"object\";\n });\n pluginSources = pluginLikes === null || pluginLikes === void 0 ? void 0 : pluginLikes.filter(function(pluginLike) {\n return typeof pluginLike === \"function\" && typeof pluginLike.pluginName === \"string\";\n });\n if (!hasTsubMiddleware(cdnSettings))\n return [3, 2];\n return [4, Promise.resolve().then(() => (init_routing_middleware(), routing_middleware_exports)).then(function(mod2) {\n return mod2.tsubMiddleware(cdnSettings.middlewareSettings.routingRules);\n })];\n case 1:\n _d = _j.sent();\n return [3, 3];\n case 2:\n _d = void 0;\n _j.label = 3;\n case 3:\n tsubMiddleware2 = _d;\n if (!(hasLegacyDestinations(cdnSettings) || legacyIntegrationSources.length > 0))\n return [3, 5];\n return [4, Promise.resolve().then(() => (init_ajs_destination(), ajs_destination_exports)).then(function(mod2) {\n return mod2.ajsDestinations(writeKey, cdnSettings, analytics.integrations, options, tsubMiddleware2, legacyIntegrationSources);\n })];\n case 4:\n _e = _j.sent();\n return [3, 6];\n case 5:\n _e = [];\n _j.label = 6;\n case 6:\n legacyDestinations = _e;\n if (!cdnSettings.legacyVideoPluginsEnabled)\n return [3, 8];\n return [4, Promise.resolve().then(() => (init_legacy_video_plugins(), legacy_video_plugins_exports)).then(function(mod2) {\n return mod2.loadLegacyVideoPlugins(analytics);\n })];\n case 7:\n _j.sent();\n _j.label = 8;\n case 8:\n if (!((_a2 = options.plan) === null || _a2 === void 0 ? void 0 : _a2.track))\n return [3, 10];\n return [4, Promise.resolve().then(() => (init_schema_filter(), schema_filter_exports)).then(function(mod2) {\n var _a3;\n return mod2.schemaFilter((_a3 = options.plan) === null || _a3 === void 0 ? void 0 : _a3.track, cdnSettings);\n })];\n case 9:\n _f = _j.sent();\n return [3, 11];\n case 10:\n _f = void 0;\n _j.label = 11;\n case 11:\n schemaFilter2 = _f;\n mergedSettings = mergedOptions(cdnSettings, options);\n return [4, remoteLoader(cdnSettings, analytics.integrations, mergedSettings, options, tsubMiddleware2, pluginSources).catch(function() {\n return [];\n })];\n case 12:\n remotePlugins = _j.sent();\n basePlugins = __spreadArray(__spreadArray([envEnrichment], legacyDestinations, true), remotePlugins, true);\n if (schemaFilter2) {\n basePlugins.push(schemaFilter2);\n }\n shouldIgnoreSegmentio = ((_b2 = options.integrations) === null || _b2 === void 0 ? void 0 : _b2.All) === false && !options.integrations[\"Segment.io\"] || options.integrations && options.integrations[\"Segment.io\"] === false;\n if (!!shouldIgnoreSegmentio)\n return [3, 14];\n _h = (_g = basePlugins).push;\n return [4, segmentio(analytics, mergedSettings[\"Segment.io\"], cdnSettings.integrations)];\n case 13:\n _h.apply(_g, [_j.sent()]);\n _j.label = 14;\n case 14:\n return [4, analytics.register.apply(analytics, __spreadArray(__spreadArray([], basePlugins, false), pluginsFromSettings, false))];\n case 15:\n ctx = _j.sent();\n return [4, flushRegister(analytics, preInitBuffer)];\n case 16:\n _j.sent();\n if (!Object.entries((_c = cdnSettings.enabledMiddleware) !== null && _c !== void 0 ? _c : {}).some(function(_a3) {\n var enabled = _a3[1];\n return enabled;\n }))\n return [3, 18];\n return [4, Promise.resolve().then(() => (init_remote_middleware(), remote_middleware_exports)).then(function(_a3) {\n var remoteMiddlewares2 = _a3.remoteMiddlewares;\n return __awaiter(_this, void 0, void 0, function() {\n var middleware, promises;\n return __generator(this, function(_b3) {\n switch (_b3.label) {\n case 0:\n return [4, remoteMiddlewares2(ctx, cdnSettings, options.obfuscate)];\n case 1:\n middleware = _b3.sent();\n promises = middleware.map(function(mdw) {\n return analytics.addSourceMiddleware(mdw);\n });\n return [2, Promise.all(promises)];\n }\n });\n });\n })];\n case 17:\n _j.sent();\n _j.label = 18;\n case 18:\n return [2, ctx];\n }\n });\n });\n }\n function loadAnalytics(settings, options, preInitBuffer) {\n var _a2, _b2, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n if (options === void 0) {\n options = {};\n }\n return __awaiter(this, void 0, void 0, function() {\n var cdnURL, cdnSettings, _m, disabled, retryQueue, analytics, plugins, classicIntegrations, segmentLoadOptions, ctx, search, hash2, term;\n return __generator(this, function(_o) {\n switch (_o.label) {\n case 0:\n if (options.disable === true) {\n return [2, [new NullAnalytics(), Context.system()]];\n }\n if (options.globalAnalyticsKey)\n setGlobalAnalyticsKey(options.globalAnalyticsKey);\n if (settings.cdnURL)\n setGlobalCDNUrl(settings.cdnURL);\n if (options.initialPageview) {\n preInitBuffer.add(new PreInitMethodCall(\"page\", []));\n }\n cdnURL = (_a2 = settings.cdnURL) !== null && _a2 !== void 0 ? _a2 : getCDN();\n if (!((_b2 = settings.cdnSettings) !== null && _b2 !== void 0))\n return [3, 1];\n _m = _b2;\n return [3, 3];\n case 1:\n return [4, loadCDNSettings(settings.writeKey, cdnURL)];\n case 2:\n _m = _o.sent();\n _o.label = 3;\n case 3:\n cdnSettings = _m;\n if (options.updateCDNSettings) {\n cdnSettings = options.updateCDNSettings(cdnSettings);\n }\n if (!(typeof options.disable === \"function\"))\n return [3, 5];\n return [4, options.disable(cdnSettings)];\n case 4:\n disabled = _o.sent();\n if (disabled) {\n return [2, [new NullAnalytics(), Context.system()]];\n }\n _o.label = 5;\n case 5:\n retryQueue = (_d = (_c = cdnSettings.integrations[\"Segment.io\"]) === null || _c === void 0 ? void 0 : _c.retryQueue) !== null && _d !== void 0 ? _d : true;\n options = __assign({ retryQueue }, options);\n analytics = new Analytics(__assign(__assign({}, settings), { cdnSettings, cdnURL }), options);\n attachInspector(analytics);\n plugins = (_e = settings.plugins) !== null && _e !== void 0 ? _e : [];\n classicIntegrations = (_f = settings.classicIntegrations) !== null && _f !== void 0 ? _f : [];\n segmentLoadOptions = (_g = options.integrations) === null || _g === void 0 ? void 0 : _g[\"Segment.io\"];\n Stats.initRemoteMetrics(__assign(__assign({}, cdnSettings.metrics), { host: (_h = segmentLoadOptions === null || segmentLoadOptions === void 0 ? void 0 : segmentLoadOptions.apiHost) !== null && _h !== void 0 ? _h : (_j = cdnSettings.metrics) === null || _j === void 0 ? void 0 : _j.host, protocol: segmentLoadOptions === null || segmentLoadOptions === void 0 ? void 0 : segmentLoadOptions.protocol }));\n return [4, registerPlugins(settings.writeKey, cdnSettings, analytics, options, plugins, classicIntegrations, preInitBuffer)];\n case 6:\n ctx = _o.sent();\n search = (_k = window.location.search) !== null && _k !== void 0 ? _k : \"\";\n hash2 = (_l = window.location.hash) !== null && _l !== void 0 ? _l : \"\";\n term = search.length ? search : hash2.replace(/(?=#).*(?=\\?)/, \"\");\n if (!term.includes(\"ajs_\"))\n return [3, 8];\n return [4, analytics.queryString(term).catch(console.error)];\n case 7:\n _o.sent();\n _o.label = 8;\n case 8:\n analytics.initialized = true;\n analytics.emit(\"initialize\", settings, options);\n return [4, flushFinalBuffer(analytics, preInitBuffer)];\n case 9:\n _o.sent();\n return [2, [analytics, ctx]];\n }\n });\n });\n }\n var AnalyticsBrowser;\n var init_browser2 = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_tslib_es6();\n init_get_process_env();\n init_parse_cdn();\n init_fetch2();\n init_analytics2();\n init_context2();\n init_merged_options();\n init_esm8();\n init_env_enrichment();\n init_remote_loader();\n init_segmentio();\n init_buffer3();\n init_inspector();\n init_stats2();\n init_global_analytics_helper();\n AnalyticsBrowser = /** @class */\n function(_super) {\n __extends(AnalyticsBrowser2, _super);\n function AnalyticsBrowser2() {\n var _this = this;\n var _a2 = createDeferred(), loadStart = _a2.promise, resolveLoadStart = _a2.resolve;\n _this = _super.call(this, function(buffer2) {\n return loadStart.then(function(_a3) {\n var settings = _a3[0], options = _a3[1];\n return loadAnalytics(settings, options, buffer2);\n });\n }) || this;\n _this._resolveLoadStart = function(settings, options) {\n return resolveLoadStart([settings, options]);\n };\n return _this;\n }\n AnalyticsBrowser2.prototype.load = function(settings, options) {\n if (options === void 0) {\n options = {};\n }\n this._resolveLoadStart(settings, options);\n return this;\n };\n AnalyticsBrowser2.load = function(settings, options) {\n if (options === void 0) {\n options = {};\n }\n return new AnalyticsBrowser2().load(settings, options);\n };\n AnalyticsBrowser2.standalone = function(writeKey, options) {\n return AnalyticsBrowser2.load({ writeKey }, options).then(function(res) {\n return res[0];\n });\n };\n return AnalyticsBrowser2;\n }(AnalyticsBuffered);\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/node/node.browser.js\n var AnalyticsNode;\n var init_node_browser = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/node/node.browser.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n AnalyticsNode = /** @class */\n function() {\n function AnalyticsNode2() {\n }\n AnalyticsNode2.load = function() {\n return Promise.reject(new Error(\"AnalyticsNode is not available in browsers.\"));\n };\n return AnalyticsNode2;\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/index.js\n var init_pkg = __esm({\n \"../../../node_modules/.pnpm/@segment+analytics-next@1.74.0/node_modules/@segment/analytics-next/dist/pkg/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_browser2();\n init_node_browser();\n init_context2();\n init_events2();\n init_plugin();\n init_user();\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js\n function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + \"-\" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + \"-\" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + \"-\" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + \"-\" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n }\n var byteToHex;\n var init_stringify2 = __esm({\n \"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n byteToHex = [];\n for (let i3 = 0; i3 < 256; ++i3) {\n byteToHex.push((i3 + 256).toString(16).slice(1));\n }\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js\n function rng() {\n if (!getRandomValues) {\n if (typeof crypto === \"undefined\" || !crypto.getRandomValues) {\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n }\n var getRandomValues, rnds8;\n var init_rng = __esm({\n \"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n rnds8 = new Uint8Array(16);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js\n var randomUUID, native_default;\n var init_native = __esm({\n \"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n randomUUID = typeof crypto !== \"undefined\" && crypto.randomUUID && crypto.randomUUID.bind(crypto);\n native_default = { randomUUID };\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js\n function v42(options, buf, offset) {\n if (native_default.randomUUID && !buf && !options) {\n return native_default.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error(\"Random bytes length must be >= 16\");\n }\n rnds[6] = rnds[6] & 15 | 64;\n rnds[8] = rnds[8] & 63 | 128;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i3 = 0; i3 < 16; ++i3) {\n buf[offset + i3] = rnds[i3];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n }\n var v4_default;\n var init_v4 = __esm({\n \"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_native();\n init_rng();\n init_stringify2();\n v4_default = v42;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/index.js\n var init_esm_browser = __esm({\n \"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v4();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/_writeKey.js\n var WRITE_IN_DEV;\n var init_writeKey = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/_writeKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n WRITE_IN_DEV = false;\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/fetchRemoteWriteKey.js\n async function fetchRemoteWriteKey() {\n try {\n const res = await fetch(\"https://ws-accounkit-assets.s3.us-west-1.amazonaws.com/logger_config_v1.json\");\n const json = await res.json();\n return json.writeKey;\n } catch (e2) {\n console.warn(\"failed to fetch write key\");\n return void 0;\n }\n }\n var init_fetchRemoteWriteKey = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/fetchRemoteWriteKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/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.52.2/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.52.2/node_modules/@account-kit/logging/dist/esm/plugins/contextAllowlist.js\n function stripContext(ctx) {\n ctx.event.context = allowlist.reduce((acc, key) => {\n acc[key] = ctx.event?.context?.[key];\n return acc;\n }, {});\n return ctx;\n }\n var allowlist, ContextAllowlistPlugin;\n var init_contextAllowlist = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/plugins/contextAllowlist.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n allowlist = [\"page\"];\n ContextAllowlistPlugin = {\n name: \"Enforce Context Allowlist\",\n type: \"enrichment\",\n isLoaded: () => true,\n load: () => Promise.resolve(),\n track: stripContext,\n identify: stripContext,\n page: stripContext,\n alias: stripContext,\n group: stripContext,\n screen: stripContext\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/plugins/devDestination.js\n function consoleLogEvent(ctx) {\n console.log(JSON.stringify(ctx.event, null, 2));\n return ctx;\n }\n var DevDestinationPlugin;\n var init_devDestination = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/plugins/devDestination.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n DevDestinationPlugin = {\n name: \"Dev Destination Plugin\",\n type: \"destination\",\n isLoaded: () => true,\n load: () => Promise.resolve(),\n track: consoleLogEvent,\n identify: consoleLogEvent,\n page: consoleLogEvent,\n alias: consoleLogEvent,\n group: consoleLogEvent,\n screen: consoleLogEvent\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/utils.js\n function isClientDevMode() {\n if (typeof __DEV__ !== \"undefined\" && __DEV__) {\n return true;\n }\n if (typeof process_exports !== \"undefined\" && true) {\n return true;\n }\n if (typeof window !== \"undefined\" && window.location?.hostname?.includes(\"localhost\")) {\n return true;\n }\n return false;\n }\n var init_utils14 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/client.js\n function getOrCreateAnonId() {\n let anon = JSON.parse(localStorage.getItem(ANON_ID_STORAGE_KEY) ?? \"null\");\n if (!anon || anon.expiresMs < Date.now()) {\n anon = {\n id: v4_default(),\n // expires a month from now (30days * 24hrs/day * 60min/hr * 60sec/min * 1000ms/sec)\n expiresMs: Date.now() + 30 * 24 * 60 * 60 * 1e3\n };\n localStorage.setItem(ANON_ID_STORAGE_KEY, JSON.stringify(anon));\n }\n return anon;\n }\n function createClientLogger(context2) {\n const isDev = isClientDevMode();\n if (isDev && !WRITE_IN_DEV) {\n return noopLogger;\n }\n const analytics = new AnalyticsBrowser();\n const writeKey = fetchRemoteWriteKey();\n const { id: anonId } = getOrCreateAnonId();\n analytics.setAnonymousId(anonId);\n analytics.register(ContextAllowlistPlugin);\n analytics.debug(isDev);\n if (isDev) {\n console.log(`[Metrics] metrics initialized for ${context2.package}`);\n }\n if (isDev) {\n analytics.register(DevDestinationPlugin);\n }\n const ready = writeKey.then((writeKey2) => {\n if (writeKey2 == null) {\n return;\n }\n analytics.load(\n {\n writeKey: writeKey2,\n // we disable these settings in dev so we don't fetch anything from segment\n cdnSettings: isDev ? {\n integrations: {}\n } : void 0\n },\n // further we disable the segment integration dev\n {\n disableClientPersistence: true,\n integrations: {\n \"Segment.io\": !isDev\n }\n }\n );\n return analytics.ready();\n });\n return {\n _internal: {\n ready,\n anonId\n },\n trackEvent: async ({ name, data }) => {\n if (!await writeKey) {\n return noopLogger.trackEvent({\n name,\n // @ts-expect-error\n data\n });\n }\n await analytics.track(name, { ...data, ...context2 });\n }\n };\n }\n var ANON_ID_STORAGE_KEY;\n var init_client2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_pkg();\n init_esm_browser();\n init_writeKey();\n init_fetchRemoteWriteKey();\n init_noop();\n init_contextAllowlist();\n init_devDestination();\n init_utils14();\n ANON_ID_STORAGE_KEY = \"account-kit:anonId\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/server.js\n function createServerLogger(_context) {\n return noopLogger;\n }\n var init_server = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/server.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+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/index.js\n function createLogger(context2) {\n const innerLogger = (() => {\n try {\n return typeof window === \"undefined\" ? createServerLogger(context2) : createClientLogger(context2);\n } catch (e2) {\n console.error(\"[Safe to ignore] failed to initialize metrics\", e2);\n return noopLogger;\n }\n })();\n const logger3 = {\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 logger3;\n }\n var init_esm10 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.52.2/node_modules/@account-kit/logging/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_client2();\n init_noop();\n init_server();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm10();\n init_version6();\n InfraLogger = createLogger({\n package: \"@account-kit/infra\",\n version: VERSION5\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/defaults.js\n var getDefaultUserOperationFeeOptions2;\n var init_defaults3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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, version8) => {\n switch (version8) {\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: ${version8}`);\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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: VERSION5\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/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_defaults3();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/index.js\n var esm_exports = {};\n __export(esm_exports, {\n alchemy: () => alchemy,\n alchemyActions: () => alchemyActions,\n alchemyEnhancedApiActions: () => alchemyEnhancedApiActions,\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 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_esm11 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_918d0cabf8ffd9dd4125d74eca67e17e/node_modules/@account-kit/infra/dist/esm/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_alchemyEnhancedApis();\n init_smartAccount();\n init_isAlchemySmartAccountClient();\n init_rpcClient();\n init_smartAccountClient3();\n init_defaults3();\n init_gas_manager();\n init_feeEstimator2();\n init_alchemyTrackerHeaders();\n init_gasManager();\n init_userOperationSimulator();\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/sponsoredGas/litActionSmartSigner.js\n var require_litActionSmartSigner = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/sponsoredGas/litActionSmartSigner.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 constructor(config2) {\n this.signerType = \"lit-actions\";\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 hash2 = ethers.utils._TypedDataEncoder.hash(params.domain || {}, params.types || {}, params.message || {});\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash2),\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 hash2 = ethers.utils.keccak256(ethers.utils.hexConcat([\n \"0x05\",\n ethers.utils.RLP.encode([\n ethers.utils.hexlify(chainId),\n contractAddress,\n ethers.utils.hexlify(nonce)\n ])\n ]));\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash2),\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 // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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 [version9, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].impl, version9];\n }\n return [def.addresses.default.impl, version9];\n }));\n const factoryToVersion = new Map(Object.entries(AccountVersionRegistry[accountType]).map((pair) => {\n const [version9, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].factory, version9];\n }\n return [def.addresses.default.factory, version9];\n }));\n const version8 = fromHex(implAddress, \"bigint\") === 0n ? factoryToVersion.get(factoryAddress.toLowerCase()) : implToVersion.get(implAddress.toLowerCase());\n if (!version8) {\n throw new Error(`Could not determine ${account.source} version for chain ${chain2.id}`);\n }\n return AccountVersionRegistry[accountType][version8];\n }\n var AccountVersionRegistry, defaultLightAccountVersion, getDefaultLightAccountFactoryAddress, getDefaultMultiOwnerLightAccountFactoryAddress, LightAccountUnsupported1271Impls, LightAccountUnsupported1271Factories;\n var init_utils15 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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, version8) => {\n return AccountVersionRegistry.LightAccount[version8].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.LightAccount[version8].addresses.default.factory;\n };\n getDefaultMultiOwnerLightAccountFactoryAddress = (chain2, version8) => {\n return AccountVersionRegistry.MultiOwnerLightAccount[version8].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.MultiOwnerLightAccount[version8].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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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: version8, 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(version8)}`);\n }\n return encodeFunctionData({\n abi: abi2,\n functionName: \"upgradeToAndCall\",\n args: [upgradeToAddress, upgradeToInitData]\n });\n };\n const get1271Wrapper = (hashedMessage, version9) => {\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: version9\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 (version8) {\n case \"v1.0.1\":\n return params;\n case \"v1.0.2\":\n throw new Error(`Version ${String(version8)} 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(version8)} of LightAccount`);\n }\n };\n const formatSign = async (signature) => {\n return version8 === \"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 (version8) {\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 (version8) {\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(version8)}`);\n }\n },\n encodeUpgradeToAndCall\n });\n return {\n ...account,\n source: type,\n getLightAccountVersion: () => version8,\n getSigner: () => signer\n };\n }\n var SignatureType;\n var init_base5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_utils15();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/predictAddress.js\n function predictLightAccountAddress({ factoryAddress, salt, ownerAddress, version: version8 }) {\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[version8].addresses.default.factory ? getContractAddress2({\n from: factoryAddress,\n nonce: 1n\n }) : AccountVersionRegistry.LightAccount[version8].addresses.default.impl\n );\n switch (version8) {\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(version8);\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(version8) {\n throw new Error(`Unknown light account version: ${version8}`);\n }\n var init_predictAddress = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_OZ_ERC1967Proxy();\n init_utils15();\n init_LightAccountAbi_v1();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/account.js\n async function createLightAccount({ transport, chain: chain2, signer, initCode, version: version8 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: AccountVersionRegistry[\"LightAccount\"][version8].entryPointVersion\n }), accountAddress, factoryAddress = getDefaultLightAccountFactoryAddress(chain2, version8), salt: salt_ = 0n }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const accountAbi = version8 === \"v2.0.0\" ? LightAccountAbi_v2 : LightAccountAbi_v1;\n const factoryAbi = version8 === \"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: version8\n });\n const account = await createLightAccountBase({\n transport,\n chain: chain2,\n signer,\n abi: accountAbi,\n type: \"LightAccount\",\n version: version8,\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_LightAccountAbi_v1();\n init_LightAccountAbi_v2();\n init_LightAccountFactoryAbi_v1();\n init_LightAccountFactoryAbi_v2();\n init_utils15();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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 (isAlchemyTransport(transport, chain2)) {\n return createAlchemySmartAccountClient({\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_client3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm11();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/multiOwner.js\n async function createMultiOwnerLightAccount({ transport, chain: chain2, signer, initCode, version: version8 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: \"0.7.0\"\n }), accountAddress, factoryAddress = getDefaultMultiOwnerLightAccountFactoryAddress(chain2, version8), 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: version8,\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_MultiOwnerLightAccountAbi();\n init_MultiOwnerLightAccountFactoryAbi();\n init_utils15();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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 (isAlchemyTransport(transport, chain2)) {\n return createAlchemySmartAccountClient({\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm11();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_plugin2();\n multiOwnerMessageSigner = (client, accountAddress, signer, pluginAddress = MultiOwnerPlugin.meta.addresses[client.chain.id]) => {\n const get712Wrapper = async (msg) => {\n const [, name, version8, 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: version8\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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: custom2(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_utils16 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm11();\n init_esm2();\n init_IPlugin();\n init_MultiOwnerModularAccountFactory();\n init_UpgradeableModularAccount();\n init_multiOwnerAccount();\n init_plugin2();\n getDefaultMultisigModularAccountFactoryAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_MultiOwnerModularAccountFactory();\n init_signer2();\n init_utils16();\n init_standardExecutor();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/plugin.js\n var addresses2, MultisigPlugin, multisigPluginActions, MultisigPluginExecutionFunctionAbi, MultisigPluginAbi;\n var init_plugin3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_plugin3();\n multisigSignMethods = ({ client, accountAddress, signer, threshold, pluginAddress = MultisigPlugin.meta.addresses[client.chain.id] }) => {\n const get712Wrapper = async (msg) => {\n const [, name, version8, 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: version8\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_MultisigModularAccountFactory();\n init_signer3();\n init_utils16();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_IPlugin();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/errors.js\n var InvalidAggregatedSignatureError, InvalidContextSignatureError, MultisigAccountExpectedError, MultisigMissingSignatureError;\n var init_errors7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin3();\n init_errors7();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_errors7();\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 hash2 = 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: hash2, 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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_formatSignatures();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/index.js\n var init_utils17 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_errors7();\n init_utils17();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin3();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/middleware.js\n var multisigSignatureMiddleware, isUsingMaxValues;\n var init_middleware2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_errors7();\n init_utils17();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_middleware2();\n init_plugin3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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 (isAlchemyTransport(transport, chain2)) {\n const { opts } = params;\n return createAlchemySmartAccountClient({\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 (isAlchemyTransport(transport, chain2)) {\n let config2 = {\n ...params,\n chain: chain2,\n transport\n };\n const { opts } = config2;\n return createAlchemySmartAccountClient({\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_client4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_middleware2();\n init_esm11();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_esm6();\n init_src();\n init_plugin2();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_utils18 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin4();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_plugin4();\n init_utils18();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\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(encode7, param) {\n if (!param)\n return \"0x\";\n return encode7(param);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm();\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_utils19 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/utils.js\n var SignatureType2, getDefaultWebauthnValidationModuleAddress, getDefaultSingleSignerValidationModuleAddress;\n var init_utils20 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm11();\n (function(SignatureType3) {\n SignatureType3[\"EOA\"] = \"0x00\";\n SignatureType3[\"CONTRACT\"] = \"0x01\";\n })(SignatureType2 || (SignatureType2 = {}));\n getDefaultWebauthnValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n default:\n return \"0x0000000000001D9d34E07D9834274dF9ae575217\";\n }\n };\n getDefaultSingleSignerValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n default:\n return \"0x00000000000099DE0BF6fA90dEB851E2A2df7d83\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_utils20();\n init_utils21();\n singleSignerMessageSigner = (signer, chain2, accountAddress, entityId, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash2;\n switch (request.type) {\n case \"personal_sign\":\n hash2 = hashMessage(request.data);\n break;\n case \"eth_signTypedData_v4\":\n hash2 = 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: hash2\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.8.1_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Base64.js\n function toBytes3(value) {\n const base64 = value.replace(/=+$/, \"\");\n const size5 = base64.length;\n const decoded = new Uint8Array(size5 + 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 = (size5 >> 2) * 3 + (size5 % 4 && size5 % 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.8.1_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.2/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.2/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_utils();\n init_modular();\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 = Field(p256_CURVE.p);\n Fp384 = Field(p384_CURVE.p);\n Fp521 = Field(p521_CURVE.p);\n p256 = createCurve({ ...p256_CURVE, Fp: Fp256, lowS: false }, sha256);\n p384 = createCurve({ ...p384_CURVE, Fp: Fp384, lowS: false }, sha384);\n p521 = createCurve({ ...p521_CURVE, Fp: Fp521, lowS: false, allowedPrivateKeyLengths: [130, 131, 132] }, sha512);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.2/node_modules/@noble/curves/esm/p256.js\n var p2562;\n var init_p256 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.2/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.8.1_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(fromBytes(bytes.slice(r_start, r_end)));\n const s4 = BigInt(fromBytes(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.8.1_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_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.8.1_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: Array.isArray(credentialId) ? credentialId.map((id) => ({\n id: toBytes3(id),\n type: \"public-key\"\n })) : [\n {\n id: toBytes3(credentialId),\n type: \"public-key\"\n }\n ]\n } : {},\n challenge: fromHex2(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: fromBytes(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.8.1_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_Bytes();\n init_Errors();\n init_Hex();\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 BaseError3 {\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_utils21();\n init_utils20();\n webauthnSigningFunctions = (credential, getFn, rpId, chain2, accountAddress, entityId, deferredActionData) => {\n const { id, publicKey } = credential;\n const sign3 = async ({ hash: hash2 }) => {\n const { metadata, signature } = await sign2({\n credentialId: id,\n getFn,\n challenge: hash2,\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 hash2 = 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: hash2 }),\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 hash2 = 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: hash2 });\n return isDeferredAction ? pack1271Signature({ validationSignature, entityId }) : validationSignature;\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_utils21();\n init_utils20();\n nativeSMASigner = (signer, chain2, accountAddress, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash2;\n switch (request.type) {\n case \"personal_sign\":\n hash2 = 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 hash2 = 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: hash2\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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_modularAccountAbi();\n init_utils19();\n init_signer5();\n init_signingMethods();\n init_utils21();\n init_nativeSMASigner();\n executeUserOpSelector = \"0x8DD7712F\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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: custom2(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_utils21 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_esm11();\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 sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n default:\n return \"0x00000000000017c61b5bEe81050EC8eFc9c6fecd\";\n }\n };\n getDefaultSMAV2BytecodeAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n default:\n return \"0x000000000000c5A9089039570Dd36455b5C07383\";\n }\n };\n getDefaultSMAV2StorageAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia2.id:\n case baseSepolia2.id:\n case polygon2.id:\n case mainnet2.id:\n case polygonAmoy2.id:\n case optimism2.id:\n case optimismSepolia2.id:\n case arbitrum2.id:\n case arbitrumSepolia2.id:\n case base2.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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/utils.js\n function bytesToHex3(bytes) {\n return `0x${bytesToHex2(bytes)}`;\n }\n function hexToBytes3(value) {\n return hexToBytes2(value.slice(2));\n }\n var init_utils22 = __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\" ? hexToBytes3(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(bytesToHex3(x4)),\n y: BigInt(bytesToHex3(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_utils22();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/index.js\n var init_esm12 = __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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm2();\n init_accountFactoryAbi();\n init_utils21();\n init_modularAccountV2Base();\n init_utils21();\n init_predictAddress2();\n init_esm12();\n init_errors8();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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 (isAlchemyTransport(transport, chain2)) {\n return createAlchemySmartAccountClient({\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_client5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_esm11();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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.52.2_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._15f592348244a798125f3dead2cef33f/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_client3();\n init_multiOwnerAlchemyClient();\n init_lightAccount();\n init_predictAddress();\n init_predictAddress();\n init_utils15();\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_client4();\n init_multiSigAlchemyClient();\n init_errors7();\n init_decorator2();\n init_installPlugin();\n init_extension();\n init_plugin2();\n init_multisig();\n init_utils17();\n init_extension3();\n init_permissions();\n init_plugin4();\n init_signer4();\n init_utils18();\n init_utils16();\n init_modularAccountV2();\n init_client5();\n init_utils21();\n init_predictAddress2();\n init_semiModularAccountBytecodeAbi();\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-helpers/getAlchemyChainConfig.js\n var require_getAlchemyChainConfig = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-helpers/getAlchemyChainConfig.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_esm11(), __toCommonJS(esm_exports));\n function getAlchemyChainConfig(chainId) {\n const chainMap = {\n [1]: infra_1.mainnet,\n [5]: infra_1.goerli,\n [10]: infra_1.optimism,\n [420]: infra_1.optimismGoerli,\n [11155420]: infra_1.optimismSepolia,\n [11155111]: infra_1.sepolia,\n [137]: infra_1.polygon,\n [80001]: infra_1.polygonMumbai,\n [8453]: infra_1.base,\n [84531]: infra_1.baseGoerli,\n [84532]: infra_1.baseSepolia,\n [42161]: infra_1.arbitrum,\n [42170]: infra_1.arbitrumNova,\n [421613]: infra_1.arbitrumGoerli,\n [421614]: infra_1.arbitrumSepolia,\n [1101]: infra_1.polygonAmoy,\n [324]: infra_1.zora,\n // If zora is mainnet\n [999]: infra_1.zoraSepolia,\n // If zoraSepolia is testnet\n [252]: infra_1.fraxtal,\n // Fraxtal mainnet\n [2523]: infra_1.fraxtalSepolia,\n [480]: infra_1.worldChain,\n [4801]: infra_1.worldChainSepolia,\n [360]: infra_1.shape,\n [11011]: infra_1.shapeSepolia,\n [130]: infra_1.unichainMainnet,\n [1301]: infra_1.unichainSepolia,\n [1946]: infra_1.soneiumMinato,\n [1868]: infra_1.soneiumMainnet,\n [204]: infra_1.opbnbMainnet,\n [5611]: infra_1.opbnbTestnet,\n [80084]: infra_1.beraChainBartio,\n [57073]: infra_1.inkMainnet,\n [763373]: infra_1.inkSepolia,\n [7078815900]: infra_1.mekong,\n [10143]: infra_1.monadTestnet,\n [905905]: infra_1.openlootSepolia,\n [685685]: infra_1.gensynTestnet,\n [11155931]: infra_1.riseTestnet,\n [1514]: infra_1.storyMainnet,\n [1315]: infra_1.storyAeneid,\n [44787]: infra_1.celoAlfajores,\n [42220]: infra_1.celoMainnet,\n [10218]: infra_1.teaSepolia\n // Add more mappings as new chains are supported\n };\n if (chainId in chainMap) {\n return chainMap[chainId];\n }\n throw new Error(`Chain ID ${chainId} not supported`);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/sponsoredGas/sponsoredGasContractCall.js\n var require_sponsoredGasContractCall = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/sponsoredGas/sponsoredGasContractCall.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 infra_1 = (init_esm11(), __toCommonJS(esm_exports));\n var litActionSmartSigner_1 = require_litActionSmartSigner();\n var smart_contracts_1 = (init_src(), __toCommonJS(src_exports));\n var getAlchemyChainConfig_1 = require_getAlchemyChainConfig();\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 const litSigner = new litActionSmartSigner_1.LitActionsSmartSigner({\n pkpPublicKey,\n chainId\n });\n const alchemyChain = (0, getAlchemyChainConfig_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(\"Smart account client created\");\n const userOperation = {\n target: contractAddress,\n value: txValue,\n data: encodedData\n };\n console.log(\"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 (e2) {\n console.log(\"Failed to build user operation, error below\");\n console.log(e2);\n console.log(e2.stack);\n return \"\";\n }\n });\n if (uoStructResponse === \"\") {\n throw new Error(\"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(\"User operation built, starting signing...\", uoStruct);\n const signedUserOperation = await smartAccountClient.signUserOperation({\n account: smartAccountClient.account,\n uoStruct\n });\n console.log(\"User operation signed\", signedUserOperation);\n const entryPoint = smartAccountClient.account.getEntryPoint();\n console.log(\"Entry point\", entryPoint);\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(`[@lit-protocol/vincent-tool-morpho/executeOperationWithGasSponsorship] User operation sent`, { userOpHash: userOpResult });\n return userOpResult;\n } catch (e2) {\n console.log(\"Failed to send user operation, error below\");\n console.log(e2);\n console.log(e2.stack);\n return \"\";\n }\n });\n if (uoHash === \"\") {\n throw new Error(\"Failed to send user operation\");\n }\n return uoHash;\n };\n exports3.sponsoredGasContractCall = sponsoredGasContractCall;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-helpers/toEthAddress.js\n var require_toEthAddress = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-helpers/toEthAddress.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toEthAddress = toEthAddress;\n function toEthAddress(pkpPublicKey) {\n if (!pkpPublicKey.startsWith(\"0x\")) {\n pkpPublicKey = `0x${pkpPublicKey}`;\n }\n return ethers.utils.computeAddress(pkpPublicKey);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/nativeSend.js\n var require_nativeSend = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/handlers/nativeSend.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.nativeSend = void 0;\n var signTx_1 = require_signTx();\n var sendTx_1 = require_sendTx();\n var toEthAddress_1 = require_toEthAddress();\n var nativeSend = async ({ provider, pkpPublicKey, amount, to }) => {\n const fromAddress = (0, toEthAddress_1.toEthAddress)(pkpPublicKey);\n const recipientAddress = to;\n const nonce = await provider.getTransactionCount(fromAddress);\n const gasLimit = await provider.estimateGas({\n from: fromAddress,\n to: recipientAddress,\n value: ethers.utils.parseEther(amount)\n });\n const gasPrice = await provider.getGasPrice();\n const txAmount = ethers.utils.parseEther(amount);\n const unsignedTx = {\n to: recipientAddress,\n value: txAmount,\n gasLimit,\n gasPrice,\n nonce,\n chainId: (await provider.getNetwork()).chainId\n };\n const signedTxSignature = await (0, signTx_1.signTx)({\n sigName: \"native-send-tx\",\n pkpPublicKey,\n tx: unsignedTx\n });\n const txHash = await (0, sendTx_1.sendTx)(provider, signedTxSignature);\n return txHash;\n };\n exports3.nativeSend = nativeSend;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/getNonce.js\n var require_getNonce = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/la-transactions/primitive/getNonce.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getNonce = void 0;\n var getNonce = async ({ address, chain: chain2 }) => {\n return await Lit.Actions.getLatestNonce({\n address,\n chain: chain2\n });\n };\n exports3.getNonce = getNonce;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-utils/index.js\n var require_la_utils = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+vincent-scaffold-sdk@1.1.7_@lit-protocol+vincent-app-sdk@packages+libs+ap_c1cf3244e0304dd8f5885a6ce39a89cf/node_modules/@lit-protocol/vincent-scaffold-sdk/dist/exports/la-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.laUtils = exports3.toEthAddress = exports3.signTx = exports3.sendTx = exports3.getNonce = exports3.nativeSend = exports3.sponsoredGasContractCall = exports3.contractCall = exports3.yellowstoneConfig = void 0;\n var yellowstoneConfig_1 = require_yellowstoneConfig();\n Object.defineProperty(exports3, \"yellowstoneConfig\", { enumerable: true, get: function() {\n return yellowstoneConfig_1.yellowstoneConfig;\n } });\n var contractCall_1 = require_contractCall();\n Object.defineProperty(exports3, \"contractCall\", { enumerable: true, get: function() {\n return contractCall_1.contractCall;\n } });\n var sponsoredGasContractCall_1 = require_sponsoredGasContractCall();\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return sponsoredGasContractCall_1.sponsoredGasContractCall;\n } });\n var getAlchemyChainConfig_1 = require_getAlchemyChainConfig();\n var nativeSend_1 = require_nativeSend();\n Object.defineProperty(exports3, \"nativeSend\", { enumerable: true, get: function() {\n return nativeSend_1.nativeSend;\n } });\n var getNonce_1 = require_getNonce();\n Object.defineProperty(exports3, \"getNonce\", { enumerable: true, get: function() {\n return getNonce_1.getNonce;\n } });\n var sendTx_1 = require_sendTx();\n Object.defineProperty(exports3, \"sendTx\", { enumerable: true, get: function() {\n return sendTx_1.sendTx;\n } });\n var signTx_1 = require_signTx();\n Object.defineProperty(exports3, \"signTx\", { enumerable: true, get: function() {\n return signTx_1.signTx;\n } });\n var toEthAddress_1 = require_toEthAddress();\n Object.defineProperty(exports3, \"toEthAddress\", { enumerable: true, get: function() {\n return toEthAddress_1.toEthAddress;\n } });\n exports3.laUtils = {\n chain: {\n yellowstoneConfig: yellowstoneConfig_1.yellowstoneConfig\n },\n transaction: {\n handler: {\n contractCall: contractCall_1.contractCall,\n sponsoredGasContractCall: sponsoredGasContractCall_1.sponsoredGasContractCall,\n nativeSend: nativeSend_1.nativeSend\n },\n primitive: {\n getNonce: getNonce_1.getNonce,\n sendTx: sendTx_1.sendTx,\n signTx: signTx_1.signTx\n }\n },\n helpers: {\n toEthAddress: toEthAddress_1.toEthAddress,\n getAlchemyChainConfig: getAlchemyChainConfig_1.getAlchemyChainConfig\n }\n };\n exports3.default = exports3.laUtils;\n }\n });\n\n // src/lib/lit-action.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk2 = __toESM(require_src2());\n\n // src/lib/vincent-ability.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk = __toESM(require_src2());\n\n // src/lib/schemas.ts\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n var MorphoOperation = /* @__PURE__ */ ((MorphoOperation2) => {\n MorphoOperation2[\"VAULT_DEPOSIT\"] = \"vault_deposit\";\n MorphoOperation2[\"VAULT_WITHDRAW\"] = \"vault_withdraw\";\n MorphoOperation2[\"VAULT_REDEEM\"] = \"vault_redeem\";\n MorphoOperation2[\"MARKET_SUPPLY\"] = \"market_supply\";\n MorphoOperation2[\"MARKET_WITHDRAW_COLLATERAL\"] = \"market_withdrawCollateral\";\n return MorphoOperation2;\n })(MorphoOperation || {});\n var abilityParamsSchema = external_exports.object({\n operation: external_exports.nativeEnum(MorphoOperation).describe(\n \"The Morpho operation to perform (vault_deposit, vault_withdraw, vault_redeem, market_supply, market_withdrawCollateral)\"\n ),\n contractAddress: external_exports.string().regex(/^0x[a-fA-F0-9]{40}$/, \"Invalid vault or market contract address\").describe(\"The address of the Morpho vault or market contract\"),\n marketId: external_exports.string().regex(/^0x[a-fA-F0-9]{64}$/, \"Invalid market ID\").optional().describe(\"The market ID (required for market operations)\"),\n amount: external_exports.string().regex(/^\\d*\\.?\\d+$/, \"Invalid amount format\").refine((val) => parseFloat(val) > 0, \"Amount must be greater than 0\").describe(\"The amount of tokens to deposit/withdraw/redeem, as a string\"),\n onBehalfOf: external_exports.string().regex(/^0x[a-fA-F0-9]{40}$/, \"Invalid address\").optional().describe(\"The address that will receive the vault shares (optional)\"),\n chain: external_exports.string().describe(\"The blockchain network where the vault is deployed\"),\n rpcUrl: external_exports.string().optional().describe(\"Custom RPC URL (optional, uses default if not provided)\"),\n // Gas sponsorship parameters for EIP-7702\n alchemyGasSponsor: external_exports.boolean().optional().default(false).describe(\"Whether to use Alchemy's gas sponsorship (EIP-7702)\"),\n alchemyGasSponsorApiKey: external_exports.string().optional().describe(\"Alchemy API key for gas sponsorship (required if alchemyGasSponsor is true)\"),\n alchemyGasSponsorPolicyId: external_exports.string().optional().describe(\"Alchemy gas policy ID for sponsorship (required if alchemyGasSponsor is true)\")\n });\n var precheckSuccessSchema = external_exports.object({\n operationValid: external_exports.boolean().describe(\"Whether the requested operation is valid\"),\n contractValid: external_exports.boolean().describe(\"Whether the specified vault or market contract address is valid\"),\n amountValid: external_exports.boolean().describe(\"Whether the specified amount is valid\"),\n userBalance: external_exports.string().optional().describe(\"The user's current balance of the underlying asset\"),\n allowance: external_exports.string().optional().describe(\"The current allowance approved for the contract\"),\n vaultShares: external_exports.string().optional().describe(\"The user's current balance of vault shares (for vault operations)\"),\n collateralBalance: external_exports.string().optional().describe(\"The user's collateral balance in the market (for market operations)\"),\n estimatedGas: external_exports.number().optional().describe(\"Estimated gas cost for the operation\")\n });\n var precheckFailSchema = external_exports.object({\n error: external_exports.string().describe(\"A string containing the error message if the precheck failed.\")\n });\n var executeSuccessSchema = external_exports.object({\n txHash: external_exports.string().describe(\"The transaction hash of the executed operation\"),\n operation: external_exports.nativeEnum(MorphoOperation).describe(\"The type of Morpho operation that was executed\"),\n contractAddress: external_exports.string().describe(\"The vault or market address of the contract involved in the operation\"),\n marketId: external_exports.string().optional().describe(\"The market ID for market operations\"),\n amount: external_exports.string().describe(\"The amount of tokens involved in the operation\"),\n timestamp: external_exports.number().describe(\"The Unix timestamp when the operation was executed\")\n });\n var executeFailSchema = external_exports.object({\n error: external_exports.string().describe(\"A string containing the error message if the execution failed.\")\n });\n\n // src/lib/helpers/index.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_scaffold_sdk = __toESM(require_la_utils());\n var import_ethers = __toESM(require_lib32());\n var CHAIN_IDS = {\n ethereum: 1,\n base: 8453,\n arbitrum: 42161,\n optimism: 10,\n polygon: 137,\n sepolia: 11155111\n };\n var ERC4626_VAULT_ABI = [\n // Deposit\n {\n inputs: [\n { internalType: \"uint256\", name: \"assets\", type: \"uint256\" },\n { internalType: \"address\", name: \"receiver\", type: \"address\" }\n ],\n name: \"deposit\",\n outputs: [{ internalType: \"uint256\", name: \"shares\", type: \"uint256\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n // Withdraw\n {\n inputs: [\n { internalType: \"uint256\", name: \"assets\", type: \"uint256\" },\n { internalType: \"address\", name: \"receiver\", type: \"address\" },\n { internalType: \"address\", name: \"owner\", type: \"address\" }\n ],\n name: \"withdraw\",\n outputs: [{ internalType: \"uint256\", name: \"shares\", type: \"uint256\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n // Redeem\n {\n inputs: [\n { internalType: \"uint256\", name: \"shares\", type: \"uint256\" },\n { internalType: \"address\", name: \"receiver\", type: \"address\" },\n { internalType: \"address\", name: \"owner\", type: \"address\" }\n ],\n name: \"redeem\",\n outputs: [{ internalType: \"uint256\", name: \"assets\", type: \"uint256\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n // Asset (underlying token address)\n {\n inputs: [],\n name: \"asset\",\n outputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n // Balance of shares\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 // Convert assets to shares\n {\n inputs: [{ internalType: \"uint256\", name: \"assets\", type: \"uint256\" }],\n name: \"convertToShares\",\n outputs: [{ internalType: \"uint256\", name: \"shares\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n // Convert shares to assets\n {\n inputs: [{ internalType: \"uint256\", name: \"shares\", type: \"uint256\" }],\n name: \"convertToAssets\",\n outputs: [{ internalType: \"uint256\", name: \"assets\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n // Total assets managed by the vault\n {\n inputs: [],\n name: \"totalAssets\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\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 var MORPHO_MARKET_ABI = [\n // Supply\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"loanToken\", type: \"address\" },\n { internalType: \"address\", name: \"collateralToken\", type: \"address\" },\n { internalType: \"address\", name: \"oracle\", type: \"address\" },\n { internalType: \"address\", name: \"irm\", type: \"address\" },\n { internalType: \"uint256\", name: \"lltv\", type: \"uint256\" }\n ],\n internalType: \"struct MarketParams\",\n name: \"marketParams\",\n type: \"tuple\"\n },\n { internalType: \"uint256\", name: \"assets\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"shares\", type: \"uint256\" },\n { internalType: \"address\", name: \"onBehalf\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" }\n ],\n name: \"supply\",\n outputs: [\n { internalType: \"uint256\", name: \"assetsSupplied\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"sharesSupplied\", type: \"uint256\" }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n // Withdraw Collateral\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"loanToken\", type: \"address\" },\n { internalType: \"address\", name: \"collateralToken\", type: \"address\" },\n { internalType: \"address\", name: \"oracle\", type: \"address\" },\n { internalType: \"address\", name: \"irm\", type: \"address\" },\n { internalType: \"uint256\", name: \"lltv\", type: \"uint256\" }\n ],\n internalType: \"struct MarketParams\",\n name: \"marketParams\",\n type: \"tuple\"\n },\n { internalType: \"uint256\", name: \"assets\", type: \"uint256\" },\n { internalType: \"address\", name: \"onBehalf\", type: \"address\" },\n { internalType: \"address\", name: \"receiver\", type: \"address\" }\n ],\n name: \"withdrawCollateral\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n // Position (to check collateral balance)\n {\n inputs: [\n { internalType: \"bytes32\", name: \"id\", type: \"bytes32\" },\n { internalType: \"address\", name: \"user\", type: \"address\" }\n ],\n name: \"position\",\n outputs: [\n { internalType: \"uint256\", name: \"supplyShares\", type: \"uint256\" },\n { internalType: \"uint128\", name: \"borrowShares\", type: \"uint128\" },\n { internalType: \"uint128\", name: \"collateral\", type: \"uint128\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n // Market (to check market info)\n {\n inputs: [{ internalType: \"bytes32\", name: \"id\", type: \"bytes32\" }],\n name: \"market\",\n outputs: [\n { internalType: \"uint128\", name: \"totalSupplyAssets\", type: \"uint128\" },\n { internalType: \"uint128\", name: \"totalSupplyShares\", type: \"uint128\" },\n { internalType: \"uint128\", name: \"totalBorrowAssets\", type: \"uint128\" },\n { internalType: \"uint128\", name: \"totalBorrowShares\", type: \"uint128\" },\n { internalType: \"uint128\", name: \"lastUpdate\", type: \"uint128\" },\n { internalType: \"uint128\", name: \"fee\", type: \"uint128\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n // IdToMarketParams (to get market params from ID)\n {\n inputs: [{ internalType: \"bytes32\", name: \"id\", type: \"bytes32\" }],\n name: \"idToMarketParams\",\n outputs: [\n { internalType: \"address\", name: \"loanToken\", type: \"address\" },\n { internalType: \"address\", name: \"collateralToken\", type: \"address\" },\n { internalType: \"address\", name: \"oracle\", type: \"address\" },\n { internalType: \"address\", name: \"irm\", type: \"address\" },\n { internalType: \"uint256\", name: \"lltv\", type: \"uint256\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n var ERC20_ABI = [\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: \"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: \"amount\", type: \"uint256\" }\n ],\n name: \"approve\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\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 function isValidAddress(address) {\n return /^0x[a-fA-F0-9]{40}$/.test(address);\n }\n function parseAmount(amount, decimals = 18) {\n return import_ethers.ethers.utils.parseUnits(amount, decimals).toString();\n }\n async function validateOperationRequirements(operation, userBalance, allowance, vaultShares, convertedAmount, collateralBalance) {\n const userBalanceBN = BigInt(userBalance);\n const allowanceBN = BigInt(allowance);\n const vaultSharesBN = BigInt(vaultShares);\n const convertedAmountBN = BigInt(convertedAmount);\n const collateralBalanceBN = collateralBalance ? BigInt(collateralBalance) : 0n;\n switch (operation) {\n case \"vault_deposit\":\n if (userBalanceBN < convertedAmountBN) {\n return {\n valid: false,\n error: `Insufficient balance for ${operation} operation. You have ${userBalance} and need ${convertedAmount}`\n };\n }\n if (allowanceBN < convertedAmountBN) {\n return {\n valid: false,\n error: `Insufficient allowance for ${operation} operation. Please approve vault to spend your tokens first. You have ${allowance} and need ${convertedAmount}`\n };\n }\n break;\n case \"vault_withdraw\":\n if (vaultSharesBN === 0n) {\n return {\n valid: false,\n error: \"No vault shares available for withdrawal\"\n };\n }\n break;\n case \"vault_redeem\":\n if (vaultSharesBN === 0n) {\n return {\n valid: false,\n error: \"No vault shares available for redeem\"\n };\n }\n if (vaultSharesBN < convertedAmountBN) {\n return {\n valid: false,\n error: `Insufficient vault shares for redeem operation. You have ${vaultShares} shares and need ${convertedAmount} shares`\n };\n }\n break;\n case \"market_supply\":\n if (userBalanceBN < convertedAmountBN) {\n return {\n valid: false,\n error: `Insufficient balance for market supply operation. You have ${userBalance} and need ${convertedAmount}`\n };\n }\n if (allowanceBN < convertedAmountBN) {\n return {\n valid: false,\n error: `Insufficient allowance for market supply operation. Please approve market to spend your tokens first. You have ${allowance} and need ${convertedAmount}`\n };\n }\n break;\n case \"market_withdrawCollateral\":\n if (collateralBalanceBN < convertedAmountBN) {\n return {\n valid: false,\n error: `Insufficient collateral balance for withdrawal. You have ${collateralBalance} and need ${convertedAmount}`\n };\n }\n break;\n default:\n return { valid: false, error: `Unsupported operation: ${operation}` };\n }\n return { valid: true };\n }\n var MorphoVaultClient = class {\n apiUrl = \"https://blue-api.morpho.org/graphql\";\n /**\n * Fetch vault data from Morpho GraphQL API\n */\n async fetchVaultData(query, variables) {\n try {\n const response = await fetch(this.apiUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n query,\n variables\n })\n });\n if (!response.ok) {\n const body = await response.text();\n throw new Error(`HTTP error! status: ${response.status} and body: ${body}`);\n }\n const data = await response.json();\n if (data.errors) {\n throw new Error(`GraphQL error: ${data.errors.map((e2) => e2.message).join(\", \")}`);\n }\n return data.data;\n } catch (error) {\n console.error(\"Failed to fetch vault data:\", error);\n throw error;\n }\n }\n /**\n * Get all vaults with comprehensive information\n * Now uses proper server-side filtering via GraphQL VaultFilters\n */\n async getAllVaults(options = {}) {\n const whereClause = this.buildVaultFilters(options);\n const query = `\n query GetAllVaults($first: Int, $orderBy: VaultOrderBy, $orderDirection: OrderDirection, $where: VaultFilters) {\n vaults(first: $first, orderBy: $orderBy, orderDirection: $orderDirection, where: $where) {\n items {\n address\n name\n symbol\n whitelisted\n creationTimestamp\n asset {\n address\n symbol\n name\n decimals\n }\n chain {\n id\n network\n }\n state {\n apy\n netApy\n totalAssets\n totalAssetsUsd\n fee\n rewards {\n asset {\n address\n symbol\n }\n supplyApr\n yearlySupplyTokens\n }\n }\n }\n }\n }\n `;\n const calculateFetchLimit = (requestedLimit) => {\n if (!requestedLimit)\n return 100;\n const cappedLimit = Math.min(requestedLimit, 1e3);\n if (options.excludeIdle) {\n return Math.max(cappedLimit, 1e3);\n }\n return cappedLimit;\n };\n const fetchLimit = calculateFetchLimit(options.limit);\n const variables = {\n first: fetchLimit,\n orderBy: this.mapSortBy(options.sortBy || \"totalAssetsUsd\"),\n orderDirection: options.sortOrder === \"asc\" ? \"Asc\" : \"Desc\",\n where: whereClause\n };\n const data = await this.fetchVaultData(query, variables);\n const vaults = data.vaults.items.map((vault) => this.mapVaultData(vault));\n const filtered = this.applyRemainingClientFilters(vaults, options);\n const finalResults = options.limit ? filtered.slice(0, options.limit) : filtered;\n if (options.limit && options.limit > 1e3 && finalResults.length < options.limit) {\n console.warn(\n `Warning: Requested ${options.limit} vaults but GraphQL API limit is 1000. Got ${finalResults.length} results.`\n );\n }\n return finalResults;\n }\n /**\n * Unified function to get vaults with flexible filtering\n * Supports filtering by asset, chain, and all other options\n */\n async getVaults(options = {}) {\n const enhancedOptions = { ...options };\n if (options.chainId) {\n enhancedOptions.chain = options.chainId;\n }\n return this.getAllVaults(enhancedOptions);\n }\n /**\n * Get top vaults by APY\n */\n async getTopVaultsByNetApy(limit = 10, minTvl = 0) {\n return this.getAllVaults({\n sortBy: \"netApy\",\n sortOrder: \"desc\",\n limit,\n minTvl,\n excludeIdle: true\n });\n }\n /**\n * Get top vaults by TVL\n */\n async getTopVaultsByTvl(limit = 10) {\n return this.getAllVaults({\n sortBy: \"totalAssetsUsd\",\n sortOrder: \"desc\",\n limit,\n excludeIdle: true\n });\n }\n /**\n * Search vaults by name, symbol, or asset\n */\n async searchVaults(searchOptions) {\n const allVaults = await this.getAllVaults({ limit: 500 });\n if (!searchOptions.query) {\n return allVaults.slice(0, searchOptions.limit || 50);\n }\n const query = searchOptions.query.toLowerCase();\n const filtered = allVaults.filter(\n (vault) => vault.name.toLowerCase().includes(query) || vault.symbol.toLowerCase().includes(query) || vault.asset.symbol.toLowerCase().includes(query) || vault.asset.name.toLowerCase().includes(query)\n );\n return filtered.slice(0, searchOptions.limit || 50);\n }\n /**\n * Get vault details by address\n */\n async getVaultByAddress(address, chainId) {\n const query = `\n query GetVaultByAddress($address: String!, $chainId: Int!) {\n vaultByAddress(address: $address, chainId: $chainId) {\n address\n name\n symbol\n whitelisted\n creationTimestamp\n asset {\n address\n symbol\n name\n decimals\n }\n chain {\n id\n network\n }\n state {\n apy\n netApy\n totalAssets\n totalAssetsUsd\n fee\n rewards {\n asset {\n address\n symbol\n }\n supplyApr\n yearlySupplyTokens\n }\n }\n }\n }\n `;\n const variables = { address, chainId };\n try {\n const data = await this.fetchVaultData(query, variables);\n return data.vaultByAddress ? this.mapVaultData(data.vaultByAddress) : null;\n } catch (error) {\n console.error(`Failed to fetch vault ${address}:`, error);\n return null;\n }\n }\n /**\n * Get best vaults for a specific asset\n */\n async getBestVaultsForAsset(assetSymbol, limit = 5) {\n const vaults = await this.getAllVaults({\n sortBy: \"netApy\",\n sortOrder: \"desc\",\n limit: 100,\n minTvl: 1e4,\n // Minimum $10k TVL\n excludeIdle: true\n });\n return vaults.filter((vault) => vault.asset.symbol.toLowerCase() === assetSymbol.toLowerCase()).slice(0, limit);\n }\n /**\n * Map vault data from GraphQL response\n */\n mapVaultData(vault) {\n return {\n address: vault.address,\n name: vault.name,\n symbol: vault.symbol,\n asset: {\n address: vault.asset.address,\n symbol: vault.asset.symbol,\n name: vault.asset.name,\n decimals: vault.asset.decimals\n },\n chain: {\n id: vault.chain.id,\n network: vault.chain.network\n },\n metrics: {\n apy: vault.state.apy || 0,\n netApy: vault.state.netApy || 0,\n totalAssets: vault.state.totalAssets || \"0\",\n totalAssetsUsd: vault.state.totalAssetsUsd || 0,\n fee: vault.state.fee || 0,\n rewards: vault.state.rewards?.map((reward) => ({\n asset: reward.asset.address,\n supplyApr: reward.supplyApr,\n yearlySupplyTokens: reward.yearlySupplyTokens\n })) || []\n },\n whitelisted: vault.whitelisted,\n creationTimestamp: vault.creationTimestamp,\n isIdle: vault.state.totalAssetsUsd < 100\n // Consider vaults with < $100 TVL as idle\n };\n }\n /**\n * Build GraphQL VaultFilters from filter options\n * Uses proper server-side filtering for better performance\n */\n buildVaultFilters(options) {\n const filters = {};\n if (options.chain !== void 0 || options.chainId !== void 0) {\n let targetChainId;\n if (options.chainId !== void 0) {\n targetChainId = options.chainId;\n } else if (options.chain !== void 0) {\n targetChainId = typeof options.chain === \"string\" ? CHAIN_IDS[options.chain] : options.chain;\n }\n if (targetChainId !== void 0) {\n filters.chainId_in = [targetChainId];\n }\n }\n if (options.assetAddress) {\n filters.assetAddress_in = [options.assetAddress.toLowerCase()];\n }\n if (options.assetSymbol) {\n filters.assetSymbol_in = [options.assetSymbol.toUpperCase()];\n }\n if (options.whitelistedOnly) {\n filters.whitelisted = true;\n }\n if (options.minNetApy !== void 0) {\n filters.netApy_gte = options.minNetApy;\n }\n if (options.maxNetApy !== void 0) {\n filters.netApy_lte = options.maxNetApy;\n }\n if (options.minTvl !== void 0) {\n filters.totalAssetsUsd_gte = options.minTvl;\n }\n if (options.maxTvl !== void 0) {\n filters.totalAssetsUsd_lte = options.maxTvl;\n }\n if (options.minTotalAssets !== void 0) {\n filters.totalAssets_gte = options.minTotalAssets.toString();\n }\n if (options.maxTotalAssets !== void 0) {\n filters.totalAssets_lte = options.maxTotalAssets.toString();\n }\n return Object.keys(filters).length > 0 ? filters : null;\n }\n /**\n * Apply remaining client-side filters not supported by GraphQL\n * Only handles computed properties like isIdle\n */\n applyRemainingClientFilters(vaults, options) {\n let filtered = vaults;\n if (options.excludeIdle) {\n filtered = filtered.filter((vault) => !vault.isIdle);\n }\n return filtered;\n }\n /**\n * Map sortBy option to GraphQL enum\n */\n mapSortBy(sortBy) {\n switch (sortBy) {\n case \"netApy\":\n return \"NetApy\";\n case \"totalAssets\":\n return \"TotalAssets\";\n case \"totalAssetsUsd\":\n return \"TotalAssetsUsd\";\n case \"creationTimestamp\":\n return \"CreationTimestamp\";\n default:\n return \"TotalAssetsUsd\";\n }\n }\n };\n var morphoVaultClient = new MorphoVaultClient();\n async function executeMorphoMarketOperation({\n provider,\n pkpPublicKey,\n marketAddress,\n marketId,\n functionName,\n args,\n chainId,\n alchemyGasSponsor,\n alchemyGasSponsorApiKey,\n alchemyGasSponsorPolicyId\n }) {\n console.log(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoMarketOperation] Starting ${functionName} operation`,\n { sponsored: !!alchemyGasSponsor, marketId }\n );\n if (alchemyGasSponsor && alchemyGasSponsorApiKey && alchemyGasSponsorPolicyId) {\n console.log(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoMarketOperation] Using EIP-7702 gas sponsorship`,\n { marketAddress, functionName, args, policyId: alchemyGasSponsorPolicyId }\n );\n try {\n return await import_vincent_scaffold_sdk.laUtils.transaction.handler.sponsoredGasContractCall({\n pkpPublicKey,\n abi: MORPHO_MARKET_ABI,\n contractAddress: marketAddress,\n functionName,\n args,\n chainId,\n eip7702AlchemyApiKey: alchemyGasSponsorApiKey,\n eip7702AlchemyPolicyId: alchemyGasSponsorPolicyId\n });\n } catch (error) {\n console.error(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoMarketOperation] EIP-7702 operation failed:`,\n error\n );\n throw error;\n }\n } else {\n console.log(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoMarketOperation] Using regular transaction`\n );\n if (!provider) {\n throw new Error(\"Provider is required for non-sponsored transactions\");\n }\n try {\n return await import_vincent_scaffold_sdk.laUtils.transaction.handler.contractCall({\n provider,\n pkpPublicKey,\n callerAddress: import_ethers.ethers.utils.computeAddress(pkpPublicKey),\n abi: MORPHO_MARKET_ABI,\n contractAddress: marketAddress,\n functionName,\n args,\n chainId\n });\n } catch (error) {\n console.error(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoMarketOperation] Regular transaction failed:`,\n error\n );\n throw error;\n }\n }\n }\n async function executeMorphoVaultOperation({\n provider,\n pkpPublicKey,\n vaultAddress,\n functionName,\n args,\n chainId,\n alchemyGasSponsor,\n alchemyGasSponsorApiKey,\n alchemyGasSponsorPolicyId\n }) {\n console.log(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoVaultOperation] Starting ${functionName} operation`,\n { sponsored: !!alchemyGasSponsor }\n );\n if (alchemyGasSponsor && alchemyGasSponsorApiKey && alchemyGasSponsorPolicyId) {\n console.log(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoVaultOperation] Using EIP-7702 gas sponsorship`,\n { vaultAddress, functionName, args, policyId: alchemyGasSponsorPolicyId }\n );\n try {\n return await import_vincent_scaffold_sdk.laUtils.transaction.handler.sponsoredGasContractCall({\n pkpPublicKey,\n abi: ERC4626_VAULT_ABI,\n contractAddress: vaultAddress,\n functionName,\n args,\n chainId,\n eip7702AlchemyApiKey: alchemyGasSponsorApiKey,\n eip7702AlchemyPolicyId: alchemyGasSponsorPolicyId\n });\n } catch (error) {\n console.error(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoVaultOperation] EIP-7702 operation failed:`,\n error\n );\n throw error;\n }\n } else {\n console.log(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoVaultOperation] Using regular transaction`\n );\n if (!provider) {\n throw new Error(\"Provider is required for non-sponsored transactions\");\n }\n try {\n return await import_vincent_scaffold_sdk.laUtils.transaction.handler.contractCall({\n provider,\n pkpPublicKey,\n callerAddress: import_ethers.ethers.utils.computeAddress(pkpPublicKey),\n abi: ERC4626_VAULT_ABI,\n contractAddress: vaultAddress,\n functionName,\n args,\n chainId\n });\n } catch (error) {\n console.error(\n `[@lit-protocol/vincent-ability-morpho/executeMorphoVaultOperation] Regular transaction failed:`,\n error\n );\n throw error;\n }\n }\n }\n\n // src/lib/vincent-ability.ts\n var import_ethers2 = __toESM(require_lib32());\n var vincentAbility = (0, import_vincent_ability_sdk.createVincentAbility)({\n packageName: \"@lit-protocol/vincent-ability-morpho\",\n abilityDescription: \"Interact with Morpho Vaults (deposit, withdraw, redeem) and Markets (supply, withdrawCollateral).\",\n abilityParamsSchema,\n supportedPolicies: (0, import_vincent_ability_sdk.supportedPoliciesForAbility)([]),\n precheckSuccessSchema,\n precheckFailSchema,\n executeSuccessSchema,\n executeFailSchema,\n precheck: async ({ abilityParams: abilityParams2 }, { succeed, fail, delegation: { delegatorPkpInfo } }) => {\n try {\n console.log(\"[@lit-protocol/vincent-ability-morpho/precheck]\");\n console.log(\"[@lit-protocol/vincent-ability-morpho/precheck] params:\", {\n abilityParams: abilityParams2\n });\n const { operation, contractAddress, marketId, amount, onBehalfOf, rpcUrl } = abilityParams2;\n if (!Object.values(MorphoOperation).includes(operation)) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/precheck] Invalid operation. Must be vault_deposit, vault_withdraw, vault_redeem, market_supply, or market_withdrawCollateral\"\n });\n }\n const isMarketOperation = [\n \"market_supply\" /* MARKET_SUPPLY */,\n \"market_withdrawCollateral\" /* MARKET_WITHDRAW_COLLATERAL */\n ].includes(operation);\n if (isMarketOperation && !marketId) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/precheck] Market ID is required for market operations\"\n });\n }\n if (!isValidAddress(contractAddress)) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/precheck] Invalid contract address format\"\n });\n }\n if (!amount || isNaN(parseFloat(amount)) || parseFloat(amount) <= 0) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/precheck] Invalid amount format or amount must be greater than 0\"\n });\n }\n console.log(\n \"[@lit-protocol/vincent-ability-morpho/precheck] Starting enhanced validation...\"\n );\n if (!rpcUrl) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/precheck] RPC URL is required for precheck\"\n });\n }\n let provider;\n try {\n provider = new import_ethers2.ethers.providers.JsonRpcProvider(rpcUrl);\n } catch (error) {\n return fail({\n error: `[@lit-protocol/vincent-ability-morpho/precheck] Unable to obtain blockchain provider: ${error instanceof Error ? error.message : String(error)}`\n });\n }\n const pkpAddress = delegatorPkpInfo.ethAddress;\n let assetAddress;\n let assetDecimals;\n let userBalance = \"0\";\n let allowance = \"0\";\n let vaultShares = \"0\";\n let collateralBalance = \"0\";\n try {\n if (isMarketOperation) {\n const marketContract = new import_ethers2.ethers.Contract(contractAddress, MORPHO_MARKET_ABI, provider);\n const marketParams = await marketContract.idToMarketParams(marketId);\n assetAddress = operation === \"market_supply\" /* MARKET_SUPPLY */ ? marketParams.loanToken : marketParams.collateralToken;\n const position = await marketContract.position(marketId, pkpAddress);\n collateralBalance = position.collateral.toString();\n const assetContract = new import_ethers2.ethers.Contract(assetAddress, ERC20_ABI, provider);\n assetDecimals = await assetContract.decimals();\n userBalance = (await assetContract.balanceOf(pkpAddress)).toString();\n allowance = (await assetContract.allowance(pkpAddress, contractAddress)).toString();\n } else {\n const vaultContract = new import_ethers2.ethers.Contract(contractAddress, ERC4626_VAULT_ABI, provider);\n assetAddress = await vaultContract.asset();\n vaultShares = (await vaultContract.balanceOf(pkpAddress)).toString();\n const assetContract = new import_ethers2.ethers.Contract(assetAddress, ERC20_ABI, provider);\n userBalance = (await assetContract.balanceOf(pkpAddress)).toString();\n allowance = (await assetContract.allowance(pkpAddress, contractAddress)).toString();\n if (operation === \"vault_redeem\" /* VAULT_REDEEM */) {\n assetDecimals = await vaultContract.decimals();\n } else {\n assetDecimals = await assetContract.decimals();\n }\n }\n } catch (error) {\n return fail({\n error: `[@lit-protocol/vincent-ability-morpho/precheck] Invalid contract address or contract not found on network: ${error}`\n });\n }\n const convertedAmount = parseAmount(amount, assetDecimals);\n const operationChecks = await validateOperationRequirements(\n operation,\n userBalance,\n allowance,\n vaultShares,\n convertedAmount,\n collateralBalance\n );\n if (!operationChecks.valid) {\n return fail({\n error: `[@lit-protocol/vincent-ability-morpho/precheck] ${operationChecks.error}`\n });\n }\n let estimatedGas = 0;\n try {\n const targetAddress = onBehalfOf || pkpAddress;\n if (isMarketOperation) {\n const marketContract = new import_ethers2.ethers.Contract(contractAddress, MORPHO_MARKET_ABI, provider);\n const marketParams = await marketContract.idToMarketParams(marketId);\n const marketParamsTuple = [\n marketParams.loanToken,\n marketParams.collateralToken,\n marketParams.oracle,\n marketParams.irm,\n marketParams.lltv\n ];\n switch (operation) {\n case \"market_supply\" /* MARKET_SUPPLY */:\n estimatedGas = (await marketContract.estimateGas.supply(\n marketParamsTuple,\n convertedAmount,\n 0,\n // shares (0 means all assets)\n targetAddress,\n \"0x\",\n // empty data\n { from: pkpAddress }\n )).toNumber();\n break;\n case \"market_withdrawCollateral\" /* MARKET_WITHDRAW_COLLATERAL */:\n estimatedGas = (await marketContract.estimateGas.withdrawCollateral(\n marketParamsTuple,\n convertedAmount,\n pkpAddress,\n pkpAddress,\n { from: pkpAddress }\n )).toNumber();\n break;\n }\n } else {\n const vaultContract = new import_ethers2.ethers.Contract(contractAddress, ERC4626_VAULT_ABI, provider);\n switch (operation) {\n case \"vault_deposit\" /* VAULT_DEPOSIT */:\n estimatedGas = (await vaultContract.estimateGas.deposit(convertedAmount, targetAddress, {\n from: pkpAddress\n })).toNumber();\n break;\n case \"vault_withdraw\" /* VAULT_WITHDRAW */:\n estimatedGas = (await vaultContract.estimateGas.withdraw(convertedAmount, pkpAddress, pkpAddress, {\n from: pkpAddress\n })).toNumber();\n break;\n case \"vault_redeem\" /* VAULT_REDEEM */:\n estimatedGas = (await vaultContract.estimateGas.redeem(convertedAmount, pkpAddress, pkpAddress, {\n from: pkpAddress\n })).toNumber();\n break;\n }\n }\n } catch (error) {\n console.warn(\n \"[@lit-protocol/vincent-ability-morpho/precheck] Gas estimation failed:\",\n error\n );\n return fail({\n error: `[@lit-protocol/vincent-ability-morpho/precheck] Gas estimation failed: ${error instanceof Error ? error.message : String(error)}`\n });\n }\n const successResult = {\n operationValid: true,\n contractValid: true,\n amountValid: true,\n userBalance,\n allowance,\n vaultShares: isMarketOperation ? void 0 : vaultShares,\n collateralBalance: isMarketOperation ? collateralBalance : void 0,\n estimatedGas\n };\n console.log(\n \"[@lit-protocol/vincent-ability-morpho/precheck] Enhanced validation successful:\",\n successResult\n );\n return succeed(successResult);\n } catch (error) {\n console.error(\"[@lit-protocol/vincent-ability-morpho/precheck] Error:\", error);\n return fail({\n error: `[@lit-protocol/vincent-ability-morpho/precheck] Validation failed: ${error instanceof Error ? error.message : \"Unknown error\"}`\n });\n }\n },\n execute: async ({ abilityParams: abilityParams2 }, { succeed, fail, delegation }) => {\n try {\n const {\n operation,\n contractAddress,\n marketId,\n amount,\n onBehalfOf,\n chain: chain2,\n rpcUrl,\n alchemyGasSponsor,\n alchemyGasSponsorApiKey,\n alchemyGasSponsorPolicyId\n } = abilityParams2;\n console.log(\"[@lit-protocol/vincent-ability-morpho/execute] Executing Morpho Ability\", {\n operation,\n contractAddress,\n marketId,\n amount,\n chain: chain2\n });\n if (rpcUrl) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/execute] RPC URL is not permitted for execute. Use the `chain` parameter, and the Lit Nodes will provide the RPC URL for you with the Lit.Actions.getRpcUrl() function\"\n });\n }\n if (alchemyGasSponsor && (!alchemyGasSponsorApiKey || !alchemyGasSponsorPolicyId)) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/execute] Alchemy gas sponsor is enabled, but missing Alchemy API key or policy ID\"\n });\n }\n let provider;\n try {\n provider = new import_ethers2.ethers.providers.JsonRpcProvider(await Lit.Actions.getRpcUrl({ chain: chain2 }));\n } catch (error) {\n console.error(\"[@lit-protocol/vincent-ability-morpho/execute] Provider error:\", error);\n throw new Error(\"Unable to obtain blockchain provider for Morpho operations\");\n }\n const { chainId } = await provider.getNetwork();\n const isMarketOperation = [\n \"market_supply\" /* MARKET_SUPPLY */,\n \"market_withdrawCollateral\" /* MARKET_WITHDRAW_COLLATERAL */\n ].includes(operation);\n let assetAddress;\n let assetDecimals;\n if (isMarketOperation) {\n const marketContract = new import_ethers2.ethers.Contract(contractAddress, MORPHO_MARKET_ABI, provider);\n const marketParams = await marketContract.idToMarketParams(marketId);\n assetAddress = operation === \"market_supply\" /* MARKET_SUPPLY */ ? marketParams.loanToken : marketParams.collateralToken;\n const assetContract = new import_ethers2.ethers.Contract(assetAddress, ERC20_ABI, provider);\n assetDecimals = await assetContract.decimals();\n } else {\n const vaultContract = new import_ethers2.ethers.Contract(contractAddress, ERC4626_VAULT_ABI, provider);\n assetAddress = await vaultContract.asset();\n const assetContract = new import_ethers2.ethers.Contract(assetAddress, ERC20_ABI, provider);\n if (operation === \"vault_redeem\" /* VAULT_REDEEM */) {\n assetDecimals = await vaultContract.decimals();\n } else {\n assetDecimals = await assetContract.decimals();\n }\n }\n console.log(\"[@lit-protocol/vincent-ability-morpho/execute] Asset decimals:\", assetDecimals);\n const convertedAmount = parseAmount(amount, assetDecimals);\n console.log(\n \"[@lit-protocol/vincent-ability-morpho/execute] Converted amount:\",\n convertedAmount\n );\n const pkpPublicKey = delegation.delegatorPkpInfo.publicKey;\n if (!pkpPublicKey) {\n throw new Error(\"PKP public key not available from delegation context\");\n }\n const pkpAddress = import_ethers2.ethers.utils.computeAddress(pkpPublicKey);\n console.log(\"[@lit-protocol/vincent-ability-morpho/execute] PKP Address:\", pkpAddress);\n let txHash;\n if (isMarketOperation) {\n if (!marketId) {\n return fail({\n error: \"[@lit-protocol/vincent-ability-morpho/execute] Market ID is required for market operations\"\n });\n }\n const marketContract = new import_ethers2.ethers.Contract(contractAddress, MORPHO_MARKET_ABI, provider);\n const marketParams = await marketContract.idToMarketParams(marketId);\n const marketParamsTuple = [\n marketParams.loanToken,\n marketParams.collateralToken,\n marketParams.oracle,\n marketParams.irm,\n marketParams.lltv\n ];\n let functionName;\n let args;\n switch (operation) {\n case \"market_supply\" /* MARKET_SUPPLY */:\n functionName = \"supply\";\n args = [\n marketParamsTuple,\n convertedAmount,\n 0,\n // shares (0 means all assets)\n onBehalfOf || pkpAddress,\n \"0x\"\n // empty data\n ];\n break;\n case \"market_withdrawCollateral\" /* MARKET_WITHDRAW_COLLATERAL */:\n functionName = \"withdrawCollateral\";\n args = [marketParamsTuple, convertedAmount, pkpAddress, pkpAddress];\n break;\n default:\n throw new Error(`Unsupported market operation: ${operation}`);\n }\n txHash = await executeMorphoMarketOperation({\n provider,\n pkpPublicKey,\n marketAddress: contractAddress,\n marketId,\n functionName,\n args,\n chainId,\n alchemyGasSponsor,\n alchemyGasSponsorApiKey,\n alchemyGasSponsorPolicyId\n });\n } else {\n let functionName;\n let args;\n switch (operation) {\n case \"vault_deposit\" /* VAULT_DEPOSIT */:\n functionName = \"deposit\";\n args = [convertedAmount, onBehalfOf || pkpAddress];\n break;\n case \"vault_withdraw\" /* VAULT_WITHDRAW */:\n functionName = \"withdraw\";\n args = [convertedAmount, pkpAddress, pkpAddress];\n break;\n case \"vault_redeem\" /* VAULT_REDEEM */:\n functionName = \"redeem\";\n args = [convertedAmount, pkpAddress, pkpAddress];\n break;\n default:\n throw new Error(`Unsupported vault operation: ${operation}`);\n }\n txHash = await executeMorphoVaultOperation({\n provider,\n pkpPublicKey,\n vaultAddress: contractAddress,\n functionName,\n args,\n chainId,\n alchemyGasSponsor,\n alchemyGasSponsorApiKey,\n alchemyGasSponsorPolicyId\n });\n }\n console.log(\"[@lit-protocol/vincent-ability-morpho/execute] Morpho operation successful\", {\n txHash,\n operation,\n contractAddress,\n marketId,\n amount\n });\n return succeed({\n txHash,\n operation,\n contractAddress,\n marketId: isMarketOperation ? marketId : void 0,\n amount,\n timestamp: Date.now()\n });\n } catch (error) {\n console.error(\n \"[@lit-protocol/vincent-ability-morpho/execute] Morpho operation failed\",\n error\n );\n return fail({\n error: error instanceof Error ? error.message : \"Unknown error occurred\"\n });\n }\n }\n });\n\n // src/lib/lit-action.ts\n (async () => {\n const func = (0, import_vincent_ability_sdk2.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/esm/utils.js:\n (*! noble-hashes - 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\nalchemy-sdk/dist/esm/index-f73a5f29.js:\n (*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n \n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n \n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** *)\n\njs-cookie/dist/js.cookie.mjs:\n (*! js-cookie v3.0.1 | MIT *)\n\n@segment/analytics-next/dist/pkg/vendor/tsub/tsub.js:\n (*! For license information please see tsub.js.LICENSE.txt *)\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"; module.exports = { "code": code, - "ipfsCid": "QmdncJ71t5Bxri6PUxBsBR3ibWewkDgoRWg1t3X3QoYKKi", + "ipfsCid": "QmYFVgnW8wgDJonoGwBW5JNfj8vUW2x84MQyokHWwefbjk", }; diff --git a/packages/apps/ability-morpho/src/generated/vincent-ability-metadata.json b/packages/apps/ability-morpho/src/generated/vincent-ability-metadata.json index b4b1bb1f2..142a60c62 100644 --- a/packages/apps/ability-morpho/src/generated/vincent-ability-metadata.json +++ b/packages/apps/ability-morpho/src/generated/vincent-ability-metadata.json @@ -1,3 +1,3 @@ { - "ipfsCid": "QmdncJ71t5Bxri6PUxBsBR3ibWewkDgoRWg1t3X3QoYKKi" + "ipfsCid": "QmYFVgnW8wgDJonoGwBW5JNfj8vUW2x84MQyokHWwefbjk" } diff --git a/packages/apps/ability-morpho/src/lib/helpers/index.ts b/packages/apps/ability-morpho/src/lib/helpers/index.ts index d46691ab1..f1ffd0083 100644 --- a/packages/apps/ability-morpho/src/lib/helpers/index.ts +++ b/packages/apps/ability-morpho/src/lib/helpers/index.ts @@ -1,6 +1,8 @@ import { laUtils } from '@lit-protocol/vincent-scaffold-sdk'; import { ethers } from 'ethers'; +import { MorphoOperation } from '../schemas'; + /** * Well-known token addresses across different chains * Using official Circle USDC and canonical WETH addresses @@ -161,12 +163,114 @@ export const ERC4626_VAULT_ABI: any[] = [ stateMutability: 'view', type: 'function', }, -]; +] as const; + +/** + * Morpho Market ABI - Essential methods for supply and withdraw operations + */ +export const MORPHO_MARKET_ABI: any[] = [ + // Supply + { + inputs: [ + { + components: [ + { internalType: 'address', name: 'loanToken', type: 'address' }, + { internalType: 'address', name: 'collateralToken', type: 'address' }, + { internalType: 'address', name: 'oracle', type: 'address' }, + { internalType: 'address', name: 'irm', type: 'address' }, + { internalType: 'uint256', name: 'lltv', type: 'uint256' }, + ], + internalType: 'struct MarketParams', + name: 'marketParams', + type: 'tuple', + }, + { internalType: 'uint256', name: 'assets', type: 'uint256' }, + { internalType: 'uint256', name: 'shares', type: 'uint256' }, + { internalType: 'address', name: 'onBehalf', type: 'address' }, + { internalType: 'bytes', name: 'data', type: 'bytes' }, + ], + name: 'supply', + outputs: [ + { internalType: 'uint256', name: 'assetsSupplied', type: 'uint256' }, + { internalType: 'uint256', name: 'sharesSupplied', type: 'uint256' }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + // Withdraw Collateral + { + inputs: [ + { + components: [ + { internalType: 'address', name: 'loanToken', type: 'address' }, + { internalType: 'address', name: 'collateralToken', type: 'address' }, + { internalType: 'address', name: 'oracle', type: 'address' }, + { internalType: 'address', name: 'irm', type: 'address' }, + { internalType: 'uint256', name: 'lltv', type: 'uint256' }, + ], + internalType: 'struct MarketParams', + name: 'marketParams', + type: 'tuple', + }, + { internalType: 'uint256', name: 'assets', type: 'uint256' }, + { internalType: 'address', name: 'onBehalf', type: 'address' }, + { internalType: 'address', name: 'receiver', type: 'address' }, + ], + name: 'withdrawCollateral', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + // Position (to check collateral balance) + { + inputs: [ + { internalType: 'bytes32', name: 'id', type: 'bytes32' }, + { internalType: 'address', name: 'user', type: 'address' }, + ], + name: 'position', + outputs: [ + { internalType: 'uint256', name: 'supplyShares', type: 'uint256' }, + { internalType: 'uint128', name: 'borrowShares', type: 'uint128' }, + { internalType: 'uint128', name: 'collateral', type: 'uint128' }, + ], + stateMutability: 'view', + type: 'function', + }, + // Market (to check market info) + { + inputs: [{ internalType: 'bytes32', name: 'id', type: 'bytes32' }], + name: 'market', + outputs: [ + { internalType: 'uint128', name: 'totalSupplyAssets', type: 'uint128' }, + { internalType: 'uint128', name: 'totalSupplyShares', type: 'uint128' }, + { internalType: 'uint128', name: 'totalBorrowAssets', type: 'uint128' }, + { internalType: 'uint128', name: 'totalBorrowShares', type: 'uint128' }, + { internalType: 'uint128', name: 'lastUpdate', type: 'uint128' }, + { internalType: 'uint128', name: 'fee', type: 'uint128' }, + ], + stateMutability: 'view', + type: 'function', + }, + // IdToMarketParams (to get market params from ID) + { + inputs: [{ internalType: 'bytes32', name: 'id', type: 'bytes32' }], + name: 'idToMarketParams', + outputs: [ + { internalType: 'address', name: 'loanToken', type: 'address' }, + { internalType: 'address', name: 'collateralToken', type: 'address' }, + { internalType: 'address', name: 'oracle', type: 'address' }, + { internalType: 'address', name: 'irm', type: 'address' }, + { internalType: 'uint256', name: 'lltv', type: 'uint256' }, + ], + stateMutability: 'view', + type: 'function', + }, +] as const; /** * ERC20 Token ABI - Essential methods only */ -export const ERC20_ABI: any[] = [ +export const ERC20_ABI = [ { inputs: [{ internalType: 'address', name: 'account', type: 'address' }], name: 'balanceOf', @@ -201,7 +305,7 @@ export const ERC20_ABI: any[] = [ stateMutability: 'view', type: 'function', }, -]; +] as const; /** * Supported chain type @@ -346,39 +450,41 @@ export function formatAmount(amount: string, decimals = 18): string { } /** - * Validate operation-specific requirements for Morpho vaults + * Validate operation-specific requirements for Morpho vaults and markets */ export async function validateOperationRequirements( - operation: string, + operation: MorphoOperation, userBalance: string, allowance: string, vaultShares: string, convertedAmount: string, + collateralBalance?: string, ): Promise<{ valid: boolean; error?: string }> { const userBalanceBN = BigInt(userBalance); const allowanceBN = BigInt(allowance); const vaultSharesBN = BigInt(vaultShares); const convertedAmountBN = BigInt(convertedAmount); + const collateralBalanceBN = collateralBalance ? BigInt(collateralBalance) : 0n; switch (operation) { - case 'deposit': + case 'vault_deposit': // Check if user has enough balance if (userBalanceBN < convertedAmountBN) { return { valid: false, - error: `Insufficient balance for deposit operation. You have ${userBalance} and need ${convertedAmount}`, + error: `Insufficient balance for ${operation} operation. You have ${userBalance} and need ${convertedAmount}`, }; } // Check if user has approved vault to spend tokens if (allowanceBN < convertedAmountBN) { return { valid: false, - error: `Insufficient allowance for deposit operation. Please approve vault to spend your tokens first. You have ${allowance} and need ${convertedAmount}`, + error: `Insufficient allowance for ${operation} operation. Please approve vault to spend your tokens first. You have ${allowance} and need ${convertedAmount}`, }; } break; - case 'withdraw': + case 'vault_withdraw': // For withdraw, we need to check if user has enough vault shares if (vaultSharesBN === 0n) { return { @@ -389,7 +495,7 @@ export async function validateOperationRequirements( // Note: We'll need to convert the amount to shares in the actual implementation break; - case 'redeem': + case 'vault_redeem': // For redeem, we need to check if user has enough vault shares if (vaultSharesBN === 0n) { return { @@ -406,6 +512,33 @@ export async function validateOperationRequirements( } break; + case 'market_supply': + // Check if user has enough balance + if (userBalanceBN < convertedAmountBN) { + return { + valid: false, + error: `Insufficient balance for market supply operation. You have ${userBalance} and need ${convertedAmount}`, + }; + } + // Check if user has approved market to spend tokens + if (allowanceBN < convertedAmountBN) { + return { + valid: false, + error: `Insufficient allowance for market supply operation. Please approve market to spend your tokens first. You have ${allowance} and need ${convertedAmount}`, + }; + } + break; + + case 'market_withdrawCollateral': + // Check if user has enough collateral balance + if (collateralBalanceBN < convertedAmountBN) { + return { + valid: false, + error: `Insufficient collateral balance for withdrawal. You have ${collateralBalance} and need ${convertedAmount}`, + }; + } + break; + default: return { valid: false, error: `Unsupported operation: ${operation}` }; } @@ -1184,9 +1317,96 @@ export async function getVaultDiscoverySummary(chainId: number) { } /** - * Generic function to execute any Morpho operation, with optional gas sponsorship + * Execute Morpho market operations (supply/withdrawCollateral) + */ +export async function executeMorphoMarketOperation({ + provider, + pkpPublicKey, + marketAddress, + marketId, + functionName, + args, + chainId, + alchemyGasSponsor, + alchemyGasSponsorApiKey, + alchemyGasSponsorPolicyId, +}: { + provider?: ethers.providers.JsonRpcProvider; + pkpPublicKey: string; + marketAddress: string; + marketId: string; + functionName: string; + args: any[]; + chainId: number; + alchemyGasSponsor?: boolean; + alchemyGasSponsorApiKey?: string; + alchemyGasSponsorPolicyId?: string; +}): Promise { + console.log( + `[@lit-protocol/vincent-ability-morpho/executeMorphoMarketOperation] Starting ${functionName} operation`, + { sponsored: !!alchemyGasSponsor, marketId }, + ); + + // Use gas sponsorship if enabled and all required parameters are provided + if (alchemyGasSponsor && alchemyGasSponsorApiKey && alchemyGasSponsorPolicyId) { + console.log( + `[@lit-protocol/vincent-ability-morpho/executeMorphoMarketOperation] Using EIP-7702 gas sponsorship`, + { marketAddress, functionName, args, policyId: alchemyGasSponsorPolicyId }, + ); + + try { + return await laUtils.transaction.handler.sponsoredGasContractCall({ + pkpPublicKey, + abi: MORPHO_MARKET_ABI, + contractAddress: marketAddress, + functionName, + args, + chainId, + eip7702AlchemyApiKey: alchemyGasSponsorApiKey, + eip7702AlchemyPolicyId: alchemyGasSponsorPolicyId, + }); + } catch (error) { + console.error( + `[@lit-protocol/vincent-ability-morpho/executeMorphoMarketOperation] EIP-7702 operation failed:`, + error, + ); + throw error; + } + } else { + // Use regular transaction without gas sponsorship + console.log( + `[@lit-protocol/vincent-ability-morpho/executeMorphoMarketOperation] Using regular transaction`, + ); + + if (!provider) { + throw new Error('Provider is required for non-sponsored transactions'); + } + + try { + return await laUtils.transaction.handler.contractCall({ + provider, + pkpPublicKey, + callerAddress: ethers.utils.computeAddress(pkpPublicKey), + abi: MORPHO_MARKET_ABI, + contractAddress: marketAddress, + functionName, + args, + chainId, + }); + } catch (error) { + console.error( + `[@lit-protocol/vincent-ability-morpho/executeMorphoMarketOperation] Regular transaction failed:`, + error, + ); + throw error; + } + } +} + +/** + * Generic function to execute any Morpho Vault operation, with optional gas sponsorship */ -export async function executeMorphoOperation({ +export async function executeMorphoVaultOperation({ provider, pkpPublicKey, vaultAddress, @@ -1197,7 +1417,7 @@ export async function executeMorphoOperation({ alchemyGasSponsorApiKey, alchemyGasSponsorPolicyId, }: { - provider?: any; + provider?: ethers.providers.JsonRpcProvider; pkpPublicKey: string; vaultAddress: string; functionName: string; @@ -1208,14 +1428,14 @@ export async function executeMorphoOperation({ alchemyGasSponsorPolicyId?: string; }): Promise { console.log( - `[@lit-protocol/vincent-ability-morpho/executeMorphoOperation] Starting ${functionName} operation`, + `[@lit-protocol/vincent-ability-morpho/executeMorphoVaultOperation] Starting ${functionName} operation`, { sponsored: !!alchemyGasSponsor }, ); // Use gas sponsorship if enabled and all required parameters are provided if (alchemyGasSponsor && alchemyGasSponsorApiKey && alchemyGasSponsorPolicyId) { console.log( - `[@lit-protocol/vincent-ability-morpho/executeMorphoOperation] Using EIP-7702 gas sponsorship`, + `[@lit-protocol/vincent-ability-morpho/executeMorphoVaultOperation] Using EIP-7702 gas sponsorship`, { vaultAddress, functionName, args, policyId: alchemyGasSponsorPolicyId }, ); @@ -1232,7 +1452,7 @@ export async function executeMorphoOperation({ }); } catch (error) { console.error( - `[@lit-protocol/vincent-ability-morpho/executeMorphoOperation] EIP-7702 operation failed:`, + `[@lit-protocol/vincent-ability-morpho/executeMorphoVaultOperation] EIP-7702 operation failed:`, error, ); throw error; @@ -1240,7 +1460,7 @@ export async function executeMorphoOperation({ } else { // Use regular transaction without gas sponsorship console.log( - `[@lit-protocol/vincent-ability-morpho/executeMorphoOperation] Using regular transaction`, + `[@lit-protocol/vincent-ability-morpho/executeMorphoVaultOperation] Using regular transaction`, ); if (!provider) { @@ -1260,7 +1480,7 @@ export async function executeMorphoOperation({ }); } catch (error) { console.error( - `[@lit-protocol/vincent-ability-morpho/executeMorphoOperation] Regular transaction failed:`, + `[@lit-protocol/vincent-ability-morpho/executeMorphoVaultOperation] Regular transaction failed:`, error, ); throw error; diff --git a/packages/apps/ability-morpho/src/lib/schemas.ts b/packages/apps/ability-morpho/src/lib/schemas.ts index 14c5ffebc..c108e8fba 100644 --- a/packages/apps/ability-morpho/src/lib/schemas.ts +++ b/packages/apps/ability-morpho/src/lib/schemas.ts @@ -1,12 +1,16 @@ import { z } from 'zod'; /** - * Morpho Vault operation types + * Morpho operation types for both Vaults and Markets */ export enum MorphoOperation { - DEPOSIT = 'deposit', - WITHDRAW = 'withdraw', - REDEEM = 'redeem', + // Vault operations + VAULT_DEPOSIT = 'vault_deposit', + VAULT_WITHDRAW = 'vault_withdraw', + VAULT_REDEEM = 'vault_redeem', + // Market operations + MARKET_SUPPLY = 'market_supply', + MARKET_WITHDRAW_COLLATERAL = 'market_withdrawCollateral', } /** @@ -15,11 +19,18 @@ export enum MorphoOperation { export const abilityParamsSchema = z.object({ operation: z .nativeEnum(MorphoOperation) - .describe('The Morpho Vault operation to perform (deposit, withdraw, redeem)'), - vaultAddress: z + .describe( + 'The Morpho operation to perform (vault_deposit, vault_withdraw, vault_redeem, market_supply, market_withdrawCollateral)', + ), + contractAddress: z .string() - .regex(/^0x[a-fA-F0-9]{40}$/, 'Invalid vault address') - .describe('The address of the Morpho Vault contract'), + .regex(/^0x[a-fA-F0-9]{40}$/, 'Invalid vault or market contract address') + .describe('The address of the Morpho vault or market contract'), + marketId: z + .string() + .regex(/^0x[a-fA-F0-9]{64}$/, 'Invalid market ID') + .optional() + .describe('The market ID (required for market operations)'), amount: z .string() .regex(/^\d*\.?\d+$/, 'Invalid amount format') @@ -53,14 +64,20 @@ export const abilityParamsSchema = z.object({ */ export const precheckSuccessSchema = z.object({ operationValid: z.boolean().describe('Whether the requested operation is valid'), - vaultValid: z.boolean().describe('Whether the specified vault address is valid'), + contractValid: z + .boolean() + .describe('Whether the specified vault or market contract address is valid'), amountValid: z.boolean().describe('Whether the specified amount is valid'), userBalance: z.string().optional().describe("The user's current balance of the underlying asset"), - allowance: z + allowance: z.string().optional().describe('The current allowance approved for the contract'), + vaultShares: z .string() .optional() - .describe('The current allowance approved for the vault contract'), - vaultShares: z.string().optional().describe("The user's current balance of vault shares"), + .describe("The user's current balance of vault shares (for vault operations)"), + collateralBalance: z + .string() + .optional() + .describe("The user's collateral balance in the market (for market operations)"), estimatedGas: z.number().optional().describe('Estimated gas cost for the operation'), }); @@ -79,7 +96,10 @@ export const executeSuccessSchema = z.object({ operation: z .nativeEnum(MorphoOperation) .describe('The type of Morpho operation that was executed'), - vaultAddress: z.string().describe('The address of the vault involved in the operation'), + contractAddress: z + .string() + .describe('The vault or market address of the contract involved in the operation'), + marketId: z.string().optional().describe('The market ID for market operations'), amount: z.string().describe('The amount of tokens involved in the operation'), timestamp: z.number().describe('The Unix timestamp when the operation was executed'), }); diff --git a/packages/apps/ability-morpho/src/lib/vincent-ability.ts b/packages/apps/ability-morpho/src/lib/vincent-ability.ts index 4e1e3ae9f..6dab0e5a0 100644 --- a/packages/apps/ability-morpho/src/lib/vincent-ability.ts +++ b/packages/apps/ability-morpho/src/lib/vincent-ability.ts @@ -14,17 +14,20 @@ import { import { ERC4626_VAULT_ABI, + MORPHO_MARKET_ABI, ERC20_ABI, isValidAddress, parseAmount, validateOperationRequirements, - executeMorphoOperation, + executeMorphoVaultOperation, + executeMorphoMarketOperation, } from './helpers'; import { ethers } from 'ethers'; export const vincentAbility = createVincentAbility({ packageName: '@lit-protocol/vincent-ability-morpho' as const, - abilityDescription: 'Withdraw, deposit, or redeem from a Morpho Vault.' as const, + abilityDescription: + 'Interact with Morpho Vaults (deposit, withdraw, redeem) and Markets (supply, withdrawCollateral).' as const, abilityParamsSchema, supportedPolicies: supportedPoliciesForAbility([]), @@ -41,20 +44,32 @@ export const vincentAbility = createVincentAbility({ abilityParams, }); - const { operation, vaultAddress, amount, onBehalfOf, rpcUrl } = abilityParams; + const { operation, contractAddress, marketId, amount, onBehalfOf, rpcUrl } = abilityParams; // Validate operation if (!Object.values(MorphoOperation).includes(operation)) { return fail({ error: - '[@lit-protocol/vincent-ability-morpho/precheck] Invalid operation. Must be deposit, withdraw, or redeem', + '[@lit-protocol/vincent-ability-morpho/precheck] Invalid operation. Must be vault_deposit, vault_withdraw, vault_redeem, market_supply, or market_withdrawCollateral', }); } - // Validate vault address - if (!isValidAddress(vaultAddress)) { + // Check if market operations have required marketId + const isMarketOperation = [ + MorphoOperation.MARKET_SUPPLY, + MorphoOperation.MARKET_WITHDRAW_COLLATERAL, + ].includes(operation); + if (isMarketOperation && !marketId) { return fail({ - error: '[@lit-protocol/vincent-ability-morpho/precheck] Invalid vault address format', + error: + '[@lit-protocol/vincent-ability-morpho/precheck] Market ID is required for market operations', + }); + } + + // Validate contract address + if (!isValidAddress(contractAddress)) { + return fail({ + error: '[@lit-protocol/vincent-ability-morpho/precheck] Invalid contract address format', }); } @@ -92,31 +107,55 @@ export const vincentAbility = createVincentAbility({ // Get PKP address const pkpAddress = delegatorPkpInfo.ethAddress; - // Get vault info and validate vault exists - let vaultAssetAddress: string; + // Initialize variables + let assetAddress: string; let assetDecimals: number; let userBalance = '0'; let allowance = '0'; let vaultShares = '0'; + let collateralBalance = '0'; try { - const vaultContract = new ethers.Contract(vaultAddress, ERC4626_VAULT_ABI, provider); - vaultAssetAddress = await vaultContract.asset(); - vaultShares = (await vaultContract.balanceOf(pkpAddress)).toString(); - - const assetContract = new ethers.Contract(vaultAssetAddress, ERC20_ABI, provider); - userBalance = (await assetContract.balanceOf(pkpAddress)).toString(); - allowance = (await assetContract.allowance(pkpAddress, vaultAddress)).toString(); - - if (operation === MorphoOperation.REDEEM) { - // we're redeeming shares, so need to use the decimals from the shares contract, not the assets contract - assetDecimals = await vaultContract.decimals(); - } else { + if (isMarketOperation) { + // Handle market operations + const marketContract = new ethers.Contract(contractAddress, MORPHO_MARKET_ABI, provider); + + // Get market params from marketId + const marketParams = await marketContract.idToMarketParams(marketId); + assetAddress = + operation === MorphoOperation.MARKET_SUPPLY + ? marketParams.loanToken + : marketParams.collateralToken; + + // Get user position in the market + const position = await marketContract.position(marketId, pkpAddress); + collateralBalance = position.collateral.toString(); + + // Get asset info + const assetContract = new ethers.Contract(assetAddress, ERC20_ABI, provider); assetDecimals = await assetContract.decimals(); + userBalance = (await assetContract.balanceOf(pkpAddress)).toString(); + allowance = (await assetContract.allowance(pkpAddress, contractAddress)).toString(); + } else { + // Handle vault operations + const vaultContract = new ethers.Contract(contractAddress, ERC4626_VAULT_ABI, provider); + assetAddress = await vaultContract.asset(); + vaultShares = (await vaultContract.balanceOf(pkpAddress)).toString(); + + const assetContract = new ethers.Contract(assetAddress, ERC20_ABI, provider); + userBalance = (await assetContract.balanceOf(pkpAddress)).toString(); + allowance = (await assetContract.allowance(pkpAddress, contractAddress)).toString(); + + if (operation === MorphoOperation.VAULT_REDEEM) { + // we're redeeming shares, so need to use the decimals from the shares contract, not the assets contract + assetDecimals = await vaultContract.decimals(); + } else { + assetDecimals = await assetContract.decimals(); + } } } catch (error) { return fail({ - error: `[@lit-protocol/vincent-ability-morpho/precheck] Invalid vault address or vault not found on network: ${error}`, + error: `[@lit-protocol/vincent-ability-morpho/precheck] Invalid contract address or contract not found on network: ${error}`, }); } @@ -130,6 +169,7 @@ export const vincentAbility = createVincentAbility({ allowance, vaultShares, convertedAmount, + collateralBalance, ); if (!operationChecks.valid) { @@ -141,31 +181,70 @@ export const vincentAbility = createVincentAbility({ // Estimate gas for the operation let estimatedGas = 0; try { - const vaultContract = new ethers.Contract(vaultAddress, ERC4626_VAULT_ABI, provider); const targetAddress = onBehalfOf || pkpAddress; - switch (operation) { - case MorphoOperation.DEPOSIT: - estimatedGas = ( - await vaultContract.estimateGas.deposit(convertedAmount, targetAddress, { - from: pkpAddress, - }) - ).toNumber(); - break; - case MorphoOperation.WITHDRAW: - estimatedGas = ( - await vaultContract.estimateGas.withdraw(convertedAmount, pkpAddress, pkpAddress, { - from: pkpAddress, - }) - ).toNumber(); - break; - case MorphoOperation.REDEEM: - estimatedGas = ( - await vaultContract.estimateGas.redeem(convertedAmount, pkpAddress, pkpAddress, { - from: pkpAddress, - }) - ).toNumber(); - break; + if (isMarketOperation) { + const marketContract = new ethers.Contract(contractAddress, MORPHO_MARKET_ABI, provider); + const marketParams = await marketContract.idToMarketParams(marketId); + const marketParamsTuple = [ + marketParams.loanToken, + marketParams.collateralToken, + marketParams.oracle, + marketParams.irm, + marketParams.lltv, + ]; + + switch (operation) { + case MorphoOperation.MARKET_SUPPLY: + estimatedGas = ( + await marketContract.estimateGas.supply( + marketParamsTuple, + convertedAmount, + 0, // shares (0 means all assets) + targetAddress, + '0x', // empty data + { from: pkpAddress }, + ) + ).toNumber(); + break; + case MorphoOperation.MARKET_WITHDRAW_COLLATERAL: + estimatedGas = ( + await marketContract.estimateGas.withdrawCollateral( + marketParamsTuple, + convertedAmount, + pkpAddress, + pkpAddress, + { from: pkpAddress }, + ) + ).toNumber(); + break; + } + } else { + const vaultContract = new ethers.Contract(contractAddress, ERC4626_VAULT_ABI, provider); + + switch (operation) { + case MorphoOperation.VAULT_DEPOSIT: + estimatedGas = ( + await vaultContract.estimateGas.deposit(convertedAmount, targetAddress, { + from: pkpAddress, + }) + ).toNumber(); + break; + case MorphoOperation.VAULT_WITHDRAW: + estimatedGas = ( + await vaultContract.estimateGas.withdraw(convertedAmount, pkpAddress, pkpAddress, { + from: pkpAddress, + }) + ).toNumber(); + break; + case MorphoOperation.VAULT_REDEEM: + estimatedGas = ( + await vaultContract.estimateGas.redeem(convertedAmount, pkpAddress, pkpAddress, { + from: pkpAddress, + }) + ).toNumber(); + break; + } } } catch (error) { console.warn( @@ -182,11 +261,12 @@ export const vincentAbility = createVincentAbility({ // Enhanced validation passed const successResult = { operationValid: true, - vaultValid: true, + contractValid: true, amountValid: true, userBalance, allowance, - vaultShares, + vaultShares: isMarketOperation ? undefined : vaultShares, + collateralBalance: isMarketOperation ? collateralBalance : undefined, estimatedGas, }; @@ -210,7 +290,8 @@ export const vincentAbility = createVincentAbility({ try { const { operation, - vaultAddress, + contractAddress, + marketId, amount, onBehalfOf, chain, @@ -222,7 +303,8 @@ export const vincentAbility = createVincentAbility({ console.log('[@lit-protocol/vincent-ability-morpho/execute] Executing Morpho Ability', { operation, - vaultAddress, + contractAddress, + marketId, amount, chain, }); @@ -251,17 +333,34 @@ export const vincentAbility = createVincentAbility({ } const { chainId } = await provider.getNetwork(); + const isMarketOperation = [ + MorphoOperation.MARKET_SUPPLY, + MorphoOperation.MARKET_WITHDRAW_COLLATERAL, + ].includes(operation); - // Get vault asset address and decimals - const vaultContract = new ethers.Contract(vaultAddress, ERC4626_VAULT_ABI, provider); - const vaultAssetAddress = await vaultContract.asset(); - const assetContract = new ethers.Contract(vaultAssetAddress, ERC20_ABI, provider); + // Get asset address and decimals + let assetAddress: string; let assetDecimals: number; - if (operation === MorphoOperation.REDEEM) { - // we're redeeming shares, so need to use the decimals from the shares contract, not the assets contract - assetDecimals = await vaultContract.decimals(); - } else { + + if (isMarketOperation) { + const marketContract = new ethers.Contract(contractAddress, MORPHO_MARKET_ABI, provider); + const marketParams = await marketContract.idToMarketParams(marketId); + assetAddress = + operation === MorphoOperation.MARKET_SUPPLY + ? marketParams.loanToken + : marketParams.collateralToken; + const assetContract = new ethers.Contract(assetAddress, ERC20_ABI, provider); assetDecimals = await assetContract.decimals(); + } else { + const vaultContract = new ethers.Contract(contractAddress, ERC4626_VAULT_ABI, provider); + assetAddress = await vaultContract.asset(); + const assetContract = new ethers.Contract(assetAddress, ERC20_ABI, provider); + if (operation === MorphoOperation.VAULT_REDEEM) { + // we're redeeming shares, so need to use the decimals from the shares contract, not the assets contract + assetDecimals = await vaultContract.decimals(); + } else { + assetDecimals = await assetContract.decimals(); + } } console.log('[@lit-protocol/vincent-ability-morpho/execute] Asset decimals:', assetDecimals); @@ -281,54 +380,114 @@ export const vincentAbility = createVincentAbility({ const pkpAddress = ethers.utils.computeAddress(pkpPublicKey); console.log('[@lit-protocol/vincent-ability-morpho/execute] PKP Address:', pkpAddress); - // Prepare transaction based on operation - let functionName: string; - let args: any[]; + // Prepare and execute transaction based on operation type + let txHash: string; - switch (operation) { - case MorphoOperation.DEPOSIT: - functionName = 'deposit'; - args = [convertedAmount, onBehalfOf || pkpAddress]; - break; + if (isMarketOperation) { + if (!marketId) { + return fail({ + error: + '[@lit-protocol/vincent-ability-morpho/execute] Market ID is required for market operations', + }); + } + // Handle market operations + const marketContract = new ethers.Contract(contractAddress, MORPHO_MARKET_ABI, provider); + const marketParams = await marketContract.idToMarketParams(marketId); + const marketParamsTuple = [ + marketParams.loanToken, + marketParams.collateralToken, + marketParams.oracle, + marketParams.irm, + marketParams.lltv, + ]; + + let functionName: string; + let args: any[]; - case MorphoOperation.WITHDRAW: - functionName = 'withdraw'; - args = [convertedAmount, pkpAddress, pkpAddress]; - break; + switch (operation) { + case MorphoOperation.MARKET_SUPPLY: + functionName = 'supply'; + args = [ + marketParamsTuple, + convertedAmount, + 0, // shares (0 means all assets) + onBehalfOf || pkpAddress, + '0x', // empty data + ]; + break; - case MorphoOperation.REDEEM: - functionName = 'redeem'; - args = [convertedAmount, pkpAddress, pkpAddress]; - break; + case MorphoOperation.MARKET_WITHDRAW_COLLATERAL: + functionName = 'withdrawCollateral'; + args = [marketParamsTuple, convertedAmount, pkpAddress, pkpAddress]; + break; - default: - throw new Error(`Unsupported operation: ${operation}`); - } + default: + throw new Error(`Unsupported market operation: ${operation}`); + } - // Execute the operation using the unified function - const txHash = await executeMorphoOperation({ - provider, - pkpPublicKey, - vaultAddress, - functionName, - args, - chainId, - alchemyGasSponsor, - alchemyGasSponsorApiKey, - alchemyGasSponsorPolicyId, - }); + txHash = await executeMorphoMarketOperation({ + provider, + pkpPublicKey, + marketAddress: contractAddress, + marketId, + functionName, + args, + chainId, + alchemyGasSponsor, + alchemyGasSponsorApiKey, + alchemyGasSponsorPolicyId, + }); + } else { + // Handle vault operations + let functionName: string; + let args: any[]; + + switch (operation) { + case MorphoOperation.VAULT_DEPOSIT: + functionName = 'deposit'; + args = [convertedAmount, onBehalfOf || pkpAddress]; + break; + + case MorphoOperation.VAULT_WITHDRAW: + functionName = 'withdraw'; + args = [convertedAmount, pkpAddress, pkpAddress]; + break; + + case MorphoOperation.VAULT_REDEEM: + functionName = 'redeem'; + args = [convertedAmount, pkpAddress, pkpAddress]; + break; + + default: + throw new Error(`Unsupported vault operation: ${operation}`); + } + + txHash = await executeMorphoVaultOperation({ + provider, + pkpPublicKey, + vaultAddress: contractAddress, + functionName, + args, + chainId, + alchemyGasSponsor, + alchemyGasSponsorApiKey, + alchemyGasSponsorPolicyId, + }); + } console.log('[@lit-protocol/vincent-ability-morpho/execute] Morpho operation successful', { txHash, operation, - vaultAddress, + contractAddress, + marketId, amount, }); return succeed({ txHash, operation, - vaultAddress, + contractAddress, + marketId: isMarketOperation ? marketId : undefined, amount, timestamp: Date.now(), });