From 039514f9afd02a0218bb8cd6142230596eb49cb2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:36:08 -0800 Subject: [PATCH] Version Packages (next) (#672) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases ## @evmts/bundler@1.0.0-next.2 ### Minor Changes - [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi ### Patch Changes - Updated dependencies \[[`2f13396d`](https://github.com/evmts/evmts-monorepo/commit/2f13396d5b64687e56d4618aaff88a67a05df7e2), [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/ts-plugin@1.0.0-next.2 - @evmts/bun-plugin@1.0.0-next.2 - @evmts/esbuild-plugin@1.0.0-next.2 - @evmts/rollup-plugin@1.0.0-next.2 - @evmts/rspack-plugin@1.0.0-next.2 - @evmts/vite-plugin@1.0.0-next.2 - @evmts/webpack-plugin@1.0.0-next.2 ## @evmts/base@1.0.0-next.2 ### Minor Changes - [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi ### Patch Changes - Updated dependencies \[[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/runtime@1.0.0-next.2 - @evmts/solc@1.0.0-next.2 ## @evmts/bun-plugin@1.0.0-next.2 ### Minor Changes - [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi ### Patch Changes - Updated dependencies \[[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/base@1.0.0-next.2 ## @evmts/runtime@1.0.0-next.2 ### Minor Changes - [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi ## @evmts/solc@1.0.0-next.2 ### Minor Changes - [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi ## @evmts/ts-plugin@1.0.0-next.2 ### Minor Changes - [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi ### Patch Changes - [#671](https://github.com/evmts/evmts-monorepo/pull/671) [`2f13396d`](https://github.com/evmts/evmts-monorepo/commit/2f13396d5b64687e56d4618aaff88a67a05df7e2) Thanks [@roninjin10](https://github.com/roninjin10)! - Fixed bug with @evmts/core imports resolving the wrong types sometimes when ts-plugin is used. - Updated dependencies \[[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/base@1.0.0-next.2 ## @evmts/unplugin@1.0.0-next.2 ### Minor Changes - [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi ### Patch Changes - Updated dependencies \[[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/runtime@1.0.0-next.2 - @evmts/solc@1.0.0-next.2 ## @evmts/core@1.0.0-next.2 ### Minor Changes - [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi ## @evmts/esbuild-plugin@1.0.0-next.2 ### Patch Changes - Updated dependencies \[[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/unplugin@1.0.0-next.2 ## @evmts/rollup-plugin@1.0.0-next.2 ### Patch Changes - Updated dependencies \[[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/unplugin@1.0.0-next.2 ## @evmts/rspack-plugin@1.0.0-next.2 ### Patch Changes - Updated dependencies \[[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/unplugin@1.0.0-next.2 ## @evmts/vite-plugin@1.0.0-next.2 ### Patch Changes - Updated dependencies \[[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/unplugin@1.0.0-next.2 ## @evmts/webpack-plugin@1.0.0-next.2 ### Patch Changes - Updated dependencies \[[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/unplugin@1.0.0-next.2 ## @evmts/experimental-solc@1.0.0-next.2 ### Patch Changes - Updated dependencies \[[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: - @evmts/core@1.0.0-next.2 Co-authored-by: github-actions[bot] --- .changeset/pre.json | 2 + bundler/CHANGELOG.md | 17 + bundler/base/CHANGELOG.md | 12 + bundler/base/package.json | 2 +- bundler/bun/CHANGELOG.md | 11 + bundler/bun/package.json | 2 +- bundler/esbuild/CHANGELOG.md | 7 + bundler/esbuild/package.json | 2 +- bundler/package.json | 2 +- bundler/rollup/CHANGELOG.md | 7 + bundler/rollup/package.json | 2 +- bundler/rspack/CHANGELOG.md | 7 + bundler/rspack/package.json | 2 +- bundler/runtime/CHANGELOG.md | 6 + bundler/runtime/package.json | 2 +- bundler/solc/CHANGELOG.md | 6 + bundler/solc/package.json | 2 +- bundler/ts-plugin/CHANGELOG.md | 13 + bundler/ts-plugin/package.json | 2 +- bundler/unplugin/CHANGELOG.md | 12 + bundler/unplugin/package.json | 2 +- bundler/vite/CHANGELOG.md | 7 + bundler/vite/package.json | 2 +- bundler/webpack/CHANGELOG.md | 7 + bundler/webpack/package.json | 2 +- examples/bun/package.json | 2 +- examples/esbuild/package.json | 2 +- examples/vite/dist/assets/ccip-6424106c.js | 1 + examples/vite/dist/assets/events-741c5e9f.js | 1 + examples/vite/dist/assets/http-d8520fe3.js | 14 + examples/vite/dist/assets/index-17433c46.js | 1 + examples/vite/dist/assets/index-21066bc1.js | 54 ++ examples/vite/dist/assets/index-5c4ca410.js | 160 ++++++ examples/vite/dist/assets/index-5f7b2f56.js | 38 ++ examples/vite/dist/assets/index-aa193446.js | 1 + examples/vite/dist/assets/index-c531661c.js | 522 ++++++++++++++++++ .../vite/dist/assets/index.es-29295ced.js | 53 ++ examples/vite/package.json | 2 +- experimental/solc/CHANGELOG.md | 7 + experimental/solc/package.json | 2 +- packages/core/CHANGELOG.md | 6 + packages/core/package.json | 2 +- 42 files changed, 989 insertions(+), 17 deletions(-) create mode 100644 examples/vite/dist/assets/ccip-6424106c.js create mode 100644 examples/vite/dist/assets/events-741c5e9f.js create mode 100644 examples/vite/dist/assets/http-d8520fe3.js create mode 100644 examples/vite/dist/assets/index-17433c46.js create mode 100644 examples/vite/dist/assets/index-21066bc1.js create mode 100644 examples/vite/dist/assets/index-5c4ca410.js create mode 100644 examples/vite/dist/assets/index-5f7b2f56.js create mode 100644 examples/vite/dist/assets/index-aa193446.js create mode 100644 examples/vite/dist/assets/index-c531661c.js create mode 100644 examples/vite/dist/assets/index.es-29295ced.js diff --git a/.changeset/pre.json b/.changeset/pre.json index 5dc16d003a..1f6bb1e89c 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -43,10 +43,12 @@ "chilly-rocks-yawn", "chilly-trees-explain", "cold-masks-itch", + "fair-boats-call", "flat-peaches-battle", "fluffy-dolphins-type", "gold-baboons-sniff", "good-chairs-applaud", + "happy-rocks-jump", "hungry-llamas-kiss", "lovely-carrots-tie", "nine-poets-bow", diff --git a/bundler/CHANGELOG.md b/bundler/CHANGELOG.md index 560fd51377..ddd8ba7981 100644 --- a/bundler/CHANGELOG.md +++ b/bundler/CHANGELOG.md @@ -1,5 +1,22 @@ # @evmts/bundler +## 1.0.0-next.2 + +### Minor Changes + +- [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi + +### Patch Changes + +- Updated dependencies [[`2f13396d`](https://github.com/evmts/evmts-monorepo/commit/2f13396d5b64687e56d4618aaff88a67a05df7e2), [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/ts-plugin@1.0.0-next.2 + - @evmts/bun-plugin@1.0.0-next.2 + - @evmts/esbuild-plugin@1.0.0-next.2 + - @evmts/rollup-plugin@1.0.0-next.2 + - @evmts/rspack-plugin@1.0.0-next.2 + - @evmts/vite-plugin@1.0.0-next.2 + - @evmts/webpack-plugin@1.0.0-next.2 + ## 1.0.0-next.0 ### Major Changes diff --git a/bundler/base/CHANGELOG.md b/bundler/base/CHANGELOG.md index eef0f33e24..39b55b8fc4 100644 --- a/bundler/base/CHANGELOG.md +++ b/bundler/base/CHANGELOG.md @@ -1,5 +1,17 @@ # @evmts/base +## 1.0.0-next.2 + +### Minor Changes + +- [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi + +### Patch Changes + +- Updated dependencies [[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/runtime@1.0.0-next.2 + - @evmts/solc@1.0.0-next.2 + ## 1.0.0-next.0 ### Patch Changes diff --git a/bundler/base/package.json b/bundler/base/package.json index d27cc1cd39..d6eefdd376 100644 --- a/bundler/base/package.json +++ b/bundler/base/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/base", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "Internal bundler for Evmts", "keywords": [ diff --git a/bundler/bun/CHANGELOG.md b/bundler/bun/CHANGELOG.md index 4f9355be81..ca2cde05ef 100644 --- a/bundler/bun/CHANGELOG.md +++ b/bundler/bun/CHANGELOG.md @@ -1,5 +1,16 @@ # @evmts/bun-plugin +## 1.0.0-next.2 + +### Minor Changes + +- [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi + +### Patch Changes + +- Updated dependencies [[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/base@1.0.0-next.2 + ## 1.0.0-next.0 ### Patch Changes diff --git a/bundler/bun/package.json b/bundler/bun/package.json index 28fc7c01ec..17cd3880a2 100644 --- a/bundler/bun/package.json +++ b/bundler/bun/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/bun-plugin", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "A bun plugin for evmts", "keywords": [ diff --git a/bundler/esbuild/CHANGELOG.md b/bundler/esbuild/CHANGELOG.md index 7a4b367ff5..5ca7ddd84a 100644 --- a/bundler/esbuild/CHANGELOG.md +++ b/bundler/esbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # @evmts/plugin +## 1.0.0-next.2 + +### Patch Changes + +- Updated dependencies [[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/unplugin@1.0.0-next.2 + ## 1.0.0-next.0 ### Patch Changes diff --git a/bundler/esbuild/package.json b/bundler/esbuild/package.json index 37a2f603d1..32544ee988 100644 --- a/bundler/esbuild/package.json +++ b/bundler/esbuild/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/esbuild-plugin", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "A esbuild plugin for evmts", "keywords": [ diff --git a/bundler/package.json b/bundler/package.json index 41e7c8f26c..a273829dcf 100644 --- a/bundler/package.json +++ b/bundler/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/bundler", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "Bundler for EVMts", "keywords": [ diff --git a/bundler/rollup/CHANGELOG.md b/bundler/rollup/CHANGELOG.md index 61014f459c..37fa19ecd8 100644 --- a/bundler/rollup/CHANGELOG.md +++ b/bundler/rollup/CHANGELOG.md @@ -1,5 +1,12 @@ # @evmts/plugin +## 1.0.0-next.2 + +### Patch Changes + +- Updated dependencies [[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/unplugin@1.0.0-next.2 + ## 1.0.0-next.0 ### Patch Changes diff --git a/bundler/rollup/package.json b/bundler/rollup/package.json index 6ef52a0f25..b2ed5dac2e 100644 --- a/bundler/rollup/package.json +++ b/bundler/rollup/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/rollup-plugin", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "A generic plugin that can be used in esbuild, webpack, vite, and rollup", "keywords": [ diff --git a/bundler/rspack/CHANGELOG.md b/bundler/rspack/CHANGELOG.md index 0ec5ad3aba..f781099334 100644 --- a/bundler/rspack/CHANGELOG.md +++ b/bundler/rspack/CHANGELOG.md @@ -1,5 +1,12 @@ # @evmts/plugin +## 1.0.0-next.2 + +### Patch Changes + +- Updated dependencies [[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/unplugin@1.0.0-next.2 + ## 1.0.0-next.0 ### Patch Changes diff --git a/bundler/rspack/package.json b/bundler/rspack/package.json index 2a46376908..a70fa9536d 100644 --- a/bundler/rspack/package.json +++ b/bundler/rspack/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/rspack-plugin", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "An (experimental) rspack plugin for evmts", "keywords": [ diff --git a/bundler/runtime/CHANGELOG.md b/bundler/runtime/CHANGELOG.md index da01c93791..d6145726c2 100644 --- a/bundler/runtime/CHANGELOG.md +++ b/bundler/runtime/CHANGELOG.md @@ -1,5 +1,11 @@ # @evmts/runtime +## 1.0.0-next.2 + +### Minor Changes + +- [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi + ## 1.0.0-next.0 ### Patch Changes diff --git a/bundler/runtime/package.json b/bundler/runtime/package.json index a0266dfe4a..95325299ac 100644 --- a/bundler/runtime/package.json +++ b/bundler/runtime/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/runtime", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "Tools for generating the EVMts contract runtime", "keywords": [ diff --git a/bundler/solc/CHANGELOG.md b/bundler/solc/CHANGELOG.md index 2b1b71d9a2..8216da16b1 100644 --- a/bundler/solc/CHANGELOG.md +++ b/bundler/solc/CHANGELOG.md @@ -1,5 +1,11 @@ # @evmts/core +## 1.0.0-next.2 + +### Minor Changes + +- [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi + ## 1.0.0-next.0 ### Patch Changes diff --git a/bundler/solc/package.json b/bundler/solc/package.json index b8192a9a88..2fd8b074cc 100644 --- a/bundler/solc/package.json +++ b/bundler/solc/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/solc", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "Utilities around solc", "keywords": [ diff --git a/bundler/ts-plugin/CHANGELOG.md b/bundler/ts-plugin/CHANGELOG.md index 624a3cb3f2..1d254ad4d3 100644 --- a/bundler/ts-plugin/CHANGELOG.md +++ b/bundler/ts-plugin/CHANGELOG.md @@ -1,5 +1,18 @@ # @evmts/ts-plugin +## 1.0.0-next.2 + +### Minor Changes + +- [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi + +### Patch Changes + +- [#671](https://github.com/evmts/evmts-monorepo/pull/671) [`2f13396d`](https://github.com/evmts/evmts-monorepo/commit/2f13396d5b64687e56d4618aaff88a67a05df7e2) Thanks [@roninjin10](https://github.com/roninjin10)! - Fixed bug with @evmts/core imports resolving the wrong types sometimes when ts-plugin is used. + +- Updated dependencies [[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/base@1.0.0-next.2 + ## 1.0.0-next.0 ### Major Changes diff --git a/bundler/ts-plugin/package.json b/bundler/ts-plugin/package.json index 0ad3c50cae..b561cb926b 100644 --- a/bundler/ts-plugin/package.json +++ b/bundler/ts-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/ts-plugin", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "A typescript plugin for evmts", "keywords": [ diff --git a/bundler/unplugin/CHANGELOG.md b/bundler/unplugin/CHANGELOG.md index 1eb9cc5652..e51a83a403 100644 --- a/bundler/unplugin/CHANGELOG.md +++ b/bundler/unplugin/CHANGELOG.md @@ -1,5 +1,17 @@ # @evmts/unplugin +## 1.0.0-next.2 + +### Minor Changes + +- [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi + +### Patch Changes + +- Updated dependencies [[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/runtime@1.0.0-next.2 + - @evmts/solc@1.0.0-next.2 + ## 1.0.0-next.0 ### Patch Changes diff --git a/bundler/unplugin/package.json b/bundler/unplugin/package.json index d39793c168..9961fb5db9 100644 --- a/bundler/unplugin/package.json +++ b/bundler/unplugin/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/unplugin", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "Internal unplugin for Evmts", "keywords": [ diff --git a/bundler/vite/CHANGELOG.md b/bundler/vite/CHANGELOG.md index b9cec87e9e..055d5dd91c 100644 --- a/bundler/vite/CHANGELOG.md +++ b/bundler/vite/CHANGELOG.md @@ -1,5 +1,12 @@ # @evmts/plugin +## 1.0.0-next.2 + +### Patch Changes + +- Updated dependencies [[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/unplugin@1.0.0-next.2 + ## 1.0.0-next.0 ### Patch Changes diff --git a/bundler/vite/package.json b/bundler/vite/package.json index 0eec9d3b41..f15bb9ca75 100644 --- a/bundler/vite/package.json +++ b/bundler/vite/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/vite-plugin", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "A vite plugin for evmts", "keywords": [ diff --git a/bundler/webpack/CHANGELOG.md b/bundler/webpack/CHANGELOG.md index 08aaec1ccc..c11250a37d 100644 --- a/bundler/webpack/CHANGELOG.md +++ b/bundler/webpack/CHANGELOG.md @@ -1,5 +1,12 @@ # @evmts/plugin +## 1.0.0-next.2 + +### Patch Changes + +- Updated dependencies [[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/unplugin@1.0.0-next.2 + ## 1.0.0-next.0 ### Patch Changes diff --git a/bundler/webpack/package.json b/bundler/webpack/package.json index b76e0a3df2..7fd95209c5 100644 --- a/bundler/webpack/package.json +++ b/bundler/webpack/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/webpack-plugin", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "A webpack plugin for evmts", "keywords": [ diff --git a/examples/bun/package.json b/examples/bun/package.json index abd7b4a28d..b28cef4f4b 100644 --- a/examples/bun/package.json +++ b/examples/bun/package.json @@ -10,7 +10,7 @@ "test": "bun run test" }, "dependencies": { - "@evmts/core": "^1.0.0-next.0", + "@evmts/core": "^1.0.0-next.2", "bun-types": "^1.0.7", "viem": "^1.18.1" }, diff --git a/examples/esbuild/package.json b/examples/esbuild/package.json index 8a3a1e69ea..f3d2878219 100644 --- a/examples/esbuild/package.json +++ b/examples/esbuild/package.json @@ -15,7 +15,7 @@ "test:run": "bun test" }, "dependencies": { - "@evmts/core": "^1.0.0-next.0", + "@evmts/core": "^1.0.0-next.2", "viem": "^1.18.1", "zod": "^3.22.4" }, diff --git a/examples/vite/dist/assets/ccip-6424106c.js b/examples/vite/dist/assets/ccip-6424106c.js new file mode 100644 index 0000000000..adac2ec042 --- /dev/null +++ b/examples/vite/dist/assets/ccip-6424106c.js @@ -0,0 +1 @@ +import{aV as f,aW as w,aX as y,aY as p,aZ as h,a_ as g,a$ as k,b0 as O,b1 as L,b2 as m,b3 as E}from"./index-5c4ca410.js";import"@safe-globalThis/safe-apps-provider";import"@safe-globalThis/safe-apps-sdk";class x extends f{constructor({callbackSelector:e,cause:t,data:n,extraData:c,sender:d,urls:a}){var i;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(i=t.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(u=>` ${w(u)}`)],` Sender: ${d}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends f{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(t)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class $ extends f{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function R(s,e){if(!p(s))throw new h({address:s});if(!p(e))throw new h({address:e});return s.toLowerCase()===e.toLowerCase()}const j="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function D(s,{blockNumber:e,blockTag:t,data:n,to:c}){const{args:d}=g({data:n,abi:[S]}),[a,i,u,r,o]=d;try{if(!R(c,a))throw new $({sender:a,to:c});const l=await A({data:u,sender:a,urls:i}),{data:b}=await k(s,{blockNumber:e,blockTag:t,data:O([r,L([{type:"bytes"},{type:"bytes"}],[l,o])]),to:c});return b}catch(l){throw new x({callbackSelector:r,cause:l,data:n,extraData:o,sender:a,urls:i})}}async function A({data:s,sender:e,urls:t}){var c;let n=new Error("An unknown error occurred.");for(let d=0;d0&&(s=n[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=f[e];if(c===void 0)return!1;if(typeof c=="function")d(c,this,n);else for(var h=c.length,O=E(c,h),r=0;r0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,j(u)}return t}o.prototype.addListener=function(e,n){return g(this,e,n,!1)};o.prototype.on=o.prototype.addListener;o.prototype.prependListener=function(e,n){return g(this,e,n,!0)};function R(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=R.bind(r);return i.listener=n,r.wrapFn=i,i}o.prototype.once=function(e,n){return v(n),this.on(e,_(this,e,n)),this};o.prototype.prependOnceListener=function(e,n){return v(n),this.prependListener(e,_(this,e,n)),this};o.prototype.removeListener=function(e,n){var r,i,f,s,u;if(v(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(f=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){u=r[s].listener,f=s;break}if(f<0)return this;f===0?r.shift():N(r,f),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,u||n)}return this};o.prototype.off=o.prototype.removeListener;o.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var f=Object.keys(r),s;for(i=0;i=0;i--)this.removeListener(e,n[i]);return this};function w(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?M(i):E(i,i.length)}o.prototype.listeners=function(e){return w(this,e,!0)};o.prototype.rawListeners=function(e){return w(this,e,!1)};o.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):b.call(t,e)};o.prototype.listenerCount=b;function b(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function E(t,e){for(var n=new Array(e),r=0;rJSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString()+"n":r),de=t=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=t.replace(e,'$1"$2n"$3');return JSON.parse(r,(i,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function ye(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return de(t)}catch{return t}}function F(t){return typeof t=="string"?t:he(t)||""}const pe="PARSE_ERROR",be="INVALID_REQUEST",me="METHOD_NOT_FOUND",ge="INVALID_PARAMS",k="INTERNAL_ERROR",U="SERVER_ERROR",ve=[-32700,-32600,-32601,-32602,-32603],P={[pe]:{code:-32700,message:"Parse error"},[be]:{code:-32600,message:"Invalid Request"},[me]:{code:-32601,message:"Method not found"},[ge]:{code:-32602,message:"Invalid params"},[k]:{code:-32603,message:"Internal error"},[U]:{code:-32e3,message:"Server error"}},W=U;function _e(t){return ve.includes(t)}function H(t){return Object.keys(P).includes(t)?P[t]:P[W]}function we(t){const e=Object.values(P).find(r=>r.code===t);return e||P[W]}function Ee(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var Re={};/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var D=function(t,e){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)i.hasOwnProperty(s)&&(r[s]=i[s])},D(t,e)};function Oe(t,e){D(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var I=function(){return I=Object.assign||function(e){for(var r,i=1,s=arguments.length;i=0;d--)(c=t[d])&&(o=(s<3?c(o):s>3?c(e,r,o):c(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function Ae(t,e){return function(r,i){e(r,i,t)}}function Se(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function xe(t,e,r,i){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function d(p){try{f(i.next(p))}catch(_){c(_)}}function g(p){try{f(i.throw(p))}catch(_){c(_)}}function f(p){p.done?o(p.value):s(p.value).then(d,g)}f((i=i.apply(t,e||[])).next())})}function Be(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,s,o,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(f){return function(p){return g([f,p])}}function g(f){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,s&&(o=f[0]&2?s.return:f[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,f[1])).done)return o;switch(s=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,s=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Q(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i=r.call(t),s,o=[],c;try{for(;(e===void 0||e-- >0)&&!(s=i.next()).done;)o.push(s.value)}catch(d){c={error:d}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(c)throw c.error}}return o}function Ie(){for(var t=[],e=0;e1||d(y,h)})})}function d(y,h){try{g(i[y](h))}catch(R){_(o[0][3],R)}}function g(y){y.value instanceof A?Promise.resolve(y.value.v).then(f,p):_(o[0][2],y)}function f(y){d("next",y)}function p(y){d("throw",y)}function _(y,h){y(h),o.shift(),o.length&&d(o[0][0],o[0][1])}}function Ue(t){var e,r;return e={},i("next"),i("throw",function(s){throw s}),i("return"),e[Symbol.iterator]=function(){return this},e;function i(s,o){e[s]=t[s]?function(c){return(r=!r)?{value:A(t[s](c)),done:s==="return"}:o?o(c):c}:o}}function Me(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof C=="function"?C(t):t[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(o){r[o]=t[o]&&function(c){return new Promise(function(d,g){c=t[o](c),s(d,g,c.done,c.value)})}}function s(o,c,d,g){Promise.resolve(g).then(function(f){o({value:f,done:d})},c)}}function Ne(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Fe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function He(t){return t&&t.__esModule?t:{default:t}}function qe(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Je(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const $e=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return I},__asyncDelegator:Ue,__asyncGenerator:Le,__asyncValues:Me,__await:A,__awaiter:xe,__classPrivateFieldGet:qe,__classPrivateFieldSet:Je,__createBinding:je,__decorate:Pe,__exportStar:De,__extends:Oe,__generator:Be,__importDefault:He,__importStar:Fe,__makeTemplateObject:Ne,__metadata:Se,__param:Ae,__read:Q,__rest:Te,__spread:Ie,__spreadArrays:Ce,__values:C},Symbol.toStringTag,{value:"Module"})),Ve=ue($e);var w={},q;function Ge(){if(q)return w;q=1,Object.defineProperty(w,"__esModule",{value:!0}),w.isBrowserCryptoAvailable=w.getSubtleCrypto=w.getBrowerCrypto=void 0;function t(){return(globalThis==null?void 0:globalThis.crypto)||(globalThis==null?void 0:globalThis.msCrypto)||{}}w.getBrowerCrypto=t;function e(){const i=t();return i.subtle||i.webkitSubtle}w.getSubtleCrypto=e;function r(){return!!t()&&!!e()}return w.isBrowserCryptoAvailable=r,w}var E={},J;function ze(){if(J)return E;J=1,Object.defineProperty(E,"__esModule",{value:!0}),E.isBrowser=E.isNode=E.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}E.isReactNative=t;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}E.isNode=e;function r(){return!t()&&!e()}return E.isBrowser=r,E}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Ve;e.__exportStar(Ge(),t),e.__exportStar(ze(),t)})(Re);function K(t=3){const e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function Xe(t=6){return BigInt(K(t))}function ke(t,e,r){return{id:r||K(),jsonrpc:"2.0",method:t,params:e}}function ft(t,e){return{id:t,jsonrpc:"2.0",result:e}}function We(t,e,r){return{id:t,jsonrpc:"2.0",error:Qe(e,r)}}function Qe(t,e){return typeof t>"u"?H(k):(typeof t=="string"&&(t=Object.assign(Object.assign({},H(U)),{message:t})),typeof e<"u"&&(t.data=e),_e(t.code)&&(t=we(t.code)),t)}class Y{}class ut extends Y{constructor(e){super()}}class Ke extends Y{constructor(){super()}}class Ye extends Ke{constructor(e){super()}}const Ze="^https?:",et="^wss?:";function tt(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function Z(t,e){const r=tt(t);return typeof r>"u"?!1:new RegExp(e).test(r)}function $(t){return Z(t,Ze)}function lt(t){return Z(t,et)}function ht(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function ee(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function dt(t){return ee(t)&&"method"in t}function rt(t){return ee(t)&&(nt(t)||te(t))}function nt(t){return"result"in t}function te(t){return"error"in t}class yt extends Ye{constructor(e){super(e),this.events=new X.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(ke(e.method,e.params||[],e.id||Xe().toString()),r)}async requestStrict(e,r){return new Promise(async(i,s)=>{if(!this.connection.connected)try{await this.open()}catch(o){s(o)}this.events.on(`${e.id}`,o=>{te(o)?s(o.error):i(o.result)});try{await this.connection.send(e,r)}catch(o){s(o)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),rt(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}var L={exports:{}};(function(t,e){var r=function(){function s(){this.fetch=!1,this.DOMException=globalThis.DOMException}return s.prototype=globalThis,new s}();(function(s){(function(o){var c={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function d(n){return n&&DataView.prototype.isPrototypeOf(n)}if(c.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(n){return n&&g.indexOf(Object.prototype.toString.call(n))>-1};function p(n){if(typeof n!="string"&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new TypeError("Invalid character in header field name");return n.toLowerCase()}function _(n){return typeof n!="string"&&(n=String(n)),n}function y(n){var a={next:function(){var u=n.shift();return{done:u===void 0,value:u}}};return c.iterable&&(a[Symbol.iterator]=function(){return a}),a}function h(n){this.map={},n instanceof h?n.forEach(function(a,u){this.append(u,a)},this):Array.isArray(n)?n.forEach(function(a){this.append(a[0],a[1])},this):n&&Object.getOwnPropertyNames(n).forEach(function(a){this.append(a,n[a])},this)}h.prototype.append=function(n,a){n=p(n),a=_(a);var u=this.map[n];this.map[n]=u?u+", "+a:a},h.prototype.delete=function(n){delete this.map[p(n)]},h.prototype.get=function(n){return n=p(n),this.has(n)?this.map[n]:null},h.prototype.has=function(n){return this.map.hasOwnProperty(p(n))},h.prototype.set=function(n,a){this.map[p(n)]=_(a)},h.prototype.forEach=function(n,a){for(var u in this.map)this.map.hasOwnProperty(u)&&n.call(a,this.map[u],u,this)},h.prototype.keys=function(){var n=[];return this.forEach(function(a,u){n.push(u)}),y(n)},h.prototype.values=function(){var n=[];return this.forEach(function(a){n.push(a)}),y(n)},h.prototype.entries=function(){var n=[];return this.forEach(function(a,u){n.push([u,a])}),y(n)},c.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);function R(n){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}function S(n){return new Promise(function(a,u){n.onload=function(){a(n.result)},n.onerror=function(){u(n.error)}})}function re(n){var a=new FileReader,u=S(a);return a.readAsArrayBuffer(n),u}function ne(n){var a=new FileReader,u=S(a);return a.readAsText(n),u}function oe(n){for(var a=new Uint8Array(n),u=new Array(a.length),m=0;m-1?a:n}function O(n,a){a=a||{};var u=a.body;if(n instanceof O){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,a.headers||(this.headers=new h(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,!u&&n._bodyInit!=null&&(u=n._bodyInit,n.bodyUsed=!0)}else this.url=String(n);if(this.credentials=a.credentials||this.credentials||"same-origin",(a.headers||!this.headers)&&(this.headers=new h(a.headers)),this.method=se(a.method||this.method||"GET"),this.mode=a.mode||this.mode||null,this.signal=a.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&u)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(u)}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function ae(n){var a=new FormData;return n.trim().split("&").forEach(function(u){if(u){var m=u.split("="),b=m.shift().replace(/\+/g," "),l=m.join("=").replace(/\+/g," ");a.append(decodeURIComponent(b),decodeURIComponent(l))}}),a}function ce(n){var a=new h,u=n.replace(/\r?\n[\t ]+/g," ");return u.split(/\r?\n/).forEach(function(m){var b=m.split(":"),l=b.shift().trim();if(l){var x=b.join(":").trim();a.append(l,x)}}),a}N.call(O.prototype);function v(n,a){a||(a={}),this.type="default",this.status=a.status===void 0?200:a.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in a?a.statusText:"OK",this.headers=new h(a.headers),this.url=a.url||"",this._initBody(n)}N.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},v.error=function(){var n=new v(null,{status:0,statusText:""});return n.type="error",n};var fe=[301,302,303,307,308];v.redirect=function(n,a){if(fe.indexOf(a)===-1)throw new RangeError("Invalid status code");return new v(null,{status:a,headers:{location:n}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(a,u){this.message=a,this.name=u;var m=Error(a);this.stack=m.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function B(n,a){return new Promise(function(u,m){var b=new O(n,a);if(b.signal&&b.signal.aborted)return m(new o.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function x(){l.abort()}l.onload=function(){var T={status:l.status,statusText:l.statusText,headers:ce(l.getAllResponseHeaders()||"")};T.url="responseURL"in l?l.responseURL:T.headers.get("X-Request-URL");var j="response"in l?l.response:l.responseText;u(new v(j,T))},l.onerror=function(){m(new TypeError("Network request failed"))},l.ontimeout=function(){m(new TypeError("Network request failed"))},l.onabort=function(){m(new o.DOMException("Aborted","AbortError"))},l.open(b.method,b.url,!0),b.credentials==="include"?l.withCredentials=!0:b.credentials==="omit"&&(l.withCredentials=!1),"responseType"in l&&c.blob&&(l.responseType="blob"),b.headers.forEach(function(T,j){l.setRequestHeader(j,T)}),b.signal&&(b.signal.addEventListener("abort",x),l.onreadystatechange=function(){l.readyState===4&&b.signal.removeEventListener("abort",x)}),l.send(typeof b._bodyInit>"u"?null:b._bodyInit)})}return B.polyfill=!0,s.fetch||(s.fetch=B,s.Headers=h,s.Request=O,s.Response=v),o.Headers=h,o.Request=O,o.Response=v,o.fetch=B,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(L,L.exports);var ot=L.exports;const V=le(ot),it={Accept:"application/json","Content-Type":"application/json"},st="POST",G={headers:it,method:st},z=10;class pt{constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new X.EventEmitter,this.isAvailable=!1,this.registering=!1,!$(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=r}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,r){this.isAvailable||await this.register();try{const i=F(e),o=await(await V(this.url,Object.assign(Object.assign({},G),{body:i}))).json();this.onPayload({data:o})}catch(i){this.onError(e.id,i)}}async register(e=this.url){if(!$(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((i,s)=>{this.events.once("register_error",o=>{this.resetMaxListeners(),s(o)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return s(new Error("HTTP connection is missing or invalid"));i()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const r=F({id:1,jsonrpc:"2.0",method:"test",params:[]});await V(e,Object.assign(Object.assign({},G),{body:r}))}this.onOpen()}catch(r){const i=this.parseError(r);throw this.events.emit("register_error",i),this.onClose(),i}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const r=typeof e.data=="string"?ye(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const i=this.parseError(r),s=i.message||i.toString(),o=We(e,s);this.events.emit("payload",o)}parseError(e,r=this.url){return Ee(e,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>z&&this.events.setMaxListeners(z)}}export{pt as H,ut as I,yt as J,ye as a,ht as b,Re as c,dt as d,rt as e,We as f,ft as g,nt as h,lt as i,te as j,ke as k,Xe as l,K as m,Ee as p,F as s}; diff --git a/examples/vite/dist/assets/index-17433c46.js b/examples/vite/dist/assets/index-17433c46.js new file mode 100644 index 0000000000..366ad222f4 --- /dev/null +++ b/examples/vite/dist/assets/index-17433c46.js @@ -0,0 +1 @@ +import{av as pe}from"./index-5c4ca410.js";const fe=Symbol(),Z=Object.getPrototypeOf,F=new WeakMap,me=e=>e&&(F.has(e)?F.get(e):Z(e)===Object.prototype||Z(e)===Array.prototype),ge=e=>me(e)&&e[fe]||null,ee=(e,t=!0)=>{F.set(e,t)},J=e=>typeof e=="object"&&e!==null,C=new WeakMap,x=new WeakSet,he=(e=Object.is,t=(o,h)=>new Proxy(o,h),s=o=>J(o)&&!x.has(o)&&(Array.isArray(o)||!(Symbol.iterator in o))&&!(o instanceof WeakMap)&&!(o instanceof WeakSet)&&!(o instanceof Error)&&!(o instanceof Number)&&!(o instanceof Date)&&!(o instanceof String)&&!(o instanceof RegExp)&&!(o instanceof ArrayBuffer),r=o=>{switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:throw o}},l=new WeakMap,c=(o,h,I=r)=>{const b=l.get(o);if((b==null?void 0:b[0])===h)return b[1];const y=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return ee(y,!0),l.set(o,[h,y]),Reflect.ownKeys(o).forEach(P=>{if(Object.getOwnPropertyDescriptor(y,P))return;const L=Reflect.get(o,P),D={value:L,enumerable:!0,configurable:!0};if(x.has(L))ee(L,!1);else if(L instanceof Promise)delete D.value,D.get=()=>I(L);else if(C.has(L)){const[v,z]=C.get(L);D.value=c(v,z(),I)}Object.defineProperty(y,P,D)}),Object.preventExtensions(y)},m=new WeakMap,f=[1,1],W=o=>{if(!J(o))throw new Error("object required");const h=m.get(o);if(h)return h;let I=f[0];const b=new Set,y=(i,a=++f[0])=>{I!==a&&(I=a,b.forEach(n=>n(i,a)))};let P=f[1];const L=(i=++f[1])=>(P!==i&&!b.size&&(P=i,v.forEach(([a])=>{const n=a[1](i);n>I&&(I=n)})),I),D=i=>(a,n)=>{const g=[...a];g[1]=[i,...g[1]],y(g,n)},v=new Map,z=(i,a)=>{if(b.size){const n=a[3](D(i));v.set(i,[a,n])}else v.set(i,[a])},Y=i=>{var a;const n=v.get(i);n&&(v.delete(i),(a=n[1])==null||a.call(n))},de=i=>(b.add(i),b.size===1&&v.forEach(([n,g],R)=>{const N=n[3](D(R));v.set(R,[n,N])}),()=>{b.delete(i),b.size===0&&v.forEach(([n,g],R)=>{g&&(g(),v.set(R,[n]))})}),H=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),V=t(H,{deleteProperty(i,a){const n=Reflect.get(i,a);Y(a);const g=Reflect.deleteProperty(i,a);return g&&y(["delete",[a],n]),g},set(i,a,n,g){const R=Reflect.has(i,a),N=Reflect.get(i,a,g);if(R&&(e(N,n)||m.has(n)&&e(N,m.get(n))))return!0;Y(a),J(n)&&(n=ge(n)||n);let $=n;if(n instanceof Promise)n.then(A=>{n.status="fulfilled",n.value=A,y(["resolve",[a],A])}).catch(A=>{n.status="rejected",n.reason=A,y(["reject",[a],A])});else{!C.has(n)&&s(n)&&($=W(n));const A=!x.has($)&&C.get($);A&&z(a,A)}return Reflect.set(i,a,$,g),y(["set",[a],n,N]),!0}});m.set(o,V);const ue=[H,L,c,de];return C.set(V,ue),Reflect.ownKeys(o).forEach(i=>{const a=Object.getOwnPropertyDescriptor(o,i);"value"in a&&(V[i]=o[i],delete a.value,delete a.writable),Object.defineProperty(H,i,a)}),V})=>[W,C,x,e,t,s,r,l,c,m,f],[be]=he();function S(e={}){return be(e)}function U(e,t,s){const r=C.get(e);let l;const c=[],m=r[3];let f=!1;const o=m(h=>{if(c.push(h),s){t(c.splice(0));return}l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,o()}}function ye(e,t){const s=C.get(e),[r,l,c]=s;return c(r,l(),t)}const d=S({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ce={state:d,subscribe(e){return U(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},p={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return p.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return p.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(p.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!p.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(p.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(p.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ce.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},ve=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=S({enabled:ve,userSessionId:"",events:[],connectedWalletId:void 0}),we={state:u,subscribe(e){return U(u.events,()=>e(ye(u.events[u.events.length-1])))},initialize(){u.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(u.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){u.connectedWalletId=e},click(e){if(u.enabled){const t={type:"CLICK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},track(e){if(u.enabled){const t={type:"TRACK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},view(e){if(u.enabled){const t={type:"VIEW",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}}},E=S({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:E,subscribe(e){return U(E,()=>e(E))},setChains(e){E.chains=e},setWalletConnectUri(e){E.walletConnectUri=e},setIsCustomDesktop(e){E.isCustomDesktop=e},setIsCustomMobile(e){E.isCustomMobile=e},setIsDataLoaded(e){E.isDataLoaded=e},setIsUiLoaded(e){E.isUiLoaded=e},setIsAuth(e){E.isAuth=e}},B=S({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),k={state:B,subscribe(e){return U(B,()=>e(B))},setConfig(e){var t,s;we.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var Ie=Object.defineProperty,te=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,se=(e,t,s)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Le=(e,t)=>{for(var s in t||(t={}))Ee.call(t,s)&&se(e,s,t[s]);if(te)for(var s of te(t))Oe.call(t,s)&&se(e,s,t[s]);return e};const G="https://explorer-api.walletconnect.com",Q="wcm",X="js-2.6.2";async function K(e,t){const s=Le({sdkType:Q,sdkVersion:X},t),r=new URL(e,G);return r.searchParams.append("projectId",k.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const j={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${G}/w3m/v1/getWalletImage/${e}?projectId=${k.state.projectId}&sdkType=${Q}&sdkVersion=${X}`},getAssetImageUrl(e){return`${G}/w3m/v1/getAssetImage/${e}?projectId=${k.state.projectId}&sdkType=${Q}&sdkVersion=${X}`}};var We=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))Ae.call(t,s)&&ne(e,s,t[s]);if(oe)for(var s of oe(t))Ce.call(t,s)&&ne(e,s,t[s]);return e};const re=p.isMobile(),O=S({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Ne={state:O,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=k.state;if(e==="NONE"||t==="ALL"&&!e)return O.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await j.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),O.recomendedWallets=l}else{const{chains:s,isAuth:r}=w.state,l=s==null?void 0:s.join(","),c=p.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:p.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=re?await j.getMobileListings(m):await j.getDesktopListings(m);O.recomendedWallets=Object.values(f)}return O.recomendedWallets},async getWallets(e){const t=Se({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=k.state,{recomendedWallets:l}=O;if(r==="ALL")return O.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=re?await j.getMobileListings(t):await j.getDesktopListings(t),o=Object.values(f),h=m?"search":"wallets";return O[h]={listings:[...O[h].listings,...o],total:W,page:c??1},{listings:o,total:W}},getWalletImageUrl(e){return j.getWalletImageUrl(e)},getAssetImageUrl(e){return j.getAssetImageUrl(e)},resetSearch(){O.search={listings:[],total:0,page:1}}},_=S({open:!1}),q={state:_,subscribe(e){return U(_,()=>e(_))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=w.state;if(p.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),ce.reset("ConnectWallet"),s&&r)_.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),_.open=!0,t())},200)}})},close(){_.open=!1}};var De=Object.defineProperty,ae=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,ie=(e,t,s)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ue=(e,t)=>{for(var s in t||(t={}))je.call(t,s)&&ie(e,s,t[s]);if(ae)for(var s of ae(t))Me.call(t,s)&&ie(e,s,t[s]);return e};function Pe(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const T=S({themeMode:Pe()?"dark":"light"}),le={state:T,subscribe(e){return U(T,()=>e(T))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(T.themeMode=t),s&&(T.themeVariables=Ue({},s))}},M=S({open:!1,message:"",variant:"success"}),Te={state:M,subscribe(e){return U(M,()=>e(M))},openToast(e,t){M.open=!0,M.message=e,M.variant=t},closeToast(){M.open=!1}};class Re{constructor(t){this.openModal=q.open,this.closeModal=q.close,this.subscribeModal=q.subscribe,this.setTheme=le.setThemeConfig,le.setThemeConfig(t),k.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await pe(()=>import("./index-21066bc1.js"),["assets/index-21066bc1.js","assets/index-5c4ca410.js","assets/index-882a2daf.css"]);const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const Ve=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Re},Symbol.toStringTag,{value:"Module"}));export{we as R,ce as T,p as a,Ve as i,le as n,Te as o,w as p,q as s,Ne as t,k as y}; diff --git a/examples/vite/dist/assets/index-21066bc1.js b/examples/vite/dist/assets/index-21066bc1.js new file mode 100644 index 0000000000..16127fe70c --- /dev/null +++ b/examples/vite/dist/assets/index-21066bc1.js @@ -0,0 +1,54 @@ +import{n as _t,s as ce,T as N,t as U,a as C,o as rt,R as Br,p as q,y as gt}from"./index-17433c46.js";import{aT as Dr,aU as Ur}from"./index-5c4ca410.js";import"@safe-globalThis/safe-apps-provider";import"@safe-globalThis/safe-apps-sdk";/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const de=window,wo=de.ShadowRoot&&(de.ShadyCSS===void 0||de.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vo=Symbol(),_o=new WeakMap;let nr=class{constructor(t,o,n){if(this._$cssResult$=!0,n!==vo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=o}get styleSheet(){let t=this.o;const o=this.t;if(wo&&t===void 0){const n=o!==void 0&&o.length===1;n&&(t=_o.get(o)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&_o.set(o,t))}return t}toString(){return this.cssText}};const Wr=e=>new nr(typeof e=="string"?e:e+"",void 0,vo),P=(e,...t)=>{const o=e.length===1?e[0]:t.reduce((n,r,i)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[i+1],e[0]);return new nr(o,e,vo)},jr=(e,t)=>{wo?e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{const n=document.createElement("style"),r=de.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=o.cssText,e.appendChild(n)})},Oo=wo?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let o="";for(const n of t.cssRules)o+=n.cssText;return Wr(o)})(e):e;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Ce;const he=window,Io=he.trustedTypes,Hr=Io?Io.emptyScript:"",To=he.reactiveElementPolyfillSupport,so={toAttribute(e,t){switch(t){case Boolean:e=e?Hr:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=e!==null;break;case Number:o=e===null?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch{o=null}}return o}},ir=(e,t)=>t!==e&&(t==t||e==e),Ee={attribute:!0,type:String,converter:so,reflect:!1,hasChanged:ir},ao="finalized";let $t=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var o;this.finalize(),((o=this.h)!==null&&o!==void 0?o:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((o,n)=>{const r=this._$Ep(n,o);r!==void 0&&(this._$Ev.set(r,n),t.push(r))}),t}static createProperty(t,o=Ee){if(o.state&&(o.attribute=!1),this.finalize(),this.elementProperties.set(t,o),!o.noAccessor&&!this.prototype.hasOwnProperty(t)){const n=typeof t=="symbol"?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,o);r!==void 0&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,o,n){return{get(){return this[o]},set(r){const i=this[t];this[o]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Ee}static finalize(){if(this.hasOwnProperty(ao))return!1;this[ao]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const o=this.properties,n=[...Object.getOwnPropertyNames(o),...Object.getOwnPropertySymbols(o)];for(const r of n)this.createProperty(r,o[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const o=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const r of n)o.unshift(Oo(r))}else t!==void 0&&o.push(Oo(t));return o}static _$Ep(t,o){const n=o.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(o=>this.enableUpdating=o),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(o=>o(this))}addController(t){var o,n;((o=this._$ES)!==null&&o!==void 0?o:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)===null||n===void 0||n.call(t))}removeController(t){var o;(o=this._$ES)===null||o===void 0||o.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,o)=>{this.hasOwnProperty(o)&&(this._$Ei.set(o,this[o]),delete this[o])})}createRenderRoot(){var t;const o=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return jr(o,this.constructor.elementStyles),o}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var n;return(n=o.hostConnected)===null||n===void 0?void 0:n.call(o)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(o=>{var n;return(n=o.hostDisconnected)===null||n===void 0?void 0:n.call(o)})}attributeChangedCallback(t,o,n){this._$AK(t,n)}_$EO(t,o,n=Ee){var r;const i=this.constructor._$Ep(t,n);if(i!==void 0&&n.reflect===!0){const s=(((r=n.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?n.converter:so).toAttribute(o,n.type);this._$El=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$El=null}}_$AK(t,o){var n;const r=this.constructor,i=r._$Ev.get(t);if(i!==void 0&&this._$El!==i){const s=r.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((n=s.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?s.converter:so;this._$El=i,this[i]=a.fromAttribute(o,s.type),this._$El=null}}requestUpdate(t,o,n){let r=!0;t!==void 0&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||ir)(this[t],o)?(this._$AL.has(t)||this._$AL.set(t,o),n.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(o){Promise.reject(o)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,i)=>this[i]=r),this._$Ei=void 0);let o=!1;const n=this._$AL;try{o=this.shouldUpdate(n),o?(this.willUpdate(n),(t=this._$ES)===null||t===void 0||t.forEach(r=>{var i;return(i=r.hostUpdate)===null||i===void 0?void 0:i.call(r)}),this.update(n)):this._$Ek()}catch(r){throw o=!1,this._$Ek(),r}o&&this._$AE(n)}willUpdate(t){}_$AE(t){var o;(o=this._$ES)===null||o===void 0||o.forEach(n=>{var r;return(r=n.hostUpdated)===null||r===void 0?void 0:r.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((o,n)=>this._$EO(n,this[n],o)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};$t[ao]=!0,$t.elementProperties=new Map,$t.elementStyles=[],$t.shadowRootOptions={mode:"open"},To==null||To({ReactiveElement:$t}),((Ce=he.reactiveElementVersions)!==null&&Ce!==void 0?Ce:he.reactiveElementVersions=[]).push("1.6.3");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Ae;const ue=window,Ot=ue.trustedTypes,ko=Ot?Ot.createPolicy("lit-html",{createHTML:e=>e}):void 0,lo="$lit$",ot=`lit$${(Math.random()+"").slice(9)}$`,sr="?"+ot,zr=`<${sr}>`,pt=document,Zt=()=>pt.createComment(""),Vt=e=>e===null||typeof e!="object"&&typeof e!="function",ar=Array.isArray,Fr=e=>ar(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",_e=`[ +\f\r]`,Rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Mo=/-->/g,Po=/>/g,lt=RegExp(`>|${_e}(?:([^\\s"'>=/]+)(${_e}*=${_e}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),So=/'/g,Ro=/"/g,lr=/^(?:script|style|textarea|title)$/i,cr=e=>(t,...o)=>({_$litType$:e,strings:t,values:o}),h=cr(1),L=cr(2),ft=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),Lo=new WeakMap,ut=pt.createTreeWalker(pt,129,null,!1);function dr(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ko!==void 0?ko.createHTML(t):t}const Zr=(e,t)=>{const o=e.length-1,n=[];let r,i=t===2?"":"",s=Rt;for(let a=0;a"?(s=r??Rt,b=-1):d[1]===void 0?b=-2:(b=s.lastIndex-d[2].length,c=d[1],s=d[3]===void 0?lt:d[3]==='"'?Ro:So):s===Ro||s===So?s=lt:s===Mo||s===Po?s=Rt:(s=lt,r=void 0);const m=s===lt&&e[a+1].startsWith("/>")?" ":"";i+=s===Rt?l+zr:b>=0?(n.push(c),l.slice(0,b)+lo+l.slice(b)+ot+m):l+ot+(b===-2?(n.push(void 0),a):m)}return[dr(e,i+(e[o]||"")+(t===2?"":"")),n]};class Kt{constructor({strings:t,_$litType$:o},n){let r;this.parts=[];let i=0,s=0;const a=t.length-1,l=this.parts,[c,d]=Zr(t,o);if(this.el=Kt.createElement(c,n),ut.currentNode=this.el.content,o===2){const b=this.el.content,u=b.firstChild;u.remove(),b.append(...u.childNodes)}for(;(r=ut.nextNode())!==null&&l.length0){r.textContent=Ot?Ot.emptyScript:"";for(let m=0;m2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=B}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,o=this,n,r){const i=this.strings;let s=!1;if(i===void 0)t=It(this,t,o,0),s=!Vt(t)||t!==this._$AH&&t!==ft,s&&(this._$AH=t);else{const a=t;let l,c;for(t=i[0],l=0;l{var n,r;const i=(n=o==null?void 0:o.renderBefore)!==null&&n!==void 0?n:t;let s=i._$litPart$;if(s===void 0){const a=(r=o==null?void 0:o.renderBefore)!==null&&r!==void 0?r:null;i._$litPart$=s=new Jt(t.insertBefore(Zt(),a),a,void 0,o??{})}return s._$AI(e),s};/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Oe,Ie;class A extends $t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,o;const n=super.createRenderRoot();return(t=(o=this.renderOptions).renderBefore)!==null&&t!==void 0||(o.renderBefore=n.firstChild),n}update(t){const o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Qr(o,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return ft}}A.finalized=!0,A._$litElement$=!0,(Oe=globalThis.litElementHydrateSupport)===null||Oe===void 0||Oe.call(globalThis,{LitElement:A});const Bo=globalThis.litElementPolyfillSupport;Bo==null||Bo({LitElement:A});((Ie=globalThis.litElementVersions)!==null&&Ie!==void 0?Ie:globalThis.litElementVersions=[]).push("3.3.3");/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const O=e=>t=>typeof t=="function"?((o,n)=>(customElements.define(o,n),n))(e,t):((o,n)=>{const{kind:r,elements:i}=n;return{kind:r,elements:i,finisher(s){customElements.define(o,s)}}})(e,t);/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Xr=(e,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(o){o.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(o){o.createProperty(t.key,e)}},tn=(e,t,o)=>{t.constructor.createProperty(o,e)};function $(e){return(t,o)=>o!==void 0?tn(e,t,o):Xr(e,t)}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function W(e){return $({...e,state:!0})}/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var Te;((Te=window.HTMLSlotElement)===null||Te===void 0?void 0:Te.prototype.assignedElements)!=null;/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const en={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},on=e=>(...t)=>({_$litDirective$:e,values:t});class rn{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,n){this._$Ct=t,this._$AM=o,this._$Ci=n}_$AS(t,o){return this.update(t,o)}update(t,o){return this.render(...o)}}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const G=on(class extends rn{constructor(e){var t;if(super(e),e.type!==en.ATTRIBUTE||e.name!=="class"||((t=e.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var o,n;if(this.it===void 0){this.it=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(i=>i!=="")));for(const i in t)t[i]&&!(!((o=this.nt)===null||o===void 0)&&o.has(i))&&this.it.add(i);return this.render(t)}const r=e.element.classList;this.it.forEach(i=>{i in t||(r.remove(i),this.it.delete(i))});for(const i in t){const s=!!t[i];s===this.it.has(i)||!((n=this.nt)===null||n===void 0)&&n.has(i)||(s?(r.add(i),this.it.add(i)):(r.remove(i),this.it.delete(i)))}return ft}});function nn(e,t){e.indexOf(t)===-1&&e.push(t)}const hr=(e,t,o)=>Math.min(Math.max(o,e),t),H={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},me=e=>typeof e=="number",Et=e=>Array.isArray(e)&&!me(e[0]),sn=(e,t,o)=>{const n=t-e;return((o-e)%n+n)%n+e};function an(e,t){return Et(e)?e[sn(0,e.length,t)]:e}const ur=(e,t,o)=>-o*e+o*t+e,mr=()=>{},it=e=>e,bo=(e,t,o)=>t-e===0?1:(o-e)/(t-e);function gr(e,t){const o=e[e.length-1];for(let n=1;n<=t;n++){const r=bo(0,t,n);e.push(ur(o,1,r))}}function ln(e){const t=[0];return gr(t,e-1),t}function cn(e,t=ln(e.length),o=it){const n=e.length,r=n-t.length;return r>0&&gr(t,r),i=>{let s=0;for(;sArray.isArray(e)&&me(e[0]),co=e=>typeof e=="object"&&!!e.createAnimation,Tt=e=>typeof e=="function",dn=e=>typeof e=="string",zt={ms:e=>e*1e3,s:e=>e/1e3},fr=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,hn=1e-7,un=12;function mn(e,t,o,n,r){let i,s,a=0;do s=t+(o-t)/2,i=fr(s,n,r)-e,i>0?o=s:t=s;while(Math.abs(i)>hn&&++amn(i,0,1,e,o);return i=>i===0||i===1?i:fr(r(i),t,n)}const gn=(e,t="end")=>o=>{o=t==="end"?Math.min(o,.999):Math.max(o,.001);const n=o*e,r=t==="end"?Math.floor(n):Math.ceil(n);return hr(0,1,r/e)},Do={ease:Ht(.25,.1,.25,1),"ease-in":Ht(.42,0,1,1),"ease-in-out":Ht(.42,0,.58,1),"ease-out":Ht(0,0,.58,1)},pn=/\((.*?)\)/;function Uo(e){if(Tt(e))return e;if(pr(e))return Ht(...e);if(Do[e])return Do[e];if(e.startsWith("steps")){const t=pn.exec(e);if(t){const o=t[1].split(",");return gn(parseFloat(o[0]),o[1].trim())}}return it}class wr{constructor(t,o=[0,1],{easing:n,duration:r=H.duration,delay:i=H.delay,endDelay:s=H.endDelay,repeat:a=H.repeat,offset:l,direction:c="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=it,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((b,u)=>{this.resolve=b,this.reject=u}),n=n||H.easing,co(n)){const b=n.createAnimation(o);n=b.easing,o=b.keyframes||o,r=b.duration||r}this.repeat=a,this.easing=Et(n)?it:Uo(n),this.updateDuration(r);const d=cn(o,l,Et(n)?n.map(Uo):it);this.tick=b=>{var u;i=i;let m=0;this.pauseTime!==void 0?m=this.pauseTime:m=(b-this.startTime)*this.rate,this.t=m,m/=1e3,m=Math.max(m-i,0),this.playState==="finished"&&this.pauseTime===void 0&&(m=this.totalDuration);const v=m/this.duration;let g=Math.floor(v),E=v%1;!E&&v>=1&&(E=1),E===1&&g--;const p=g%2;(c==="reverse"||c==="alternate"&&p||c==="alternate-reverse"&&!p)&&(E=1-E);const y=m>=this.totalDuration?1:Math.min(E,1),w=d(this.easing(y));t(w),this.pauseTime===void 0&&(this.playState==="finished"||m>=this.totalDuration+s)?(this.playState="finished",(u=this.resolve)===null||u===void 0||u.call(this,w)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}class fn{setAnimation(t){this.animation=t,t==null||t.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const ke=new WeakMap;function vr(e){return ke.has(e)||ke.set(e,{transforms:[],values:new Map}),ke.get(e)}function wn(e,t){return e.has(t)||e.set(t,new fn),e.get(t)}const vn=["","X","Y","Z"],bn=["translate","scale","rotate","skew"],ge={x:"translateX",y:"translateY",z:"translateZ"},Wo={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},yn={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:Wo,scale:{syntax:"",initialValue:1,toDefaultUnit:it},skew:Wo},qt=new Map,yo=e=>`--motion-${e}`,pe=["x","y","z"];bn.forEach(e=>{vn.forEach(t=>{pe.push(e+t),qt.set(yo(e+t),yn[e])})});const xn=(e,t)=>pe.indexOf(e)-pe.indexOf(t),$n=new Set(pe),br=e=>$n.has(e),Cn=(e,t)=>{ge[t]&&(t=ge[t]);const{transforms:o}=vr(e);nn(o,t),e.style.transform=En(o)},En=e=>e.sort(xn).reduce(An,"").trim(),An=(e,t)=>`${e} ${t}(var(${yo(t)}))`,ho=e=>e.startsWith("--"),jo=new Set;function _n(e){if(!jo.has(e)){jo.add(e);try{const{syntax:t,initialValue:o}=qt.has(e)?qt.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:o})}catch{}}}const Me=(e,t)=>document.createElement("div").animate(e,t),Ho={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Me({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Me({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Me({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Pe={},Ct={};for(const e in Ho)Ct[e]=()=>(Pe[e]===void 0&&(Pe[e]=Ho[e]()),Pe[e]);const On=.015,In=(e,t)=>{let o="";const n=Math.round(t/On);for(let r=0;rTt(e)?Ct.linearEasing()?`linear(${In(e,t)})`:H.easing:pr(e)?Tn(e):e,Tn=([e,t,o,n])=>`cubic-bezier(${e}, ${t}, ${o}, ${n})`;function kn(e,t){for(let o=0;oArray.isArray(e)?e:[e];function uo(e){return ge[e]&&(e=ge[e]),br(e)?yo(e):e}const Xt={get:(e,t)=>{t=uo(t);let o=ho(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!o&&o!==0){const n=qt.get(t);n&&(o=n.initialValue)}return o},set:(e,t,o)=>{t=uo(t),ho(t)?e.style.setProperty(t,o):e.style[t]=o}};function yr(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function Pn(e,t){var o;let n=(t==null?void 0:t.toDefaultUnit)||it;const r=e[e.length-1];if(dn(r)){const i=((o=r.match(/(-?[\d.]+)([a-z%]*)/))===null||o===void 0?void 0:o[2])||"";i&&(n=s=>s+i)}return n}function Sn(){return window.__MOTION_DEV_TOOLS_RECORD}function Rn(e,t,o,n={},r){const i=Sn(),s=n.record!==!1&&i;let a,{duration:l=H.duration,delay:c=H.delay,endDelay:d=H.endDelay,repeat:b=H.repeat,easing:u=H.easing,persist:m=!1,direction:v,offset:g,allowWebkitAcceleration:E=!1}=n;const p=vr(e),y=br(t);let w=Ct.waapi();y&&Cn(e,t);const f=uo(t),I=wn(p.values,f),T=qt.get(f);return yr(I.animation,!(co(u)&&I.generator)&&n.record!==!1),()=>{const R=()=>{var M,F;return(F=(M=Xt.get(e,f))!==null&&M!==void 0?M:T==null?void 0:T.initialValue)!==null&&F!==void 0?F:0};let k=kn(Mn(o),R);const z=Pn(k,T);if(co(u)){const M=u.createAnimation(k,t!=="opacity",R,f,I);u=M.easing,k=M.keyframes||k,l=M.duration||l}if(ho(f)&&(Ct.cssRegisterProperty()?_n(f):w=!1),y&&!Ct.linearEasing()&&(Tt(u)||Et(u)&&u.some(Tt))&&(w=!1),w){T&&(k=k.map(Z=>me(Z)?T.toDefaultUnit(Z):Z)),k.length===1&&(!Ct.partialKeyframes()||s)&&k.unshift(R());const M={delay:zt.ms(c),duration:zt.ms(l),endDelay:zt.ms(d),easing:Et(u)?void 0:zo(u,l),direction:v,iterations:b+1,fill:"both"};a=e.animate({[f]:k,offset:g,easing:Et(u)?u.map(Z=>zo(Z,l)):void 0},M),a.finished||(a.finished=new Promise((Z,V)=>{a.onfinish=Z,a.oncancel=V}));const F=k[k.length-1];a.finished.then(()=>{m||(Xt.set(e,f,F),a.cancel())}).catch(mr),E||(a.playbackRate=1.000001)}else if(r&&y)k=k.map(M=>typeof M=="string"?parseFloat(M):M),k.length===1&&k.unshift(parseFloat(R())),a=new r(M=>{Xt.set(e,f,z?z(M):M)},k,Object.assign(Object.assign({},n),{duration:l,easing:u}));else{const M=k[k.length-1];Xt.set(e,f,T&&me(M)?T.toDefaultUnit(M):M)}return s&&i(e,t,k,{duration:l,delay:c,easing:u,repeat:b,offset:g},"motion-one"),I.setAnimation(a),a}}const Ln=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function Nn(e,t){var o;return typeof e=="string"?t?((o=t[e])!==null&&o!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const Bn=e=>e(),xr=(e,t,o=H.duration)=>new Proxy({animations:e.map(Bn).filter(Boolean),duration:o,options:t},Un),Dn=e=>e.animations[0],Un={get:(e,t)=>{const o=Dn(e);switch(t){case"duration":return e.duration;case"currentTime":return zt.s((o==null?void 0:o[t])||0);case"playbackRate":case"playState":return o==null?void 0:o[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(Wn)).catch(mr)),e.finished;case"stop":return()=>{e.animations.forEach(n=>yr(n))};case"forEachNative":return n=>{e.animations.forEach(r=>n(r,e))};default:return typeof(o==null?void 0:o[t])>"u"?void 0:()=>e.animations.forEach(n=>n[t]())}},set:(e,t,o)=>{switch(t){case"currentTime":o=zt.ms(o);case"playbackRate":for(let n=0;ne.finished;function jn(e,t,o){return Tt(e)?e(t,o):e}function Hn(e){return function(o,n,r={}){o=Nn(o);const i=o.length,s=[];for(let a=0;a{const o=new wr(e,[0,1],t);return o.finished.catch(()=>{}),o}],t,t.duration)}function mt(e,t,o){return(Tt(e)?Fn:zn)(e,t,o)}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const D=e=>e??B;var Gt={},Zn=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},$r={},j={};let xo;const Vn=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];j.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};j.getSymbolTotalCodewords=function(t){return Vn[t]};j.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};j.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');xo=t};j.isKanjiModeEnabled=function(){return typeof xo<"u"};j.toSJIS=function(t){return xo(t)};var be={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+o)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})(be);function Cr(){this.buffer=[],this.length=0}Cr.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let o=0;o>>t-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Kn=Cr;function Qt(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Qt.prototype.set=function(e,t,o,n){const r=e*this.size+t;this.data[r]=o,n&&(this.reservedBit[r]=!0)};Qt.prototype.get=function(e,t){return this.data[e*this.size+t]};Qt.prototype.xor=function(e,t,o){this.data[e*this.size+t]^=o};Qt.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var qn=Qt,Er={};(function(e){const t=j.getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const r=Math.floor(n/7)+2,i=t(n),s=i===145?26:Math.ceil((i-13)/(2*r-2))*2,a=[i-7];for(let l=1;l=0&&r<=7},e.from=function(r){return e.isValid(r)?parseInt(r,10):void 0},e.getPenaltyN1=function(r){const i=r.size;let s=0,a=0,l=0,c=null,d=null;for(let b=0;b=5&&(s+=t.N1+(a-5)),c=m,a=1),m=r.get(u,b),m===d?l++:(l>=5&&(s+=t.N1+(l-5)),d=m,l=1)}a>=5&&(s+=t.N1+(a-5)),l>=5&&(s+=t.N1+(l-5))}return s},e.getPenaltyN2=function(r){const i=r.size;let s=0;for(let a=0;a=10&&(a===1488||a===93)&&s++,l=l<<1&2047|r.get(d,c),d>=10&&(l===1488||l===93)&&s++}return s*t.N3},e.getPenaltyN4=function(r){let i=0;const s=r.data.length;for(let l=0;l=0;){const s=i[0];for(let l=0;l0){const i=new Uint8Array(this.degree);return i.set(n,r),i}return n};var Jn=$o,Tr={},at={},Co={};Co.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Y={};const kr="[0-9]+",Gn="[A-Z $%*+\\-./:]+";let Yt="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Yt=Yt.replace(/u/g,"\\u");const Qn="(?:(?![A-Z0-9 $%*+\\-./:]|"+Yt+`)(?:.|[\r +]))+`;Y.KANJI=new RegExp(Yt,"g");Y.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Y.BYTE=new RegExp(Qn,"g");Y.NUMERIC=new RegExp(kr,"g");Y.ALPHANUMERIC=new RegExp(Gn,"g");const Xn=new RegExp("^"+Yt+"$"),ti=new RegExp("^"+kr+"$"),ei=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Y.testKanji=function(t){return Xn.test(t)};Y.testNumeric=function(t){return ti.test(t)};Y.testAlphanumeric=function(t){return ei.test(t)};(function(e){const t=Co,o=Y;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return o.testNumeric(i)?e.NUMERIC:o.testAlphanumeric(i)?e.ALPHANUMERIC:o.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+r)}}e.from=function(i,s){if(e.isValid(i))return i;try{return n(i)}catch{return s}}})(at);(function(e){const t=j,o=ye,n=be,r=at,i=Co,s=7973,a=t.getBCHDigit(s);function l(u,m,v){for(let g=1;g<=40;g++)if(m<=e.getCapacity(g,v,u))return g}function c(u,m){return r.getCharCountIndicator(u,m)+4}function d(u,m){let v=0;return u.forEach(function(g){const E=c(g.mode,m);v+=E+g.getBitsLength()}),v}function b(u,m){for(let v=1;v<=40;v++)if(d(u,v)<=e.getCapacity(v,m,r.MIXED))return v}e.from=function(m,v){return i.isValid(m)?parseInt(m,10):v},e.getCapacity=function(m,v,g){if(!i.isValid(m))throw new Error("Invalid QR Code version");typeof g>"u"&&(g=r.BYTE);const E=t.getSymbolTotalCodewords(m),p=o.getTotalCodewordsCount(m,v),y=(E-p)*8;if(g===r.MIXED)return y;const w=y-c(g,m);switch(g){case r.NUMERIC:return Math.floor(w/10*3);case r.ALPHANUMERIC:return Math.floor(w/11*2);case r.KANJI:return Math.floor(w/13);case r.BYTE:default:return Math.floor(w/8)}},e.getBestVersionForData=function(m,v){let g;const E=n.from(v,n.M);if(Array.isArray(m)){if(m.length>1)return b(m,E);if(m.length===0)return 1;g=m[0]}else g=m;return l(g.mode,g.getLength(),E)},e.getEncodedBits=function(m){if(!i.isValid(m)||m<7)throw new Error("Invalid QR Code version");let v=m<<12;for(;t.getBCHDigit(v)-a>=0;)v^=s<=0;)r^=Pr<0&&(n=this.data.substr(o),r=parseInt(n,10),t.put(r,i*3+1))};var ni=kt;const ii=at,Se=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Mt(e){this.mode=ii.ALPHANUMERIC,this.data=e}Mt.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Mt.prototype.getLength=function(){return this.data.length};Mt.prototype.getBitsLength=function(){return Mt.getBitsLength(this.data.length)};Mt.prototype.write=function(t){let o;for(o=0;o+2<=this.data.length;o+=2){let n=Se.indexOf(this.data[o])*45;n+=Se.indexOf(this.data[o+1]),t.put(n,11)}this.data.length%2&&t.put(Se.indexOf(this.data[o]),6)};var si=Mt;const ai=Dr,li=at;function Pt(e){this.mode=li.BYTE,typeof e=="string"&&(e=ai(e)),this.data=new Uint8Array(e)}Pt.getBitsLength=function(t){return t*8};Pt.prototype.getLength=function(){return this.data.length};Pt.prototype.getBitsLength=function(){return Pt.getBitsLength(this.data.length)};Pt.prototype.write=function(e){for(let t=0,o=this.data.length;t=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` +Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),e.put(o,13)}};var ui=St;(function(e){const t=at,o=ni,n=si,r=ci,i=ui,s=Y,a=j,l=Ur;function c(p){return unescape(encodeURIComponent(p)).length}function d(p,y,w){const f=[];let I;for(;(I=p.exec(w))!==null;)f.push({data:I[0],index:I.index,mode:y,length:I[0].length});return f}function b(p){const y=d(s.NUMERIC,t.NUMERIC,p),w=d(s.ALPHANUMERIC,t.ALPHANUMERIC,p);let f,I;return a.isKanjiModeEnabled()?(f=d(s.BYTE,t.BYTE,p),I=d(s.KANJI,t.KANJI,p)):(f=d(s.BYTE_KANJI,t.BYTE,p),I=[]),y.concat(w,f,I).sort(function(R,k){return R.index-k.index}).map(function(R){return{data:R.data,mode:R.mode,length:R.length}})}function u(p,y){switch(y){case t.NUMERIC:return o.getBitsLength(p);case t.ALPHANUMERIC:return n.getBitsLength(p);case t.KANJI:return i.getBitsLength(p);case t.BYTE:return r.getBitsLength(p)}}function m(p){return p.reduce(function(y,w){const f=y.length-1>=0?y[y.length-1]:null;return f&&f.mode===w.mode?(y[y.length-1].data+=w.data,y):(y.push(w),y)},[])}function v(p){const y=[];for(let w=0;w=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?e.set(i+a,s+l,!0,!0):e.set(i+a,s+l,!1,!0))}}function xi(e){const t=e.size;for(let o=8;o>a&1)===1,e.set(r,i,s,!0),e.set(i,r,s,!0)}function Ne(e,t,o){const n=e.size,r=vi.getEncodedBits(t,o);let i,s;for(i=0;i<15;i++)s=(r>>i&1)===1,i<6?e.set(i,8,s,!0):i<8?e.set(i+1,8,s,!0):e.set(n-15+i,8,s,!0),i<8?e.set(8,n-i-1,s,!0):i<9?e.set(8,15-i-1+1,s,!0):e.set(8,15-i-1,s,!0);e.set(n-8,8,1,!0)}function Ei(e,t){const o=e.size;let n=-1,r=o-1,i=7,s=0;for(let a=o-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!e.isReserved(r,a-l)){let c=!1;s>>i&1)===1),e.set(r,a-l,c),i--,i===-1&&(s++,i=7)}if(r+=n,r<0||o<=r){r-=n,n=-n;break}}}function Ai(e,t,o){const n=new mi;o.forEach(function(l){n.put(l.mode.bit,4),n.put(l.getLength(),bi.getCharCountIndicator(l.mode,e)),l.write(n)});const r=$e.getSymbolTotalCodewords(e),i=po.getTotalCodewordsCount(e,t),s=(r-i)*8;for(n.getLengthInBits()+4<=s&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const a=(s-n.getLengthInBits())/8;for(let l=0;l=7&&Ci(l,t),Ei(l,s),isNaN(n)&&(n=go.getBestMask(l,Ne.bind(null,l,o))),go.applyMask(n,l),Ne(l,o,n),{modules:l,version:t,errorCorrectionLevel:o,maskPattern:n,segments:r}}$r.create=function(t,o){if(typeof t>"u"||t==="")throw new Error("No input text");let n=Re.M,r,i;return typeof o<"u"&&(n=Re.from(o.errorCorrectionLevel,Re.M),r=we.from(o.version),i=go.from(o.maskPattern),o.toSJISFunc&&$e.setToSJISFunction(o.toSJISFunc)),Oi(t,r,n,i)};var Rr={},Eo={};(function(e){function t(o){if(typeof o=="number"&&(o=o.toString()),typeof o!="string")throw new Error("Color should be defined as hex string");let n=o.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+o);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");const r=parseInt(n.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});const r=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,s=n.scale||4;return{width:i,scale:i?4:s,margin:r,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,r){return r.width&&r.width>=n+r.margin*2?r.width/(n+r.margin*2):r.scale},e.getImageWidth=function(n,r){const i=e.getScale(n,r);return Math.floor((n+r.margin*2)*i)},e.qrToImageData=function(n,r,i){const s=r.modules.size,a=r.modules.data,l=e.getScale(s,i),c=Math.floor((s+i.margin*2)*l),d=i.margin*l,b=[i.color.light,i.color.dark];for(let u=0;u=d&&m>=d&&u"u"&&(!s||!s.getContext)&&(l=s,s=void 0),s||(c=n()),l=t.getOptions(l);const d=t.getImageWidth(i.modules.size,l),b=c.getContext("2d"),u=b.createImageData(d,d);return t.qrToImageData(u.data,i,l),o(b,c,d),b.putImageData(u,0,0),c},e.renderToDataURL=function(i,s,a){let l=a;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),l||(l={});const c=e.render(i,s,l),d=l.type||"image/png",b=l.rendererOpts||{};return c.toDataURL(d,b.quality)}})(Rr);var Lr={};const Ii=Eo;function Vo(e,t){const o=e.a/255,n=t+'="'+e.hex+'"';return o<1?n+" "+t+'-opacity="'+o.toFixed(2).slice(1)+'"':n}function Be(e,t,o){let n=e+t;return typeof o<"u"&&(n+=" "+o),n}function Ti(e,t,o){let n="",r=0,i=!1,s=0;for(let a=0;a0&&l>0&&e[a-1]||(n+=i?Be("M",l+o,.5+c+o):Be("m",r,0),r=0,i=!1),l+1':"",c="',d='viewBox="0 0 '+a+" "+a+'"',u=''+l+c+` +`;return typeof n=="function"&&n(null,u),u};const ki=Zn,fo=$r,Nr=Rr,Mi=Lr;function Ao(e,t,o,n,r){const i=[].slice.call(arguments,1),s=i.length,a=typeof i[s-1]=="function";if(!a&&!ki())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(r=o,o=t,t=n=void 0):s===3&&(t.getContext&&typeof r>"u"?(r=n,n=void 0):(r=n,n=o,o=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(o=t,t=n=void 0):s===2&&!t.getContext&&(n=o,o=t,t=void 0),new Promise(function(l,c){try{const d=fo.create(o,n);l(e(d,t,n))}catch(d){c(d)}})}try{const l=fo.create(o,n);r(null,e(l,t,n))}catch(l){r(l)}}Gt.create=fo.create;Gt.toCanvas=Ao.bind(null,Nr.render);Gt.toDataURL=Ao.bind(null,Nr.renderToDataURL);Gt.toString=Ao.bind(null,function(e,t,o){return Mi.render(e,o)});var Pi=Object.defineProperty,Ko=Object.getOwnPropertySymbols,Si=Object.prototype.hasOwnProperty,Ri=Object.prototype.propertyIsEnumerable,qo=(e,t,o)=>t in e?Pi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,De=(e,t)=>{for(var o in t||(t={}))Si.call(t,o)&&qo(e,o,t[o]);if(Ko)for(var o of Ko(t))Ri.call(t,o)&&qo(e,o,t[o]);return e};function Li(){var e;const t=(e=_t.state.themeMode)!=null?e:"dark",o={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[t];return{"--wcm-color-fg-1":o.foreground[1],"--wcm-color-fg-2":o.foreground[2],"--wcm-color-fg-3":o.foreground[3],"--wcm-color-bg-1":o.background[1],"--wcm-color-bg-2":o.background[2],"--wcm-color-bg-3":o.background[3],"--wcm-color-overlay":o.overlay}}function Yo(){return{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}}const _={getPreset(e){return Yo()[e]},setTheme(){const e=document.querySelector(":root"),{themeVariables:t}=_t.state;if(e){const o=De(De(De({},Li()),Yo()),t);Object.entries(o).forEach(([n,r])=>e.style.setProperty(n,r))}},globalCss:P`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},Ni=P`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var Bi=Object.defineProperty,Di=Object.getOwnPropertyDescriptor,wt=(e,t,o,n)=>{for(var r=n>1?void 0:n?Di(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Bi(t,o,r),r};let Q=class extends A{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const e={"wcm-icon-left":this.iconLeft!==void 0,"wcm-icon-right":this.iconRight!==void 0,"wcm-ghost":this.variant==="ghost","wcm-outline":this.variant==="outline"};let t="inverse";return this.variant==="ghost"&&(t="secondary"),this.variant==="outline"&&(t="accent"),h``}};Q.styles=[_.globalCss,Ni],wt([$({type:Boolean})],Q.prototype,"disabled",2),wt([$()],Q.prototype,"iconLeft",2),wt([$()],Q.prototype,"iconRight",2),wt([$()],Q.prototype,"onClick",2),wt([$()],Q.prototype,"variant",2),Q=wt([O("wcm-button")],Q);const Ui=P`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var Wi=Object.defineProperty,ji=Object.getOwnPropertyDescriptor,Ue=(e,t,o,n)=>{for(var r=n>1?void 0:n?ji(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Wi(t,o,r),r};let Lt=class extends A{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const e={"wcm-secondary":this.variant==="secondary"};return h``}};Lt.styles=[_.globalCss,Ui],Ue([$({type:Boolean})],Lt.prototype,"disabled",2),Ue([$()],Lt.prototype,"variant",2),Lt=Ue([O("wcm-button-big")],Lt);const Hi=P`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var zi=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,Zi=(e,t,o,n)=>{for(var r=n>1?void 0:n?Fi(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&zi(t,o,r),r};let We=class extends A{render(){return h`
`}};We.styles=[_.globalCss,Hi],We=Zi([O("wcm-info-footer")],We);const S={CROSS_ICON:L``,WALLET_CONNECT_LOGO:L``,WALLET_CONNECT_ICON:L``,WALLET_CONNECT_ICON_COLORED:L``,BACK_ICON:L``,COPY_ICON:L``,RETRY_ICON:L``,DESKTOP_ICON:L``,MOBILE_ICON:L``,ARROW_DOWN_ICON:L``,ARROW_UP_RIGHT_ICON:L``,ARROW_RIGHT_ICON:L``,QRCODE_ICON:L``,SCAN_ICON:L``,CHECKMARK_ICON:L``,SEARCH_ICON:L``,WALLET_PLACEHOLDER:L``,GLOBE_ICON:L``},Vi=P`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var Ki=Object.defineProperty,qi=Object.getOwnPropertyDescriptor,Yi=(e,t,o,n)=>{for(var r=n>1?void 0:n?qi(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Ki(t,o,r),r};let je=class extends A{render(){return h`
${S.WALLET_CONNECT_LOGO}
`}};je.styles=[_.globalCss,Vi],je=Yi([O("wcm-modal-backcard")],je);const Ji=P`main{padding:20px;padding-top:0;width:100%}`;var Gi=Object.defineProperty,Qi=Object.getOwnPropertyDescriptor,Xi=(e,t,o,n)=>{for(var r=n>1?void 0:n?Qi(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Gi(t,o,r),r};let He=class extends A{render(){return h`
`}};He.styles=[_.globalCss,Ji],He=Xi([O("wcm-modal-content")],He);const ts=P`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;var es=Object.defineProperty,os=Object.getOwnPropertyDescriptor,rs=(e,t,o,n)=>{for(var r=n>1?void 0:n?os(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&es(t,o,r),r};let ze=class extends A{render(){return h`
`}};ze.styles=[_.globalCss,ts],ze=rs([O("wcm-modal-footer")],ze);const ns=P`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var is=Object.defineProperty,ss=Object.getOwnPropertyDescriptor,Nt=(e,t,o,n)=>{for(var r=n>1?void 0:n?ss(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&is(t,o,r),r};let ct=class extends A{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return h``}actionBtnTemplate(){return h``}render(){const e={"wcm-border":this.border},t=N.state.history.length>1,o=this.title?h`${this.title}`:h``;return h`
${t?this.backBtnTemplate():null} ${o} ${this.onAction?this.actionBtnTemplate():null}
`}};ct.styles=[_.globalCss,ns],Nt([$()],ct.prototype,"title",2),Nt([$()],ct.prototype,"onAction",2),Nt([$()],ct.prototype,"actionIcon",2),Nt([$({type:Boolean})],ct.prototype,"border",2),ct=Nt([O("wcm-modal-header")],ct);const x={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(e,t){const o=e.renderRoot.querySelector(t);if(!o)throw new Error(`${t} not found`);return o},getWalletIcon({id:e,image_id:t}){const{walletImages:o}=gt.state;return o!=null&&o[e]?o[e]:t?U.getWalletImageUrl(t):""},getWalletName(e,t=!1){return t&&e.length>8?`${e.substring(0,8)}..`:e},isMobileAnimation(){return window.innerWidth<=x.MOBILE_BREAKPOINT},async preloadImage(e){const t=new Promise((o,n)=>{const r=new Image;r.onload=o,r.onerror=n,r.crossOrigin="anonymous",r.src=e});return Promise.race([t,C.wait(3e3)])},getErrorMessage(e){return e instanceof Error?e.message:"Unknown Error"},debounce(e,t=500){let o;return(...n)=>{function r(){e(...n)}o&&clearTimeout(o),o=setTimeout(r,t)}},handleMobileLinking(e){const{walletConnectUri:t}=q.state,{mobile:o,name:n}=e,r=o==null?void 0:o.native,i=o==null?void 0:o.universal;x.setRecentWallet(e);function s(a){let l="";r?l=C.formatUniversalUrl(r,a,n):i&&(l=C.formatNativeUrl(i,a,n)),C.openHref(l,"_self")}t&&s(t)},handleAndroidLinking(){const{walletConnectUri:e}=q.state;e&&(C.setWalletConnectAndroidDeepLink(e),C.openHref(e,"_self"))},async handleUriCopy(){const{walletConnectUri:e}=q.state;if(e)try{await navigator.clipboard.writeText(e),rt.openToast("Link copied","success")}catch{rt.openToast("Failed to copy","error")}},getCustomImageUrls(){const{walletImages:e}=gt.state,t=Object.values(e??{});return Object.values(t)},truncate(e,t=8){return e.length<=t?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`},setRecentWallet(e){try{localStorage.setItem(x.WCM_RECENT_WALLET_DATA,JSON.stringify(e))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const e=localStorage.getItem(x.WCM_RECENT_WALLET_DATA);return e?JSON.parse(e):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes(e,t){return e.toUpperCase().includes(t.toUpperCase())},openWalletExplorerUrl(){C.openHref(x.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:e,mobile:t}=C.getWalletRouterData(),o=!!(e!=null&&e.native),n=!!(e!=null&&e.universal),r=!!(t!=null&&t.native)||!!(t!=null&&t.universal);return{isDesktop:o,isMobile:r,isWeb:n}},goToConnectingView(e){N.setData({Wallet:e});const t=C.isMobile(),{isDesktop:o,isWeb:n,isMobile:r}=x.getCachedRouterWalletPlatforms();t?r?N.push("MobileConnecting"):n?N.push("WebConnecting"):N.push("InstallWallet"):o?N.push("DesktopConnecting"):n?N.push("WebConnecting"):r?N.push("MobileQrcodeConnecting"):N.push("InstallWallet")}},as=P`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var ls=Object.defineProperty,cs=Object.getOwnPropertyDescriptor,Fe=(e,t,o,n)=>{for(var r=n>1?void 0:n?cs(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&ls(t,o,r),r};let Bt=class extends A{constructor(){super(),this.view=N.state.view,this.prevView=N.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=N.subscribe(e=>{this.view!==e.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([e])=>{const t=`${e.contentRect.height}px`;this.oldHeight!=="0px"&&mt(this.routerEl,{height:[this.oldHeight,t]},{duration:.2}),this.oldHeight=t}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var e,t;(e=this.unsubscribe)==null||e.call(this),(t=this.resizeObserver)==null||t.disconnect()}get routerEl(){return x.getShadowRootElement(this,".wcm-router")}get contentEl(){return x.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return h``;case"DesktopConnecting":return h``;case"MobileConnecting":return h``;case"WebConnecting":return h``;case"MobileQrcodeConnecting":return h``;case"WalletExplorer":return h``;case"Qrcode":return h``;case"InstallWallet":return h``;default:return h`
Not Found
`}}async onChangeRoute(){await mt(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=N.state.view,mt(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return h`
${this.viewTemplate()}
`}};Bt.styles=[_.globalCss,as],Fe([W()],Bt.prototype,"view",2),Fe([W()],Bt.prototype,"prevView",2),Bt=Fe([O("wcm-modal-router")],Bt);const ds=P`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var hs=Object.defineProperty,us=Object.getOwnPropertyDescriptor,Jo=(e,t,o,n)=>{for(var r=n>1?void 0:n?us(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&hs(t,o,r),r};let oe=class extends A{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=rt.subscribe(e=>{e.open?(this.open=!0,this.timeout=setTimeout(()=>rt.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var e;(e=this.unsubscribe)==null||e.call(this),clearTimeout(this.timeout),rt.closeToast()}render(){const{message:e,variant:t}=rt.state,o={"wcm-success":t==="success","wcm-error":t==="error"};return this.open?h`
${t==="success"?S.CHECKMARK_ICON:null} ${t==="error"?S.CROSS_ICON:null}${e}
`:null}};oe.styles=[_.globalCss,ds],Jo([W()],oe.prototype,"open",2),oe=Jo([O("wcm-modal-toast")],oe);const ms=.1,Go=2.5,J=7;function Ze(e,t,o){return e===t?!1:(e-t<0?t-e:e-t)<=o+ms}function gs(e,t){const o=Array.prototype.slice.call(Gt.create(e,{errorCorrectionLevel:t}).modules.data,0),n=Math.sqrt(o.length);return o.reduce((r,i,s)=>(s%n===0?r.push([i]):r[r.length-1].push(i))&&r,[])}const ps={generate(e,t,o){const n="#141414",r="#ffffff",i=[],s=gs(e,"Q"),a=t/s.length,l=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];l.forEach(({x:v,y:g})=>{const E=(s.length-J)*a*v,p=(s.length-J)*a*g,y=.45;for(let w=0;w`)}});const c=Math.floor((o+25)/a),d=s.length/2-c/2,b=s.length/2+c/2-1,u=[];s.forEach((v,g)=>{v.forEach((E,p)=>{if(s[g][p]&&!(gs.length-(J+1)&&ps.length-(J+1))&&!(g>d&&gd&&p{m[v]?m[v].push(g):m[v]=[g]}),Object.entries(m).map(([v,g])=>{const E=g.filter(p=>g.every(y=>!Ze(p,y,a)));return[Number(v),E]}).forEach(([v,g])=>{g.forEach(E=>{i.push(L``)})}),Object.entries(m).filter(([v,g])=>g.length>1).map(([v,g])=>{const E=g.filter(p=>g.some(y=>Ze(p,y,a)));return[Number(v),E]}).map(([v,g])=>{g.sort((p,y)=>pw.some(f=>Ze(p,f,a)));y?y.push(p):E.push([p])}return[v,E.map(p=>[p[0],p[p.length-1]])]}).forEach(([v,g])=>{g.forEach(([E,p])=>{i.push(L``)})}),i}},fs=P`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var ws=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,vt=(e,t,o,n)=>{for(var r=n>1?void 0:n?vs(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&ws(t,o,r),r};let X=class extends A{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const e=_t.state.themeMode==="light"?this.size:this.size-36;return L`${ps.generate(this.uri,e,e/4)}`}render(){const e={"wcm-dark":_t.state.themeMode==="dark"};return h`
${this.walletId||this.imageUrl?h``:S.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
`}};X.styles=[_.globalCss,fs],vt([$()],X.prototype,"uri",2),vt([$({type:Number})],X.prototype,"size",2),vt([$()],X.prototype,"imageId",2),vt([$()],X.prototype,"walletId",2),vt([$()],X.prototype,"imageUrl",2),X=vt([O("wcm-qrcode")],X);const bs=P`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var ys=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Qo=(e,t,o,n)=>{for(var r=n>1?void 0:n?xs(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&ys(t,o,r),r};let re=class extends A{constructor(){super(...arguments),this.onChange=()=>null}render(){return h` ${S.SEARCH_ICON}`}};re.styles=[_.globalCss,bs],Qo([$()],re.prototype,"onChange",2),re=Qo([O("wcm-search-input")],re);const $s=P`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;var Cs=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,As=(e,t,o,n)=>{for(var r=n>1?void 0:n?Es(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Cs(t,o,r),r};let Ve=class extends A{render(){return h``}};Ve.styles=[_.globalCss,$s],Ve=As([O("wcm-spinner")],Ve);const _s=P`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var Os=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,Ke=(e,t,o,n)=>{for(var r=n>1?void 0:n?Is(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Os(t,o,r),r};let Dt=class extends A{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const e={"wcm-big-bold":this.variant==="big-bold","wcm-medium-regular":this.variant==="medium-regular","wcm-small-regular":this.variant==="small-regular","wcm-small-thin":this.variant==="small-thin","wcm-xsmall-regular":this.variant==="xsmall-regular","wcm-xsmall-bold":this.variant==="xsmall-bold","wcm-color-primary":this.color==="primary","wcm-color-secondary":this.color==="secondary","wcm-color-tertiary":this.color==="tertiary","wcm-color-inverse":this.color==="inverse","wcm-color-accnt":this.color==="accent","wcm-color-error":this.color==="error"};return h``}};Dt.styles=[_.globalCss,_s],Ke([$()],Dt.prototype,"variant",2),Ke([$()],Dt.prototype,"color",2),Dt=Ke([O("wcm-text")],Dt);const Ts=P`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var ks=Object.defineProperty,Ms=Object.getOwnPropertyDescriptor,tt=(e,t,o,n)=>{for(var r=n>1?void 0:n?Ms(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&ks(t,o,r),r};let K=class extends A{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?h`RECENT`:this.installed?h`INSTALLED`:null}handleClick(){Br.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var e;return h``}};K.styles=[_.globalCss,Ts],tt([$()],K.prototype,"onClick",2),tt([$()],K.prototype,"name",2),tt([$()],K.prototype,"walletId",2),tt([$()],K.prototype,"label",2),tt([$()],K.prototype,"imageId",2),tt([$({type:Boolean})],K.prototype,"installed",2),tt([$({type:Boolean})],K.prototype,"recent",2),K=tt([O("wcm-wallet-button")],K);const Ps=P`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Ss=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,ne=(e,t,o,n)=>{for(var r=n>1?void 0:n?Rs(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Ss(t,o,r),r};let bt=class extends A{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var e;const t=(e=this.imageUrl)!=null&&e.length?this.imageUrl:x.getWalletIcon({id:this.walletId,image_id:this.imageId});return h`${t.length?h`
${this.id}
`:S.WALLET_PLACEHOLDER}`}};bt.styles=[_.globalCss,Ps],ne([$()],bt.prototype,"walletId",2),ne([$()],bt.prototype,"imageId",2),ne([$()],bt.prototype,"imageUrl",2),bt=ne([O("wcm-wallet-image")],bt);var Ls=Object.defineProperty,Ns=Object.getOwnPropertyDescriptor,Xo=(e,t,o,n)=>{for(var r=n>1?void 0:n?Ns(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Ls(t,o,r),r};let qe=class extends A{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(e){try{e!=null&&e.length&&await Promise.all(e.map(async t=>x.preloadImage(t)))}catch{console.info("Unsuccessful attempt at preloading some images",e)}}async preloadListings(){if(gt.state.enableExplorer){await U.getRecomendedWallets(),q.setIsDataLoaded(!0);const{recomendedWallets:e}=U.state,t=e.map(o=>x.getWalletIcon(o));await this.loadImages(t)}else q.setIsDataLoaded(!0)}async preloadCustomImages(){const e=x.getCustomImageUrls();await this.loadImages(e)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(e){console.error(e),rt.openToast("Failed preloading","error")}}};Xo([W()],qe.prototype,"preload",2),qe=Xo([O("wcm-explorer-context")],qe);var Bs=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Us=(e,t,o,n)=>{for(var r=n>1?void 0:n?Ds(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Bs(t,o,r),r};let tr=class extends A{constructor(){super(),this.unsubscribeTheme=void 0,_.setTheme(),this.unsubscribeTheme=_t.subscribe(_.setTheme)}disconnectedCallback(){var e;(e=this.unsubscribeTheme)==null||e.call(this)}};tr=Us([O("wcm-theme-context")],tr);const Ws=P`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var js=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,zs=(e,t,o,n)=>{for(var r=n>1?void 0:n?Hs(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&js(t,o,r),r};let Ye=class extends A{onGoToQrcode(){N.push("Qrcode")}render(){const{recomendedWallets:e}=U.state,t=[...e,...e],o=C.RECOMMENDED_WALLET_AMOUNT*2;return h`
${S.MOBILE_ICON}WalletConnect
${[...Array(o)].map((n,r)=>{const i=t[r%t.length];return i?h``:S.WALLET_PLACEHOLDER})}
Select Wallet
Choose WalletConnect to see supported apps on your device`}};Ye.styles=[_.globalCss,Ws],Ye=zs([O("wcm-android-wallet-selection")],Ye);const Fs=P`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var Zs=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,yt=(e,t,o,n)=>{for(var r=n>1?void 0:n?Vs(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Zs(t,o,r),r};let et=class extends A{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var e,t;const o=(t=(e=_t.state.themeVariables)==null?void 0:e["--wcm-wallet-icon-large-border-radius"])!=null?t:_.getPreset("--wcm-wallet-icon-large-border-radius");let n=0;o.includes("%")?n=88/100*parseInt(o,10):n=parseInt(o,10),n*=1.17;const r=317-n*1.57,i=425-n*1.8;return h``}render(){const e={"wcm-error":this.isError,"wcm-stale":this.isStale};return h`
${this.svgLoaderTemplate()}
${this.isError?"Connection declined":this.label}`}};et.styles=[_.globalCss,Fs],yt([$()],et.prototype,"walletId",2),yt([$()],et.prototype,"imageId",2),yt([$({type:Boolean})],et.prototype,"isError",2),yt([$({type:Boolean})],et.prototype,"isStale",2),yt([$()],et.prototype,"label",2),et=yt([O("wcm-connector-waiting")],et);const At={manualWallets(){var e,t;const{mobileWallets:o,desktopWallets:n}=gt.state,r=(e=At.recentWallet())==null?void 0:e.id,i=C.isMobile()?o:n,s=i==null?void 0:i.filter(a=>r!==a.id);return(t=C.isMobile()?s==null?void 0:s.map(({id:a,name:l,links:c})=>({id:a,name:l,mobile:c,links:c})):s==null?void 0:s.map(({id:a,name:l,links:c})=>({id:a,name:l,desktop:c,links:c})))!=null?t:[]},recentWallet(){return x.getRecentWallet()},recomendedWallets(e=!1){var t;const o=e||(t=At.recentWallet())==null?void 0:t.id,{recomendedWallets:n}=U.state;return n.filter(r=>o!==r.id)}},st={onConnecting(e){x.goToConnectingView(e)},manualWalletsTemplate(){return At.manualWallets().map(e=>h``)},recomendedWalletsTemplate(e=!1){return At.recomendedWallets(e).map(t=>h``)},recentWalletTemplate(){const e=At.recentWallet();if(e)return h``}},Ks=P`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;var qs=Object.defineProperty,Ys=Object.getOwnPropertyDescriptor,Js=(e,t,o,n)=>{for(var r=n>1?void 0:n?Ys(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&qs(t,o,r),r};let Je=class extends A{render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=gt.state,o=e!=="ALL"&&t,n=st.manualWalletsTemplate(),r=st.recomendedWalletsTemplate();let i=[st.recentWalletTemplate(),...n,...r];i=i.filter(Boolean);const s=i.length>4||o;let a=[];s?a=i.slice(0,3):a=i;const l=!!a.length;return h`
${S.MOBILE_ICON}Mobile
${S.SCAN_ICON}Scan with your wallet
${l?h`
${S.DESKTOP_ICON}Desktop
${a} ${s?h``:null}
`:null}`}};Je.styles=[_.globalCss,Ks],Je=Js([O("wcm-desktop-wallet-selection")],Je);const Gs=P`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var Qs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,ta=(e,t,o,n)=>{for(var r=n>1?void 0:n?Xs(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Qs(t,o,r),r};let Ge=class extends A{render(){const{termsOfServiceUrl:e,privacyPolicyUrl:t}=gt.state;return e??t?h`
By connecting your wallet to this app, you agree to the app's ${e?h`Terms of Service`:null} ${e&&t?"and":null} ${t?h`Privacy Policy`:null}
`:null}};Ge.styles=[_.globalCss,Gs],Ge=ta([O("wcm-legal-notice")],Ge);const ea=P`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var oa=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,na=(e,t,o,n)=>{for(var r=n>1?void 0:n?ra(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&oa(t,o,r),r};let Qe=class extends A{onQrcode(){N.push("Qrcode")}render(){const{explorerExcludedWalletIds:e,enableExplorer:t}=gt.state,o=e!=="ALL"&&t,n=st.manualWalletsTemplate(),r=st.recomendedWalletsTemplate();let i=[st.recentWalletTemplate(),...n,...r];i=i.filter(Boolean);const s=i.length>8||o;let a=[];s?a=i.slice(0,7):a=i;const l=!!a.length;return h`${l?h`
${a} ${s?h``:null}
`:null}`}};Qe.styles=[_.globalCss,ea],Qe=na([O("wcm-mobile-wallet-selection")],Qe);const ia=P`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var sa=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,Xe=(e,t,o,n)=>{for(var r=n>1?void 0:n?aa(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&sa(t,o,r),r};let Ut=class extends A{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=ce.subscribe(e=>{e.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var e;(e=this.unsubscribeModal)==null||e.call(this)}get overlayEl(){return x.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return x.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(e){if(document.querySelector("body"))if(e){const t=document.getElementById("wcm-styles");t==null||t.remove()}else document.head.insertAdjacentHTML("beforeend",'')}onCloseModal(e){e.target===e.currentTarget&&ce.close()}onOpenModalEvent(){this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout(async()=>{const e=x.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]},t=.1,o=.2;await Promise.all([mt(this.overlayEl,{opacity:[0,1]},{delay:t,duration:o}).finished,mt(this.containerEl,e,{delay:t,duration:o}).finished]),this.active=!0},0)}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents();const e=x.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]},t=.2;await Promise.all([mt(this.overlayEl,{opacity:[1,0]},{duration:t}).finished,mt(this.containerEl,e,{duration:t}).finished]),this.containerEl.removeAttribute("style"),this.active=!1,this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",e=>{var t;e.key==="Escape"?ce.close():e.key==="Tab"&&((t=e.target)!=null&&t.tagName.includes("wcm-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var e;(e=this.abortController)==null||e.abort(),this.abortController=void 0}render(){const e={"wcm-overlay":!0,"wcm-active":this.active};return h`
${this.open?h`
`:null}
`}};Ut.styles=[_.globalCss,ia],Xe([W()],Ut.prototype,"open",2),Xe([W()],Ut.prototype,"active",2),Ut=Xe([O("wcm-modal")],Ut);const la=P`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var ca=Object.defineProperty,da=Object.getOwnPropertyDescriptor,Wt=(e,t,o,n)=>{for(var r=n>1?void 0:n?da(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&ca(t,o,r),r};let dt=class extends A{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){C.isMobile()?N.replace("MobileConnecting"):N.replace("MobileQrcodeConnecting")}onDesktop(){N.replace("DesktopConnecting")}onWeb(){N.replace("WebConnecting")}render(){return h`
${this.isRetry?h``:null} ${this.isMobile?h`Mobile`:null} ${this.isDesktop?h`Desktop`:null} ${this.isWeb?h`Web`:null}
`}};dt.styles=[_.globalCss,la],Wt([$({type:Boolean})],dt.prototype,"isMobile",2),Wt([$({type:Boolean})],dt.prototype,"isDesktop",2),Wt([$({type:Boolean})],dt.prototype,"isWeb",2),Wt([$({type:Boolean})],dt.prototype,"isRetry",2),dt=Wt([O("wcm-platform-selection")],dt);const ha=P`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var ua=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,ga=(e,t,o,n)=>{for(var r=n>1?void 0:n?ma(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&ua(t,o,r),r};let to=class extends A{onClick(){N.push("WalletExplorer")}render(){const{recomendedWallets:e}=U.state,t=At.manualWallets(),o=[...e,...t].reverse().slice(0,4);return h``}};to.styles=[_.globalCss,ha],to=ga([O("wcm-view-all-wallets-button")],to);const pa=P`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var fa=Object.defineProperty,wa=Object.getOwnPropertyDescriptor,ie=(e,t,o,n)=>{for(var r=n>1?void 0:n?wa(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&fa(t,o,r),r};let xt=class extends A{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout(()=>{const{walletConnectUri:e}=q.state;this.uri=e},0)}get overlayEl(){return x.getShadowRootElement(this,".wcm-qr-container")}render(){return h`
${this.uri?h``:h``}
`}};xt.styles=[_.globalCss,pa],ie([$()],xt.prototype,"walletId",2),ie([$()],xt.prototype,"imageId",2),ie([W()],xt.prototype,"uri",2),xt=ie([O("wcm-walletconnect-qr")],xt);var va=Object.defineProperty,ba=Object.getOwnPropertyDescriptor,ya=(e,t,o,n)=>{for(var r=n>1?void 0:n?ba(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&va(t,o,r),r};let eo=class extends A{viewTemplate(){return C.isAndroid()?h``:C.isMobile()?h``:h``}render(){return h`${this.viewTemplate()}`}};eo.styles=[_.globalCss],eo=ya([O("wcm-connect-wallet-view")],eo);const xa=P`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var $a=Object.defineProperty,Ca=Object.getOwnPropertyDescriptor,er=(e,t,o,n)=>{for(var r=n>1?void 0:n?Ca(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&$a(t,o,r),r};let se=class extends A{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(e){const{desktop:t,name:o}=C.getWalletRouterData(),n=t==null?void 0:t.native;if(n){const r=C.formatNativeUrl(n,e,o);C.openHref(r,"_self")}}openDesktopApp(){const{walletConnectUri:e}=q.state,t=C.getWalletRouterData();x.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:o}=C.getWalletRouterData(),{isMobile:n,isWeb:r}=x.getCachedRouterWalletPlatforms();return h`${`Connection can continue loading if ${e} is not installed on your device`}Retry`}};se.styles=[_.globalCss,xa],er([W()],se.prototype,"isError",2),se=er([O("wcm-desktop-connecting-view")],se);const Ea=P`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;var Aa=Object.defineProperty,_a=Object.getOwnPropertyDescriptor,Oa=(e,t,o,n)=>{for(var r=n>1?void 0:n?_a(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Aa(t,o,r),r};let oo=class extends A{onInstall(e){e&&C.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:o,homepage:n}=C.getWalletRouterData();return h`${`Download ${e} to continue. If multiple browser extensions are installed, disable non ${e} ones and try again`}Download`}};oo.styles=[_.globalCss,Ea],oo=Oa([O("wcm-install-wallet-view")],oo);const Ia=P`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var Ta=Object.defineProperty,ka=Object.getOwnPropertyDescriptor,or=(e,t,o,n)=>{for(var r=n>1?void 0:n?ka(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Ta(t,o,r),r};let ae=class extends A{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(e,t=!1){const{mobile:o,name:n}=C.getWalletRouterData(),r=o==null?void 0:o.native,i=o==null?void 0:o.universal;if(r&&!t){const s=C.formatNativeUrl(r,e,n);C.openHref(s,"_self")}else if(i){const s=C.formatUniversalUrl(i,e,n);C.openHref(s,"_self")}}openMobileApp(e=!1){const{walletConnectUri:t}=q.state,o=C.getWalletRouterData();x.setRecentWallet(o),t&&this.onFormatAndRedirect(t,e)}onGoToAppStore(e){e&&C.openHref(e,"_blank")}render(){const{name:e,id:t,image_id:o,app:n,mobile:r}=C.getWalletRouterData(),{isWeb:i}=x.getCachedRouterWalletPlatforms(),s=n==null?void 0:n.ios,a=r==null?void 0:r.universal;return h`Retry${a?h`Still doesn't work? Try this alternate link`:null}
${`Get ${e}`}
App Store
`}};ae.styles=[_.globalCss,Ia],or([W()],ae.prototype,"isError",2),ae=or([O("wcm-mobile-connecting-view")],ae);const Ma=P`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Pa=Object.defineProperty,Sa=Object.getOwnPropertyDescriptor,Ra=(e,t,o,n)=>{for(var r=n>1?void 0:n?Sa(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Pa(t,o,r),r};let ro=class extends A{render(){const{name:e,id:t,image_id:o}=C.getWalletRouterData(),{isDesktop:n,isWeb:r}=x.getCachedRouterWalletPlatforms();return h`${`Scan this QR Code with your phone's camera or inside ${e} app`}`}};ro.styles=[_.globalCss,Ma],ro=Ra([O("wcm-mobile-qr-connecting-view")],ro);var La=Object.defineProperty,Na=Object.getOwnPropertyDescriptor,Ba=(e,t,o,n)=>{for(var r=n>1?void 0:n?Na(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&La(t,o,r),r};let no=class extends A{render(){return h``}};no.styles=[_.globalCss],no=Ba([O("wcm-qrcode-view")],no);const Da=P`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var Ua=Object.defineProperty,Wa=Object.getOwnPropertyDescriptor,jt=(e,t,o,n)=>{for(var r=n>1?void 0:n?Wa(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Ua(t,o,r),r};const io=40;let ht=class extends A{constructor(){super(...arguments),this.loading=!U.state.wallets.listings.length,this.firstFetch=!U.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=x.debounce(e=>{e.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=e,U.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),U.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var e;(e=this.intersectionObserver)==null||e.disconnect()}get placeholderEl(){return x.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([e])=>{e.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:e,search:t}=U.state,{listings:o,total:n}=this.search?t:e;return n<=io||o.length>=n}async fetchWallets(){var e;const{wallets:t,search:o}=U.state,{listings:n,total:r,page:i}=this.search?o:t;if(!this.endReached&&(this.firstFetch||r>io&&n.lengthx.getWalletIcon(c));await Promise.all([...l.map(async c=>x.preloadImage(c)),C.wait(300)]),this.endReached=this.isLastPage()}catch(s){console.error(s),rt.openToast(x.getErrorMessage(s),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnect(e){C.isAndroid()?x.handleMobileLinking(e):x.goToConnectingView(e)}onSearchChange(e){const{value:t}=e.target;this.searchDebounce(t)}render(){const{wallets:e,search:t}=U.state,{listings:o}=this.search?t:e,n=this.loading&&!o.length,r=this.search.length>=3;let i=st.manualWalletsTemplate(),s=st.recomendedWalletsTemplate(!0);r&&(i=i.filter(({values:c})=>x.caseSafeIncludes(c[0],this.search)),s=s.filter(({values:c})=>x.caseSafeIncludes(c[0],this.search)));const a=!this.loading&&!o.length&&!s.length,l={"wcm-loading":n,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":a};return h`
${n?null:i} ${n?null:s} ${n?null:o.map(c=>h`${c?h``:null}`)}
${a?h`No results found`:null} ${!a&&this.loading?h``:null}
`}};ht.styles=[_.globalCss,Da],jt([W()],ht.prototype,"loading",2),jt([W()],ht.prototype,"firstFetch",2),jt([W()],ht.prototype,"search",2),jt([W()],ht.prototype,"endReached",2),ht=jt([O("wcm-wallet-explorer-view")],ht);const ja=P`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Ha=Object.defineProperty,za=Object.getOwnPropertyDescriptor,rr=(e,t,o,n)=>{for(var r=n>1?void 0:n?za(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(r=(n?s(t,o,r):s(r))||r);return n&&r&&Ha(t,o,r),r};let le=class extends A{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(e){const{desktop:t,name:o}=C.getWalletRouterData(),n=t==null?void 0:t.universal;if(n){const r=C.formatUniversalUrl(n,e,o);C.openHref(r,"_blank")}}openWebWallet(){const{walletConnectUri:e}=q.state,t=C.getWalletRouterData();x.setRecentWallet(t),e&&this.onFormatAndRedirect(e)}render(){const{name:e,id:t,image_id:o}=C.getWalletRouterData(),{isMobile:n,isDesktop:r}=x.getCachedRouterWalletPlatforms(),i=C.isMobile();return h`${`${e} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};le.styles=[_.globalCss,ja],rr([W()],le.prototype,"isError",2),le=rr([O("wcm-web-connecting-view")],le);export{Ut as WcmModal,X as WcmQrCode}; diff --git a/examples/vite/dist/assets/index-5c4ca410.js b/examples/vite/dist/assets/index-5c4ca410.js new file mode 100644 index 0000000000..211f49470e --- /dev/null +++ b/examples/vite/dist/assets/index-5c4ca410.js @@ -0,0 +1,160 @@ +var BP=Object.defineProperty;var yP=(e,u,t)=>u in e?BP(e,u,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[u]=t;var eu=(e,u,t)=>(yP(e,typeof u!="symbol"?u+"":u,t),t),Sd=(e,u,t)=>{if(!u.has(e))throw TypeError("Cannot "+t)};var b=(e,u,t)=>(Sd(e,u,"read from private field"),t?t.call(e):u.get(e)),q=(e,u,t)=>{if(u.has(e))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(e):u.set(e,t)},T=(e,u,t,n)=>(Sd(e,u,"write to private field"),n?n.call(e,t):u.set(e,t),t);var br=(e,u,t,n)=>({set _(r){T(e,u,r,t)},get _(){return b(e,u,n)}}),cu=(e,u,t)=>(Sd(e,u,"access private method"),t);import{SafeAppProvider as FP}from"@safe-globalThis/safe-apps-provider";import dE from"@safe-globalThis/safe-apps-sdk";(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=t(r);fetch(r.href,i)}})();var Zu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function th(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nh(e){if(e.__esModule)return e;var u=e.default;if(typeof u=="function"){var t=function n(){return this instanceof n?Reflect.construct(u,arguments,this.constructor):u.apply(this,arguments)};t.prototype=u.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}var rF={},G2={};G2.byteLength=bP;G2.toByteArray=xP;G2.fromByteArray=SP;var Bn=[],st=[],DP=typeof Uint8Array<"u"?Uint8Array:Array,Pd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var as=0,vP=Pd.length;as0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=u);var n=t===u?0:4-t%4;return[t,n]}function bP(e){var u=iF(e),t=u[0],n=u[1];return(t+n)*3/4-n}function wP(e,u,t){return(u+t)*3/4-t}function xP(e){var u,t=iF(e),n=t[0],r=t[1],i=new DP(wP(e,n,r)),a=0,s=r>0?n-4:n,o;for(o=0;o>16&255,i[a++]=u>>8&255,i[a++]=u&255;return r===2&&(u=st[e.charCodeAt(o)]<<2|st[e.charCodeAt(o+1)]>>4,i[a++]=u&255),r===1&&(u=st[e.charCodeAt(o)]<<10|st[e.charCodeAt(o+1)]<<4|st[e.charCodeAt(o+2)]>>2,i[a++]=u>>8&255,i[a++]=u&255),i}function kP(e){return Bn[e>>18&63]+Bn[e>>12&63]+Bn[e>>6&63]+Bn[e&63]}function _P(e,u,t){for(var n,r=[],i=u;is?s:a+i));return n===1?(u=e[t-1],r.push(Bn[u>>2]+Bn[u<<4&63]+"==")):n===2&&(u=(e[t-2]<<8)+e[t-1],r.push(Bn[u>>10]+Bn[u>>4&63]+Bn[u<<2&63]+"=")),r.join("")}var rh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */rh.read=function(e,u,t,n,r){var i,a,s=r*8-n-1,o=(1<>1,c=-7,E=t?r-1:0,d=t?-1:1,f=e[u+E];for(E+=d,i=f&(1<<-c)-1,f>>=-c,c+=s;c>0;i=i*256+e[u+E],E+=d,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=a*256+e[u+E],E+=d,c-=8);if(i===0)i=1-l;else{if(i===o)return a?NaN:(f?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-l}return(f?-1:1)*a*Math.pow(2,i-n)};rh.write=function(e,u,t,n,r,i){var a,s,o,l=i*8-r-1,c=(1<>1,d=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,h=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(s=isNaN(u)?1:0,a=c):(a=Math.floor(Math.log(u)/Math.LN2),u*(o=Math.pow(2,-a))<1&&(a--,o*=2),a+E>=1?u+=d/o:u+=d*Math.pow(2,1-E),u*o>=2&&(a++,o/=2),a+E>=c?(s=0,a=c):a+E>=1?(s=(u*o-1)*Math.pow(2,r),a=a+E):(s=u*Math.pow(2,E-1)*Math.pow(2,r),a=0));r>=8;e[t+f]=s&255,f+=p,s/=256,r-=8);for(a=a<0;e[t+f]=a&255,f+=p,a/=256,l-=8);e[t+f-p]|=h*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(e){const u=G2,t=rh,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50;const r=2147483647;e.kMaxLength=r,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function i(){try{const _=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(_,y),_.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(_){if(_>r)throw new RangeError('The value "'+_+'" is invalid for option "size"');const y=new Uint8Array(_);return Object.setPrototypeOf(y,s.prototype),y}function s(_,y,D){if(typeof _=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(_)}return o(_,y,D)}s.poolSize=8192;function o(_,y,D){if(typeof _=="string")return d(_,y);if(ArrayBuffer.isView(_))return p(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if(pu(_,ArrayBuffer)||_&&pu(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(pu(_,SharedArrayBuffer)||_&&pu(_.buffer,SharedArrayBuffer)))return h(_,y,D);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const P=_.valueOf&&_.valueOf();if(P!=null&&P!==_)return s.from(P,y,D);const R=g(_);if(R)return R;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return s.from(_[Symbol.toPrimitive]("string"),y,D);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _)}s.from=function(_,y,D){return o(_,y,D)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function c(_,y,D){return l(_),_<=0?a(_):y!==void 0?typeof D=="string"?a(_).fill(y,D):a(_).fill(y):a(_)}s.alloc=function(_,y,D){return c(_,y,D)};function E(_){return l(_),a(_<0?0:A(_)|0)}s.allocUnsafe=function(_){return E(_)},s.allocUnsafeSlow=function(_){return E(_)};function d(_,y){if((typeof y!="string"||y==="")&&(y="utf8"),!s.isEncoding(y))throw new TypeError("Unknown encoding: "+y);const D=B(_,y)|0;let P=a(D);const R=P.write(_,y);return R!==D&&(P=P.slice(0,R)),P}function f(_){const y=_.length<0?0:A(_.length)|0,D=a(y);for(let P=0;P=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return _|0}function m(_){return+_!=_&&(_=0),s.alloc(+_)}s.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==s.prototype},s.compare=function(y,D){if(pu(y,Uint8Array)&&(y=s.from(y,y.offset,y.byteLength)),pu(D,Uint8Array)&&(D=s.from(D,D.offset,D.byteLength)),!s.isBuffer(y)||!s.isBuffer(D))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===D)return 0;let P=y.length,R=D.length;for(let L=0,J=Math.min(P,R);LR.length?(s.isBuffer(J)||(J=s.from(J)),J.copy(R,L)):Uint8Array.prototype.set.call(R,J,L);else if(s.isBuffer(J))J.copy(R,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=J.length}return R};function B(_,y){if(s.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||pu(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);const D=_.length,P=arguments.length>2&&arguments[2]===!0;if(!P&&D===0)return 0;let R=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return D;case"utf8":case"utf-8":return $(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D*2;case"hex":return D>>>1;case"base64":return K(_).length;default:if(R)return P?-1:$(_).length;y=(""+y).toLowerCase(),R=!0}}s.byteLength=B;function F(_,y,D){let P=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((D===void 0||D>this.length)&&(D=this.length),D<=0)||(D>>>=0,y>>>=0,D<=y))return"";for(_||(_="utf8");;)switch(_){case"hex":return iu(this,y,D);case"utf8":case"utf-8":return mu(this,y,D);case"ascii":return nu(this,y,D);case"latin1":case"binary":return H(this,y,D);case"base64":return su(this,y,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lu(this,y,D);default:if(P)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),P=!0}}s.prototype._isBuffer=!0;function w(_,y,D){const P=_[y];_[y]=_[D],_[D]=P}s.prototype.swap16=function(){const y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let D=0;DD&&(y+=" ... "),""},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(y,D,P,R,L){if(pu(y,Uint8Array)&&(y=s.from(y,y.offset,y.byteLength)),!s.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(D===void 0&&(D=0),P===void 0&&(P=y?y.length:0),R===void 0&&(R=0),L===void 0&&(L=this.length),D<0||P>y.length||R<0||L>this.length)throw new RangeError("out of range index");if(R>=L&&D>=P)return 0;if(R>=L)return-1;if(D>=P)return 1;if(D>>>=0,P>>>=0,R>>>=0,L>>>=0,this===y)return 0;let J=L-R,bu=P-D;const Tu=Math.min(J,bu),Wu=this.slice(R,L),ju=y.slice(D,P);for(let t0=0;t02147483647?D=2147483647:D<-2147483648&&(D=-2147483648),D=+D,gu(D)&&(D=R?0:_.length-1),D<0&&(D=_.length+D),D>=_.length){if(R)return-1;D=_.length-1}else if(D<0)if(R)D=0;else return-1;if(typeof y=="string"&&(y=s.from(y,P)),s.isBuffer(y))return y.length===0?-1:C(_,y,D,P,R);if(typeof y=="number")return y=y&255,typeof Uint8Array.prototype.indexOf=="function"?R?Uint8Array.prototype.indexOf.call(_,y,D):Uint8Array.prototype.lastIndexOf.call(_,y,D):C(_,[y],D,P,R);throw new TypeError("val must be string, number or Buffer")}function C(_,y,D,P,R){let L=1,J=_.length,bu=y.length;if(P!==void 0&&(P=String(P).toLowerCase(),P==="ucs2"||P==="ucs-2"||P==="utf16le"||P==="utf-16le")){if(_.length<2||y.length<2)return-1;L=2,J/=2,bu/=2,D/=2}function Tu(ju,t0){return L===1?ju[t0]:ju.readUInt16BE(t0*L)}let Wu;if(R){let ju=-1;for(Wu=D;WuJ&&(D=J-bu),Wu=D;Wu>=0;Wu--){let ju=!0;for(let t0=0;t0R&&(P=R)):P=R;const L=y.length;P>L/2&&(P=L/2);let J;for(J=0;J>>0,isFinite(P)?(P=P>>>0,R===void 0&&(R="utf8")):(R=P,P=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const L=this.length-D;if((P===void 0||P>L)&&(P=L),y.length>0&&(P<0||D<0)||D>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");let J=!1;for(;;)switch(R){case"hex":return k(this,y,D,P);case"utf8":case"utf-8":return j(this,y,D,P);case"ascii":case"latin1":case"binary":return N(this,y,D,P);case"base64":return uu(this,y,D,P);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ou(this,y,D,P);default:if(J)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),J=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function su(_,y,D){return y===0&&D===_.length?u.fromByteArray(_):u.fromByteArray(_.slice(y,D))}function mu(_,y,D){D=Math.min(_.length,D);const P=[];let R=y;for(;R239?4:L>223?3:L>191?2:1;if(R+bu<=D){let Tu,Wu,ju,t0;switch(bu){case 1:L<128&&(J=L);break;case 2:Tu=_[R+1],(Tu&192)===128&&(t0=(L&31)<<6|Tu&63,t0>127&&(J=t0));break;case 3:Tu=_[R+1],Wu=_[R+2],(Tu&192)===128&&(Wu&192)===128&&(t0=(L&15)<<12|(Tu&63)<<6|Wu&63,t0>2047&&(t0<55296||t0>57343)&&(J=t0));break;case 4:Tu=_[R+1],Wu=_[R+2],ju=_[R+3],(Tu&192)===128&&(Wu&192)===128&&(ju&192)===128&&(t0=(L&15)<<18|(Tu&63)<<12|(Wu&63)<<6|ju&63,t0>65535&&t0<1114112&&(J=t0))}}J===null?(J=65533,bu=1):J>65535&&(J-=65536,P.push(J>>>10&1023|55296),J=56320|J&1023),P.push(J),R+=bu}return au(P)}const tu=4096;function au(_){const y=_.length;if(y<=tu)return String.fromCharCode.apply(String,_);let D="",P=0;for(;PP)&&(D=P);let R="";for(let L=y;LP&&(y=P),D<0?(D+=P,D<0&&(D=0)):D>P&&(D=P),DD)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(y,D,P){y=y>>>0,D=D>>>0,P||Eu(y,D,this.length);let R=this[y],L=1,J=0;for(;++J>>0,D=D>>>0,P||Eu(y,D,this.length);let R=this[y+--D],L=1;for(;D>0&&(L*=256);)R+=this[y+--D]*L;return R},s.prototype.readUint8=s.prototype.readUInt8=function(y,D){return y=y>>>0,D||Eu(y,1,this.length),this[y]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(y,D){return y=y>>>0,D||Eu(y,2,this.length),this[y]|this[y+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(y,D){return y=y>>>0,D||Eu(y,2,this.length),this[y]<<8|this[y+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(y,D){return y=y>>>0,D||Eu(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(y,D){return y=y>>>0,D||Eu(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},s.prototype.readBigUInt64LE=Au(function(y){y=y>>>0,W(y,"offset");const D=this[y],P=this[y+7];(D===void 0||P===void 0)&&U(y,this.length-8);const R=D+this[++y]*2**8+this[++y]*2**16+this[++y]*2**24,L=this[++y]+this[++y]*2**8+this[++y]*2**16+P*2**24;return BigInt(R)+(BigInt(L)<>>0,W(y,"offset");const D=this[y],P=this[y+7];(D===void 0||P===void 0)&&U(y,this.length-8);const R=D*2**24+this[++y]*2**16+this[++y]*2**8+this[++y],L=this[++y]*2**24+this[++y]*2**16+this[++y]*2**8+P;return(BigInt(R)<>>0,D=D>>>0,P||Eu(y,D,this.length);let R=this[y],L=1,J=0;for(;++J=L&&(R-=Math.pow(2,8*D)),R},s.prototype.readIntBE=function(y,D,P){y=y>>>0,D=D>>>0,P||Eu(y,D,this.length);let R=D,L=1,J=this[y+--R];for(;R>0&&(L*=256);)J+=this[y+--R]*L;return L*=128,J>=L&&(J-=Math.pow(2,8*D)),J},s.prototype.readInt8=function(y,D){return y=y>>>0,D||Eu(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},s.prototype.readInt16LE=function(y,D){y=y>>>0,D||Eu(y,2,this.length);const P=this[y]|this[y+1]<<8;return P&32768?P|4294901760:P},s.prototype.readInt16BE=function(y,D){y=y>>>0,D||Eu(y,2,this.length);const P=this[y+1]|this[y]<<8;return P&32768?P|4294901760:P},s.prototype.readInt32LE=function(y,D){return y=y>>>0,D||Eu(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},s.prototype.readInt32BE=function(y,D){return y=y>>>0,D||Eu(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},s.prototype.readBigInt64LE=Au(function(y){y=y>>>0,W(y,"offset");const D=this[y],P=this[y+7];(D===void 0||P===void 0)&&U(y,this.length-8);const R=this[y+4]+this[y+5]*2**8+this[y+6]*2**16+(P<<24);return(BigInt(R)<>>0,W(y,"offset");const D=this[y],P=this[y+7];(D===void 0||P===void 0)&&U(y,this.length-8);const R=(D<<24)+this[++y]*2**16+this[++y]*2**8+this[++y];return(BigInt(R)<>>0,D||Eu(y,4,this.length),t.read(this,y,!0,23,4)},s.prototype.readFloatBE=function(y,D){return y=y>>>0,D||Eu(y,4,this.length),t.read(this,y,!1,23,4)},s.prototype.readDoubleLE=function(y,D){return y=y>>>0,D||Eu(y,8,this.length),t.read(this,y,!0,52,8)},s.prototype.readDoubleBE=function(y,D){return y=y>>>0,D||Eu(y,8,this.length),t.read(this,y,!1,52,8)};function hu(_,y,D,P,R,L){if(!s.isBuffer(_))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>R||y_.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(y,D,P,R){if(y=+y,D=D>>>0,P=P>>>0,!R){const bu=Math.pow(2,8*P)-1;hu(this,y,D,P,bu,0)}let L=1,J=0;for(this[D]=y&255;++J>>0,P=P>>>0,!R){const bu=Math.pow(2,8*P)-1;hu(this,y,D,P,bu,0)}let L=P-1,J=1;for(this[D+L]=y&255;--L>=0&&(J*=256);)this[D+L]=y/J&255;return D+P},s.prototype.writeUint8=s.prototype.writeUInt8=function(y,D,P){return y=+y,D=D>>>0,P||hu(this,y,D,1,255,0),this[D]=y&255,D+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(y,D,P){return y=+y,D=D>>>0,P||hu(this,y,D,2,65535,0),this[D]=y&255,this[D+1]=y>>>8,D+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(y,D,P){return y=+y,D=D>>>0,P||hu(this,y,D,2,65535,0),this[D]=y>>>8,this[D+1]=y&255,D+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(y,D,P){return y=+y,D=D>>>0,P||hu(this,y,D,4,4294967295,0),this[D+3]=y>>>24,this[D+2]=y>>>16,this[D+1]=y>>>8,this[D]=y&255,D+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(y,D,P){return y=+y,D=D>>>0,P||hu(this,y,D,4,4294967295,0),this[D]=y>>>24,this[D+1]=y>>>16,this[D+2]=y>>>8,this[D+3]=y&255,D+4};function fu(_,y,D,P,R){I(y,P,R,_,D,7);let L=Number(y&BigInt(4294967295));_[D++]=L,L=L>>8,_[D++]=L,L=L>>8,_[D++]=L,L=L>>8,_[D++]=L;let J=Number(y>>BigInt(32)&BigInt(4294967295));return _[D++]=J,J=J>>8,_[D++]=J,J=J>>8,_[D++]=J,J=J>>8,_[D++]=J,D}function Z(_,y,D,P,R){I(y,P,R,_,D,7);let L=Number(y&BigInt(4294967295));_[D+7]=L,L=L>>8,_[D+6]=L,L=L>>8,_[D+5]=L,L=L>>8,_[D+4]=L;let J=Number(y>>BigInt(32)&BigInt(4294967295));return _[D+3]=J,J=J>>8,_[D+2]=J,J=J>>8,_[D+1]=J,J=J>>8,_[D]=J,D+8}s.prototype.writeBigUInt64LE=Au(function(y,D=0){return fu(this,y,D,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Au(function(y,D=0){return Z(this,y,D,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(y,D,P,R){if(y=+y,D=D>>>0,!R){const Tu=Math.pow(2,8*P-1);hu(this,y,D,P,Tu-1,-Tu)}let L=0,J=1,bu=0;for(this[D]=y&255;++L>0)-bu&255;return D+P},s.prototype.writeIntBE=function(y,D,P,R){if(y=+y,D=D>>>0,!R){const Tu=Math.pow(2,8*P-1);hu(this,y,D,P,Tu-1,-Tu)}let L=P-1,J=1,bu=0;for(this[D+L]=y&255;--L>=0&&(J*=256);)y<0&&bu===0&&this[D+L+1]!==0&&(bu=1),this[D+L]=(y/J>>0)-bu&255;return D+P},s.prototype.writeInt8=function(y,D,P){return y=+y,D=D>>>0,P||hu(this,y,D,1,127,-128),y<0&&(y=255+y+1),this[D]=y&255,D+1},s.prototype.writeInt16LE=function(y,D,P){return y=+y,D=D>>>0,P||hu(this,y,D,2,32767,-32768),this[D]=y&255,this[D+1]=y>>>8,D+2},s.prototype.writeInt16BE=function(y,D,P){return y=+y,D=D>>>0,P||hu(this,y,D,2,32767,-32768),this[D]=y>>>8,this[D+1]=y&255,D+2},s.prototype.writeInt32LE=function(y,D,P){return y=+y,D=D>>>0,P||hu(this,y,D,4,2147483647,-2147483648),this[D]=y&255,this[D+1]=y>>>8,this[D+2]=y>>>16,this[D+3]=y>>>24,D+4},s.prototype.writeInt32BE=function(y,D,P){return y=+y,D=D>>>0,P||hu(this,y,D,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[D]=y>>>24,this[D+1]=y>>>16,this[D+2]=y>>>8,this[D+3]=y&255,D+4},s.prototype.writeBigInt64LE=Au(function(y,D=0){return fu(this,y,D,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Au(function(y,D=0){return Z(this,y,D,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Su(_,y,D,P,R,L){if(D+P>_.length)throw new RangeError("Index out of range");if(D<0)throw new RangeError("Index out of range")}function wu(_,y,D,P,R){return y=+y,D=D>>>0,R||Su(_,y,D,4),t.write(_,y,D,P,23,4),D+4}s.prototype.writeFloatLE=function(y,D,P){return wu(this,y,D,!0,P)},s.prototype.writeFloatBE=function(y,D,P){return wu(this,y,D,!1,P)};function xu(_,y,D,P,R){return y=+y,D=D>>>0,R||Su(_,y,D,8),t.write(_,y,D,P,52,8),D+8}s.prototype.writeDoubleLE=function(y,D,P){return xu(this,y,D,!0,P)},s.prototype.writeDoubleBE=function(y,D,P){return xu(this,y,D,!1,P)},s.prototype.copy=function(y,D,P,R){if(!s.isBuffer(y))throw new TypeError("argument should be a Buffer");if(P||(P=0),!R&&R!==0&&(R=this.length),D>=y.length&&(D=y.length),D||(D=0),R>0&&R=this.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),y.length-D>>0,P=P===void 0?this.length:P>>>0,y||(y=0);let L;if(typeof y=="number")for(L=D;L2**32?R=S(String(D)):typeof D=="bigint"&&(R=String(D),(D>BigInt(2)**BigInt(32)||D<-(BigInt(2)**BigInt(32)))&&(R=S(R)),R+="n"),P+=` It must be ${y}. Received ${R}`,P},RangeError);function S(_){let y="",D=_.length;const P=_[0]==="-"?1:0;for(;D>=P+4;D-=3)y=`_${_.slice(D-3,D)}${y}`;return`${_.slice(0,D)}${y}`}function O(_,y,D){W(y,"offset"),(_[y]===void 0||_[y+D]===void 0)&&U(y,_.length-(D+1))}function I(_,y,D,P,R,L){if(_>D||_3?y===0||y===BigInt(0)?bu=`>= 0${J} and < 2${J} ** ${(L+1)*8}${J}`:bu=`>= -(2${J} ** ${(L+1)*8-1}${J}) and < 2 ** ${(L+1)*8-1}${J}`:bu=`>= ${y}${J} and <= ${D}${J}`,new ku.ERR_OUT_OF_RANGE("value",bu,_)}O(P,R,L)}function W(_,y){if(typeof _!="number")throw new ku.ERR_INVALID_ARG_TYPE(y,"number",_)}function U(_,y,D){throw Math.floor(_)!==_?(W(_,D),new ku.ERR_OUT_OF_RANGE(D||"offset","an integer",_)):y<0?new ku.ERR_BUFFER_OUT_OF_BOUNDS:new ku.ERR_OUT_OF_RANGE(D||"offset",`>= ${D?1:0} and <= ${y}`,_)}const Q=/[^+/0-9A-Za-z-_]/g;function Y(_){if(_=_.split("=")[0],_=_.trim().replace(Q,""),_.length<2)return"";for(;_.length%4!==0;)_=_+"=";return _}function $(_,y){y=y||1/0;let D;const P=_.length;let R=null;const L=[];for(let J=0;J55295&&D<57344){if(!R){if(D>56319){(y-=3)>-1&&L.push(239,191,189);continue}else if(J+1===P){(y-=3)>-1&&L.push(239,191,189);continue}R=D;continue}if(D<56320){(y-=3)>-1&&L.push(239,191,189),R=D;continue}D=(R-55296<<10|D-56320)+65536}else R&&(y-=3)>-1&&L.push(239,191,189);if(R=null,D<128){if((y-=1)<0)break;L.push(D)}else if(D<2048){if((y-=2)<0)break;L.push(D>>6|192,D&63|128)}else if(D<65536){if((y-=3)<0)break;L.push(D>>12|224,D>>6&63|128,D&63|128)}else if(D<1114112){if((y-=4)<0)break;L.push(D>>18|240,D>>12&63|128,D>>6&63|128,D&63|128)}else throw new Error("Invalid code point")}return L}function G(_){const y=[];for(let D=0;D<_.length;++D)y.push(_.charCodeAt(D)&255);return y}function X(_,y){let D,P,R;const L=[];for(let J=0;J<_.length&&!((y-=2)<0);++J)D=_.charCodeAt(J),P=D>>8,R=D%256,L.push(R),L.push(P);return L}function K(_){return u.toByteArray(Y(_))}function ru(_,y,D,P){let R;for(R=0;R=y.length||R>=_.length);++R)y[R+D]=_[R];return R}function pu(_,y){return _ instanceof y||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===y.name}function gu(_){return _!==_}const Pu=function(){const _="0123456789abcdef",y=new Array(256);for(let D=0;D<16;++D){const P=D*16;for(let R=0;R<16;++R)y[P+R]=_[D]+_[R]}return y}();function Au(_){return typeof BigInt>"u"?Fu:_}function Fu(){throw new Error("BigInt not supported")}})(rF);var aF={exports:{}},D0=aF.exports={},sn,on;function cf(){throw new Error("setTimeout has not been defined")}function Ef(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?sn=setTimeout:sn=cf}catch{sn=cf}try{typeof clearTimeout=="function"?on=clearTimeout:on=Ef}catch{on=Ef}})();function sF(e){if(sn===setTimeout)return setTimeout(e,0);if((sn===cf||!sn)&&setTimeout)return sn=setTimeout,setTimeout(e,0);try{return sn(e,0)}catch{try{return sn.call(null,e,0)}catch{return sn.call(this,e,0)}}}function PP(e){if(on===clearTimeout)return clearTimeout(e);if((on===Ef||!on)&&clearTimeout)return on=clearTimeout,clearTimeout(e);try{return on(e)}catch{try{return on.call(null,e)}catch{return on.call(this,e)}}}var er=[],Ws=!1,Gi,VE=-1;function TP(){!Ws||!Gi||(Ws=!1,Gi.length?er=Gi.concat(er):VE=-1,er.length&&oF())}function oF(){if(!Ws){var e=sF(TP);Ws=!0;for(var u=er.length;u;){for(Gi=er,er=[];++VE1)for(var t=1;t{if(i=nT(i),i in ym)return;ym[i]=!0;const a=i.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!n)for(let c=r.length-1;c>=0;c--){const E=r[c];if(E.href===i&&(!a||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${s}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":tT,a||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),a)return new Promise((c,E)=>{l.addEventListener("load",c),l.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>u()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})};var Fm='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',rT={rounded:`SFRounded, ui-rounded, "SF Pro Rounded", ${Fm}`,system:Fm},r3={large:{actionButton:"9999px",connectButton:"12px",modal:"24px",modalMobile:"28px"},medium:{actionButton:"10px",connectButton:"8px",modal:"16px",modalMobile:"18px"},none:{actionButton:"0px",connectButton:"0px",modal:"0px",modalMobile:"0px"},small:{actionButton:"4px",connectButton:"4px",modal:"8px",modalMobile:"8px"}},iT={large:{modalOverlay:"blur(20px)"},none:{modalOverlay:"blur(0px)"},small:{modalOverlay:"blur(4px)"}},aT=({borderRadius:e="large",fontStack:u="rounded",overlayBlur:t="none"})=>({blurs:{modalOverlay:iT[t].modalOverlay},fonts:{body:rT[u]},radii:{actionButton:r3[e].actionButton,connectButton:r3[e].connectButton,menuButton:r3[e].connectButton,modal:r3[e].modal,modalMobile:r3[e].modalMobile}}),BF={blue:{accentColor:"#0E76FD",accentColorForeground:"#FFF"},green:{accentColor:"#1DB847",accentColorForeground:"#FFF"},orange:{accentColor:"#FF801F",accentColorForeground:"#FFF"},pink:{accentColor:"#FF5CA0",accentColorForeground:"#FFF"},purple:{accentColor:"#5F5AFA",accentColorForeground:"#FFF"},red:{accentColor:"#FA423C",accentColorForeground:"#FFF"}},Dm=BF.blue,yF=({accentColor:e=Dm.accentColor,accentColorForeground:u=Dm.accentColorForeground,...t}={})=>({...aT(t),colors:{accentColor:e,accentColorForeground:u,actionButtonBorder:"rgba(0, 0, 0, 0.04)",actionButtonBorderMobile:"rgba(0, 0, 0, 0.06)",actionButtonSecondaryBackground:"rgba(0, 0, 0, 0.06)",closeButton:"rgba(60, 66, 66, 0.8)",closeButtonBackground:"rgba(0, 0, 0, 0.06)",connectButtonBackground:"#FFF",connectButtonBackgroundError:"#FF494A",connectButtonInnerBackground:"linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",connectButtonText:"#25292E",connectButtonTextError:"#FFF",connectionIndicator:"#30E000",downloadBottomCardBackground:"linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",downloadTopCardBackground:"linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",error:"#FF494A",generalBorder:"rgba(0, 0, 0, 0.06)",generalBorderDim:"rgba(0, 0, 0, 0.03)",menuItemBackground:"rgba(60, 66, 66, 0.1)",modalBackdrop:"rgba(0, 0, 0, 0.3)",modalBackground:"#FFF",modalBorder:"transparent",modalText:"#25292E",modalTextDim:"rgba(60, 66, 66, 0.3)",modalTextSecondary:"rgba(60, 66, 66, 0.6)",profileAction:"#FFF",profileActionHover:"rgba(255, 255, 255, 0.5)",profileForeground:"rgba(60, 66, 66, 0.06)",selectedOptionBorder:"rgba(60, 66, 66, 0.1)",standby:"#FFD641"},shadows:{connectButton:"0px 4px 12px rgba(0, 0, 0, 0.1)",dialog:"0px 8px 32px rgba(0, 0, 0, 0.32)",profileDetailsAction:"0px 2px 6px rgba(37, 41, 46, 0.04)",selectedOption:"0px 2px 6px rgba(0, 0, 0, 0.24)",selectedWallet:"0px 2px 6px rgba(0, 0, 0, 0.12)",walletLogo:"0px 2px 16px rgba(0, 0, 0, 0.16)"}});yF.accentColors=BF;function sT(e,u){return Object.defineProperty(e,"__recipe__",{value:u,writable:!1}),e}var FF=sT;function DF(e){var{conditions:u}=e;if(!u)throw new Error("Styles have no conditions");function t(n){if(typeof n=="string"||typeof n=="number"||typeof n=="boolean"){if(!u.defaultCondition)throw new Error("No default condition");return{[u.defaultCondition]:n}}if(Array.isArray(n)){if(!("responsiveArray"in u))throw new Error("Responsive arrays are not supported");var r={};for(var i in u.responsiveArray)n[i]!=null&&(r[u.responsiveArray[i]]=n[i]);return r}return n}return FF(t,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createNormalizeValueFn",args:[{conditions:e.conditions}]})}function oT(e){var{conditions:u}=e;if(!u)throw new Error("Styles have no conditions");var t=DF(e);function n(r,i){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){if(!u.defaultCondition)throw new Error("No default condition");return i(r,u.defaultCondition)}var a=Array.isArray(r)?t(r):r,s={};for(var o in a)a[o]!=null&&(s[o]=i(a[o],o));return s}return FF(n,{importPath:"@vanilla-extract/sprinkles/createUtils",importName:"createMapValueFn",args:[{conditions:e.conditions}]})}function lT(e,u,t){return u in e?Object.defineProperty(e,u,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[u]=t,e}function vm(e,u){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);u&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function Od(e){for(var u=1;ufunction(){for(var u=arguments.length,t=new Array(u),n=0;no.styles)),i=Object.keys(r),a=i.filter(o=>"mappings"in r[o]),s=o=>{var l=[],c={},E=Od({},o),d=!1;for(var f of a){var p=o[f];if(p!=null){var h=r[f];d=!0;for(var g of h.mappings)c[g]=p,E[g]==null&&delete E[g]}}var A=d?Od(Od({},c),E):o;for(var m in A){var B=A[m],F=r[m];try{if(F.mappings)continue;if(typeof B=="string"||typeof B=="number")l.push(F.values[B].defaultClass);else if(Array.isArray(B))for(var w=0;we,dT=function(){return cT(ET)(...arguments)};function fT({storage:e,key:u="REACT_QUERY_OFFLINE_CACHE",throttleTime:t=1e3,serialize:n=JSON.stringify,deserialize:r=JSON.parse,retry:i}){if(e){const a=s=>{try{e.setItem(u,n(s));return}catch(o){return o}};return{persistClient:pT(s=>{let o=s,l=a(o),c=0;for(;l&&o;)c++,o=i==null?void 0:i({persistedClient:o,error:l,errorCount:c}),o&&(l=a(o))},t),restoreClient:()=>{const s=e.getItem(u);if(s)return r(s)},removeClient:()=>{e.removeItem(u)}}}return{persistClient:bm,restoreClient:()=>{},removeClient:bm}}function pT(e,u=100){let t=null,n;return function(...r){n=r,t===null&&(t=setTimeout(()=>{e(...n),t=null},u))}}function bm(){}let Po=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(u){const t={listener:u};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};const el=typeof window>"u"||"Deno"in window;function ht(){}function hT(e,u){return typeof e=="function"?e(u):e}function df(e){return typeof e=="number"&&e>=0&&e!==1/0}function vF(e,u){return Math.max(e+(u||0)-Date.now(),0)}function pE(e,u,t){return _c(e)?typeof u=="function"?{...t,queryKey:e,queryFn:u}:{...u,queryKey:e}:e}function bF(e,u,t){return _c(e)?typeof u=="function"?{...t,mutationKey:e,mutationFn:u}:{...u,mutationKey:e}:typeof e=="function"?{...u,mutationFn:e}:{...e}}function Tr(e,u,t){return _c(e)?[{...u,queryKey:e},t]:[e||{},u]}function wm(e,u){const{type:t="all",exact:n,fetchStatus:r,predicate:i,queryKey:a,stale:s}=e;if(_c(a)){if(n){if(u.queryHash!==lh(a,u.options))return!1}else if(!w9(u.queryKey,a))return!1}if(t!=="all"){const o=u.isActive();if(t==="active"&&!o||t==="inactive"&&o)return!1}return!(typeof s=="boolean"&&u.isStale()!==s||typeof r<"u"&&r!==u.state.fetchStatus||i&&!i(u))}function xm(e,u){const{exact:t,fetching:n,predicate:r,mutationKey:i}=e;if(_c(i)){if(!u.options.mutationKey)return!1;if(t){if(Qi(u.options.mutationKey)!==Qi(i))return!1}else if(!w9(u.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&u.state.status==="loading"!==n||r&&!r(u))}function lh(e,u){return((u==null?void 0:u.queryKeyHashFn)||Qi)(e)}function Qi(e){return JSON.stringify(e,(u,t)=>ff(t)?Object.keys(t).sort().reduce((n,r)=>(n[r]=t[r],n),{}):t)}function w9(e,u){return wF(e,u)}function wF(e,u){return e===u?!0:typeof e!=typeof u?!1:e&&u&&typeof e=="object"&&typeof u=="object"?!Object.keys(u).some(t=>!wF(e[t],u[t])):!1}function ch(e,u){if(e===u)return e;const t=km(e)&&km(u);if(t||ff(e)&&ff(u)){const n=t?e.length:Object.keys(e).length,r=t?u:Object.keys(u),i=r.length,a=t?[]:{};let s=0;for(let o=0;o"u")return!0;const t=u.prototype;return!(!_m(t)||!t.hasOwnProperty("isPrototypeOf"))}function _m(e){return Object.prototype.toString.call(e)==="[object Object]"}function _c(e){return Array.isArray(e)}function xF(e){return new Promise(u=>{setTimeout(u,e)})}function Sm(e){xF(0).then(e)}function CT(){if(typeof AbortController=="function")return new AbortController}function pf(e,u,t){return t.isDataEqual!=null&&t.isDataEqual(e,u)?e:typeof t.structuralSharing=="function"?t.structuralSharing(e,u):t.structuralSharing!==!1?ch(e,u):u}let mT=class extends Po{constructor(){super(),this.setup=u=>{if(!el&&window.addEventListener){const t=()=>u();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var u;(u=this.cleanup)==null||u.call(this),this.cleanup=void 0}}setEventListener(u){var t;this.setup=u,(t=this.cleanup)==null||t.call(this),this.cleanup=u(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(u){this.focused!==u&&(this.focused=u,this.onFocus())}onFocus(){this.listeners.forEach(({listener:u})=>{u()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}};const k9=new mT,Pm=["online","offline"];let AT=class extends Po{constructor(){super(),this.setup=u=>{if(!el&&window.addEventListener){const t=()=>u();return Pm.forEach(n=>{window.addEventListener(n,t,!1)}),()=>{Pm.forEach(n=>{window.removeEventListener(n,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var u;(u=this.cleanup)==null||u.call(this),this.cleanup=void 0}}setEventListener(u){var t;this.setup=u,(t=this.cleanup)==null||t.call(this),this.cleanup=u(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(u){this.online!==u&&(this.online=u,this.onOnline())}onOnline(){this.listeners.forEach(({listener:u})=>{u()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}};const _9=new AT;function gT(e){return Math.min(1e3*2**e,3e4)}function K2(e){return(e??"online")==="online"?_9.isOnline():!0}let kF=class{constructor(u){this.revert=u==null?void 0:u.revert,this.silent=u==null?void 0:u.silent}};function YE(e){return e instanceof kF}function _F(e){let u=!1,t=0,n=!1,r,i,a;const s=new Promise((g,A)=>{i=g,a=A}),o=g=>{n||(f(new kF(g)),e.abort==null||e.abort())},l=()=>{u=!0},c=()=>{u=!1},E=()=>!k9.isFocused()||e.networkMode!=="always"&&!_9.isOnline(),d=g=>{n||(n=!0,e.onSuccess==null||e.onSuccess(g),r==null||r(),i(g))},f=g=>{n||(n=!0,e.onError==null||e.onError(g),r==null||r(),a(g))},p=()=>new Promise(g=>{r=A=>{const m=n||!E();return m&&g(A),m},e.onPause==null||e.onPause()}).then(()=>{r=void 0,n||e.onContinue==null||e.onContinue()}),h=()=>{if(n)return;let g;try{g=e.fn()}catch(A){g=Promise.reject(A)}Promise.resolve(g).then(d).catch(A=>{var m,B;if(n)return;const F=(m=e.retry)!=null?m:3,w=(B=e.retryDelay)!=null?B:gT,v=typeof w=="function"?w(t,A):w,C=F===!0||typeof F=="number"&&t{if(E())return p()}).then(()=>{u?f(A):h()})})};return K2(e.networkMode)?h():p().then(h),{promise:s,cancel:o,continue:()=>(r==null?void 0:r())?s:Promise.resolve(),cancelRetry:l,continueRetry:c}}const Eh=console;function BT(){let e=[],u=0,t=c=>{c()},n=c=>{c()};const r=c=>{let E;u++;try{E=c()}finally{u--,u||s()}return E},i=c=>{u?e.push(c):Sm(()=>{t(c)})},a=c=>(...E)=>{i(()=>{c(...E)})},s=()=>{const c=e;e=[],c.length&&Sm(()=>{n(()=>{c.forEach(E=>{t(E)})})})};return{batch:r,batchCalls:a,schedule:i,setNotifyFunction:c=>{t=c},setBatchNotifyFunction:c=>{n=c}}}const B0=BT();let SF=class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),df(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(u){this.cacheTime=Math.max(this.cacheTime||0,u??(el?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}},yT=class extends SF{constructor(u){super(),this.abortSignalConsumed=!1,this.defaultOptions=u.defaultOptions,this.setOptions(u.options),this.observers=[],this.cache=u.cache,this.logger=u.logger||Eh,this.queryKey=u.queryKey,this.queryHash=u.queryHash,this.initialState=u.state||FT(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(u){this.options={...this.defaultOptions,...u},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(u,t){const n=pf(this.state.data,u,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(u,t){this.dispatch({type:"setState",state:u,setStateOptions:t})}cancel(u){var t;const n=this.promise;return(t=this.retryer)==null||t.cancel(u),n?n.then(ht).catch(ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(u=>u.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(u=>u.getCurrentResult().isStale)}isStaleByTime(u=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!vF(this.state.dataUpdatedAt,u)}onFocus(){var u;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),(u=this.retryer)==null||u.continue()}onOnline(){var u;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),(u=this.retryer)==null||u.continue()}addObserver(u){this.observers.includes(u)||(this.observers.push(u),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:u}))}removeObserver(u){this.observers.includes(u)&&(this.observers=this.observers.filter(t=>t!==u),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:u}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(u,t){var n,r;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&t!=null&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(u&&this.setOptions(u),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const a=CT(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},o=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};o(s);const l=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};if(o(c),(n=this.options.behavior)==null||n.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((r=c.fetchOptions)==null?void 0:r.meta)){var E;this.dispatch({type:"fetch",meta:(E=c.fetchOptions)==null?void 0:E.meta})}const d=f=>{if(YE(f)&&f.silent||this.dispatch({type:"error",error:f}),!YE(f)){var p,h,g,A;(p=(h=this.cache.config).onError)==null||p.call(h,f,this),(g=(A=this.cache.config).onSettled)==null||g.call(A,this.state.data,f,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=_F({fn:c.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:f=>{var p,h,g,A;if(typeof f>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(f),(p=(h=this.cache.config).onSuccess)==null||p.call(h,f,this),(g=(A=this.cache.config).onSettled)==null||g.call(A,f,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(f,p)=>{this.dispatch({type:"failed",failureCount:f,error:p})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(u){const t=n=>{var r,i;switch(u.type){case"failed":return{...n,fetchFailureCount:u.failureCount,fetchFailureReason:u.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(r=u.meta)!=null?r:null,fetchStatus:K2(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:u.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=u.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!u.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=u.error;return YE(a)&&a.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...u.state}}};this.state=t(this.state),B0.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(u)}),this.cache.notify({query:this,type:"updated",action:u})})}};function FT(e){const u=typeof e.initialData=="function"?e.initialData():e.initialData,t=typeof u<"u",n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:u,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"loading",fetchStatus:"idle"}}let DT=class extends Po{constructor(u){super(),this.config=u||{},this.queries=[],this.queriesMap={}}build(u,t,n){var r;const i=t.queryKey,a=(r=t.queryHash)!=null?r:lh(i,t);let s=this.get(a);return s||(s=new yT({cache:this,logger:u.getLogger(),queryKey:i,queryHash:a,options:u.defaultQueryOptions(t),state:n,defaultOptions:u.getQueryDefaults(i)}),this.add(s)),s}add(u){this.queriesMap[u.queryHash]||(this.queriesMap[u.queryHash]=u,this.queries.push(u),this.notify({type:"added",query:u}))}remove(u){const t=this.queriesMap[u.queryHash];t&&(u.destroy(),this.queries=this.queries.filter(n=>n!==u),t===u&&delete this.queriesMap[u.queryHash],this.notify({type:"removed",query:u}))}clear(){B0.batch(()=>{this.queries.forEach(u=>{this.remove(u)})})}get(u){return this.queriesMap[u]}getAll(){return this.queries}find(u,t){const[n]=Tr(u,t);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(r=>wm(n,r))}findAll(u,t){const[n]=Tr(u,t);return Object.keys(n).length>0?this.queries.filter(r=>wm(n,r)):this.queries}notify(u){B0.batch(()=>{this.listeners.forEach(({listener:t})=>{t(u)})})}onFocus(){B0.batch(()=>{this.queries.forEach(u=>{u.onFocus()})})}onOnline(){B0.batch(()=>{this.queries.forEach(u=>{u.onOnline()})})}},vT=class extends SF{constructor(u){super(),this.defaultOptions=u.defaultOptions,this.mutationId=u.mutationId,this.mutationCache=u.mutationCache,this.logger=u.logger||Eh,this.observers=[],this.state=u.state||PF(),this.setOptions(u.options),this.scheduleGc()}setOptions(u){this.options={...this.defaultOptions,...u},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(u){this.dispatch({type:"setState",state:u})}addObserver(u){this.observers.includes(u)||(this.observers.push(u),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:u}))}removeObserver(u){this.observers=this.observers.filter(t=>t!==u),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:u})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var u,t;return(u=(t=this.retryer)==null?void 0:t.continue())!=null?u:this.execute()}async execute(){const u=()=>{var C;return this.retryer=_F({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(k,j)=>{this.dispatch({type:"failed",failureCount:k,error:j})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t=this.state.status==="loading";try{var n,r,i,a,s,o,l,c;if(!t){var E,d,f,p;this.dispatch({type:"loading",variables:this.options.variables}),await((E=(d=this.mutationCache.config).onMutate)==null?void 0:E.call(d,this.state.variables,this));const k=await((f=(p=this.options).onMutate)==null?void 0:f.call(p,this.state.variables));k!==this.state.context&&this.dispatch({type:"loading",context:k,variables:this.state.variables})}const C=await u();return await((n=(r=this.mutationCache.config).onSuccess)==null?void 0:n.call(r,C,this.state.variables,this.state.context,this)),await((i=(a=this.options).onSuccess)==null?void 0:i.call(a,C,this.state.variables,this.state.context)),await((s=(o=this.mutationCache.config).onSettled)==null?void 0:s.call(o,C,null,this.state.variables,this.state.context,this)),await((l=(c=this.options).onSettled)==null?void 0:l.call(c,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var h,g,A,m,B,F,w,v;throw await((h=(g=this.mutationCache.config).onError)==null?void 0:h.call(g,C,this.state.variables,this.state.context,this)),await((A=(m=this.options).onError)==null?void 0:A.call(m,C,this.state.variables,this.state.context)),await((B=(F=this.mutationCache.config).onSettled)==null?void 0:B.call(F,void 0,C,this.state.variables,this.state.context,this)),await((w=(v=this.options).onSettled)==null?void 0:w.call(v,void 0,C,this.state.variables,this.state.context)),C}finally{this.dispatch({type:"error",error:C})}}}dispatch(u){const t=n=>{switch(u.type){case"failed":return{...n,failureCount:u.failureCount,failureReason:u.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:u.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!K2(this.options.networkMode),status:"loading",variables:u.variables};case"success":return{...n,data:u.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:u.error,failureCount:n.failureCount+1,failureReason:u.error,isPaused:!1,status:"error"};case"setState":return{...n,...u.state}}};this.state=t(this.state),B0.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(u)}),this.mutationCache.notify({mutation:this,type:"updated",action:u})})}};function PF(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}let bT=class extends Po{constructor(u){super(),this.config=u||{},this.mutations=[],this.mutationId=0}build(u,t,n){const r=new vT({mutationCache:this,logger:u.getLogger(),mutationId:++this.mutationId,options:u.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?u.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r}add(u){this.mutations.push(u),this.notify({type:"added",mutation:u})}remove(u){this.mutations=this.mutations.filter(t=>t!==u),this.notify({type:"removed",mutation:u})}clear(){B0.batch(()=>{this.mutations.forEach(u=>{this.remove(u)})})}getAll(){return this.mutations}find(u){return typeof u.exact>"u"&&(u.exact=!0),this.mutations.find(t=>xm(u,t))}findAll(u){return this.mutations.filter(t=>xm(u,t))}notify(u){B0.batch(()=>{this.listeners.forEach(({listener:t})=>{t(u)})})}resumePausedMutations(){var u;return this.resuming=((u=this.resuming)!=null?u:Promise.resolve()).then(()=>{const t=this.mutations.filter(n=>n.state.isPaused);return B0.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(ht)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}};function wT(){return{onFetch:e=>{e.fetchFn=()=>{var u,t,n,r,i,a;const s=(u=e.fetchOptions)==null||(t=u.meta)==null?void 0:t.refetchPage,o=(n=e.fetchOptions)==null||(r=n.meta)==null?void 0:r.fetchMore,l=o==null?void 0:o.pageParam,c=(o==null?void 0:o.direction)==="forward",E=(o==null?void 0:o.direction)==="backward",d=((i=e.state.data)==null?void 0:i.pages)||[],f=((a=e.state.data)==null?void 0:a.pageParams)||[];let p=f,h=!1;const g=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>{var C;if((C=e.signal)!=null&&C.aborted)h=!0;else{var k;(k=e.signal)==null||k.addEventListener("abort",()=>{h=!0})}return e.signal}})},A=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),m=(v,C,k,j)=>(p=j?[C,...p]:[...p,C],j?[k,...v]:[...v,k]),B=(v,C,k,j)=>{if(h)return Promise.reject("Cancelled");if(typeof k>"u"&&!C&&v.length)return Promise.resolve(v);const N={queryKey:e.queryKey,pageParam:k,meta:e.options.meta};g(N);const uu=A(N);return Promise.resolve(uu).then(su=>m(v,k,su,j))};let F;if(!d.length)F=B([]);else if(c){const v=typeof l<"u",C=v?l:Tm(e.options,d);F=B(d,v,C)}else if(E){const v=typeof l<"u",C=v?l:xT(e.options,d);F=B(d,v,C,!0)}else{p=[];const v=typeof e.options.getNextPageParam>"u";F=(s&&d[0]?s(d[0],0,d):!0)?B([],v,f[0]):Promise.resolve(m([],f[0],d[0]));for(let k=1;k{if(s&&d[k]?s(d[k],k,d):!0){const uu=v?f[k]:Tm(e.options,j);return B(j,v,uu)}return Promise.resolve(m(j,f[k],d[k]))})}return F.then(v=>({pages:v,pageParams:p}))}}}}function Tm(e,u){return e.getNextPageParam==null?void 0:e.getNextPageParam(u[u.length-1],u)}function xT(e,u){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(u[0],u)}let kT=class{constructor(u={}){this.queryCache=u.queryCache||new DT,this.mutationCache=u.mutationCache||new bT,this.logger=u.logger||Eh,this.defaultOptions=u.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=k9.subscribe(()=>{k9.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=_9.subscribe(()=>{_9.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var u,t;this.mountCount--,this.mountCount===0&&((u=this.unsubscribeFocus)==null||u.call(this),this.unsubscribeFocus=void 0,(t=this.unsubscribeOnline)==null||t.call(this),this.unsubscribeOnline=void 0)}isFetching(u,t){const[n]=Tr(u,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(u){return this.mutationCache.findAll({...u,fetching:!0}).length}getQueryData(u,t){var n;return(n=this.queryCache.find(u,t))==null?void 0:n.state.data}ensureQueryData(u,t,n){const r=pE(u,t,n),i=this.getQueryData(r.queryKey);return i?Promise.resolve(i):this.fetchQuery(r)}getQueriesData(u){return this.getQueryCache().findAll(u).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(u,t,n){const r=this.queryCache.find(u),i=r==null?void 0:r.state.data,a=hT(t,i);if(typeof a>"u")return;const s=pE(u),o=this.defaultQueryOptions(s);return this.queryCache.build(this,o).setData(a,{...n,manual:!0})}setQueriesData(u,t,n){return B0.batch(()=>this.getQueryCache().findAll(u).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(u,t){var n;return(n=this.queryCache.find(u,t))==null?void 0:n.state}removeQueries(u,t){const[n]=Tr(u,t),r=this.queryCache;B0.batch(()=>{r.findAll(n).forEach(i=>{r.remove(i)})})}resetQueries(u,t,n){const[r,i]=Tr(u,t,n),a=this.queryCache,s={type:"active",...r};return B0.batch(()=>(a.findAll(r).forEach(o=>{o.reset()}),this.refetchQueries(s,i)))}cancelQueries(u,t,n){const[r,i={}]=Tr(u,t,n);typeof i.revert>"u"&&(i.revert=!0);const a=B0.batch(()=>this.queryCache.findAll(r).map(s=>s.cancel(i)));return Promise.all(a).then(ht).catch(ht)}invalidateQueries(u,t,n){const[r,i]=Tr(u,t,n);return B0.batch(()=>{var a,s;if(this.queryCache.findAll(r).forEach(l=>{l.invalidate()}),r.refetchType==="none")return Promise.resolve();const o={...r,type:(a=(s=r.refetchType)!=null?s:r.type)!=null?a:"active"};return this.refetchQueries(o,i)})}refetchQueries(u,t,n){const[r,i]=Tr(u,t,n),a=B0.batch(()=>this.queryCache.findAll(r).filter(o=>!o.isDisabled()).map(o=>{var l;return o.fetch(void 0,{...i,cancelRefetch:(l=i==null?void 0:i.cancelRefetch)!=null?l:!0,meta:{refetchPage:r.refetchPage}})}));let s=Promise.all(a).then(ht);return i!=null&&i.throwOnError||(s=s.catch(ht)),s}fetchQuery(u,t,n){const r=pE(u,t,n),i=this.defaultQueryOptions(r);typeof i.retry>"u"&&(i.retry=!1);const a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(u,t,n){return this.fetchQuery(u,t,n).then(ht).catch(ht)}fetchInfiniteQuery(u,t,n){const r=pE(u,t,n);return r.behavior=wT(),this.fetchQuery(r)}prefetchInfiniteQuery(u,t,n){return this.fetchInfiniteQuery(u,t,n).then(ht).catch(ht)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(u){this.defaultOptions=u}setQueryDefaults(u,t){const n=this.queryDefaults.find(r=>Qi(u)===Qi(r.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:u,defaultOptions:t})}getQueryDefaults(u){if(!u)return;const t=this.queryDefaults.find(n=>w9(u,n.queryKey));return t==null?void 0:t.defaultOptions}setMutationDefaults(u,t){const n=this.mutationDefaults.find(r=>Qi(u)===Qi(r.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:u,defaultOptions:t})}getMutationDefaults(u){if(!u)return;const t=this.mutationDefaults.find(n=>w9(u,n.mutationKey));return t==null?void 0:t.defaultOptions}defaultQueryOptions(u){if(u!=null&&u._defaulted)return u;const t={...this.defaultOptions.queries,...this.getQueryDefaults(u==null?void 0:u.queryKey),...u,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=lh(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.useErrorBoundary>"u"&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(u){return u!=null&&u._defaulted?u:{...this.defaultOptions.mutations,...this.getMutationDefaults(u==null?void 0:u.mutationKey),...u,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}},_T=class extends Po{constructor(u,t){super(),this.client=u,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Om(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hf(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hf(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(u,t){const n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(u),x9(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const i=this.hasListeners();i&&Im(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==r||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();i&&(this.currentQuery!==r||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(u){const t=this.client.getQueryCache().build(this.client,u),n=this.createResult(t,u);return PT(this,n,u)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(u){const t={};return Object.keys(u).forEach(n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),u[n])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:u,...t}={}){return this.fetch({...t,meta:{refetchPage:u}})}fetchOptimistic(u){const t=this.client.defaultQueryOptions(u),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,t))}fetch(u){var t;return this.executeFetch({...u,cancelRefetch:(t=u.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(u){this.updateQuery();let t=this.currentQuery.fetch(this.options,u);return u!=null&&u.throwOnError||(t=t.catch(ht)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),el||this.currentResult.isStale||!df(this.options.staleTime))return;const t=vF(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var u;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(u=this.options.refetchInterval)!=null?u:!1}updateRefetchInterval(u){this.clearRefetchInterval(),this.currentRefetchInterval=u,!(el||this.options.enabled===!1||!df(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||k9.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(u,t){const n=this.currentQuery,r=this.options,i=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,o=u!==n,l=o?u.state:this.currentQueryInitialState,c=o?this.currentResult:this.previousQueryResult,{state:E}=u;let{dataUpdatedAt:d,error:f,errorUpdatedAt:p,fetchStatus:h,status:g}=E,A=!1,m=!1,B;if(t._optimisticResults){const k=this.hasListeners(),j=!k&&Om(u,t),N=k&&Im(u,n,t,r);(j||N)&&(h=K2(u.options.networkMode)?"fetching":"paused",d||(g="loading")),t._optimisticResults==="isRestoring"&&(h="idle")}if(t.keepPreviousData&&!E.dataUpdatedAt&&c!=null&&c.isSuccess&&g!=="error")B=c.data,d=c.dataUpdatedAt,g=c.status,A=!0;else if(t.select&&typeof E.data<"u")if(i&&E.data===(a==null?void 0:a.data)&&t.select===this.selectFn)B=this.selectResult;else try{this.selectFn=t.select,B=t.select(E.data),B=pf(i==null?void 0:i.data,B,t),this.selectResult=B,this.selectError=null}catch(k){this.selectError=k}else B=E.data;if(typeof t.placeholderData<"u"&&typeof B>"u"&&g==="loading"){let k;if(i!=null&&i.isPlaceholderData&&t.placeholderData===(s==null?void 0:s.placeholderData))k=i.data;else if(k=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof k<"u")try{k=t.select(k),this.selectError=null}catch(j){this.selectError=j}typeof k<"u"&&(g="success",B=pf(i==null?void 0:i.data,k,t),m=!0)}this.selectError&&(f=this.selectError,B=this.selectResult,p=Date.now(),g="error");const F=h==="fetching",w=g==="loading",v=g==="error";return{status:g,fetchStatus:h,isLoading:w,isSuccess:g==="success",isError:v,isInitialLoading:w&&F,data:B,dataUpdatedAt:d,error:f,errorUpdatedAt:p,failureCount:E.fetchFailureCount,failureReason:E.fetchFailureReason,errorUpdateCount:E.errorUpdateCount,isFetched:E.dataUpdateCount>0||E.errorUpdateCount>0,isFetchedAfterMount:E.dataUpdateCount>l.dataUpdateCount||E.errorUpdateCount>l.errorUpdateCount,isFetching:F,isRefetching:F&&!w,isLoadingError:v&&E.dataUpdatedAt===0,isPaused:h==="paused",isPlaceholderData:m,isPreviousData:A,isRefetchError:v&&E.dataUpdatedAt!==0,isStale:dh(u,t),refetch:this.refetch,remove:this.remove}}updateResult(u){const t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,x9(n,t))return;this.currentResult=n;const r={cache:!0},i=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.trackedProps.size)return!0;const o=new Set(s??this.trackedProps);return this.options.useErrorBoundary&&o.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==t[c]&&o.has(c)})};(u==null?void 0:u.listeners)!==!1&&i()&&(r.listeners=!0),this.notify({...r,...u})}updateQuery(){const u=this.client.getQueryCache().build(this.client,this.options);if(u===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=u,this.currentQueryInitialState=u.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),u.addObserver(this))}onQueryUpdate(u){const t={};u.type==="success"?t.onSuccess=!u.manual:u.type==="error"&&!YE(u.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(u){B0.batch(()=>{if(u.onSuccess){var t,n,r,i;(t=(n=this.options).onSuccess)==null||t.call(n,this.currentResult.data),(r=(i=this.options).onSettled)==null||r.call(i,this.currentResult.data,null)}else if(u.onError){var a,s,o,l;(a=(s=this.options).onError)==null||a.call(s,this.currentResult.error),(o=(l=this.options).onSettled)==null||o.call(l,void 0,this.currentResult.error)}u.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),u.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}};function ST(e,u){return u.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&u.retryOnMount===!1)}function Om(e,u){return ST(e,u)||e.state.dataUpdatedAt>0&&hf(e,u,u.refetchOnMount)}function hf(e,u,t){if(u.enabled!==!1){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&dh(e,u)}return!1}function Im(e,u,t,n){return t.enabled!==!1&&(e!==u||n.enabled===!1)&&(!t.suspense||e.state.status!=="error")&&dh(e,t)}function dh(e,u){return e.isStaleByTime(u.staleTime)}function PT(e,u,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?u.isPlaceholderData:!x9(e.getCurrentResult(),u)}let TT=class extends Po{constructor(u,t){super(),this.client=u,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(u){var t;const n=this.options;this.options=this.client.defaultMutationOptions(u),x9(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var u;(u=this.currentMutation)==null||u.removeObserver(this)}}onMutationUpdate(u){this.updateResult();const t={listeners:!0};u.type==="success"?t.onSuccess=!0:u.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(u,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof u<"u"?u:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const u=this.currentMutation?this.currentMutation.state:PF(),t={...u,isLoading:u.status==="loading",isSuccess:u.status==="success",isError:u.status==="error",isIdle:u.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(u){B0.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(u.onSuccess){var t,n,r,i;(t=(n=this.mutateOptions).onSuccess)==null||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(r=(i=this.mutateOptions).onSettled)==null||r.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(u.onError){var a,s,o,l;(a=(s=this.mutateOptions).onError)==null||a.call(s,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(o=(l=this.mutateOptions).onSettled)==null||o.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}u.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)})})}};var TF={exports:{}},Ye={},OF={exports:{}},IF={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function u(H,iu){var lu=H.length;H.push(iu);u:for(;0>>1,hu=H[Eu];if(0>>1;Eur(Su,lu))wur(xu,Su)?(H[Eu]=xu,H[wu]=lu,Eu=wu):(H[Eu]=Su,H[Z]=lu,Eu=Z);else if(wur(xu,lu))H[Eu]=xu,H[wu]=lu,Eu=wu;else break u}}return iu}function r(H,iu){var lu=H.sortIndex-iu.sortIndex;return lu!==0?lu:H.id-iu.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var o=[],l=[],c=1,E=null,d=3,f=!1,p=!1,h=!1,g=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(H){for(var iu=t(l);iu!==null;){if(iu.callback===null)n(l);else if(iu.startTime<=H)n(l),iu.sortIndex=iu.expirationTime,u(o,iu);else break;iu=t(l)}}function F(H){if(h=!1,B(H),!p)if(t(o)!==null)p=!0,au(w);else{var iu=t(l);iu!==null&&nu(F,iu.startTime-H)}}function w(H,iu){p=!1,h&&(h=!1,A(k),k=-1),f=!0;var lu=d;try{for(B(iu),E=t(o);E!==null&&(!(E.expirationTime>iu)||H&&!uu());){var Eu=E.callback;if(typeof Eu=="function"){E.callback=null,d=E.priorityLevel;var hu=Eu(E.expirationTime<=iu);iu=e.unstable_now(),typeof hu=="function"?E.callback=hu:E===t(o)&&n(o),B(iu)}else n(o);E=t(o)}if(E!==null)var fu=!0;else{var Z=t(l);Z!==null&&nu(F,Z.startTime-iu),fu=!1}return fu}finally{E=null,d=lu,f=!1}}var v=!1,C=null,k=-1,j=5,N=-1;function uu(){return!(e.unstable_now()-NH||125Eu?(H.sortIndex=lu,u(l,H),t(o)===null&&H===t(l)&&(h?(A(k),k=-1):h=!0,nu(F,lu-Eu))):(H.sortIndex=hu,u(o,H),p||f||(p=!0,au(w))),H},e.unstable_shouldYield=uu,e.unstable_wrapCallback=function(H){var iu=d;return function(){var lu=d;d=iu;try{return H.apply(this,arguments)}finally{d=lu}}}})(IF);OF.exports=IF;var OT=OF.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var NF=M,Ze=OT;function Cu(e){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cf=Object.prototype.hasOwnProperty,IT=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Nm={},Rm={};function NT(e){return Cf.call(Rm,e)?!0:Cf.call(Nm,e)?!1:IT.test(e)?Rm[e]=!0:(Nm[e]=!0,!1)}function RT(e,u,t,n){if(t!==null&&t.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return n?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zT(e,u,t,n){if(u===null||typeof u>"u"||RT(e,u,t,n))return!0;if(n)return!1;if(t!==null)switch(t.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function Fe(e,u,t,n,r,i,a){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=n,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=e,this.type=u,this.sanitizeURL=i,this.removeEmptyString=a}var V0={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){V0[e]=new Fe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var u=e[0];V0[u]=new Fe(u,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){V0[e]=new Fe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){V0[e]=new Fe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){V0[e]=new Fe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){V0[e]=new Fe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){V0[e]=new Fe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){V0[e]=new Fe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){V0[e]=new Fe(e,5,!1,e.toLowerCase(),null,!1,!1)});var fh=/[\-:]([a-z])/g;function ph(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var u=e.replace(fh,ph);V0[u]=new Fe(u,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var u=e.replace(fh,ph);V0[u]=new Fe(u,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var u=e.replace(fh,ph);V0[u]=new Fe(u,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){V0[e]=new Fe(e,1,!1,e.toLowerCase(),null,!1,!1)});V0.xlinkHref=new Fe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){V0[e]=new Fe(e,1,!1,e.toLowerCase(),null,!0,!0)});function hh(e,u,t,n){var r=V0.hasOwnProperty(u)?V0[u]:null;(r!==null?r.type!==0:n||!(2s||r[a]!==i[s]){var o=` +`+r[a].replace(" at new "," at ");return e.displayName&&o.includes("")&&(o=o.replace("",e.displayName)),o}while(1<=a&&0<=s);break}}}finally{Nd=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?y3(e):""}function jT(e){switch(e.tag){case 5:return y3(e.type);case 16:return y3("Lazy");case 13:return y3("Suspense");case 19:return y3("SuspenseList");case 0:case 2:case 15:return e=Rd(e.type,!1),e;case 11:return e=Rd(e.type.render,!1),e;case 1:return e=Rd(e.type,!0),e;default:return""}}function Bf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case vs:return"Fragment";case Ds:return"Portal";case mf:return"Profiler";case Ch:return"StrictMode";case Af:return"Suspense";case gf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case jF:return(e.displayName||"Context")+".Consumer";case zF:return(e._context.displayName||"Context")+".Provider";case mh:var u=e.render;return e=e.displayName,e||(e=u.displayName||u.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ah:return u=e.displayName||null,u!==null?u:Bf(e.type)||"Memo";case Or:u=e._payload,e=e._init;try{return Bf(e(u))}catch{}}return null}function MT(e){var u=e.type;switch(e.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=u.render,e=e.displayName||e.name||"",u.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Bf(u);case 8:return u===Ch?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function Bi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function LF(e){var u=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function LT(e){var u=LF(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,u),n=""+e[u];if(!e.hasOwnProperty(u)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,i=t.set;return Object.defineProperty(e,u,{configurable:!0,get:function(){return r.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,u,{enumerable:t.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[u]}}}}function CE(e){e._valueTracker||(e._valueTracker=LT(e))}function UF(e){if(!e)return!1;var u=e._valueTracker;if(!u)return!0;var t=u.getValue(),n="";return e&&(n=LF(e)?e.checked?"true":"false":e.value),e=n,e!==t?(u.setValue(e),!0):!1}function S9(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function yf(e,u){var t=u.checked;return m0({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function jm(e,u){var t=u.defaultValue==null?"":u.defaultValue,n=u.checked!=null?u.checked:u.defaultChecked;t=Bi(u.value!=null?u.value:t),e._wrapperState={initialChecked:n,initialValue:t,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function $F(e,u){u=u.checked,u!=null&&hh(e,"checked",u,!1)}function Ff(e,u){$F(e,u);var t=Bi(u.value),n=u.type;if(t!=null)n==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}u.hasOwnProperty("value")?Df(e,u.type,t):u.hasOwnProperty("defaultValue")&&Df(e,u.type,Bi(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(e.defaultChecked=!!u.defaultChecked)}function Mm(e,u,t){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var n=u.type;if(!(n!=="submit"&&n!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+e._wrapperState.initialValue,t||u===e.value||(e.value=u),e.defaultValue=u}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function Df(e,u,t){(u!=="number"||S9(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var F3=Array.isArray;function qs(e,u,t,n){if(e=e.options,u){u={};for(var r=0;r"+u.valueOf().toString()+"",u=mE.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;u.firstChild;)e.appendChild(u.firstChild)}});function nl(e,u){if(u){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=u;return}}e.textContent=u}var M3={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},UT=["Webkit","ms","Moz","O"];Object.keys(M3).forEach(function(e){UT.forEach(function(u){u=u+e.charAt(0).toUpperCase()+e.substring(1),M3[u]=M3[e]})});function GF(e,u,t){return u==null||typeof u=="boolean"||u===""?"":t||typeof u!="number"||u===0||M3.hasOwnProperty(e)&&M3[e]?(""+u).trim():u+"px"}function QF(e,u){e=e.style;for(var t in u)if(u.hasOwnProperty(t)){var n=t.indexOf("--")===0,r=GF(t,u[t],n);t==="float"&&(t="cssFloat"),n?e.setProperty(t,r):e[t]=r}}var $T=m0({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wf(e,u){if(u){if($T[e]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(Cu(137,e));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(Cu(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(Cu(61))}if(u.style!=null&&typeof u.style!="object")throw Error(Cu(62))}}function xf(e,u){if(e.indexOf("-")===-1)return typeof u.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kf=null;function gh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _f=null,Hs=null,Gs=null;function $m(e){if(e=Tc(e)){if(typeof _f!="function")throw Error(Cu(280));var u=e.stateNode;u&&(u=X2(u),_f(e.stateNode,e.type,u))}}function KF(e){Hs?Gs?Gs.push(e):Gs=[e]:Hs=e}function VF(){if(Hs){var e=Hs,u=Gs;if(Gs=Hs=null,$m(e),u)for(e=0;e>>=0,e===0?32:31-(XT(e)/uO|0)|0}var AE=64,gE=4194304;function D3(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function I9(e,u){var t=e.pendingLanes;if(t===0)return 0;var n=0,r=e.suspendedLanes,i=e.pingedLanes,a=t&268435455;if(a!==0){var s=a&~r;s!==0?n=D3(s):(i&=a,i!==0&&(n=D3(i)))}else a=t&~r,a!==0?n=D3(a):i!==0&&(n=D3(i));if(n===0)return 0;if(u!==0&&u!==n&&!(u&r)&&(r=n&-n,i=u&-u,r>=i||r===16&&(i&4194240)!==0))return u;if(n&4&&(n|=t&16),u=e.entangledLanes,u!==0)for(e=e.entanglements,u&=n;0t;t++)u.push(e);return u}function Sc(e,u,t){e.pendingLanes|=u,u!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,u=31-Qt(u),e[u]=t}function rO(e,u){var t=e.pendingLanes&~u;e.pendingLanes=u,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=u,e.mutableReadLanes&=u,e.entangledLanes&=u,u=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=U3),Zm=String.fromCharCode(32),Ym=!1;function hD(e,u){switch(e){case"keyup":return TO.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CD(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bs=!1;function IO(e,u){switch(e){case"compositionend":return CD(u);case"keypress":return u.which!==32?null:(Ym=!0,Zm);case"textInput":return e=u.data,e===Zm&&Ym?null:e;default:return null}}function NO(e,u){if(bs)return e==="compositionend"||!xh&&hD(e,u)?(e=fD(),u9=vh=si=null,bs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:t,offset:u-e};e=n}u:{for(;t;){if(t.nextSibling){t=t.nextSibling;break u}t=t.parentNode}t=void 0}t=t7(t)}}function BD(e,u){return e&&u?e===u?!0:e&&e.nodeType===3?!1:u&&u.nodeType===3?BD(e,u.parentNode):"contains"in e?e.contains(u):e.compareDocumentPosition?!!(e.compareDocumentPosition(u)&16):!1:!1}function yD(){for(var e=window,u=S9();u instanceof e.HTMLIFrameElement;){try{var t=typeof u.contentWindow.location.href=="string"}catch{t=!1}if(t)e=u.contentWindow;else break;u=S9(e.document)}return u}function kh(e){var u=e&&e.nodeName&&e.nodeName.toLowerCase();return u&&(u==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||u==="textarea"||e.contentEditable==="true")}function qO(e){var u=yD(),t=e.focusedElem,n=e.selectionRange;if(u!==t&&t&&t.ownerDocument&&BD(t.ownerDocument.documentElement,t)){if(n!==null&&kh(t)){if(u=n.start,e=n.end,e===void 0&&(e=u),"selectionStart"in t)t.selectionStart=u,t.selectionEnd=Math.min(e,t.value.length);else if(e=(u=t.ownerDocument||document)&&u.defaultView||window,e.getSelection){e=e.getSelection();var r=t.textContent.length,i=Math.min(n.start,r);n=n.end===void 0?i:Math.min(n.end,r),!e.extend&&i>n&&(r=n,n=i,i=r),r=n7(t,i);var a=n7(t,n);r&&a&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(u=u.createRange(),u.setStart(r.node,r.offset),e.removeAllRanges(),i>n?(e.addRange(u),e.extend(a.node,a.offset)):(u.setEnd(a.node,a.offset),e.addRange(u)))}}for(u=[],e=t;e=e.parentNode;)e.nodeType===1&&u.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,ws=null,Nf=null,W3=null,Rf=!1;function r7(e,u,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Rf||ws==null||ws!==S9(n)||(n=ws,"selectionStart"in n&&kh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),W3&&ll(W3,n)||(W3=n,n=z9(Nf,"onSelect"),0_s||(e.current=$f[_s],$f[_s]=null,_s--)}function i0(e,u){_s++,$f[_s]=e.current,e.current=u}var yi={},ce=ki(yi),Oe=ki(!1),za=yi;function to(e,u){var t=e.type.contextTypes;if(!t)return yi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===u)return n.__reactInternalMemoizedMaskedChildContext;var r={},i;for(i in t)r[i]=u[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=r),r}function Ie(e){return e=e.childContextTypes,e!=null}function M9(){o0(Oe),o0(ce)}function E7(e,u,t){if(ce.current!==yi)throw Error(Cu(168));i0(ce,u),i0(Oe,t)}function SD(e,u,t){var n=e.stateNode;if(u=u.childContextTypes,typeof n.getChildContext!="function")return t;n=n.getChildContext();for(var r in n)if(!(r in u))throw Error(Cu(108,MT(e)||"Unknown",r));return m0({},t,n)}function L9(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yi,za=ce.current,i0(ce,e),i0(Oe,Oe.current),!0}function d7(e,u,t){var n=e.stateNode;if(!n)throw Error(Cu(169));t?(e=SD(e,u,za),n.__reactInternalMemoizedMergedChildContext=e,o0(Oe),o0(ce),i0(ce,e)):o0(Oe),i0(Oe,t)}var zn=null,u1=!1,Jd=!1;function PD(e){zn===null?zn=[e]:zn.push(e)}function tI(e){u1=!0,PD(e)}function _i(){if(!Jd&&zn!==null){Jd=!0;var e=0,u=e0;try{var t=zn;for(e0=1;e>=a,r-=a,tr=1<<32-Qt(u)+r|t<k?(j=C,C=null):j=C.sibling;var N=d(A,C,B[k],F);if(N===null){C===null&&(C=j);break}e&&C&&N.alternate===null&&u(A,C),m=i(N,m,k),v===null?w=N:v.sibling=N,v=N,C=j}if(k===B.length)return t(A,C),l0&&Mi(A,k),w;if(C===null){for(;kk?(j=C,C=null):j=C.sibling;var uu=d(A,C,N.value,F);if(uu===null){C===null&&(C=j);break}e&&C&&uu.alternate===null&&u(A,C),m=i(uu,m,k),v===null?w=uu:v.sibling=uu,v=uu,C=j}if(N.done)return t(A,C),l0&&Mi(A,k),w;if(C===null){for(;!N.done;k++,N=B.next())N=E(A,N.value,F),N!==null&&(m=i(N,m,k),v===null?w=N:v.sibling=N,v=N);return l0&&Mi(A,k),w}for(C=n(A,C);!N.done;k++,N=B.next())N=f(C,A,k,N.value,F),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?k:N.key),m=i(N,m,k),v===null?w=N:v.sibling=N,v=N);return e&&C.forEach(function(ou){return u(A,ou)}),l0&&Mi(A,k),w}function g(A,m,B,F){if(typeof B=="object"&&B!==null&&B.type===vs&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case hE:u:{for(var w=B.key,v=m;v!==null;){if(v.key===w){if(w=B.type,w===vs){if(v.tag===7){t(A,v.sibling),m=r(v,B.props.children),m.return=A,A=m;break u}}else if(v.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Or&&g7(w)===v.type){t(A,v.sibling),m=r(v,B.props),m.ref=c3(A,v,B),m.return=A,A=m;break u}t(A,v);break}else u(A,v);v=v.sibling}B.type===vs?(m=Sa(B.props.children,A.mode,F,B.key),m.return=A,A=m):(F=o9(B.type,B.key,B.props,null,A.mode,F),F.ref=c3(A,m,B),F.return=A,A=F)}return a(A);case Ds:u:{for(v=B.key;m!==null;){if(m.key===v)if(m.tag===4&&m.stateNode.containerInfo===B.containerInfo&&m.stateNode.implementation===B.implementation){t(A,m.sibling),m=r(m,B.children||[]),m.return=A,A=m;break u}else{t(A,m);break}else u(A,m);m=m.sibling}m=r6(B,A.mode,F),m.return=A,A=m}return a(A);case Or:return v=B._init,g(A,m,v(B._payload),F)}if(F3(B))return p(A,m,B,F);if(i3(B))return h(A,m,B,F);wE(A,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,m!==null&&m.tag===6?(t(A,m.sibling),m=r(m,B),m.return=A,A=m):(t(A,m),m=n6(B,A.mode,F),m.return=A,A=m),a(A)):t(A,m)}return g}var ro=MD(!0),LD=MD(!1),Oc={},wn=ki(Oc),fl=ki(Oc),pl=ki(Oc);function Ji(e){if(e===Oc)throw Error(Cu(174));return e}function zh(e,u){switch(i0(pl,u),i0(fl,e),i0(wn,Oc),e=u.nodeType,e){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:bf(null,"");break;default:e=e===8?u.parentNode:u,u=e.namespaceURI||null,e=e.tagName,u=bf(u,e)}o0(wn),i0(wn,u)}function io(){o0(wn),o0(fl),o0(pl)}function UD(e){Ji(pl.current);var u=Ji(wn.current),t=bf(u,e.type);u!==t&&(i0(fl,e),i0(wn,t))}function jh(e){fl.current===e&&(o0(wn),o0(fl))}var E0=ki(0);function G9(e){for(var u=e;u!==null;){if(u.tag===13){var t=u.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break;for(;u.sibling===null;){if(u.return===null||u.return===e)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Zd=[];function Mh(){for(var e=0;et?t:4,e(!0);var n=Yd.transition;Yd.transition={};try{e(!1),u()}finally{e0=t,Yd.transition=n}}function nv(){return wt().memoizedState}function aI(e,u,t){var n=Ci(e);if(t={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null},rv(e))iv(u,t);else if(t=ND(e,u,t,n),t!==null){var r=Ae();Kt(t,e,n,r),av(t,u,n)}}function sI(e,u,t){var n=Ci(e),r={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null};if(rv(e))iv(u,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=u.lastRenderedReducer,i!==null))try{var a=u.lastRenderedState,s=i(a,t);if(r.hasEagerState=!0,r.eagerState=s,Vt(s,a)){var o=u.interleaved;o===null?(r.next=r,Nh(u)):(r.next=o.next,o.next=r),u.interleaved=r;return}}catch{}finally{}t=ND(e,u,r,n),t!==null&&(r=Ae(),Kt(t,e,n,r),av(t,u,n))}}function rv(e){var u=e.alternate;return e===C0||u!==null&&u===C0}function iv(e,u){q3=Q9=!0;var t=e.pending;t===null?u.next=u:(u.next=t.next,t.next=u),e.pending=u}function av(e,u,t){if(t&4194240){var n=u.lanes;n&=e.pendingLanes,t|=n,u.lanes=t,yh(e,t)}}var K9={readContext:bt,useCallback:Y0,useContext:Y0,useEffect:Y0,useImperativeHandle:Y0,useInsertionEffect:Y0,useLayoutEffect:Y0,useMemo:Y0,useReducer:Y0,useRef:Y0,useState:Y0,useDebugValue:Y0,useDeferredValue:Y0,useTransition:Y0,useMutableSource:Y0,useSyncExternalStore:Y0,useId:Y0,unstable_isNewReconciler:!1},oI={readContext:bt,useCallback:function(e,u){return an().memoizedState=[e,u===void 0?null:u],e},useContext:bt,useEffect:y7,useImperativeHandle:function(e,u,t){return t=t!=null?t.concat([e]):null,r9(4194308,4,YD.bind(null,u,e),t)},useLayoutEffect:function(e,u){return r9(4194308,4,e,u)},useInsertionEffect:function(e,u){return r9(4,2,e,u)},useMemo:function(e,u){var t=an();return u=u===void 0?null:u,e=e(),t.memoizedState=[e,u],e},useReducer:function(e,u,t){var n=an();return u=t!==void 0?t(u):u,n.memoizedState=n.baseState=u,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=aI.bind(null,C0,e),[n.memoizedState,e]},useRef:function(e){var u=an();return e={current:e},u.memoizedState=e},useState:B7,useDebugValue:qh,useDeferredValue:function(e){return an().memoizedState=e},useTransition:function(){var e=B7(!1),u=e[0];return e=iI.bind(null,e[1]),an().memoizedState=e,[u,e]},useMutableSource:function(){},useSyncExternalStore:function(e,u,t){var n=C0,r=an();if(l0){if(t===void 0)throw Error(Cu(407));t=t()}else{if(t=u(),U0===null)throw Error(Cu(349));Ma&30||qD(n,u,t)}r.memoizedState=t;var i={value:t,getSnapshot:u};return r.queue=i,y7(GD.bind(null,n,i,e),[e]),n.flags|=2048,ml(9,HD.bind(null,n,i,t,u),void 0,null),t},useId:function(){var e=an(),u=U0.identifierPrefix;if(l0){var t=nr,n=tr;t=(n&~(1<<32-Qt(n)-1)).toString(32)+t,u=":"+u+"R"+t,t=hl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(t,{is:n.is}):(e=a.createElement(t),t==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,t),e[yn]=u,e[dl]=n,hv(e,u,!1,!1),u.stateNode=e;u:{switch(a=xf(t,n),t){case"dialog":a0("cancel",e),a0("close",e),r=n;break;case"iframe":case"object":case"embed":a0("load",e),r=n;break;case"video":case"audio":for(r=0;rso&&(u.flags|=128,n=!0,E3(i,!1),u.lanes=4194304)}else{if(!n)if(e=G9(a),e!==null){if(u.flags|=128,n=!0,t=e.updateQueue,t!==null&&(u.updateQueue=t,u.flags|=4),E3(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!l0)return X0(u),null}else 2*y0()-i.renderingStartTime>so&&t!==1073741824&&(u.flags|=128,n=!0,E3(i,!1),u.lanes=4194304);i.isBackwards?(a.sibling=u.child,u.child=a):(t=i.last,t!==null?t.sibling=a:u.child=a,i.last=a)}return i.tail!==null?(u=i.tail,i.rendering=u,i.tail=u.sibling,i.renderingStartTime=y0(),u.sibling=null,t=E0.current,i0(E0,n?t&1|2:t&1),u):(X0(u),null);case 22:case 23:return Jh(),n=u.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(u.flags|=8192),n&&u.mode&1?Ge&1073741824&&(X0(u),u.subtreeFlags&6&&(u.flags|=8192)):X0(u),null;case 24:return null;case 25:return null}throw Error(Cu(156,u.tag))}function CI(e,u){switch(Sh(u),u.tag){case 1:return Ie(u.type)&&M9(),e=u.flags,e&65536?(u.flags=e&-65537|128,u):null;case 3:return io(),o0(Oe),o0(ce),Mh(),e=u.flags,e&65536&&!(e&128)?(u.flags=e&-65537|128,u):null;case 5:return jh(u),null;case 13:if(o0(E0),e=u.memoizedState,e!==null&&e.dehydrated!==null){if(u.alternate===null)throw Error(Cu(340));no()}return e=u.flags,e&65536?(u.flags=e&-65537|128,u):null;case 19:return o0(E0),null;case 4:return io(),null;case 10:return Ih(u.type._context),null;case 22:case 23:return Jh(),null;case 24:return null;default:return null}}var kE=!1,ie=!1,mI=typeof WeakSet=="function"?WeakSet:Set,vu=null;function Os(e,u){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){g0(e,u,n)}else t.current=null}function up(e,u,t){try{t()}catch(n){g0(e,u,n)}}var S7=!1;function AI(e,u){if(zf=N9,e=yD(),kh(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else u:{t=(t=e.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{t.nodeType,i.nodeType}catch{t=null;break u}var a=0,s=-1,o=-1,l=0,c=0,E=e,d=null;e:for(;;){for(var f;E!==t||r!==0&&E.nodeType!==3||(s=a+r),E!==i||n!==0&&E.nodeType!==3||(o=a+n),E.nodeType===3&&(a+=E.nodeValue.length),(f=E.firstChild)!==null;)d=E,E=f;for(;;){if(E===e)break e;if(d===t&&++l===r&&(s=a),d===i&&++c===n&&(o=a),(f=E.nextSibling)!==null)break;E=d,d=E.parentNode}E=f}t=s===-1||o===-1?null:{start:s,end:o}}else t=null}t=t||{start:0,end:0}}else t=null;for(jf={focusedElem:e,selectionRange:t},N9=!1,vu=u;vu!==null;)if(u=vu,e=u.child,(u.subtreeFlags&1028)!==0&&e!==null)e.return=u,vu=e;else for(;vu!==null;){u=vu;try{var p=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var h=p.memoizedProps,g=p.memoizedState,A=u.stateNode,m=A.getSnapshotBeforeUpdate(u.elementType===u.type?h:Nt(u.type,h),g);A.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var B=u.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Cu(163))}}catch(F){g0(u,u.return,F)}if(e=u.sibling,e!==null){e.return=u.return,vu=e;break}vu=u.return}return p=S7,S7=!1,p}function H3(e,u,t){var n=u.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do{if((r.tag&e)===e){var i=r.destroy;r.destroy=void 0,i!==void 0&&up(u,t,i)}r=r.next}while(r!==n)}}function n1(e,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var t=u=u.next;do{if((t.tag&e)===e){var n=t.create;t.destroy=n()}t=t.next}while(t!==u)}}function ep(e){var u=e.ref;if(u!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof u=="function"?u(e):u.current=e}}function Av(e){var u=e.alternate;u!==null&&(e.alternate=null,Av(u)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(u=e.stateNode,u!==null&&(delete u[yn],delete u[dl],delete u[Uf],delete u[uI],delete u[eI])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gv(e){return e.tag===5||e.tag===3||e.tag===4}function P7(e){u:for(;;){for(;e.sibling===null;){if(e.return===null||gv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue u;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tp(e,u,t){var n=e.tag;if(n===5||n===6)e=e.stateNode,u?t.nodeType===8?t.parentNode.insertBefore(e,u):t.insertBefore(e,u):(t.nodeType===8?(u=t.parentNode,u.insertBefore(e,t)):(u=t,u.appendChild(e)),t=t._reactRootContainer,t!=null||u.onclick!==null||(u.onclick=j9));else if(n!==4&&(e=e.child,e!==null))for(tp(e,u,t),e=e.sibling;e!==null;)tp(e,u,t),e=e.sibling}function np(e,u,t){var n=e.tag;if(n===5||n===6)e=e.stateNode,u?t.insertBefore(e,u):t.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(np(e,u,t),e=e.sibling;e!==null;)np(e,u,t),e=e.sibling}var q0=null,$t=!1;function wr(e,u,t){for(t=t.child;t!==null;)Bv(e,u,t),t=t.sibling}function Bv(e,u,t){if(bn&&typeof bn.onCommitFiberUnmount=="function")try{bn.onCommitFiberUnmount(V2,t)}catch{}switch(t.tag){case 5:ie||Os(t,u);case 6:var n=q0,r=$t;q0=null,wr(e,u,t),q0=n,$t=r,q0!==null&&($t?(e=q0,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):q0.removeChild(t.stateNode));break;case 18:q0!==null&&($t?(e=q0,t=t.stateNode,e.nodeType===8?Vd(e.parentNode,t):e.nodeType===1&&Vd(e,t),sl(e)):Vd(q0,t.stateNode));break;case 4:n=q0,r=$t,q0=t.stateNode.containerInfo,$t=!0,wr(e,u,t),q0=n,$t=r;break;case 0:case 11:case 14:case 15:if(!ie&&(n=t.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){r=n=n.next;do{var i=r,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&up(t,u,a),r=r.next}while(r!==n)}wr(e,u,t);break;case 1:if(!ie&&(Os(t,u),n=t.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(s){g0(t,u,s)}wr(e,u,t);break;case 21:wr(e,u,t);break;case 22:t.mode&1?(ie=(n=ie)||t.memoizedState!==null,wr(e,u,t),ie=n):wr(e,u,t);break;default:wr(e,u,t)}}function T7(e){var u=e.updateQueue;if(u!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new mI),u.forEach(function(n){var r=xI.bind(null,e,n);t.has(n)||(t.add(n),n.then(r,r))})}}function Tt(e,u){var t=u.deletions;if(t!==null)for(var n=0;nr&&(r=a),n&=~i}if(n=r,n=y0()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*BI(n/1960))-n,10e?16:e,oi===null)var n=!1;else{if(e=oi,oi=null,Z9=0,Vu&6)throw Error(Cu(331));var r=Vu;for(Vu|=4,vu=e.current;vu!==null;){var i=vu,a=i.child;if(vu.flags&16){var s=i.deletions;if(s!==null){for(var o=0;oy0()-Kh?_a(e,0):Qh|=t),Ne(e,u)}function kv(e,u){u===0&&(e.mode&1?(u=gE,gE<<=1,!(gE&130023424)&&(gE=4194304)):u=1);var t=Ae();e=dr(e,u),e!==null&&(Sc(e,u,t),Ne(e,t))}function wI(e){var u=e.memoizedState,t=0;u!==null&&(t=u.retryLane),kv(e,t)}function xI(e,u){var t=0;switch(e.tag){case 13:var n=e.stateNode,r=e.memoizedState;r!==null&&(t=r.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Cu(314))}n!==null&&n.delete(u),kv(e,t)}var _v;_v=function(e,u,t){if(e!==null)if(e.memoizedProps!==u.pendingProps||Oe.current)Te=!0;else{if(!(e.lanes&t)&&!(u.flags&128))return Te=!1,pI(e,u,t);Te=!!(e.flags&131072)}else Te=!1,l0&&u.flags&1048576&&TD(u,$9,u.index);switch(u.lanes=0,u.tag){case 2:var n=u.type;i9(e,u),e=u.pendingProps;var r=to(u,ce.current);Ks(u,t),r=Uh(null,u,n,e,r,t);var i=$h();return u.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,Ie(n)?(i=!0,L9(u)):i=!1,u.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Rh(u),r.updater=e1,u.stateNode=r,r._reactInternals=u,Qf(u,n,e,t),u=Jf(null,u,n,!0,i,t)):(u.tag=0,l0&&i&&_h(u),Ee(null,u,r,t),u=u.child),u;case 16:n=u.elementType;u:{switch(i9(e,u),e=u.pendingProps,r=n._init,n=r(n._payload),u.type=n,r=u.tag=_I(n),e=Nt(n,e),r){case 0:u=Vf(null,u,n,e,t);break u;case 1:u=x7(null,u,n,e,t);break u;case 11:u=b7(null,u,n,e,t);break u;case 14:u=w7(null,u,n,Nt(n.type,e),t);break u}throw Error(Cu(306,n,""))}return u;case 0:return n=u.type,r=u.pendingProps,r=u.elementType===n?r:Nt(n,r),Vf(e,u,n,r,t);case 1:return n=u.type,r=u.pendingProps,r=u.elementType===n?r:Nt(n,r),x7(e,u,n,r,t);case 3:u:{if(dv(u),e===null)throw Error(Cu(387));n=u.pendingProps,i=u.memoizedState,r=i.element,RD(e,u),H9(u,n,null,t);var a=u.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},u.updateQueue.baseState=i,u.memoizedState=i,u.flags&256){r=ao(Error(Cu(423)),u),u=k7(e,u,n,t,r);break u}else if(n!==r){r=ao(Error(Cu(424)),u),u=k7(e,u,n,t,r);break u}else for(Qe=fi(u.stateNode.containerInfo.firstChild),Je=u,l0=!0,Wt=null,t=LD(u,null,n,t),u.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(no(),n===r){u=fr(e,u,t);break u}Ee(e,u,n,t)}u=u.child}return u;case 5:return UD(u),e===null&&qf(u),n=u.type,r=u.pendingProps,i=e!==null?e.memoizedProps:null,a=r.children,Mf(n,r)?a=null:i!==null&&Mf(n,i)&&(u.flags|=32),Ev(e,u),Ee(e,u,a,t),u.child;case 6:return e===null&&qf(u),null;case 13:return fv(e,u,t);case 4:return zh(u,u.stateNode.containerInfo),n=u.pendingProps,e===null?u.child=ro(u,null,n,t):Ee(e,u,n,t),u.child;case 11:return n=u.type,r=u.pendingProps,r=u.elementType===n?r:Nt(n,r),b7(e,u,n,r,t);case 7:return Ee(e,u,u.pendingProps,t),u.child;case 8:return Ee(e,u,u.pendingProps.children,t),u.child;case 12:return Ee(e,u,u.pendingProps.children,t),u.child;case 10:u:{if(n=u.type._context,r=u.pendingProps,i=u.memoizedProps,a=r.value,i0(W9,n._currentValue),n._currentValue=a,i!==null)if(Vt(i.value,a)){if(i.children===r.children&&!Oe.current){u=fr(e,u,t);break u}}else for(i=u.child,i!==null&&(i.return=u);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var o=s.firstContext;o!==null;){if(o.context===n){if(i.tag===1){o=ar(-1,t&-t),o.tag=2;var l=i.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?o.next=o:(o.next=c.next,c.next=o),l.pending=o}}i.lanes|=t,o=i.alternate,o!==null&&(o.lanes|=t),Hf(i.return,t,u),s.lanes|=t;break}o=o.next}}else if(i.tag===10)a=i.type===u.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(Cu(341));a.lanes|=t,s=a.alternate,s!==null&&(s.lanes|=t),Hf(a,t,u),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===u){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ee(e,u,r.children,t),u=u.child}return u;case 9:return r=u.type,n=u.pendingProps.children,Ks(u,t),r=bt(r),n=n(r),u.flags|=1,Ee(e,u,n,t),u.child;case 14:return n=u.type,r=Nt(n,u.pendingProps),r=Nt(n.type,r),w7(e,u,n,r,t);case 15:return lv(e,u,u.type,u.pendingProps,t);case 17:return n=u.type,r=u.pendingProps,r=u.elementType===n?r:Nt(n,r),i9(e,u),u.tag=1,Ie(n)?(e=!0,L9(u)):e=!1,Ks(u,t),jD(u,n,r),Qf(u,n,r,t),Jf(null,u,n,!0,e,t);case 19:return pv(e,u,t);case 22:return cv(e,u,t)}throw Error(Cu(156,u.tag))};function Sv(e,u){return tD(e,u)}function kI(e,u,t,n){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,u,t,n){return new kI(e,u,t,n)}function Yh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _I(e){if(typeof e=="function")return Yh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mh)return 11;if(e===Ah)return 14}return 2}function mi(e,u){var t=e.alternate;return t===null?(t=yt(e.tag,u,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=u,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,u=e.dependencies,t.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function o9(e,u,t,n,r,i){var a=2;if(n=e,typeof e=="function")Yh(e)&&(a=1);else if(typeof e=="string")a=5;else u:switch(e){case vs:return Sa(t.children,r,i,u);case Ch:a=8,r|=8;break;case mf:return e=yt(12,t,u,r|2),e.elementType=mf,e.lanes=i,e;case Af:return e=yt(13,t,u,r),e.elementType=Af,e.lanes=i,e;case gf:return e=yt(19,t,u,r),e.elementType=gf,e.lanes=i,e;case MF:return i1(t,r,i,u);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zF:a=10;break u;case jF:a=9;break u;case mh:a=11;break u;case Ah:a=14;break u;case Or:a=16,n=null;break u}throw Error(Cu(130,e==null?e:typeof e,""))}return u=yt(a,t,u,r),u.elementType=e,u.type=n,u.lanes=i,u}function Sa(e,u,t,n){return e=yt(7,e,n,u),e.lanes=t,e}function i1(e,u,t,n){return e=yt(22,e,n,u),e.elementType=MF,e.lanes=t,e.stateNode={isHidden:!1},e}function n6(e,u,t){return e=yt(6,e,null,u),e.lanes=t,e}function r6(e,u,t){return u=yt(4,e.children!==null?e.children:[],e.key,u),u.lanes=t,u.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},u}function SI(e,u,t,n,r){this.tag=u,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jd(0),this.expirationTimes=jd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jd(0),this.identifierPrefix=n,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Xh(e,u,t,n,r,i,a,s,o){return e=new SI(e,u,t,s,o),u===1?(u=1,i===!0&&(u|=8)):u=0,i=yt(3,null,null,u),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rh(i),e}function PI(e,u,t){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Iv)}catch(e){console.error(e)}}Iv(),TF.exports=Ye;var Nv=TF.exports,Rv={exports:{}},zv={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var oo=M;function RI(e,u){return e===u&&(e!==0||1/e===1/u)||e!==e&&u!==u}var zI=typeof Object.is=="function"?Object.is:RI,jI=oo.useState,MI=oo.useEffect,LI=oo.useLayoutEffect,UI=oo.useDebugValue;function $I(e,u){var t=u(),n=jI({inst:{value:t,getSnapshot:u}}),r=n[0].inst,i=n[1];return LI(function(){r.value=t,r.getSnapshot=u,i6(r)&&i({inst:r})},[e,t,u]),MI(function(){return i6(r)&&i({inst:r}),e(function(){i6(r)&&i({inst:r})})},[e]),UI(t),t}function i6(e){var u=e.getSnapshot;e=e.value;try{var t=u();return!zI(e,t)}catch{return!0}}function WI(e,u){return u()}var qI=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?WI:$I;zv.useSyncExternalStore=oo.useSyncExternalStore!==void 0?oo.useSyncExternalStore:qI;Rv.exports=zv;var nC=Rv.exports;const HI=nC.useSyncExternalStore,L7=M.createContext(void 0),jv=M.createContext(!1);function Mv(e,u){return e||(u&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=L7),window.ReactQueryClientContext):L7)}const rC=({context:e}={})=>{const u=M.useContext(Mv(e,M.useContext(jv)));if(!u)throw new Error("No QueryClient set, use QueryClientProvider to set one");return u},GI=({client:e,children:u,context:t,contextSharing:n=!1})=>{M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const r=Mv(t,n);return M.createElement(jv.Provider,{value:!t&&n},M.createElement(r.Provider,{value:e},u))},Lv=M.createContext(!1),QI=()=>M.useContext(Lv);Lv.Provider;function KI(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const VI=M.createContext(KI()),JI=()=>M.useContext(VI);function ZI(e,u){return typeof e=="function"?e(...u):!!e}function YI(e,u,t){const n=bF(e,u,t),r=rC({context:n.context}),[i]=M.useState(()=>new TT(r,n));M.useEffect(()=>{i.setOptions(n)},[i,n]);const a=HI(M.useCallback(o=>i.subscribe(B0.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=M.useCallback((o,l)=>{i.mutate(o,l).catch(XI)},[i]);if(a.error&&ZI(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:s,mutateAsync:a.mutate}}function XI(){}function uN(e){return{mutationKey:e.options.mutationKey,state:e.state}}function eN(e){return{state:e.state,queryKey:e.queryKey,queryHash:e.queryHash}}function tN(e){return e.state.isPaused}function nN(e){return e.state.status==="success"}function rN(e,u={}){const t=[],n=[];if(u.dehydrateMutations!==!1){const r=u.shouldDehydrateMutation||tN;e.getMutationCache().getAll().forEach(i=>{r(i)&&t.push(uN(i))})}if(u.dehydrateQueries!==!1){const r=u.shouldDehydrateQuery||nN;e.getQueryCache().getAll().forEach(i=>{r(i)&&n.push(eN(i))})}return{mutations:t,queries:n}}function iN(e,u,t){if(typeof u!="object"||u===null)return;const n=e.getMutationCache(),r=e.getQueryCache(),i=u.mutations||[],a=u.queries||[];i.forEach(s=>{var o;n.build(e,{...t==null||(o=t.defaultOptions)==null?void 0:o.mutations,mutationKey:s.mutationKey},s.state)}),a.forEach(({queryKey:s,state:o,queryHash:l})=>{var c;const E=r.get(l);if(E){if(E.state.dataUpdatedAtt,s=i.buster!==n;a||s?u.removeClient():iN(e,i.clientState,r)}else u.removeClient()}catch{u.removeClient()}}async function $7({queryClient:e,persister:u,buster:t="",dehydrateOptions:n}){const r={buster:t,timestamp:Date.now(),clientState:rN(e,n)};await u.persistClient(r)}function oN(e){const u=e.queryClient.getQueryCache().subscribe(n=>{U7(n.type)&&$7(e)}),t=e.queryClient.getMutationCache().subscribe(n=>{U7(n.type)&&$7(e)});return()=>{u(),t()}}function lN(e){let u=!1,t;const n=()=>{u=!0,t==null||t()},r=sN(e).then(()=>{u||(t=oN(e))});return[n,r]}function iC(e,u={}){const{fees:t=e.fees,formatters:n=e.formatters,serializers:r=e.serializers}=u;return{...e,fees:t,formatters:n,serializers:r}}const cN="1.19.1",EN=e=>e,c1=e=>e,dN=()=>`viem@${cN}`;let Bu=class op extends Error{constructor(u,t={}){var i;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:dN()});const n=t.cause instanceof op?t.cause.details:(i=t.cause)!=null&&i.message?t.cause.message:t.details,r=t.cause instanceof op&&t.cause.docsPath||t.docsPath;this.message=[u||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...r?[`Docs: https://viem.sh${r}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` +`),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=r,this.metaMessages=t.metaMessages,this.shortMessage=u}walk(u){return Uv(this,u)}};function Uv(e,u){return u!=null&&u(e)?e:e&&typeof e=="object"&&"cause"in e?Uv(e.cause,u):u?null:e}class fN extends Bu{constructor({max:u,min:t,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${r*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${u?`(${t} to ${u})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class pN extends Bu{constructor(u){super(`Hex value "${u}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class hN extends Bu{constructor({givenSize:u,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${u} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}function xn(e,{strict:u=!0}={}){return!e||typeof e!="string"?!1:u?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function I0(e){return xn(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function Pa(e,{dir:u="left"}={}){let t=typeof e=="string"?e.replace("0x",""):e,n=0;for(let r=0;rt*2)throw new Wv({size:Math.ceil(n.length/2),targetSize:t,type:"hex"});return`0x${n[u==="right"?"padEnd":"padStart"](t*2,"0")}`}function CN(e,{dir:u,size:t=32}={}){if(t===null)return e;if(e.length>t)throw new Wv({size:e.length,targetSize:t,type:"bytes"});const n=new Uint8Array(t);for(let r=0;ru.toString(16).padStart(2,"0"));function Br(e,u={}){return typeof e=="number"||typeof e=="bigint"?Lu(e,u):typeof e=="string"?aC(e,u):typeof e=="boolean"?qv(e,u):gl(e,u)}function qv(e,u={}){const t=`0x${Number(e)}`;return typeof u.size=="number"?(Si(t,{size:u.size}),Io(t,{size:u.size})):t}function gl(e,u={}){let t="";for(let r=0;ri||r=Tn.zero&&e<=Tn.nine)return e-Tn.zero;if(e>=Tn.A&&e<=Tn.F)return e-(Tn.A-10);if(e>=Tn.a&&e<=Tn.f)return e-(Tn.a-10)}function sC(e,u={}){let t=e;u.size&&(Si(t,{size:u.size}),t=Io(t,{dir:"right",size:u.size}));let n=t.slice(2);n.length%2&&(n=`0${n}`);const r=n.length/2,i=new Uint8Array(r);for(let a=0,s=0;au)throw new hN({givenSize:I0(e),maxSize:u})}function Yn(e,u={}){const{signed:t}=u;u.size&&Si(e,{size:u.size});const n=BigInt(e);if(!t)return n;const r=(e.length-2)/2,i=(1n<({exclude:t,format:r=>{const i=u(r);if(t)for(const a of t)delete i[a];return{...i,...n(r)}},type:e})}const Hv={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function E1(e){const u={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?se(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?se(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Hv[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return u.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof u.v=="bigint"){if(u.v===0n||u.v===27n)return 0;if(u.v===1n||u.v===28n)return 1;if(u.v>=35n)return u.v%2n===0n?1:0}})(),u.type==="legacy"&&(delete u.accessList,delete u.maxFeePerGas,delete u.maxPriorityFeePerGas,delete u.yParity),u.type==="eip2930"&&(delete u.maxFeePerGas,delete u.maxPriorityFeePerGas),u}const DN=lC("transaction",E1);function cC(e){var t;const u=(t=e.transactions)==null?void 0:t.map(n=>typeof n=="string"?n:E1(n));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:u,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const vN=lC("block",cC);function Jt(e,{args:u,eventName:t}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...t?{args:u,eventName:t}:{}}}const bN={"0x0":"reverted","0x1":"success"};function Gv(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(u=>Jt(u)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?se(e.transactionIndex):null,status:e.status?bN[e.status]:null,type:e.type?Hv[e.type]||e.type:null}}const wN=lC("transactionReceipt",Gv),xN={block:vN({format(e){var t;return{transactions:(t=e.transactions)==null?void 0:t.map(n=>{if(typeof n=="string")return n;const r=E1(n);return r.typeHex==="0x7e"&&(r.isSystemTx=n.isSystemTx,r.mint=n.mint?Yn(n.mint):void 0,r.sourceHash=n.sourceHash,r.type="deposit"),r}),stateRoot:e.stateRoot}}}),transaction:DN({format(e){const u={};return e.type==="0x7e"&&(u.isSystemTx=e.isSystemTx,u.mint=e.mint?Yn(e.mint):void 0,u.sourceHash=e.sourceHash,u.type="deposit"),u}}),transactionReceipt:wN({format(e){return{l1GasPrice:e.l1GasPrice?Yn(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?Yn(e.l1GasUsed):null,l1Fee:e.l1Fee?Yn(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})},kN={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function d1(e){return{...e,gas:typeof e.gas<"u"?Lu(e.gas):void 0,gasPrice:typeof e.gasPrice<"u"?Lu(e.gasPrice):void 0,maxFeePerGas:typeof e.maxFeePerGas<"u"?Lu(e.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof e.maxPriorityFeePerGas<"u"?Lu(e.maxPriorityFeePerGas):void 0,nonce:typeof e.nonce<"u"?Lu(e.nonce):void 0,type:typeof e.type<"u"?kN[e.type]:void 0,value:typeof e.value<"u"?Lu(e.value):void 0}}class Bl extends Bu{constructor({address:u}){super(`Address "${u}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}class lp extends Bu{constructor({blockNumber:u,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...u&&n.blockCreated&&n.blockCreated>u?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${u}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}let _N=class extends Bu{constructor({chain:u,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${u.id} – ${u.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${u.id} – ${u.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}};class SN extends Bu{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class Qv extends Bu{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}const PN={gwei:9,wei:18},TN={ether:-9,wei:9},ON={ether:-18,gwei:-9};function u2(e,u){let t=e.toString();const n=t.startsWith("-");n&&(t=t.slice(1)),t=t.padStart(u,"0");let[r,i]=[t.slice(0,t.length-u),t.slice(t.length-u)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${r||"0"}${i?`.${i}`:""}`}function Re(e,u="wei"){return u2(e,TN[u])}class Ns extends Bu{constructor({cause:u,message:t}={}){var r;const n=(r=t==null?void 0:t.replace("execution reverted: ",""))==null?void 0:r.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(Ns,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Ns,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class e2 extends Bu{constructor({cause:u,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${Re(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(e2,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class cp extends Bu{constructor({cause:u,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${Re(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(cp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class Ep extends Bu{constructor({cause:u,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(Ep,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class dp extends Bu{constructor({cause:u,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`),{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(dp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class fp extends Bu{constructor({cause:u,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(fp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class pp extends Bu{constructor({cause:u}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` +`),{cause:u,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(pp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class hp extends Bu{constructor({cause:u,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(hp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Cp extends Bu{constructor({cause:u,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(Cp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class mp extends Bu{constructor({cause:u}){super("The transaction type is not supported for this chain.",{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(mp,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class t2 extends Bu{constructor({cause:u,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${Re(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Re(n)} gwei`:""}).`].join(` +`),{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(t2,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class f1 extends Bu{constructor({cause:u}){super(`An error occurred while executing: ${u==null?void 0:u.shortMessage}`,{cause:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}const IN=/^0x[a-fA-F0-9]{40}$/;function lo(e){return IN.test(e)}function pr(e){return typeof e[0]=="string"?EC(e):NN(e)}function NN(e){let u=0;for(const r of e)u+=r.length;const t=new Uint8Array(u);let n=0;for(const r of e)t.set(r,n),n+=r.length;return t}function EC(e){return`0x${e.reduce((u,t)=>u+t.replace("0x",""),"")}`}function RN(e,u){const t=e.exec(u);return t==null?void 0:t.groups}const q7=/^tuple(?(\[(\d*)\])*)$/;function Ap(e){let u=e.type;if(q7.test(e.type)&&"components"in e){u="(";const t=e.components.length;for(let r=0;r{var n;return((n=e[u.name])==null?void 0:n.call(e,t))??u(e,t)}}function Ya(e,{includeName:u=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new JN(e.type);return`${e.name}(${p1(e.inputs,{includeName:u})})`}function p1(e,{includeName:u=!1}={}){return e?e.map(t=>jN(t,{includeName:u})).join(u?", ":","):""}function jN(e,{includeName:u}){return e.type.startsWith("tuple")?`(${p1(e.components,{includeName:u})})${e.type.slice(5)}`:e.type+(u&&e.name?` ${e.name}`:"")}class MN extends Bu{constructor({docsPath:u}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +`),{docsPath:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class H7 extends Bu{constructor({docsPath:u}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` +`),{docsPath:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class dC extends Bu{constructor({data:u,params:t,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` +`),{metaMessages:[`Params: (${p1(t,{includeName:!0})})`,`Data: ${u} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u,this.params=t,this.size=n}}class h1 extends Bu{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class LN extends Bu{constructor({expectedLength:u,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${u}`,`Given length: ${t}`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class UN extends Bu{constructor({expectedSize:u,value:t}){super(`Size of bytes "${t}" (bytes${I0(t)}) does not match expected size (bytes${u}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class $N extends Bu{constructor({expectedLength:u,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${u}`,`Given length (values): ${t}`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class Kv extends Bu{constructor(u,{docsPath:t}){super([`Encoded error signature "${u}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`].join(` +`),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=u}}class WN extends Bu{constructor({docsPath:u}){super("Cannot extract event signature from empty topics.",{docsPath:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class qN extends Bu{constructor(u,{docsPath:t}){super([`Encoded event signature "${u}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${u}.`].join(` +`),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class G7 extends Bu{constructor(u,{docsPath:t}={}){super([`Event ${u?`"${u}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` +`),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class n2 extends Bu{constructor(u,{docsPath:t}={}){super([`Function ${u?`"${u}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class HN extends Bu{constructor(u,{docsPath:t}){super([`Function "${u}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class GN extends Bu{constructor({expectedSize:u,givenSize:t}){super(`Expected bytes${u}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class $a extends Bu{constructor({abiItem:u,data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for non-indexed event parameters.`].join(` +`),{metaMessages:[`Params: (${p1(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=u,this.data=t,this.params=n,this.size=r}}class No extends Bu{constructor({abiItem:u,param:t}){super([`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${Ya(u,{includeName:!0})}".`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=u}}class QN extends Bu{constructor(u,{docsPath:t}){super([`Type "${u}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class KN extends Bu{constructor(u,{docsPath:t}){super([`Type "${u}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class VN extends Bu{constructor(u){super([`Value "${u}" is not a valid array.`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class JN extends Bu{constructor(u){super([`"${u}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}class ZN extends Bu{constructor(u){super(`Filter type "${u}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}function YN(e){let u=!0,t="",n=0,r="",i=!1;for(let a=0;a{const u=(()=>typeof e=="string"?e:zN(e))();return YN(u)},XN=e=>Vv(e);function r2(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function fC(e,...u){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(u.length>0&&!u.includes(e.length))throw new Error(`Expected Uint8Array of length ${u}, not of length=${e.length}`)}function uR(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");r2(e.outputLen),r2(e.blockLen)}function co(e,u=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(u&&e.finished)throw new Error("Hash#digest() has already been called")}function Jv(e,u){fC(e);const t=u.outputLen;if(e.length>Q7&PE)}:{h:Number(e>>Q7&PE)|0,l:Number(e&PE)|0}}function tR(e,u=!1){let t=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let r=0;re<>>32-t,rR=(e,u,t)=>u<>>32-t,iR=(e,u,t)=>u<>>64-t,aR=(e,u,t)=>e<>>64-t,a6=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Zv=e=>e instanceof Uint8Array,sR=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),s6=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),nn=(e,u)=>e<<32-u|e>>>u,oR=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!oR)throw new Error("Non little-endian hardware is not supported");function lR(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function C1(e){if(typeof e=="string"&&(e=lR(e)),!Zv(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}function cR(...e){const u=new Uint8Array(e.reduce((n,r)=>n+r.length,0));let t=0;return e.forEach(n=>{if(!Zv(n))throw new Error("Uint8Array expected");u.set(n,t),t+=n.length}),u}let pC=class{clone(){return this._cloneInto()}};function Yv(e){const u=n=>e().update(C1(n)).digest(),t=e();return u.outputLen=t.outputLen,u.blockLen=t.blockLen,u.create=()=>e(),u}function ER(e=32){if(a6&&typeof a6.getRandomValues=="function")return a6.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const[Xv,ub,eb]=[[],[],[]],dR=BigInt(0),p3=BigInt(1),fR=BigInt(2),pR=BigInt(7),hR=BigInt(256),CR=BigInt(113);for(let e=0,u=p3,t=1,n=0;e<24;e++){[t,n]=[n,(2*t+3*n)%5],Xv.push(2*(5*n+t)),ub.push((e+1)*(e+2)/2%64);let r=dR;for(let i=0;i<7;i++)u=(u<>pR)*CR)%hR,u&fR&&(r^=p3<<(p3<t>32?iR(e,u,t):nR(e,u,t),V7=(e,u,t)=>t>32?aR(e,u,t):rR(e,u,t);function gR(e,u=24){const t=new Uint32Array(10);for(let n=24-u;n<24;n++){for(let a=0;a<10;a++)t[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){const s=(a+8)%10,o=(a+2)%10,l=t[o],c=t[o+1],E=K7(l,c,1)^t[s],d=V7(l,c,1)^t[s+1];for(let f=0;f<50;f+=10)e[a+f]^=E,e[a+f+1]^=d}let r=e[2],i=e[3];for(let a=0;a<24;a++){const s=ub[a],o=K7(r,i,s),l=V7(r,i,s),c=Xv[a];r=e[c],i=e[c+1],e[c]=o,e[c+1]=l}for(let a=0;a<50;a+=10){for(let s=0;s<10;s++)t[s]=e[a+s];for(let s=0;s<10;s++)e[a+s]^=~t[(s+2)%10]&t[(s+4)%10]}e[0]^=mR[n],e[1]^=AR[n]}t.fill(0)}class hC extends pC{constructor(u,t,n,r=!1,i=24){if(super(),this.blockLen=u,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,r2(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=sR(this.state)}keccak(){gR(this.state32,this.rounds),this.posOut=0,this.pos=0}update(u){co(this);const{blockLen:t,state:n}=this;u=C1(u);const r=u.length;for(let i=0;i=n&&this.keccak();const a=Math.min(n-this.posOut,i-r);u.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return u}xofInto(u){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(u)}xof(u){return r2(u),this.xofInto(new Uint8Array(u))}digestInto(u){if(Jv(u,this),this.finished)throw new Error("digest() was already called");return this.writeInto(u),this.destroy(),u}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(u){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:a}=this;return u||(u=new hC(t,n,r,a,i)),u.state32.set(this.state32),u.pos=this.pos,u.posOut=this.posOut,u.finished=this.finished,u.rounds=i,u.suffix=n,u.outputLen=r,u.enableXOF=a,u.destroyed=this.destroyed,u}}const BR=(e,u,t)=>Yv(()=>new hC(u,e,t)),tb=BR(1,136,256/8);function pe(e,u){const t=u||"hex",n=tb(xn(e,{strict:!1})?Fi(e):e);return t==="bytes"?n:Br(n)}const yR=e=>pe(Fi(e)),CC=e=>yR(XN(e));function b0(e,u,t,{strict:n}={}){return xn(e,{strict:!1})?DR(e,u,t,{strict:n}):FR(e,u,t,{strict:n})}function nb(e,u){if(typeof u=="number"&&u>0&&u>I0(e)-1)throw new $v({offset:u,position:"start",size:I0(e)})}function rb(e,u,t){if(typeof u=="number"&&typeof t=="number"&&I0(e)!==t-u)throw new $v({offset:t,position:"end",size:I0(e)})}function FR(e,u,t,{strict:n}={}){nb(e,u);const r=e.slice(u,t);return n&&rb(r,u,t),r}function DR(e,u,t,{strict:n}={}){nb(e,u);const r=`0x${e.replace("0x","").slice((u??0)*2,(t??e.length)*2)}`;return n&&rb(r,u,t),r}function Ic(e,u){if(e.length!==u.length)throw new $N({expectedLength:e.length,givenLength:u.length});const t=vR({params:e,values:u}),n=AC(t);return n.length===0?"0x":n}function vR({params:e,values:u}){const t=[];for(let n=0;n0?pr([s,a]):s}}if(r)return{dynamic:!0,encoded:a}}return{dynamic:!1,encoded:pr(i.map(({encoded:a})=>a))}}function xR(e,{param:u}){const[,t]=u.type.split("bytes"),n=I0(e);if(!t){let r=e;return n%32!==0&&(r=Ai(r,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:pr([Ai(Lu(n,{size:32})),r])}}if(n!==parseInt(t))throw new UN({expectedSize:parseInt(t),value:e});return{dynamic:!1,encoded:Ai(e,{dir:"right"})}}function kR(e){return{dynamic:!1,encoded:Ai(qv(e))}}function _R(e,{signed:u}){return{dynamic:!1,encoded:Lu(e,{size:32,signed:u})}}function SR(e){const u=aC(e),t=Math.ceil(I0(u)/32),n=[];for(let r=0;rr))}}function m1(e){const u=e.match(/^(.*)\[(\d+)?\]$/);return u?[u[2]?Number(u[2]):null,u[1]]:void 0}const TR=e=>pe(Fi(e)),gC=e=>b0(TR(Vv(e)),0,4);function Nc({abi:e,args:u=[],name:t}){const n=xn(t,{strict:!1}),r=e.filter(i=>n?i.type==="function"?gC(i)===t:i.type==="event"?CC(i)===t:!1:"name"in i&&i.name===t);if(r.length!==0){if(r.length===1)return r[0];for(const i of r){if(!("inputs"in i))continue;if(!u||u.length===0){if(!i.inputs||i.inputs.length===0)return i;continue}if(!i.inputs||i.inputs.length===0||i.inputs.length!==u.length)continue;if(u.every((s,o)=>{const l="inputs"in i&&i.inputs[o];return l?gp(s,l):!1}))return i}return r[0]}}function gp(e,u){const t=typeof e,n=u.type;switch(n){case"address":return lo(e);case"bool":return t==="boolean";case"function":return t==="string";case"string":return t==="string";default:return n==="tuple"&&"components"in u?Object.values(u.components).every((r,i)=>gp(Object.values(e)[i],r)):/^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(n)?t==="number"||t==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?t==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(e)&&e.every(r=>gp(r,{...u,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Rc({abi:e,eventName:u,args:t}){var s;let n=e[0];if(u&&(n=Nc({abi:e,args:t,name:u}),!n))throw new G7(u,{docsPath:"/docs/contract/encodeEventTopics"});if(n.type!=="event")throw new G7(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const r=Ya(n),i=CC(r);let a=[];if(t&&"inputs"in n){const o=(s=n.inputs)==null?void 0:s.filter(c=>"indexed"in c&&c.indexed),l=Array.isArray(t)?t:Object.values(t).length>0?(o==null?void 0:o.map(c=>t[c.name]))??[]:[];l.length>0&&(a=(o==null?void 0:o.map((c,E)=>Array.isArray(l[E])?l[E].map((d,f)=>J7({param:c,value:l[E][f]})):l[E]?J7({param:c,value:l[E]}):null))??[])}return[i,...a]}function J7({param:e,value:u}){if(e.type==="string"||e.type==="bytes")return pe(Fi(u));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new ZN(e.type);return Ic([e],[u])}function A1(e,{method:u}){var n,r;const t={};return e.transport.type==="fallback"&&((r=(n=e.transport).onResponse)==null||r.call(n,({method:i,response:a,status:s,transport:o})=>{s==="success"&&u===i&&(t[a]=o.request)})),i=>t[i]||e.request}async function ib(e,{address:u,abi:t,args:n,eventName:r,fromBlock:i,strict:a,toBlock:s}){const o=A1(e,{method:"eth_newFilter"}),l=r?Rc({abi:t,args:n,eventName:r}):void 0,c=await e.request({method:"eth_newFilter",params:[{address:u,fromBlock:typeof i=="bigint"?Lu(i):i,toBlock:typeof s=="bigint"?Lu(s):s,topics:l}]});return{abi:t,args:n,eventName:r,id:c,request:o(c),strict:a,type:"event"}}function kt(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}function Pi({abi:e,args:u,functionName:t}){let n=e[0];if(t&&(n=Nc({abi:e,args:u,name:t}),!n))throw new n2(t,{docsPath:"/docs/contract/encodeFunctionData"});if(n.type!=="function")throw new n2(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const r=Ya(n),i=gC(r),a="inputs"in n&&n.inputs?Ic(n.inputs,u??[]):void 0;return EC([i,a??"0x"])}const ab={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},OR={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},IR={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function BC(e,u){const t=u?`${u}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=pe(sr(t),"bytes"),r=(u?t.substring(`${u}0x`.length):t).split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(n[i>>1]&15)>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());return`0x${r.join("")}`}function oe(e,u){if(!lo(e))throw new Bl({address:e});return BC(e,u)}function g1(e,u){if(u==="0x"&&e.length>0)throw new h1;if(I0(u)&&I0(u)<32)throw new dC({data:u,params:e,size:I0(u)});return NR({data:u,params:e})}function NR({data:e,params:u}){const t=[];let n=0;for(let r=0;r=I0(e))throw new dC({data:e,params:u,size:I0(e)});const i=u[r],{consumed:a,value:s}=Js({data:e,param:i,position:n});t.push(s),n+=a}return t}function Js({data:e,param:u,position:t}){const n=m1(u.type);if(n){const[i,a]=n;return zR(e,{length:i,param:{...u,type:a},position:t})}if(u.type==="tuple")return $R(e,{param:u,position:t});if(u.type==="string")return UR(e,{position:t});if(u.type.startsWith("bytes"))return MR(e,{param:u,position:t});const r=b0(e,t,t+32,{strict:!0});if(u.type.startsWith("uint")||u.type.startsWith("int"))return LR(r,{param:u});if(u.type==="address")return RR(r);if(u.type==="bool")return jR(r);throw new KN(u.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function RR(e){return{consumed:32,value:BC(b0(e,-20))}}function zR(e,{param:u,length:t,position:n}){if(!t){const a=se(b0(e,n,n+32,{strict:!0})),s=se(b0(e,a,a+32,{strict:!0}));let o=0;const l=[];for(let c=0;c48?Yn(e,{signed:t}):se(e,{signed:t})}}function UR(e,{position:u}){const t=se(b0(e,u,u+32,{strict:!0})),n=se(b0(e,t,t+32,{strict:!0}));return n===0?{consumed:32,value:""}:{consumed:32,value:oC(Pa(b0(e,t+32,t+32+n,{strict:!0})))}}function $R(e,{param:u,position:t}){const n=u.components.length===0||u.components.some(({name:a})=>!a),r=n?[]:{};let i=0;if(i2(u)){const a=se(b0(e,t,t+32,{strict:!0}));for(let s=0;si.type==="error"&&t===gC(Ya(i)));if(!r)throw new Kv(t,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:r,args:"inputs"in r&&r.inputs&&r.inputs.length>0?g1(r.inputs,b0(u,4)):void 0,errorName:r.name}}const ge=(e,u,t)=>JSON.stringify(e,(n,r)=>{const i=typeof r=="bigint"?r.toString():r;return typeof u=="function"?u(n,i):i},t);function sb({abiItem:e,args:u,includeFunctionName:t=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${t?e.name:""}(${e.inputs.map((r,i)=>`${n&&r.name?`${r.name}: `:""}${typeof u[i]=="object"?ge(u[i]):u[i]}`).join(", ")})`}function yC(e,u="wei"){return u2(e,PN[u])}function zc(e){const u=Object.entries(e).map(([n,r])=>r===void 0||r===!1?null:[n,r]).filter(Boolean),t=u.reduce((n,[r])=>Math.max(n,r.length),0);return u.map(([n,r])=>` ${`${n}:`.padEnd(t+1)} ${r}`).join(` +`)}class qR extends Bu{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class HR extends Bu{constructor({transaction:u}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",zc(u),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class GR extends Bu{constructor(u,{account:t,docsPath:n,chain:r,data:i,gas:a,gasPrice:s,maxFeePerGas:o,maxPriorityFeePerGas:l,nonce:c,to:E,value:d}){var p;const f=zc({chain:r&&`${r==null?void 0:r.name} (id: ${r==null?void 0:r.id})`,from:t==null?void 0:t.address,to:E,value:typeof d<"u"&&`${yC(d)} ${((p=r==null?void 0:r.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:i,gas:a,gasPrice:typeof s<"u"&&`${Re(s)} gwei`,maxFeePerGas:typeof o<"u"&&`${Re(o)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Re(l)} gwei`,nonce:c});super(u.shortMessage,{cause:u,docsPath:n,metaMessages:[...u.metaMessages?[...u.metaMessages," "]:[],"Request Arguments:",f].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=u}}class ob extends Bu{constructor({blockHash:u,blockNumber:t,blockTag:n,hash:r,index:i}){let a="Transaction";n&&i!==void 0&&(a=`Transaction at block time "${n}" at index "${i}"`),u&&i!==void 0&&(a=`Transaction at block hash "${u}" at index "${i}"`),t&&i!==void 0&&(a=`Transaction at block number "${t}" at index "${i}"`),r&&(a=`Transaction with hash "${r}"`),super(`${a} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class lb extends Bu{constructor({hash:u}){super(`Transaction receipt with hash "${u}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class QR extends Bu{constructor({hash:u}){super(`Timed out while waiting for transaction with hash "${u}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}class cb extends Bu{constructor(u,{account:t,docsPath:n,chain:r,data:i,gas:a,gasPrice:s,maxFeePerGas:o,maxPriorityFeePerGas:l,nonce:c,to:E,value:d}){var h;const f=t?kt(t):void 0,p=zc({from:f==null?void 0:f.address,to:E,value:typeof d<"u"&&`${yC(d)} ${((h=r==null?void 0:r.nativeCurrency)==null?void 0:h.symbol)||"ETH"}`,data:i,gas:a,gasPrice:typeof s<"u"&&`${Re(s)} gwei`,maxFeePerGas:typeof o<"u"&&`${Re(o)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Re(l)} gwei`,nonce:c});super(u.shortMessage,{cause:u,docsPath:n,metaMessages:[...u.metaMessages?[...u.metaMessages," "]:[],"Raw Call Arguments:",p].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=u}}class FC extends Bu{constructor(u,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:a,sender:s}){const o=Nc({abi:t,args:n,name:a}),l=o?sb({abiItem:o,args:n,includeFunctionName:!1,includeName:!1}):void 0,c=o?Ya(o,{includeName:!0}):void 0,E=zc({address:r&&EN(r),function:c,args:l&&l!=="()"&&`${[...Array((a==null?void 0:a.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:s});super(u.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:u,docsPath:i,metaMessages:[...u.metaMessages?[...u.metaMessages," "]:[],"Contract Call:",E].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=n,this.cause=u,this.contractAddress=r,this.functionName=a,this.sender=s}}class Bp extends Bu{constructor({abi:u,data:t,functionName:n,message:r}){let i,a,s,o;if(t&&t!=="0x")try{a=WR({abi:u,data:t});const{abiItem:c,errorName:E,args:d}=a;if(E==="Error")o=d[0];else if(E==="Panic"){const[f]=d;o=ab[f]}else{const f=c?Ya(c,{includeName:!0}):void 0,p=c&&d?sb({abiItem:c,args:d,includeFunctionName:!1,includeName:!1}):void 0;s=[f?`Error: ${f}`:"",p&&p!=="()"?` ${[...Array((E==null?void 0:E.length)??0).keys()].map(()=>" ").join("")}${p}`:""]}}catch(c){i=c}else r&&(o=r);let l;i instanceof Kv&&(l=i.signature,s=[`Unable to decode signature "${l}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${l}.`]),super(o&&o!=="execution reverted"||l?[`The contract function "${n}" reverted with the following ${l?"signature":"reason"}:`,o||l].join(` +`):`The contract function "${n}" reverted.`,{cause:i,metaMessages:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=a,this.reason=o,this.signature=l}}class KR extends Bu{constructor({functionName:u}){super(`The contract function "${u}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${u}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class DC extends Bu{constructor({data:u,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u}}class K3 extends Bu{constructor({body:u,details:t,headers:n,status:r,url:i}){super("HTTP request failed.",{details:t,metaMessages:[r&&`Status: ${r}`,`URL: ${c1(i)}`,u&&`Request body: ${ge(u)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=u,this.headers=n,this.status=r,this.url=i}}class VR extends Bu{constructor({body:u,details:t,url:n}){super("WebSocket request failed.",{details:t,metaMessages:[`URL: ${c1(n)}`,`Request body: ${ge(u)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class vC extends Bu{constructor({body:u,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${c1(n)}`,`Request body: ${ge(u)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class yp extends Bu{constructor({body:u,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${c1(t)}`,`Request body: ${ge(u)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const JR=-1;class Me extends Bu{constructor(u,{code:t,docsPath:n,metaMessages:r,shortMessage:i}){super(i,{cause:u,docsPath:n,metaMessages:r||(u==null?void 0:u.metaMessages)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=u.name,this.code=u instanceof vC?u.code:t??JR}}class Ro extends Me{constructor(u,t){super(u,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class yl extends Me{constructor(u){super(u,{code:yl.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(yl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Fl extends Me{constructor(u){super(u,{code:Fl.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(Fl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class Dl extends Me{constructor(u){super(u,{code:Dl.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(Dl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class vl extends Me{constructor(u){super(u,{code:vl.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(vl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Eo extends Me{constructor(u){super(u,{code:Eo.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(Eo,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Wa extends Me{constructor(u){super(u,{code:Wa.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` +`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(Wa,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class bl extends Me{constructor(u){super(u,{code:bl.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(bl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Di extends Me{constructor(u){super(u,{code:Di.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(Di,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class wl extends Me{constructor(u){super(u,{code:wl.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(wl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class xl extends Me{constructor(u){super(u,{code:xl.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(xl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class kl extends Me{constructor(u){super(u,{code:kl.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(kl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class _l extends Me{constructor(u){super(u,{code:_l.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(_l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class O0 extends Ro{constructor(u){super(u,{code:O0.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(O0,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Sl extends Ro{constructor(u){super(u,{code:Sl.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(Sl,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Pl extends Ro{constructor(u){super(u,{code:Pl.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(Pl,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Tl extends Ro{constructor(u){super(u,{code:Tl.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(Tl,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Ol extends Ro{constructor(u){super(u,{code:Ol.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(Ol,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class kn extends Ro{constructor(u){super(u,{code:kn.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(kn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class ZR extends Me{constructor(u){super(u,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}const YR=3;function Il(e,{abi:u,address:t,args:n,docsPath:r,functionName:i,sender:a}){const{code:s,data:o,message:l,shortMessage:c}=e instanceof DC?e:e instanceof Bu?e.walk(d=>"data"in d)||e.walk():{},E=(()=>e instanceof h1?new KR({functionName:i}):[YR,Eo.code].includes(s)&&(o||l||c)?new Bp({abi:u,data:typeof o=="object"?o.data:o,functionName:i,message:c??l}):e)();return new FC(E,{abi:u,args:n,contractAddress:t,docsPath:r,functionName:i,sender:a})}class zo extends Bu{constructor({docsPath:u}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` +`),{docsPath:u,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}class XR extends Bu{constructor(u,{account:t,docsPath:n,chain:r,data:i,gas:a,gasPrice:s,maxFeePerGas:o,maxPriorityFeePerGas:l,nonce:c,to:E,value:d}){var p;const f=zc({from:t==null?void 0:t.address,to:E,value:typeof d<"u"&&`${yC(d)} ${((p=r==null?void 0:r.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:i,gas:a,gasPrice:typeof s<"u"&&`${Re(s)} gwei`,maxFeePerGas:typeof o<"u"&&`${Re(o)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Re(l)} gwei`,nonce:c});super(u.shortMessage,{cause:u,docsPath:n,metaMessages:[...u.metaMessages?[...u.metaMessages," "]:[],"Estimate Gas Arguments:",f].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=u}}function bC(e,u){const t=(e.details||"").toLowerCase(),n=e.walk(r=>r.code===Ns.code);return n instanceof Bu?new Ns({cause:e,message:n.details}):Ns.nodeMessage.test(t)?new Ns({cause:e,message:e.details}):e2.nodeMessage.test(t)?new e2({cause:e,maxFeePerGas:u==null?void 0:u.maxFeePerGas}):cp.nodeMessage.test(t)?new cp({cause:e,maxFeePerGas:u==null?void 0:u.maxFeePerGas}):Ep.nodeMessage.test(t)?new Ep({cause:e,nonce:u==null?void 0:u.nonce}):dp.nodeMessage.test(t)?new dp({cause:e,nonce:u==null?void 0:u.nonce}):fp.nodeMessage.test(t)?new fp({cause:e,nonce:u==null?void 0:u.nonce}):pp.nodeMessage.test(t)?new pp({cause:e}):hp.nodeMessage.test(t)?new hp({cause:e,gas:u==null?void 0:u.gas}):Cp.nodeMessage.test(t)?new Cp({cause:e,gas:u==null?void 0:u.gas}):mp.nodeMessage.test(t)?new mp({cause:e}):t2.nodeMessage.test(t)?new t2({cause:e,maxFeePerGas:u==null?void 0:u.maxFeePerGas,maxPriorityFeePerGas:u==null?void 0:u.maxPriorityFeePerGas}):new f1({cause:e})}function uz(e,{docsPath:u,...t}){const n=(()=>{const r=bC(e,t);return r instanceof f1?e:r})();return new XR(n,{docsPath:u,...t})}function wC(e,{format:u}){if(!u)return{};const t={};function n(i){const a=Object.keys(i);for(const s of a)s in e&&(t[s]=e[s]),i[s]&&typeof i[s]=="object"&&!Array.isArray(i[s])&&n(i[s])}const r=u(e||{});return n(r),t}function jc(e){const{account:u,gasPrice:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:i}=e,a=u?kt(u):void 0;if(a&&!lo(a.address))throw new Bl({address:a.address});if(i&&!lo(i))throw new Bl({address:i});if(typeof t<"u"&&(typeof n<"u"||typeof r<"u"))throw new qR;if(n&&n>2n**256n-1n)throw new e2({maxFeePerGas:n});if(r&&n&&r>n)throw new t2({maxFeePerGas:n,maxPriorityFeePerGas:r})}class ez extends Bu{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class xC extends Bu{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class tz extends Bu{constructor({maxPriorityFeePerGas:u}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Re(u)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class nz extends Bu{constructor({blockHash:u,blockNumber:t}){let n="Block";u&&(n=`Block at hash "${u}"`),t&&(n=`Block at number "${t}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}async function vi(e,{blockHash:u,blockNumber:t,blockTag:n,includeTransactions:r}={}){var c,E,d;const i=n??"latest",a=r??!1,s=t!==void 0?Lu(t):void 0;let o=null;if(u?o=await e.request({method:"eth_getBlockByHash",params:[u,a]}):o=await e.request({method:"eth_getBlockByNumber",params:[s||i,a]}),!o)throw new nz({blockHash:u,blockNumber:t});return(((d=(E=(c=e.chain)==null?void 0:c.formatters)==null?void 0:E.block)==null?void 0:d.format)||cC)(o)}async function kC(e){const u=await e.request({method:"eth_gasPrice"});return BigInt(u)}async function rz(e,u){return Eb(e,u)}async function Eb(e,u){var i,a,s;const{block:t,chain:n=e.chain,request:r}=u||{};if(typeof((i=n==null?void 0:n.fees)==null?void 0:i.defaultPriorityFee)=="function"){const o=t||await zu(e,vi)({});return n.fees.defaultPriorityFee({block:o,client:e,request:r})}else if(typeof((a=n==null?void 0:n.fees)==null?void 0:a.defaultPriorityFee)<"u")return(s=n==null?void 0:n.fees)==null?void 0:s.defaultPriorityFee;try{const o=await e.request({method:"eth_maxPriorityFeePerGas"});return Yn(o)}catch{const[o,l]=await Promise.all([t?Promise.resolve(t):zu(e,vi)({}),zu(e,kC)({})]);if(typeof o.baseFeePerGas!="bigint")throw new xC;const c=l-o.baseFeePerGas;return c<0n?0n:c}}async function iz(e,u){return Fp(e,u)}async function Fp(e,u){var d,f;const{block:t,chain:n=e.chain,request:r,type:i="eip1559"}=u||{},a=await(async()=>{var p,h;return typeof((p=n==null?void 0:n.fees)==null?void 0:p.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:t,client:e,request:r}):((h=n==null?void 0:n.fees)==null?void 0:h.baseFeeMultiplier)??1.2})();if(a<1)throw new ez;const o=10**(((d=a.toString().split(".")[1])==null?void 0:d.length)??0),l=p=>p*BigInt(Math.ceil(a*o))/BigInt(o),c=t||await zu(e,vi)({});if(typeof((f=n==null?void 0:n.fees)==null?void 0:f.estimateFeesPerGas)=="function")return n.fees.estimateFeesPerGas({block:t,client:e,multiply:l,request:r,type:i});if(i==="eip1559"){if(typeof c.baseFeePerGas!="bigint")throw new xC;const p=r!=null&&r.maxPriorityFeePerGas?r.maxPriorityFeePerGas:await Eb(e,{block:c,chain:n,request:r}),h=l(c.baseFeePerGas);return{maxFeePerGas:(r==null?void 0:r.maxFeePerGas)??h+p,maxPriorityFeePerGas:p}}return{gasPrice:(r==null?void 0:r.gasPrice)??l(await zu(e,kC)({}))}}async function db(e,{address:u,blockTag:t="latest",blockNumber:n}){const r=await e.request({method:"eth_getTransactionCount",params:[u,n?Lu(n):t]});return se(r)}function az(e){if(e.type)return e.type;if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new HR({transaction:e})}async function B1(e,u){const{account:t=e.account,chain:n,gas:r,nonce:i,type:a}=u;if(!t)throw new zo;const s=kt(t),o=await zu(e,vi)({blockTag:"latest"}),l={...u,from:s.address};if(typeof i>"u"&&(l.nonce=await zu(e,db)({address:s.address,blockTag:"pending"})),typeof a>"u")try{l.type=az(l)}catch{l.type=typeof o.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(l.type==="eip1559"){const{maxFeePerGas:c,maxPriorityFeePerGas:E}=await Fp(e,{block:o,chain:n,request:l});if(typeof u.maxPriorityFeePerGas>"u"&&u.maxFeePerGas&&u.maxFeePerGas"u"&&(l.gas=await zu(e,_C)({...l,account:{address:s.address,type:"json-rpc"}})),jc(l),l}async function _C(e,u){var r,i,a;const t=u.account??e.account;if(!t)throw new zo({docsPath:"/docs/actions/public/estimateGas"});const n=kt(t);try{const{accessList:s,blockNumber:o,blockTag:l,data:c,gas:E,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:h,to:g,value:A,...m}=n.type==="local"?await B1(e,u):u,F=(o?Lu(o):void 0)||l;jc(u);const w=(a=(i=(r=e.chain)==null?void 0:r.formatters)==null?void 0:i.transactionRequest)==null?void 0:a.format,C=(w||d1)({...wC(m,{format:w}),from:n.address,accessList:s,data:c,gas:E,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:h,to:g,value:A}),k=await e.request({method:"eth_estimateGas",params:F?[C,F]:[C]});return BigInt(k)}catch(s){throw uz(s,{...u,account:n,chain:e.chain})}}async function sz(e,{abi:u,address:t,args:n,functionName:r,...i}){const a=Pi({abi:u,args:n,functionName:r});try{return await zu(e,_C)({data:a,to:t,...i})}catch(s){const o=i.account?kt(i.account):void 0;throw Il(s,{abi:u,address:t,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:r,sender:o==null?void 0:o.address})}}const Z7="/docs/contract/decodeEventLog";function Mc({abi:e,data:u,strict:t,topics:n}){const r=t??!0,[i,...a]=n;if(!i)throw new WN({docsPath:Z7});const s=e.find(p=>p.type==="event"&&i===CC(Ya(p)));if(!(s&&"name"in s)||s.type!=="event")throw new qN(i,{docsPath:Z7});const{name:o,inputs:l}=s,c=l==null?void 0:l.some(p=>!("name"in p&&p.name));let E=c?[]:{};const d=l.filter(p=>"indexed"in p&&p.indexed);for(let p=0;p!("indexed"in p&&p.indexed));if(f.length>0){if(u&&u!=="0x")try{const p=g1(f,u);if(p)if(c)E=[...E,...p];else for(let h=0;h0?E:void 0}}function oz({param:e,value:u}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?u:(g1([e],u)||[])[0]}async function SC(e,{address:u,blockHash:t,fromBlock:n,toBlock:r,event:i,events:a,args:s,strict:o}={}){const l=o??!1,c=a??(i?[i]:void 0);let E=[];c&&(E=[c.flatMap(f=>Rc({abi:[f],eventName:f.name,args:s}))],i&&(E=E[0]));let d;return t?d=await e.request({method:"eth_getLogs",params:[{address:u,topics:E,blockHash:t}]}):d=await e.request({method:"eth_getLogs",params:[{address:u,topics:E,fromBlock:typeof n=="bigint"?Lu(n):n,toBlock:typeof r=="bigint"?Lu(r):r}]}),d.map(f=>{var p;try{const{eventName:h,args:g}=c?Mc({abi:c,data:f.data,topics:f.topics,strict:l}):{eventName:void 0,args:void 0};return Jt(f,{args:g,eventName:h})}catch(h){let g,A;if(h instanceof $a||h instanceof No){if(l)return;g=h.abiItem.name,A=(p=h.abiItem.inputs)==null?void 0:p.some(m=>!("name"in m&&m.name))}return Jt(f,{args:A?[]:{},eventName:g})}}).filter(Boolean)}async function fb(e,{abi:u,address:t,args:n,blockHash:r,eventName:i,fromBlock:a,toBlock:s,strict:o}){const l=i?Nc({abi:u,name:i}):void 0,c=l?void 0:u.filter(E=>E.type==="event");return zu(e,SC)({address:t,args:n,blockHash:r,event:l,events:c,fromBlock:a,toBlock:s,strict:o})}const o6="/docs/contract/decodeFunctionResult";function jo({abi:e,args:u,functionName:t,data:n}){let r=e[0];if(t&&(r=Nc({abi:e,args:u,name:t}),!r))throw new n2(t,{docsPath:o6});if(r.type!=="function")throw new n2(void 0,{docsPath:o6});if(!r.outputs)throw new HN(r.name,{docsPath:o6});const i=g1(r.outputs,n);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}const Dp=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],pb=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],hb=[...pb,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],lz=[...pb,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],Y7=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],X7=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],cz=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],Ez="0x82ad56cb";function Mo({blockNumber:e,chain:u,contract:t}){var r;const n=(r=u==null?void 0:u.contracts)==null?void 0:r[t];if(!n)throw new lp({chain:u,contract:{name:t}});if(e&&n.blockCreated&&n.blockCreated>e)throw new lp({blockNumber:e,chain:u,contract:{name:t,blockCreated:n.blockCreated}});return n.address}function dz(e,{docsPath:u,...t}){const n=(()=>{const r=bC(e,t);return r instanceof f1?e:r})();return new cb(n,{docsPath:u,...t})}const l6=new Map;function PC({fn:e,id:u,shouldSplitBatch:t,wait:n=0,sort:r}){const i=async()=>{const c=o();a();const E=c.map(({args:d})=>d);E.length!==0&&e(E).then(d=>{r&&Array.isArray(d)&&d.sort(r),c.forEach(({pendingPromise:f},p)=>{var h;return(h=f.resolve)==null?void 0:h.call(f,[d[p],d])})}).catch(d=>{c.forEach(({pendingPromise:f})=>{var p;return(p=f.reject)==null?void 0:p.call(f,d)})})},a=()=>l6.delete(u),s=()=>o().map(({args:c})=>c),o=()=>l6.get(u)||[],l=c=>l6.set(u,[...o(),c]);return{flush:a,async schedule(c){const E={},d=new Promise((h,g)=>{E.resolve=h,E.reject=g});return(t==null?void 0:t([...s(),c]))&&i(),o().length>0?(l({args:c,pendingPromise:E}),d):(l({args:c,pendingPromise:E}),setTimeout(i,n),d)}}}async function y1(e,u){var A,m,B,F;const{account:t=e.account,batch:n=!!((A=e.batch)!=null&&A.multicall),blockNumber:r,blockTag:i="latest",accessList:a,data:s,gas:o,gasPrice:l,maxFeePerGas:c,maxPriorityFeePerGas:E,nonce:d,to:f,value:p,...h}=u,g=t?kt(t):void 0;try{jc(u);const v=(r?Lu(r):void 0)||i,C=(F=(B=(m=e.chain)==null?void 0:m.formatters)==null?void 0:B.transactionRequest)==null?void 0:F.format,j=(C||d1)({...wC(h,{format:C}),from:g==null?void 0:g.address,accessList:a,data:s,gas:o,gasPrice:l,maxFeePerGas:c,maxPriorityFeePerGas:E,nonce:d,to:f,value:p});if(n&&fz({request:j}))try{return await pz(e,{...j,blockNumber:r,blockTag:i})}catch(uu){if(!(uu instanceof Qv)&&!(uu instanceof lp))throw uu}const N=await e.request({method:"eth_call",params:v?[j,v]:[j]});return N==="0x"?{data:void 0}:{data:N}}catch(w){const v=hz(w),{offchainLookup:C,offchainLookupSignature:k}=await Uu(()=>import("./ccip-6424106c.js"),[]);if((v==null?void 0:v.slice(0,10))===k&&f)return{data:await C(e,{data:v,to:f})};throw dz(w,{...u,account:g,chain:e.chain})}}function fz({request:e}){const{data:u,to:t,...n}=e;return!(!u||u.startsWith(Ez)||!t||Object.values(n).filter(r=>typeof r<"u").length>0)}async function pz(e,u){var h;const{batchSize:t=1024,wait:n=0}=typeof((h=e.batch)==null?void 0:h.multicall)=="object"?e.batch.multicall:{},{blockNumber:r,blockTag:i="latest",data:a,multicallAddress:s,to:o}=u;let l=s;if(!l){if(!e.chain)throw new Qv;l=Mo({blockNumber:r,chain:e.chain,contract:"multicall3"})}const E=(r?Lu(r):void 0)||i,{schedule:d}=PC({id:`${e.uid}.${E}`,wait:n,shouldSplitBatch(g){return g.reduce((m,{data:B})=>m+(B.length-2),0)>t*2},fn:async g=>{const A=g.map(F=>({allowFailure:!0,callData:F.data,target:F.to})),m=Pi({abi:Dp,args:[A],functionName:"aggregate3"}),B=await e.request({method:"eth_call",params:[{data:m,to:l},E]});return jo({abi:Dp,args:[A],functionName:"aggregate3",data:B||"0x"})}}),[{returnData:f,success:p}]=await d({data:a,to:o});if(!p)throw new DC({data:f});return f==="0x"?{data:void 0}:{data:f}}function hz(e){if(!(e instanceof Bu))return;const u=e.walk();return typeof u.data=="object"?u.data.data:u.data}async function bi(e,{abi:u,address:t,args:n,functionName:r,...i}){const a=Pi({abi:u,args:n,functionName:r});try{const{data:s}=await zu(e,y1)({data:a,to:t,...i});return jo({abi:u,args:n,functionName:r,data:s||"0x"})}catch(s){throw Il(s,{abi:u,address:t,args:n,docsPath:"/docs/contract/readContract",functionName:r})}}async function Cz(e,{abi:u,address:t,args:n,dataSuffix:r,functionName:i,...a}){const s=a.account?kt(a.account):void 0,o=Pi({abi:u,args:n,functionName:i});try{const{data:l}=await zu(e,y1)({batch:!1,data:`${o}${r?r.replace("0x",""):""}`,to:t,...a});return{result:jo({abi:u,args:n,functionName:i,data:l||"0x"}),request:{abi:u,address:t,args:n,dataSuffix:r,functionName:i,...a}}}catch(l){throw Il(l,{abi:u,address:t,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:s==null?void 0:s.address})}}const c6=new Map,uA=new Map;let mz=0;function Lo(e,u,t){const n=++mz,r=()=>c6.get(e)||[],i=()=>{const c=r();c6.set(e,c.filter(E=>E.id!==n))},a=()=>{const c=uA.get(e);r().length===1&&c&&c(),i()},s=r();if(c6.set(e,[...s,{id:n,fns:u}]),s&&s.length>0)return a;const o={};for(const c in u)o[c]=(...E)=>{const d=r();d.length!==0&&d.forEach(f=>{var p,h;return(h=(p=f.fns)[c])==null?void 0:h.call(p,...E)})};const l=t(o);return typeof l=="function"&&uA.set(e,l),a}async function a2(e){return new Promise(u=>setTimeout(u,e))}function Lc(e,{emitOnBegin:u,initialWaitTime:t,interval:n}){let r=!0;const i=()=>r=!1;return(async()=>{let s;u&&(s=await e({unpoll:i}));const o=await(t==null?void 0:t(s))??n;await a2(o);const l=async()=>{r&&(await e({unpoll:i}),await a2(n),l())};l()})(),i}const Az=new Map,gz=new Map;function Bz(e){const u=(r,i)=>({clear:()=>i.delete(r),get:()=>i.get(r),set:a=>i.set(r,a)}),t=u(e,Az),n=u(e,gz);return{clear:()=>{t.clear(),n.clear()},promise:t,response:n}}async function yz(e,{cacheKey:u,cacheTime:t=1/0}){const n=Bz(u),r=n.response.get();if(r&&t>0&&new Date().getTime()-r.created.getTime()`blockNumber.${e}`;async function Uc(e,{cacheTime:u=e.cacheTime,maxAge:t}={}){const n=await yz(()=>e.request({method:"eth_blockNumber"}),{cacheKey:Fz(e.uid),cacheTime:t??u});return BigInt(n)}async function F1(e,{filter:u}){const t="strict"in u&&u.strict;return(await u.request({method:"eth_getFilterChanges",params:[u.id]})).map(r=>{var i;if(typeof r=="string")return r;try{const{eventName:a,args:s}="abi"in u&&u.abi?Mc({abi:u.abi,data:r.data,topics:r.topics,strict:t}):{eventName:void 0,args:void 0};return Jt(r,{args:s,eventName:a})}catch(a){let s,o;if(a instanceof $a||a instanceof No){if("strict"in u&&u.strict)return;s=a.abiItem.name,o=(i=a.abiItem.inputs)==null?void 0:i.some(l=>!("name"in l&&l.name))}return Jt(r,{args:o?[]:{},eventName:s})}}).filter(Boolean)}async function D1(e,{filter:u}){return u.request({method:"eth_uninstallFilter",params:[u.id]})}function Dz(e,{abi:u,address:t,args:n,batch:r=!0,eventName:i,onError:a,onLogs:s,poll:o,pollingInterval:l=e.pollingInterval,strict:c}){return(typeof o<"u"?o:e.transport.type!=="webSocket")?(()=>{const p=ge(["watchContractEvent",t,n,r,e.uid,i,l]),h=c??!1;return Lo(p,{onLogs:s,onError:a},g=>{let A,m,B=!1;const F=Lc(async()=>{var w;if(!B){try{m=await zu(e,ib)({abi:u,address:t,args:n,eventName:i,strict:h})}catch{}B=!0;return}try{let v;if(m)v=await zu(e,F1)({filter:m});else{const C=await zu(e,Uc)({});A&&A!==C?v=await zu(e,fb)({abi:u,address:t,args:n,eventName:i,fromBlock:A+1n,toBlock:C,strict:h}):v=[],A=C}if(v.length===0)return;r?g.onLogs(v):v.forEach(C=>g.onLogs([C]))}catch(v){m&&v instanceof Wa&&(B=!1),(w=g.onError)==null||w.call(g,v)}},{emitOnBegin:!0,interval:l});return async()=>{m&&await zu(e,D1)({filter:m}),F()}})})():(()=>{let p=!0,h=()=>p=!1;return(async()=>{try{const g=i?Rc({abi:u,eventName:i,args:n}):[],{unsubscribe:A}=await e.transport.subscribe({params:["logs",{address:t,topics:g}],onData(m){var F;if(!p)return;const B=m.result;try{const{eventName:w,args:v}=Mc({abi:u,data:B.data,topics:B.topics,strict:c}),C=Jt(B,{args:v,eventName:w});s([C])}catch(w){let v,C;if(w instanceof $a||w instanceof No){if(c)return;v=w.abiItem.name,C=(F=w.abiItem.inputs)==null?void 0:F.some(j=>!("name"in j&&j.name))}const k=Jt(B,{args:C?[]:{},eventName:v});s([k])}},onError(m){a==null||a(m)}});h=A,p||h()}catch(g){a==null||a(g)}})(),h})()}function Cb({chain:e,currentChainId:u}){if(!e)throw new SN;if(u!==e.id)throw new _N({chain:e,currentChainId:u})}function vz(e,{docsPath:u,...t}){const n=(()=>{const r=bC(e,t);return r instanceof f1?e:r})();return new GR(n,{docsPath:u,...t})}async function Nl(e){const u=await e.request({method:"eth_chainId"});return se(u)}async function TC(e,{serializedTransaction:u}){return e.request({method:"eth_sendRawTransaction",params:[u]})}async function OC(e,u){var h,g,A,m;const{account:t=e.account,chain:n=e.chain,accessList:r,data:i,gas:a,gasPrice:s,maxFeePerGas:o,maxPriorityFeePerGas:l,nonce:c,to:E,value:d,...f}=u;if(!t)throw new zo({docsPath:"/docs/actions/wallet/sendTransaction"});const p=kt(t);try{jc(u);let B;if(n!==null&&(B=await zu(e,Nl)({}),Cb({currentChainId:B,chain:n})),p.type==="local"){const C=await zu(e,B1)({account:p,accessList:r,chain:n,data:i,gas:a,gasPrice:s,maxFeePerGas:o,maxPriorityFeePerGas:l,nonce:c,to:E,value:d,...f});B||(B=await zu(e,Nl)({}));const k=(h=n==null?void 0:n.serializers)==null?void 0:h.transaction,j=await p.signTransaction({...C,chainId:B},{serializer:k});return await zu(e,TC)({serializedTransaction:j})}const F=(m=(A=(g=e.chain)==null?void 0:g.formatters)==null?void 0:A.transactionRequest)==null?void 0:m.format,v=(F||d1)({...wC(f,{format:F}),accessList:r,data:i,from:p.address,gas:a,gasPrice:s,maxFeePerGas:o,maxPriorityFeePerGas:l,nonce:c,to:E,value:d});return await e.request({method:"eth_sendTransaction",params:[v]})}catch(B){throw vz(B,{...u,account:p,chain:u.chain||void 0})}}async function bz(e,{abi:u,address:t,args:n,dataSuffix:r,functionName:i,...a}){const s=Pi({abi:u,args:n,functionName:i});return await zu(e,OC)({data:`${s}${r?r.replace("0x",""):""}`,to:t,...a})}async function wz(e,{chain:u}){const{id:t,name:n,nativeCurrency:r,rpcUrls:i,blockExplorers:a}=u;await e.request({method:"wallet_addEthereumChain",params:[{chainId:Lu(t),chainName:n,nativeCurrency:r,rpcUrls:i.default.http,blockExplorerUrls:a?Object.values(a).map(({url:s})=>s):void 0}]})}const vp=256;let TE=vp,OE;function xz(e=11){if(!OE||TE+e>vp*2){OE="",TE=0;for(let u=0;u{const A=g(h);for(const B in f)delete A[B];const m={...h,...A};return Object.assign(m,{extend:p(m)})}}return Object.assign(f,{extend:p(f)})}function Ab(e,{delay:u=100,retryCount:t=2,shouldRetry:n=()=>!0}={}){return new Promise((r,i)=>{const a=async({count:s=0}={})=>{const o=async({error:l})=>{const c=typeof u=="function"?u({count:s,error:l}):u;c&&await a2(c),a({count:s+1})};try{const l=await e();r(l)}catch(l){if(s"code"in e?e.code!==-1&&e.code!==-32004&&e.code!==-32005&&e.code!==-32042&&e.code!==-32603:e instanceof K3&&e.status?e.status!==403&&e.status!==408&&e.status!==413&&e.status!==429&&e.status!==500&&e.status!==502&&e.status!==503&&e.status!==504:!1;function kz(e,{retryDelay:u=150,retryCount:t=3}={}){return async n=>Ab(async()=>{try{return await e(n)}catch(r){const i=r;switch(i.code){case yl.code:throw new yl(i);case Fl.code:throw new Fl(i);case Dl.code:throw new Dl(i);case vl.code:throw new vl(i);case Eo.code:throw new Eo(i);case Wa.code:throw new Wa(i);case bl.code:throw new bl(i);case Di.code:throw new Di(i);case wl.code:throw new wl(i);case xl.code:throw new xl(i);case kl.code:throw new kl(i);case _l.code:throw new _l(i);case O0.code:throw new O0(i);case Sl.code:throw new Sl(i);case Pl.code:throw new Pl(i);case Tl.code:throw new Tl(i);case Ol.code:throw new Ol(i);case kn.code:throw new kn(i);case 5e3:throw new O0(i);default:throw r instanceof Bu?r:new ZR(i)}}},{delay:({count:r,error:i})=>{var a;if(i&&i instanceof K3){const s=(a=i==null?void 0:i.headers)==null?void 0:a.get("Retry-After");if(s!=null&&s.match(/\d/))return parseInt(s)*1e3}return~~(1<!gb(r)})}function v1({key:e,name:u,request:t,retryCount:n=3,retryDelay:r=150,timeout:i,type:a},s){return{config:{key:e,name:u,request:t,retryCount:n,retryDelay:r,timeout:i,type:a},request:kz(t,{retryCount:n,retryDelay:r}),value:s}}function $c(e,u={}){const{key:t="custom",name:n="Custom Provider",retryDelay:r}=u;return({retryCount:i})=>v1({key:t,name:n,request:e.request.bind(e),retryCount:u.retryCount??i,retryDelay:r,type:"custom"})}function eA(e,u={}){const{key:t="fallback",name:n="Fallback",rank:r=!1,retryCount:i,retryDelay:a}=u;return({chain:s,pollingInterval:o=4e3,timeout:l})=>{let c=e,E=()=>{};const d=v1({key:t,name:n,async request({method:f,params:p}){const h=async(g=0)=>{const A=c[g]({chain:s,retryCount:0,timeout:l});try{const m=await A.request({method:f,params:p});return E({method:f,params:p,response:m,transport:A,status:"success"}),m}catch(m){if(E({error:m,method:f,params:p,transport:A,status:"error"}),gb(m)||g===c.length-1)throw m;return h(g+1)}};return h()},retryCount:i,retryDelay:a,type:"fallback"},{onResponse:f=>E=f,transports:c.map(f=>f({chain:s,retryCount:0}))});if(r){const f=typeof r=="object"?r:{};_z({chain:s,interval:f.interval??o,onTransports:p=>c=p,sampleCount:f.sampleCount,timeout:f.timeout,transports:c,weights:f.weights})}return d}}function _z({chain:e,interval:u=4e3,onTransports:t,sampleCount:n=10,timeout:r=1e3,transports:i,weights:a={}}){const{stability:s=.7,latency:o=.3}=a,l=[],c=async()=>{const E=await Promise.all(i.map(async p=>{const h=p({chain:e,retryCount:0,timeout:r}),g=Date.now();let A,m;try{await h.request({method:"net_listening"}),m=1}catch{m=0}finally{A=Date.now()}return{latency:A-g,success:m}}));l.push(E),l.length>n&&l.shift();const d=Math.max(...l.map(p=>Math.max(...p.map(({latency:h})=>h)))),f=i.map((p,h)=>{const g=l.map(w=>w[h].latency),m=1-g.reduce((w,v)=>w+v,0)/g.length/d,B=l.map(w=>w[h].success),F=B.reduce((w,v)=>w+v,0)/B.length;return F===0?[0,h]:[o*m+s*F,h]}).sort((p,h)=>h[0]-p[0]);t(f.map(([,p])=>i[p])),await a2(u),c()};c()}class Bb extends Bu{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}function Sz(){if(typeof WebSocket<"u")return WebSocket;if(typeof globalThis.WebSocket<"u")return globalThis.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const tA=Sz();function yb(e,{errorInstance:u=new Error("timed out"),timeout:t,signal:n}){return new Promise((r,i)=>{(async()=>{let a;try{const s=new AbortController;t>0&&(a=setTimeout(()=>{n?s.abort():i(u)},t)),r(await e({signal:s==null?void 0:s.signal}))}catch(s){s.name==="AbortError"&&i(u),i(s)}finally{clearTimeout(a)}})()})}let bp=0;async function Pz(e,{body:u,fetchOptions:t={},timeout:n=1e4}){var s;const{headers:r,method:i,signal:a}=t;try{const o=await yb(async({signal:c})=>await fetch(e,{...t,body:Array.isArray(u)?ge(u.map(d=>({jsonrpc:"2.0",id:d.id??bp++,...d}))):ge({jsonrpc:"2.0",id:u.id??bp++,...u}),headers:{...r,"Content-Type":"application/json"},method:i||"POST",signal:a||(n>0?c:void 0)}),{errorInstance:new yp({body:u,url:e}),timeout:n,signal:!0});let l;if((s=o.headers.get("Content-Type"))!=null&&s.startsWith("application/json")?l=await o.json():l=await o.text(),!o.ok)throw new K3({body:u,details:ge(l.error)||o.statusText,headers:o.headers,status:o.status,url:e});return l}catch(o){throw o instanceof K3||o instanceof yp?o:new K3({body:u,details:o.message,url:e})}}const E6=new Map;async function d6(e){let u=E6.get(e);if(u)return u;const{schedule:t}=PC({id:e,fn:async()=>{const i=new tA(e),a=new Map,s=new Map,o=({data:c})=>{const E=JSON.parse(c),d=E.method==="eth_subscription",f=d?E.params.subscription:E.id,p=d?s:a,h=p.get(f);h&&h({data:c}),d||p.delete(f)},l=()=>{E6.delete(e),i.removeEventListener("close",l),i.removeEventListener("message",o)};return i.addEventListener("close",l),i.addEventListener("message",o),i.readyState===tA.CONNECTING&&await new Promise((c,E)=>{i&&(i.onopen=c,i.onerror=E)}),u=Object.assign(i,{requests:a,subscriptions:s}),E6.set(e,u),[u]}}),[n,[r]]=await t();return r}function Tz(e,{body:u,onResponse:t}){if(e.readyState===e.CLOSED||e.readyState===e.CLOSING)throw new VR({body:u,url:e.url,details:"Socket is closed."});const n=bp++,r=({data:i})=>{var s;const a=JSON.parse(i);typeof a.id=="number"&&n!==a.id||(t==null||t(a),u.method==="eth_subscribe"&&typeof a.result=="string"&&e.subscriptions.set(a.result,r),u.method==="eth_unsubscribe"&&e.subscriptions.delete((s=u.params)==null?void 0:s[0]))};return e.requests.set(n,r),e.send(JSON.stringify({jsonrpc:"2.0",...u,id:n})),e}async function Oz(e,{body:u,timeout:t=1e4}){return yb(()=>new Promise(n=>Zs.webSocket(e,{body:u,onResponse:n})),{errorInstance:new yp({body:u,url:e.url}),timeout:t})}const Zs={http:Pz,webSocket:Tz,webSocketAsync:Oz};function Iz(e,u={}){const{batch:t,fetchOptions:n,key:r="http",name:i="HTTP JSON-RPC",retryDelay:a}=u;return({chain:s,retryCount:o,timeout:l})=>{const{batchSize:c=1e3,wait:E=0}=typeof t=="object"?t:{},d=u.retryCount??o,f=l??u.timeout??1e4,p=e||(s==null?void 0:s.rpcUrls.default.http[0]);if(!p)throw new Bb;return v1({key:r,name:i,async request({method:h,params:g}){const A={method:h,params:g},{schedule:m}=PC({id:`${e}`,wait:E,shouldSplitBatch(v){return v.length>c},fn:v=>Zs.http(p,{body:v,fetchOptions:n,timeout:f}),sort:(v,C)=>v.id-C.id}),B=async v=>t?m(v):[await Zs.http(p,{body:v,fetchOptions:n,timeout:f})],[{error:F,result:w}]=await B(A);if(F)throw new vC({body:A,error:F,url:p});return w},retryCount:d,retryDelay:a,timeout:f,type:"http"},{fetchOptions:n,url:e})}}function IC(e,u){var n,r,i;if(!(e instanceof Bu))return!1;const t=e.walk(a=>a instanceof Bp);return t instanceof Bp?!!(((n=t.data)==null?void 0:n.errorName)==="ResolverNotFound"||((r=t.data)==null?void 0:r.errorName)==="ResolverWildcardNotSupported"||(i=t.reason)!=null&&i.includes("Wildcard on non-extended resolvers is not supported")||u==="reverse"&&t.reason===ab[50]):!1}function Fb(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const u=`0x${e.slice(1,65)}`;return xn(u)?u:null}function l9(e){let u=new Uint8Array(32).fill(0);if(!e)return gl(u);const t=e.split(".");for(let n=t.length-1;n>=0;n-=1){const r=Fb(t[n]),i=r?Fi(r):pe(sr(t[n]),"bytes");u=pe(pr([u,i]),"bytes")}return gl(u)}function Nz(e){return`[${e.slice(2)}]`}function Rz(e){const u=new Uint8Array(32).fill(0);return e?Fb(e)||pe(sr(e)):gl(u)}function b1(e){const u=e.replace(/^\.|\.$/gm,"");if(u.length===0)return new Uint8Array(1);const t=new Uint8Array(sr(u).byteLength+2);let n=0;const r=u.split(".");for(let i=0;i255&&(a=sr(Nz(Rz(r[i])))),t[n]=a.length,t.set(a,n+1),n+=a.length+1}return t.byteLength!==n+1?t.slice(0,n+1):t}async function zz(e,{blockNumber:u,blockTag:t,coinType:n,name:r,universalResolverAddress:i}){let a=i;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=Mo({blockNumber:u,chain:e.chain,contract:"ensUniversalResolver"})}try{const s=Pi({abi:X7,functionName:"addr",...n!=null?{args:[l9(r),BigInt(n)]}:{args:[l9(r)]}}),o=await zu(e,bi)({address:a,abi:hb,functionName:"resolve",args:[Br(b1(r)),s],blockNumber:u,blockTag:t});if(o[0]==="0x")return null;const l=jo({abi:X7,args:n!=null?[l9(r),BigInt(n)]:void 0,functionName:"addr",data:o[0]});return l==="0x"||Pa(l)==="0x00"?null:l}catch(s){if(IC(s,"resolve"))return null;throw s}}class jz extends Bu{constructor({data:u}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(u)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class h3 extends Bu{constructor({reason:u}){super(`ENS NFT avatar URI is invalid. ${u}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class NC extends Bu{constructor({uri:u}){super(`Unable to resolve ENS avatar URI "${u}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class Mz extends Bu{constructor({namespace:u}){super(`ENS NFT avatar namespace "${u}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const Lz=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,Uz=/^(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\-.]+))?(?\/.*)?$/,$z=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Wz=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function qz(e){try{const u=await fetch(e,{method:"HEAD"});if(u.status===200){const t=u.headers.get("content-type");return t==null?void 0:t.startsWith("image/")}return!1}catch(u){return typeof u=="object"&&typeof u.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(t=>{const n=new Image;n.onload=()=>{t(!0)},n.onerror=()=>{t(!1)},n.src=e})}}function nA(e,u){return e?e.endsWith("/")?e.slice(0,-1):e:u}function Db({uri:e,gatewayUrls:u}){const t=$z.test(e);if(t)return{uri:e,isOnChain:!0,isEncoded:t};const n=nA(u==null?void 0:u.ipfs,"https://ipfs.io"),r=nA(u==null?void 0:u.arweave,"https://arweave.net"),i=e.match(Lz),{protocol:a,subpath:s,target:o,subtarget:l=""}=(i==null?void 0:i.groups)||{},c=a==="ipns:/"||s==="ipns/",E=a==="ipfs:/"||s==="ipfs/"||Uz.test(e);if(e.startsWith("http")&&!c&&!E){let f=e;return u!=null&&u.arweave&&(f=e.replace(/https:\/\/arweave.net/g,u==null?void 0:u.arweave)),{uri:f,isOnChain:!1,isEncoded:!1}}if((c||E)&&o)return{uri:`${n}/${c?"ipns":"ipfs"}/${o}${l}`,isOnChain:!1,isEncoded:!1};if(a==="ar:/"&&o)return{uri:`${r}/${o}${l||""}`,isOnChain:!1,isEncoded:!1};let d=e.replace(Wz,"");if(d.startsWith("r.json());return await RC({gatewayUrls:e,uri:vb(t)})}catch{throw new NC({uri:u})}}async function RC({gatewayUrls:e,uri:u}){const{uri:t,isOnChain:n}=Db({uri:u,gatewayUrls:e});if(n||await qz(t))return t;throw new NC({uri:u})}function Gz(e){let u=e;u.startsWith("did:nft:")&&(u=u.replace("did:nft:","").replace(/_/g,"/"));const[t,n,r]=u.split("/"),[i,a]=t.split(":"),[s,o]=n.split(":");if(!i||i.toLowerCase()!=="eip155")throw new h3({reason:"Only EIP-155 supported"});if(!a)throw new h3({reason:"Chain ID not found"});if(!o)throw new h3({reason:"Contract address not found"});if(!r)throw new h3({reason:"Token ID not found"});if(!s)throw new h3({reason:"ERC namespace not found"});return{chainID:parseInt(a),namespace:s.toLowerCase(),contractAddress:o,tokenID:r}}async function Qz(e,{nft:u}){if(u.namespace==="erc721")return bi(e,{address:u.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(u.tokenID)]});if(u.namespace==="erc1155")return bi(e,{address:u.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(u.tokenID)]});throw new Mz({namespace:u.namespace})}async function Kz(e,{gatewayUrls:u,record:t}){return/eip155:/i.test(t)?Vz(e,{gatewayUrls:u,record:t}):RC({uri:t,gatewayUrls:u})}async function Vz(e,{gatewayUrls:u,record:t}){const n=Gz(t),r=await Qz(e,{nft:n}),{uri:i,isOnChain:a,isEncoded:s}=Db({uri:r,gatewayUrls:u});if(a&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){const l=s?atob(i.replace("data:application/json;base64,","")):i,c=JSON.parse(l);return RC({uri:vb(c),gatewayUrls:u})}let o=n.tokenID;return n.namespace==="erc1155"&&(o=o.replace("0x","").padStart(64,"0")),Hz({gatewayUrls:u,uri:i.replace(/(?:0x)?{id}/,o)})}async function bb(e,{blockNumber:u,blockTag:t,name:n,key:r,universalResolverAddress:i}){let a=i;if(!a){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=Mo({blockNumber:u,chain:e.chain,contract:"ensUniversalResolver"})}try{const s=await zu(e,bi)({address:a,abi:hb,functionName:"resolve",args:[Br(b1(n)),Pi({abi:Y7,functionName:"text",args:[l9(n),r]})],blockNumber:u,blockTag:t});if(s[0]==="0x")return null;const o=jo({abi:Y7,functionName:"text",data:s[0]});return o===""?null:o}catch(s){if(IC(s,"resolve"))return null;throw s}}async function Jz(e,{blockNumber:u,blockTag:t,gatewayUrls:n,name:r,universalResolverAddress:i}){const a=await zu(e,bb)({blockNumber:u,blockTag:t,key:"avatar",name:r,universalResolverAddress:i});if(!a)return null;try{return await Kz(e,{record:a,gatewayUrls:n})}catch{return null}}async function Zz(e,{address:u,blockNumber:t,blockTag:n,universalResolverAddress:r}){let i=r;if(!i){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=Mo({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}const a=`${u.toLowerCase().substring(2)}.addr.reverse`;try{return(await zu(e,bi)({address:i,abi:lz,functionName:"reverse",args:[Br(b1(a))],blockNumber:t,blockTag:n}))[0]}catch(s){if(IC(s,"reverse"))return null;throw s}}async function Yz(e,{blockNumber:u,blockTag:t,name:n,universalResolverAddress:r}){let i=r;if(!i){if(!e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=Mo({blockNumber:u,chain:e.chain,contract:"ensUniversalResolver"})}const[a]=await zu(e,bi)({address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Br(b1(n))],blockNumber:u,blockTag:t});return a}async function Xz(e){const u=A1(e,{method:"eth_newBlockFilter"}),t=await e.request({method:"eth_newBlockFilter"});return{id:t,request:u(t),type:"block"}}async function wb(e,{address:u,args:t,event:n,events:r,fromBlock:i,strict:a,toBlock:s}={}){const o=r??(n?[n]:void 0),l=A1(e,{method:"eth_newFilter"});let c=[];o&&(c=[o.flatMap(d=>Rc({abi:[d],eventName:d.name,args:t}))],n&&(c=c[0]));const E=await e.request({method:"eth_newFilter",params:[{address:u,fromBlock:typeof i=="bigint"?Lu(i):i,toBlock:typeof s=="bigint"?Lu(s):s,...c.length?{topics:c}:{}}]});return{abi:o,args:t,eventName:n?n.name:void 0,fromBlock:i,id:E,request:l(E),strict:a,toBlock:s,type:"event"}}async function xb(e){const u=A1(e,{method:"eth_newPendingTransactionFilter"}),t=await e.request({method:"eth_newPendingTransactionFilter"});return{id:t,request:u(t),type:"transaction"}}async function uj(e,{address:u,blockNumber:t,blockTag:n="latest"}){const r=t?Lu(t):void 0,i=await e.request({method:"eth_getBalance",params:[u,r||n]});return BigInt(i)}async function ej(e,{blockHash:u,blockNumber:t,blockTag:n="latest"}={}){const r=t!==void 0?Lu(t):void 0;let i;return u?i=await e.request({method:"eth_getBlockTransactionCountByHash",params:[u]}):i=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[r||n]}),se(i)}async function tj(e,{address:u,blockNumber:t,blockTag:n="latest"}){const r=t!==void 0?Lu(t):void 0,i=await e.request({method:"eth_getCode",params:[u,r||n]});if(i!=="0x")return i}function nj(e){var u;return{baseFeePerGas:e.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(u=e.reward)==null?void 0:u.map(t=>t.map(n=>BigInt(n)))}}async function rj(e,{blockCount:u,blockNumber:t,blockTag:n="latest",rewardPercentiles:r}){const i=t?Lu(t):void 0,a=await e.request({method:"eth_feeHistory",params:[Lu(u),i||n,r]});return nj(a)}async function ij(e,{filter:u}){const t=u.strict??!1;return(await u.request({method:"eth_getFilterLogs",params:[u.id]})).map(r=>{var i;try{const{eventName:a,args:s}="abi"in u&&u.abi?Mc({abi:u.abi,data:r.data,topics:r.topics,strict:t}):{eventName:void 0,args:void 0};return Jt(r,{args:s,eventName:a})}catch(a){let s,o;if(a instanceof $a||a instanceof No){if("strict"in u&&u.strict)return;s=a.abiItem.name,o=(i=a.abiItem.inputs)==null?void 0:i.some(l=>!("name"in l&&l.name))}return Jt(r,{args:o?[]:{},eventName:s})}}).filter(Boolean)}const aj=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,sj=/^(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)?$/;function oj({domain:e,message:u,primaryType:t,types:n}){const r=typeof e>"u"?{}:e,i={EIP712Domain:Ob({domain:r}),...n};Tb({domain:r,message:u,primaryType:t,types:i});const a=["0x1901"];return r&&a.push(lj({domain:r,types:i})),t!=="EIP712Domain"&&a.push(kb({data:u,primaryType:t,types:i})),pe(pr(a))}function lj({domain:e,types:u}){return kb({data:e,primaryType:"EIP712Domain",types:u})}function kb({data:e,primaryType:u,types:t}){const n=_b({data:e,primaryType:u,types:t});return pe(n)}function _b({data:e,primaryType:u,types:t}){const n=[{type:"bytes32"}],r=[cj({primaryType:u,types:t})];for(const i of t[u]){const[a,s]=Pb({types:t,name:i.name,type:i.type,value:e[i.name]});n.push(a),r.push(s)}return Ic(n,r)}function cj({primaryType:e,types:u}){const t=Br(Ej({primaryType:e,types:u}));return pe(t)}function Ej({primaryType:e,types:u}){let t="";const n=Sb({primaryType:e,types:u});n.delete(e);const r=[e,...Array.from(n).sort()];for(const i of r)t+=`${i}(${u[i].map(({name:a,type:s})=>`${s} ${a}`).join(",")})`;return t}function Sb({primaryType:e,types:u},t=new Set){const n=e.match(/^\w*/u),r=n==null?void 0:n[0];if(t.has(r)||u[r]===void 0)return t;t.add(r);for(const i of u[r])Sb({primaryType:i.type,types:u},t);return t}function Pb({types:e,name:u,type:t,value:n}){if(e[t]!==void 0)return[{type:"bytes32"},pe(_b({data:n,primaryType:t,types:e}))];if(t==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},pe(n)];if(t==="string")return[{type:"bytes32"},pe(Br(n))];if(t.lastIndexOf("]")===t.length-1){const r=t.slice(0,t.lastIndexOf("[")),i=n.map(a=>Pb({name:u,type:r,types:e,value:a}));return[{type:"bytes32"},pe(Ic(i.map(([a])=>a),i.map(([,a])=>a)))]}return[{type:t},n]}function Tb({domain:e,message:u,primaryType:t,types:n}){const r=n,i=(a,s)=>{for(const o of a){const{name:l,type:c}=o,E=c,d=s[l],f=E.match(sj);if(f&&(typeof d=="number"||typeof d=="bigint")){const[g,A,m]=f;Lu(d,{signed:A==="int",size:parseInt(m)/8})}if(E==="address"&&typeof d=="string"&&!lo(d))throw new Bl({address:d});const p=E.match(aj);if(p){const[g,A]=p;if(A&&I0(d)!==parseInt(A))throw new GN({expectedSize:parseInt(A),givenSize:I0(d)})}const h=r[E];h&&i(h,d)}};if(r.EIP712Domain&&e&&i(r.EIP712Domain,e),t!=="EIP712Domain"){const a=r[t];i(a,u)}}function Ob({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},typeof(e==null?void 0:e.chainId)=="number"&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const f6="/docs/contract/encodeDeployData";function Ib({abi:e,args:u,bytecode:t}){if(!u||u.length===0)return t;const n=e.find(i=>"type"in i&&i.type==="constructor");if(!n)throw new MN({docsPath:f6});if(!("inputs"in n))throw new H7({docsPath:f6});if(!n.inputs||n.inputs.length===0)throw new H7({docsPath:f6});const r=Ic(n.inputs,u);return EC([t,r])}const dj=`Ethereum Signed Message: +`;function fj(e,u){const t=(()=>typeof e=="string"?sr(e):e.raw instanceof Uint8Array?e.raw:Fi(e.raw))(),n=sr(`${dj}${t.length}`);return pe(pr([n,t]),u)}function pj(e){return e.map(u=>({...u,value:BigInt(u.value)}))}function hj(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?se(e.nonce):void 0,storageProof:e.storageProof?pj(e.storageProof):void 0}}async function Cj(e,{address:u,blockNumber:t,blockTag:n,storageKeys:r}){const i=n??"latest",a=t!==void 0?Lu(t):void 0,s=await e.request({method:"eth_getProof",params:[u,r,a||i]});return hj(s)}async function mj(e,{address:u,blockNumber:t,blockTag:n="latest",slot:r}){const i=t!==void 0?Lu(t):void 0;return await e.request({method:"eth_getStorageAt",params:[u,r,i||n]})}async function zC(e,{blockHash:u,blockNumber:t,blockTag:n,hash:r,index:i}){var c,E,d;const a=n||"latest",s=t!==void 0?Lu(t):void 0;let o=null;if(r?o=await e.request({method:"eth_getTransactionByHash",params:[r]}):u?o=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[u,Lu(i)]}):(s||a)&&(o=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[s||a,Lu(i)]})),!o)throw new ob({blockHash:u,blockNumber:t,blockTag:a,hash:r,index:i});return(((d=(E=(c=e.chain)==null?void 0:c.formatters)==null?void 0:E.transaction)==null?void 0:d.format)||E1)(o)}async function Aj(e,{hash:u,transactionReceipt:t}){const[n,r]=await Promise.all([zu(e,Uc)({}),u?zu(e,zC)({hash:u}):void 0]),i=(t==null?void 0:t.blockNumber)||(r==null?void 0:r.blockNumber);return i?n-i+1n:0n}async function wp(e,{hash:u}){var r,i,a;const t=await e.request({method:"eth_getTransactionReceipt",params:[u]});if(!t)throw new lb({hash:u});return(((a=(i=(r=e.chain)==null?void 0:r.formatters)==null?void 0:i.transactionReceipt)==null?void 0:a.format)||Gv)(t)}async function gj(e,u){var h;const{allowFailure:t=!0,batchSize:n,blockNumber:r,blockTag:i,contracts:a,multicallAddress:s}=u,o=n??(typeof((h=e.batch)==null?void 0:h.multicall)=="object"&&e.batch.multicall.batchSize||1024);let l=s;if(!l){if(!e.chain)throw new Error("client chain not configured. multicallAddress is required.");l=Mo({blockNumber:r,chain:e.chain,contract:"multicall3"})}const c=[[]];let E=0,d=0;for(let g=0;g0&&d>o&&c[E].length>0&&(E++,d=(w.length-2)/2,c[E]=[]),c[E]=[...c[E],{allowFailure:!0,callData:w,target:m}]}catch(w){const v=Il(w,{abi:A,address:m,args:B,docsPath:"/docs/contract/multicall",functionName:F});if(!t)throw v;c[E]=[...c[E],{allowFailure:!0,callData:"0x",target:m}]}}const f=await Promise.allSettled(c.map(g=>zu(e,bi)({abi:Dp,address:l,args:[g],blockNumber:r,blockTag:i,functionName:"aggregate3"}))),p=[];for(let g=0;ge instanceof Uint8Array,Fj=Array.from({length:256},(e,u)=>u.toString(16).padStart(2,"0"));function fo(e){if(!x1(e))throw new Error("Uint8Array expected");let u="";for(let t=0;tn+r.length,0));let t=0;return e.forEach(n=>{if(!x1(n))throw new Error("Uint8Array expected");u.set(n,t),t+=n.length}),u}function zb(e,u){if(e.length!==u.length)return!1;for(let t=0;tNb;e>>=w1,u+=1);return u}function wj(e,u){return e>>BigInt(u)&w1}const xj=(e,u,t)=>e|(t?w1:Nb)<(yj<new Uint8Array(e),rA=e=>Uint8Array.from(e);function jb(e,u,t){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof u!="number"||u<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let n=p6(e),r=p6(e),i=0;const a=()=>{n.fill(1),r.fill(0),i=0},s=(...E)=>t(r,n,...E),o=(E=p6())=>{r=s(rA([0]),E),n=s(),E.length!==0&&(r=s(rA([1]),E),n=s())},l=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let E=0;const d=[];for(;E{a(),o(E);let f;for(;!(f=d(l()));)o();return a(),f}}const kj={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,u)=>u.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Wc(e,u,t={}){const n=(r,i,a)=>{const s=kj[i];if(typeof s!="function")throw new Error(`Invalid validator "${i}", expected function`);const o=e[r];if(!(a&&o===void 0)&&!s(o,e))throw new Error(`Invalid param ${String(r)}=${o} (${typeof o}), expected ${i}`)};for(const[r,i]of Object.entries(u))n(r,i,!1);for(const[r,i]of Object.entries(t))n(r,i,!0);return e}const _j=Object.freeze(Object.defineProperty({__proto__:null,bitGet:wj,bitLen:bj,bitMask:UC,bitSet:xj,bytesToHex:fo,bytesToNumberBE:Ta,bytesToNumberLE:MC,concatBytes:Rl,createHmacDrbg:jb,ensureBytes:Rt,equalBytes:zb,hexToBytes:po,hexToNumber:jC,numberToBytesBE:ho,numberToBytesLE:LC,numberToHexUnpadded:Rb,numberToVarBytesBE:Dj,utf8ToBytes:vj,validateObject:Wc},Symbol.toStringTag,{value:"Module"}));function Sj(e,u){const t=xn(e)?Fi(e):e,n=xn(u)?Fi(u):u;return zb(t,n)}async function Mb(e,{address:u,hash:t,signature:n,...r}){const i=xn(n)?n:Br(n);try{const{data:a}=await zu(e,y1)({data:Ib({abi:cz,args:[u,t,i],bytecode:Bj}),...r});return Sj(a??"0x0","0x1")}catch(a){if(a instanceof cb)return!1;throw a}}async function Pj(e,{address:u,message:t,signature:n,...r}){const i=fj(t);return Mb(e,{address:u,hash:i,signature:n,...r})}async function Tj(e,{address:u,signature:t,message:n,primaryType:r,types:i,domain:a,...s}){const o=oj({message:n,primaryType:r,types:i,domain:a});return Mb(e,{address:u,hash:o,signature:t,...s})}function Lb(e,{emitOnBegin:u=!1,emitMissed:t=!1,onBlockNumber:n,onError:r,poll:i,pollingInterval:a=e.pollingInterval}){const s=typeof i<"u"?i:e.transport.type!=="webSocket";let o;return s?(()=>{const E=ge(["watchBlockNumber",e.uid,u,t,a]);return Lo(E,{onBlockNumber:n,onError:r},d=>Lc(async()=>{var f;try{const p=await zu(e,Uc)({cacheTime:0});if(o){if(p===o)return;if(p-o>1&&t)for(let h=o+1n;ho)&&(d.onBlockNumber(p,o),o=p)}catch(p){(f=d.onError)==null||f.call(d,p)}},{emitOnBegin:u,interval:a}))})():(()=>{let E=!0,d=()=>E=!1;return(async()=>{try{const{unsubscribe:f}=await e.transport.subscribe({params:["newHeads"],onData(p){var g;if(!E)return;const h=Yn((g=p.result)==null?void 0:g.number);n(h,o),o=h},onError(p){r==null||r(p)}});d=f,E||d()}catch(f){r==null||r(f)}})(),d})()}async function Oj(e,{confirmations:u=1,hash:t,onReplaced:n,pollingInterval:r=e.pollingInterval,timeout:i}){const a=ge(["waitForTransactionReceipt",e.uid,t]);let s,o,l,c=!1;return new Promise((E,d)=>{i&&setTimeout(()=>d(new QR({hash:t})),i);const f=Lo(a,{onReplaced:n,resolve:E,reject:d},p=>{const h=zu(e,Lb)({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:r,async onBlockNumber(g){if(c)return;let A=g;const m=B=>{h(),B(),f()};try{if(l){if(u>1&&(!l.blockNumber||A-l.blockNumber+1np.resolve(l));return}if(s||(c=!0,await Ab(async()=>{s=await zu(e,zC)({hash:t}),s.blockNumber&&(A=s.blockNumber)},{delay:({count:B})=>~~(1<1&&(!l.blockNumber||A-l.blockNumber+1np.resolve(l))}catch(B){if(s&&(B instanceof ob||B instanceof lb))try{o=s;const w=(await zu(e,vi)({blockNumber:A,includeTransactions:!0})).transactions.find(({from:C,nonce:k})=>C===o.from&&k===o.nonce);if(!w||(l=await zu(e,wp)({hash:w.hash}),u>1&&(!l.blockNumber||A-l.blockNumber+1n{var C;(C=p.onReplaced)==null||C.call(p,{reason:v,replacedTransaction:o,transaction:w,transactionReceipt:l}),p.resolve(l)})}catch(F){m(()=>p.reject(F))}else m(()=>p.reject(B))}}})})})}function Ij(e,{blockTag:u="latest",emitMissed:t=!1,emitOnBegin:n=!1,onBlock:r,onError:i,includeTransactions:a,poll:s,pollingInterval:o=e.pollingInterval}){const l=typeof s<"u"?s:e.transport.type!=="webSocket",c=a??!1;let E;return l?(()=>{const p=ge(["watchBlocks",e.uid,t,n,c,o]);return Lo(p,{onBlock:r,onError:i},h=>Lc(async()=>{var g;try{const A=await zu(e,vi)({blockTag:u,includeTransactions:c});if(A.number&&(E!=null&&E.number)){if(A.number===E.number)return;if(A.number-E.number>1&&t)for(let m=(E==null?void 0:E.number)+1n;mE.number)&&(h.onBlock(A,E),E=A)}catch(A){(g=h.onError)==null||g.call(h,A)}},{emitOnBegin:n,interval:o}))})():(()=>{let p=!0,h=()=>p=!1;return(async()=>{try{const{unsubscribe:g}=await e.transport.subscribe({params:["newHeads"],onData(A){var F,w,v;if(!p)return;const B=(((v=(w=(F=e.chain)==null?void 0:F.formatters)==null?void 0:w.block)==null?void 0:v.format)||cC)(A.result);r(B,E),E=B},onError(A){i==null||i(A)}});h=g,p||h()}catch(g){i==null||i(g)}})(),h})()}function Nj(e,{address:u,args:t,batch:n=!0,event:r,events:i,onError:a,onLogs:s,poll:o,pollingInterval:l=e.pollingInterval,strict:c}){const E=typeof o<"u"?o:e.transport.type!=="webSocket",d=c??!1;return E?(()=>{const h=ge(["watchEvent",u,t,n,e.uid,r,l]);return Lo(h,{onLogs:s,onError:a},g=>{let A,m,B=!1;const F=Lc(async()=>{var w;if(!B){try{m=await zu(e,wb)({address:u,args:t,event:r,events:i,strict:d})}catch{}B=!0;return}try{let v;if(m)v=await zu(e,F1)({filter:m});else{const C=await zu(e,Uc)({});A&&A!==C?v=await zu(e,SC)({address:u,args:t,event:r,events:i,fromBlock:A+1n,toBlock:C}):v=[],A=C}if(v.length===0)return;n?g.onLogs(v):v.forEach(C=>g.onLogs([C]))}catch(v){m&&v instanceof Wa&&(B=!1),(w=g.onError)==null||w.call(g,v)}},{emitOnBegin:!0,interval:l});return async()=>{m&&await zu(e,D1)({filter:m}),F()}})})():(()=>{let h=!0,g=()=>h=!1;return(async()=>{try{const A=i??(r?[r]:void 0);let m=[];A&&(m=[A.flatMap(F=>Rc({abi:[F],eventName:F.name,args:t}))],r&&(m=m[0]));const{unsubscribe:B}=await e.transport.subscribe({params:["logs",{address:u,topics:m}],onData(F){var v;if(!h)return;const w=F.result;try{const{eventName:C,args:k}=Mc({abi:A,data:w.data,topics:w.topics,strict:d}),j=Jt(w,{args:k,eventName:C});s([j])}catch(C){let k,j;if(C instanceof $a||C instanceof No){if(c)return;k=C.abiItem.name,j=(v=C.abiItem.inputs)==null?void 0:v.some(uu=>!("name"in uu&&uu.name))}const N=Jt(w,{args:j?[]:{},eventName:k});s([N])}},onError(F){a==null||a(F)}});g=B,h||g()}catch(A){a==null||a(A)}})(),g})()}function Rj(e,{batch:u=!0,onError:t,onTransactions:n,poll:r,pollingInterval:i=e.pollingInterval}){return(typeof r<"u"?r:e.transport.type!=="webSocket")?(()=>{const l=ge(["watchPendingTransactions",e.uid,u,i]);return Lo(l,{onTransactions:n,onError:t},c=>{let E;const d=Lc(async()=>{var f;try{if(!E)try{E=await zu(e,xb)({});return}catch(h){throw d(),h}const p=await zu(e,F1)({filter:E});if(p.length===0)return;u?c.onTransactions(p):p.forEach(h=>c.onTransactions([h]))}catch(p){(f=c.onError)==null||f.call(c,p)}},{emitOnBegin:!0,interval:i});return async()=>{E&&await zu(e,D1)({filter:E}),d()}})})():(()=>{let l=!0,c=()=>l=!1;return(async()=>{try{const{unsubscribe:E}=await e.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!l)return;const f=d.result;n([f])},onError(d){t==null||t(d)}});c=E,l||c()}catch(E){t==null||t(E)}})(),c})()}function zj(e){return{call:u=>y1(e,u),createBlockFilter:()=>Xz(e),createContractEventFilter:u=>ib(e,u),createEventFilter:u=>wb(e,u),createPendingTransactionFilter:()=>xb(e),estimateContractGas:u=>sz(e,u),estimateGas:u=>_C(e,u),getBalance:u=>uj(e,u),getBlock:u=>vi(e,u),getBlockNumber:u=>Uc(e,u),getBlockTransactionCount:u=>ej(e,u),getBytecode:u=>tj(e,u),getChainId:()=>Nl(e),getContractEvents:u=>fb(e,u),getEnsAddress:u=>zz(e,u),getEnsAvatar:u=>Jz(e,u),getEnsName:u=>Zz(e,u),getEnsResolver:u=>Yz(e,u),getEnsText:u=>bb(e,u),getFeeHistory:u=>rj(e,u),estimateFeesPerGas:u=>iz(e,u),getFilterChanges:u=>F1(e,u),getFilterLogs:u=>ij(e,u),getGasPrice:()=>kC(e),getLogs:u=>SC(e,u),getProof:u=>Cj(e,u),estimateMaxPriorityFeePerGas:u=>rz(e,u),getStorageAt:u=>mj(e,u),getTransaction:u=>zC(e,u),getTransactionConfirmations:u=>Aj(e,u),getTransactionCount:u=>db(e,u),getTransactionReceipt:u=>wp(e,u),multicall:u=>gj(e,u),prepareTransactionRequest:u=>B1(e,u),readContract:u=>bi(e,u),sendRawTransaction:u=>TC(e,u),simulateContract:u=>Cz(e,u),verifyMessage:u=>Pj(e,u),verifyTypedData:u=>Tj(e,u),uninstallFilter:u=>D1(e,u),waitForTransactionReceipt:u=>Oj(e,u),watchBlocks:u=>Ij(e,u),watchBlockNumber:u=>Lb(e,u),watchContractEvent:u=>Dz(e,u),watchEvent:u=>Nj(e,u),watchPendingTransactions:u=>Rj(e,u)}}function iA(e){const{key:u="public",name:t="Public Client"}=e;return mb({...e,key:u,name:t,type:"publicClient"}).extend(zj)}function jj(e,{abi:u,args:t,bytecode:n,...r}){const i=Ib({abi:u,args:t,bytecode:n});return OC(e,{...r,data:i})}async function Mj(e){var t;return((t=e.account)==null?void 0:t.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"})).map(n=>BC(n))}async function Lj(e){return await e.request({method:"wallet_getPermissions"})}async function Uj(e){return(await e.request({method:"eth_requestAccounts"})).map(t=>oe(t))}async function $j(e,u){return e.request({method:"wallet_requestPermissions",params:[u]})}async function Wj(e,{account:u=e.account,message:t}){if(!u)throw new zo({docsPath:"/docs/actions/wallet/signMessage"});const n=kt(u);if(n.type==="local")return n.signMessage({message:t});const r=(()=>typeof t=="string"?aC(t):t.raw instanceof Uint8Array?Br(t.raw):t.raw)();return e.request({method:"personal_sign",params:[r,n.address]})}async function qj(e,u){var l,c,E,d;const{account:t=e.account,chain:n=e.chain,...r}=u;if(!t)throw new zo({docsPath:"/docs/actions/wallet/signTransaction"});const i=kt(t);jc({account:i,...u});const a=await zu(e,Nl)({});n!==null&&Cb({currentChainId:a,chain:n});const s=(n==null?void 0:n.formatters)||((l=e.chain)==null?void 0:l.formatters),o=((c=s==null?void 0:s.transactionRequest)==null?void 0:c.format)||d1;return i.type==="local"?i.signTransaction({...r,chainId:a},{serializer:(d=(E=e.chain)==null?void 0:E.serializers)==null?void 0:d.transaction}):await e.request({method:"eth_signTransaction",params:[{...o(r),chainId:Lu(a),from:i.address}]})}async function Hj(e,{account:u=e.account,domain:t,message:n,primaryType:r,types:i}){if(!u)throw new zo({docsPath:"/docs/actions/wallet/signTypedData"});const a=kt(u),s={EIP712Domain:Ob({domain:t}),...i};if(Tb({domain:t,message:n,primaryType:r,types:s}),a.type==="local")return a.signTypedData({domain:t,primaryType:r,types:s,message:n});const o=ge({domain:t??{},primaryType:r,types:s,message:n},(l,c)=>xn(c)?c.toLowerCase():c);return e.request({method:"eth_signTypedData_v4",params:[a.address,o]})}async function Gj(e,{id:u}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:Lu(u)}]})}async function Qj(e,u){return await e.request({method:"wallet_watchAsset",params:u})}function Kj(e){return{addChain:u=>wz(e,u),deployContract:u=>jj(e,u),getAddresses:()=>Mj(e),getChainId:()=>Nl(e),getPermissions:()=>Lj(e),prepareTransactionRequest:u=>B1(e,u),requestAddresses:()=>Uj(e),requestPermissions:u=>$j(e,u),sendRawTransaction:u=>TC(e,u),sendTransaction:u=>OC(e,u),signMessage:u=>Wj(e,u),signTransaction:u=>qj(e,u),signTypedData:u=>Hj(e,u),switchChain:u=>Gj(e,u),watchAsset:u=>Qj(e,u),writeContract:u=>bz(e,u)}}function qc(e){const{key:u="wallet",name:t="Wallet Client",transport:n}=e;return mb({...e,key:u,name:t,transport:i=>n({...i,retryCount:0}),type:"walletClient"}).extend(Kj)}function Vj(e,u={}){const{key:t="webSocket",name:n="WebSocket JSON-RPC",retryDelay:r}=u;return({chain:i,retryCount:a,timeout:s})=>{var E;const o=u.retryCount??a,l=s??u.timeout??1e4,c=e||((E=i==null?void 0:i.rpcUrls.default.webSocket)==null?void 0:E[0]);if(!c)throw new Bb;return v1({key:t,name:n,async request({method:d,params:f}){const p={method:d,params:f},h=await d6(c),{error:g,result:A}=await Zs.webSocketAsync(h,{body:p,timeout:l});if(g)throw new vC({body:p,error:g,url:c});return A},retryCount:o,retryDelay:r,timeout:l,type:"webSocket"},{getSocket(){return d6(c)},async subscribe({params:d,onData:f,onError:p}){const h=await d6(c),{result:g}=await new Promise((A,m)=>Zs.webSocket(h,{body:{method:"eth_subscribe",params:d},onResponse(B){if(B.error){m(B.error),p==null||p(B.error);return}if(typeof B.id=="number"){A(B);return}B.method==="eth_subscription"&&f(B.params)}}));return{subscriptionId:g,async unsubscribe(){return new Promise(A=>Zs.webSocket(h,{body:{method:"eth_unsubscribe",params:[g]},onResponse:A}))}}}})}}function Jj(e,u,t,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(u,t,n);const r=BigInt(32),i=BigInt(4294967295),a=Number(t>>r&i),s=Number(t&i),o=n?4:0,l=n?0:4;e.setUint32(u+o,a,n),e.setUint32(u+l,s,n)}class Zj extends pC{constructor(u,t,n,r){super(),this.blockLen=u,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(u),this.view=s6(this.buffer)}update(u){co(this);const{view:t,buffer:n,blockLen:r}=this;u=C1(u);const i=u.length;for(let a=0;ar-a&&(this.process(n,0),a=0);for(let E=a;Ec.length)throw new Error("_sha2: outputLen bigger than state");for(let E=0;Ee&u^~e&t,Xj=(e,u,t)=>e&u^e&t^u&t,uM=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),xr=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),kr=new Uint32Array(64);class eM extends Zj{constructor(){super(64,32,8,!1),this.A=xr[0]|0,this.B=xr[1]|0,this.C=xr[2]|0,this.D=xr[3]|0,this.E=xr[4]|0,this.F=xr[5]|0,this.G=xr[6]|0,this.H=xr[7]|0}get(){const{A:u,B:t,C:n,D:r,E:i,F:a,G:s,H:o}=this;return[u,t,n,r,i,a,s,o]}set(u,t,n,r,i,a,s,o){this.A=u|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=s|0,this.H=o|0}process(u,t){for(let E=0;E<16;E++,t+=4)kr[E]=u.getUint32(t,!1);for(let E=16;E<64;E++){const d=kr[E-15],f=kr[E-2],p=nn(d,7)^nn(d,18)^d>>>3,h=nn(f,17)^nn(f,19)^f>>>10;kr[E]=h+kr[E-7]+p+kr[E-16]|0}let{A:n,B:r,C:i,D:a,E:s,F:o,G:l,H:c}=this;for(let E=0;E<64;E++){const d=nn(s,6)^nn(s,11)^nn(s,25),f=c+d+Yj(s,o,l)+uM[E]+kr[E]|0,h=(nn(n,2)^nn(n,13)^nn(n,22))+Xj(n,r,i)|0;c=l,l=o,o=s,s=a+f|0,a=i,i=r,r=n,n=f+h|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,s=s+this.E|0,o=o+this.F|0,l=l+this.G|0,c=c+this.H|0,this.set(n,r,i,a,s,o,l,c)}roundClean(){kr.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const tM=Yv(()=>new eM);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const L0=BigInt(0),F0=BigInt(1),Wi=BigInt(2),nM=BigInt(3),xp=BigInt(4),aA=BigInt(5),sA=BigInt(8);BigInt(9);BigInt(16);function we(e,u){const t=e%u;return t>=L0?t:u+t}function rM(e,u,t){if(t<=L0||u 0");if(t===F0)return L0;let n=F0;for(;u>L0;)u&F0&&(n=n*e%t),e=e*e%t,u>>=F0;return n}function nt(e,u,t){let n=e;for(;u-- >L0;)n*=n,n%=t;return n}function kp(e,u){if(e===L0||u<=L0)throw new Error(`invert: expected positive integers, got n=${e} mod=${u}`);let t=we(e,u),n=u,r=L0,i=F0;for(;t!==L0;){const s=n/t,o=n%t,l=r-i*s;n=t,t=o,r=i,i=l}if(n!==F0)throw new Error("invert: does not exist");return we(r,u)}function iM(e){const u=(e-F0)/Wi;let t,n,r;for(t=e-F0,n=0;t%Wi===L0;t/=Wi,n++);for(r=Wi;r(n[r]="function",n),u);return Wc(e,t)}function lM(e,u,t){if(t 0");if(t===L0)return e.ONE;if(t===F0)return u;let n=e.ONE,r=u;for(;t>L0;)t&F0&&(n=e.mul(n,r)),r=e.sqr(r),t>>=F0;return n}function cM(e,u){const t=new Array(u.length),n=u.reduce((i,a,s)=>e.is0(a)?i:(t[s]=i,e.mul(i,a)),e.ONE),r=e.inv(n);return u.reduceRight((i,a,s)=>e.is0(a)?i:(t[s]=e.mul(i,t[s]),e.mul(i,a)),r),t}function Ub(e,u){const t=u!==void 0?u:e.toString(2).length,n=Math.ceil(t/8);return{nBitLength:t,nByteLength:n}}function EM(e,u,t=!1,n={}){if(e<=L0)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:r,nByteLength:i}=Ub(e,u);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=aM(e),s=Object.freeze({ORDER:e,BITS:r,BYTES:i,MASK:UC(r),ZERO:L0,ONE:F0,create:o=>we(o,e),isValid:o=>{if(typeof o!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof o}`);return L0<=o&&oo===L0,isOdd:o=>(o&F0)===F0,neg:o=>we(-o,e),eql:(o,l)=>o===l,sqr:o=>we(o*o,e),add:(o,l)=>we(o+l,e),sub:(o,l)=>we(o-l,e),mul:(o,l)=>we(o*l,e),pow:(o,l)=>lM(s,o,l),div:(o,l)=>we(o*kp(l,e),e),sqrN:o=>o*o,addN:(o,l)=>o+l,subN:(o,l)=>o-l,mulN:(o,l)=>o*l,inv:o=>kp(o,e),sqrt:n.sqrt||(o=>a(s,o)),invertBatch:o=>cM(s,o),cmov:(o,l,c)=>c?l:o,toBytes:o=>t?LC(o,i):ho(o,i),fromBytes:o=>{if(o.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${o.length}`);return t?MC(o):Ta(o)}});return Object.freeze(s)}function $b(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const u=e.toString(2).length;return Math.ceil(u/8)}function Wb(e){const u=$b(e);return u+Math.ceil(u/2)}function dM(e,u,t=!1){const n=e.length,r=$b(u),i=Wb(u);if(n<16||n1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);const a=t?Ta(e):MC(e),s=we(a,u-F0)+F0;return t?LC(s,r):ho(s,r)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const fM=BigInt(0),h6=BigInt(1);function pM(e,u){const t=(r,i)=>{const a=i.negate();return r?a:i},n=r=>{const i=Math.ceil(u/r)+1,a=2**(r-1);return{windows:i,windowSize:a}};return{constTimeNegate:t,unsafeLadder(r,i){let a=e.ZERO,s=r;for(;i>fM;)i&h6&&(a=a.add(s)),s=s.double(),i>>=h6;return a},precomputeWindow(r,i){const{windows:a,windowSize:s}=n(i),o=[];let l=r,c=l;for(let E=0;E>=f,g>o&&(g-=d,a+=h6);const A=h,m=h+Math.abs(g)-1,B=p%2!==0,F=g<0;g===0?c=c.add(t(B,i[A])):l=l.add(t(F,i[m]))}return{p:l,f:c}},wNAFCached(r,i,a,s){const o=r._WINDOW_SIZE||1;let l=i.get(r);return l||(l=this.precomputeWindow(r,o),o!==1&&i.set(r,s(l))),this.wNAF(o,l,a)}}}function qb(e){return oM(e.Fp),Wc(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Ub(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function hM(e){const u=qb(e);Wc(u,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:t,Fp:n,a:r}=u;if(t){if(!n.eql(r,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...u})}const{bytesToNumberBE:CM,hexToBytes:mM}=_j,Zi={Err:class extends Error{constructor(u=""){super(u)}},_parseInt(e){const{Err:u}=Zi;if(e.length<2||e[0]!==2)throw new u("Invalid signature integer tag");const t=e[1],n=e.subarray(2,t+2);if(!t||n.length!==t)throw new u("Invalid signature integer: wrong length");if(n[0]&128)throw new u("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new u("Invalid signature integer: unnecessary leading zero");return{d:CM(n),l:e.subarray(t+2)}},toSig(e){const{Err:u}=Zi,t=typeof e=="string"?mM(e):e;if(!(t instanceof Uint8Array))throw new Error("ui8a expected");let n=t.length;if(n<2||t[0]!=48)throw new u("Invalid signature tag");if(t[1]!==n-2)throw new u("Invalid signature: incorrect length");const{d:r,l:i}=Zi._parseInt(t.subarray(2)),{d:a,l:s}=Zi._parseInt(i);if(s.length)throw new u("Invalid signature: left bytes after parsing");return{r,s:a}},hexFromSig(e){const u=l=>Number.parseInt(l[0],16)&8?"00"+l:l,t=l=>{const c=l.toString(16);return c.length&1?`0${c}`:c},n=u(t(e.s)),r=u(t(e.r)),i=n.length/2,a=r.length/2,s=t(i),o=t(a);return`30${t(a+i+4)}02${o}${r}02${s}${n}`}},Xn=BigInt(0),Ct=BigInt(1);BigInt(2);const oA=BigInt(3);BigInt(4);function AM(e){const u=hM(e),{Fp:t}=u,n=u.toBytes||((p,h,g)=>{const A=h.toAffine();return Rl(Uint8Array.from([4]),t.toBytes(A.x),t.toBytes(A.y))}),r=u.fromBytes||(p=>{const h=p.subarray(1),g=t.fromBytes(h.subarray(0,t.BYTES)),A=t.fromBytes(h.subarray(t.BYTES,2*t.BYTES));return{x:g,y:A}});function i(p){const{a:h,b:g}=u,A=t.sqr(p),m=t.mul(A,p);return t.add(t.add(m,t.mul(p,h)),g)}if(!t.eql(t.sqr(u.Gy),i(u.Gx)))throw new Error("bad generator point: equation left != right");function a(p){return typeof p=="bigint"&&Xnt.eql(B,t.ZERO);return m(g)&&m(A)?E.ZERO:new E(g,A,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){const g=t.invertBatch(h.map(A=>A.pz));return h.map((A,m)=>A.toAffine(g[m])).map(E.fromAffine)}static fromHex(h){const g=E.fromAffine(r(Rt("pointHex",h)));return g.assertValidity(),g}static fromPrivateKey(h){return E.BASE.multiply(o(h))}_setWindowSize(h){this._WINDOW_SIZE=h,l.delete(this)}assertValidity(){if(this.is0()){if(u.allowInfinityPoint&&!t.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:h,y:g}=this.toAffine();if(!t.isValid(h)||!t.isValid(g))throw new Error("bad point: x or y not FE");const A=t.sqr(g),m=i(h);if(!t.eql(A,m))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:h}=this.toAffine();if(t.isOdd)return!t.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){c(h);const{px:g,py:A,pz:m}=this,{px:B,py:F,pz:w}=h,v=t.eql(t.mul(g,w),t.mul(B,m)),C=t.eql(t.mul(A,w),t.mul(F,m));return v&&C}negate(){return new E(this.px,t.neg(this.py),this.pz)}double(){const{a:h,b:g}=u,A=t.mul(g,oA),{px:m,py:B,pz:F}=this;let w=t.ZERO,v=t.ZERO,C=t.ZERO,k=t.mul(m,m),j=t.mul(B,B),N=t.mul(F,F),uu=t.mul(m,B);return uu=t.add(uu,uu),C=t.mul(m,F),C=t.add(C,C),w=t.mul(h,C),v=t.mul(A,N),v=t.add(w,v),w=t.sub(j,v),v=t.add(j,v),v=t.mul(w,v),w=t.mul(uu,w),C=t.mul(A,C),N=t.mul(h,N),uu=t.sub(k,N),uu=t.mul(h,uu),uu=t.add(uu,C),C=t.add(k,k),k=t.add(C,k),k=t.add(k,N),k=t.mul(k,uu),v=t.add(v,k),N=t.mul(B,F),N=t.add(N,N),k=t.mul(N,uu),w=t.sub(w,k),C=t.mul(N,j),C=t.add(C,C),C=t.add(C,C),new E(w,v,C)}add(h){c(h);const{px:g,py:A,pz:m}=this,{px:B,py:F,pz:w}=h;let v=t.ZERO,C=t.ZERO,k=t.ZERO;const j=u.a,N=t.mul(u.b,oA);let uu=t.mul(g,B),ou=t.mul(A,F),su=t.mul(m,w),mu=t.add(g,A),tu=t.add(B,F);mu=t.mul(mu,tu),tu=t.add(uu,ou),mu=t.sub(mu,tu),tu=t.add(g,m);let au=t.add(B,w);return tu=t.mul(tu,au),au=t.add(uu,su),tu=t.sub(tu,au),au=t.add(A,m),v=t.add(F,w),au=t.mul(au,v),v=t.add(ou,su),au=t.sub(au,v),k=t.mul(j,tu),v=t.mul(N,su),k=t.add(v,k),v=t.sub(ou,k),k=t.add(ou,k),C=t.mul(v,k),ou=t.add(uu,uu),ou=t.add(ou,uu),su=t.mul(j,su),tu=t.mul(N,tu),ou=t.add(ou,su),su=t.sub(uu,su),su=t.mul(j,su),tu=t.add(tu,su),uu=t.mul(ou,tu),C=t.add(C,uu),uu=t.mul(au,tu),v=t.mul(mu,v),v=t.sub(v,uu),uu=t.mul(mu,ou),k=t.mul(au,k),k=t.add(k,uu),new E(v,C,k)}subtract(h){return this.add(h.negate())}is0(){return this.equals(E.ZERO)}wNAF(h){return f.wNAFCached(this,l,h,g=>{const A=t.invertBatch(g.map(m=>m.pz));return g.map((m,B)=>m.toAffine(A[B])).map(E.fromAffine)})}multiplyUnsafe(h){const g=E.ZERO;if(h===Xn)return g;if(s(h),h===Ct)return this;const{endo:A}=u;if(!A)return f.unsafeLadder(this,h);let{k1neg:m,k1:B,k2neg:F,k2:w}=A.splitScalar(h),v=g,C=g,k=this;for(;B>Xn||w>Xn;)B&Ct&&(v=v.add(k)),w&Ct&&(C=C.add(k)),k=k.double(),B>>=Ct,w>>=Ct;return m&&(v=v.negate()),F&&(C=C.negate()),C=new E(t.mul(C.px,A.beta),C.py,C.pz),v.add(C)}multiply(h){s(h);let g=h,A,m;const{endo:B}=u;if(B){const{k1neg:F,k1:w,k2neg:v,k2:C}=B.splitScalar(g);let{p:k,f:j}=this.wNAF(w),{p:N,f:uu}=this.wNAF(C);k=f.constTimeNegate(F,k),N=f.constTimeNegate(v,N),N=new E(t.mul(N.px,B.beta),N.py,N.pz),A=k.add(N),m=j.add(uu)}else{const{p:F,f:w}=this.wNAF(g);A=F,m=w}return E.normalizeZ([A,m])[0]}multiplyAndAddUnsafe(h,g,A){const m=E.BASE,B=(w,v)=>v===Xn||v===Ct||!w.equals(m)?w.multiplyUnsafe(v):w.multiply(v),F=B(this,g).add(B(h,A));return F.is0()?void 0:F}toAffine(h){const{px:g,py:A,pz:m}=this,B=this.is0();h==null&&(h=B?t.ONE:t.inv(m));const F=t.mul(g,h),w=t.mul(A,h),v=t.mul(m,h);if(B)return{x:t.ZERO,y:t.ZERO};if(!t.eql(v,t.ONE))throw new Error("invZ was invalid");return{x:F,y:w}}isTorsionFree(){const{h,isTorsionFree:g}=u;if(h===Ct)return!0;if(g)return g(E,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h,clearCofactor:g}=u;return h===Ct?this:g?g(E,this):this.multiplyUnsafe(u.h)}toRawBytes(h=!0){return this.assertValidity(),n(E,this,h)}toHex(h=!0){return fo(this.toRawBytes(h))}}E.BASE=new E(u.Gx,u.Gy,t.ONE),E.ZERO=new E(t.ZERO,t.ONE,t.ZERO);const d=u.nBitLength,f=pM(E,u.endo?Math.ceil(d/2):d);return{CURVE:u,ProjectivePoint:E,normPrivateKeyToScalar:o,weierstrassEquation:i,isWithinCurveOrder:a}}function gM(e){const u=qb(e);return Wc(u,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...u})}function BM(e){const u=gM(e),{Fp:t,n}=u,r=t.BYTES+1,i=2*t.BYTES+1;function a(tu){return Xnfo(ho(tu,u.nByteLength));function p(tu){const au=n>>Ct;return tu>au}function h(tu){return p(tu)?s(-tu):tu}const g=(tu,au,nu)=>Ta(tu.slice(au,nu));class A{constructor(au,nu,H){this.r=au,this.s=nu,this.recovery=H,this.assertValidity()}static fromCompact(au){const nu=u.nByteLength;return au=Rt("compactSignature",au,nu*2),new A(g(au,0,nu),g(au,nu,2*nu))}static fromDER(au){const{r:nu,s:H}=Zi.toSig(Rt("DER",au));return new A(nu,H)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(au){return new A(this.r,this.s,au)}recoverPublicKey(au){const{r:nu,s:H,recovery:iu}=this,lu=C(Rt("msgHash",au));if(iu==null||![0,1,2,3].includes(iu))throw new Error("recovery id invalid");const Eu=iu===2||iu===3?nu+u.n:nu;if(Eu>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const hu=iu&1?"03":"02",fu=l.fromHex(hu+f(Eu)),Z=o(Eu),Su=s(-lu*Z),wu=s(H*Z),xu=l.BASE.multiplyAndAddUnsafe(fu,Su,wu);if(!xu)throw new Error("point at infinify");return xu.assertValidity(),xu}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new A(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return po(this.toDERHex())}toDERHex(){return Zi.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return po(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const m={isValidPrivateKey(tu){try{return c(tu),!0}catch{return!1}},normPrivateKeyToScalar:c,randomPrivateKey:()=>{const tu=Wb(u.n);return dM(u.randomBytes(tu),u.n)},precompute(tu=8,au=l.BASE){return au._setWindowSize(tu),au.multiply(BigInt(3)),au}};function B(tu,au=!0){return l.fromPrivateKey(tu).toRawBytes(au)}function F(tu){const au=tu instanceof Uint8Array,nu=typeof tu=="string",H=(au||nu)&&tu.length;return au?H===r||H===i:nu?H===2*r||H===2*i:tu instanceof l}function w(tu,au,nu=!0){if(F(tu))throw new Error("first arg must be private key");if(!F(au))throw new Error("second arg must be public key");return l.fromHex(au).multiply(c(tu)).toRawBytes(nu)}const v=u.bits2int||function(tu){const au=Ta(tu),nu=tu.length*8-u.nBitLength;return nu>0?au>>BigInt(nu):au},C=u.bits2int_modN||function(tu){return s(v(tu))},k=UC(u.nBitLength);function j(tu){if(typeof tu!="bigint")throw new Error("bigint expected");if(!(Xn<=tu&&tuNu in nu))throw new Error("sign() legacy options not supported");const{hash:H,randomBytes:iu}=u;let{lowS:lu,prehash:Eu,extraEntropy:hu}=nu;lu==null&&(lu=!0),tu=Rt("msgHash",tu),Eu&&(tu=Rt("prehashed msgHash",H(tu)));const fu=C(tu),Z=c(au),Su=[j(Z),j(fu)];if(hu!=null){const Nu=hu===!0?iu(t.BYTES):hu;Su.push(Rt("extraEntropy",Nu))}const wu=Rl(...Su),xu=fu;function ku(Nu){const S=v(Nu);if(!d(S))return;const O=o(S),I=l.BASE.multiply(S).toAffine(),W=s(I.x);if(W===Xn)return;const U=s(O*s(xu+W*Z));if(U===Xn)return;let Q=(I.x===W?0:2)|Number(I.y&Ct),Y=U;return lu&&p(U)&&(Y=h(U),Q^=1),new A(W,Y,Q)}return{seed:wu,k2sig:ku}}const uu={lowS:u.lowS,prehash:!1},ou={lowS:u.lowS,prehash:!1};function su(tu,au,nu=uu){const{seed:H,k2sig:iu}=N(tu,au,nu),lu=u;return jb(lu.hash.outputLen,lu.nByteLength,lu.hmac)(H,iu)}l.BASE._setWindowSize(8);function mu(tu,au,nu,H=ou){var I;const iu=tu;if(au=Rt("msgHash",au),nu=Rt("publicKey",nu),"strict"in H)throw new Error("options.strict was renamed to lowS");const{lowS:lu,prehash:Eu}=H;let hu,fu;try{if(typeof iu=="string"||iu instanceof Uint8Array)try{hu=A.fromDER(iu)}catch(W){if(!(W instanceof Zi.Err))throw W;hu=A.fromCompact(iu)}else if(typeof iu=="object"&&typeof iu.r=="bigint"&&typeof iu.s=="bigint"){const{r:W,s:U}=iu;hu=new A(W,U)}else throw new Error("PARSE");fu=l.fromHex(nu)}catch(W){if(W.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(lu&&hu.hasHighS())return!1;Eu&&(au=u.hash(au));const{r:Z,s:Su}=hu,wu=C(au),xu=o(Su),ku=s(wu*xu),Nu=s(Z*xu),S=(I=l.BASE.multiplyAndAddUnsafe(fu,ku,Nu))==null?void 0:I.toAffine();return S?s(S.x)===Z:!1}return{CURVE:u,getPublicKey:B,getSharedSecret:w,sign:su,verify:mu,ProjectivePoint:l,Signature:A,utils:m}}let Hb=class extends pC{constructor(u,t){super(),this.finished=!1,this.destroyed=!1,uR(u);const n=C1(t);if(this.iHash=u.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?u.create().update(n).digest():n);for(let a=0;anew Hb(e,u).update(t).digest();Gb.create=(e,u)=>new Hb(e,u);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function yM(e){return{hash:e,hmac:(u,...t)=>Gb(e,u,cR(...t)),randomBytes:ER}}function FM(e,u){const t=n=>BM({...e,...yM(n)});return Object.freeze({...t(u),create:t})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Qb=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),lA=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),DM=BigInt(1),_p=BigInt(2),cA=(e,u)=>(e+u/_p)/u;function vM(e){const u=Qb,t=BigInt(3),n=BigInt(6),r=BigInt(11),i=BigInt(22),a=BigInt(23),s=BigInt(44),o=BigInt(88),l=e*e*e%u,c=l*l*e%u,E=nt(c,t,u)*c%u,d=nt(E,t,u)*c%u,f=nt(d,_p,u)*l%u,p=nt(f,r,u)*f%u,h=nt(p,i,u)*p%u,g=nt(h,s,u)*h%u,A=nt(g,o,u)*g%u,m=nt(A,s,u)*h%u,B=nt(m,t,u)*c%u,F=nt(B,a,u)*p%u,w=nt(F,n,u)*l%u,v=nt(w,_p,u);if(!Sp.eql(Sp.sqr(v),e))throw new Error("Cannot find square root");return v}const Sp=EM(Qb,void 0,void 0,{sqrt:vM}),Sr=FM({a:BigInt(0),b:BigInt(7),Fp:Sp,n:lA,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const u=lA,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-DM*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),r=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=t,a=BigInt("0x100000000000000000000000000000000"),s=cA(i*e,u),o=cA(-n*e,u);let l=we(e-s*t-o*r,u),c=we(-s*n-o*i,u);const E=l>a,d=c>a;if(E&&(l=u-l),d&&(c=u-c),l>a||c>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:E,k1:l,k2neg:d,k2:c}}}},tM);BigInt(0);Sr.ProjectivePoint;const bM=iC({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),$C=iC({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),wM=iC({id:420,name:"Optimism Goerli",network:"optimism-goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-goerli.g.alchemy.com/v2"],webSocket:["wss://opt-goerli.g.alchemy.com/v2"]},infura:{http:["https://optimism-goerli.infura.io/v3"],webSocket:["wss://optimism-goerli.infura.io/ws/v3"]},default:{http:["https://goerli.optimism.io"]},public:{http:["https://goerli.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"},default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461}},testnet:!0},{formatters:xN});var Kb=class extends Error{constructor({chainId:e,connectorId:u}){super(`Chain "${e}" not configured for connector "${u}".`),this.name="ChainNotConfiguredForConnectorError"}},ke=class extends Error{constructor(){super(...arguments),this.name="ConnectorNotFoundError",this.message="Connector not found"}};function qa(e){return typeof e=="string"?Number.parseInt(e,e.trim().substring(0,2)==="0x"?16:10):typeof e=="bigint"?Number(e):e}var Vb={exports:{}};(function(e){var u=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(o,l,c){this.fn=o,this.context=l,this.once=c||!1}function i(o,l,c,E,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var f=new r(c,E||o,d),p=t?t+l:l;return o._events[p]?o._events[p].fn?o._events[p]=[o._events[p],f]:o._events[p].push(f):(o._events[p]=f,o._eventsCount++),o}function a(o,l){--o._eventsCount===0?o._events=new n:delete o._events[l]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],c,E;if(this._eventsCount===0)return l;for(E in c=this._events)u.call(c,E)&&l.push(t?E.slice(1):E);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},s.prototype.listeners=function(l){var c=t?t+l:l,E=this._events[c];if(!E)return[];if(E.fn)return[E.fn];for(var d=0,f=E.length,p=new Array(f);d{if(!u.has(e))throw TypeError("Cannot "+t)},Hu=(e,u,t)=>(WC(e,u,"read from private field"),t?t.call(e):u.get(e)),S0=(e,u,t)=>{if(u.has(e))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(e):u.set(e,t)},hr=(e,u,t,n)=>(WC(e,u,"write to private field"),n?n.call(e,t):u.set(e,t),t),k0=(e,u,t)=>(WC(e,u,"access private method"),t),Hc=class extends kM{constructor({chains:e=[$C,bM],options:u}){super(),this.chains=e,this.options=u}getBlockExplorerUrls(e){const{default:u,...t}=e.blockExplorers??{};if(u)return[u.url,...Object.values(t).map(n=>n.url)]}isChainUnsupported(e){return!this.chains.some(u=>u.id===e)}setStorage(e){this.storage=e}};function _M(e){var t;if(!e)return"Injected";const u=n=>{if(n.isApexWallet)return"Apex Wallet";if(n.isAvalanche)return"Core Wallet";if(n.isBackpack)return"Backpack";if(n.isBifrost)return"Bifrost Wallet";if(n.isBitKeep)return"BitKeep";if(n.isBitski)return"Bitski";if(n.isBlockWallet)return"BlockWallet";if(n.isBraveWallet)return"Brave Wallet";if(n.isCoin98)return"Coin98 Wallet";if(n.isCoinbaseWallet)return"Coinbase Wallet";if(n.isDawn)return"Dawn Wallet";if(n.isDefiant)return"Defiant";if(n.isDesig)return"Desig Wallet";if(n.isEnkrypt)return"Enkrypt";if(n.isExodus)return"Exodus";if(n.isFordefi)return"Fordefi";if(n.isFrame)return"Frame";if(n.isFrontier)return"Frontier Wallet";if(n.isGamestop)return"GameStop Wallet";if(n.isHaqqWallet)return"HAQQ Wallet";if(n.isHyperPay)return"HyperPay Wallet";if(n.isImToken)return"ImToken";if(n.isHaloWallet)return"Halo Wallet";if(n.isKuCoinWallet)return"KuCoin Wallet";if(n.isMathWallet)return"MathWallet";if(n.isNovaWallet)return"Nova Wallet";if(n.isOkxWallet||n.isOKExWallet)return"OKX Wallet";if(n.isOneInchIOSWallet||n.isOneInchAndroidWallet)return"1inch Wallet";if(n.isOpera)return"Opera";if(n.isPhantom)return"Phantom";if(n.isPortal)return"Ripio Portal";if(n.isRabby)return"Rabby Wallet";if(n.isRainbow)return"Rainbow";if(n.isSafePal)return"SafePal Wallet";if(n.isStatus)return"Status";if(n.isSubWallet)return"SubWallet";if(n.isTalisman)return"Talisman";if(n.isTally)return"Taho";if(n.isTokenPocket)return"TokenPocket";if(n.isTokenary)return"Tokenary";if(n.isTrust||n.isTrustWallet)return"Trust Wallet";if(n.isTTWallet)return"TTWallet";if(n.isXDEFI)return"XDEFI Wallet";if(n.isZeal)return"Zeal";if(n.isZerion)return"Zerion";if(n.isMetaMask)return"MetaMask"};if((t=e.providers)!=null&&t.length){const n=new Set;let r=1;for(const a of e.providers){let s=u(a);s||(s=`Unknown Wallet #${r}`,r+=1),n.add(s)}const i=[...n];return i.length?i:i[0]??"Injected"}return u(e)??"Injected"}var c9,Co=class extends Hc{constructor({chains:e,options:u}={}){const t={shimDisconnect:!0,getProvider(){if(typeof window>"u")return;const r=window.ethereum;return r!=null&&r.providers&&r.providers.length>0?r.providers[0]:r},...u};super({chains:e,options:t}),this.id="injected",S0(this,c9,void 0),this.shimDisconnectKey=`${this.id}.shimDisconnect`,this.onAccountsChanged=r=>{r.length===0?this.emit("disconnect"):this.emit("change",{account:oe(r[0])})},this.onChainChanged=r=>{const i=qa(r),a=this.isChainUnsupported(i);this.emit("change",{chain:{id:i,unsupported:a}})},this.onDisconnect=async r=>{var i;r.code===1013&&await this.getProvider()&&await this.getAccount()||(this.emit("disconnect"),this.options.shimDisconnect&&((i=this.storage)==null||i.removeItem(this.shimDisconnectKey)))};const n=t.getProvider();if(typeof t.name=="string")this.name=t.name;else if(n){const r=_M(n);t.name?this.name=t.name(r):typeof r=="string"?this.name=r:this.name=r[0]}else this.name="Injected";this.ready=!!n}async connect({chainId:e}={}){var u;try{const t=await this.getProvider();if(!t)throw new ke;t.on&&(t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const n=await t.request({method:"eth_requestAccounts"}),r=oe(n[0]);let i=await this.getChainId(),a=this.isChainUnsupported(i);return e&&i!==e&&(i=(await this.switchChain(e)).id,a=this.isChainUnsupported(i)),this.options.shimDisconnect&&((u=this.storage)==null||u.setItem(this.shimDisconnectKey,!0)),{account:r,chain:{id:i,unsupported:a}}}catch(t){throw this.isUserRejectedRequestError(t)?new O0(t):t.code===-32002?new Di(t):t}}async disconnect(){var u;const e=await this.getProvider();e!=null&&e.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&((u=this.storage)==null||u.removeItem(this.shimDisconnectKey)))}async getAccount(){const e=await this.getProvider();if(!e)throw new ke;const u=await e.request({method:"eth_accounts"});return oe(u[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new ke;return e.request({method:"eth_chainId"}).then(qa)}async getProvider(){const e=this.options.getProvider();return e&&hr(this,c9,e),Hu(this,c9)}async getWalletClient({chainId:e}={}){const[u,t]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find(r=>r.id===e);if(!u)throw new Error("provider is required.");return qc({account:t,chain:n,transport:$c(u)})}async isAuthorized(){var e;try{if(this.options.shimDisconnect&&!((e=this.storage)!=null&&e.getItem(this.shimDisconnectKey)))return!1;if(!await this.getProvider())throw new ke;return!!await this.getAccount()}catch{return!1}}async switchChain(e){var n,r,i;const u=await this.getProvider();if(!u)throw new ke;const t=Lu(e);try{return await Promise.all([u.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]}),new Promise(a=>this.on("change",({chain:s})=>{(s==null?void 0:s.id)===e&&a()}))]),this.chains.find(a=>a.id===e)??{id:e,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(a){const s=this.chains.find(o=>o.id===e);if(!s)throw new Kb({chainId:e,connectorId:this.id});if(a.code===4902||((r=(n=a==null?void 0:a.data)==null?void 0:n.originalError)==null?void 0:r.code)===4902)try{if(await u.request({method:"wallet_addEthereumChain",params:[{chainId:t,chainName:s.name,nativeCurrency:s.nativeCurrency,rpcUrls:[((i=s.rpcUrls.public)==null?void 0:i.http[0])??""],blockExplorerUrls:this.getBlockExplorerUrls(s)}]}),await this.getChainId()!==e)throw new O0(new Error("User rejected switch after adding network."));return s}catch(o){throw new O0(o)}throw this.isUserRejectedRequestError(a)?new O0(a):new kn(a)}}async watchAsset({address:e,decimals:u=18,image:t,symbol:n}){const r=await this.getProvider();if(!r)throw new ke;return r.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:u,image:t,symbol:n}}})}isUserRejectedRequestError(e){return e.code===4001}};c9=new WeakMap;var qC=(e,u,t)=>{if(!u.has(e))throw TypeError("Cannot "+t)},C6=(e,u,t)=>(qC(e,u,"read from private field"),t?t.call(e):u.get(e)),m6=(e,u,t)=>{if(u.has(e))throw TypeError("Cannot add the same private member more than once");u instanceof WeakSet?u.add(e):u.set(e,t)},IE=(e,u,t,n)=>(qC(e,u,"write to private field"),n?n.call(e,t):u.set(e,t),t),SM=(e,u,t)=>(qC(e,u,"access private method"),t);const PM=e=>(u,t,n)=>{const r=n.subscribe;return n.subscribe=(a,s,o)=>{let l=a;if(s){const c=(o==null?void 0:o.equalityFn)||Object.is;let E=a(n.getState());l=d=>{const f=a(d);if(!c(E,f)){const p=E;s(E=f,p)}},o!=null&&o.fireImmediately&&s(E,E)}return r(l)},e(u,t,n)},TM=PM;function OM(e,u){let t;try{t=e()}catch{return}return{getItem:r=>{var i;const a=o=>o===null?null:JSON.parse(o,u==null?void 0:u.reviver),s=(i=t.getItem(r))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(r,i)=>t.setItem(r,JSON.stringify(i,u==null?void 0:u.replacer)),removeItem:r=>t.removeItem(r)}}const zl=e=>u=>{try{const t=e(u);return t instanceof Promise?t:{then(n){return zl(n)(t)},catch(n){return this}}}catch(t){return{then(n){return this},catch(n){return zl(n)(t)}}}},IM=(e,u)=>(t,n,r)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,A)=>({...A,...g}),...u},a=!1;const s=new Set,o=new Set;let l;try{l=i.getStorage()}catch{}if(!l)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),t(...g)},n,r);const c=zl(i.serialize),E=()=>{const g=i.partialize({...n()});let A;const m=c({state:g,version:i.version}).then(B=>l.setItem(i.name,B)).catch(B=>{A=B});if(A)throw A;return m},d=r.setState;r.setState=(g,A)=>{d(g,A),E()};const f=e((...g)=>{t(...g),E()},n,r);let p;const h=()=>{var g;if(!l)return;a=!1,s.forEach(m=>m(n()));const A=((g=i.onRehydrateStorage)==null?void 0:g.call(i,n()))||void 0;return zl(l.getItem.bind(l))(i.name).then(m=>{if(m)return i.deserialize(m)}).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==i.version){if(i.migrate)return i.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var B;return p=i.merge(m,(B=n())!=null?B:f),t(p,!0),E()}).then(()=>{A==null||A(p,void 0),a=!0,o.forEach(m=>m(p))}).catch(m=>{A==null||A(void 0,m)})};return r.persist={setOptions:g=>{i={...i,...g},g.getStorage&&(l=g.getStorage())},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(o.add(g),()=>{o.delete(g)})},h(),p||f},NM=(e,u)=>(t,n,r)=>{let i={storage:OM(()=>localStorage),partialize:h=>h,version:0,merge:(h,g)=>({...g,...h}),...u},a=!1;const s=new Set,o=new Set;let l=i.storage;if(!l)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),t(...h)},n,r);const c=()=>{const h=i.partialize({...n()});return l.setItem(i.name,{state:h,version:i.version})},E=r.setState;r.setState=(h,g)=>{E(h,g),c()};const d=e((...h)=>{t(...h),c()},n,r);let f;const p=()=>{var h,g;if(!l)return;a=!1,s.forEach(m=>{var B;return m((B=n())!=null?B:d)});const A=((g=i.onRehydrateStorage)==null?void 0:g.call(i,(h=n())!=null?h:d))||void 0;return zl(l.getItem.bind(l))(i.name).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==i.version){if(i.migrate)return i.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var B;return f=i.merge(m,(B=n())!=null?B:d),t(f,!0),c()}).then(()=>{A==null||A(f,void 0),f=n(),a=!0,o.forEach(m=>m(f))}).catch(m=>{A==null||A(void 0,m)})};return r.persist={setOptions:h=>{i={...i,...h},h.storage&&(l=h.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>p(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(o.add(h),()=>{o.delete(h)})},i.skipHydration||p(),f||d},RM=(e,u)=>"getStorage"in u||"serialize"in u||"deserialize"in u?IM(e,u):NM(e,u),zM=RM,EA=e=>{let u;const t=new Set,n=(o,l)=>{const c=typeof o=="function"?o(u):o;if(!Object.is(c,u)){const E=u;u=l??typeof c!="object"?c:Object.assign({},u,c),t.forEach(d=>d(u,E))}},r=()=>u,s={setState:n,getState:r,subscribe:o=>(t.add(o),()=>t.delete(o)),destroy:()=>{t.clear()}};return u=e(n,r,s),s},jM=e=>e?EA(e):EA;function Jb(e,u){if(Object.is(e,u))return!0;if(typeof e!="object"||e===null||typeof u!="object"||u===null)return!1;if(e instanceof Map&&u instanceof Map){if(e.size!==u.size)return!1;for(const[n,r]of e)if(!Object.is(r,u.get(n)))return!1;return!0}if(e instanceof Set&&u instanceof Set){if(e.size!==u.size)return!1;for(const n of e)if(!u.has(n))return!1;return!0}const t=Object.keys(e);if(t.length!==Object.keys(u).length)return!1;for(let n=0;nh===E.id)||(o=[...o,p.chain]),l[E.id]=[...l[E.id]||[],...p.rpcUrls.http],p.rpcUrls.webSocket&&(c[E.id]=[...c[E.id]||[],...p.rpcUrls.webSocket]))}if(!d)throw new Error([`Could not find valid provider configuration for chain "${E.name}". +`,"You may need to add `jsonRpcProvider` to `configureChains` with the chain's RPC URLs.","Read more: https://wagmi.sh/core/providers/jsonRpc"].join(` +`))}return{chains:o,publicClient:({chainId:E})=>{const d=o.find(h=>h.id===E)??e[0],f=l[d.id];if(!f||!f[0])throw new Error(`No providers configured for chain "${d.id}"`);const p=iA({batch:t,chain:d,transport:eA(f.map(h=>Iz(h,{timeout:s})),{rank:r,retryCount:i,retryDelay:a}),pollingInterval:n});return Object.assign(p,{chains:o})},webSocketPublicClient:({chainId:E})=>{const d=o.find(h=>h.id===E)??e[0],f=c[d.id];if(!f||!f[0])return;const p=iA({batch:t,chain:d,transport:eA(f.map(h=>Vj(h,{timeout:s})),{rank:r,retryCount:i,retryDelay:a}),pollingInterval:n});return Object.assign(p,{chains:o})}}}var LM=class extends Error{constructor({activeChain:e,targetChain:u}){super(`Chain mismatch: Expected "${u}", received "${e}".`),this.name="ChainMismatchError"}},UM=class extends Error{constructor({chainId:e,connectorId:u}){super(`Chain "${e}" not configured${u?` for connector "${u}"`:""}.`),this.name="ChainNotConfigured"}},$M=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},WM=class extends Error{constructor(){super(...arguments),this.name="ConfigChainsNotFound",this.message="No chains were found on the wagmi config. Some functions that require a chain may not work."}},qM=class extends Error{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}};function s2(e,u){if(e===u)return!0;if(e&&u&&typeof e=="object"&&typeof u=="object"){if(e.constructor!==u.constructor)return!1;let t,n;if(Array.isArray(e)&&Array.isArray(u)){if(t=e.length,t!=u.length)return!1;for(n=t;n--!==0;)if(!s2(e[n],u[n]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===u.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===u.toString();const r=Object.keys(e);if(t=r.length,t!==Object.keys(u).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(u,r[n]))return!1;for(n=t;n--!==0;){const i=r[n];if(i&&!s2(e[i],u[i]))return!1}return!0}return e!==e&&u!==u}var Pp=(e,{find:u,replace:t})=>e&&u(e)?t(e):typeof e!="object"?e:Array.isArray(e)?e.map(n=>Pp(n,{find:u,replace:t})):e instanceof Object?Object.entries(e).reduce((n,[r,i])=>({...n,[r]:Pp(i,{find:u,replace:t})}),{}):e;function HM(e){const u=JSON.parse(e);return Pp(u,{find:n=>typeof n=="string"&&n.startsWith("#bigint."),replace:n=>BigInt(n.replace("#bigint.",""))})}function GM(e){return{accessList:e.accessList,account:e.account,blockNumber:e.blockNumber,blockTag:e.blockTag,data:e.data,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,to:e.to,value:e.value}}function QM(e){return{accessList:e.accessList,account:e.account,data:e.data,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,to:e.to,value:e.value}}function dA(e){return typeof e=="number"?e:e==="wei"?0:Math.abs(ON[e])}function fA(e,u){return e.slice(0,u).join(".")||"."}function pA(e,u){const{length:t}=e;for(let n=0;n{const a=typeof i=="bigint"?`#bigint.${i.toString()}`:i;return(u==null?void 0:u(r,a))||a},n),t??void 0)}var Zb={getItem:e=>"",setItem:(e,u)=>null,removeItem:e=>null};function Yb({deserialize:e=HM,key:u="wagmi",serialize:t=VM,storage:n}){return{...n,getItem:(r,i=null)=>{const a=n.getItem(`${u}.${r}`);try{return a?e(a):i}catch(s){return console.warn(s),i}},setItem:(r,i)=>{if(i===null)n.removeItem(`${u}.${r}`);else try{n.setItem(`${u}.${r}`,t(i))}catch(a){console.error(a)}},removeItem:r=>n.removeItem(`${u}.${r}`)}}var hA="store",hs,b3,Tp,Xb,JM=class{constructor({autoConnect:e=!1,connectors:u=[new Co],publicClient:t,storage:n=Yb({storage:typeof window<"u"?window.localStorage:Zb}),logger:r={warn:console.warn},webSocketPublicClient:i}){var l,c;m6(this,Tp),this.publicClients=new Map,this.webSocketPublicClients=new Map,m6(this,hs,void 0),m6(this,b3,void 0),this.args={autoConnect:e,connectors:u,logger:r,publicClient:t,storage:n,webSocketPublicClient:i};let a="disconnected",s;if(e)try{const E=n.getItem(hA),d=(l=E==null?void 0:E.state)==null?void 0:l.data;a=d!=null&&d.account?"reconnecting":"connecting",s=(c=d==null?void 0:d.chain)==null?void 0:c.id}catch{}const o=typeof u=="function"?u():u;o.forEach(E=>E.setStorage(n)),this.store=jM(TM(zM(()=>({connectors:o,publicClient:this.getPublicClient({chainId:s}),status:a,webSocketPublicClient:this.getWebSocketPublicClient({chainId:s})}),{name:hA,storage:n,partialize:E=>{var d,f;return{...e&&{data:{account:(d=E==null?void 0:E.data)==null?void 0:d.account,chain:(f=E==null?void 0:E.data)==null?void 0:f.chain}},chains:E==null?void 0:E.chains}},version:2}))),this.storage=n,IE(this,b3,n==null?void 0:n.getItem("wallet")),SM(this,Tp,Xb).call(this),e&&typeof window<"u"&&setTimeout(async()=>await this.autoConnect(),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){var e,u;return(u=(e=this.data)==null?void 0:e.chain)==null?void 0:u.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const u=typeof e=="function"?e(this.store.getState()):e;this.store.setState(u,!0)}clearState(){this.setState(e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"}))}async destroy(){var e,u;this.connector&&await((u=(e=this.connector).disconnect)==null?void 0:u.call(e)),IE(this,hs,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(C6(this,hs))return;IE(this,hs,!0),this.setState(t=>{var n;return{...t,status:(n=t.data)!=null&&n.account?"reconnecting":"connecting"}});const e=C6(this,b3)?[...this.connectors].sort(t=>t.id===C6(this,b3)?-1:1):this.connectors;let u=!1;for(const t of e){if(!t.ready||!t.isAuthorized||!await t.isAuthorized())continue;const r=await t.connect();this.setState(i=>({...i,connector:t,chains:t==null?void 0:t.chains,data:r,status:"connected"})),u=!0;break}return u||this.setState(t=>({...t,data:void 0,status:"disconnected"})),IE(this,hs,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const u=typeof e=="function"?e():e;u.forEach(t=>t.setStorage(this.args.storage)),this.setState(t=>({...t,connectors:u}))}getPublicClient({chainId:e}={}){let u=this.publicClients.get(-1);if(u&&(u==null?void 0:u.chain.id)===e||(u=this.publicClients.get(e??-1),u))return u;const{publicClient:t}=this.args;return u=typeof t=="function"?t({chainId:e}):t,this.publicClients.set(e??-1,u),u}setPublicClient(e){var t,n;const u=(n=(t=this.data)==null?void 0:t.chain)==null?void 0:n.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState(r=>({...r,publicClient:this.getPublicClient({chainId:u})}))}getWebSocketPublicClient({chainId:e}={}){let u=this.webSocketPublicClients.get(-1);if(u&&(u==null?void 0:u.chain.id)===e||(u=this.webSocketPublicClients.get(e??-1),u))return u;const{webSocketPublicClient:t}=this.args;return u=typeof t=="function"?t({chainId:e}):t,u&&this.webSocketPublicClients.set(e??-1,u),u}setWebSocketPublicClient(e){var t,n;const u=(n=(t=this.data)==null?void 0:t.chain)==null?void 0:n.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState(r=>({...r,webSocketPublicClient:this.getWebSocketPublicClient({chainId:u})}))}setLastUsedConnector(e=null){var u;(u=this.storage)==null||u.setItem("wallet",e)}};hs=new WeakMap;b3=new WeakMap;Tp=new WeakSet;Xb=function(){const e=s=>{this.setState(o=>({...o,data:{...o.data,...s}}))},u=()=>{this.clearState()},t=s=>{this.setState(o=>({...o,error:s}))};this.store.subscribe(({connector:s})=>s,(s,o)=>{var l,c,E,d,f,p;(l=o==null?void 0:o.off)==null||l.call(o,"change",e),(c=o==null?void 0:o.off)==null||c.call(o,"disconnect",u),(E=o==null?void 0:o.off)==null||E.call(o,"error",t),s&&((d=s.on)==null||d.call(s,"change",e),(f=s.on)==null||f.call(s,"disconnect",u),(p=s.on)==null||p.call(s,"error",t))});const{publicClient:n,webSocketPublicClient:r}=this.args;(typeof n=="function"||typeof r=="function")&&this.store.subscribe(({data:s})=>{var o;return(o=s==null?void 0:s.chain)==null?void 0:o.id},s=>{this.setState(o=>({...o,publicClient:this.getPublicClient({chainId:s}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:s})}))})};var Op;function ZM(e){const u=new JM(e);return Op=u,u}function ut(){if(!Op)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return Op}async function YM({chainId:e,connector:u}){const t=ut(),n=t.connector;if(n&&u.id===n.id)throw new $M;try{t.setState(i=>({...i,status:"connecting"}));const r=await u.connect({chainId:e});return t.setLastUsedConnector(u.id),t.setState(i=>({...i,connector:u,chains:u==null?void 0:u.chains,data:r,status:"connected"})),t.storage.setItem("connected",!0),{...r,connector:u}}catch(r){throw t.setState(i=>({...i,status:i.connector?"connected":"disconnected"})),r}}async function XM(){const e=ut();e.connector&&await e.connector.disconnect(),e.clearState(),e.storage.removeItem("connected")}var uL=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],eL=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];function xt({chainId:e}={}){const u=ut();return e&&u.getPublicClient({chainId:e})||u.publicClient}async function HC({chainId:e}={}){var n,r;return await((r=(n=ut().connector)==null?void 0:n.getWalletClient)==null?void 0:r.call(n,{chainId:e}))||null}function Ip({chainId:e}={}){const u=ut();return e&&u.getWebSocketPublicClient({chainId:e})||u.webSocketPublicClient}function tL(e,u){const t=ut(),n=async()=>u(xt(e));return t.subscribe(({publicClient:i})=>i,n)}function nL(e,u){const t=ut(),n=async()=>u(Ip(e));return t.subscribe(({webSocketPublicClient:i})=>i,n)}async function rL({abi:e,address:u,args:t,chainId:n,dataSuffix:r,functionName:i,walletClient:a,...s}){const o=xt({chainId:n}),l=a??await HC({chainId:n});if(!l)throw new ke;n&&tw({chainId:n});const{account:c,accessList:E,blockNumber:d,blockTag:f,gas:p,gasPrice:h,maxFeePerGas:g,maxPriorityFeePerGas:A,nonce:m,value:B}=GM(s),{result:F,request:w}=await o.simulateContract({abi:e,address:u,functionName:i,args:t,account:c||l.account,accessList:E,blockNumber:d,blockTag:f,dataSuffix:r,gas:p,gasPrice:h,maxFeePerGas:g,maxPriorityFeePerGas:A,nonce:m,value:B}),v=e.filter(C=>"name"in C&&C.name===i);return{mode:"prepared",request:{...w,abi:v,chainId:n},result:F}}async function iL({chainId:e,contracts:u,blockNumber:t,blockTag:n,...r}){const i=xt({chainId:e});if(!i.chains)throw new WM;if(e&&i.chain.id!==e)throw new UM({chainId:e});return i.multicall({allowFailure:r.allowFailure??!0,blockNumber:t,blockTag:n,contracts:u})}async function uw({address:e,account:u,chainId:t,abi:n,args:r,functionName:i,blockNumber:a,blockTag:s}){return xt({chainId:t}).readContract({abi:n,address:e,account:u,functionName:i,args:r,blockNumber:a,blockTag:s})}async function aL({contracts:e,blockNumber:u,blockTag:t,...n}){const{allowFailure:r=!0}=n;try{const i=xt(),a=e.reduce((c,E,d)=>{const f=E.chainId??i.chain.id;return{...c,[f]:[...c[f]||[],{contract:E,index:d}]}},{}),s=()=>Object.entries(a).map(([c,E])=>iL({allowFailure:r,chainId:parseInt(c),contracts:E.map(({contract:d})=>d),blockNumber:u,blockTag:t})),o=(await Promise.all(s())).flat(),l=Object.values(a).flatMap(c=>c.map(({index:E})=>E));return o.reduce((c,E,d)=>(c&&(c[l[d]]=E),c),[])}catch(i){if(i instanceof FC)throw i;const a=()=>e.map(s=>uw({...s,blockNumber:u,blockTag:t}));return r?(await Promise.allSettled(a())).map(s=>s.status==="fulfilled"?{result:s.value,status:"success"}:{error:s.reason,result:void 0,status:"failure"}):await Promise.all(a())}}async function CA(e){const u=await HC({chainId:e.chainId});if(!u)throw new ke;e.chainId&&tw({chainId:e.chainId});let t;if(e.mode==="prepared")t=e.request;else{const{chainId:r,mode:i,...a}=e;t=(await rL(a)).request}return{hash:await u.writeContract({...t,chain:e.chainId?{id:e.chainId}:null})}}async function sL({address:e,chainId:u,formatUnits:t,token:n}){const r=ut(),i=xt({chainId:u});if(n){const l=async({abi:c})=>{const E={abi:c,address:n,chainId:u},[d,f,p]=await aL({allowFailure:!1,contracts:[{...E,functionName:"balanceOf",args:[e]},{...E,functionName:"decimals"},{...E,functionName:"symbol"}]});return{decimals:f,formatted:u2(d??"0",dA(t??f)),symbol:p,value:d}};try{return await l({abi:uL})}catch(c){if(c instanceof FC){const{symbol:E,...d}=await l({abi:eL});return{symbol:oC(Pa(E,{dir:"right"})),...d}}throw c}}const a=[...r.publicClient.chains||[],...r.chains??[]],s=await i.getBalance({address:e}),o=a.find(l=>l.id===i.chain.id);return{decimals:(o==null?void 0:o.nativeCurrency.decimals)??18,formatted:u2(s??"0",dA(t??18)),symbol:(o==null?void 0:o.nativeCurrency.symbol)??"ETH",value:s}}function ew(){const{data:e,connector:u,status:t}=ut();switch(t){case"connected":return{address:e==null?void 0:e.account,connector:u,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:t};case"reconnecting":return{address:e==null?void 0:e.account,connector:u,isConnected:!!(e!=null&&e.account),isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:t};case"connecting":return{address:e==null?void 0:e.account,connector:u,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:t};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:t}}}function GC(){var r,i,a,s;const e=ut(),u=(i=(r=e.data)==null?void 0:r.chain)==null?void 0:i.id,t=e.chains??[],n=[...((a=e.publicClient)==null?void 0:a.chains)||[],...t].find(o=>o.id===u)??{id:u,name:`Chain ${u}`,network:`${u}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:u?{...n,...(s=e.data)==null?void 0:s.chain,id:u}:void 0,chains:t}}async function oL(e){const u=await HC();if(!u)throw new ke;return await u.signMessage({message:e.message})}async function lL({chainId:e}){const{connector:u}=ut();if(!u)throw new ke;if(!u.switchChain)throw new qM({connector:u});return u.switchChain(e)}function cL(e,{selector:u=t=>t}={}){const t=ut(),n=()=>e(ew());return t.subscribe(({data:i,connector:a,status:s})=>u({address:i==null?void 0:i.account,connector:a,status:s}),n,{equalityFn:Jb})}function EL(e,{selector:u=t=>t}={}){const t=ut(),n=()=>e(GC());return t.subscribe(({data:i,chains:a})=>{var s;return u({chainId:(s=i==null?void 0:i.chain)==null?void 0:s.id,chains:a})},n,{equalityFn:Jb})}async function dL({name:e,chainId:u}){const{normalize:t}=await Uu(()=>import("./index-aa193446.js"),[]);return await xt({chainId:u}).getEnsAvatar({name:t(e)})}async function fL({address:e,chainId:u}){return xt({chainId:u}).getEnsName({address:oe(e)})}async function pL({chainId:e}={}){return await xt({chainId:e}).getBlockNumber()}async function hL({chainId:e,confirmations:u=1,hash:t,onReplaced:n,timeout:r=0}){const i=xt({chainId:e}),a=await i.waitForTransactionReceipt({hash:t,confirmations:u,onReplaced:n,timeout:r});if(a.status==="reverted"){const s=await i.getTransaction({hash:a.transactionHash}),o=await i.call({...s,gasPrice:s.type!=="eip1559"?s.gasPrice:void 0,maxFeePerGas:s.type==="eip1559"?s.maxFeePerGas:void 0,maxPriorityFeePerGas:s.type==="eip1559"?s.maxPriorityFeePerGas:void 0}),l=oC(`0x${o.substring(138)}`);throw new Error(l)}return a}function tw({chainId:e}){var r,i;const{chain:u,chains:t}=GC(),n=u==null?void 0:u.id;if(n&&e!==n)throw new LM({activeChain:((r=t.find(a=>a.id===n))==null?void 0:r.name)??`Chain ${n}`,targetChain:((i=t.find(a=>a.id===e))==null?void 0:i.name)??`Chain ${e}`})}var nw={exports:{}},rw={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var k1=M,CL=nC;function mL(e,u){return e===u&&(e!==0||1/e===1/u)||e!==e&&u!==u}var AL=typeof Object.is=="function"?Object.is:mL,gL=CL.useSyncExternalStore,BL=k1.useRef,yL=k1.useEffect,FL=k1.useMemo,DL=k1.useDebugValue;rw.useSyncExternalStoreWithSelector=function(e,u,t,n,r){var i=BL(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=FL(function(){function o(f){if(!l){if(l=!0,c=f,f=n(f),r!==void 0&&a.hasValue){var p=a.value;if(r(p,f))return E=p}return E=f}if(p=E,AL(c,f))return p;var h=n(f);return r!==void 0&&r(p,h)?p:(c=f,E=h)}var l=!1,c,E,d=t===void 0?null:t;return[function(){return o(u())},d===null?void 0:function(){return o(d())}]},[u,t,n,r]);var s=gL(e,i[0],i[1]);return yL(function(){a.hasValue=!0,a.value=s},[s]),DL(s),s};nw.exports=rw;var QC=nw.exports;function vL({queryClient:e=new kT({defaultOptions:{queries:{cacheTime:1e3*60*60*24,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:u=Yb({storage:typeof window<"u"&&window.localStorage?window.localStorage:Zb}),persister:t=typeof window<"u"?fT({key:"cache",storage:u,serialize:r=>r,deserialize:r=>r}):void 0,...n}){const r=ZM({...n,storage:u});return t&&lN({queryClient:e,persister:t,dehydrateOptions:{shouldDehydrateQuery:i=>i.cacheTime!==0&&i.queryKey[0].persist!==!1}}),Object.assign(r,{queryClient:e})}var iw=M.createContext(void 0),_1=M.createContext(void 0);function bL({children:e,config:u}){return M.createElement(iw.Provider,{children:M.createElement(GI,{children:e,client:u.queryClient,context:_1}),value:u})}function S1(){const e=M.useContext(iw);if(!e)throw new Error(["`useConfig` must be used within `WagmiConfig`.\n","Read more: https://wagmi.sh/react/WagmiConfig"].join(` +`));return e}var wL=nC.useSyncExternalStore;function xL(e){return Array.isArray(e)}function kL(e){if(!mA(e))return!1;const u=e.constructor;if(typeof u>"u")return!0;const t=u.prototype;return!(!mA(t)||!t.hasOwnProperty("isPrototypeOf"))}function mA(e){return Object.prototype.toString.call(e)==="[object Object]"}function _L(e,u,t){return xL(e)?typeof u=="function"?{...t,queryKey:e,queryFn:u}:{...u,queryKey:e}:e}function SL(e){return JSON.stringify(e,(u,t)=>kL(t)?Object.keys(t).sort().reduce((n,r)=>(n[r]=t[r],n),{}):typeof t=="bigint"?t.toString():t)}function PL(e,u){return typeof e=="function"?e(...u):!!e}function TL(e,u){const t={};return Object.keys(e).forEach(n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(u.trackedProps.add(n),e[n])})}),t}function OL(e,u){const t=rC({context:e.context}),n=QI(),r=JI(),i=t.defaultQueryOptions({...e,queryKeyHashFn:SL});i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=B0.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=B0.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=B0.batchCalls(i.onSettled)),i.suspense&&typeof i.staleTime!="number"&&(i.staleTime=1e3),(i.suspense||i.useErrorBoundary)&&(r.isReset()||(i.retryOnMount=!1));const[a]=M.useState(()=>new u(t,i)),s=a.getOptimisticResult(i);if(wL(M.useCallback(E=>n?()=>{}:a.subscribe(B0.batchCalls(E)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),M.useEffect(()=>{r.clearReset()},[r]),M.useEffect(()=>{a.setOptions(i,{listeners:!1})},[i,a]),i.suspense&&s.isLoading&&s.isFetching&&!n)throw a.fetchOptimistic(i).then(({data:E})=>{var d,f;(d=i.onSuccess)==null||d.call(i,E),(f=i.onSettled)==null||f.call(i,E,null)}).catch(E=>{var d,f;r.clearReset(),(d=i.onError)==null||d.call(i,E),(f=i.onSettled)==null||f.call(i,void 0,E)});if(s.isError&&!r.isReset()&&!s.isFetching&&PL(i.useErrorBoundary,[s.error,a.getCurrentQuery()]))throw s.error;const o=s.status==="loading"&&s.fetchStatus==="idle"?"idle":s.status,l=o==="idle",c=o==="loading"&&s.fetchStatus==="fetching";return{...s,defaultedOptions:i,isIdle:l,isLoading:c,observer:a,status:o}}function Gc(e,u,t){const n=bF(e,u,t);return YI({context:_1,...n})}function Uo(e,u,t){const n=_L(e,u,t),r=OL({context:_1,...n},_T),i={data:r.data,error:r.error,fetchStatus:r.fetchStatus,isError:r.isError,isFetched:r.isFetched,isFetchedAfterMount:r.isFetchedAfterMount,isFetching:r.isFetching,isIdle:r.isIdle,isLoading:r.isLoading,isRefetching:r.isRefetching,isSuccess:r.isSuccess,refetch:r.refetch,status:r.status,internal:{dataUpdatedAt:r.dataUpdatedAt,errorUpdatedAt:r.errorUpdatedAt,failureCount:r.failureCount,isFetchedAfterMount:r.isFetchedAfterMount,isLoadingError:r.isLoadingError,isPaused:r.isPaused,isPlaceholderData:r.isPlaceholderData,isPreviousData:r.isPreviousData,isRefetchError:r.isRefetchError,isStale:r.isStale,remove:r.remove}};return r.defaultedOptions.notifyOnChangeProps?i:TL(i,r.observer)}var aw=()=>rC({context:_1});function Qc({chainId:e}={}){return QC.useSyncExternalStoreWithSelector(u=>tL({chainId:e},u),()=>xt({chainId:e}),()=>xt({chainId:e}),u=>u,(u,t)=>u.uid===t.uid)}function sw({chainId:e}={}){return QC.useSyncExternalStoreWithSelector(u=>nL({chainId:e},u),()=>Ip({chainId:e}),()=>Ip({chainId:e}),u=>u,(u,t)=>(u==null?void 0:u.uid)===(t==null?void 0:t.uid))}function $o({chainId:e}={}){return Qc({chainId:e}).chain.id}function IL(){const[,e]=M.useReducer(u=>u+1,0);return e}function AA({chainId:e,scopeKey:u}){return[{entity:"blockNumber",chainId:e,scopeKey:u}]}function NL({queryKey:[{chainId:e}]}){return pL({chainId:e})}function KC({cacheTime:e=0,chainId:u,enabled:t=!0,scopeKey:n,staleTime:r,suspense:i,watch:a=!1,onBlock:s,onError:o,onSettled:l,onSuccess:c}={}){const E=$o({chainId:u}),d=Qc({chainId:E}),f=sw({chainId:E}),p=aw();return M.useEffect(()=>!t||!a&&!s?void 0:(f??d).watchBlockNumber({onBlockNumber:A=>{a&&p.setQueryData(AA({chainId:E,scopeKey:n}),A),s&&s(A)},emitOnBegin:!0}),[E,n,s,d,p,a,f,t]),Uo(AA({scopeKey:n,chainId:E}),NL,{cacheTime:e,enabled:t,staleTime:r,suspense:i,onError:o,onSettled:l,onSuccess:c})}function ow({chainId:e,enabled:u,queryKey:t}){const n=aw(),r=M.useCallback(()=>n.invalidateQueries({queryKey:t},{cancelRefetch:!1}),[n,t]);KC({chainId:e,enabled:u,onBlock:u?r:void 0,scopeKey:u?void 0:"idle"})}var A6=e=>typeof e=="object"&&!Array.isArray(e);function lw(e,u,t=u,n=s2){const r=M.useRef([]),i=QC.useSyncExternalStoreWithSelector(e,u,t,a=>a,(a,s)=>{if(A6(a)&&A6(s)&&r.current.length){for(const o of r.current)if(!n(a[o],s[o]))return!1;return!0}return n(a,s)});if(A6(i)){const a={...i};return Object.defineProperties(a,Object.entries(a).reduce((s,[o,l])=>({...s,[o]:{configurable:!1,enumerable:!0,get:()=>(r.current.includes(o)||r.current.push(o),l)}}),{})),a}return i}function et({onConnect:e,onDisconnect:u}={}){const t=S1(),n=M.useCallback(s=>cL(s),[t]),r=lw(n,ew),i=M.useRef(),a=i.current;return M.useEffect(()=>{(a==null?void 0:a.status)!=="connected"&&r.status==="connected"&&(e==null||e({address:r.address,connector:r.connector,isReconnected:(a==null?void 0:a.status)==="reconnecting"||(a==null?void 0:a.status)===void 0})),(a==null?void 0:a.status)==="connected"&&r.status==="disconnected"&&(u==null||u()),i.current=r},[e,u,a,r]),r}function RL({address:e,chainId:u,formatUnits:t,scopeKey:n,token:r}){return[{entity:"balance",address:e,chainId:u,formatUnits:t,scopeKey:n,token:r}]}function zL({queryKey:[{address:e,chainId:u,formatUnits:t,token:n}]}){if(!e)throw new Error("address is required");return sL({address:e,chainId:u,formatUnits:t,token:n})}function cw({address:e,cacheTime:u,chainId:t,enabled:n=!0,formatUnits:r,scopeKey:i,staleTime:a,suspense:s,token:o,watch:l,onError:c,onSettled:E,onSuccess:d}={}){const f=$o({chainId:t}),p=M.useMemo(()=>RL({address:e,chainId:f,formatUnits:r,scopeKey:i,token:o}),[e,f,r,i,o]),h=Uo(p,zL,{cacheTime:u,enabled:!!(n&&e),staleTime:a,suspense:s,onError:c,onSettled:E,onSuccess:d});return ow({chainId:f,enabled:!!(n&&l&&e),queryKey:p}),h}var jL=e=>[{entity:"connect",...e}],ML=e=>{const{connector:u,chainId:t}=e;if(!u)throw new Error("connector is required");return YM({connector:u,chainId:t})};function LL({chainId:e,connector:u,onError:t,onMutate:n,onSettled:r,onSuccess:i}={}){const a=S1(),{data:s,error:o,isError:l,isIdle:c,isLoading:E,isSuccess:d,mutate:f,mutateAsync:p,reset:h,status:g,variables:A}=Gc(jL({connector:u,chainId:e}),ML,{onError:t,onMutate:n,onSettled:r,onSuccess:i}),m=M.useCallback(F=>f({chainId:(F==null?void 0:F.chainId)??e,connector:(F==null?void 0:F.connector)??u}),[e,u,f]),B=M.useCallback(F=>p({chainId:(F==null?void 0:F.chainId)??e,connector:(F==null?void 0:F.connector)??u}),[e,u,p]);return{connect:m,connectAsync:B,connectors:a.connectors,data:s,error:o,isError:l,isIdle:c,isLoading:E,isSuccess:d,pendingConnector:A==null?void 0:A.connector,reset:h,status:g,variables:A}}var UL=[{entity:"disconnect"}],$L=()=>XM();function VC({onError:e,onMutate:u,onSettled:t,onSuccess:n}={}){const{error:r,isError:i,isIdle:a,isLoading:s,isSuccess:o,mutate:l,mutateAsync:c,reset:E,status:d}=Gc(UL,$L,{...e?{onError(f,p,h){e(f,h)}}:{},onMutate:u,...t?{onSettled(f,p,h,g){t(p,g)}}:{},...n?{onSuccess(f,p,h){n(h)}}:{}});return{disconnect:l,disconnectAsync:c,error:r,isError:i,isIdle:a,isLoading:s,isSuccess:o,reset:E,status:d}}function Xa(){const e=S1(),u=M.useCallback(t=>EL(t),[e]);return lw(u,GC)}var WL=e=>[{entity:"signMessage",...e}],qL=e=>{const{message:u}=e;if(!u)throw new Error("message is required");return oL({message:u})};function HL({message:e,onError:u,onMutate:t,onSettled:n,onSuccess:r}={}){const{data:i,error:a,isError:s,isIdle:o,isLoading:l,isSuccess:c,mutate:E,mutateAsync:d,reset:f,status:p,variables:h}=Gc(WL({message:e}),qL,{onError:u,onMutate:t,onSettled:n,onSuccess:r}),g=M.useCallback(m=>E(m||{message:e}),[e,E]),A=M.useCallback(m=>d(m||{message:e}),[e,d]);return{data:i,error:a,isError:s,isIdle:o,isLoading:l,isSuccess:c,reset:f,signMessage:g,signMessageAsync:A,status:p,variables:h}}var GL=e=>[{entity:"switchNetwork",...e}],QL=e=>{const{chainId:u}=e;if(!u)throw new Error("chainId is required");return lL({chainId:u})};function KL({chainId:e,throwForSwitchChainNotSupported:u,onError:t,onMutate:n,onSettled:r,onSuccess:i}={}){var k;const a=S1(),s=IL(),{data:o,error:l,isError:c,isIdle:E,isLoading:d,isSuccess:f,mutate:p,mutateAsync:h,reset:g,status:A,variables:m}=Gc(GL({chainId:e}),QL,{onError:t,onMutate:n,onSettled:r,onSuccess:i}),B=M.useCallback(j=>p({chainId:j??e}),[e,p]),F=M.useCallback(j=>h({chainId:j??e}),[e,h]);M.useEffect(()=>a.subscribe(({chains:N,connector:uu})=>({chains:N,connector:uu}),s),[a,s]);let w,v;const C=!!((k=a.connector)!=null&&k.switchChain);return(u||C)&&(w=B,v=F),{chains:a.chains??[],data:o,error:l,isError:c,isIdle:E,isLoading:d,isSuccess:f,pendingChainId:m==null?void 0:m.chainId,reset:g,status:A,switchNetwork:w,switchNetworkAsync:v,variables:m}}function VL({address:e,chainId:u,abi:t,listener:n,eventName:r}={}){const i=Qc({chainId:u}),a=sw({chainId:u}),s=M.useRef();return M.useEffect(()=>{if(!t||!e||!r)return;const o=a||i;return s.current=o.watchContractEvent({abi:t,address:e,eventName:r,onLogs:n}),s.current},[t,e,r,i.uid,a==null?void 0:a.uid]),s.current}function JL({account:e,address:u,args:t,blockNumber:n,blockTag:r,chainId:i,functionName:a,scopeKey:s}){return[{entity:"readContract",account:e,address:u,args:t,blockNumber:n,blockTag:r,chainId:i,functionName:a,scopeKey:s}]}function ZL({abi:e}){return async({queryKey:[{account:u,address:t,args:n,blockNumber:r,blockTag:i,chainId:a,functionName:s}]})=>{if(!e)throw new Error("abi is required");if(!t)throw new Error("address is required");return await uw({account:u,address:t,args:n,blockNumber:r,blockTag:i,chainId:a,abi:e,functionName:s})??null}}function Cs({abi:e,address:u,account:t,args:n,blockNumber:r,blockTag:i,cacheOnBlock:a=!1,cacheTime:s,chainId:o,enabled:l=!0,functionName:c,isDataEqual:E,keepPreviousData:d,onError:f,onSettled:p,onSuccess:h,scopeKey:g,select:A,staleTime:m,structuralSharing:B=(v,C)=>s2(v,C)?v:ch(v,C),suspense:F,watch:w}={}){const v=$o({chainId:o}),{data:C}=KC({chainId:v,enabled:w||a,scopeKey:w||a?void 0:"idle",watch:w}),k=r??C,j=M.useMemo(()=>JL({account:t,address:u,args:n,blockNumber:a?k:void 0,blockTag:i,chainId:v,functionName:c,scopeKey:g}),[t,u,n,k,i,a,v,c,g]),N=M.useMemo(()=>{let uu=!!(l&&e&&u&&c);return a&&(uu=!!(uu&&k)),uu},[e,u,k,a,l,c]);return ow({chainId:v,enabled:!!(N&&w&&!a),queryKey:j}),Uo(j,ZL({abi:e}),{cacheTime:s,enabled:N,isDataEqual:E,keepPreviousData:d,select:A,staleTime:m,structuralSharing:B,suspense:F,onError:f,onSettled:p,onSuccess:h})}function YL({address:e,abi:u,functionName:t,...n}){const{args:r,accessList:i,account:a,dataSuffix:s,gas:o,gasPrice:l,maxFeePerGas:c,maxPriorityFeePerGas:E,nonce:d,request:f,value:p}=n;return[{entity:"writeContract",address:e,args:r,abi:u,accessList:i,account:a,dataSuffix:s,functionName:t,gas:o,gasPrice:l,maxFeePerGas:c,maxPriorityFeePerGas:E,nonce:d,request:f,value:p}]}function XL(e){if(e.mode==="prepared"){if(!e.request)throw new Error("request is required");return CA({mode:"prepared",request:e.request})}if(!e.address)throw new Error("address is required");if(!e.abi)throw new Error("abi is required");if(!e.functionName)throw new Error("functionName is required");return CA({address:e.address,args:e.args,chainId:e.chainId,abi:e.abi,functionName:e.functionName,accessList:e.accessList,account:e.account,dataSuffix:e.dataSuffix,gas:e.gas,gasPrice:e.gasPrice,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce,value:e.value})}function uU(e){const{address:u,abi:t,args:n,chainId:r,functionName:i,mode:a,request:s,dataSuffix:o}=e,{accessList:l,account:c,gas:E,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:h,value:g}=QM(e),{data:A,error:m,isError:B,isIdle:F,isLoading:w,isSuccess:v,mutate:C,mutateAsync:k,reset:j,status:N,variables:uu}=Gc(YL({address:u,abi:t,functionName:i,chainId:r,mode:a,args:n,accessList:l,account:c,dataSuffix:o,gas:E,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:h,request:s,value:g}),XL,{onError:e.onError,onMutate:e.onMutate,onSettled:e.onSettled,onSuccess:e.onSuccess}),ou=M.useMemo(()=>e.mode==="prepared"?s?()=>C({mode:"prepared",request:e.request,chainId:e.chainId}):void 0:mu=>C({address:u,args:n,abi:t,functionName:i,chainId:r,accessList:l,account:c,dataSuffix:o,gas:E,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:h,value:g,...mu}),[l,c,t,u,n,r,e.chainId,e.mode,e.request,o,i,E,d,f,p,C,h,s,g]),su=M.useMemo(()=>e.mode==="prepared"?s?()=>k({mode:"prepared",request:e.request}):void 0:mu=>k({address:u,args:n,abi:t,chainId:r,functionName:i,accessList:l,account:c,dataSuffix:o,gas:E,gasPrice:d,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:h,value:g,...mu}),[l,c,t,u,n,r,e.mode,e.request,o,i,E,d,f,p,k,h,s,g]);return{data:A,error:m,isError:B,isIdle:F,isLoading:w,isSuccess:v,reset:j,status:N,variables:uu,write:ou,writeAsync:su}}function eU({name:e,chainId:u,scopeKey:t}){return[{entity:"ensAvatar",name:e,chainId:u,scopeKey:t}]}function tU({queryKey:[{name:e,chainId:u}]}){if(!e)throw new Error("name is required");return dL({name:e,chainId:u})}function nU({cacheTime:e,chainId:u,enabled:t=!0,name:n,scopeKey:r,staleTime:i=1e3*60*60*24,suspense:a,onError:s,onSettled:o,onSuccess:l}={}){const c=$o({chainId:u});return Uo(eU({name:n,chainId:c,scopeKey:r}),tU,{cacheTime:e,enabled:!!(t&&n&&c),staleTime:i,suspense:a,onError:s,onSettled:o,onSuccess:l})}function rU({address:e,chainId:u,scopeKey:t}){return[{entity:"ensName",address:e,chainId:u,scopeKey:t}]}function iU({queryKey:[{address:e,chainId:u}]}){if(!e)throw new Error("address is required");return fL({address:e,chainId:u})}function aU({address:e,cacheTime:u,chainId:t,enabled:n=!0,scopeKey:r,staleTime:i=1e3*60*60*24,suspense:a,onError:s,onSettled:o,onSuccess:l}={}){const c=$o({chainId:t});return Uo(rU({address:e,chainId:c,scopeKey:r}),iU,{cacheTime:u,enabled:!!(n&&e&&c),staleTime:i,suspense:a,onError:s,onSettled:o,onSuccess:l})}function sU({confirmations:e,chainId:u,hash:t,scopeKey:n,timeout:r}){return[{entity:"waitForTransaction",confirmations:e,chainId:u,hash:t,scopeKey:n,timeout:r}]}function oU({onReplaced:e}){return({queryKey:[{chainId:u,confirmations:t,hash:n,timeout:r}]})=>{if(!n)throw new Error("hash is required");return hL({chainId:u,confirmations:t,hash:n,onReplaced:e,timeout:r})}}function lU({chainId:e,confirmations:u,hash:t,timeout:n,cacheTime:r,enabled:i=!0,scopeKey:a,staleTime:s,suspense:o,onError:l,onReplaced:c,onSettled:E,onSuccess:d}={}){const f=$o({chainId:e});return Uo(sU({chainId:f,confirmations:u,hash:t,scopeKey:a,timeout:n}),oU({onReplaced:c}),{cacheTime:r,enabled:!!(i&&t),staleTime:s,suspense:o,onError:l,onSettled:E,onSuccess:d})}function Ew(e){var u,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(u=0;u-1}var oW=sW,lW=I1;function cW(e,u){var t=this.__data__,n=lW(t,e);return n<0?(++this.size,t.push([e,u])):t[n][1]=u,this}var EW=cW,dW=K$,fW=tW,pW=iW,hW=oW,CW=EW;function qo(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u-1&&e%1==0&&e-1&&e%1==0&&e<=Mq}var i8=Lq,Uq=e8,$q=r8,Wq=Sn,qq=z1,Hq=i8,Gq=Yc;function Qq(e,u,t){u=Uq(u,e);for(var n=-1,r=u.length,i=!1;++n-1}var MH=jH;function LH(e,u,t){for(var n=-1,r=e==null?0:e.length;++n=aG){var l=u?null:rG(e);if(l)return iG(l);a=!1,r=nG,o=new uG}else o=u?[]:s;u:for(;++n{const s=[],o=[];return s.push(a),a||s.push(i.locale),i.enableFallback&&s.push(i.defaultLocale),s.filter(Boolean).map(l=>l.toString()).forEach(function(l){if(o.includes(l)||o.push(l),!i.enableFallback)return;const c=l.split("-");c.length===3&&o.push(`${c[0]}-${c[1]}`),o.push(c[0])}),(0,t.default)(o)};e.defaultLocaleResolver=n;class r{constructor(a){this.i18n=a,this.registry={},this.register("default",e.defaultLocaleResolver)}register(a,s){if(typeof s!="function"){const o=s;s=()=>o}this.registry[a]=s}get(a){let s=this.registry[a]||this.registry[this.i18n.locale]||this.registry.default;return typeof s=="function"&&(s=s(this.i18n,a)),s instanceof Array||(s=[s]),s}}e.Locales=r})(a8);var o8={};const yu=(e,u)=>u?"other":e==1?"one":"other",Fr=(e,u)=>u?"other":e==0||e==1?"one":"other",Qo=(e,u)=>u?"other":e>=0&&e<=1?"one":"other",_t=(e,u)=>{const t=String(e).split("."),n=!t[1];return u?"other":e==1&&n?"one":"other"},Xu=(e,u)=>"other",Dr=(e,u)=>u?"other":e==1?"one":e==2?"two":"other",dG=yu,fG=Fr,pG=Qo,hG=yu,CG=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e,r=n&&t[0].slice(-2);return u?"other":e==0?"zero":e==1?"one":e==2?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},mG=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e,r=n&&t[0].slice(-2);return u?"other":e==0?"zero":e==1?"one":e==2?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},AG=(e,u)=>u?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other",gG=yu,BG=_t,yG=(e,u)=>{const t=String(e).split("."),n=t[0],r=n.slice(-1),i=n.slice(-2),a=n.slice(-3);return u?r==1||r==2||r==5||r==7||r==8||i==20||i==50||i==70||i==80?"one":r==3||r==4||a==100||a==200||a==300||a==400||a==500||a==600||a==700||a==800||a==900?"few":n==0||r==6||i==40||i==60||i==90?"many":"other":e==1?"one":"other"},FG=(e,u)=>e==1?"one":"other",DG=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e,r=n&&t[0].slice(-1),i=n&&t[0].slice(-2);return u?(r==2||r==3)&&i!=12&&i!=13?"few":"other":r==1&&i!=11?"one":r>=2&&r<=4&&(i<12||i>14)?"few":n&&r==0||r>=5&&r<=9||i>=11&&i<=14?"many":"other"},vG=yu,bG=yu,wG=yu,xG=Fr,kG=Xu,_G=(e,u)=>u?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other",SG=Xu,PG=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e,r=n&&t[0].slice(-1),i=n&&t[0].slice(-2),a=n&&t[0].slice(-6);return u?"other":r==1&&i!=11&&i!=71&&i!=91?"one":r==2&&i!=12&&i!=72&&i!=92?"two":(r==3||r==4||r==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":e!=0&&n&&a==0?"many":"other"},TG=yu,OG=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"",i=!t[1],a=n.slice(-1),s=n.slice(-2),o=r.slice(-1),l=r.slice(-2);return u?"other":i&&a==1&&s!=11||o==1&&l!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||o>=2&&o<=4&&(l<12||l>14)?"few":"other"},IG=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-6);return u?e==1||e==3?"one":e==2?"two":e==4?"few":"other":e==1&&r?"one":n!=0&&i==0&&r?"many":"other"},NG=yu,RG=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"",i=!t[1],a=n.slice(-1),s=r.slice(-1);return u?"other":i&&(n==1||n==2||n==3)||i&&a!=4&&a!=6&&a!=9||!i&&s!=4&&s!=6&&s!=9?"one":"other"},zG=yu,jG=yu,MG=yu,LG=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1];return u?"other":e==1&&r?"one":n>=2&&n<=4&&r?"few":r?"other":"many"},UG=(e,u)=>u?e==0||e==7||e==8||e==9?"zero":e==1?"one":e==2?"two":e==3||e==4?"few":e==5||e==6?"many":"other":e==0?"zero":e==1?"one":e==2?"two":e==3?"few":e==6?"many":"other",$G=(e,u)=>{const t=String(e).split("."),n=t[0],r=Number(t[0])==e;return u?"other":e==1||!r&&(n==0||n==1)?"one":"other"},WG=_t,qG=Qo,HG=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"",i=!t[1],a=n.slice(-2),s=r.slice(-2);return u?"other":i&&a==1||s==1?"one":i&&a==2||s==2?"two":i&&(a==3||a==4)||s==3||s==4?"few":"other"},GG=yu,QG=Xu,KG=yu,VG=yu,JG=(e,u)=>{const t=String(e).split("."),n=!t[1],r=Number(t[0])==e,i=r&&t[0].slice(-1),a=r&&t[0].slice(-2);return u?i==1&&a!=11?"one":i==2&&a!=12?"two":i==3&&a!=13?"few":"other":e==1&&n?"one":"other"},ZG=yu,YG=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-6);return u?"other":e==1?"one":n!=0&&i==0&&r?"many":"other"},XG=_t,uQ=yu,eQ=Qo,tQ=(e,u)=>u?"other":e>=0&&e<2?"one":"other",nQ=_t,rQ=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"",i=!t[1],a=n.slice(-1),s=r.slice(-1);return u?e==1?"one":"other":i&&(n==1||n==2||n==3)||i&&a!=4&&a!=6&&a!=9||!i&&s!=4&&s!=6&&s!=9?"one":"other"},iQ=yu,aQ=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-6);return u?e==1?"one":"other":e>=0&&e<2?"one":n!=0&&i==0&&r?"many":"other"},sQ=yu,oQ=_t,lQ=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e;return u?e==1?"one":"other":e==1?"one":e==2?"two":n&&e>=3&&e<=6?"few":n&&e>=7&&e<=10?"many":"other"},cQ=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e;return u?e==1||e==11?"one":e==2||e==12?"two":e==3||e==13?"few":"other":e==1||e==11?"one":e==2||e==12?"two":n&&e>=3&&e<=10||n&&e>=13&&e<=19?"few":"other"},EQ=_t,dQ=yu,fQ=(e,u)=>u?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other",pQ=Fr,hQ=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-1),a=n.slice(-2);return u?"other":r&&i==1?"one":r&&i==2?"two":r&&(a==0||a==20||a==40||a==60||a==80)?"few":r?"other":"many"},CQ=yu,mQ=yu,AQ=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1];return u?"other":n==1&&r||n==0&&!r?"one":n==2&&r?"two":"other"},gQ=(e,u)=>u?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other",BQ=Xu,yQ=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"",i=!t[1],a=n.slice(-1),s=n.slice(-2),o=r.slice(-1),l=r.slice(-2);return u?"other":i&&a==1&&s!=11||o==1&&l!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||o>=2&&o<=4&&(l<12||l>14)?"few":"other"},FQ=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"",i=!t[1],a=n.slice(-2),s=r.slice(-2);return u?"other":i&&a==1||s==1?"one":i&&a==2||s==2?"two":i&&(a==3||a==4)||s==3||s==4?"few":"other"},DQ=(e,u)=>u?e==1||e==5?"one":"other":e==1?"one":"other",vQ=(e,u)=>u?e==1?"one":"other":e>=0&&e<2?"one":"other",bQ=_t,wQ=Xu,xQ=Xu,kQ=Xu,_Q=_t,SQ=(e,u)=>{const t=String(e).split("."),n=t[0],r=(t[1]||"").replace(/0+$/,""),i=Number(t[0])==e,a=n.slice(-1),s=n.slice(-2);return u?"other":i&&a==1&&s!=11||r%10==1&&r%100!=11?"one":"other"},PQ=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-6);return u?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":n!=0&&i==0&&r?"many":"other"},TQ=Dr,OQ=Xu,IQ=Xu,NQ=yu,RQ=yu,zQ=Xu,jQ=Xu,MQ=(e,u)=>{const t=String(e).split("."),n=t[0],r=n.slice(-2);return u?n==1?"one":n==0||r>=2&&r<=20||r==40||r==60||r==80?"many":"other":e==1?"one":"other"},LQ=(e,u)=>u?"other":e>=0&&e<2?"one":"other",UQ=yu,$Q=yu,WQ=Xu,qQ=Xu,HQ=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e,r=n&&t[0].slice(-1);return u?r==6||r==9||n&&r==0&&e!=0?"many":"other":e==1?"one":"other"},GQ=yu,QQ=yu,KQ=Xu,VQ=Qo,JQ=Xu,ZQ=yu,YQ=yu,XQ=(e,u)=>u?"other":e==0?"zero":e==1?"one":"other",uK=yu,eK=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e,r=n&&t[0].slice(-2),i=n&&t[0].slice(-3),a=n&&t[0].slice(-5),s=n&&t[0].slice(-6);return u?n&&e>=1&&e<=4||r>=1&&r<=4||r>=21&&r<=24||r>=41&&r<=44||r>=61&&r<=64||r>=81&&r<=84?"one":e==5||r==5?"many":"other":e==0?"zero":e==1?"one":r==2||r==22||r==42||r==62||r==82||n&&i==0&&(a>=1e3&&a<=2e4||a==4e4||a==6e4||a==8e4)||e!=0&&s==1e5?"two":r==3||r==23||r==43||r==63||r==83?"few":e!=1&&(r==1||r==21||r==41||r==61||r==81)?"many":"other"},tK=yu,nK=(e,u)=>{const t=String(e).split("."),n=t[0];return u?"other":e==0?"zero":(n==0||n==1)&&e!=0?"one":"other"},rK=yu,iK=yu,aK=(e,u)=>{const t=String(e).split("."),n=!t[1],r=Number(t[0])==e;return u?e==11||e==8||r&&e>=80&&e<=89||r&&e>=800&&e<=899?"many":"other":e==1&&n?"one":"other"},sK=Xu,oK=Fr,lK=(e,u)=>u&&e==1?"one":"other",cK=(e,u)=>{const t=String(e).split("."),n=t[1]||"",r=Number(t[0])==e,i=r&&t[0].slice(-1),a=r&&t[0].slice(-2);return u?"other":i==1&&(a<11||a>19)?"one":i>=2&&i<=9&&(a<11||a>19)?"few":n!=0?"many":"other"},EK=(e,u)=>{const t=String(e).split("."),n=t[1]||"",r=n.length,i=Number(t[0])==e,a=i&&t[0].slice(-1),s=i&&t[0].slice(-2),o=n.slice(-2),l=n.slice(-1);return u?"other":i&&a==0||s>=11&&s<=19||r==2&&o>=11&&o<=19?"zero":a==1&&s!=11||r==2&&l==1&&o!=11||r!=2&&l==1?"one":"other"},dK=yu,fK=Fr,pK=yu,hK=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"",i=!t[1],a=n.slice(-1),s=n.slice(-2),o=r.slice(-1),l=r.slice(-2);return u?a==1&&s!=11?"one":a==2&&s!=12?"two":(a==7||a==8)&&s!=17&&s!=18?"many":"other":i&&a==1&&s!=11||o==1&&l!=11?"one":"other"},CK=yu,mK=yu,AK=(e,u)=>{const t=String(e).split("."),n=!t[1],r=Number(t[0])==e,i=r&&t[0].slice(-2);return u?e==1?"one":"other":e==1&&n?"one":!n||e==0||e!=1&&i>=1&&i<=19?"few":"other"},gK=(e,u)=>u?e==1?"one":e==2||e==3?"two":e==4?"few":"other":e==1?"one":"other",BK=(e,u)=>u&&e==1?"one":"other",yK=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e,r=n&&t[0].slice(-2);return u?"other":e==1?"one":e==2?"two":e==0||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},FK=Xu,DK=yu,vK=Dr,bK=yu,wK=yu,xK=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e;return u?n&&e>=1&&e<=4?"one":"other":e==1?"one":"other"},kK=_t,_K=yu,SK=yu,PK=yu,TK=Xu,OK=yu,IK=Fr,NK=yu,RK=yu,zK=yu,jK=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e;return u?e==1||e==5||n&&e>=7&&e<=9?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e==1?"one":"other"},MK=yu,LK=Xu,UK=Fr,$K=yu,WK=Qo,qK=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-1),a=n.slice(-2);return u?"other":e==1&&r?"one":r&&i>=2&&i<=4&&(a<12||a>14)?"few":r&&n!=1&&(i==0||i==1)||r&&i>=5&&i<=9||r&&a>=12&&a<=14?"many":"other"},HK=(e,u)=>{const t=String(e).split("."),n=t[1]||"",r=n.length,i=Number(t[0])==e,a=i&&t[0].slice(-1),s=i&&t[0].slice(-2),o=n.slice(-2),l=n.slice(-1);return u?"other":i&&a==0||s>=11&&s<=19||r==2&&o>=11&&o<=19?"zero":a==1&&s!=11||r==2&&l==1&&o!=11||r!=2&&l==1?"one":"other"},GK=yu,QK=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-6);return u?"other":n==0||n==1?"one":n!=0&&i==0&&r?"many":"other"},KK=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-6);return u?"other":e==1&&r?"one":n!=0&&i==0&&r?"many":"other"},VK=yu,JK=(e,u)=>{const t=String(e).split("."),n=!t[1],r=Number(t[0])==e,i=r&&t[0].slice(-2);return u?e==1?"one":"other":e==1&&n?"one":!n||e==0||e!=1&&i>=1&&i<=19?"few":"other"},ZK=yu,YK=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-1),a=n.slice(-2);return u?"other":r&&i==1&&a!=11?"one":r&&i>=2&&i<=4&&(a<12||a>14)?"few":r&&i==0||r&&i>=5&&i<=9||r&&a>=11&&a<=14?"many":"other"},XK=yu,uV=Xu,eV=yu,tV=Dr,nV=(e,u)=>{const t=String(e).split("."),n=!t[1];return u?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"},rV=(e,u)=>{const t=String(e).split("."),n=!t[1];return u?e==11||e==8||e==80||e==800?"many":"other":e==1&&n?"one":"other"},iV=yu,aV=yu,sV=Dr,oV=yu,lV=Xu,cV=Xu,EV=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"",i=!t[1],a=n.slice(-1),s=n.slice(-2),o=r.slice(-1),l=r.slice(-2);return u?"other":i&&a==1&&s!=11||o==1&&l!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||o>=2&&o<=4&&(l<12||l>14)?"few":"other"},dV=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e;return u?"other":e>=0&&e<=1?"one":n&&e>=2&&e<=10?"few":"other"},fV=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"";return u?"other":e==0||e==1||n==0&&r==1?"one":"other"},pV=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1];return u?"other":e==1&&r?"one":n>=2&&n<=4&&r?"few":r?"other":"many"},hV=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-2);return u?"other":r&&i==1?"one":r&&i==2?"two":r&&(i==3||i==4)||!r?"few":"other"},CV=Dr,mV=Dr,AV=Dr,gV=Dr,BV=Dr,yV=yu,FV=yu,DV=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e,r=n&&t[0].slice(-1),i=n&&t[0].slice(-2);return u?e==1?"one":r==4&&i!=14?"many":"other":e==1?"one":"other"},vV=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"",i=!t[1],a=n.slice(-1),s=n.slice(-2),o=r.slice(-1),l=r.slice(-2);return u?"other":i&&a==1&&s!=11||o==1&&l!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||o>=2&&o<=4&&(l<12||l>14)?"few":"other"},bV=yu,wV=yu,xV=yu,kV=Xu,_V=(e,u)=>{const t=String(e).split("."),n=!t[1],r=Number(t[0])==e,i=r&&t[0].slice(-1),a=r&&t[0].slice(-2);return u?(i==1||i==2)&&a!=11&&a!=12?"one":"other":e==1&&n?"one":"other"},SV=_t,PV=yu,TV=yu,OV=yu,IV=yu,NV=Xu,RV=Fr,zV=yu,jV=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e,r=n&&t[0].slice(-1);return u?r==6||r==9||e==10?"few":"other":e==1?"one":"other"},MV=(e,u)=>{const t=String(e).split("."),n=t[0],r=t[1]||"",i=!t[1],a=n.slice(-1),s=r.slice(-1);return u?e==1?"one":"other":i&&(n==1||n==2||n==3)||i&&a!=4&&a!=6&&a!=9||!i&&s!=4&&s!=6&&s!=9?"one":"other"},LV=yu,UV=Xu,$V=Xu,WV=yu,qV=yu,HV=(e,u)=>{const t=String(e).split("."),n=Number(t[0])==e;return u?"other":e==0||e==1||n&&e>=11&&e<=99?"one":"other"},GV=yu,QV=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=Number(t[0])==e,a=i&&t[0].slice(-1),s=i&&t[0].slice(-2),o=n.slice(-1),l=n.slice(-2);return u?a==3&&s!=13?"few":"other":r&&o==1&&l!=11?"one":r&&o>=2&&o<=4&&(l<12||l>14)?"few":r&&o==0||r&&o>=5&&o<=9||r&&l>=11&&l<=14?"many":"other"},KV=Xu,VV=_t,JV=yu,ZV=yu,YV=(e,u)=>{const t=String(e).split("."),n=t[0],r=!t[1],i=n.slice(-6);return u?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":n!=0&&i==0&&r?"many":"other"},XV=(e,u)=>u&&e==1?"one":"other",uJ=yu,eJ=yu,tJ=Fr,nJ=yu,rJ=Xu,iJ=yu,aJ=yu,sJ=_t,oJ=Xu,lJ=Xu,cJ=Xu,EJ=Qo,dJ=Object.freeze(Object.defineProperty({__proto__:null,af:dG,ak:fG,am:pG,an:hG,ar:CG,ars:mG,as:AG,asa:gG,ast:BG,az:yG,bal:FG,be:DG,bem:vG,bez:bG,bg:wG,bho:xG,bm:kG,bn:_G,bo:SG,br:PG,brx:TG,bs:OG,ca:IG,ce:NG,ceb:RG,cgg:zG,chr:jG,ckb:MG,cs:LG,cy:UG,da:$G,de:WG,doi:qG,dsb:HG,dv:GG,dz:QG,ee:KG,el:VG,en:JG,eo:ZG,es:YG,et:XG,eu:uQ,fa:eQ,ff:tQ,fi:nQ,fil:rQ,fo:iQ,fr:aQ,fur:sQ,fy:oQ,ga:lQ,gd:cQ,gl:EQ,gsw:dQ,gu:fQ,guw:pQ,gv:hQ,ha:CQ,haw:mQ,he:AQ,hi:gQ,hnj:BQ,hr:yQ,hsb:FQ,hu:DQ,hy:vQ,ia:bQ,id:wQ,ig:xQ,ii:kQ,io:_Q,is:SQ,it:PQ,iu:TQ,ja:OQ,jbo:IQ,jgo:NQ,jmc:RQ,jv:zQ,jw:jQ,ka:MQ,kab:LQ,kaj:UQ,kcg:$Q,kde:WQ,kea:qQ,kk:HQ,kkj:GQ,kl:QQ,km:KQ,kn:VQ,ko:JQ,ks:ZQ,ksb:YQ,ksh:XQ,ku:uK,kw:eK,ky:tK,lag:nK,lb:rK,lg:iK,lij:aK,lkt:sK,ln:oK,lo:lK,lt:cK,lv:EK,mas:dK,mg:fK,mgo:pK,mk:hK,ml:CK,mn:mK,mo:AK,mr:gK,ms:BK,mt:yK,my:FK,nah:DK,naq:vK,nb:bK,nd:wK,ne:xK,nl:kK,nn:_K,nnh:SK,no:PK,nqo:TK,nr:OK,nso:IK,ny:NK,nyn:RK,om:zK,or:jK,os:MK,osa:LK,pa:UK,pap:$K,pcm:WK,pl:qK,prg:HK,ps:GK,pt:QK,pt_PT:KK,rm:VK,ro:JK,rof:ZK,ru:YK,rwk:XK,sah:uV,saq:eV,sat:tV,sc:nV,scn:rV,sd:iV,sdh:aV,se:sV,seh:oV,ses:lV,sg:cV,sh:EV,shi:dV,si:fV,sk:pV,sl:hV,sma:CV,smi:mV,smj:AV,smn:gV,sms:BV,sn:yV,so:FV,sq:DV,sr:vV,ss:bV,ssy:wV,st:xV,su:kV,sv:_V,sw:SV,syr:PV,ta:TV,te:OV,teo:IV,th:NV,ti:RV,tig:zV,tk:jV,tl:MV,tn:LV,to:UV,tpi:$V,tr:WV,ts:qV,tzm:HV,ug:GV,uk:QV,und:KV,ur:VV,uz:JV,ve:ZV,vec:YV,vi:XV,vo:uJ,vun:eJ,wa:tJ,wae:nJ,wo:rJ,xh:iJ,xog:aJ,yi:sJ,yo:oJ,yue:lJ,zh:cJ,zu:EJ},Symbol.toStringTag,{value:"Module"})),fJ=nh(dJ);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Pluralization=e.defaultPluralizer=e.useMakePlural=void 0;const u=fJ;function t({pluralizer:r,includeZero:i=!0,ordinal:a=!1}){return function(s,o){return[i&&o===0?"zero":"",r(o,a)].filter(Boolean)}}e.useMakePlural=t,e.defaultPluralizer=t({pluralizer:u.en,includeZero:!0});class n{constructor(i){this.i18n=i,this.registry={},this.register("default",e.defaultPluralizer)}register(i,a){this.registry[i]=a}get(i){return this.registry[i]||this.registry[this.i18n.locale]||this.registry.default}}e.Pluralization=n})(o8);var l8={},c8={},j1={};function pJ(e,u,t){var n=-1,r=e.length;u<0&&(u=-u>r?0:r+u),t=t>r?r:t,t<0&&(t+=r),r=u>t?0:t-u>>>0,u>>>=0;for(var i=Array(r);++n=n?e:CJ(e,u,t)}var AJ=mJ,gJ="\\ud800-\\udfff",BJ="\\u0300-\\u036f",yJ="\\ufe20-\\ufe2f",FJ="\\u20d0-\\u20ff",DJ=BJ+yJ+FJ,vJ="\\ufe0e\\ufe0f",bJ="\\u200d",wJ=RegExp("["+bJ+gJ+DJ+vJ+"]");function xJ(e){return wJ.test(e)}var kw=xJ;function kJ(e){return e.split("")}var _J=kJ,_w="\\ud800-\\udfff",SJ="\\u0300-\\u036f",PJ="\\ufe20-\\ufe2f",TJ="\\u20d0-\\u20ff",OJ=SJ+PJ+TJ,IJ="\\ufe0e\\ufe0f",NJ="["+_w+"]",Np="["+OJ+"]",Rp="\\ud83c[\\udffb-\\udfff]",RJ="(?:"+Np+"|"+Rp+")",Sw="[^"+_w+"]",Pw="(?:\\ud83c[\\udde6-\\uddff]){2}",Tw="[\\ud800-\\udbff][\\udc00-\\udfff]",zJ="\\u200d",Ow=RJ+"?",Iw="["+IJ+"]?",jJ="(?:"+zJ+"(?:"+[Sw,Pw,Tw].join("|")+")"+Iw+Ow+")*",MJ=Iw+Ow+jJ,LJ="(?:"+[Sw+Np+"?",Np,Pw,Tw,NJ].join("|")+")",UJ=RegExp(Rp+"(?="+Rp+")|"+LJ+MJ,"g");function $J(e){return e.match(UJ)||[]}var WJ=$J,qJ=_J,HJ=kw,GJ=WJ;function QJ(e){return HJ(e)?GJ(e):qJ(e)}var KJ=QJ,VJ=AJ,JJ=kw,ZJ=KJ,YJ=Go;function XJ(e){return function(u){u=YJ(u);var t=JJ(u)?ZJ(u):void 0,n=t?t[0]:u.charAt(0),r=t?VJ(t,1).join(""):u.slice(1);return n[e]()+r}}var uZ=XJ,eZ=uZ,tZ=eZ("toUpperCase"),nZ=tZ,rZ=Go,iZ=nZ;function aZ(e){return iZ(rZ(e).toLowerCase())}var sZ=aZ;function oZ(e,u,t,n){var r=-1,i=e==null?0:e.length;for(n&&i&&(t=e[++r]);++r(u[(0,yY.default)(t)]=e[t],u),{}):{}}j1.camelCaseKeys=FY;var M1={},Ti={};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.isSet=void 0;function DY(e){return e!=null}Ti.isSet=DY;Object.defineProperty(M1,"__esModule",{value:!0});M1.createTranslationOptions=void 0;const NA=Ti;function vY(e,u,t){let n=[{scope:u}];if((0,NA.isSet)(t.defaults)&&(n=n.concat(t.defaults)),(0,NA.isSet)(t.defaultValue)){const r=typeof t.defaultValue=="function"?t.defaultValue(e,u,t):t.defaultValue;n.push({message:r}),delete t.defaultValue}return n}M1.createTranslationOptions=vY;var Ko={},Kw={exports:{}};(function(e){(function(u){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,i=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",o=1e14,l=14,c=9007199254740991,E=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,f=1e9;function p(v){var C,k,j,N=Z.prototype={constructor:Z,toString:null,valueOf:null},uu=new Z(1),ou=20,su=4,mu=-7,tu=21,au=-1e7,nu=1e7,H=!1,iu=1,lu=0,Eu={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},hu="0123456789abcdefghijklmnopqrstuvwxyz",fu=!0;function Z(S,O){var I,W,U,Q,Y,$,G,X,K=this;if(!(K instanceof Z))return new Z(S,O);if(O==null){if(S&&S._isBigNumber===!0){K.s=S.s,!S.c||S.e>nu?K.c=K.e=null:S.e=10;Y/=10,Q++);Q>nu?K.c=K.e=null:(K.e=Q,K.c=[S]);return}X=String(S)}else{if(!n.test(X=String(S)))return j(K,X,$);K.s=X.charCodeAt(0)==45?(X=X.slice(1),-1):1}(Q=X.indexOf("."))>-1&&(X=X.replace(".","")),(Y=X.search(/e/i))>0?(Q<0&&(Q=Y),Q+=+X.slice(Y+1),X=X.substring(0,Y)):Q<0&&(Q=X.length)}else{if(m(O,2,hu.length,"Base"),O==10&&fu)return K=new Z(S),ku(K,ou+K.e+1,su);if(X=String(S),$=typeof S=="number"){if(S*0!=0)return j(K,X,$,O);if(K.s=1/S<0?(X=X.slice(1),-1):1,Z.DEBUG&&X.replace(/^0\.0*|\./,"").length>15)throw Error(s+S)}else K.s=X.charCodeAt(0)===45?(X=X.slice(1),-1):1;for(I=hu.slice(0,O),Q=Y=0,G=X.length;YQ){Q=G;continue}}else if(!U&&(X==X.toUpperCase()&&(X=X.toLowerCase())||X==X.toLowerCase()&&(X=X.toUpperCase()))){U=!0,Y=-1,Q=0;continue}return j(K,String(S),$,O)}$=!1,X=k(X,O,10,K.s),(Q=X.indexOf("."))>-1?X=X.replace(".",""):Q=X.length}for(Y=0;X.charCodeAt(Y)===48;Y++);for(G=X.length;X.charCodeAt(--G)===48;);if(X=X.slice(Y,++G)){if(G-=Y,$&&Z.DEBUG&&G>15&&(S>c||S!==i(S)))throw Error(s+K.s*S);if((Q=Q-Y-1)>nu)K.c=K.e=null;else if(Q=-f&&U<=f&&U===i(U)){if(W[0]===0){if(U===0&&W.length===1)return!0;break u}if(O=(U+1)%l,O<1&&(O+=l),String(W[0]).length==O){for(O=0;O=o||I!==i(I))break u;if(I!==0)return!0}}}else if(W===null&&U===null&&(Q===null||Q===1||Q===-1))return!0;throw Error(a+"Invalid BigNumber: "+S)},Z.maximum=Z.max=function(){return wu(arguments,-1)},Z.minimum=Z.min=function(){return wu(arguments,1)},Z.random=function(){var S=9007199254740992,O=Math.random()*S&2097151?function(){return i(Math.random()*S)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(I){var W,U,Q,Y,$,G=0,X=[],K=new Z(uu);if(I==null?I=ou:m(I,0,f),Y=r(I/l),H)if(crypto.getRandomValues){for(W=crypto.getRandomValues(new Uint32Array(Y*=2));G>>11),$>=9e15?(U=crypto.getRandomValues(new Uint32Array(2)),W[G]=U[0],W[G+1]=U[1]):(X.push($%1e14),G+=2);G=Y/2}else if(crypto.randomBytes){for(W=crypto.randomBytes(Y*=7);G=9e15?crypto.randomBytes(7).copy(W,G):(X.push($%1e14),G+=7);G=Y/7}else throw H=!1,Error(a+"crypto unavailable");if(!H)for(;G=10;$/=10,G++);GU-1&&($[Y+1]==null&&($[Y+1]=0),$[Y+1]+=$[Y]/U|0,$[Y]%=U)}return $.reverse()}return function(I,W,U,Q,Y){var $,G,X,K,ru,pu,gu,Pu,Au=I.indexOf("."),Fu=ou,_=su;for(Au>=0&&(K=lu,lu=0,I=I.replace(".",""),Pu=new Z(W),pu=Pu.pow(I.length-Au),lu=K,Pu.c=O(w(g(pu.c),pu.e,"0"),10,U,S),Pu.e=Pu.c.length),gu=O(I,W,U,Y?($=hu,S):($=S,hu)),X=K=gu.length;gu[--K]==0;gu.pop());if(!gu[0])return $.charAt(0);if(Au<0?--X:(pu.c=gu,pu.e=X,pu.s=Q,pu=C(pu,Pu,Fu,_,U),gu=pu.c,ru=pu.r,X=pu.e),G=X+Fu+1,Au=gu[G],K=U/2,ru=ru||G<0||gu[G+1]!=null,ru=_<4?(Au!=null||ru)&&(_==0||_==(pu.s<0?3:2)):Au>K||Au==K&&(_==4||ru||_==6&&gu[G-1]&1||_==(pu.s<0?8:7)),G<1||!gu[0])I=ru?w($.charAt(1),-Fu,$.charAt(0)):$.charAt(0);else{if(gu.length=G,ru)for(--U;++gu[--G]>U;)gu[G]=0,G||(++X,gu=[1].concat(gu));for(K=gu.length;!gu[--K];);for(Au=0,I="";Au<=K;I+=$.charAt(gu[Au++]));I=w(I,X,$.charAt(0))}return I}}(),C=function(){function S(W,U,Q){var Y,$,G,X,K=0,ru=W.length,pu=U%d,gu=U/d|0;for(W=W.slice();ru--;)G=W[ru]%d,X=W[ru]/d|0,Y=gu*G+X*pu,$=pu*G+Y%d*d+K,K=($/Q|0)+(Y/d|0)+gu*X,W[ru]=$%Q;return K&&(W=[K].concat(W)),W}function O(W,U,Q,Y){var $,G;if(Q!=Y)G=Q>Y?1:-1;else for($=G=0;$U[$]?1:-1;break}return G}function I(W,U,Q,Y){for(var $=0;Q--;)W[Q]-=$,$=W[Q]1;W.splice(0,1));}return function(W,U,Q,Y,$){var G,X,K,ru,pu,gu,Pu,Au,Fu,_,y,D,P,R,L,J,bu,Tu=W.s==U.s?1:-1,Wu=W.c,ju=U.c;if(!Wu||!Wu[0]||!ju||!ju[0])return new Z(!W.s||!U.s||(Wu?ju&&Wu[0]==ju[0]:!ju)?NaN:Wu&&Wu[0]==0||!ju?Tu*0:Tu/0);for(Au=new Z(Tu),Fu=Au.c=[],X=W.e-U.e,Tu=Q+X+1,$||($=o,X=h(W.e/l)-h(U.e/l),Tu=Tu/l|0),K=0;ju[K]==(Wu[K]||0);K++);if(ju[K]>(Wu[K]||0)&&X--,Tu<0)Fu.push(1),ru=!0;else{for(R=Wu.length,J=ju.length,K=0,Tu+=2,pu=i($/(ju[0]+1)),pu>1&&(ju=S(ju,pu,$),Wu=S(Wu,pu,$),J=ju.length,R=Wu.length),P=J,_=Wu.slice(0,J),y=_.length;y=$/2&&L++;do{if(pu=0,G=O(ju,_,J,y),G<0){if(D=_[0],J!=y&&(D=D*$+(_[1]||0)),pu=i(D/L),pu>1)for(pu>=$&&(pu=$-1),gu=S(ju,pu,$),Pu=gu.length,y=_.length;O(gu,_,Pu,y)==1;)pu--,I(gu,J=10;Tu/=10,K++);ku(Au,Q+(Au.e=K+X*l-1)+1,Y,ru)}else Au.e=X,Au.r=+ru;return Au}}();function Su(S,O,I,W){var U,Q,Y,$,G;if(I==null?I=su:m(I,0,8),!S.c)return S.toString();if(U=S.c[0],Y=S.e,O==null)G=g(S.c),G=W==1||W==2&&(Y<=mu||Y>=tu)?F(G,Y):w(G,Y,"0");else if(S=ku(new Z(S),O,I),Q=S.e,G=g(S.c),$=G.length,W==1||W==2&&(O<=Q||Q<=mu)){for(;$$){if(--O>0)for(G+=".";O--;G+="0");}else if(O+=Q-$,O>0)for(Q+1==$&&(G+=".");O--;G+="0");return S.s<0&&U?"-"+G:G}function wu(S,O){for(var I,W,U=1,Q=new Z(S[0]);U=10;U/=10,W++);return(I=W+I*l-1)>nu?S.c=S.e=null:I=10;$/=10,U++);if(Q=O-U,Q<0)Q+=l,Y=O,G=ru[X=0],K=i(G/pu[U-Y-1]%10);else if(X=r((Q+1)/l),X>=ru.length)if(W){for(;ru.length<=X;ru.push(0));G=K=0,U=1,Q%=l,Y=Q-l+1}else break u;else{for(G=$=ru[X],U=1;$>=10;$/=10,U++);Q%=l,Y=Q-l+U,K=Y<0?0:i(G/pu[U-Y-1]%10)}if(W=W||O<0||ru[X+1]!=null||(Y<0?G:G%pu[U-Y-1]),W=I<4?(K||W)&&(I==0||I==(S.s<0?3:2)):K>5||K==5&&(I==4||W||I==6&&(Q>0?Y>0?G/pu[U-Y]:0:ru[X-1])%10&1||I==(S.s<0?8:7)),O<1||!ru[0])return ru.length=0,W?(O-=S.e+1,ru[0]=pu[(l-O%l)%l],S.e=-O||0):ru[0]=S.e=0,S;if(Q==0?(ru.length=X,$=1,X--):(ru.length=X+1,$=pu[l-Q],ru[X]=Y>0?i(G/pu[U-Y]%pu[Y])*$:0),W)for(;;)if(X==0){for(Q=1,Y=ru[0];Y>=10;Y/=10,Q++);for(Y=ru[0]+=$,$=1;Y>=10;Y/=10,$++);Q!=$&&(S.e++,ru[0]==o&&(ru[0]=1));break}else{if(ru[X]+=$,ru[X]!=o)break;ru[X--]=0,$=1}for(Q=ru.length;ru[--Q]===0;ru.pop());}S.e>nu?S.c=S.e=null:S.e=tu?F(O,I):w(O,I,"0"),S.s<0?"-"+O:O)}return N.absoluteValue=N.abs=function(){var S=new Z(this);return S.s<0&&(S.s=1),S},N.comparedTo=function(S,O){return A(this,new Z(S,O))},N.decimalPlaces=N.dp=function(S,O){var I,W,U,Q=this;if(S!=null)return m(S,0,f),O==null?O=su:m(O,0,8),ku(new Z(Q),S+Q.e+1,O);if(!(I=Q.c))return null;if(W=((U=I.length-1)-h(this.e/l))*l,U=I[U])for(;U%10==0;U/=10,W--);return W<0&&(W=0),W},N.dividedBy=N.div=function(S,O){return C(this,new Z(S,O),ou,su)},N.dividedToIntegerBy=N.idiv=function(S,O){return C(this,new Z(S,O),0,1)},N.exponentiatedBy=N.pow=function(S,O){var I,W,U,Q,Y,$,G,X,K,ru=this;if(S=new Z(S),S.c&&!S.isInteger())throw Error(a+"Exponent not an integer: "+Nu(S));if(O!=null&&(O=new Z(O)),$=S.e>14,!ru.c||!ru.c[0]||ru.c[0]==1&&!ru.e&&ru.c.length==1||!S.c||!S.c[0])return K=new Z(Math.pow(+Nu(ru),$?S.s*(2-B(S)):+Nu(S))),O?K.mod(O):K;if(G=S.s<0,O){if(O.c?!O.c[0]:!O.s)return new Z(NaN);W=!G&&ru.isInteger()&&O.isInteger(),W&&(ru=ru.mod(O))}else{if(S.e>9&&(ru.e>0||ru.e<-1||(ru.e==0?ru.c[0]>1||$&&ru.c[1]>=24e7:ru.c[0]<8e13||$&&ru.c[0]<=9999975e7)))return Q=ru.s<0&&B(S)?-0:0,ru.e>-1&&(Q=1/Q),new Z(G?1/Q:Q);lu&&(Q=r(lu/l+2))}for($?(I=new Z(.5),G&&(S.s=1),X=B(S)):(U=Math.abs(+Nu(S)),X=U%2),K=new Z(uu);;){if(X){if(K=K.times(ru),!K.c)break;Q?K.c.length>Q&&(K.c.length=Q):W&&(K=K.mod(O))}if(U){if(U=i(U/2),U===0)break;X=U%2}else if(S=S.times(I),ku(S,S.e+1,1),S.e>14)X=B(S);else{if(U=+Nu(S),U===0)break;X=U%2}ru=ru.times(ru),Q?ru.c&&ru.c.length>Q&&(ru.c.length=Q):W&&(ru=ru.mod(O))}return W?K:(G&&(K=uu.div(K)),O?K.mod(O):Q?ku(K,lu,su,Y):K)},N.integerValue=function(S){var O=new Z(this);return S==null?S=su:m(S,0,8),ku(O,O.e+1,S)},N.isEqualTo=N.eq=function(S,O){return A(this,new Z(S,O))===0},N.isFinite=function(){return!!this.c},N.isGreaterThan=N.gt=function(S,O){return A(this,new Z(S,O))>0},N.isGreaterThanOrEqualTo=N.gte=function(S,O){return(O=A(this,new Z(S,O)))===1||O===0},N.isInteger=function(){return!!this.c&&h(this.e/l)>this.c.length-2},N.isLessThan=N.lt=function(S,O){return A(this,new Z(S,O))<0},N.isLessThanOrEqualTo=N.lte=function(S,O){return(O=A(this,new Z(S,O)))===-1||O===0},N.isNaN=function(){return!this.s},N.isNegative=function(){return this.s<0},N.isPositive=function(){return this.s>0},N.isZero=function(){return!!this.c&&this.c[0]==0},N.minus=function(S,O){var I,W,U,Q,Y=this,$=Y.s;if(S=new Z(S,O),O=S.s,!$||!O)return new Z(NaN);if($!=O)return S.s=-O,Y.plus(S);var G=Y.e/l,X=S.e/l,K=Y.c,ru=S.c;if(!G||!X){if(!K||!ru)return K?(S.s=-O,S):new Z(ru?Y:NaN);if(!K[0]||!ru[0])return ru[0]?(S.s=-O,S):new Z(K[0]?Y:su==3?-0:0)}if(G=h(G),X=h(X),K=K.slice(),$=G-X){for((Q=$<0)?($=-$,U=K):(X=G,U=ru),U.reverse(),O=$;O--;U.push(0));U.reverse()}else for(W=(Q=($=K.length)<(O=ru.length))?$:O,$=O=0;O0)for(;O--;K[I++]=0);for(O=o-1;W>$;){if(K[--W]=0;){for(I=0,pu=D[U]%Fu,gu=D[U]/Fu|0,Y=G,Q=U+Y;Q>U;)X=y[--Y]%Fu,K=y[Y]/Fu|0,$=gu*X+K*pu,X=pu*X+$%Fu*Fu+Pu[Q]+I,I=(X/Au|0)+($/Fu|0)+gu*K,Pu[Q--]=X%Au;Pu[Q]=I}return I?++W:Pu.splice(0,1),xu(S,Pu,W)},N.negated=function(){var S=new Z(this);return S.s=-S.s||null,S},N.plus=function(S,O){var I,W=this,U=W.s;if(S=new Z(S,O),O=S.s,!U||!O)return new Z(NaN);if(U!=O)return S.s=-O,W.minus(S);var Q=W.e/l,Y=S.e/l,$=W.c,G=S.c;if(!Q||!Y){if(!$||!G)return new Z(U/0);if(!$[0]||!G[0])return G[0]?S:new Z($[0]?W:U*0)}if(Q=h(Q),Y=h(Y),$=$.slice(),U=Q-Y){for(U>0?(Y=Q,I=G):(U=-U,I=$),I.reverse();U--;I.push(0));I.reverse()}for(U=$.length,O=G.length,U-O<0&&(I=G,G=$,$=I,O=U),U=0;O;)U=($[--O]=$[O]+G[O]+U)/o|0,$[O]=o===$[O]?0:$[O]%o;return U&&($=[U].concat($),++Y),xu(S,$,Y)},N.precision=N.sd=function(S,O){var I,W,U,Q=this;if(S!=null&&S!==!!S)return m(S,1,f),O==null?O=su:m(O,0,8),ku(new Z(Q),S,O);if(!(I=Q.c))return null;if(U=I.length-1,W=U*l+1,U=I[U]){for(;U%10==0;U/=10,W--);for(U=I[0];U>=10;U/=10,W++);}return S&&Q.e+1>W&&(W=Q.e+1),W},N.shiftedBy=function(S){return m(S,-c,c),this.times("1e"+S)},N.squareRoot=N.sqrt=function(){var S,O,I,W,U,Q=this,Y=Q.c,$=Q.s,G=Q.e,X=ou+4,K=new Z("0.5");if($!==1||!Y||!Y[0])return new Z(!$||$<0&&(!Y||Y[0])?NaN:Y?Q:1/0);if($=Math.sqrt(+Nu(Q)),$==0||$==1/0?(O=g(Y),(O.length+G)%2==0&&(O+="0"),$=Math.sqrt(+O),G=h((G+1)/2)-(G<0||G%2),$==1/0?O="5e"+G:(O=$.toExponential(),O=O.slice(0,O.indexOf("e")+1)+G),I=new Z(O)):I=new Z($+""),I.c[0]){for(G=I.e,$=G+X,$<3&&($=0);;)if(U=I,I=K.times(U.plus(C(Q,U,X,1))),g(U.c).slice(0,$)===(O=g(I.c)).slice(0,$))if(I.e0&&Pu>0){for(Q=Pu%$||$,K=gu.substr(0,Q);Q0&&(K+=X+gu.slice(Q)),pu&&(K="-"+K)}W=ru?K+(I.decimalSeparator||"")+((G=+I.fractionGroupSize)?ru.replace(new RegExp("\\d{"+G+"}\\B","g"),"$&"+(I.fractionGroupSeparator||"")):ru):K}return(I.prefix||"")+W+(I.suffix||"")},N.toFraction=function(S){var O,I,W,U,Q,Y,$,G,X,K,ru,pu,gu=this,Pu=gu.c;if(S!=null&&($=new Z(S),!$.isInteger()&&($.c||$.s!==1)||$.lt(uu)))throw Error(a+"Argument "+($.isInteger()?"out of range: ":"not an integer: ")+Nu($));if(!Pu)return new Z(gu);for(O=new Z(uu),X=I=new Z(uu),W=G=new Z(uu),pu=g(Pu),Q=O.e=pu.length-gu.e-1,O.c[0]=E[(Y=Q%l)<0?l+Y:Y],S=!S||$.comparedTo(O)>0?Q>0?O:X:$,Y=nu,nu=1/0,$=new Z(pu),G.c[0]=0;K=C($,O,0,1),U=I.plus(K.times(W)),U.comparedTo(S)!=1;)I=W,W=U,X=G.plus(K.times(U=X)),G=U,O=$.minus(K.times(U=O)),$=U;return U=C(S.minus(I),W,0,1),G=G.plus(U.times(X)),I=I.plus(U.times(W)),G.s=X.s=gu.s,Q=Q*2,ru=C(X,W,Q,su).minus(gu).abs().comparedTo(C(G,I,Q,su).minus(gu).abs())<1?[X,W]:[G,I],nu=Y,ru},N.toNumber=function(){return+Nu(this)},N.toPrecision=function(S,O){return S!=null&&m(S,1,f),Su(this,S,O,2)},N.toString=function(S){var O,I=this,W=I.s,U=I.e;return U===null?W?(O="Infinity",W<0&&(O="-"+O)):O="NaN":(S==null?O=U<=mu||U>=tu?F(g(I.c),U):w(g(I.c),U,"0"):S===10&&fu?(I=ku(new Z(I),ou+U+1,su),O=w(g(I.c),I.e,"0")):(m(S,2,hu.length,"Base"),O=k(w(g(I.c),U,"0"),10,S,W,!0)),W<0&&I.c[0]&&(O="-"+O)),O},N.valueOf=N.toJSON=function(){return Nu(this)},N._isBigNumber=!0,v!=null&&Z.set(v),Z}function h(v){var C=v|0;return v>0||v===C?C:C-1}function g(v){for(var C,k,j=1,N=v.length,uu=v[0]+"";jtu^k?1:-1;for(su=(mu=N.length)<(tu=uu.length)?mu:tu,ou=0;ouuu[ou]^k?1:-1;return mu==tu?0:mu>tu^k?1:-1}function m(v,C,k,j){if(vk||v!==i(v))throw Error(a+(j||"Argument")+(typeof v=="number"?vk?" out of range: ":" not an integer: ":" not a primitive number: ")+String(v))}function B(v){var C=v.c.length-1;return h(v.e/l)==C&&v.c[C]%2!=0}function F(v,C){return(v.length>1?v.charAt(0)+"."+v.slice(1):v)+(C<0?"e":"e+")+C}function w(v,C,k){var j,N;if(C<0){for(N=k+".";++C;N+=k);v=N+v}else if(j=v.length,++C>j){for(N=k,C-=j;--C;N+=k);v+=N}else CxY)return t;do u%2&&(t+=e),u=kY(u/2),u&&(e+=e);while(u);return t}var SY=_Y,PY=hw,TY=i8;function OY(e){return e!=null&&TY(e.length)&&!PY(e)}var U1=OY,IY=O1,NY=U1,RY=z1,zY=us;function jY(e,u,t){if(!zY(t))return!1;var n=typeof u;return(n=="number"?NY(t)&&RY(u,t.length):n=="string"&&u in t)?IY(t[u],e):!1}var E8=jY,MY=/\s/;function LY(e){for(var u=e.length;u--&&MY.test(e.charAt(u)););return u}var UY=LY,$Y=UY,WY=/^\s+/;function qY(e){return e&&e.slice(0,$Y(e)+1).replace(WY,"")}var HY=qY,GY=HY,RA=us,QY=Zc,zA=0/0,KY=/^[-+]0x[0-9a-f]+$/i,VY=/^0b[01]+$/i,JY=/^0o[0-7]+$/i,ZY=parseInt;function YY(e){if(typeof e=="number")return e;if(QY(e))return zA;if(RA(e)){var u=typeof e.valueOf=="function"?e.valueOf():e;e=RA(u)?u+"":u}if(typeof e!="string")return e===0?e:+e;e=GY(e);var t=VY.test(e);return t||JY.test(e)?ZY(e.slice(2),t?2:8):KY.test(e)?zA:+e}var XY=YY,uX=XY,jA=1/0,eX=17976931348623157e292;function tX(e){if(!e)return e===0?e:0;if(e=uX(e),e===jA||e===-jA){var u=e<0?-1:1;return u*eX}return e===e?e:0}var Vw=tX,nX=Vw;function rX(e){var u=nX(e),t=u%1;return u===u?t?u-t:u:0}var iX=rX,aX=SY,sX=E8,oX=iX,lX=Go;function cX(e,u,t){return(t?sX(e,u,t):u===void 0)?u=1:u=oX(u),aX(lX(e),u)}var EX=cX,ts={},dX=Zu&&Zu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ts,"__esModule",{value:!0});ts.roundNumber=void 0;const fX=dX(Vo),pX=Ko;function hX(e){return e.isZero()?1:Math.floor(Math.log10(e.abs().toNumber())+1)}function CX(e,{precision:u,significant:t}){return t&&u!==null&&u>0?u-hX(e):u}function mX(e,u){const t=CX(e,u);if(t===null)return e.toString();const n=(0,pX.expandRoundMode)(u.roundMode);if(t>=0)return e.toFixed(t,n);const r=Math.pow(10,Math.abs(t));return e=new fX.default(e.div(r).toFixed(0,n)).times(r),e.toString()}ts.roundNumber=mX;var Jw=Zu&&Zu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(L1,"__esModule",{value:!0});L1.formatNumber=void 0;const MA=Jw(Vo),AX=Jw(EX),gX=ts;function BX(e,{formattedNumber:u,unit:t}){return e.replace("%n",u).replace("%u",t)}function yX({significand:e,whole:u,precision:t}){if(u==="0"||t===null)return e;const n=Math.max(0,t-u.length);return(e??"").substr(0,n)}function FX(e,u){var t,n,r;const i=new MA.default(e);if(u.raise&&!i.isFinite())throw new Error(`"${e}" is not a valid numeric value`);const a=(0,gX.roundNumber)(i,u),s=new MA.default(a),o=s.lt(0),l=s.isZero();let[c,E]=a.split(".");const d=[];let f;const p=(t=u.format)!==null&&t!==void 0?t:"%n",h=(n=u.negativeFormat)!==null&&n!==void 0?n:`-${p}`,g=o&&!l?h:p;for(c=c.replace("-","");c.length>0;)d.unshift(c.substr(Math.max(0,c.length-3),3)),c=c.substr(0,c.length-3);return c=d.join(""),f=d.join(u.delimiter),u.significant?E=yX({whole:c,significand:E,precision:u.precision}):E=E??(0,AX.default)("0",(r=u.precision)!==null&&r!==void 0?r:0),u.stripInsignificantZeros&&E&&(E=E.replace(/0+$/,"")),i.isNaN()&&(f=e.toString()),E&&i.isFinite()&&(f+=(u.separator||".")+E),BX(g,{formattedNumber:f,unit:u.unit})}L1.formatNumber=FX;var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0});Jo.getFullScope=void 0;function DX(e,u,t){let n="";return(u instanceof String||typeof u=="string")&&(n=u),u instanceof Array&&(n=u.join(e.defaultSeparator)),t.scope&&(n=[t.scope,n].join(e.defaultSeparator)),n}Jo.getFullScope=DX;var Zo={};Object.defineProperty(Zo,"__esModule",{value:!0});Zo.inferType=void 0;function vX(e){var u,t;if(e===null)return"null";const n=typeof e;return n!=="object"?n:((t=(u=e==null?void 0:e.constructor)===null||u===void 0?void 0:u.name)===null||t===void 0?void 0:t.toLowerCase())||"object"}Zo.inferType=vX;var $1={};Object.defineProperty($1,"__esModule",{value:!0});$1.interpolate=void 0;const bX=Ti;function wX(e,u,t){t=Object.keys(t).reduce((r,i)=>(r[e.transformKey(i)]=t[i],r),{});const n=u.match(e.placeholder);if(!n)return u;for(;n.length;){let r;const i=n.shift(),a=i.replace(e.placeholder,"$1");(0,bX.isSet)(t[a])?r=t[a].toString().replace(/\$/gm,"_#$#_"):a in t?r=e.nullPlaceholder(e,i,u,t):r=e.missingPlaceholder(e,i,u,t);const s=new RegExp(i.replace(/\{/gm,"\\{").replace(/\}/gm,"\\}"));u=u.replace(s,r)}return u.replace(/_#\$#_/g,"$")}$1.interpolate=wX;var Yo={},xX=Zu&&Zu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yo,"__esModule",{value:!0});Yo.lookup=void 0;const kX=xX(n8),_X=Ti,SX=Jo,PX=Zo;function TX(e,u,t={}){t=Object.assign({},t);const n="locale"in t?t.locale:e.locale,r=(0,PX.inferType)(n),i=e.locales.get(r==="string"?n:typeof n).slice();u=(0,SX.getFullScope)(e,u,t).split(e.defaultSeparator).map(s=>e.transformKey(s)).join(".");const a=i.map(s=>(0,kX.default)(e.translations,[s,u].join(".")));return a.push(t.defaultValue),a.find(s=>(0,_X.isSet)(s))}Yo.lookup=TX;var W1={},OX=Zu&&Zu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(W1,"__esModule",{value:!0});W1.numberToDelimited=void 0;const IX=OX(Vo);function NX(e,u){const t=new IX.default(e);if(!t.isFinite())return e.toString();if(!u.delimiterPattern.global)throw new Error(`options.delimiterPattern must be a globalThis regular expression; received ${u.delimiterPattern}`);let[n,r]=t.toString().split(".");return n=n.replace(u.delimiterPattern,i=>`${i}${u.delimiter}`),[n,r].filter(Boolean).join(u.separator)}W1.numberToDelimited=NX;var q1={};function RX(e,u){for(var t=-1,n=u.length,r=e.length;++t0&&t(s)?u>1?Yw(s,u-1,t,n,r):UX(r,s):n||(r[r.length]=s)}return r}var Xw=Yw,WX=N1;function qX(){this.__data__=new WX,this.size=0}var HX=qX;function GX(e){var u=this.__data__,t=u.delete(e);return this.size=u.size,t}var QX=GX;function KX(e){return this.__data__.get(e)}var VX=KX;function JX(e){return this.__data__.has(e)}var ZX=JX,YX=N1,XX=YC,uuu=XC,euu=200;function tuu(e,u){var t=this.__data__;if(t instanceof YX){var n=t.__data__;if(!XX||n.lengths))return!1;var l=i.get(e),c=i.get(u);if(l&&c)return l==u&&c==e;var E=-1,d=!0,f=t&Cuu?new duu:void 0;for(i.set(e,u),i.set(u,e);++Eu||i&&a&&o&&!s&&!l||n&&a&&o||!t&&o||!r)return 1;if(!n&&!i&&!l&&e=s)return o;var l=t[n];return o*(l=="desc"?-1:1)}}return e.index-u.index}var vnu=Dnu,D6=Aw,bnu=t8,wnu=Ztu,xnu=mnu,knu=gnu,_nu=nx,Snu=vnu,Pnu=H1,Tnu=Sn;function Onu(e,u,t){u.length?u=D6(u,function(i){return Tnu(i)?function(a){return bnu(a,i.length===1?i[0]:i)}:i}):u=[Pnu];var n=-1;u=D6(u,_nu(wnu));var r=xnu(e,function(i,a,s){var o=D6(u,function(l){return l(i)});return{criteria:o,index:++n,value:i}});return knu(r,function(i,a){return Snu(i,a,t)})}var Inu=Onu;function Nnu(e,u,t){switch(t.length){case 0:return e.call(u);case 1:return e.call(u,t[0]);case 2:return e.call(u,t[0],t[1]);case 3:return e.call(u,t[0],t[1],t[2])}return e.apply(u,t)}var Rnu=Nnu,znu=Rnu,og=Math.max;function jnu(e,u,t){return u=og(u===void 0?e.length-1:u,0),function(){for(var n=arguments,r=-1,i=og(n.length-u,0),a=Array(i);++r0){if(++u>=Gnu)return arguments[0]}else u=0;return e.apply(void 0,arguments)}}var Jnu=Vnu,Znu=Hnu,Ynu=Jnu,Xnu=Ynu(Znu),uru=Xnu,eru=H1,tru=Mnu,nru=uru;function rru(e,u){return nru(tru(e,u,eru),e+"")}var iru=rru,aru=Xw,sru=Inu,oru=iru,cg=E8,lru=oru(function(e,u){if(e==null)return[];var t=u.length;return t>1&&cg(e,u[0],u[1])?u=[]:t>2&&cg(u[0],u[1],u[2])&&(u=[u[0]]),sru(e,aru(u,1),[])}),cru=lru;function Eru(e,u,t){for(var n=-1,r=e.length,i=u.length,a={};++nparseInt(e,10)));function Dru(e,u,t){const n={roundMode:t.roundMode,precision:t.precision,significant:t.significant};let r;if((0,yru.inferType)(t.units)==="string"){const E=t.units;if(r=(0,Bru.lookup)(e,E),!r)throw new Error(`The scope "${e.locale}${e.defaultSeparator}${(0,gru.getFullScope)(e,E,{})}" couldn't be found`)}else r=t.units;let i=(0,Eg.roundNumber)(new v6.default(u),n);const a=E=>(0,mru.default)(Object.keys(E).map(d=>Fru[d]),d=>d*-1),s=(E,d)=>{const f=E.isZero()?0:Math.floor(Math.log10(E.abs().toNumber()));return a(d).find(p=>f>=p)||0},o=(E,d)=>{const f=$p[d.toString()];return E[f]||""},l=s(new v6.default(i),r),c=o(r,l);if(i=(0,Eg.roundNumber)(new v6.default(i).div(Math.pow(10,l)),n),t.stripInsignificantZeros){let[E,d]=i.split(".");d=(d||"").replace(/0+$/,""),i=E,d&&(i+=`${t.separator}${d}`)}return t.format.replace("%n",i||"0").replace("%u",c).trim()}q1.numberToHuman=Dru;var G1={},vru=Zu&&Zu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(G1,"__esModule",{value:!0});G1.numberToHumanSize=void 0;const RE=vru(Vo),bru=ts,wru=Ko,dg=["byte","kb","mb","gb","tb","pb","eb"];function xru(e,u,t){const n=(0,wru.expandRoundMode)(t.roundMode),r=1024,i=new RE.default(u).abs(),a=i.lt(r);let s;const o=(p,h)=>{const g=h.length-1,A=new RE.default(Math.log(p.toNumber())).div(Math.log(r)).integerValue(RE.default.ROUND_DOWN).toNumber();return Math.min(g,A)},l=p=>`number.human.storage_units.units.${a?"byte":p[c]}`,c=o(i,dg);a?s=i.integerValue():s=new RE.default((0,bru.roundNumber)(i.div(Math.pow(r,c)),{significant:t.significant,precision:t.precision,roundMode:t.roundMode}));const E=e.translate("number.human.storage_units.format",{defaultValue:"%n %u"}),d=e.translate(l(dg),{count:i.integerValue().toNumber()});let f=s.toFixed(t.precision,n);return t.stripInsignificantZeros&&(f=f.replace(/(\..*?)0+$/,"$1").replace(/\.$/,"")),E.replace("%n",f).replace("%u",d)}G1.numberToHumanSize=xru;var Xc={};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.parseDate=void 0;function kru(e){if(e instanceof Date)return e;if(typeof e=="number"){const n=new Date;return n.setTime(e),n}const u=new String(e).match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})(?:[.,](\d{1,3}))?)?(Z|\+00:?00)?/);if(u){const n=u.slice(1,8).map(d=>parseInt(d,10)||0);n[1]-=1;const[r,i,a,s,o,l,c]=n;return u[8]?new Date(Date.UTC(r,i,a,s,o,l,c)):new Date(r,i,a,s,o,l,c)}e.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)&&new Date().setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" ")));const t=new Date;return t.setTime(Date.parse(e)),t}Xc.parseDate=kru;var Q1={};Object.defineProperty(Q1,"__esModule",{value:!0});Q1.pluralize=void 0;const fg=Ti,_ru=Yo;function Sru({i18n:e,count:u,scope:t,options:n,baseScope:r}){n=Object.assign({},n);let i,a;if(typeof t=="object"&&t?i=t:i=(0,_ru.lookup)(e,t,n),!i)return e.missingTranslation.get(t,n);const o=e.pluralization.get(n.locale)(e,u),l=[];for(;o.length;){const c=o.shift();if((0,fg.isSet)(i[c])){a=i[c];break}l.push(c)}return(0,fg.isSet)(a)?(n.count=u,e.interpolate(e,a,n)):e.missingTranslation.get(r.split(e.defaultSeparator).concat([l[0]]),n)}Q1.pluralize=Sru;var K1={},Pru=Xw,Tru=1/0;function Oru(e){var u=e==null?0:e.length;return u?Pru(e,Tru):[]}var Iru=Oru,cx=Zu&&Zu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(K1,"__esModule",{value:!0});K1.propertyFlatList=void 0;const Nru=cx(us),Rru=cx(Iru);class zru{constructor(u){this.target=u}call(){const u=(0,Rru.default)(Object.keys(this.target).map(t=>this.compute(this.target[t],t)));return u.sort(),u}compute(u,t){return!Array.isArray(u)&&(0,Nru.default)(u)?Object.keys(u).map(n=>this.compute(u[n],`${t}.${n}`)):t}}function jru(e){return new zru(e).call()}K1.propertyFlatList=jru;var V1={};Object.defineProperty(V1,"__esModule",{value:!0});V1.strftime=void 0;const Mru={meridian:{am:"AM",pm:"PM"},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbrDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthNames:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbrMonthNames:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function Lru(e,u,t={}){const{abbrDayNames:n,dayNames:r,abbrMonthNames:i,monthNames:a,meridian:s}=Object.assign(Object.assign({},Mru),t);if(isNaN(e.getTime()))throw new Error("strftime() requires a valid date object, but received an invalid date.");const o=e.getDay(),l=e.getDate(),c=e.getFullYear(),E=e.getMonth()+1,d=e.getHours();let f=d;const p=d>11?"pm":"am",h=e.getSeconds(),g=e.getMinutes(),A=e.getTimezoneOffset(),m=Math.floor(Math.abs(A/60)),B=Math.abs(A)-m*60,F=(A>0?"-":"+")+(m.toString().length<2?"0"+m:m)+(B.toString().length<2?"0"+B:B);return f>12?f=f-12:f===0&&(f=12),u=u.replace("%a",n[o]),u=u.replace("%A",r[o]),u=u.replace("%b",i[E]),u=u.replace("%B",a[E]),u=u.replace("%d",l.toString().padStart(2,"0")),u=u.replace("%e",l.toString()),u=u.replace("%-d",l.toString()),u=u.replace("%H",d.toString().padStart(2,"0")),u=u.replace("%-H",d.toString()),u=u.replace("%k",d.toString()),u=u.replace("%I",f.toString().padStart(2,"0")),u=u.replace("%-I",f.toString()),u=u.replace("%l",f.toString()),u=u.replace("%m",E.toString().padStart(2,"0")),u=u.replace("%-m",E.toString()),u=u.replace("%M",g.toString().padStart(2,"0")),u=u.replace("%-M",g.toString()),u=u.replace("%p",s[p]),u=u.replace("%P",s[p].toLowerCase()),u=u.replace("%S",h.toString().padStart(2,"0")),u=u.replace("%-S",h.toString()),u=u.replace("%w",o.toString()),u=u.replace("%y",c.toString().padStart(2,"0").substr(-2)),u=u.replace("%-y",c.toString().padStart(2,"0").substr(-2).replace(/^0+/,"")),u=u.replace("%Y",c.toString()),u=u.replace(/%z/i,F),u}V1.strftime=Lru;var J1={},Uru=Math.ceil,$ru=Math.max;function Wru(e,u,t,n){for(var r=-1,i=$ru(Uru((u-e)/(t||1)),0),a=Array(i);i--;)a[n?i:++r]=e,e+=t;return a}var qru=Wru,Hru=qru,Gru=E8,b6=Vw;function Qru(e){return function(u,t,n){return n&&typeof n!="number"&&Gru(u,t,n)&&(t=n=void 0),u=b6(u),t===void 0?(t=u,u=0):t=b6(t),n=n===void 0?ut>=e&&t<=u;function uiu(e,u,t,n={}){const r=n.scope||"datetime.distance_in_words",i=(C,k=0)=>e.t(C,{count:k,scope:r});u=(0,pg.parseDate)(u),t=(0,pg.parseDate)(t);let a=u.getTime()/1e3,s=t.getTime()/1e3;a>s&&([u,t,a,s]=[t,u,s,a]);const o=Math.round(s-a),l=Math.round((s-a)/60),E=l/60/24,d=Math.round(l/60),f=Math.round(E),p=Math.round(f/30);if(Le(0,1,l))return n.includeSeconds?Le(0,4,o)?i("less_than_x_seconds",5):Le(5,9,o)?i("less_than_x_seconds",10):Le(10,19,o)?i("less_than_x_seconds",20):Le(20,39,o)?i("half_a_minute"):Le(40,59,o)?i("less_than_x_minutes",1):i("x_minutes",1):l===0?i("less_than_x_minutes",1):i("x_minutes",l);if(Le(2,44,l))return i("x_minutes",l);if(Le(45,89,l))return i("about_x_hours",1);if(Le(90,1439,l))return i("about_x_hours",d);if(Le(1440,2519,l))return i("x_days",1);if(Le(2520,43199,l))return i("x_days",f);if(Le(43200,86399,l))return i("about_x_months",Math.round(l/43200));if(Le(86400,525599,l))return i("x_months",p);let h=u.getFullYear();u.getMonth()+1>=3&&(h+=1);let g=t.getFullYear();t.getMonth()+1<3&&(g-=1);const A=h>g?0:(0,Xru.default)(h,g).filter(C=>new Date(C,1,29).getMonth()==1).length,m=525600,B=A*1440,F=l-B,w=Math.trunc(F/m),v=parseFloat((F/m-w).toPrecision(3));return v<.25?i("about_x_years",w):v<.75?i("over_x_years",w):i("almost_x_years",w+1)}J1.timeAgoInWords=uiu;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeAgoInWords=e.strftime=e.roundNumber=e.propertyFlatList=e.pluralize=e.parseDate=e.numberToHumanSize=e.numberToHuman=e.numberToDelimited=e.lookup=e.isSet=e.interpolate=e.inferType=e.getFullScope=e.formatNumber=e.expandRoundMode=e.createTranslationOptions=e.camelCaseKeys=void 0;var u=j1;Object.defineProperty(e,"camelCaseKeys",{enumerable:!0,get:function(){return u.camelCaseKeys}});var t=M1;Object.defineProperty(e,"createTranslationOptions",{enumerable:!0,get:function(){return t.createTranslationOptions}});var n=Ko;Object.defineProperty(e,"expandRoundMode",{enumerable:!0,get:function(){return n.expandRoundMode}});var r=L1;Object.defineProperty(e,"formatNumber",{enumerable:!0,get:function(){return r.formatNumber}});var i=Jo;Object.defineProperty(e,"getFullScope",{enumerable:!0,get:function(){return i.getFullScope}});var a=Zo;Object.defineProperty(e,"inferType",{enumerable:!0,get:function(){return a.inferType}});var s=$1;Object.defineProperty(e,"interpolate",{enumerable:!0,get:function(){return s.interpolate}});var o=Ti;Object.defineProperty(e,"isSet",{enumerable:!0,get:function(){return o.isSet}});var l=Yo;Object.defineProperty(e,"lookup",{enumerable:!0,get:function(){return l.lookup}});var c=W1;Object.defineProperty(e,"numberToDelimited",{enumerable:!0,get:function(){return c.numberToDelimited}});var E=q1;Object.defineProperty(e,"numberToHuman",{enumerable:!0,get:function(){return E.numberToHuman}});var d=G1;Object.defineProperty(e,"numberToHumanSize",{enumerable:!0,get:function(){return d.numberToHumanSize}});var f=Xc;Object.defineProperty(e,"parseDate",{enumerable:!0,get:function(){return f.parseDate}});var p=Q1;Object.defineProperty(e,"pluralize",{enumerable:!0,get:function(){return p.pluralize}});var h=K1;Object.defineProperty(e,"propertyFlatList",{enumerable:!0,get:function(){return h.propertyFlatList}});var g=ts;Object.defineProperty(e,"roundNumber",{enumerable:!0,get:function(){return g.roundNumber}});var A=V1;Object.defineProperty(e,"strftime",{enumerable:!0,get:function(){return A.strftime}});var m=J1;Object.defineProperty(e,"timeAgoInWords",{enumerable:!0,get:function(){return m.timeAgoInWords}})})(c8);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingTranslation=e.errorStrategy=e.messageStrategy=e.guessStrategy=void 0;const u=c8,t=function(a,s){s instanceof Array&&(s=s.join(a.defaultSeparator));const o=s.split(a.defaultSeparator).slice(-1)[0];return a.missingTranslationPrefix+o.replace("_"," ").replace(/([a-z])([A-Z])/g,(l,c,E)=>`${c} ${E.toLowerCase()}`)};e.guessStrategy=t;const n=(a,s,o)=>{const l=(0,u.getFullScope)(a,s,o),c="locale"in o?o.locale:a.locale,E=(0,u.inferType)(c);return`[missing "${[E=="string"?c:E,l].join(a.defaultSeparator)}" translation]`};e.messageStrategy=n;const r=(a,s,o)=>{const l=(0,u.getFullScope)(a,s,o),c=[a.locale,l].join(a.defaultSeparator);throw new Error(`Missing translation: ${c}`)};e.errorStrategy=r;class i{constructor(s){this.i18n=s,this.registry={},this.register("guess",e.guessStrategy),this.register("message",e.messageStrategy),this.register("error",e.errorStrategy)}register(s,o){this.registry[s]=o}get(s,o){var l;return this.registry[(l=o.missingBehavior)!==null&&l!==void 0?l:this.i18n.missingBehavior](this.i18n,s,o)}}e.MissingTranslation=i})(l8);var eiu=Zu&&Zu.__awaiter||function(e,u,t,n){function r(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function s(c){try{l(n.next(c))}catch(E){a(E)}}function o(c){try{l(n.throw(c))}catch(E){a(E)}}function l(c){c.done?i(c.value):r(c.value).then(s,o)}l((n=n.apply(e,u||[])).next())})},Z1=Zu&&Zu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(P1,"__esModule",{value:!0});P1.I18n=void 0;const hg=Z1(n8),tiu=Z1(Zq),niu=Z1(pH),riu=Z1(mH),iiu=a8,aiu=o8,siu=l8,Mu=c8,w6={defaultLocale:"en",availableLocales:["en"],locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,enableFallback:!1,missingBehavior:"message",missingTranslationPrefix:"",missingPlaceholder:(e,u)=>`[missing "${u}" value]`,nullPlaceholder:(e,u,t,n)=>e.missingPlaceholder(e,u,t,n),transformKey:e=>e};class oiu{constructor(u={},t={}){this._locale=w6.locale,this._defaultLocale=w6.defaultLocale,this._version=0,this.onChangeHandlers=[],this.translations={},this.availableLocales=[],this.t=this.translate,this.p=this.pluralize,this.l=this.localize,this.distanceOfTimeInWords=this.timeAgoInWords;const{locale:n,enableFallback:r,missingBehavior:i,missingTranslationPrefix:a,missingPlaceholder:s,nullPlaceholder:o,defaultLocale:l,defaultSeparator:c,placeholder:E,transformKey:d}=Object.assign(Object.assign({},w6),t);this.locale=n,this.defaultLocale=l,this.defaultSeparator=c,this.enableFallback=r,this.locale=n,this.missingBehavior=i,this.missingTranslationPrefix=a,this.missingPlaceholder=s,this.nullPlaceholder=o,this.placeholder=E,this.pluralization=new aiu.Pluralization(this),this.locales=new iiu.Locales(this),this.missingTranslation=new siu.MissingTranslation(this),this.transformKey=d,this.interpolate=Mu.interpolate,this.store(u)}store(u){(0,Mu.propertyFlatList)(u).forEach(n=>(0,riu.default)(this.translations,n,(0,hg.default)(u,n),Object)),this.hasChanged()}get locale(){return this._locale||this.defaultLocale||"en"}set locale(u){if(typeof u!="string")throw new Error(`Expected newLocale to be a string; got ${(0,Mu.inferType)(u)}`);const t=this._locale!==u;this._locale=u,t&&this.hasChanged()}get defaultLocale(){return this._defaultLocale||"en"}set defaultLocale(u){if(typeof u!="string")throw new Error(`Expected newLocale to be a string; got ${(0,Mu.inferType)(u)}`);const t=this._defaultLocale!==u;this._defaultLocale=u,t&&this.hasChanged()}translate(u,t){t=Object.assign({},t);const n=(0,Mu.createTranslationOptions)(this,u,t);let r;return n.some(a=>((0,Mu.isSet)(a.scope)?r=(0,Mu.lookup)(this,a.scope,t):(0,Mu.isSet)(a.message)&&(r=a.message),r!=null))?(typeof r=="string"?r=this.interpolate(this,r,t):typeof r=="object"&&r&&(0,Mu.isSet)(t.count)&&(r=(0,Mu.pluralize)({i18n:this,count:t.count||0,scope:r,options:t,baseScope:(0,Mu.getFullScope)(this,u,t)})),t&&r instanceof Array&&(r=r.map(a=>typeof a=="string"?(0,Mu.interpolate)(this,a,t):a)),r):this.missingTranslation.get(u,t)}pluralize(u,t,n){return(0,Mu.pluralize)({i18n:this,count:u,scope:t,options:Object.assign({},n),baseScope:(0,Mu.getFullScope)(this,t,n??{})})}localize(u,t,n){if(n=Object.assign({},n),t==null)return"";switch(u){case"currency":return this.numberToCurrency(t);case"number":return(0,Mu.formatNumber)(t,Object.assign({delimiter:",",precision:3,separator:".",significant:!1,stripInsignificantZeros:!1},(0,Mu.lookup)(this,"number.format")));case"percentage":return this.numberToPercentage(t);default:{let r;return u.match(/^(date|time)/)?r=this.toTime(u,t):r=t.toString(),(0,Mu.interpolate)(this,r,n)}}}toTime(u,t){const n=(0,Mu.parseDate)(t),r=(0,Mu.lookup)(this,u);return n.toString().match(/invalid/i)||!r?n.toString():this.strftime(n,r)}numberToCurrency(u,t={}){return(0,Mu.formatNumber)(u,Object.assign(Object.assign(Object.assign({delimiter:",",format:"%u%n",precision:2,separator:".",significant:!1,stripInsignificantZeros:!1,unit:"$"},(0,Mu.camelCaseKeys)(this.get("number.format"))),(0,Mu.camelCaseKeys)(this.get("number.currency.format"))),t))}numberToPercentage(u,t={}){return(0,Mu.formatNumber)(u,Object.assign(Object.assign(Object.assign({delimiter:"",format:"%n%",precision:3,stripInsignificantZeros:!1,separator:".",significant:!1},(0,Mu.camelCaseKeys)(this.get("number.format"))),(0,Mu.camelCaseKeys)(this.get("number.percentage.format"))),t))}numberToHumanSize(u,t={}){return(0,Mu.numberToHumanSize)(this,u,Object.assign(Object.assign(Object.assign({delimiter:"",precision:3,significant:!0,stripInsignificantZeros:!0,units:{billion:"Billion",million:"Million",quadrillion:"Quadrillion",thousand:"Thousand",trillion:"Trillion",unit:""}},(0,Mu.camelCaseKeys)(this.get("number.human.format"))),(0,Mu.camelCaseKeys)(this.get("number.human.storage_units"))),t))}numberToHuman(u,t={}){return(0,Mu.numberToHuman)(this,u,Object.assign(Object.assign(Object.assign({delimiter:"",separator:".",precision:3,significant:!0,stripInsignificantZeros:!0,format:"%n %u",roundMode:"default",units:{billion:"Billion",million:"Million",quadrillion:"Quadrillion",thousand:"Thousand",trillion:"Trillion",unit:""}},(0,Mu.camelCaseKeys)(this.get("number.human.format"))),(0,Mu.camelCaseKeys)(this.get("number.human.decimal_units"))),t))}numberToRounded(u,t){return(0,Mu.formatNumber)(u,Object.assign({unit:"",precision:3,significant:!1,separator:".",delimiter:"",stripInsignificantZeros:!1},t))}numberToDelimited(u,t={}){return(0,Mu.numberToDelimited)(u,Object.assign({delimiterPattern:/(\d)(?=(\d\d\d)+(?!\d))/g,delimiter:",",separator:"."},t))}withLocale(u,t){return eiu(this,void 0,void 0,function*(){const n=this.locale;try{this.locale=u,yield t()}finally{this.locale=n}})}strftime(u,t,n={}){return(0,Mu.strftime)(u,t,Object.assign(Object.assign(Object.assign({},(0,Mu.camelCaseKeys)((0,Mu.lookup)(this,"date"))),{meridian:{am:(0,Mu.lookup)(this,"time.am")||"AM",pm:(0,Mu.lookup)(this,"time.pm")||"PM"}}),n))}update(u,t,n={strict:!1}){if(n.strict&&!(0,tiu.default)(this.translations,u))throw new Error(`The path "${u}" is not currently defined`);const r=(0,hg.default)(this.translations,u),i=(0,Mu.inferType)(r),a=(0,Mu.inferType)(t);if(n.strict&&i!==a)throw new Error(`The current type for "${u}" is "${i}", but you're trying to override it with "${a}"`);let s;a==="object"?s=Object.assign(Object.assign({},r),t):s=t,(0,niu.default)(this.translations,u,s),this.hasChanged()}toSentence(u,t={}){const{wordsConnector:n,twoWordsConnector:r,lastWordConnector:i}=Object.assign(Object.assign({wordsConnector:", ",twoWordsConnector:" and ",lastWordConnector:", and "},(0,Mu.camelCaseKeys)((0,Mu.lookup)(this,"support.array"))),t),a=u.length;switch(a){case 0:return"";case 1:return`${u[0]}`;case 2:return u.join(r);default:return[u.slice(0,a-1).join(n),i,u[a-1]].join("")}}timeAgoInWords(u,t,n={}){return(0,Mu.timeAgoInWords)(this,u,t,n)}onChange(u){return this.onChangeHandlers.push(u),()=>{this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(u),1)}}get version(){return this._version}formatNumber(u,t){return(0,Mu.formatNumber)(u,t)}get(u){return(0,Mu.lookup)(this,u)}runCallbacks(){this.onChangeHandlers.forEach(u=>u(this))}hasChanged(){this._version+=1,this.runCallbacks()}}P1.I18n=oiu;var Ex={};Object.defineProperty(Ex,"__esModule",{value:!0});(function(e){var u=Zu&&Zu.__createBinding||(Object.create?function(s,o,l,c){c===void 0&&(c=l);var E=Object.getOwnPropertyDescriptor(o,l);(!E||("get"in E?!o.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return o[l]}}),Object.defineProperty(s,c,E)}:function(s,o,l,c){c===void 0&&(c=l),s[c]=o[l]}),t=Zu&&Zu.__exportStar||function(s,o){for(var l in s)l!=="default"&&!Object.prototype.hasOwnProperty.call(o,l)&&u(o,s,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.useMakePlural=e.Pluralization=e.MissingTranslation=e.Locales=e.I18n=void 0;var n=P1;Object.defineProperty(e,"I18n",{enumerable:!0,get:function(){return n.I18n}});var r=a8;Object.defineProperty(e,"Locales",{enumerable:!0,get:function(){return r.Locales}});var i=l8;Object.defineProperty(e,"MissingTranslation",{enumerable:!0,get:function(){return i.MissingTranslation}});var a=o8;Object.defineProperty(e,"Pluralization",{enumerable:!0,get:function(){return a.Pluralization}}),Object.defineProperty(e,"useMakePlural",{enumerable:!0,get:function(){return a.useMakePlural}}),t(Ex,e)})(dw);var Wp=function(e,u){return Wp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},Wp(e,u)};function dx(e,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");Wp(e,u);function t(){this.constructor=e}e.prototype=u===null?Object.create(u):(t.prototype=u.prototype,new t)}var Bt=function(){return Bt=Object.assign||function(u){for(var t,n=1,r=arguments.length;n=0;s--)(a=e[s])&&(i=(r<3?a(i):r>3?a(u,t,i):a(u,t))||i);return r>3&&i&&Object.defineProperty(u,t,i),i}function px(e,u){return function(t,n){u(t,n,e)}}function liu(e,u,t,n,r,i){function a(A){if(A!==void 0&&typeof A!="function")throw new TypeError("Function expected");return A}for(var s=n.kind,o=s==="getter"?"get":s==="setter"?"set":"value",l=!u&&e?n.static?e:e.prototype:null,c=u||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),E,d=!1,f=t.length-1;f>=0;f--){var p={};for(var h in n)p[h]=h==="access"?{}:n[h];for(var h in n.access)p.access[h]=n.access[h];p.addInitializer=function(A){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(A||null))};var g=(0,t[f])(s==="accessor"?{get:c.get,set:c.set}:c[o],p);if(s==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(E=a(g.get))&&(c.get=E),(E=a(g.set))&&(c.set=E),(E=a(g.init))&&r.unshift(E)}else(E=a(g))&&(s==="field"?r.unshift(E):c[o]=E)}l&&Object.defineProperty(l,n.name,c),d=!0}function ciu(e,u,t){for(var n=arguments.length>2,r=0;r0&&i[i.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}function p8(e,u){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var n=t.call(e),r,i=[],a;try{for(;(u===void 0||u-- >0)&&!(r=n.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return i}function gx(){for(var e=[],u=0;u1||s(d,f)})})}function s(d,f){try{o(n[d](f))}catch(p){E(i[0][3],p)}}function o(d){d.value instanceof mo?Promise.resolve(d.value.v).then(l,c):E(i[0][2],d)}function l(d){s("next",d)}function c(d){s("throw",d)}function E(d,f){d(f),i.shift(),i.length&&s(i[0][0],i[0][1])}}function Fx(e){var u,t;return u={},n("next"),n("throw",function(r){throw r}),n("return"),u[Symbol.iterator]=function(){return this},u;function n(r,i){u[r]=e[r]?function(a){return(t=!t)?{value:mo(e[r](a)),done:!1}:i?i(a):a}:i}}function Dx(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u=e[Symbol.asyncIterator],t;return u?u.call(e):(e=typeof d2=="function"?d2(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(a){return new Promise(function(s,o){a=e[i](a),r(s,o,a.done,a.value)})}}function r(i,a,s,o){Promise.resolve(o).then(function(l){i({value:l,done:s})},a)}}function vx(e,u){return Object.defineProperty?Object.defineProperty(e,"raw",{value:u}):e.raw=u,e}var fiu=Object.create?function(e,u){Object.defineProperty(e,"default",{enumerable:!0,value:u})}:function(e,u){e.default=u};function bx(e){if(e&&e.__esModule)return e;var u={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&X1(u,e,t);return fiu(u,e),u}function wx(e){return e&&e.__esModule?e:{default:e}}function xx(e,u,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof u=="function"?e!==u||!n:!u.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(e):n?n.value:u.get(e)}function kx(e,u,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof u=="function"?e!==u||!r:!u.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(e,t):r?r.value=t:u.set(e,t),t}function _x(e,u){if(u===null||typeof u!="object"&&typeof u!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?u===e:e.has(u)}function Sx(e,u,t){if(u!=null){if(typeof u!="object"&&typeof u!="function")throw new TypeError("Object expected.");var n;if(t){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=u[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=u[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:u,dispose:n,async:t})}else t&&e.stack.push({async:!0});return u}var piu=typeof SuppressedError=="function"?SuppressedError:function(e,u,t){var n=new Error(t);return n.name="SuppressedError",n.error=e,n.suppressed=u,n};function Px(e){function u(n){e.error=e.hasError?new piu(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function t(){for(;e.stack.length;){var n=e.stack.pop();try{var r=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(r).then(t,function(i){return u(i),t()})}catch(i){u(i)}}if(e.hasError)throw e.error}return t()}const hiu={__extends:dx,__assign:Bt,__rest:Y1,__decorate:fx,__param:px,__metadata:hx,__awaiter:Cx,__generator:mx,__createBinding:X1,__exportStar:Ax,__values:d2,__read:p8,__spread:gx,__spreadArrays:Bx,__spreadArray:h8,__await:mo,__asyncGenerator:yx,__asyncDelegator:Fx,__asyncValues:Dx,__makeTemplateObject:vx,__importStar:bx,__importDefault:wx,__classPrivateFieldGet:xx,__classPrivateFieldSet:kx,__classPrivateFieldIn:_x,__addDisposableResource:Sx,__disposeResources:Px},U5u=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Sx,get __assign(){return Bt},__asyncDelegator:Fx,__asyncGenerator:yx,__asyncValues:Dx,__await:mo,__awaiter:Cx,__classPrivateFieldGet:xx,__classPrivateFieldIn:_x,__classPrivateFieldSet:kx,__createBinding:X1,__decorate:fx,__disposeResources:Px,__esDecorate:liu,__exportStar:Ax,__extends:dx,__generator:mx,__importDefault:wx,__importStar:bx,__makeTemplateObject:vx,__metadata:hx,__param:px,__propKey:Eiu,__read:p8,__rest:Y1,__runInitializers:ciu,__setFunctionName:diu,__spread:gx,__spreadArray:h8,__spreadArrays:Bx,__values:d2,default:hiu},Symbol.toStringTag,{value:"Module"}));var E9="right-scroll-bar-position",d9="width-before-scroll-bar",Ciu="with-scroll-bars-hidden",miu="--removed-body-scroll-bar-size";function Aiu(e,u){return typeof e=="function"?e(u):e&&(e.current=u),e}function giu(e,u){var t=M.useState(function(){return{value:e,callback:u,facade:{get current(){return t.value},set current(n){var r=t.value;r!==n&&(t.value=n,t.callback(n,r))}}}})[0];return t.callback=u,t.facade}function Biu(e,u){return giu(u||null,function(t){return e.forEach(function(n){return Aiu(n,t)})})}function yiu(e){return e}function Fiu(e,u){u===void 0&&(u=yiu);var t=[],n=!1,r={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(i){var a=u(i,n);return t.push(a),function(){t=t.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;t.length;){var a=t;t=[],a.forEach(i)}t={push:function(s){return i(s)},filter:function(){return t}}},assignMedium:function(i){n=!0;var a=[];if(t.length){var s=t;t=[],s.forEach(i),a=t}var o=function(){var c=a;a=[],c.forEach(i)},l=function(){return Promise.resolve().then(o)};l(),t={push:function(c){a.push(c),l()},filter:function(c){return a=a.filter(c),t}}}};return r}function Diu(e){e===void 0&&(e={});var u=Fiu(null);return u.options=Bt({async:!0,ssr:!1},e),u}var Tx=function(e){var u=e.sideCar,t=Y1(e,["sideCar"]);if(!u)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=u.read();if(!n)throw new Error("Sidecar medium not found");return M.createElement(n,Bt({},t))};Tx.isSideCarExport=!0;function viu(e,u){return e.useMedium(u),Tx}var Ox=Diu(),x6=function(){},ud=M.forwardRef(function(e,u){var t=M.useRef(null),n=M.useState({onScrollCapture:x6,onWheelCapture:x6,onTouchMoveCapture:x6}),r=n[0],i=n[1],a=e.forwardProps,s=e.children,o=e.className,l=e.removeScrollBar,c=e.enabled,E=e.shards,d=e.sideCar,f=e.noIsolation,p=e.inert,h=e.allowPinchZoom,g=e.as,A=g===void 0?"div":g,m=Y1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),B=d,F=Biu([t,u]),w=Bt(Bt({},m),r);return M.createElement(M.Fragment,null,c&&M.createElement(B,{sideCar:Ox,removeScrollBar:l,shards:E,noIsolation:f,inert:p,setCallbacks:i,allowPinchZoom:!!h,lockRef:t}),a?M.cloneElement(M.Children.only(s),Bt(Bt({},w),{ref:F})):M.createElement(A,Bt({},w,{className:o,ref:F}),s))});ud.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ud.classNames={fullWidth:d9,zeroRight:E9};var Cg,biu=function(){if(Cg)return Cg;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wiu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var u=biu();return u&&e.setAttribute("nonce",u),e}function xiu(e,u){e.styleSheet?e.styleSheet.cssText=u:e.appendChild(document.createTextNode(u))}function kiu(e){var u=document.head||document.getElementsByTagName("head")[0];u.appendChild(e)}var _iu=function(){var e=0,u=null;return{add:function(t){e==0&&(u=wiu())&&(xiu(u,t),kiu(u)),e++},remove:function(){e--,!e&&u&&(u.parentNode&&u.parentNode.removeChild(u),u=null)}}},Siu=function(){var e=_iu();return function(u,t){M.useEffect(function(){return e.add(u),function(){e.remove()}},[u&&t])}},Ix=function(){var e=Siu(),u=function(t){var n=t.styles,r=t.dynamic;return e(n,r),null};return u},Piu={left:0,top:0,right:0,gap:0},k6=function(e){return parseInt(e||"",10)||0},Tiu=function(e){var u=window.getComputedStyle(document.body),t=u[e==="padding"?"paddingLeft":"marginLeft"],n=u[e==="padding"?"paddingTop":"marginTop"],r=u[e==="padding"?"paddingRight":"marginRight"];return[k6(t),k6(n),k6(r)]},Oiu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Piu;var u=Tiu(e),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:u[0],top:u[1],right:u[2],gap:Math.max(0,n-t+u[2]-u[0])}},Iiu=Ix(),Niu=function(e,u,t,n){var r=e.left,i=e.top,a=e.right,s=e.gap;return t===void 0&&(t="margin"),` + .`.concat(Ciu,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(s,"px ").concat(n,`; + } + body { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([u&&"position: relative ".concat(n,";"),t==="margin"&&` + padding-left: `.concat(r,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(n,`; + `),t==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(E9,` { + right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(d9,` { + margin-right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(E9," .").concat(E9,` { + right: 0 `).concat(n,`; + } + + .`).concat(d9," .").concat(d9,` { + margin-right: 0 `).concat(n,`; + } + + body { + `).concat(miu,": ").concat(s,`px; + } +`)},Riu=function(e){var u=e.noRelative,t=e.noImportant,n=e.gapMode,r=n===void 0?"margin":n,i=M.useMemo(function(){return Oiu(r)},[r]);return M.createElement(Iiu,{styles:Niu(i,!u,r,t?"":"!important")})},qp=!1;if(typeof window<"u")try{var zE=Object.defineProperty({},"passive",{get:function(){return qp=!0,!0}});window.addEventListener("test",zE,zE),window.removeEventListener("test",zE,zE)}catch{qp=!1}var os=qp?{passive:!1}:!1,ziu=function(e){var u=window.getComputedStyle(e);return u.overflowY!=="hidden"&&!(u.overflowY===u.overflowX&&u.overflowY==="visible")},jiu=function(e){var u=window.getComputedStyle(e);return u.overflowX!=="hidden"&&!(u.overflowY===u.overflowX&&u.overflowX==="visible")},mg=function(e,u){var t=u;do{typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&(t=t.host);var n=Nx(e,t);if(n){var r=Rx(e,t),i=r[1],a=r[2];if(i>a)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Miu=function(e){var u=e.scrollTop,t=e.scrollHeight,n=e.clientHeight;return[u,t,n]},Liu=function(e){var u=e.scrollLeft,t=e.scrollWidth,n=e.clientWidth;return[u,t,n]},Nx=function(e,u){return e==="v"?ziu(u):jiu(u)},Rx=function(e,u){return e==="v"?Miu(u):Liu(u)},Uiu=function(e,u){return e==="h"&&u==="rtl"?-1:1},$iu=function(e,u,t,n,r){var i=Uiu(e,window.getComputedStyle(u).direction),a=i*n,s=t.target,o=u.contains(s),l=!1,c=a>0,E=0,d=0;do{var f=Rx(e,s),p=f[0],h=f[1],g=f[2],A=h-g-i*p;(p||A)&&Nx(e,s)&&(E+=A,d+=p),s=s.parentNode}while(!o&&s!==document.body||o&&(u.contains(s)||u===s));return(c&&(r&&E===0||!r&&a>E)||!c&&(r&&d===0||!r&&-a>d))&&(l=!0),l},jE=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ag=function(e){return[e.deltaX,e.deltaY]},gg=function(e){return e&&"current"in e?e.current:e},Wiu=function(e,u){return e[0]===u[0]&&e[1]===u[1]},qiu=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},Hiu=0,ls=[];function Giu(e){var u=M.useRef([]),t=M.useRef([0,0]),n=M.useRef(),r=M.useState(Hiu++)[0],i=M.useState(function(){return Ix()})[0],a=M.useRef(e);M.useEffect(function(){a.current=e},[e]),M.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var h=h8([e.lockRef.current],(e.shards||[]).map(gg),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var s=M.useCallback(function(h,g){if("touches"in h&&h.touches.length===2)return!a.current.allowPinchZoom;var A=jE(h),m=t.current,B="deltaX"in h?h.deltaX:m[0]-A[0],F="deltaY"in h?h.deltaY:m[1]-A[1],w,v=h.target,C=Math.abs(B)>Math.abs(F)?"h":"v";if("touches"in h&&C==="h"&&v.type==="range")return!1;var k=mg(C,v);if(!k)return!0;if(k?w=C:(w=C==="v"?"h":"v",k=mg(C,v)),!k)return!1;if(!n.current&&"changedTouches"in h&&(B||F)&&(n.current=w),!w)return!0;var j=n.current||w;return $iu(j,g,h,j==="h"?B:F,!0)},[]),o=M.useCallback(function(h){var g=h;if(!(!ls.length||ls[ls.length-1]!==i)){var A="deltaY"in g?Ag(g):jE(g),m=u.current.filter(function(w){return w.name===g.type&&w.target===g.target&&Wiu(w.delta,A)})[0];if(m&&m.should){g.preventDefault();return}if(!m){var B=(a.current.shards||[]).map(gg).filter(Boolean).filter(function(w){return w.contains(g.target)}),F=B.length>0?s(g,B[0]):!a.current.noIsolation;F&&g.preventDefault()}}},[]),l=M.useCallback(function(h,g,A,m){var B={name:h,delta:g,target:A,should:m};u.current.push(B),setTimeout(function(){u.current=u.current.filter(function(F){return F!==B})},1)},[]),c=M.useCallback(function(h){t.current=jE(h),n.current=void 0},[]),E=M.useCallback(function(h){l(h.type,Ag(h),h.target,s(h,e.lockRef.current))},[]),d=M.useCallback(function(h){l(h.type,jE(h),h.target,s(h,e.lockRef.current))},[]);M.useEffect(function(){return ls.push(i),e.setCallbacks({onScrollCapture:E,onWheelCapture:E,onTouchMoveCapture:d}),document.addEventListener("wheel",o,os),document.addEventListener("touchmove",o,os),document.addEventListener("touchstart",c,os),function(){ls=ls.filter(function(h){return h!==i}),document.removeEventListener("wheel",o,os),document.removeEventListener("touchmove",o,os),document.removeEventListener("touchstart",c,os)}},[]);var f=e.removeScrollBar,p=e.inert;return M.createElement(M.Fragment,null,p?M.createElement(i,{styles:qiu(r)}):null,f?M.createElement(Riu,{gapMode:"margin"}):null)}const Qiu=viu(Ox,Giu);var zx=M.forwardRef(function(e,u){return M.createElement(ud,Bt({},e,{ref:u,sideCar:Qiu}))});zx.classNames=ud.classNames;const Kiu=zx;function Bg(e){var u=e.match(/^var\((.*)\)$/);return u?u[1]:e}function Viu(e,u){var t=e;for(var n of u){if(!(n in t))throw new Error("Path ".concat(u.join(" -> ")," does not exist in object"));t=t[n]}return t}function jx(e,u){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=e.constructor();for(var r in e){var i=e[r],a=[...t,r];typeof i=="string"||typeof i=="number"||i==null?n[r]=u(i,a):typeof i=="object"&&!Array.isArray(i)?n[r]=jx(i,u,a):console.warn('Skipping invalid key "'.concat(a.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return n}function yg(e,u){var t={};if(typeof u=="object"){var n=e;jx(u,(a,s)=>{var o=Viu(n,s);t[Bg(o)]=String(a)})}else{var r=e;for(var i in r)t[Bg(i)]=r[i]}return Object.defineProperty(t,"toString",{value:function(){return Object.keys(this).map(s=>"".concat(s,":").concat(this[s])).join(";")},writable:!1}),t}var Hp={exports:{}};(function(e,u){(function(t,n){var r="1.0.37",i="",a="?",s="function",o="undefined",l="object",c="string",E="major",d="model",f="name",p="type",h="vendor",g="version",A="architecture",m="console",B="mobile",F="tablet",w="smarttv",v="wearable",C="embedded",k=500,j="Amazon",N="Apple",uu="ASUS",ou="BlackBerry",su="Browser",mu="Chrome",tu="Edge",au="Firefox",nu="Google",H="Huawei",iu="LG",lu="Microsoft",Eu="Motorola",hu="Opera",fu="Samsung",Z="Sharp",Su="Sony",wu="Xiaomi",xu="Zebra",ku="Facebook",Nu="Chromium OS",S="Mac OS",O=function(Au,Fu){var _={};for(var y in Au)Fu[y]&&Fu[y].length%2===0?_[y]=Fu[y].concat(Au[y]):_[y]=Au[y];return _},I=function(Au){for(var Fu={},_=0;_0?R.length===2?typeof R[1]==s?this[R[0]]=R[1].call(this,J):this[R[0]]=R[1]:R.length===3?typeof R[1]===s&&!(R[1].exec&&R[1].test)?this[R[0]]=J?R[1].call(this,J,R[2]):n:this[R[0]]=J?J.replace(R[1],R[2]):n:R.length===4&&(this[R[0]]=J?R[3].call(this,J.replace(R[1],R[2])):n):this[R]=J||n;_+=2}},G=function(Au,Fu){for(var _ in Fu)if(typeof Fu[_]===l&&Fu[_].length>0){for(var y=0;y2&&(L[d]="iPad",L[p]=F),L},this.getEngine=function(){var L={};return L[f]=n,L[g]=n,$.call(L,y,P.engine),L},this.getOS=function(){var L={};return L[f]=n,L[g]=n,$.call(L,y,P.os),R&&!L[f]&&D&&D.platform!="Unknown"&&(L[f]=D.platform.replace(/chrome os/i,Nu).replace(/macos/i,S)),L},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(L){return y=typeof L===c&&L.length>k?Y(L,k):L,this},this.setUA(y),this};pu.VERSION=r,pu.BROWSER=I([f,g,E]),pu.CPU=I([A]),pu.DEVICE=I([d,h,p,m,B,w,F,v,C]),pu.ENGINE=pu.OS=I([f,g]),e.exports&&(u=e.exports=pu),u.UAParser=pu;var gu=typeof t!==o&&(t.jQuery||t.Zepto);if(gu&&!gu.ua){var Pu=new pu;gu.ua=Pu.getResult(),gu.ua.get=function(){return Pu.getUA()},gu.ua.set=function(Au){Pu.setUA(Au);var Fu=Pu.getResult();for(var _ in Fu)gu.ua[_]=Fu[_]}}})(typeof window=="object"?window:Zu)})(Hp,Hp.exports);var Jiu=Hp.exports,uE={},Ziu=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Mx={},tt={};let C8;const Yiu=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];tt.getSymbolSize=function(u){if(!u)throw new Error('"version" cannot be null or undefined');if(u<1||u>40)throw new Error('"version" should be in range from 1 to 40');return u*4+17};tt.getSymbolTotalCodewords=function(u){return Yiu[u]};tt.getBCHDigit=function(e){let u=0;for(;e!==0;)u++,e>>>=1;return u};tt.setToSJISFunction=function(u){if(typeof u!="function")throw new Error('"toSJISFunc" is not a valid function.');C8=u};tt.isKanjiModeEnabled=function(){return typeof C8<"u"};tt.toSJIS=function(u){return C8(u)};var ed={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function u(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return u(n)}catch{return r}}})(ed);function Lx(){this.buffer=[],this.length=0}Lx.prototype={get:function(e){const u=Math.floor(e/8);return(this.buffer[u]>>>7-e%8&1)===1},put:function(e,u){for(let t=0;t>>u-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const u=Math.floor(this.length/8);this.buffer.length<=u&&this.buffer.push(0),e&&(this.buffer[u]|=128>>>this.length%8),this.length++}};var Xiu=Lx;function eE(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}eE.prototype.set=function(e,u,t,n){const r=e*this.size+u;this.data[r]=t,n&&(this.reservedBit[r]=!0)};eE.prototype.get=function(e,u){return this.data[e*this.size+u]};eE.prototype.xor=function(e,u,t){this.data[e*this.size+u]^=t};eE.prototype.isReserved=function(e,u){return this.reservedBit[e*this.size+u]};var uau=eE,Ux={};(function(e){const u=tt.getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const r=Math.floor(n/7)+2,i=u(n),a=i===145?26:Math.ceil((i-13)/(2*r-2))*2,s=[i-7];for(let o=1;o=0&&r<=7},e.from=function(r){return e.isValid(r)?parseInt(r,10):void 0},e.getPenaltyN1=function(r){const i=r.size;let a=0,s=0,o=0,l=null,c=null;for(let E=0;E=5&&(a+=u.N1+(s-5)),l=f,s=1),f=r.get(d,E),f===c?o++:(o>=5&&(a+=u.N1+(o-5)),c=f,o=1)}s>=5&&(a+=u.N1+(s-5)),o>=5&&(a+=u.N1+(o-5))}return a},e.getPenaltyN2=function(r){const i=r.size;let a=0;for(let s=0;s=10&&(s===1488||s===93)&&a++,o=o<<1&2047|r.get(c,l),c>=10&&(o===1488||o===93)&&a++}return a*u.N3},e.getPenaltyN4=function(r){let i=0;const a=r.data.length;for(let o=0;o=0;){const a=i[0];for(let o=0;o0){const i=new Uint8Array(this.degree);return i.set(n,r),i}return n};var tau=m8,Gx={},Oi={},A8={};A8.isValid=function(u){return!isNaN(u)&&u>=1&&u<=40};var Pn={};const Qx="[0-9]+",nau="[A-Z $%*+\\-./:]+";let jl="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";jl=jl.replace(/u/g,"\\u");const rau="(?:(?![A-Z0-9 $%*+\\-./:]|"+jl+`)(?:.|[\r +]))+`;Pn.KANJI=new RegExp(jl,"g");Pn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Pn.BYTE=new RegExp(rau,"g");Pn.NUMERIC=new RegExp(Qx,"g");Pn.ALPHANUMERIC=new RegExp(nau,"g");const iau=new RegExp("^"+jl+"$"),aau=new RegExp("^"+Qx+"$"),sau=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Pn.testKanji=function(u){return iau.test(u)};Pn.testNumeric=function(u){return aau.test(u)};Pn.testAlphanumeric=function(u){return sau.test(u)};(function(e){const u=A8,t=Pn;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,a){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!u.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?i.ccBits[0]:a<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return t.testNumeric(i)?e.NUMERIC:t.testAlphanumeric(i)?e.ALPHANUMERIC:t.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+r)}}e.from=function(i,a){if(e.isValid(i))return i;try{return n(i)}catch{return a}}})(Oi);(function(e){const u=tt,t=td,n=ed,r=Oi,i=A8,a=7973,s=u.getBCHDigit(a);function o(d,f,p){for(let h=1;h<=40;h++)if(f<=e.getCapacity(h,p,d))return h}function l(d,f){return r.getCharCountIndicator(d,f)+4}function c(d,f){let p=0;return d.forEach(function(h){const g=l(h.mode,f);p+=g+h.getBitsLength()}),p}function E(d,f){for(let p=1;p<=40;p++)if(c(d,p)<=e.getCapacity(p,f,r.MIXED))return p}e.from=function(f,p){return i.isValid(f)?parseInt(f,10):p},e.getCapacity=function(f,p,h){if(!i.isValid(f))throw new Error("Invalid QR Code version");typeof h>"u"&&(h=r.BYTE);const g=u.getSymbolTotalCodewords(f),A=t.getTotalCodewordsCount(f,p),m=(g-A)*8;if(h===r.MIXED)return m;const B=m-l(h,f);switch(h){case r.NUMERIC:return Math.floor(B/10*3);case r.ALPHANUMERIC:return Math.floor(B/11*2);case r.KANJI:return Math.floor(B/13);case r.BYTE:default:return Math.floor(B/8)}},e.getBestVersionForData=function(f,p){let h;const g=n.from(p,n.M);if(Array.isArray(f)){if(f.length>1)return E(f,g);if(f.length===0)return 1;h=f[0]}else h=f;return o(h.mode,h.getLength(),g)},e.getEncodedBits=function(f){if(!i.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;u.getBCHDigit(p)-s>=0;)p^=a<=0;)r^=Vx<0&&(n=this.data.substr(t),r=parseInt(n,10),u.put(r,i*3+1))};var cau=Ao;const Eau=Oi,_6=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function go(e){this.mode=Eau.ALPHANUMERIC,this.data=e}go.getBitsLength=function(u){return 11*Math.floor(u/2)+6*(u%2)};go.prototype.getLength=function(){return this.data.length};go.prototype.getBitsLength=function(){return go.getBitsLength(this.data.length)};go.prototype.write=function(u){let t;for(t=0;t+2<=this.data.length;t+=2){let n=_6.indexOf(this.data[t])*45;n+=_6.indexOf(this.data[t+1]),u.put(n,11)}this.data.length%2&&u.put(_6.indexOf(this.data[t]),6)};var dau=go,fau=function(u){for(var t=[],n=u.length,r=0;r=55296&&i<=56319&&n>r+1){var a=u.charCodeAt(r+1);a>=56320&&a<=57343&&(i=(i-55296)*1024+a-56320+65536,r+=1)}if(i<128){t.push(i);continue}if(i<2048){t.push(i>>6|192),t.push(i&63|128);continue}if(i<55296||i>=57344&&i<65536){t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128);continue}if(i>=65536&&i<=1114111){t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(i&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer};const pau=fau,hau=Oi;function Bo(e){this.mode=hau.BYTE,this.data=new Uint8Array(pau(e))}Bo.getBitsLength=function(u){return u*8};Bo.prototype.getLength=function(){return this.data.length};Bo.prototype.getBitsLength=function(){return Bo.getBitsLength(this.data.length)};Bo.prototype.write=function(e){for(let u=0,t=this.data.length;u=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[u]+` +Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),e.put(t,13)}};var gau=yo,Zx={exports:{}};(function(e){var u={single_source_shortest_paths:function(t,n,r){var i={},a={};a[n]=0;var s=u.PriorityQueue.make();s.push(n,0);for(var o,l,c,E,d,f,p,h,g;!s.empty();){o=s.pop(),l=o.value,E=o.cost,d=t[l]||{};for(c in d)d.hasOwnProperty(c)&&(f=d[c],p=E+f,h=a[c],g=typeof a[c]>"u",(g||h>p)&&(a[c]=p,s.push(c,p),i[c]=l))}if(typeof r<"u"&&typeof a[r]>"u"){var A=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(A)}return i},extract_shortest_path_from_predecessor_list:function(t,n){for(var r=[],i=n;i;)r.push(i),t[i],i=t[i];return r.reverse(),r},find_path:function(t,n,r){var i=u.single_source_shortest_paths(t,n,r);return u.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(t){var n=u.PriorityQueue,r={},i;t=t||{};for(i in n)n.hasOwnProperty(i)&&(r[i]=n[i]);return r.queue=[],r.sorter=t.sorter||n.default_sorter,r},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){var r={value:t,cost:n};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=u})(Zx);var Bau=Zx.exports;(function(e){const u=Oi,t=cau,n=dau,r=Cau,i=gau,a=Pn,s=tt,o=Bau;function l(A){return unescape(encodeURIComponent(A)).length}function c(A,m,B){const F=[];let w;for(;(w=A.exec(B))!==null;)F.push({data:w[0],index:w.index,mode:m,length:w[0].length});return F}function E(A){const m=c(a.NUMERIC,u.NUMERIC,A),B=c(a.ALPHANUMERIC,u.ALPHANUMERIC,A);let F,w;return s.isKanjiModeEnabled()?(F=c(a.BYTE,u.BYTE,A),w=c(a.KANJI,u.KANJI,A)):(F=c(a.BYTE_KANJI,u.BYTE,A),w=[]),m.concat(B,F,w).sort(function(C,k){return C.index-k.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function d(A,m){switch(m){case u.NUMERIC:return t.getBitsLength(A);case u.ALPHANUMERIC:return n.getBitsLength(A);case u.KANJI:return i.getBitsLength(A);case u.BYTE:return r.getBitsLength(A)}}function f(A){return A.reduce(function(m,B){const F=m.length-1>=0?m[m.length-1]:null;return F&&F.mode===B.mode?(m[m.length-1].data+=B.data,m):(m.push(B),m)},[])}function p(A){const m=[];for(let B=0;B=0&&s<=6&&(o===0||o===6)||o>=0&&o<=6&&(s===0||s===6)||s>=2&&s<=4&&o>=2&&o<=4?e.set(i+s,a+o,!0,!0):e.set(i+s,a+o,!1,!0))}}function _au(e){const u=e.size;for(let t=8;t>s&1)===1,e.set(r,i,a,!0),e.set(i,r,a,!0)}function T6(e,u,t){const n=e.size,r=wau.getEncodedBits(u,t);let i,a;for(i=0;i<15;i++)a=(r>>i&1)===1,i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(n-15+i,8,a,!0),i<8?e.set(8,n-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(n-8,8,1,!0)}function Tau(e,u){const t=e.size;let n=-1,r=t-1,i=7,a=0;for(let s=t-1;s>0;s-=2)for(s===6&&s--;;){for(let o=0;o<2;o++)if(!e.isReserved(r,s-o)){let l=!1;a>>i&1)===1),e.set(r,s-o,l),i--,i===-1&&(a++,i=7)}if(r+=n,r<0||t<=r){r-=n,n=-n;break}}}function Oau(e,u,t){const n=new yau;t.forEach(function(o){n.put(o.mode.bit,4),n.put(o.getLength(),xau.getCharCountIndicator(o.mode,e)),o.write(n)});const r=rd.getSymbolTotalCodewords(e),i=Kp.getTotalCodewordsCount(e,u),a=(r-i)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const s=(a-n.getLengthInBits())/8;for(let o=0;o=7&&Pau(o,u),Tau(o,a),isNaN(n)&&(n=Qp.getBestMask(o,T6.bind(null,o,t))),Qp.applyMask(n,o),T6(o,t,n),{modules:o,version:u,errorCorrectionLevel:t,maskPattern:n,segments:r}}Mx.create=function(u,t){if(typeof u>"u"||u==="")throw new Error("No input text");let n=S6.M,r,i;return typeof t<"u"&&(n=S6.from(t.errorCorrectionLevel,S6.M),r=p2.from(t.version),i=Qp.from(t.maskPattern),t.toSJISFunc&&rd.setToSJISFunction(t.toSJISFunc)),Nau(u,r,n,i)};var Yx={},g8={};(function(e){function u(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let n=t.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+t);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");const r=parseInt(n.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});const r=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:i,scale:i?4:a,margin:r,color:{dark:u(n.color.dark||"#000000ff"),light:u(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,r){return r.width&&r.width>=n+r.margin*2?r.width/(n+r.margin*2):r.scale},e.getImageWidth=function(n,r){const i=e.getScale(n,r);return Math.floor((n+r.margin*2)*i)},e.qrToImageData=function(n,r,i){const a=r.modules.size,s=r.modules.data,o=e.getScale(a,i),l=Math.floor((a+i.margin*2)*o),c=i.margin*o,E=[i.color.light,i.color.dark];for(let d=0;d=c&&f>=c&&d"u"&&(!a||!a.getContext)&&(o=a,a=void 0),a||(l=n()),o=u.getOptions(o);const c=u.getImageWidth(i.modules.size,o),E=l.getContext("2d"),d=E.createImageData(c,c);return u.qrToImageData(d.data,i,o),t(E,l,c),E.putImageData(d,0,0),l},e.renderToDataURL=function(i,a,s){let o=s;typeof o>"u"&&(!a||!a.getContext)&&(o=a,a=void 0),o||(o={});const l=e.render(i,a,o),c=o.type||"image/png",E=o.rendererOpts||{};return l.toDataURL(c,E.quality)}})(Yx);var Xx={};const Rau=g8;function vg(e,u){const t=e.a/255,n=u+'="'+e.hex+'"';return t<1?n+" "+u+'-opacity="'+t.toFixed(2).slice(1)+'"':n}function O6(e,u,t){let n=e+u;return typeof t<"u"&&(n+=" "+t),n}function zau(e,u,t){let n="",r=0,i=!1,a=0;for(let s=0;s0&&o>0&&e[s-1]||(n+=i?O6("M",o+t,.5+l+t):O6("m",r,0),r=0,i=!1),o+1':"",l="',c='viewBox="0 0 '+s+" "+s+'"',d=''+o+l+` +`;return typeof n=="function"&&n(null,d),d};const jau=Ziu,Vp=Mx,uk=Yx,Mau=Xx;function B8(e,u,t,n,r){const i=[].slice.call(arguments,1),a=i.length,s=typeof i[a-1]=="function";if(!s&&!jau())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(r=t,t=u,u=n=void 0):a===3&&(u.getContext&&typeof r>"u"?(r=n,n=void 0):(r=n,n=t,t=u,u=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=u,u=n=void 0):a===2&&!u.getContext&&(n=t,t=u,u=void 0),new Promise(function(o,l){try{const c=Vp.create(t,n);o(e(c,u,n))}catch(c){l(c)}})}try{const o=Vp.create(t,n);r(null,e(o,u,n))}catch(o){r(o)}}uE.create=Vp.create;uE.toCanvas=B8.bind(null,uk.render);uE.toDataURL=B8.bind(null,uk.renderToDataURL);uE.toString=B8.bind(null,function(e,u,t){return Mau.render(e,t)});var Lau=768,cs=oT({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),Uau=DF({conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0}}),Jp=dT({conditions:{defaultCondition:"base",conditionNames:["base","hover","active"],responsiveArray:void 0},styles:{background:{values:{accentColor:{conditions:{base:"ju367v9c",hover:"ju367v9d",active:"ju367v9e"},defaultClass:"ju367v9c"},accentColorForeground:{conditions:{base:"ju367v9f",hover:"ju367v9g",active:"ju367v9h"},defaultClass:"ju367v9f"},actionButtonBorder:{conditions:{base:"ju367v9i",hover:"ju367v9j",active:"ju367v9k"},defaultClass:"ju367v9i"},actionButtonBorderMobile:{conditions:{base:"ju367v9l",hover:"ju367v9m",active:"ju367v9n"},defaultClass:"ju367v9l"},actionButtonSecondaryBackground:{conditions:{base:"ju367v9o",hover:"ju367v9p",active:"ju367v9q"},defaultClass:"ju367v9o"},closeButton:{conditions:{base:"ju367v9r",hover:"ju367v9s",active:"ju367v9t"},defaultClass:"ju367v9r"},closeButtonBackground:{conditions:{base:"ju367v9u",hover:"ju367v9v",active:"ju367v9w"},defaultClass:"ju367v9u"},connectButtonBackground:{conditions:{base:"ju367v9x",hover:"ju367v9y",active:"ju367v9z"},defaultClass:"ju367v9x"},connectButtonBackgroundError:{conditions:{base:"ju367va0",hover:"ju367va1",active:"ju367va2"},defaultClass:"ju367va0"},connectButtonInnerBackground:{conditions:{base:"ju367va3",hover:"ju367va4",active:"ju367va5"},defaultClass:"ju367va3"},connectButtonText:{conditions:{base:"ju367va6",hover:"ju367va7",active:"ju367va8"},defaultClass:"ju367va6"},connectButtonTextError:{conditions:{base:"ju367va9",hover:"ju367vaa",active:"ju367vab"},defaultClass:"ju367va9"},connectionIndicator:{conditions:{base:"ju367vac",hover:"ju367vad",active:"ju367vae"},defaultClass:"ju367vac"},downloadBottomCardBackground:{conditions:{base:"ju367vaf",hover:"ju367vag",active:"ju367vah"},defaultClass:"ju367vaf"},downloadTopCardBackground:{conditions:{base:"ju367vai",hover:"ju367vaj",active:"ju367vak"},defaultClass:"ju367vai"},error:{conditions:{base:"ju367val",hover:"ju367vam",active:"ju367van"},defaultClass:"ju367val"},generalBorder:{conditions:{base:"ju367vao",hover:"ju367vap",active:"ju367vaq"},defaultClass:"ju367vao"},generalBorderDim:{conditions:{base:"ju367var",hover:"ju367vas",active:"ju367vat"},defaultClass:"ju367var"},menuItemBackground:{conditions:{base:"ju367vau",hover:"ju367vav",active:"ju367vaw"},defaultClass:"ju367vau"},modalBackdrop:{conditions:{base:"ju367vax",hover:"ju367vay",active:"ju367vaz"},defaultClass:"ju367vax"},modalBackground:{conditions:{base:"ju367vb0",hover:"ju367vb1",active:"ju367vb2"},defaultClass:"ju367vb0"},modalBorder:{conditions:{base:"ju367vb3",hover:"ju367vb4",active:"ju367vb5"},defaultClass:"ju367vb3"},modalText:{conditions:{base:"ju367vb6",hover:"ju367vb7",active:"ju367vb8"},defaultClass:"ju367vb6"},modalTextDim:{conditions:{base:"ju367vb9",hover:"ju367vba",active:"ju367vbb"},defaultClass:"ju367vb9"},modalTextSecondary:{conditions:{base:"ju367vbc",hover:"ju367vbd",active:"ju367vbe"},defaultClass:"ju367vbc"},profileAction:{conditions:{base:"ju367vbf",hover:"ju367vbg",active:"ju367vbh"},defaultClass:"ju367vbf"},profileActionHover:{conditions:{base:"ju367vbi",hover:"ju367vbj",active:"ju367vbk"},defaultClass:"ju367vbi"},profileForeground:{conditions:{base:"ju367vbl",hover:"ju367vbm",active:"ju367vbn"},defaultClass:"ju367vbl"},selectedOptionBorder:{conditions:{base:"ju367vbo",hover:"ju367vbp",active:"ju367vbq"},defaultClass:"ju367vbo"},standby:{conditions:{base:"ju367vbr",hover:"ju367vbs",active:"ju367vbt"},defaultClass:"ju367vbr"}}},borderColor:{values:{accentColor:{conditions:{base:"ju367vbu",hover:"ju367vbv",active:"ju367vbw"},defaultClass:"ju367vbu"},accentColorForeground:{conditions:{base:"ju367vbx",hover:"ju367vby",active:"ju367vbz"},defaultClass:"ju367vbx"},actionButtonBorder:{conditions:{base:"ju367vc0",hover:"ju367vc1",active:"ju367vc2"},defaultClass:"ju367vc0"},actionButtonBorderMobile:{conditions:{base:"ju367vc3",hover:"ju367vc4",active:"ju367vc5"},defaultClass:"ju367vc3"},actionButtonSecondaryBackground:{conditions:{base:"ju367vc6",hover:"ju367vc7",active:"ju367vc8"},defaultClass:"ju367vc6"},closeButton:{conditions:{base:"ju367vc9",hover:"ju367vca",active:"ju367vcb"},defaultClass:"ju367vc9"},closeButtonBackground:{conditions:{base:"ju367vcc",hover:"ju367vcd",active:"ju367vce"},defaultClass:"ju367vcc"},connectButtonBackground:{conditions:{base:"ju367vcf",hover:"ju367vcg",active:"ju367vch"},defaultClass:"ju367vcf"},connectButtonBackgroundError:{conditions:{base:"ju367vci",hover:"ju367vcj",active:"ju367vck"},defaultClass:"ju367vci"},connectButtonInnerBackground:{conditions:{base:"ju367vcl",hover:"ju367vcm",active:"ju367vcn"},defaultClass:"ju367vcl"},connectButtonText:{conditions:{base:"ju367vco",hover:"ju367vcp",active:"ju367vcq"},defaultClass:"ju367vco"},connectButtonTextError:{conditions:{base:"ju367vcr",hover:"ju367vcs",active:"ju367vct"},defaultClass:"ju367vcr"},connectionIndicator:{conditions:{base:"ju367vcu",hover:"ju367vcv",active:"ju367vcw"},defaultClass:"ju367vcu"},downloadBottomCardBackground:{conditions:{base:"ju367vcx",hover:"ju367vcy",active:"ju367vcz"},defaultClass:"ju367vcx"},downloadTopCardBackground:{conditions:{base:"ju367vd0",hover:"ju367vd1",active:"ju367vd2"},defaultClass:"ju367vd0"},error:{conditions:{base:"ju367vd3",hover:"ju367vd4",active:"ju367vd5"},defaultClass:"ju367vd3"},generalBorder:{conditions:{base:"ju367vd6",hover:"ju367vd7",active:"ju367vd8"},defaultClass:"ju367vd6"},generalBorderDim:{conditions:{base:"ju367vd9",hover:"ju367vda",active:"ju367vdb"},defaultClass:"ju367vd9"},menuItemBackground:{conditions:{base:"ju367vdc",hover:"ju367vdd",active:"ju367vde"},defaultClass:"ju367vdc"},modalBackdrop:{conditions:{base:"ju367vdf",hover:"ju367vdg",active:"ju367vdh"},defaultClass:"ju367vdf"},modalBackground:{conditions:{base:"ju367vdi",hover:"ju367vdj",active:"ju367vdk"},defaultClass:"ju367vdi"},modalBorder:{conditions:{base:"ju367vdl",hover:"ju367vdm",active:"ju367vdn"},defaultClass:"ju367vdl"},modalText:{conditions:{base:"ju367vdo",hover:"ju367vdp",active:"ju367vdq"},defaultClass:"ju367vdo"},modalTextDim:{conditions:{base:"ju367vdr",hover:"ju367vds",active:"ju367vdt"},defaultClass:"ju367vdr"},modalTextSecondary:{conditions:{base:"ju367vdu",hover:"ju367vdv",active:"ju367vdw"},defaultClass:"ju367vdu"},profileAction:{conditions:{base:"ju367vdx",hover:"ju367vdy",active:"ju367vdz"},defaultClass:"ju367vdx"},profileActionHover:{conditions:{base:"ju367ve0",hover:"ju367ve1",active:"ju367ve2"},defaultClass:"ju367ve0"},profileForeground:{conditions:{base:"ju367ve3",hover:"ju367ve4",active:"ju367ve5"},defaultClass:"ju367ve3"},selectedOptionBorder:{conditions:{base:"ju367ve6",hover:"ju367ve7",active:"ju367ve8"},defaultClass:"ju367ve6"},standby:{conditions:{base:"ju367ve9",hover:"ju367vea",active:"ju367veb"},defaultClass:"ju367ve9"}}},boxShadow:{values:{connectButton:{conditions:{base:"ju367vec",hover:"ju367ved",active:"ju367vee"},defaultClass:"ju367vec"},dialog:{conditions:{base:"ju367vef",hover:"ju367veg",active:"ju367veh"},defaultClass:"ju367vef"},profileDetailsAction:{conditions:{base:"ju367vei",hover:"ju367vej",active:"ju367vek"},defaultClass:"ju367vei"},selectedOption:{conditions:{base:"ju367vel",hover:"ju367vem",active:"ju367ven"},defaultClass:"ju367vel"},selectedWallet:{conditions:{base:"ju367veo",hover:"ju367vep",active:"ju367veq"},defaultClass:"ju367veo"},walletLogo:{conditions:{base:"ju367ver",hover:"ju367ves",active:"ju367vet"},defaultClass:"ju367ver"}}},color:{values:{accentColor:{conditions:{base:"ju367veu",hover:"ju367vev",active:"ju367vew"},defaultClass:"ju367veu"},accentColorForeground:{conditions:{base:"ju367vex",hover:"ju367vey",active:"ju367vez"},defaultClass:"ju367vex"},actionButtonBorder:{conditions:{base:"ju367vf0",hover:"ju367vf1",active:"ju367vf2"},defaultClass:"ju367vf0"},actionButtonBorderMobile:{conditions:{base:"ju367vf3",hover:"ju367vf4",active:"ju367vf5"},defaultClass:"ju367vf3"},actionButtonSecondaryBackground:{conditions:{base:"ju367vf6",hover:"ju367vf7",active:"ju367vf8"},defaultClass:"ju367vf6"},closeButton:{conditions:{base:"ju367vf9",hover:"ju367vfa",active:"ju367vfb"},defaultClass:"ju367vf9"},closeButtonBackground:{conditions:{base:"ju367vfc",hover:"ju367vfd",active:"ju367vfe"},defaultClass:"ju367vfc"},connectButtonBackground:{conditions:{base:"ju367vff",hover:"ju367vfg",active:"ju367vfh"},defaultClass:"ju367vff"},connectButtonBackgroundError:{conditions:{base:"ju367vfi",hover:"ju367vfj",active:"ju367vfk"},defaultClass:"ju367vfi"},connectButtonInnerBackground:{conditions:{base:"ju367vfl",hover:"ju367vfm",active:"ju367vfn"},defaultClass:"ju367vfl"},connectButtonText:{conditions:{base:"ju367vfo",hover:"ju367vfp",active:"ju367vfq"},defaultClass:"ju367vfo"},connectButtonTextError:{conditions:{base:"ju367vfr",hover:"ju367vfs",active:"ju367vft"},defaultClass:"ju367vfr"},connectionIndicator:{conditions:{base:"ju367vfu",hover:"ju367vfv",active:"ju367vfw"},defaultClass:"ju367vfu"},downloadBottomCardBackground:{conditions:{base:"ju367vfx",hover:"ju367vfy",active:"ju367vfz"},defaultClass:"ju367vfx"},downloadTopCardBackground:{conditions:{base:"ju367vg0",hover:"ju367vg1",active:"ju367vg2"},defaultClass:"ju367vg0"},error:{conditions:{base:"ju367vg3",hover:"ju367vg4",active:"ju367vg5"},defaultClass:"ju367vg3"},generalBorder:{conditions:{base:"ju367vg6",hover:"ju367vg7",active:"ju367vg8"},defaultClass:"ju367vg6"},generalBorderDim:{conditions:{base:"ju367vg9",hover:"ju367vga",active:"ju367vgb"},defaultClass:"ju367vg9"},menuItemBackground:{conditions:{base:"ju367vgc",hover:"ju367vgd",active:"ju367vge"},defaultClass:"ju367vgc"},modalBackdrop:{conditions:{base:"ju367vgf",hover:"ju367vgg",active:"ju367vgh"},defaultClass:"ju367vgf"},modalBackground:{conditions:{base:"ju367vgi",hover:"ju367vgj",active:"ju367vgk"},defaultClass:"ju367vgi"},modalBorder:{conditions:{base:"ju367vgl",hover:"ju367vgm",active:"ju367vgn"},defaultClass:"ju367vgl"},modalText:{conditions:{base:"ju367vgo",hover:"ju367vgp",active:"ju367vgq"},defaultClass:"ju367vgo"},modalTextDim:{conditions:{base:"ju367vgr",hover:"ju367vgs",active:"ju367vgt"},defaultClass:"ju367vgr"},modalTextSecondary:{conditions:{base:"ju367vgu",hover:"ju367vgv",active:"ju367vgw"},defaultClass:"ju367vgu"},profileAction:{conditions:{base:"ju367vgx",hover:"ju367vgy",active:"ju367vgz"},defaultClass:"ju367vgx"},profileActionHover:{conditions:{base:"ju367vh0",hover:"ju367vh1",active:"ju367vh2"},defaultClass:"ju367vh0"},profileForeground:{conditions:{base:"ju367vh3",hover:"ju367vh4",active:"ju367vh5"},defaultClass:"ju367vh3"},selectedOptionBorder:{conditions:{base:"ju367vh6",hover:"ju367vh7",active:"ju367vh8"},defaultClass:"ju367vh6"},standby:{conditions:{base:"ju367vh9",hover:"ju367vha",active:"ju367vhb"},defaultClass:"ju367vh9"}}}}},{conditions:{defaultCondition:"smallScreen",conditionNames:["smallScreen","largeScreen"],responsiveArray:void 0},styles:{alignItems:{values:{"flex-start":{conditions:{smallScreen:"ju367v0",largeScreen:"ju367v1"},defaultClass:"ju367v0"},"flex-end":{conditions:{smallScreen:"ju367v2",largeScreen:"ju367v3"},defaultClass:"ju367v2"},center:{conditions:{smallScreen:"ju367v4",largeScreen:"ju367v5"},defaultClass:"ju367v4"}}},display:{values:{none:{conditions:{smallScreen:"ju367v6",largeScreen:"ju367v7"},defaultClass:"ju367v6"},block:{conditions:{smallScreen:"ju367v8",largeScreen:"ju367v9"},defaultClass:"ju367v8"},flex:{conditions:{smallScreen:"ju367va",largeScreen:"ju367vb"},defaultClass:"ju367va"},inline:{conditions:{smallScreen:"ju367vc",largeScreen:"ju367vd"},defaultClass:"ju367vc"}}}}},{conditions:void 0,styles:{margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},alignSelf:{values:{"flex-start":{defaultClass:"ju367ve"},"flex-end":{defaultClass:"ju367vf"},center:{defaultClass:"ju367vg"}}},backgroundSize:{values:{cover:{defaultClass:"ju367vh"}}},borderRadius:{values:{1:{defaultClass:"ju367vi"},6:{defaultClass:"ju367vj"},10:{defaultClass:"ju367vk"},13:{defaultClass:"ju367vl"},actionButton:{defaultClass:"ju367vm"},connectButton:{defaultClass:"ju367vn"},menuButton:{defaultClass:"ju367vo"},modal:{defaultClass:"ju367vp"},modalMobile:{defaultClass:"ju367vq"},"25%":{defaultClass:"ju367vr"},full:{defaultClass:"ju367vs"}}},borderStyle:{values:{solid:{defaultClass:"ju367vt"}}},borderWidth:{values:{0:{defaultClass:"ju367vu"},1:{defaultClass:"ju367vv"},2:{defaultClass:"ju367vw"},4:{defaultClass:"ju367vx"}}},cursor:{values:{pointer:{defaultClass:"ju367vy"}}},flexDirection:{values:{row:{defaultClass:"ju367vz"},column:{defaultClass:"ju367v10"}}},fontFamily:{values:{body:{defaultClass:"ju367v11"}}},fontSize:{values:{12:{defaultClass:"ju367v12"},13:{defaultClass:"ju367v13"},14:{defaultClass:"ju367v14"},16:{defaultClass:"ju367v15"},18:{defaultClass:"ju367v16"},20:{defaultClass:"ju367v17"},23:{defaultClass:"ju367v18"}}},fontWeight:{values:{regular:{defaultClass:"ju367v19"},medium:{defaultClass:"ju367v1a"},semibold:{defaultClass:"ju367v1b"},bold:{defaultClass:"ju367v1c"},heavy:{defaultClass:"ju367v1d"}}},gap:{values:{0:{defaultClass:"ju367v1e"},1:{defaultClass:"ju367v1f"},2:{defaultClass:"ju367v1g"},3:{defaultClass:"ju367v1h"},4:{defaultClass:"ju367v1i"},5:{defaultClass:"ju367v1j"},6:{defaultClass:"ju367v1k"},8:{defaultClass:"ju367v1l"},10:{defaultClass:"ju367v1m"},12:{defaultClass:"ju367v1n"},14:{defaultClass:"ju367v1o"},16:{defaultClass:"ju367v1p"},18:{defaultClass:"ju367v1q"},20:{defaultClass:"ju367v1r"},24:{defaultClass:"ju367v1s"},28:{defaultClass:"ju367v1t"},32:{defaultClass:"ju367v1u"},36:{defaultClass:"ju367v1v"},44:{defaultClass:"ju367v1w"},64:{defaultClass:"ju367v1x"},"-1":{defaultClass:"ju367v1y"}}},height:{values:{1:{defaultClass:"ju367v1z"},2:{defaultClass:"ju367v20"},4:{defaultClass:"ju367v21"},8:{defaultClass:"ju367v22"},12:{defaultClass:"ju367v23"},20:{defaultClass:"ju367v24"},24:{defaultClass:"ju367v25"},28:{defaultClass:"ju367v26"},30:{defaultClass:"ju367v27"},32:{defaultClass:"ju367v28"},34:{defaultClass:"ju367v29"},36:{defaultClass:"ju367v2a"},40:{defaultClass:"ju367v2b"},44:{defaultClass:"ju367v2c"},48:{defaultClass:"ju367v2d"},54:{defaultClass:"ju367v2e"},60:{defaultClass:"ju367v2f"},200:{defaultClass:"ju367v2g"},full:{defaultClass:"ju367v2h"},max:{defaultClass:"ju367v2i"}}},justifyContent:{values:{"flex-start":{defaultClass:"ju367v2j"},"flex-end":{defaultClass:"ju367v2k"},center:{defaultClass:"ju367v2l"},"space-between":{defaultClass:"ju367v2m"},"space-around":{defaultClass:"ju367v2n"}}},textAlign:{values:{left:{defaultClass:"ju367v2o"},center:{defaultClass:"ju367v2p"},inherit:{defaultClass:"ju367v2q"}}},marginBottom:{values:{0:{defaultClass:"ju367v2r"},1:{defaultClass:"ju367v2s"},2:{defaultClass:"ju367v2t"},3:{defaultClass:"ju367v2u"},4:{defaultClass:"ju367v2v"},5:{defaultClass:"ju367v2w"},6:{defaultClass:"ju367v2x"},8:{defaultClass:"ju367v2y"},10:{defaultClass:"ju367v2z"},12:{defaultClass:"ju367v30"},14:{defaultClass:"ju367v31"},16:{defaultClass:"ju367v32"},18:{defaultClass:"ju367v33"},20:{defaultClass:"ju367v34"},24:{defaultClass:"ju367v35"},28:{defaultClass:"ju367v36"},32:{defaultClass:"ju367v37"},36:{defaultClass:"ju367v38"},44:{defaultClass:"ju367v39"},64:{defaultClass:"ju367v3a"},"-1":{defaultClass:"ju367v3b"}}},marginLeft:{values:{0:{defaultClass:"ju367v3c"},1:{defaultClass:"ju367v3d"},2:{defaultClass:"ju367v3e"},3:{defaultClass:"ju367v3f"},4:{defaultClass:"ju367v3g"},5:{defaultClass:"ju367v3h"},6:{defaultClass:"ju367v3i"},8:{defaultClass:"ju367v3j"},10:{defaultClass:"ju367v3k"},12:{defaultClass:"ju367v3l"},14:{defaultClass:"ju367v3m"},16:{defaultClass:"ju367v3n"},18:{defaultClass:"ju367v3o"},20:{defaultClass:"ju367v3p"},24:{defaultClass:"ju367v3q"},28:{defaultClass:"ju367v3r"},32:{defaultClass:"ju367v3s"},36:{defaultClass:"ju367v3t"},44:{defaultClass:"ju367v3u"},64:{defaultClass:"ju367v3v"},"-1":{defaultClass:"ju367v3w"}}},marginRight:{values:{0:{defaultClass:"ju367v3x"},1:{defaultClass:"ju367v3y"},2:{defaultClass:"ju367v3z"},3:{defaultClass:"ju367v40"},4:{defaultClass:"ju367v41"},5:{defaultClass:"ju367v42"},6:{defaultClass:"ju367v43"},8:{defaultClass:"ju367v44"},10:{defaultClass:"ju367v45"},12:{defaultClass:"ju367v46"},14:{defaultClass:"ju367v47"},16:{defaultClass:"ju367v48"},18:{defaultClass:"ju367v49"},20:{defaultClass:"ju367v4a"},24:{defaultClass:"ju367v4b"},28:{defaultClass:"ju367v4c"},32:{defaultClass:"ju367v4d"},36:{defaultClass:"ju367v4e"},44:{defaultClass:"ju367v4f"},64:{defaultClass:"ju367v4g"},"-1":{defaultClass:"ju367v4h"}}},marginTop:{values:{0:{defaultClass:"ju367v4i"},1:{defaultClass:"ju367v4j"},2:{defaultClass:"ju367v4k"},3:{defaultClass:"ju367v4l"},4:{defaultClass:"ju367v4m"},5:{defaultClass:"ju367v4n"},6:{defaultClass:"ju367v4o"},8:{defaultClass:"ju367v4p"},10:{defaultClass:"ju367v4q"},12:{defaultClass:"ju367v4r"},14:{defaultClass:"ju367v4s"},16:{defaultClass:"ju367v4t"},18:{defaultClass:"ju367v4u"},20:{defaultClass:"ju367v4v"},24:{defaultClass:"ju367v4w"},28:{defaultClass:"ju367v4x"},32:{defaultClass:"ju367v4y"},36:{defaultClass:"ju367v4z"},44:{defaultClass:"ju367v50"},64:{defaultClass:"ju367v51"},"-1":{defaultClass:"ju367v52"}}},maxWidth:{values:{1:{defaultClass:"ju367v53"},2:{defaultClass:"ju367v54"},4:{defaultClass:"ju367v55"},8:{defaultClass:"ju367v56"},12:{defaultClass:"ju367v57"},20:{defaultClass:"ju367v58"},24:{defaultClass:"ju367v59"},28:{defaultClass:"ju367v5a"},30:{defaultClass:"ju367v5b"},32:{defaultClass:"ju367v5c"},34:{defaultClass:"ju367v5d"},36:{defaultClass:"ju367v5e"},40:{defaultClass:"ju367v5f"},44:{defaultClass:"ju367v5g"},48:{defaultClass:"ju367v5h"},54:{defaultClass:"ju367v5i"},60:{defaultClass:"ju367v5j"},200:{defaultClass:"ju367v5k"},full:{defaultClass:"ju367v5l"},max:{defaultClass:"ju367v5m"}}},minWidth:{values:{1:{defaultClass:"ju367v5n"},2:{defaultClass:"ju367v5o"},4:{defaultClass:"ju367v5p"},8:{defaultClass:"ju367v5q"},12:{defaultClass:"ju367v5r"},20:{defaultClass:"ju367v5s"},24:{defaultClass:"ju367v5t"},28:{defaultClass:"ju367v5u"},30:{defaultClass:"ju367v5v"},32:{defaultClass:"ju367v5w"},34:{defaultClass:"ju367v5x"},36:{defaultClass:"ju367v5y"},40:{defaultClass:"ju367v5z"},44:{defaultClass:"ju367v60"},48:{defaultClass:"ju367v61"},54:{defaultClass:"ju367v62"},60:{defaultClass:"ju367v63"},200:{defaultClass:"ju367v64"},full:{defaultClass:"ju367v65"},max:{defaultClass:"ju367v66"}}},overflow:{values:{hidden:{defaultClass:"ju367v67"}}},paddingBottom:{values:{0:{defaultClass:"ju367v68"},1:{defaultClass:"ju367v69"},2:{defaultClass:"ju367v6a"},3:{defaultClass:"ju367v6b"},4:{defaultClass:"ju367v6c"},5:{defaultClass:"ju367v6d"},6:{defaultClass:"ju367v6e"},8:{defaultClass:"ju367v6f"},10:{defaultClass:"ju367v6g"},12:{defaultClass:"ju367v6h"},14:{defaultClass:"ju367v6i"},16:{defaultClass:"ju367v6j"},18:{defaultClass:"ju367v6k"},20:{defaultClass:"ju367v6l"},24:{defaultClass:"ju367v6m"},28:{defaultClass:"ju367v6n"},32:{defaultClass:"ju367v6o"},36:{defaultClass:"ju367v6p"},44:{defaultClass:"ju367v6q"},64:{defaultClass:"ju367v6r"},"-1":{defaultClass:"ju367v6s"}}},paddingLeft:{values:{0:{defaultClass:"ju367v6t"},1:{defaultClass:"ju367v6u"},2:{defaultClass:"ju367v6v"},3:{defaultClass:"ju367v6w"},4:{defaultClass:"ju367v6x"},5:{defaultClass:"ju367v6y"},6:{defaultClass:"ju367v6z"},8:{defaultClass:"ju367v70"},10:{defaultClass:"ju367v71"},12:{defaultClass:"ju367v72"},14:{defaultClass:"ju367v73"},16:{defaultClass:"ju367v74"},18:{defaultClass:"ju367v75"},20:{defaultClass:"ju367v76"},24:{defaultClass:"ju367v77"},28:{defaultClass:"ju367v78"},32:{defaultClass:"ju367v79"},36:{defaultClass:"ju367v7a"},44:{defaultClass:"ju367v7b"},64:{defaultClass:"ju367v7c"},"-1":{defaultClass:"ju367v7d"}}},paddingRight:{values:{0:{defaultClass:"ju367v7e"},1:{defaultClass:"ju367v7f"},2:{defaultClass:"ju367v7g"},3:{defaultClass:"ju367v7h"},4:{defaultClass:"ju367v7i"},5:{defaultClass:"ju367v7j"},6:{defaultClass:"ju367v7k"},8:{defaultClass:"ju367v7l"},10:{defaultClass:"ju367v7m"},12:{defaultClass:"ju367v7n"},14:{defaultClass:"ju367v7o"},16:{defaultClass:"ju367v7p"},18:{defaultClass:"ju367v7q"},20:{defaultClass:"ju367v7r"},24:{defaultClass:"ju367v7s"},28:{defaultClass:"ju367v7t"},32:{defaultClass:"ju367v7u"},36:{defaultClass:"ju367v7v"},44:{defaultClass:"ju367v7w"},64:{defaultClass:"ju367v7x"},"-1":{defaultClass:"ju367v7y"}}},paddingTop:{values:{0:{defaultClass:"ju367v7z"},1:{defaultClass:"ju367v80"},2:{defaultClass:"ju367v81"},3:{defaultClass:"ju367v82"},4:{defaultClass:"ju367v83"},5:{defaultClass:"ju367v84"},6:{defaultClass:"ju367v85"},8:{defaultClass:"ju367v86"},10:{defaultClass:"ju367v87"},12:{defaultClass:"ju367v88"},14:{defaultClass:"ju367v89"},16:{defaultClass:"ju367v8a"},18:{defaultClass:"ju367v8b"},20:{defaultClass:"ju367v8c"},24:{defaultClass:"ju367v8d"},28:{defaultClass:"ju367v8e"},32:{defaultClass:"ju367v8f"},36:{defaultClass:"ju367v8g"},44:{defaultClass:"ju367v8h"},64:{defaultClass:"ju367v8i"},"-1":{defaultClass:"ju367v8j"}}},position:{values:{absolute:{defaultClass:"ju367v8k"},fixed:{defaultClass:"ju367v8l"},relative:{defaultClass:"ju367v8m"}}},right:{values:{0:{defaultClass:"ju367v8n"}}},transition:{values:{default:{defaultClass:"ju367v8o"},transform:{defaultClass:"ju367v8p"}}},userSelect:{values:{none:{defaultClass:"ju367v8q"}}},width:{values:{1:{defaultClass:"ju367v8r"},2:{defaultClass:"ju367v8s"},4:{defaultClass:"ju367v8t"},8:{defaultClass:"ju367v8u"},12:{defaultClass:"ju367v8v"},20:{defaultClass:"ju367v8w"},24:{defaultClass:"ju367v8x"},28:{defaultClass:"ju367v8y"},30:{defaultClass:"ju367v8z"},32:{defaultClass:"ju367v90"},34:{defaultClass:"ju367v91"},36:{defaultClass:"ju367v92"},40:{defaultClass:"ju367v93"},44:{defaultClass:"ju367v94"},48:{defaultClass:"ju367v95"},54:{defaultClass:"ju367v96"},60:{defaultClass:"ju367v97"},200:{defaultClass:"ju367v98"},full:{defaultClass:"ju367v99"},max:{defaultClass:"ju367v9a"}}},backdropFilter:{values:{modalOverlay:{defaultClass:"ju367v9b"}}}}}),bg={colors:{accentColor:"var(--rk-colors-accentColor)",accentColorForeground:"var(--rk-colors-accentColorForeground)",actionButtonBorder:"var(--rk-colors-actionButtonBorder)",actionButtonBorderMobile:"var(--rk-colors-actionButtonBorderMobile)",actionButtonSecondaryBackground:"var(--rk-colors-actionButtonSecondaryBackground)",closeButton:"var(--rk-colors-closeButton)",closeButtonBackground:"var(--rk-colors-closeButtonBackground)",connectButtonBackground:"var(--rk-colors-connectButtonBackground)",connectButtonBackgroundError:"var(--rk-colors-connectButtonBackgroundError)",connectButtonInnerBackground:"var(--rk-colors-connectButtonInnerBackground)",connectButtonText:"var(--rk-colors-connectButtonText)",connectButtonTextError:"var(--rk-colors-connectButtonTextError)",connectionIndicator:"var(--rk-colors-connectionIndicator)",downloadBottomCardBackground:"var(--rk-colors-downloadBottomCardBackground)",downloadTopCardBackground:"var(--rk-colors-downloadTopCardBackground)",error:"var(--rk-colors-error)",generalBorder:"var(--rk-colors-generalBorder)",generalBorderDim:"var(--rk-colors-generalBorderDim)",menuItemBackground:"var(--rk-colors-menuItemBackground)",modalBackdrop:"var(--rk-colors-modalBackdrop)",modalBackground:"var(--rk-colors-modalBackground)",modalBorder:"var(--rk-colors-modalBorder)",modalText:"var(--rk-colors-modalText)",modalTextDim:"var(--rk-colors-modalTextDim)",modalTextSecondary:"var(--rk-colors-modalTextSecondary)",profileAction:"var(--rk-colors-profileAction)",profileActionHover:"var(--rk-colors-profileActionHover)",profileForeground:"var(--rk-colors-profileForeground)",selectedOptionBorder:"var(--rk-colors-selectedOptionBorder)",standby:"var(--rk-colors-standby)"},fonts:{body:"var(--rk-fonts-body)"},radii:{actionButton:"var(--rk-radii-actionButton)",connectButton:"var(--rk-radii-connectButton)",menuButton:"var(--rk-radii-menuButton)",modal:"var(--rk-radii-modal)",modalMobile:"var(--rk-radii-modalMobile)"},shadows:{connectButton:"var(--rk-shadows-connectButton)",dialog:"var(--rk-shadows-dialog)",profileDetailsAction:"var(--rk-shadows-profileDetailsAction)",selectedOption:"var(--rk-shadows-selectedOption)",selectedWallet:"var(--rk-shadows-selectedWallet)",walletLogo:"var(--rk-shadows-walletLogo)"},blurs:{modalOverlay:"var(--rk-blurs-modalOverlay)"}},$au={shrink:"_12cbo8i6",shrinkSm:"_12cbo8i7"},Wau="_12cbo8i3 ju367v8m",qau={grow:"_12cbo8i4",growLg:"_12cbo8i5"};function w0({active:e,hover:u}){return[Wau,u&&qau[u],$au[e]]}var ek=M.createContext(null);function Hau(){var e;const{adapter:u}=(e=M.useContext(ek))!=null?e:{};if(!u)throw new Error("No authentication adapter found");return u}function id(){var e;const u=M.useContext(ek);return(e=u==null?void 0:u.status)!=null?e:null}function y8(){const e=id(),{isConnected:u}=et();return u?e&&(e==="loading"||e==="unauthenticated")?e:"connected":"disconnected"}function F8(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function Gau(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function Qau(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function ns(){return Gau()||Qau()}function J0(){return F8()||ns()}var Kau="iekbcc0",Vau={a:"iekbcca",blockquote:"iekbcc2",button:"iekbcc9",input:"iekbcc8 iekbcc5 iekbcc4",mark:"iekbcc6",ol:"iekbcc1",q:"iekbcc2",select:"iekbcc7 iekbcc5 iekbcc4",table:"iekbcc3",textarea:"iekbcc5 iekbcc4",ul:"iekbcc1"},Jau=({reset:e,...u})=>{if(!e)return Jp(u);const t=Vau[e],n=Jp(u);return JC(Kau,t,n)},z=M.forwardRef(({as:e="div",className:u,testId:t,...n},r)=>{const i={},a={};for(const o in n)Jp.properties.has(o)?i[o]=n[o]:a[o]=n[o];const s=Jau({reset:typeof e=="string"?e:"div",...i});return M.createElement(e,{className:JC(s,u),...a,"data-testid":t?`rk-${t.replace(/^rk-/,"")}`:void 0,ref:r})});z.displayName="Box";var tk=new Map,I6=new Map;async function nk(e){const u=I6.get(e);if(u)return u;const t=async()=>e().then(async r=>(tk.set(e,r),r)),n=t().catch(r=>t().catch(i=>{I6.delete(e)}));return I6.set(e,n),n}async function _n(...e){return await Promise.all(e.map(u=>typeof u=="function"?nk(u):u))}function Zau(){const[,e]=M.useReducer(u=>u+1,0);return e}function D8(e){const u=typeof e=="function"?tk.get(e):void 0,t=Zau();return M.useEffect(()=>{typeof e=="function"&&!u&&nk(e).then(t)},[e,u,t]),typeof e=="function"?u:e}function N0({alt:e,background:u,borderColor:t,borderRadius:n,boxShadow:r,height:i,src:a,width:s,testId:o}){const l=D8(a),c=l&&/^http/.test(l),[E,d]=M.useReducer(()=>!0,!1);return x.createElement(z,{"aria-label":e,borderRadius:n,boxShadow:r,height:typeof i=="string"?i:void 0,overflow:"hidden",position:"relative",role:"img",style:{background:u,height:typeof i=="number"?i:void 0,width:typeof s=="number"?s:void 0},width:typeof s=="string"?s:void 0,testId:o},x.createElement(z,{...c?{"aria-hidden":!0,as:"img",onLoad:d,src:l}:{backgroundSize:"cover"},height:"full",position:"absolute",style:{touchCallout:"none",transition:"opacity .15s linear",userSelect:"none",...c?{opacity:E?1:0}:{backgroundImage:l?`url(${l})`:void 0,backgroundRepeat:"no-repeat",opacity:l?1:0}},width:"full"}),t?x.createElement(z,{...typeof t=="object"&&"custom"in t?{style:{borderColor:t.custom}}:{borderColor:t},borderRadius:n,borderStyle:"solid",borderWidth:"1",height:"full",position:"relative",width:"full"}):null)}var Yau="_1luule42",Xau="_1luule43",usu=e=>M.useMemo(()=>`${e}_${Math.round(Math.random()*1e9)}`,[e]),Ml=({height:e=21,width:u=21})=>{const t=usu("spinner");return x.createElement("svg",{className:Yau,fill:"none",height:e,viewBox:"0 0 21 21",width:u,xmlns:"http://www.w3.org/2000/svg"},x.createElement("clipPath",{id:t},x.createElement("path",{d:"M10.5 3C6.35786 3 3 6.35786 3 10.5C3 14.6421 6.35786 18 10.5 18C11.3284 18 12 18.6716 12 19.5C12 20.3284 11.3284 21 10.5 21C4.70101 21 0 16.299 0 10.5C0 4.70101 4.70101 0 10.5 0C16.299 0 21 4.70101 21 10.5C21 11.3284 20.3284 12 19.5 12C18.6716 12 18 11.3284 18 10.5C18 6.35786 14.6421 3 10.5 3Z"})),x.createElement("foreignObject",{clipPath:`url(#${t})`,height:"21",width:"21",x:"0",y:"0"},x.createElement("div",{className:Xau})))},Ku=["#FC5C54","#FFD95A","#E95D72","#6A87C8","#5FD0F3","#75C06B","#FFDD86","#5FC6D4","#FF949A","#FF8024","#9BA1A4","#EC66FF","#FF8CBC","#FF9A23","#C5DADB","#A8CE63","#71ABFF","#FFE279","#B6B1B6","#FF6780","#A575FF","#4D82FF","#FFB35A"],wg=[{color:Ku[0],emoji:"🌶"},{color:Ku[1],emoji:"🤑"},{color:Ku[2],emoji:"🐙"},{color:Ku[3],emoji:"🫐"},{color:Ku[4],emoji:"🐳"},{color:Ku[0],emoji:"🤶"},{color:Ku[5],emoji:"🌲"},{color:Ku[6],emoji:"🌞"},{color:Ku[7],emoji:"🐒"},{color:Ku[8],emoji:"🐵"},{color:Ku[9],emoji:"🦊"},{color:Ku[10],emoji:"🐼"},{color:Ku[11],emoji:"🦄"},{color:Ku[12],emoji:"🐷"},{color:Ku[13],emoji:"🐧"},{color:Ku[8],emoji:"🦩"},{color:Ku[14],emoji:"👽"},{color:Ku[0],emoji:"🎈"},{color:Ku[8],emoji:"🍉"},{color:Ku[1],emoji:"🎉"},{color:Ku[15],emoji:"🐲"},{color:Ku[16],emoji:"🌎"},{color:Ku[17],emoji:"🍊"},{color:Ku[18],emoji:"🐭"},{color:Ku[19],emoji:"🍣"},{color:Ku[1],emoji:"🐥"},{color:Ku[20],emoji:"👾"},{color:Ku[15],emoji:"🥦"},{color:Ku[0],emoji:"👹"},{color:Ku[17],emoji:"🙀"},{color:Ku[4],emoji:"⛱"},{color:Ku[21],emoji:"⛵️"},{color:Ku[17],emoji:"🥳"},{color:Ku[8],emoji:"🤯"},{color:Ku[22],emoji:"🤠"}];function esu(e){let u=0;if(e.length===0)return u;for(let t=0;t{const[n,r]=M.useState(!1);M.useEffect(()=>{if(u){const s=new Image;s.src=u,s.onload=()=>r(!0)}},[u]);const{color:i,emoji:a}=M.useMemo(()=>tsu(e),[e]);return u?n?x.createElement(z,{backgroundSize:"cover",borderRadius:"full",position:"absolute",style:{backgroundImage:`url(${u})`,backgroundPosition:"center",height:t,width:t}}):x.createElement(z,{alignItems:"center",backgroundSize:"cover",borderRadius:"full",color:"modalText",display:"flex",justifyContent:"center",position:"absolute",style:{height:t,width:t}},x.createElement(Ml,null)):x.createElement(z,{alignItems:"center",display:"flex",justifyContent:"center",overflow:"hidden",style:{...!u&&{backgroundColor:i},height:t,width:t}},a)},rk=nsu,ik=M.createContext(rk);function ak({address:e,imageUrl:u,loading:t,size:n}){const r=M.useContext(ik);return x.createElement(z,{"aria-hidden":!0,borderRadius:"full",overflow:"hidden",position:"relative",style:{height:`${n}px`,width:`${n}px`},userSelect:"none"},x.createElement(z,{alignItems:"center",borderRadius:"full",display:"flex",justifyContent:"center",overflow:"hidden",position:"absolute",style:{fontSize:`${Math.round(n*.55)}px`,height:`${n}px`,transform:t?"scale(0.72)":void 0,transition:".25s ease",transitionDelay:t?void 0:".1s",width:`${n}px`,willChange:"transform"},userSelect:"none"},x.createElement(r,{address:e,ensImage:u,size:n})),typeof t=="boolean"&&x.createElement(z,{color:"accentColor",display:"flex",height:"full",position:"absolute",style:{opacity:t?1:0,transition:t?"0.6s ease":"0.2s ease",transitionDelay:t?".05s":void 0},width:"full"},x.createElement(Ml,{height:"100%",width:"100%"})))}var xg=()=>x.createElement("svg",{fill:"none",height:"7",width:"14",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M12.75 1.54001L8.51647 5.0038C7.77974 5.60658 6.72026 5.60658 5.98352 5.0038L1.75 1.54001",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5",xmlns:"http://www.w3.org/2000/svg"})),rsu={label:"اتصال المحفظة"},isu={title:"ما هو المحفظة؟",description:"تُستخدم المحفظة لإرسال واستلام وتخزين وعرض الأصول الرقمية. إنها أيضاً طريقة جديدة لتسجيل الدخول، دون الحاجة إلى إنشاء حسابات وكلمات مرور جديدة على كل موقع.",digital_asset:{title:"دار لأصولك الرقمية",description:"تُستخدم المحافظ لإرسال واستلام وتخزين وعرض الأصول الرقمية مثل إيثيريوم والـ NFTs."},login:{title:"طريقة جديدة لتسجيل الدخول",description:"بدلاً من إنشاء حسابات وكلمات مرور جديدة على كل موقع، فقط قم بتوصيل محفظتك."},get:{label:"احصل على محفظة"},learn_more:{label:"تعلم المزيد"}},asu={label:"تحقق من حسابك",description:"لإنهاء الاتصال، يجب عليك توقيع رسالة في محفظتك للتحقق من أنك صاحب هذا الحساب.",message:{send:"إرسال الرسالة",preparing:"جارٍ تجهيز الرسالة...",cancel:"إلغاء",preparing_error:"خطأ في تجهيز الرسالة، يرجى المحاولة مرة أخرى!"},signature:{waiting:"انتظار التوقيع...",verifying:"جار التحقق من التوقيع...",signing_error:"خطأ في توقيع الرسالة، يرجى المحاولة مرة أخرى!",verifying_error:"خطأ في التحقق من التوقيع، يرجى المحاولة مرة أخرى!",oops_error:"عذرًا، حدث خطأ ما!"}},ssu={label:"اتصل",title:"اتصال بالمحفظة",new_to_ethereum:{description:"جديد في محافظ Ethereum؟",learn_more:{label:"تعلم المزيد"}},learn_more:{label:"أعرف أكثر"},recent:"الأخير",status:{opening:"جار فتح %{wallet}...",not_installed:"%{wallet} غير مثبت",not_available:"%{wallet} غير متاح",confirm:"تأكيد الاتصال في الامتداد"},secondary_action:{get:{description:"لا يوجد لديك %{wallet}؟",label:"احصل"},install:{label:"تثبيت"},retry:{label:"أعد المحاولة"}},walletconnect:{description:{full:"هل تحتاج إلى النافذة الرسمية لـ WalletConnect؟",compact:"هل تحتاج إلى النافذة لـ WalletConnect؟"},open:{label:"افتح"}}},osu={title:"المسح باستخدام %{wallet}",fallback_title:"المسح باستخدام هاتفك"},lsu={recommended:"موصى به",other:"آخر",popular:"شائع",more:"المزيد",others:"الآخرين"},csu={title:"احصل على محفظة",action:{label:"احصل"},mobile:{description:"محفظة الموبايل"},extension:{description:"ملحق المتصفح"},mobile_and_extension:{description:"محفظة موبايل وملحق"},mobile_and_desktop:{description:"محفظة الموبايل والكمبيوتر"},looking_for:{title:"ليست هذه هي ما تبحث عنه؟",mobile:{description:"حدد محفظة على الشاشة الرئيسية للبدء باستخدام موفر محفظة مختلف."},desktop:{compact_description:"حدد محفظة على الشاشة الرئيسية للبدء باستخدام موفر محفظة مختلف.",wide_description:"حدد محفظة على اليسار للبدء باستخدام موفر محفظة مختلف."}}},Esu={title:"ابدأ مع %{wallet}",short_title:"احصل على %{wallet}",mobile:{title:"%{wallet} للجوال",description:"استخدم محفظة الموبايل لاستكشاف عالم Ethereum.",download:{label:"احصل على التطبيق"}},extension:{title:"%{wallet} لـ %{browser}",description:"وصول لمحفظتك مباشرة من متصفح الويب المفضل لديك.",download:{label:"أضف إلى %{browser}"}},desktop:{title:"%{wallet} لـ %{platform}",description:"قم بالوصول إلى محفظتك بشكل أصلي من كمبيوترك القوي.",download:{label:"أضف إلى %{platform}"}}},dsu={title:"قم بالتثبيت %{wallet}",description:"استخدم هاتفك للتحميل على iOS أو Android",continue:{label:"استمر"}},fsu={mobile:{connect:{label:"اتصل"},learn_more:{label:"تعلم المزيد"}},extension:{refresh:{label:"تحديث"},learn_more:{label:"تعلم المزيد"}},desktop:{connect:{label:"اتصل"},learn_more:{label:"تعلم المزيد"}}},psu={title:"تبديل الشبكات",wrong_network:"تم اكتشاف شبكة غير صحيحة، قم بالتبديل أو القطع للمتابعة.",confirm:"التأكيد في المحفظة",switching_not_supported:"محفظتك لا تدعم التبديل بين الشبكات من %{appName}. جرب التبديل بين الشبكات من داخل المحفظة بدلاً من ذلك.",switching_not_supported_fallback:"محفظتك لا تدعم تبديل الشبكات من هذا التطبيق. حاول تبديل الشبكات من داخل المحفظة بدلاً من ذلك.",disconnect:"قطع الاتصال",connected:"متصل"},hsu={disconnect:{label:"قطع الاتصال"},copy_address:{label:"نسخ العنوان",copied:"تم النسخ!"},explorer:{label:"عرض المزيد على المستكشف"},transactions:{description:"%{appName} ستظهر المعاملات هنا...",description_fallback:"سوف تظهر معاملاتك هنا...",recent:{title:"المعاملات الأخيرة"},clear:{label:"مسح الكل"}}},Csu={argent:{qr_code:{step1:{description:"ضع أرجنت على شاشتك الرئيسية للوصول السريع إلى محفظتك.",title:"افتح تطبيق Argent"},step2:{description:"أنشئ محفظة واسم مستخدم، أو استورد محفظة موجودة بالفعل.",title:"إنشاء أو استيراد محفظة"},step3:{description:"بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك.",title:"اضغط على زر فحص الكود الشريطي"}}},bifrost:{qr_code:{step1:{description:"نوصي بوضع محفظة Bifrost على الشاشة الرئيسية للوصول الأسرع.",title:"افتح تطبيق محفظة Bifrost"},step2:{description:"أنشئ أو استورد محفظة باستخدام عبارة الاستعادة الخاصة بك.",title:"إنشاء أو استيراد محفظة"},step3:{description:"بعد الفحص، سيظهر موجه الاتصال لك لتوصيل محفظتك.",title:"اضغط على زر المسح"}}},bitget:{qr_code:{step1:{description:"نوصي بوضع محفظة Bitget على الشاشة الرئيسية للوصول الأسرع.",title:"افتح تطبيق محفظة Bitget"},step2:{description:"تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد.",title:"إنشاء أو استيراد محفظة"},step3:{description:"بعد الفحص، ستظهر لك موجه اتصال لتوصيل محفظتك.",title:"اضغط على زر الفحص"}},extension:{step1:{description:"نوصي بتثبيت محفظة Bitget على شريط المهام للوصول الأسرع إلى محفظتك.",title:"قم بتثبيت امتداد محفظة Bitget"},step2:{description:"تأكد من نسخ محفظتك احتياطيًا باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.",title:"أنشئ محفظة أو استورد محفظة"},step3:{description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد.",title:"قم بتحديث متصفحك"}}},bitski:{extension:{step1:{description:"نوصي بتثبيت Bitski على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك.",title:"قم بتثبيت امتداد Bitski"},step2:{description:"تأكد من الاحتفاظ بنسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.",title:"إنشاء أو استيراد محفظة"},step3:{description:"بعد إعداد المحفظة الخاصة بك، انقر أدناه لتحديث المتصفح وتحميل الإضافة.",title:"تحديث المتصفح الخاص بك"}}},coin98:{qr_code:{step1:{description:"نوصي بوضع محفظة Coin98 على الشاشة الرئيسية لسرعة الوصول إلى محفظتك.",title:"افتح تطبيق محفظة Coin98"},step2:{description:"يمكنك بسهولة نسخ محفظتك الاحتياطي باستخدام ميزة النسخ الاحتياطي على هاتفك.",title:"إنشاء أو استيراد محفظة"},step3:{description:"بعد الفحص، ستظهر لك مطالبة بالاتصال لتوصيل محفظتك.",title:"اضغط على زر WalletConnect"}},extension:{step1:{description:"انقر في الجزء العلوي الأيمن من المتصفح وثبت Coin98 Wallet لسهولة الوصول.",title:"قم بتثبيت امتداد Coin98 Wallet"},step2:{description:"أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل.",title:"أنشئ محفظة أو استورد محفظة"},step3:{description:"بمجرد إعداد Coin98 Wallet ، انقر أدناه لتحديث المتصفح وتحميل الامتداد.",title:"تحديث المتصفح الخاص بك"}}},coinbase:{qr_code:{step1:{description:"نوصي بوضع Coinbase Wallet على الشاشة الرئيسية لسهولة الوصول.",title:"افتح تطبيق Coinbase Wallet"},step2:{description:"يمكنك بسهولة النسخ الاحتياطي لمحفظتك باستخدام ميزة النسخ الاحتياطي السحابي.",title:"إنشاء أو استيراد محفظة"},step3:{description:"بعد الفحص، ستظهر لك مطالبة بالاتصال لتوصيل محفظتك.",title:"اضغط على زر الفحص"}},extension:{step1:{description:"نوصي بتثبيت محفظة Coinbase على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك.",title:"تثبيت امتداد محفظة Coinbase"},step2:{description:"تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.",title:"إنشاء أو استيراد المحفظة"},step3:{description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة.",title:"تحديث المتصفح الخاص بك"}}},core:{qr_code:{step1:{description:"نوصي بوضع Core على الشاشة الرئيسية للوصول السريع إلى محفظتك.",title:"افتح تطبيق Core"},step2:{description:"يمكنك بسهولة النسخ الاحتياطي لمحفظتك باستخدام ميزة النسخ الاحتياطي على هاتفك.",title:"إنشاء أو استيراد المحفظة"},step3:{description:"بعد الفحص، سيظهر لك موجه الاتصال لتوصيل محفظتك.",title:"اضغط على زر WalletConnect"}},extension:{step1:{description:"نوصي بتثبيت Core على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك.",title:"قم بتثبيت امتداد Core"},step2:{description:"تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.",title:"إنشاء أو استيراد محفظة"},step3:{description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد.",title:"تحديث متصفحك"}}},fox:{qr_code:{step1:{description:"نوصي بوضع FoxWallet على شاشتك الرئيسية للوصول الأسرع.",title:"افتح تطبيق FoxWallet"},step2:{description:"تأكد من الاحتفاظ بنسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.",title:"إنشاء محفظة أو استيراد محفظة"},step3:{description:"بعد الفحص، ستظهر لك موجه الاتصال لتتمكن من اتصال محفظتك.",title:"اضغط على زر الفحص"}}},frontier:{qr_code:{step1:{description:"نوصي بوضع Frontier Wallet على شاشتك الرئيسية للوصول الأسرع.",title:"افتح تطبيق Frontier Wallet"},step2:{description:"تأكد من نسخ محفظتك احتياطيا باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.",title:"إنشاء أو استيراد محفظة"},step3:{description:"بعد الفحص، ستظهر لك موجه الاتصال لربط محفظتك.",title:"اضغط على زر الفحص"}},extension:{step1:{description:"نوصي بتثبيت محفظة Frontier على شريط المهام للوصول الأسرع إلى محفظتك.",title:"تثبيت امتداد محفظة Frontier"},step2:{description:"تأكد من نسخ محفظتك احتياطيا باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.",title:"إنشاء أو استيراد محفظة"},step3:{description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة.",title:"قم بتحديث المتصفح الخاص بك"}}},im_token:{qr_code:{step1:{title:"افتح تطبيق imToken",description:"ضع تطبيق imToken على الشاشة الرئيسية للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"قم بإنشاء محفظة جديدة أو استيراد واحدة موجودة."},step3:{title:"اضغط على أيقونة الماسح الضوئي في الزاوية العليا اليمنى",description:"اختر الاتصال الجديد، ثم امسح الرمز الشريطي وأكد الموجه للاتصال."}}},metamask:{qr_code:{step1:{title:"افتح تطبيق MetaMask",description:"نوصي بوضع MetaMask على الشاشة الرئيسية لديك للوصول بشكل أسرع."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من نسخ الحفاظ على محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"اضغط على زر المسح",description:"بعد الفحص، ستظهر لك موجه اتصال لتوصيل محفظتك."}},extension:{step1:{title:"قم بتثبيت امتداد MetaMask",description:"نوصي بتثبيت MetaMask في شريط المهام للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من نسخ احتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"تحديث متصفحك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد."}}},okx:{qr_code:{step1:{title:"افتح تطبيق محفظة OKX",description:"نوصي بوضع محفظة OKX على الشاشة الرئيسية للوصول الأسرع."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من نسخ احتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"اضغط على زر المسح",description:"بعد الفحص، ستظهر لك مطالبة بالاتصال لتوصيل محفظتك."}},extension:{step1:{title:"قم بتثبيت امتداد محفظة OKX",description:"نوصي بتثبيت محفظة OKX على شريط المهام للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من حفظ نسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"قم بتحديث المتصفح الخاص بك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة."}}},omni:{qr_code:{step1:{title:"افتح تطبيق Omni",description:"أضف Omni إلى شاشتك الرئيسية للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"إنشاء محفظة جديدة أو استيراد واحدة موجودة."},step3:{title:"اضغط على أيقونة الرمز الاستجابة السريعة وامسحها",description:"اضغط على الرمز QR على الشاشة الرئيسية الخاصة بك، امسح الرمز وأكد الموافقة للاتصال."}}},token_pocket:{qr_code:{step1:{title:"افتح تطبيق TokenPocket",description:"نوصي بوضع TokenPocket على الشاشة الرئيسية للوصول السريع."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من نسخ احتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"اضغط على زر المسح",description:"بعد الفحص، ستظهر لك رسالة موجهة للاتصال بمحفظتك."}},extension:{step1:{title:"قم بتثبيت امتداد TokenPocket",description:"نوصي بتثبيت TokenPocket على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك."},step2:{title:"قم بإنشاء محفظة أو استيراد محفظة",description:"تأكد من الاحتفاظ بنسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"قم بتحديث المتصفح الخاص بك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة."}}},trust:{qr_code:{step1:{title:"افتح تطبيق Trust Wallet",description:"ضع Trust Wallet على الشاشة الرئيسية للوصول السريع إلى محفظتك."},step2:{title:"أنشئ محفظة أو استورد محفظة",description:"أنشئ محفظة جديدة أو استورد واحدة موجودة."},step3:{title:"اضغط على WalletConnect في الإعدادات",description:"اختر الاتصال الجديد، ثم امسح الرمز الشريطي QR وأكد الموجه للاتصال."}},extension:{step1:{title:"قم بتثبيت امتداد Trust Wallet",description:"انقر في الجزء العلوي الأيمن من المتصفح وثبت Trust Wallet للوصول بسهولة."},step2:{title:"أنشئ محفظة أو استورد محفظة",description:"أنشئ محفظة جديدة أو استورد واحدة موجودة."},step3:{title:"قم بتحديث متصفحك",description:"بمجرد إعداد Trust Wallet، انقر أدناه لتحديث المتصفح وتحميل الإضافة."}}},uniswap:{qr_code:{step1:{title:"افتح تطبيق Uniswap",description:"أضف محفظة Uniswap إلى شاشة الرئيسية للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"قم بإنشاء محفظة جديدة أو استيراد واحدة موجودة."},step3:{title:"اضغط على الأيقونة QR واقرأ الرمز",description:"اضغط على أيقونة QR على الشاشة الرئيسية، قراءة الرمز وتأكيد الرسالة الموجهة للاتصال."}}},zerion:{qr_code:{step1:{title:"افتح تطبيق Zerion",description:"نوصي بوضع Zerion على شاشتك الرئيسية للوصول الأسرع."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من حفظ نسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"اضغط على زر المسح",description:"بعد المسح، سوف يظهر لك نافذة الاتصال لتوصيل محفظتك."}},extension:{step1:{title:"تثبيت امتداد Zerion",description:"نوصي بتثبيت Zerion على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من الاحتفاظ بنسخة احتياطية من محفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"قم بتحديث المتصفح الخاص بك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة."}}},rainbow:{qr_code:{step1:{title:"افتح تطبيق Rainbow",description:"نوصي بوضع Rainbow على شاشة البداية للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء محفظة أو استيراد محفظة",description:"يمكنك عمل نسخة احتياطية بسهولة لمحفظتك باستخدام ميزة النسخ الاحتياطي على هاتفك."},step3:{title:"اضغط على الزر الماسح الضوئي",description:"بعد الفحص، سيظهر لك موجه اتصال لربط محفظتك."}}},enkrypt:{extension:{step1:{description:"نوصي بتثبيت محفظة Enkrypt على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك.",title:"تثبيت امتداد محفظة Enkrypt"},step2:{description:"تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.",title:"أنشئ أو استورد محفظة"},step3:{description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة.",title:"حدث المتصفح الخاص بك"}}},frame:{extension:{step1:{description:"نوصي بتعليق Frame على شريط المهام للوصول السريع إلى محفظتك.",title:"ثبت Frame والإضافة المصاحبة"},step2:{description:"تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص.",title:"أنشئ أو استورد محفظة"},step3:{description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة.",title:"حدث المتصفح الخاص بك"}}},one_key:{extension:{step1:{title:"قم بتثبيت امتداد محفظة OneKey",description:"نوصي بتثبيت محفظة OneKey على شريط المهام للوصول السريع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من نسخ احتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"تحديث المتصفح الخاص بك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد."}}},phantom:{extension:{step1:{title:"قم بتثبيت امتداد Phantom",description:"نوصي بتثبيت Phantom على شريط المهام للوصول الأسهل إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من نسخ محفظتك احتياطيًا باستخدام طريقة آمنة. لا تشارك عبارة الاستعادة السرية الخاصة بك مع أي شخص."},step3:{title:"قم بتحديث المتصفح",description:"بمجرد إعداد المحفظة، انقر أدناه لتحديث المتصفح وتحميل الإضافة."}}},rabby:{extension:{step1:{title:"ثبت امتداد Rabby",description:"نوصي بتثبيت Rabby على شريط المهام للوصول الأسرع إلى محفظتك."},step2:{title:"أنشئ محفظة أو استورد محفظة",description:"تأكد من نسخ محفظتك احتياطيًا باستخدام طريقة آمنة. لا تشارك العبارة السرية مع أي شخص."},step3:{title:"قم بتحديث المتصفح",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة."}}},safeheron:{extension:{step1:{title:"قم بتثبيت إضافة النواة",description:"نوصي بتثبيت Safeheron على شريط المهام الخاص بك للوصول السريع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من نسخ محفظتك بطريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"تحديث المتصفح الخاص بك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة."}}},taho:{extension:{step1:{title:"تثبيت إضافة Taho",description:"نوصي بتثبيت Taho على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء محفظة أو استيراد محفظة",description:"تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أي شخص."},step3:{title:"تحديث المتصفح الخاص بك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة."}}},talisman:{extension:{step1:{title:"تثبيت إضافة Talisman",description:"نوصي بتثبيت Talisman على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء محفظة Ethereum أو استيرادها",description:"تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارة الاستعادة الخاصة بك مع أي شخص."},step3:{title:"قم بتحديث المستعرض الخاص بك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المستعرض وتحميل الإضافة."}}},xdefi:{extension:{step1:{title:"قم بتثبيت إضافة XDEFI Wallet",description:"نوصي بتثبيت XDEFI Wallet على شريط المهام للوصول الأسرع إلى محفظتك."},step2:{title:"أنشئ محفظة أو استورد محفظة",description:"تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك العبارة السرية الخاصة بك مع أي شخص."},step3:{title:"قم بتحديث المستعرض الخاص بك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الإضافة."}}},zeal:{extension:{step1:{title:"قم بتثبيت امتداد Zeal",description:"نوصي بتثبيت Zeal في شريط المهام الخاص بك للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد."},step3:{title:"قم بتحديث متصفحك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد."}}},safepal:{extension:{step1:{title:"قم بتثبيت صيغة SafePal Wallet",description:"انقر في أعلى يمين المتصفح وثبت صيغة SafePal Wallet لسهولة الوصول."},step2:{title:"أنشئ محفظة أو استورد محفظة",description:"أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل."},step3:{title:"قم بتحديث متصفحك",description:"بمجرد إعداد محفظة SafePal، انقر أدناه لتحديث المتصفح وتحميل الإضافة."}},qr_code:{step1:{title:"افتح تطبيق محفظة SafePal",description:"ضع محفظة SafePal على شاشة الرئيسية لسهولة الوصول إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"أنشئ محفظة جديدة أو استورد واحدة موجودة بالفعل."},step3:{title:"اضغط على WalletConnect في الإعدادات",description:"اختر الاتصال الجديد، ثم امسح الرمز الشريطي وأكد الموجه للاتصال."}}},desig:{extension:{step1:{title:"قم بتثبيت إضافة Desig",description:"نوصي بتثبيت Desig على شريط المهام الخاص بك للوصول الأسهل إلى محفظتك."},step2:{title:"إنشاء محفظة",description:"تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد."},step3:{title:"قم بتحديث متصفحك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد."}}},subwallet:{extension:{step1:{title:"قم بتثبيت إضافة SubWallet",description:"نوصي بتثبيت SubWallet على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من النسخ الاحتياطي لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارة الاستعادة الخاصة بك مع أي شخص."},step3:{title:"قم بتحديث متصفحك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد."}},qr_code:{step1:{title:"افتح تطبيق SubWallet",description:"نوصي بوضع SubWallet على شاشة الرئيسية الخاصة بك للوصول الأسرع."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد."},step3:{title:"اضغط على زر المسح",description:"بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك."}}},clv:{extension:{step1:{title:"قم بتثبيت إضافة CLV Wallet",description:"نوصي بتثبيت CLV Wallet على شريط المهام الخاص بك للوصول الأسرع إلى محفظتك."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد."},step3:{title:"قم بتحديث متصفحك",description:"بمجرد إعداد محفظتك، انقر أدناه لتحديث المتصفح وتحميل الامتداد."}},qr_code:{step1:{title:"افتح تطبيق محفظة CLV",description:"نوصي بوضع محفظة CLV على الشاشة الرئيسية للوصول الأسرع."},step2:{title:"إنشاء أو استيراد محفظة",description:"تأكد من عمل نسخة احتياطية لمحفظتك باستخدام طريقة آمنة. لا تشارك عبارتك السرية مع أحد."},step3:{title:"اضغط على زر المسح",description:"بعد الفحص، سيظهر لك موجه الاتصال لتوصيل المحفظة الخاصة بك."}}},okto:{qr_code:{step1:{title:"افتح تطبيق Okto",description:"أضف Okto إلى الشاشة الرئيسية للوصول السريع"},step2:{title:"أنشئ محفظة MPC",description:"أنشئ حسابًا وقم بإنشاء محفظة"},step3:{title:"اضغط على WalletConnect في الإعدادات",description:"اضغط على أيقونة فحص الشاشة في الجهة العليا اليمنى وأكد الإدخال للاتصال."}}},ledger:{desktop:{step1:{title:"افتح تطبيق Ledger Live",description:"نوصي بوضع Ledger Live على شاشة الرئيسية لديك لسرعة الوصول."},step2:{title:"قم بإعداد Ledger الخاص بك",description:"قم بإعداد Ledger جديد أو قم بالاتصال بواحد موجود ."},step3:{title:"اتصل",description:"بعد المسح، سوف يظهر لك نافذة الاتصال لتوصيل محفظتك."}},qr_code:{step1:{title:"افتح تطبيق Ledger Live",description:"نوصي بوضع Ledger Live على شاشة الرئيسية لديك لسرعة الوصول."},step2:{title:"قم بإعداد Ledger الخاص بك",description:"يمكنك إما المزامنة مع تطبيق سطح المكتب أو توصيل Ledger الخاص بك."},step3:{title:"مسح الرمز",description:"اضغط على WalletConnect ثم انتقل إلى الفحص. بعد المسح، سوف يظهر لك نافذة الاتصال لتوصيل محفظتك."}}}},kg={connect_wallet:rsu,intro:isu,sign_in:asu,connect:ssu,connect_scan:osu,connector_group:lsu,get:csu,get_options:Esu,get_mobile:dsu,get_instructions:fsu,chains:psu,profile:hsu,wallet_connectors:Csu},msu={label:"Connect Wallet"},Asu={title:"What is a Wallet?",description:"A wallet is used to send, receive, store, and display digital assets. It's also a new way to log in, without needing to create new accounts and passwords on every website.",digital_asset:{title:"A Home for your Digital Assets",description:"Wallets are used to send, receive, store, and display digital assets like Ethereum and NFTs."},login:{title:"A New Way to Log In",description:"Instead of creating new accounts and passwords on every website, just connect your wallet."},get:{label:"Get a Wallet"},learn_more:{label:"Learn More"}},gsu={label:"Verify your account",description:"To finish connecting, you must sign a message in your wallet to verify that you are the owner of this account.",message:{send:"Sign message",preparing:"Preparing message...",cancel:"Cancel",preparing_error:"Error preparing message, please retry!"},signature:{waiting:"Waiting for signature...",verifying:"Verifying signature...",signing_error:"Error signing message, please retry!",verifying_error:"Error verifying signature, please retry!",oops_error:"Oops, something went wrong!"}},Bsu={label:"Connect",title:"Connect a Wallet",new_to_ethereum:{description:"New to Ethereum wallets?",learn_more:{label:"Learn More"}},learn_more:{label:"Learn more"},recent:"Recent",status:{opening:"Opening %{wallet}...",not_installed:"%{wallet} is not installed",not_available:"%{wallet} is not available",confirm:"Confirm connection in the extension"},secondary_action:{get:{description:"Don't have %{wallet}?",label:"GET"},install:{label:"INSTALL"},retry:{label:"RETRY"}},walletconnect:{description:{full:"Need the official WalletConnect modal?",compact:"Need the WalletConnect modal?"},open:{label:"OPEN"}}},ysu={title:"Scan with %{wallet}",fallback_title:"Scan with your phone"},Fsu={recommended:"Recommended",other:"Other",popular:"Popular",more:"More",others:"Others"},Dsu={title:"Get a Wallet",action:{label:"GET"},mobile:{description:"Mobile Wallet"},extension:{description:"Browser Extension"},mobile_and_extension:{description:"Mobile Wallet and Extension"},mobile_and_desktop:{description:"Mobile and Desktop Wallet"},looking_for:{title:"Not what you're looking for?",mobile:{description:"Select a wallet on the main screen to get started with a different wallet provider."},desktop:{compact_description:"Select a wallet on the main screen to get started with a different wallet provider.",wide_description:"Select a wallet on the left to get started with a different wallet provider."}}},vsu={title:"Get started with %{wallet}",short_title:"Get %{wallet}",mobile:{title:"%{wallet} for Mobile",description:"Use the mobile wallet to explore the world of Ethereum.",download:{label:"Get the app"}},extension:{title:"%{wallet} for %{browser}",description:"Access your wallet right from your favorite web browser.",download:{label:"Add to %{browser}"}},desktop:{title:"%{wallet} for %{platform}",description:"Access your wallet natively from your powerful desktop.",download:{label:"Add to %{platform}"}}},bsu={title:"Install %{wallet}",description:"Scan with your phone to download on iOS or Android",continue:{label:"Continue"}},wsu={mobile:{connect:{label:"Connect"},learn_more:{label:"Learn More"}},extension:{refresh:{label:"Refresh"},learn_more:{label:"Learn More"}},desktop:{connect:{label:"Connect"},learn_more:{label:"Learn More"}}},xsu={title:"Switch Networks",wrong_network:"Wrong network detected, switch or disconnect to continue.",confirm:"Confirm in Wallet",switching_not_supported:"Your wallet does not support switching networks from %{appName}. Try switching networks from within your wallet instead.",switching_not_supported_fallback:"Your wallet does not support switching networks from this app. Try switching networks from within your wallet instead.",disconnect:"Disconnect",connected:"Connected"},ksu={disconnect:{label:"Disconnect"},copy_address:{label:"Copy Address",copied:"Copied!"},explorer:{label:"View more on explorer"},transactions:{description:"%{appName} transactions will appear here...",description_fallback:"Your transactions will appear here...",recent:{title:"Recent Transactions"},clear:{label:"Clear All"}}},_su={argent:{qr_code:{step1:{description:"Put Argent on your home screen for faster access to your wallet.",title:"Open the Argent app"},step2:{description:"Create a wallet and username, or import an existing wallet.",title:"Create or Import a Wallet"},step3:{description:"After you scan, a connection prompt will appear for you to connect your wallet.",title:"Tap the Scan QR button"}}},bifrost:{qr_code:{step1:{description:"We recommend putting Bifrost Wallet on your home screen for quicker access.",title:"Open the Bifrost Wallet app"},step2:{description:"Create or import a wallet using your recovery phrase.",title:"Create or Import a Wallet"},step3:{description:"After you scan, a connection prompt will appear for you to connect your wallet.",title:"Tap the scan button"}}},bitget:{qr_code:{step1:{description:"We recommend putting Bitget Wallet on your home screen for quicker access.",title:"Open the Bitget Wallet app"},step2:{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",title:"Create or Import a Wallet"},step3:{description:"After you scan, a connection prompt will appear for you to connect your wallet.",title:"Tap the scan button"}},extension:{step1:{description:"We recommend pinning Bitget Wallet to your taskbar for quicker access to your wallet.",title:"Install the Bitget Wallet extension"},step2:{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",title:"Create or Import a Wallet"},step3:{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",title:"Refresh your browser"}}},bitski:{extension:{step1:{description:"We recommend pinning Bitski to your taskbar for quicker access to your wallet.",title:"Install the Bitski extension"},step2:{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",title:"Create or Import a Wallet"},step3:{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",title:"Refresh your browser"}}},coin98:{qr_code:{step1:{description:"We recommend putting Coin98 Wallet on your home screen for faster access to your wallet.",title:"Open the Coin98 Wallet app"},step2:{description:"You can easily backup your wallet using our backup feature on your phone.",title:"Create or Import a Wallet"},step3:{description:"After you scan, a connection prompt will appear for you to connect your wallet.",title:"Tap the WalletConnect button"}},extension:{step1:{description:"Click at the top right of your browser and pin Coin98 Wallet for easy access.",title:"Install the Coin98 Wallet extension"},step2:{description:"Create a new wallet or import an existing one.",title:"Create or Import a wallet"},step3:{description:"Once you set up Coin98 Wallet, click below to refresh the browser and load up the extension.",title:"Refresh your browser"}}},coinbase:{qr_code:{step1:{description:"We recommend putting Coinbase Wallet on your home screen for quicker access.",title:"Open the Coinbase Wallet app"},step2:{description:"You can easily backup your wallet using the cloud backup feature.",title:"Create or Import a Wallet"},step3:{description:"After you scan, a connection prompt will appear for you to connect your wallet.",title:"Tap the scan button"}},extension:{step1:{description:"We recommend pinning Coinbase Wallet to your taskbar for quicker access to your wallet.",title:"Install the Coinbase Wallet extension"},step2:{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",title:"Create or Import a Wallet"},step3:{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",title:"Refresh your browser"}}},core:{qr_code:{step1:{description:"We recommend putting Core on your home screen for faster access to your wallet.",title:"Open the Core app"},step2:{description:"You can easily backup your wallet using our backup feature on your phone.",title:"Create or Import a Wallet"},step3:{description:"After you scan, a connection prompt will appear for you to connect your wallet.",title:"Tap the WalletConnect button"}},extension:{step1:{description:"We recommend pinning Core to your taskbar for quicker access to your wallet.",title:"Install the Core extension"},step2:{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",title:"Create or Import a Wallet"},step3:{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",title:"Refresh your browser"}}},fox:{qr_code:{step1:{description:"We recommend putting FoxWallet on your home screen for quicker access.",title:"Open the FoxWallet app"},step2:{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",title:"Create or Import a Wallet"},step3:{description:"After you scan, a connection prompt will appear for you to connect your wallet.",title:"Tap the scan button"}}},frontier:{qr_code:{step1:{description:"We recommend putting Frontier Wallet on your home screen for quicker access.",title:"Open the Frontier Wallet app"},step2:{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",title:"Create or Import a Wallet"},step3:{description:"After you scan, a connection prompt will appear for you to connect your wallet.",title:"Tap the scan button"}},extension:{step1:{description:"We recommend pinning Frontier Wallet to your taskbar for quicker access to your wallet.",title:"Install the Frontier Wallet extension"},step2:{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",title:"Create or Import a Wallet"},step3:{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",title:"Refresh your browser"}}},im_token:{qr_code:{step1:{title:"Open the imToken app",description:"Put imToken app on your home screen for faster access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Create a new wallet or import an existing one."},step3:{title:"Tap Scanner Icon in top right corner",description:"Choose New Connection, then scan the QR code and confirm the prompt to connect."}}},metamask:{qr_code:{step1:{title:"Open the MetaMask app",description:"We recommend putting MetaMask on your home screen for quicker access."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Tap the scan button",description:"After you scan, a connection prompt will appear for you to connect your wallet."}},extension:{step1:{title:"Install the MetaMask extension",description:"We recommend pinning MetaMask to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},okx:{qr_code:{step1:{title:"Open the OKX Wallet app",description:"We recommend putting OKX Wallet on your home screen for quicker access."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Tap the scan button",description:"After you scan, a connection prompt will appear for you to connect your wallet."}},extension:{step1:{title:"Install the OKX Wallet extension",description:"We recommend pinning OKX Wallet to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},omni:{qr_code:{step1:{title:"Open the Omni app",description:"Add Omni to your home screen for faster access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Create a new wallet or import an existing one."},step3:{title:"Tap the QR icon and scan",description:"Tap the QR icon on your home screen, scan the code and confirm the prompt to connect."}}},token_pocket:{qr_code:{step1:{title:"Open the TokenPocket app",description:"We recommend putting TokenPocket on your home screen for quicker access."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Tap the scan button",description:"After you scan, a connection prompt will appear for you to connect your wallet."}},extension:{step1:{title:"Install the TokenPocket extension",description:"We recommend pinning TokenPocket to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},trust:{qr_code:{step1:{title:"Open the Trust Wallet app",description:"Put Trust Wallet on your home screen for faster access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Create a new wallet or import an existing one."},step3:{title:"Tap WalletConnect in Settings",description:"Choose New Connection, then scan the QR code and confirm the prompt to connect."}},extension:{step1:{title:"Install the Trust Wallet extension",description:"Click at the top right of your browser and pin Trust Wallet for easy access."},step2:{title:"Create or Import a wallet",description:"Create a new wallet or import an existing one."},step3:{title:"Refresh your browser",description:"Once you set up Trust Wallet, click below to refresh the browser and load up the extension."}}},uniswap:{qr_code:{step1:{title:"Open the Uniswap app",description:"Add Uniswap Wallet to your home screen for faster access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Create a new wallet or import an existing one."},step3:{title:"Tap the QR icon and scan",description:"Tap the QR icon on your homescreen, scan the code and confirm the prompt to connect."}}},zerion:{qr_code:{step1:{title:"Open the Zerion app",description:"We recommend putting Zerion on your home screen for quicker access."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Tap the scan button",description:"After you scan, a connection prompt will appear for you to connect your wallet."}},extension:{step1:{title:"Install the Zerion extension",description:"We recommend pinning Zerion to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},rainbow:{qr_code:{step1:{title:"Open the Rainbow app",description:"We recommend putting Rainbow on your home screen for faster access to your wallet."},step2:{title:"Create or Import a Wallet",description:"You can easily backup your wallet using our backup feature on your phone."},step3:{title:"Tap the scan button",description:"After you scan, a connection prompt will appear for you to connect your wallet."}}},enkrypt:{extension:{step1:{description:"We recommend pinning Enkrypt Wallet to your taskbar for quicker access to your wallet.",title:"Install the Enkrypt Wallet extension"},step2:{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",title:"Create or Import a Wallet"},step3:{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",title:"Refresh your browser"}}},frame:{extension:{step1:{description:"We recommend pinning Frame to your taskbar for quicker access to your wallet.",title:"Install Frame & the companion extension"},step2:{description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone.",title:"Create or Import a Wallet"},step3:{description:"Once you set up your wallet, click below to refresh the browser and load up the extension.",title:"Refresh your browser"}}},one_key:{extension:{step1:{title:"Install the OneKey Wallet extension",description:"We recommend pinning OneKey Wallet to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},phantom:{extension:{step1:{title:"Install the Phantom extension",description:"We recommend pinning Phantom to your taskbar for easier access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},rabby:{extension:{step1:{title:"Install the Rabby extension",description:"We recommend pinning Rabby to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},safeheron:{extension:{step1:{title:"Install the Core extension",description:"We recommend pinning Safeheron to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},taho:{extension:{step1:{title:"Install the Taho extension",description:"We recommend pinning Taho to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},talisman:{extension:{step1:{title:"Install the Talisman extension",description:"We recommend pinning Talisman to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import an Ethereum Wallet",description:"Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},xdefi:{extension:{step1:{title:"Install the XDEFI Wallet extension",description:"We recommend pinning XDEFI Wallet to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},zeal:{extension:{step1:{title:"Install the Zeal extension",description:"We recommend pinning Zeal to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},safepal:{extension:{step1:{title:"Install the SafePal Wallet extension",description:"Click at the top right of your browser and pin SafePal Wallet for easy access."},step2:{title:"Create or Import a wallet",description:"Create a new wallet or import an existing one."},step3:{title:"Refresh your browser",description:"Once you set up SafePal Wallet, click below to refresh the browser and load up the extension."}},qr_code:{step1:{title:"Open the SafePal Wallet app",description:"Put SafePal Wallet on your home screen for faster access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Create a new wallet or import an existing one."},step3:{title:"Tap WalletConnect in Settings",description:"Choose New Connection, then scan the QR code and confirm the prompt to connect."}}},desig:{extension:{step1:{title:"Install the Desig extension",description:"We recommend pinning Desig to your taskbar for easier access to your wallet."},step2:{title:"Create a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}}},subwallet:{extension:{step1:{title:"Install the SubWallet extension",description:"We recommend pinning SubWallet to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your recovery phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}},qr_code:{step1:{title:"Open the SubWallet app",description:"We recommend putting SubWallet on your home screen for quicker access."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Tap the scan button",description:"After you scan, a connection prompt will appear for you to connect your wallet."}}},clv:{extension:{step1:{title:"Install the CLV Wallet extension",description:"We recommend pinning CLV Wallet to your taskbar for quicker access to your wallet."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Refresh your browser",description:"Once you set up your wallet, click below to refresh the browser and load up the extension."}},qr_code:{step1:{title:"Open the CLV Wallet app",description:"We recommend putting CLV Wallet on your home screen for quicker access."},step2:{title:"Create or Import a Wallet",description:"Be sure to back up your wallet using a secure method. Never share your secret phrase with anyone."},step3:{title:"Tap the scan button",description:"After you scan, a connection prompt will appear for you to connect your wallet."}}},okto:{qr_code:{step1:{title:"Open the Okto app",description:"Add Okto to your home screen for quick access"},step2:{title:"Create an MPC Wallet",description:"Create an account and generate a wallet"},step3:{title:"Tap WalletConnect in Settings",description:"Tap the Scan QR icon at the top right and confirm the prompt to connect."}}},ledger:{desktop:{step1:{title:"Open the Ledger Live app",description:"We recommend putting Ledger Live on your home screen for quicker access."},step2:{title:"Set up your Ledger",description:"Set up a new Ledger or connect to an existing one."},step3:{title:"Connect",description:"A connection prompt will appear for you to connect your wallet."}},qr_code:{step1:{title:"Open the Ledger Live app",description:"We recommend putting Ledger Live on your home screen for quicker access."},step2:{title:"Set up your Ledger",description:"You can either sync with the desktop app or connect your Ledger."},step3:{title:"Scan the code",description:"Tap WalletConnect then Switch to Scanner. After you scan, a connection prompt will appear for you to connect your wallet."}}}},_g={connect_wallet:msu,intro:Asu,sign_in:gsu,connect:Bsu,connect_scan:ysu,connector_group:Fsu,get:Dsu,get_options:vsu,get_mobile:bsu,get_instructions:wsu,chains:xsu,profile:ksu,wallet_connectors:_su},Ssu={label:"Conectar la billetera"},Psu={title:"¿Qué es una billetera?",description:"Una billetera se usa para enviar, recibir, almacenar y mostrar activos digitales. También es una nueva forma de iniciar sesión, sin necesidad de crear nuevas cuentas y contraseñas en cada sitio web.",digital_asset:{title:"Un hogar para tus Activos Digitales",description:"Las carteras se utilizan para enviar, recibir, almacenar y mostrar activos digitales como Ethereum y NFTs."},login:{title:"Una nueva forma de iniciar sesión",description:"En lugar de crear nuevas cuentas y contraseñas en cada sitio web, simplemente conecta tu cartera."},get:{label:"Obtener una billetera"},learn_more:{label:"Obtener más información"}},Tsu={label:"Verifica tu cuenta",description:"Para terminar de conectar, debes firmar un mensaje en tu billetera para verificar que eres el propietario de esta cuenta.",message:{send:"Enviar mensaje",preparing:"Preparando mensaje...",cancel:"Cancelar",preparing_error:"Error al preparar el mensaje, ¡intenta de nuevo!"},signature:{waiting:"Esperando firma...",verifying:"Verificando firma...",signing_error:"Error al firmar el mensaje, ¡intenta de nuevo!",verifying_error:"Error al verificar la firma, ¡intenta de nuevo!",oops_error:"¡Ups! Algo salió mal."}},Osu={label:"Conectar",title:"Conectar una billetera",new_to_ethereum:{description:"¿Eres nuevo en las billeteras Ethereum?",learn_more:{label:"Obtener más información"}},learn_more:{label:"Obtener más información"},recent:"Reciente",status:{opening:"Abriendo %{wallet}...",not_installed:"%{wallet} no está instalado",not_available:"%{wallet} no está disponible",confirm:"Confirma la conexión en la extensión"},secondary_action:{get:{description:"¿No tienes %{wallet}?",label:"OBTENER"},install:{label:"INSTALAR"},retry:{label:"REINTENTAR"}},walletconnect:{description:{full:"¿Necesitas el modal oficial de WalletConnect?",compact:"¿Necesitas el modal de WalletConnect?"},open:{label:"ABRIR"}}},Isu={title:"Escanea con %{wallet}",fallback_title:"Escanea con tu teléfono"},Nsu={recommended:"Recomendado",other:"Otro",popular:"Popular",more:"Más",others:"Otros"},Rsu={title:"Obtener una billetera",action:{label:"OBTENER"},mobile:{description:"Billetera Móvil"},extension:{description:"Extensión de navegador"},mobile_and_extension:{description:"Billetera móvil y extensión"},mobile_and_desktop:{description:"Billetera Móvil y de Escritorio"},looking_for:{title:"¿No es lo que estás buscando?",mobile:{description:"Seleccione una billetera en la pantalla principal para comenzar con un proveedor de billetera diferente."},desktop:{compact_description:"Seleccione una cartera en la pantalla principal para comenzar con un proveedor de cartera diferente.",wide_description:"Seleccione una cartera a la izquierda para comenzar con un proveedor de cartera diferente."}}},zsu={title:"Comienza con %{wallet}",short_title:"Obtener %{wallet}",mobile:{title:"%{wallet} para móvil",description:"Use la billetera móvil para explorar el mundo de Ethereum.",download:{label:"Obtener la aplicación"}},extension:{title:"%{wallet} para %{browser}",description:"Acceda a su billetera directamente desde su navegador web favorito.",download:{label:"Añadir a %{browser}"}},desktop:{title:"%{wallet} para %{platform}",description:"Acceda a su billetera de forma nativa desde su potente escritorio.",download:{label:"Añadir a %{platform}"}}},jsu={title:"Instalar %{wallet}",description:"Escanee con su teléfono para descargar en iOS o Android",continue:{label:"Continuar"}},Msu={mobile:{connect:{label:"Conectar"},learn_more:{label:"Obtener más información"}},extension:{refresh:{label:"Actualizar"},learn_more:{label:"Obtener más información"}},desktop:{connect:{label:"Conectar"},learn_more:{label:"Obtener más información"}}},Lsu={title:"Cambiar redes",wrong_network:"Se detectó la red incorrecta, cambia o desconéctate para continuar.",confirm:"Confirmar en la cartera",switching_not_supported:"Tu cartera no admite cambiar las redes desde %{appName}. Intenta cambiar las redes desde tu cartera.",switching_not_supported_fallback:"Su billetera no admite el cambio de redes desde esta aplicación. Intente cambiar de red desde dentro de su billetera en su lugar.",disconnect:"Desconectar",connected:"Conectado"},Usu={disconnect:{label:"Desconectar"},copy_address:{label:"Copiar dirección",copied:"¡Copiado!"},explorer:{label:"Ver más en el explorador"},transactions:{description:"%{appName} transacciones aparecerán aquí...",description_fallback:"Tus transacciones aparecerán aquí...",recent:{title:"Transacciones recientes"},clear:{label:"Borrar Todo"}}},$su={argent:{qr_code:{step1:{description:"Coloque Argent en su pantalla de inicio para un acceso más rápido a su billetera.",title:"Abra la aplicación Argent"},step2:{description:"Cree una billetera y un nombre de usuario, o importe una billetera existente.",title:"Crear o Importar una Billetera"},step3:{description:"Después de escanear, aparecerá un mensaje de conexión para que conecte su billetera.",title:"Toque el botón Escanear QR"}}},bifrost:{qr_code:{step1:{description:"Recomendamos poner Bifrost Wallet en su pantalla de inicio para un acceso más rápido.",title:"Abra la aplicación Bifrost Wallet"},step2:{description:"Cree o importe una billetera usando su frase de recuperación.",title:"Crear o Importar una Billetera"},step3:{description:"Después de escanear, aparecerá un aviso de conexión para que conecte su billetera.",title:"Toque el botón de escaneo"}}},bitget:{qr_code:{step1:{description:"Recomendamos colocar Bitget Wallet en su pantalla de inicio para un acceso más rápido.",title:"Abra la aplicación Bitget Wallet"},step2:{description:"Asegúrese de respaldar su billetera utilizando un método seguro. Nunca comparta su frase secreta con nadie.",title:"Crear o Importar una Billetera"},step3:{description:"Después de escanear, aparecerá un aviso de conexión para que pueda conectar su billetera.",title:"Toque el botón de escanear"}},extension:{step1:{description:"Recomendamos anclar Bitget Wallet a su barra de tareas para un acceso más rápido a su billetera.",title:"Instale la extensión de la Billetera Bitget"},step2:{description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie.",title:"Crear o Importar una Billetera"},step3:{description:"Una vez que configures tu billetera, haz clic a continuación para refrescar el navegador y cargar la extensión.",title:"Refrescar tu navegador"}}},bitski:{extension:{step1:{description:"Recomendamos anclar Bitski a tu barra de tareas para un acceso más rápido a tu billetera.",title:"Instala la extensión Bitski"},step2:{description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie.",title:"Crear o Importar una Billetera"},step3:{description:"Una vez que configure su billetera, haga clic abajo para actualizar el navegador y cargar la extensión.",title:"Actualiza tu navegador"}}},coin98:{qr_code:{step1:{description:"Recomendamos poner Coin98 Wallet en la pantalla de inicio para un acceso más rápido a su billetera.",title:"Abra la aplicación Coin98 Wallet"},step2:{description:"Puede respaldar fácilmente su billetera utilizando nuestra función de respaldo en su teléfono.",title:"Crear o Importar una Billetera"},step3:{description:"Después de escanear, aparecerá un aviso de conexión para que conecte su billetera.",title:"Toque el botón WalletConnect"}},extension:{step1:{description:"Haga clic en la parte superior derecha de su navegador y fije Coin98 Wallet para un fácil acceso.",title:"Instale la extensión Coin98 Wallet"},step2:{description:"Crea una nueva billetera o importa una existente.",title:"Crear o Importar una billetera"},step3:{description:"Una vez que configures Coin98 Wallet, haz clic a continuación para refrescar el navegador y cargar la extensión.",title:"Refresca tu navegador"}}},coinbase:{qr_code:{step1:{description:"Recomendamos poner Coinbase Wallet en tu pantalla de inicio para un acceso más rápido.",title:"Abre la aplicación de la Billetera Coinbase"},step2:{description:"Puedes respaldar tu billetera fácilmente utilizando la función de respaldo en la nube.",title:"Crear o Importar una Billetera"},step3:{description:"Después de escanear, aparecerá un aviso de conexión para que conectes tu billetera.",title:"Pulsa el botón de escanear"}},extension:{step1:{description:"Te recomendamos anclar la Billetera Coinbase a tu barra de tareas para un acceso más rápido a tu billetera.",title:"Instala la extensión de la Billetera Coinbase"},step2:{description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie.",title:"Crear o Importar una Billetera"},step3:{description:"Una vez que configure su billetera, haga clic abajo para refrescar el navegador y cargar la extensión.",title:"Refresca tu navegador"}}},core:{qr_code:{step1:{description:"Recomendamos poner Core en su pantalla de inicio para un acceso más rápido a su billetera.",title:"Abra la aplicación Core"},step2:{description:"Puedes respaldar fácilmente tu billetera utilizando nuestra función de respaldo en tu teléfono.",title:"Crear o Importar una Billetera"},step3:{description:"Después de escanear, aparecerá un aviso de conexión para que conectes tu billetera.",title:"Toque el botón WalletConnect"}},extension:{step1:{description:"Recomendamos fijar Core a tu barra de tareas para acceder más rápido a tu billetera.",title:"Instala la extensión Core"},step2:{description:"Asegúrate de hacer una copia de seguridad de tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie.",title:"Crear o Importar una Billetera"},step3:{description:"Una vez que configures tu billetera, haz clic a continuación para refrescar el navegador y cargar la extensión.",title:"Refresca tu navegador"}}},fox:{qr_code:{step1:{description:"Recomendamos poner FoxWallet en tu pantalla de inicio para un acceso más rápido.",title:"Abre la aplicación FoxWallet"},step2:{description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie.",title:"Crear o Importar una Billetera"},step3:{description:"Después de escanear, aparecerá una solicitud de conexión para que conectes tu billetera.",title:"Toca el botón de escanear"}}},frontier:{qr_code:{step1:{description:"Recomendamos poner la Billetera Frontier en tu pantalla principal para un acceso más rápido.",title:"Abre la aplicación de la Billetera Frontier"},step2:{description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie.",title:"Crear o Importar una Billetera"},step3:{description:"Después de escanear, aparecerá un mensaje para que conectes tu billetera.",title:"Haz clic en el botón de escaneo"}},extension:{step1:{description:"Recomendamos anclar la billetera Frontier a tu barra de tareas para un acceso más rápido a tu billetera.",title:"Instala la extensión de la billetera Frontier"},step2:{description:"Asegúrese de hacer una copia de seguridad de su billetera utilizando un método seguro. Nunca comparta su frase secreta con nadie.",title:"Crear o Importar una Billetera"},step3:{description:"Una vez que configure su billetera, haga clic a continuación para actualizar el navegador y cargar la extensión.",title:"Actualizar tu navegador"}}},im_token:{qr_code:{step1:{title:"Abrir la aplicación imToken",description:"Pon la aplicación imToken en tu pantalla de inicio para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Crea una nueva billetera o importa una existente."},step3:{title:"Toca el Icono del Escáner en la esquina superior derecha",description:"Elija Nueva Conexión, luego escanee el código QR y confirme el aviso para conectar."}}},metamask:{qr_code:{step1:{title:"Abre la aplicación MetaMask",description:"Recomendamos colocar MetaMask en tu pantalla de inicio para un acceso más rápido."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie."},step3:{title:"Toca el botón de escanear",description:"Después de escanear, aparecerá un aviso de conexión para que conectes tu billetera."}},extension:{step1:{title:"Instala la extensión MetaMask",description:"Recomendamos anclar MetaMask a tu barra de tareas para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrate de hacer una copia de seguridad de tu billetera usando un método seguro. Nunca compartas tu frase secreta con nadie."},step3:{title:"Refresca tu navegador",description:"Una vez que configures tu billetera, haz clic abajo para refrescar el navegador y cargar la extensión."}}},okx:{qr_code:{step1:{title:"Abre la aplicación OKX Wallet",description:"Recomendamos colocar OKX Wallet en tu pantalla de inicio para un acceso más rápido."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrate de respaldar tu billetera usando un método seguro. Nunca compartas tu frase secreta con nadie."},step3:{title:"Toca el botón de escanear",description:"Después de escanear, aparecerá un aviso de conexión para que conectes tu billetera."}},extension:{step1:{title:"Instala la extensión de Billetera OKX",description:"Recomendamos anclar la Billetera OKX a tu barra de tareas para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrate de respaldar tu billetera usando un método seguro. Nunca compartas tu frase secreta con nadie."},step3:{title:"Refresca tu navegador",description:"Una vez que configure su billetera, haga clic abajo para actualizar el navegador y cargar la extensión."}}},omni:{qr_code:{step1:{title:"Abra la aplicación Omni",description:"Agregue Omni a su pantalla de inicio para un acceso más rápido a su billetera."},step2:{title:"Crear o Importar una Billetera",description:"Crear una nueva billetera o importar una existente."},step3:{title:"Toque el icono de QR y escanee",description:"Toca el icono QR en tu pantalla principal, escanea el código y confirma el aviso para conectar."}}},token_pocket:{qr_code:{step1:{title:"Abre la aplicación TokenPocket",description:"Recomendamos colocar TokenPocket en tu pantalla principal para un acceso más rápido."},step2:{title:"Crear o importar una Billetera",description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie."},step3:{title:"Toca el botón de escaneo",description:"Después de escanear, aparecerá una solicitud de conexión para que puedas conectar tu billetera."}},extension:{step1:{title:"Instala la extensión TokenPocket",description:"Recomendamos anclar TokenPocket a tu barra de tareas para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie."},step3:{title:"Actualiza tu navegador",description:"Una vez que configures tu billetera, haz clic a continuación para actualizar el navegador y cargar la extensión."}}},trust:{qr_code:{step1:{title:"Abre la aplicación Trust Wallet",description:"Ubica Trust Wallet en tu pantalla de inicio para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Crea una nueva billetera o importa una existente."},step3:{title:"Toca WalletConnect en Configuraciones",description:"Elige Nueva Conexión, luego escanea el código QR y confirma el aviso para conectar."}},extension:{step1:{title:"Instala la extensión de Trust Wallet",description:"Haz clic en la parte superior derecha de tu navegador y fija Trust Wallet para un fácil acceso."},step2:{title:"Crea o Importa una billetera",description:"Crea una nueva billetera o importa una existente."},step3:{title:"Refresca tu navegador",description:"Una vez que configures Trust Wallet, haz clic abajo para refrescar el navegador y cargar la extensión."}}},uniswap:{qr_code:{step1:{title:"Abre la aplicación Uniswap",description:"Agrega la billetera Uniswap a tu pantalla de inicio para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Crea una nueva billetera o importa una existente."},step3:{title:"Toca el icono QR y escanea",description:"Toca el icono QR en tu pantalla de inicio, escanea el código y confirma el prompt para conectar."}}},zerion:{qr_code:{step1:{title:"Abre la aplicación Zerion",description:"Recomendamos poner Zerion en tu pantalla de inicio para un acceso más rápido."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrate de hacer una copia de seguridad de tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie."},step3:{title:"Toca el botón de escanear",description:"Después de escanear, aparecerá un aviso de conexión para que conectes tu billetera."}},extension:{step1:{title:"Instala la extensión Zerion",description:"Recomendamos anclar Zerion a tu barra de tareas para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrese de respaldar su billetera usando un método seguro. Nunca comparta su frase secreta con nadie."},step3:{title:"Actualiza tu navegador",description:"Una vez que configures tu billetera, haz clic a continuación para actualizar el navegador y cargar la extensión."}}},rainbow:{qr_code:{step1:{title:"Abre la aplicación Rainbow",description:"Recomendamos poner Rainbow en tu pantalla de inicio para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Puedes respaldar fácilmente tu billetera usando nuestra función de respaldo en tu teléfono."},step3:{title:"Toca el botón de escanear",description:"Después de escanear, aparecerá una solicitud de conexión para que conectes tu billetera."}}},enkrypt:{extension:{step1:{description:"Recomendamos anclar la Billetera Enkrypt a tu barra de tareas para un acceso más rápido a tu billetera.",title:"Instala la extensión de Billetera Enkrypt"},step2:{description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie.",title:"Crear o Importar una Billetera"},step3:{description:"Una vez que configures tu billetera, haz clic abajo para refrescar el navegador y cargar la extensión.",title:"Refresca tu navegador"}}},frame:{extension:{step1:{description:"Recomendamos anclar Frame a tu barra de tareas para un acceso más rápido a tu billetera.",title:"Instala Frame y la extensión complementaria"},step2:{description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie.",title:"Crear o Importar una Billetera"},step3:{description:"Una vez que configures tu billetera, haz clic a continuación para refrescar el navegador y cargar la extensión.",title:"Refresca tu navegador"}}},one_key:{extension:{step1:{title:"Instale la extensión de Billetera OneKey",description:"Recomendamos anclar la Billetera OneKey a tu barra de tareas para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrese de respaldar su billetera usando un método seguro. Nunca comparta su frase secreta con nadie."},step3:{title:"Actualiza tu navegador",description:"Una vez que configures tu billetera, haz clic a continuación para actualizar el navegador y cargar la extensión."}}},phantom:{extension:{step1:{title:"Instala la extensión Phantom",description:"Recomendamos fijar Phantom a tu barra de tareas para un acceso más fácil a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrese de respaldar su billetera usando un método seguro. Nunca comparta su frase secreta de recuperación con nadie."},step3:{title:"Actualiza tu navegador",description:"Una vez que configures tu billetera, haz clic abajo para refrescar el navegador y cargar la extensión."}}},rabby:{extension:{step1:{title:"Instala la extensión Rabby",description:"Recomendamos anclar Rabby a tu barra de tareas para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrate de hacer una copia de seguridad de tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie."},step3:{title:"Actualiza tu navegador",description:"Una vez que configures tu billetera, haz clic abajo para actualizar el navegador y cargar la extensión."}}},safeheron:{extension:{step1:{title:"Instala la extensión Core",description:"Recomendamos anclar Safeheron a tu barra de tareas para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie."},step3:{title:"Refresca tu navegador",description:"Una vez que configures tu billetera, haz clic abajo para refrescar el navegador y cargar la extensión."}}},taho:{extension:{step1:{title:"Instala la extensión de Taho",description:"Recomendamos anclar Taho a tu barra de tareas para un acceso más rápido a tu billetera."},step2:{title:"Crea o Importa una Billetera",description:"Asegúrate de respaldar tu billetera utilizando un método seguro. Nunca compartas tu frase secreta con nadie."},step3:{title:"Refresca tu navegador",description:"Una vez que configures tu billetera, haz clic abajo para refrescar el navegador y cargar la extensión."}}},talisman:{extension:{step1:{title:"Instala la extensión de Talisman",description:"Recomendamos anclar Talisman a tu barra de tareas para un acceso más rápido a tu billetera."},step2:{title:"Crea o importa una billetera Ethereum",description:"Asegúrate de respaldar tu billetera usando un método seguro. Nunca compartas tu frase de recuperación con nadie."},step3:{title:"Recarga tu navegador",description:"Una vez que configures tu billetera, haz clic abajo para refrescar el navegador y cargar la extensión."}}},xdefi:{extension:{step1:{title:"Instala la extensión de la billetera XDEFI",description:"Recomendamos anclar XDEFI Wallet a su barra de tareas para un acceso más rápido a su billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrese de respaldar su billetera utilizando un método seguro. Nunca comparta su frase secreta con nadie."},step3:{title:"Actualice su navegador",description:"Una vez que configure su billetera, haga clic abajo para actualizar el navegador y cargar la extensión."}}},zeal:{extension:{step1:{title:"Instale la extensión Zeal",description:"Recomendamos anclar Zeal a su barra de tareas para un acceso más rápido a su billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrese de respaldar su billetera utilizando un método seguro. Nunca comparta su frase secreta con nadie."},step3:{title:"Refrescar tu navegador",description:"Una vez que configures tu billetera, haz clic a continuación para refrescar el navegador y cargar la extensión."}}},safepal:{extension:{step1:{title:"Instale la extensión de la billetera SafePal",description:"Haga clic en la esquina superior derecha de su navegador y ancle SafePal Wallet para un fácil acceso."},step2:{title:"Crear o Importar una billetera",description:"Crea una nueva billetera o importa una existente."},step3:{title:"Refrescar tu navegador",description:"Una vez que configure la Billetera SafePal, haga clic abajo para refrescar el navegador y cargar la extensión."}},qr_code:{step1:{title:"Abra la aplicación Billetera SafePal",description:"Coloque la Billetera SafePal en su pantalla de inicio para un acceso más rápido a su billetera."},step2:{title:"Crear o Importar una Billetera",description:"Crea una nueva billetera o importa una existente."},step3:{title:"Toca WalletConnect en Configuraciones",description:"Elija Nueva Conexión, luego escanee el código QR y confirme el aviso para conectar."}}},desig:{extension:{step1:{title:"Instala la extensión Desig",description:"Recomendamos anclar Desig a tu barra de tareas para acceder más fácilmente a tu cartera."},step2:{title:"Crea una Cartera",description:"Asegúrese de respaldar su billetera utilizando un método seguro. Nunca comparta su frase secreta con nadie."},step3:{title:"Refrescar tu navegador",description:"Una vez que configures tu billetera, haz clic a continuación para refrescar el navegador y cargar la extensión."}}},subwallet:{extension:{step1:{title:"Instala la extensión SubWallet",description:"Recomendamos anclar SubWallet a tu barra de tareas para acceder a tu cartera más rápidamente."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrate de respaldar tu billetera usando un método seguro. Nunca compartas tu frase de recuperación con nadie."},step3:{title:"Refrescar tu navegador",description:"Una vez que configures tu billetera, haz clic a continuación para refrescar el navegador y cargar la extensión."}},qr_code:{step1:{title:"Abre la aplicación SubWallet",description:"Recomendamos colocar SubWallet en tu pantalla principal para un acceso más rápido."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrese de respaldar su billetera utilizando un método seguro. Nunca comparta su frase secreta con nadie."},step3:{title:"Toque el botón de escaneo",description:"Después de escanear, aparecerá un mensaje de conexión para que conecte su billetera."}}},clv:{extension:{step1:{title:"Instala la extensión CLV Wallet",description:"Recomendamos anclar la billetera CLV a tu barra de tareas para un acceso más rápido a tu billetera."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrese de respaldar su billetera utilizando un método seguro. Nunca comparta su frase secreta con nadie."},step3:{title:"Refrescar tu navegador",description:"Una vez que configures tu billetera, haz clic a continuación para refrescar el navegador y cargar la extensión."}},qr_code:{step1:{title:"Abra la aplicación CLV Wallet",description:"Recomendamos colocar la billetera CLV en tu pantalla de inicio para un acceso más rápido."},step2:{title:"Crear o Importar una Billetera",description:"Asegúrese de respaldar su billetera utilizando un método seguro. Nunca comparta su frase secreta con nadie."},step3:{title:"Toque el botón de escaneo",description:"Después de escanear, aparecerá un mensaje de conexión para que conecte su billetera."}}},okto:{qr_code:{step1:{title:"Abra la aplicación Okto",description:"Agrega Okto a tu pantalla de inicio para un acceso rápido"},step2:{title:"Crea una billetera MPC",description:"Crea una cuenta y genera una billetera"},step3:{title:"Toca WalletConnect en Configuraciones",description:"Toca el icono de Escanear QR en la parte superior derecha y confirma el mensaje para conectar."}}},ledger:{desktop:{step1:{title:"Abra la aplicación Ledger Live",description:"Recomendamos poner Ledger Live en su pantalla de inicio para un acceso más rápido."},step2:{title:"Configure su Ledger",description:"Configure un nuevo Ledger o conéctese a uno existente."},step3:{title:"Conectar",description:"Después de escanear, aparecerá un aviso de conexión para que conectes tu billetera."}},qr_code:{step1:{title:"Abra la aplicación Ledger Live",description:"Recomendamos poner Ledger Live en su pantalla de inicio para un acceso más rápido."},step2:{title:"Configure su Ledger",description:"Puedes sincronizar con la aplicación de escritorio o conectar tu Ledger."},step3:{title:"Escanea el código",description:"Toca WalletConnect y luego cambia a Scanner. Después de escanear, aparecerá un aviso de conexión para que conectes tu billetera."}}}},Sg={connect_wallet:Ssu,intro:Psu,sign_in:Tsu,connect:Osu,connect_scan:Isu,connector_group:Nsu,get:Rsu,get_options:zsu,get_mobile:jsu,get_instructions:Msu,chains:Lsu,profile:Usu,wallet_connectors:$su},Wsu={label:"Connecter le portefeuille"},qsu={title:"Qu'est-ce qu'un portefeuille?",description:"Un portefeuille est utilisé pour envoyer, recevoir, stocker et afficher des actifs numériques. C'est aussi une nouvelle façon de se connecter, sans avoir besoin de créer de nouveaux comptes et mots de passe sur chaque site.",digital_asset:{title:"Un foyer pour vos actifs numériques",description:"Les portefeuilles sont utilisés pour envoyer, recevoir, stocker et afficher des actifs numériques comme Ethereum et les NFTs."},login:{title:"Une nouvelle façon de se connecter",description:"Au lieu de créer de nouveaux comptes et mots de passe sur chaque site Web, connectez simplement votre portefeuille."},get:{label:"Obtenir un portefeuille"},learn_more:{label:"En savoir plus"}},Hsu={label:"Vérifiez votre compte",description:"Pour terminer la connexion, vous devez signer un message dans votre portefeuille pour vérifier que vous êtes le propriétaire de ce compte.",message:{send:"Envoyer le message",preparing:"Préparation du message...",cancel:"Annuler",preparing_error:"Erreur lors de la préparation du message, veuillez réessayer!"},signature:{waiting:"En attente de la signature...",verifying:"Vérification de la signature...",signing_error:"Erreur lors de la signature du message, veuillez réessayer!",verifying_error:"Erreur lors de la vérification de la signature, veuillez réessayer!",oops_error:"Oups, quelque chose a mal tourné!"}},Gsu={label:"Connecter",title:"Connecter un portefeuille",new_to_ethereum:{description:"Nouveau aux portefeuilles Ethereum?",learn_more:{label:"En savoir plus"}},learn_more:{label:"En savoir plus"},recent:"Récents",status:{opening:"Ouverture %{wallet}...",not_installed:"%{wallet} n'est pas installé",not_available:"%{wallet} n'est pas disponible",confirm:"Confirmez la connexion dans l'extension"},secondary_action:{get:{description:"Vous n'avez pas de %{wallet}?",label:"OBTENIR"},install:{label:"INSTALLER"},retry:{label:"RÉESSAYER"}},walletconnect:{description:{full:"Vous avez besoin du modal officiel de WalletConnect ?",compact:"Besoin du modal de WalletConnect ?"},open:{label:"OUVRIR"}}},Qsu={title:"Scannez avec %{wallet}",fallback_title:"Scannez avec votre téléphone"},Ksu={recommended:"Recommandé",other:"Autre",popular:"Populaire",more:"Plus",others:"Autres"},Vsu={title:"Obtenez un portefeuille",action:{label:"OBTENIR"},mobile:{description:"Portefeuille mobile"},extension:{description:"Extension de navigateur"},mobile_and_extension:{description:"Portefeuille mobile et extension"},mobile_and_desktop:{description:"Portefeuille mobile et de bureau"},looking_for:{title:"Ce n'est pas ce que vous cherchez ?",mobile:{description:"Sélectionnez un portefeuille sur l'écran principal pour commencer avec un autre fournisseur de portefeuille."},desktop:{compact_description:"Sélectionnez un portefeuille sur l'écran principal pour commencer avec un autre fournisseur de portefeuille.",wide_description:"Sélectionnez un portefeuille sur la gauche pour commencer avec un autre fournisseur de portefeuille."}}},Jsu={title:"Commencez avec %{wallet}",short_title:"Obtenez %{wallet}",mobile:{title:"%{wallet} pour mobile",description:"Utilisez le portefeuille mobile pour explorer le monde d'Ethereum.",download:{label:"Obtenez l'application"}},extension:{title:"%{wallet} pour %{browser}",description:"Accédez à votre portefeuille directement depuis votre navigateur web préféré.",download:{label:"Ajouter à %{browser}"}},desktop:{title:"%{wallet} pour %{platform}",description:"Accédez à votre portefeuille nativement depuis votre puissant ordinateur de bureau.",download:{label:"Ajouter à %{platform}"}}},Zsu={title:"Installer %{wallet}",description:"Scannez avec votre téléphone pour télécharger sur iOS ou Android",continue:{label:"Continuer"}},Ysu={mobile:{connect:{label:"Connecter"},learn_more:{label:"En savoir plus"}},extension:{refresh:{label:"Rafraîchir"},learn_more:{label:"En savoir plus"}},desktop:{connect:{label:"Connecter"},learn_more:{label:"En savoir plus"}}},Xsu={title:"Changer de Réseaux",wrong_network:"Mauvais réseau détecté, changez ou déconnectez-vous pour continuer.",confirm:"Confirmer dans le portefeuille",switching_not_supported:"Votre portefeuille ne supporte pas le changement de réseaux depuis %{appName}. Essayez de changer de réseau depuis votre portefeuille.",switching_not_supported_fallback:"Votre portefeuille ne prend pas en charge le changement de réseaux à partir de cette application. Essayez de changer de réseau à partir de votre portefeuille à la place.",disconnect:"Déconnecter",connected:"Connecté"},u4u={disconnect:{label:"Déconnecter"},copy_address:{label:"Copier l'adresse",copied:"Copié !"},explorer:{label:"Voir plus sur l'explorateur"},transactions:{description:"%{appName} transactions apparaîtront ici...",description_fallback:"Vos transactions apparaîtront ici...",recent:{title:"Transactions Récentes"},clear:{label:"Tout supprimer"}}},e4u={argent:{qr_code:{step1:{description:"Mettez Argent sur votre écran d'accueil pour un accès plus rapide à votre portefeuille.",title:"Ouvrez l'application Argent"},step2:{description:"Créez un portefeuille et un nom d'utilisateur, ou importez un portefeuille existant.",title:"Créer ou Importer un Portefeuille"},step3:{description:"Après avoir numérisé, une invite de connexion apparaîtra pour vous permettre de connecter votre portefeuille.",title:"Appuyez sur le bouton Scan QR"}}},bifrost:{qr_code:{step1:{description:"Nous vous recommandons de mettre le portefeuille Bifrost sur votre écran d'accueil pour un accès plus rapide.",title:"Ouvrez l'application Bifrost Wallet"},step2:{description:"Créez ou importez un portefeuille en utilisant votre phrase de récupération.",title:"Créer ou Importer un portefeuille"},step3:{description:"Après votre scan, une invite de connexion apparaîtra pour vous permettre de connecter votre portefeuille.",title:"Appuyez sur le bouton de scan"}}},bitget:{qr_code:{step1:{description:"Nous vous recommandons de placer Bitget Wallet sur votre écran d'accueil pour un accès plus rapide.",title:"Ouvrez l'application Bitget Wallet"},step2:{description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque.",title:"Créer ou Importer un portefeuille"},step3:{description:"Après le scan, une incitation de connexion apparaîtra pour vous permettre de connecter votre portefeuille.",title:"Appuyez sur le bouton de scan"}},extension:{step1:{description:"Nous vous recommandons d'épingler Bitget Wallet à votre barre des tâches pour un accès plus rapide à votre portefeuille.",title:"Installez l'extension de portefeuille Bitget"},step2:{description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec personne.",title:"Créez ou Importez un portefeuille"},step3:{description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour actualiser le navigateur et charger l'extension.",title:"Rafraîchissez votre navigateur"}}},bitski:{extension:{step1:{description:"Nous recommandons d'épingler Bitski à votre barre des tâches pour un accès plus rapide à votre portefeuille.",title:"Installez l'extension Bitski"},step2:{description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec qui que ce soit.",title:"Créer ou Importer un portefeuille"},step3:{description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension.",title:"Rafraîchissez votre navigateur"}}},coin98:{qr_code:{step1:{description:"Nous vous recommandons de placer Coin98 Wallet sur votre écran d'accueil pour un accès plus rapide à votre portefeuille.",title:"Ouvrez l'application Coin98 Wallet"},step2:{description:"Vous pouvez facilement sauvegarder votre portefeuille en utilisant notre fonction de sauvegarde sur votre téléphone.",title:"Créer ou Importer un portefeuille"},step3:{description:"Après que vous ayez scanné, une invite de connexion apparaîtra pour vous permettre de connecter votre portefeuille.",title:"Appuyez sur le bouton WalletConnect"}},extension:{step1:{description:"Cliquez en haut à droite de votre navigateur et épinglez Coin98 Wallet pour un accès facile.",title:"Installez l'extension Coin98 Wallet"},step2:{description:"Créez un nouveau portefeuille ou importez-en un existant.",title:"Créer ou Importer un portefeuille"},step3:{description:"Une fois que vous avez configuré Coin98 Wallet, cliquez ci-dessous pour actualiser le navigateur et charger l'extension.",title:"Rafraîchissez votre navigateur"}}},coinbase:{qr_code:{step1:{description:"Nous recommandons de placer Coinbase Wallet sur votre écran d'accueil pour un accès plus rapide.",title:"Ouvrez l'application Coinbase Wallet"},step2:{description:"Vous pouvez facilement sauvegarder votre portefeuille en utilisant la fonction de sauvegarde cloud.",title:"Créer ou Importer un portefeuille"},step3:{description:"Après avoir scanné, une invite de connexion s'affichera pour que vous puissiez connecter votre portefeuille.",title:"Appuyez sur le bouton de scan"}},extension:{step1:{description:"Nous recommandons d'épingler Coinbase Wallet à votre barre des tâches pour un accès plus rapide à votre portefeuille.",title:"Installez l'extension Coinbase Wallet"},step2:{description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sûre. Ne partagez jamais votre phrase secrète avec quiconque.",title:"Créer ou Importer un portefeuille"},step3:{description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour actualiser le navigateur et charger l'extension.",title:"Actualisez votre navigateur"}}},core:{qr_code:{step1:{description:"Nous recommandons de placer Core sur votre écran d'accueil pour un accès plus rapide à votre portefeuille.",title:"Ouvrez l'application Core"},step2:{description:"Vous pouvez facilement sauvegarder votre portefeuille en utilisant notre fonction de sauvegarde sur votre téléphone.",title:"Créer ou Importer un portefeuille"},step3:{description:"Après avoir scanné, une invite de connexion apparaîtra pour vous permettre de connecter votre portefeuille.",title:"Appuyez sur le bouton WalletConnect"}},extension:{step1:{description:"Nous recommandons d'épingler Core à votre barre des tâches pour un accès plus rapide à votre portefeuille.",title:"Installez l'extension Core"},step2:{description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque.",title:"Créez ou Importer un Portefeuille"},step3:{description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension.",title:"Rafraîchissez votre navigateur"}}},fox:{qr_code:{step1:{description:"Nous recommandons de mettre FoxWallet sur votre écran d'accueil pour un accès plus rapide.",title:"Ouvrez l'application FoxWallet"},step2:{description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec personne.",title:"Créer ou Importer un portefeuille"},step3:{description:"Après avoir scanné, une invitation à la connexion apparaîtra pour vous permettre de connecter votre portefeuille.",title:"Appuyez sur le bouton de scan"}}},frontier:{qr_code:{step1:{description:"Nous vous recommandons de placer le portefeuille Frontier sur votre écran d'accueil pour un accès plus rapide.",title:"Ouvrez l'application Frontier Wallet"},step2:{description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec personne.",title:"Créer ou Importer un portefeuille"},step3:{description:"Après avoir scanné, une invite de connexion apparaîtra pour vous permettre de connecter votre portefeuille.",title:"Appuyez sur le bouton de scan"}},extension:{step1:{description:"Nous recommandons d'épingler Frontier Wallet à votre barre des tâches pour un accès plus rapide à votre portefeuille.",title:"Installez l'extension Frontier Wallet"},step2:{description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec personne.",title:"Créez ou importez un portefeuille"},step3:{description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour actualiser le navigateur et charger l'extension.",title:"Rafraîchissez votre navigateur"}}},im_token:{qr_code:{step1:{title:"Ouvrez l'application imToken",description:"Placez l'application imToken sur votre écran d'accueil pour un accès plus rapide à votre portefeuille."},step2:{title:"Créez ou importez un portefeuille",description:"Créez un nouveau portefeuille ou importez-en un existant ."},step3:{title:"Appuyez sur l'icône du scanner dans le coin supérieur droit",description:"Choisissez Nouvelle Connexion, puis scannez le code QR et confirmez l'invite pour vous connecter."}}},metamask:{qr_code:{step1:{title:"Ouvrez l'application MetaMask",description:"Nous vous recommandons de mettre MetaMask sur votre écran d'accueil pour un accès plus rapide."},step2:{title:"Créer ou Importer un Portefeuille",description:"Veillez à sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec qui que ce soit."},step3:{title:"Appuyez sur le bouton de scan",description:"Après avoir scanné, une invite de connexion apparaîtra pour vous permettre de connecter votre portefeuille."}},extension:{step1:{title:"Installez l’extension de MetaMask",description:"Nous recommandons d'épingler MetaMask à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}}},okx:{qr_code:{step1:{title:"Ouvrez l'application OKX Wallet",description:"Nous recommandons de mettre OKX Wallet sur votre écran d'accueil pour un accès plus rapide."},step2:{title:"Créer ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque."},step3:{title:"Appuyez sur le bouton de numérisation",description:"Après avoir numérisé, une invite de connexion apparaîtra pour vous permettre de connecter votre portefeuille."}},extension:{step1:{title:"Installez l'extension de portefeuille OKX",description:"Nous vous recommandons d'épingler le portefeuille OKX à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour actualiser le navigateur et charger l'extension."}}},omni:{qr_code:{step1:{title:"Ouvrez l'application Omni",description:"Ajoutez Omni à votre écran d'accueil pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un Portefeuille",description:"Créez un nouveau portefeuille ou importez-en un existant."},step3:{title:"Touchez l'icône QR et scannez",description:"Appuyez sur l'icône QR sur votre écran d'accueil, scannez le code et confirmez l'invite pour vous connecter."}}},token_pocket:{qr_code:{step1:{title:"Ouvrez l'application TokenPocket",description:"Nous vous recommandons de mettre TokenPocket sur votre écran d'accueil pour un accès plus rapide."},step2:{title:"Créez ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille à l'aide d'une méthode sécurisée. Ne partagez jamais votre phrase secrète avec qui que ce soit."},step3:{title:"Appuyez sur le bouton de scan",description:"Après votre scan, une invite de connexion apparaîtra pour vous permettre de connecter votre portefeuille."}},extension:{step1:{title:"Installez l'extension TokenPocket",description:"Nous recommandons d'épingler TokenPocket à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec qui que ce soit."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}}},trust:{qr_code:{step1:{title:"Ouvrez l'application Trust Wallet",description:"Placez Trust Wallet sur votre écran d'accueil pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un portefeuille",description:"Créer un nouveau portefeuille ou en importer un existant."},step3:{title:"Appuyez sur WalletConnect dans les paramètres",description:"Choisissez Nouvelle Connexion, puis scannez le code QR et confirmez l'invite pour vous connecter."}},extension:{step1:{title:"Installez l'extension Trust Wallet",description:"Cliquez en haut à droite de votre navigateur et épinglez Trust Wallet pour un accès facile."},step2:{title:"Créer ou importer un portefeuille",description:"Créer un nouveau portefeuille ou en importer un existant."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré Trust Wallet, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}}},uniswap:{qr_code:{step1:{title:"Ouvrez l'application Uniswap",description:"Ajoutez Uniswap Wallet à votre écran d'accueil pour un accès plus rapide à votre portefeuille."},step2:{title:"Créez ou importez un portefeuille",description:"Créez un nouveau portefeuille ou importez-en un existant."},step3:{title:"Tapez sur l'icône QR et scannez",description:"Touchez l'icône QR sur votre écran d'accueil, scannez le code et confirmez l'invite pour vous connecter."}}},zerion:{qr_code:{step1:{title:"Ouvrez l'application Zerion",description:"Nous vous recommandons de mettre Zerion sur votre écran d'accueil pour un accès plus rapide."},step2:{title:"Créer ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec personne."},step3:{title:"Appuyez sur le bouton de scan",description:"Une fois que vous avez scanné, une invite de connexion apparaîtra pour que vous puissiez connecter votre portefeuille."}},extension:{step1:{title:"Installer l'extension Zerion",description:"Nous recommandons d'épingler Zerion à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créez ou Importez un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}}},rainbow:{qr_code:{step1:{title:"Ouvre l'application Rainbow",description:"Nous vous recommandons de mettre Rainbow sur votre écran d'accueil pour un accès plus rapide à votre portefeuille."},step2:{title:"Créez ou Importez un portefeuille",description:"Vous pouvez facilement sauvegarder votre portefeuille en utilisant notre fonction de sauvegarde sur votre téléphone."},step3:{title:"Appuyez sur le bouton de scan",description:"Après avoir scanné, une invite de connexion apparaîtra pour que vous connectiez votre portefeuille."}}},enkrypt:{extension:{step1:{description:"Nous vous recommandons d'épingler Enkrypt Wallet à votre barre des tâches pour un accès plus rapide à votre portefeuille.",title:"Installez l'extension Enkrypt Wallet"},step2:{description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quelqu'un.",title:"Créer ou Importer un portefeuille"},step3:{description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l’extension.",title:"Rafraîchissez votre navigateur"}}},frame:{extension:{step1:{description:"Nous vous recommandons d'épingler Frame à votre barre des tâches pour un accès plus rapide à votre portefeuille.",title:"Installez Frame & l'extension complémentaire"},step2:{description:"Assurez-vous de sauvegarder votre portefeuille à l'aide d'une méthode sécurisée. Ne partagez jamais votre phrase secrète avec personne.",title:"Créer ou Importer un portefeuille"},step3:{description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension.",title:"Rafraîchissez votre navigateur"}}},one_key:{extension:{step1:{title:"Installez l'extension OneKey Wallet",description:"Nous vous recommandons d'épingler OneKey Wallet à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec personne."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}}},phantom:{extension:{step1:{title:"Installez l'extension Phantom",description:"Nous vous recommandons d'épingler Phantom à votre barre des tâches pour un accès plus facile à votre portefeuille."},step2:{title:"Créer ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase de récupération secrète avec personne."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}}},rabby:{extension:{step1:{title:"Installez l'extension Rabby",description:"Nous recommandons d'épingler Rabby à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec qui que ce soit."},step3:{title:"Actualisez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour actualiser le navigateur et charger l'extension."}}},safeheron:{extension:{step1:{title:"Installez l'extension Core",description:"Nous recommandons d'épingler Safeheron à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quelqu'un."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}}},taho:{extension:{step1:{title:"Installez l'extension Taho",description:"Nous vous recommandons d'épingler Taho à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créez ou Importez un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quelqu'un."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}}},talisman:{extension:{step1:{title:"Installez l'extension Talisman",description:"Nous vous recommandons d'épingler Talisman à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou importer un portefeuille Ethereum",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase de récupération avec personne."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}}},xdefi:{extension:{step1:{title:"Installez l'extension du portefeuille XDEFI",description:"Nous vous recommandons d'épingler XDEFI Wallet à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec qui que ce soit."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}}},zeal:{extension:{step1:{title:"Installez l'extension Zeal",description:"Nous vous recommandons d'épingler Zeal à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un Portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour actualiser le navigateur et charger l'extension."}}},safepal:{extension:{step1:{title:"Installez l'extension SafePal Wallet",description:"Cliquez en haut à droite de votre navigateur et épinglez SafePal Wallet pour un accès facile."},step2:{title:"Créer ou Importer un portefeuille",description:"Créez un nouveau portefeuille ou importez-en un existant."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré SafePal Wallet, cliquez ci-dessous pour rafraîchir le navigateur et charger l'extension."}},qr_code:{step1:{title:"Ouvrez l'application SafePal Wallet",description:"Mettez SafePal Wallet sur votre écran d'accueil pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un Portefeuille",description:"Créez un nouveau portefeuille ou importez-en un existant."},step3:{title:"Appuyez sur WalletConnect dans les paramètres",description:"Choisissez Nouvelle Connexion, puis scannez le code QR et confirmez l'invite pour vous connecter."}}},desig:{extension:{step1:{title:"Installez l'extension Desig",description:"Nous vous recommandons d'épingler Desig à votre barre des tâches pour un accès plus facile à votre portefeuille."},step2:{title:"Créer un Portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour actualiser le navigateur et charger l'extension."}}},subwallet:{extension:{step1:{title:"Installez l'extension SubWallet",description:"Nous vous recommandons d'épingler SubWallet à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un Portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase de récupération avec personne."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour actualiser le navigateur et charger l'extension."}},qr_code:{step1:{title:"Ouvrez l'application SubWallet",description:"Nous vous recommandons de mettre SubWallet sur votre écran d'accueil pour un accès plus rapide."},step2:{title:"Créer ou Importer un Portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque."},step3:{title:"Appuyez sur le bouton de scan",description:"Après avoir numérisé, une invite de connexion apparaîtra pour vous permettre de connecter votre portefeuille."}}},clv:{extension:{step1:{title:"Installez l'extension CLV Wallet",description:"Nous vous recommandons d'épingler CLV Wallet à votre barre des tâches pour un accès plus rapide à votre portefeuille."},step2:{title:"Créer ou Importer un Portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque."},step3:{title:"Rafraîchissez votre navigateur",description:"Une fois que vous avez configuré votre portefeuille, cliquez ci-dessous pour actualiser le navigateur et charger l'extension."}},qr_code:{step1:{title:"Ouvrez l'application CLV Wallet",description:"Nous vous recommandons de mettre CLV Wallet sur votre écran d'accueil pour un accès plus rapide."},step2:{title:"Créer ou Importer un Portefeuille",description:"Assurez-vous de sauvegarder votre portefeuille en utilisant une méthode sécurisée. Ne partagez jamais votre phrase secrète avec quiconque."},step3:{title:"Appuyez sur le bouton de scan",description:"Après avoir numérisé, une invite de connexion apparaîtra pour vous permettre de connecter votre portefeuille."}}},okto:{qr_code:{step1:{title:"Ouvrez l'application Okto",description:"Ajoutez Okto à votre écran d'accueil pour un accès rapide"},step2:{title:"Créer un portefeuille MPC",description:"Créez un compte et générez un portefeuille"},step3:{title:"Appuyez sur WalletConnect dans les paramètres",description:"Touchez l'icône 'Scan QR' en haut à droite et confirmez l'invite pour vous connecter."}}},ledger:{desktop:{step1:{title:"Ouvrez l'application Ledger Live",description:"Nous vous recommandons de mettre Ledger Live sur votre écran d'accueil pour un accès plus rapide."},step2:{title:"Configurez votre Ledger",description:"Configurez un nouveau Ledger ou connectez-vous à un existant."},step3:{title:"Connecter",description:"Une fois que vous avez scanné, une invite de connexion apparaîtra pour que vous puissiez connecter votre portefeuille."}},qr_code:{step1:{title:"Ouvrez l'application Ledger Live",description:"Nous vous recommandons de mettre Ledger Live sur votre écran d'accueil pour un accès plus rapide."},step2:{title:"Configurez votre Ledger",description:"Vous pouvez soit synchroniser avec l'application de bureau, soit connecter votre Ledger."},step3:{title:"Scannez le code",description:"Appuyez sur WalletConnect puis passez au Scanner. Une fois que vous avez scanné, une invite de connexion apparaîtra pour que vous puissiez connecter votre portefeuille."}}}},Pg={connect_wallet:Wsu,intro:qsu,sign_in:Hsu,connect:Gsu,connect_scan:Qsu,connector_group:Ksu,get:Vsu,get_options:Jsu,get_mobile:Zsu,get_instructions:Ysu,chains:Xsu,profile:u4u,wallet_connectors:e4u},t4u={label:"वॉलेट को कनेक्ट करें"},n4u={title:"वॉलेट क्या है?",description:"एक वॉलेट का उपयोग डिजिटल संपत्तियों को भेजने, प्राप्त करने, संग्रहित करने और प्रदर्शित करने के लिए किया जाता है। यह एक नया तरीका भी है लॉग इन करने का, हर वेबसाइट पर नए खाते और पासवर्ड बनाने की जरूरत के बिना।",digital_asset:{title:"अपने डिजिटल संपत्तियों के लिए एक घर",description:"वॉलेट का उपयोग Ethereum और NFTs जैसी डिजिटल संपत्तियों को भेजने, प्राप्त करने, संग्रहित करने और प्रदर्शित करने के लिए किया जाता है."},login:{title:"लॉग इन करने का एक नया तरीका",description:"हर वेबसाइट पर नए खाते और पासवर्ड बनाने की बजाय, बस अपना वॉलेट कनेक्ट करें."},get:{label:"एक वॉलेट प्राप्त करें"},learn_more:{label:"और जानें"}},r4u={label:"अपने खाते की पुष्टि करें",description:"जुड़ने को पूरा करने के लिए, आपको अपने बटुए में एक संदेश पर हस्ताक्षर करना होगा ताकि पुष्टि हो सके कि आप इस खाते के मालिक हैं।",message:{send:"संदेश भेजें",preparing:"संदेश तैयार कर रहा है...",cancel:"रद्द करें",preparing_error:"संदेश तैयार करते समय त्रुटि, कृपया पुनः प्रयास करें!"},signature:{waiting:"हस्ताक्षर का इंतजार कर रहा है...",verifying:"हस्ताक्षर की पुष्टि की जा रही है...",signing_error:"संदेश पर हस्ताक्षर करते समय त्रुटि, कृपया पुनः प्रयास करें!",verifying_error:"हस्ताक्षर की पुष्टि में त्रुटि, कृपया पुनः प्रयास करें!",oops_error:"ओह, कुछ गलत हो गया!"}},i4u={label:"कनेक्ट करें",title:"वॉलेट को कनेक्ट करें",new_to_ethereum:{description:"Ethereum वॉलेट्स में नए हैं?",learn_more:{label:"और जानें"}},learn_more:{label:"और जानें।"},recent:"हाल ही में",status:{opening:"%{wallet}खोल रहा है...",not_installed:"%{wallet} स्थापित नहीं है",not_available:"%{wallet} उपलब्ध नहीं है",confirm:"एक्सटेंशन में कनेक्शन की पुष्टि करें"},secondary_action:{get:{description:"क्या आपके पास %{wallet}नहीं है ?",label:"प्राप्त करें"},install:{label:"स्थापित करें"},retry:{label:"पुनः प्रयास करें"}},walletconnect:{description:{full:"क्या आपको आधिकारिक WalletConnect मोडल की आवश्यकता है?",compact:"क्या आपको WalletConnect मोडल की आवश्यकता है?"},open:{label:"खोलें"}}},a4u={title:"स्कैन करें विथ %{wallet}",fallback_title:"अपने फोन से स्कैन करें"},s4u={recommended:"अनुशंसित",other:"अन्य",popular:"लोकप्रिय",more:"अधिक",others:"अन्य लोग"},o4u={title:"एक वॉलेट प्राप्त करें",action:{label:"प्राप्त करें"},mobile:{description:"मोबाइल वॉलेट"},extension:{description:"ब्राउज़र एक्सटेंशन"},mobile_and_extension:{description:"मोबाइल वॉलेट और एक्सटेंशन"},mobile_and_desktop:{description:"मोबाइल और डेस्कटॉप वॉलेट"},looking_for:{title:"क्या आपको जो चाहिए वह नहीं मिल रहा है?",mobile:{description:"मुख्य स्क्रीन पर एक बटुआ चुनें ताकि आप एक अलग बटुआ प्रदाता के साथ शुरू कर सकें।"},desktop:{compact_description:"मुख्य स्क्रीन पर एक बटुआ चुनें ताकि आप एक अलग बटुआ प्रदाता के साथ शुरू कर सकें।",wide_description:"बाएं एक बटुआ चुनें ताकि आप एक अलग बटुआ प्रदाता के साथ शुरू कर सकें।"}}},l4u={title:"%{wallet}के साथ शुरू करें",short_title:"%{wallet}प्राप्त करें",mobile:{title:"मोबाइल के लिए %{wallet}",description:"मोबाइल वॉलेट का उपयोग करके Ethereum की दुनिया का अन्वेषण करें।",download:{label:"ऐप प्राप्त करें"}},extension:{title:"%{wallet} के लिए %{browser}",description:"अपने पसंदीदा वेब ब्राउज़र से अपने वॉलेट तक पहुंचें।",download:{label:"करें जोड़ें %{browser}"}},desktop:{title:"%{wallet} के लिए %{platform}",description:"अपने शक्तिशाली डेस्कटॉप से आपके वॉलेट की स्वतंत्रता द्वारा पहुंच।",download:{label:"को जोड़ें %{platform}"}}},c4u={title:"स्थापित करें %{wallet}",description:"iOS या Android पर डाउनलोड करने के लिए अपने फोन से स्कैन करें",continue:{label:"जारी रखें"}},E4u={mobile:{connect:{label:"जोड़ें"},learn_more:{label:"और जानें"}},extension:{refresh:{label:"ताज़ा करें"},learn_more:{label:"और जानें"}},desktop:{connect:{label:"कनेक्ट करें"},learn_more:{label:"और जानें"}}},d4u={title:"नेटवर्क स्विच करें",wrong_network:"गलत नेटवर्क का पता चला, जारी रखने के लिए स्विच करें या कनेक्ट करें।",confirm:"वॉलेट में पुष्टि करें",switching_not_supported:"आपका वॉलेट नेटवर्क्स को %{appName}से स्विच करना समर्थन नहीं करता . बजाय अपने वॉलेट के भीतर से नेटवर्क स्विच करने का प्रयास करें।",switching_not_supported_fallback:"आपका वॉलेट इस एप से नेटवर्क्स स्विच करने का समर्थन नहीं करता। बजाय उसके, अपना वॉलेट द्वारा नेटवर्क्स स्विच करने की कोशिश करें।",disconnect:"डिकनेक्ट",connected:"कनेक्ट किया गया"},f4u={disconnect:{label:"डिकनेक्ट"},copy_address:{label:"पता कॉपी करें",copied:"कॉपी कर दिया गया!"},explorer:{label:"एक्सप्लोरर पर अधिक देखें"},transactions:{description:"%{appName} लेन - देन यहां दिखाई देंगे...",description_fallback:"आपके लेन-देन यहां दिखाई देंगे...",recent:{title:"हाल के लेन - देन"},clear:{label:"सभी को हटाएं"}}},p4u={argent:{qr_code:{step1:{description:"अपने वॉलेट को जल्दी से एक्सेस करने के लिए आपके होम स्क्रीन पर Argent डालें।",title:"Argent ऐप खोलें"},step2:{description:"वॉलेट और उपयोगकर्ता नाम बनाएं, या मौजूदा वॉलेट को आयात करें।",title:"वॉलेट बनाएं या आयात करें"},step3:{description:"जैसे ही आप स्कैन करेंगे, एक कनेक्शन संकेत आपके वॉलेट को कनेक्ट करने के लिए प्रकट होगा।",title:"QR स्कैन बटन को टैप करें"}}},bifrost:{qr_code:{step1:{description:"हम आपको सलाह देते हैं कि Bifrost Wallet को अपने होम स्क्रीन पर लगाएं, ताकि त्वरित एक्सेस को सुनिश्चित किया जा सके।",title:"Bifrost Wallet ऐप को खोलें"},step2:{description:"अपने रिकवरी फ़्रेज़ का उपयोग करके एक वॉलेट बनाएं या इंपोर्ट करें।",title:"वॉलेट बनाएं या इंपोर्ट करें"},step3:{description:"स्कैन करने के बाद, आपके वॉलेट को कनेक्ट करने के लिए एक कनेक्शन संकेत दिखाई देगा।",title:"स्कैन बटन को टैप करें"}}},bitget:{qr_code:{step1:{description:"हम इसे सुझाव देते हैं कि आप अपने होम स्क्रीन पर Bitget वॉलेट को रखें ताकि जल्दी एक्सेस कर सकें।",title:"Bitget वॉलेट एप को खोलें"},step2:{description:"अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेने के लिए सुनिश्चित करें। किसी के साथ भी अपना गुप्त वाक्यांश साझा न करें।",title:"वॉलेट बनाएं या आयात करें"},step3:{description:"स्कैन करने के बाद, आपके वॉलेट को कनेक्ट करने का एक संकेत दिखाई देगा।",title:"स्कैन बटन पर टैप करें"}},extension:{step1:{description:"हम इसे सुझाव देते हैं कि आप Bitget वॉलेट को आपके टास्कबार में पिन करें ताकि आपके वॉलेट तक जल्दी पहुंच सकें।",title:"Bitget Wallet एक्सटेंशन स्थापित करें"},step2:{description:"सुनिश्चित करें कि आप अपने वॉलेट का बैकअप किसी सुरक्षित तरीके से ले रहे हैं। अपनी गुप्त वाक्यांश को कभी किसी के साथ साझा न करें।",title:"एक वॉलेट बनाएं या आयात करें"},step3:{description:"एक बार जब आप अपना वॉलेट सेटअप कर लेते हैं, तो नीचे क्लिक करें ताकि ब्राउज़र को ताज़ा करें और एक्सटेंशन लोड करें।",title:"अपने ब्राउज़र को ताज़ा करें"}}},bitski:{extension:{step1:{description:"हम आपको अपने वॉलेट तक जल्दी पहुंचने के लिए Bitski को अपने टास्कबार में पिन करने की सलाह देते हैं।",title:"Bitski एक्सटेंशन स्थापित करें"},step2:{description:"सुनिश्चित करें कि आप एक सुरक्षित तरीके से अपने वॉलेट का बैकअप बना रहे हैं। कभी भी किसी के साथ अपने गोपनीय वाक्यांश को साझा न करें।",title:"एक वॉलेट बनाएं या आयात करें"},step3:{description:"एक बार जब आप अपना वॉलेट सेट कर लेते हैं, तो ब्राउज़र को ताज़ा करने और एक्सटेंशन को लोड करने के लिए नीचे क्लिक करें।",title:"अपने ब्राउज़र को ताज़ा करें"}}},coin98:{qr_code:{step1:{description:"हम आपके वॉलेट तक तेजी से पहुंचने के लिए अपने होम स्क्रीन पर Coin98 वॉलेट रखने की सलाह देते हैं।",title:"Coin98 वॉलेट ऐप को खोलें"},step2:{description:"आप अपने फोन पर हमारे बैकअप फीचर का उपयोग करके आसानी से अपने वॉलेट का बैकअप कर सकते हैं।",title:"वॉलेट बनाएं या आयात करें"},step3:{description:"स्कैन करने के बाद, आपके वॉलेट को कनेक्ट करने के लिए एक कनेक्शन प्रांप्ट दिखाई देगा।",title:"WalletConnect बटन पर टैप करें"}},extension:{step1:{description:"अपने ब्राउज़र के ऊपरी दाएं हिस्से पर क्लिक करें और आसानी से पहुंच के लिए Coin98 वॉलेट को पिन करें।",title:"Coin98 वॉलेट एक्सटेंशन स्थापित करें"},step2:{description:"नया बटुआ बनाएं या मौजूदा को आयात करें।",title:"एक बटुआ बनाएं या आयात करें"},step3:{description:"एक बार जब आप Coin98 वॉलेट सेट करते हैं, तो नीचे क्लिक करके ब्राउजर को ताजा करें और एक्सटेंशन को लोड करें।",title:"अपने ब्राउज़र को ताज़ा करें"}}},coinbase:{qr_code:{step1:{description:"हम आपको सलाह देते हैं कि आपकी मुख्य बिल्ड स्क्रीन पर Coinbase वॉलेट को रखें जिससे आपकी पहुंच तेज हो।",title:"Coinbase वॉलेट ऐप खोलें"},step2:{description:"आप बादल बैकअप सुविधा का उपयोग करके आसानी से अपने वॉलेट का बैकअप ले सकते हैं।",title:"एक वॉलेट बनाएं या आयात करें"},step3:{description:"जैसे ही आप स्कैन करते हैं, आपको अपने वॉलेट से कनेक्ट करने के लिए एक कनेक्शन संकेत दिखाई देगा।",title:"स्कैन बटन को छूना"}},extension:{step1:{description:"हमारा सिफारिश है कि आप अपने वॉलेट तक जल्दी पहुंचने के लिए Coinbase वॉलेट को अपने टास्कबार पर पिन पर रखें।",title:"Coinbase वॉलेट एक्सटेंशन स्थापित करें"},step2:{description:"सुरक्षित विधि का उपयोग करके अपने बटुए का बैकअप लेना सुनिश्चित करें। अपना गुप्त पुनर्प्राप्ति वाक्यांश कभी भी किसी के साथ साझा न करें।",title:"वॉलेट बनाएं या आयात करें"},step3:{description:"एक बार जब आप अपना वॉलेट सेट अप करते हैं, तो ब्राउज़र को ताजगी देने और एक्सटेंशन को लोड करने के लिए नीचे क्लिक करें.",title:"अपना ब्राउज़र ताजा करें"}}},core:{qr_code:{step1:{description:"हम आपकी वॉलेट के तेज एक्सेस के लिए Core को आपके होम स्क्रीन पर डालने की सलाह देते हैं.",title:"Core एप खोलें"},step2:{description:"आप आसानी से अपने फ़ोन पर हमारे बैकअप फीचर का उपयोग करके अपना वॉलेट बैकअप कर सकते हैं.",title:"वॉलेट बनाएं या आयात करें"},step3:{description:"स्कैन करने के बाद, आपके वॉलेट को कनेक्ट करने के लिए आपके लिए कनेक्शन प्राम्प्ट प्रकट होगा.",title:"WalletConnect बटन को छूने के साथ"}},extension:{step1:{description:"हम अपने वॉलेट के लिए तेज एक्सेस के लिए कोर को अपने टास्कबार में पिन करने की सिफारिश करते हैं।",title:"कोर एक्सटेंशन स्थापित करें"},step2:{description:"सुनिश्चित करें कि आप अपने वॉलेट का बैकअप एक सुरक्षित तरीके से ले। कभी भी किसी के साथ अपनी गुप्त वाक्यांश साझा न करें।",title:"एक वॉलेट बनाएं या आयात करें"},step3:{description:"एक बार जब आप अपने वॉलेट की स्थापना कर लें, तो नीचे क्लिक करें ताकि ब्राउज़र को ताज़ा कर सकें और एक्सटेंशन को लोड कर सकें।",title:"अपने ब्राउज़र को ताज़ा करें"}}},fox:{qr_code:{step1:{description:"हम FoxWallet को अपने होम स्क्रीन पर रखने की सिफारिश करते हैं ताकि त्वरित एक्सेस मिल सके।",title:"FoxWallet ऐप खोलें"},step2:{description:"सुनिश्चित करें कि आप एक सुरक्षित तरीके का उपयोग करके अपने वॉलेट का बैकअप ले रहे हैं। कभी भी किसी के साथ अपना गुप्त वाक्यांश साझा न करें।",title:"वॉलेट बनाएं या आयात करें"},step3:{description:"जब आप स्कैन करेंगे, तो आपके वॉलेट को कनेक्ट करने के लिए एक कनेक्शन संकेत प्रकट होगा।",title:"स्कैन बटन पर टैप करें"}}},frontier:{qr_code:{step1:{description:"हमारी सिफारिश है कि आप अपने होम स्क्रीन पर फ्रंटियर वॉलेट रखें जिससे कि आपको त्वरित पहुंच मिले।",title:"फ्रंटियर वॉलेट ऐप को खोलें"},step2:{description:"सुनिश्चित करें कि आप एक सुरक्षित तरीके का उपयोग करके अपने वॉलेट का बैकअप ले रहे हैं। कभी भी किसी के साथ अपना गुप्त वाक्यांश साझा न करें।",title:"वॉलेट बनाएं या आयात करें"},step3:{description:"जब आप स्कैन करते हैं, तो आपके वॉलेट को कनेक्ट करने के लिए एक कनेक्शन संकेत प्रकट होगा।",title:"स्कैन बटन को टैप करें"}},extension:{step1:{description:"हम आपके वॉलेट की तेजी से पहुंच के लिए Frontier Wallet को अपने टास्कबार में पिन करने की सिफारिश करते हैं।",title:"Frontier Wallet एक्सटेंशन इंस्टॉल करें"},step2:{description:"सुनिश्चित करें कि आप एक सुरक्षित तरीके से अपना वॉलेट बैकअप कर रहे हैं। कभी भी किसी के साथ अपना गुप्त वाक्यांश साझा न करें।",title:"वॉलेट बनाएं या आयात करें"},step3:{description:"वॉलेट सेटअप होने के बाद, ब्राउज़र को रिफ्रेश करने के लिए नीचे क्लिक करें और एक्सटेंशन लोड करें।",title:"अपना ब्राउज़र रिफ्रेश करें"}}},im_token:{qr_code:{step1:{title:"imToken ऐप खोलें",description:"अपने वॉलेट के तेजी से पहुँच के लिए imToken एप्लीकेशन को अपने होम स्क्रीन पर रखें।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"एक नया वॉलेट बनाएं या मौजूदा एक को आयात करें।"},step3:{title:"ऊपरी दाएं कोने में स्कैनर आइकॉन पर टैप करें",description:"नया कनेक्शन चुनें, फिर QR कोड स्कैन करें और कनेक्ट करने के लिए प्रॉम्प्ट की पुष्टि करें।"}}},metamask:{qr_code:{step1:{title:"MetaMask ऐप को खोलें",description:"हम आपको MetaMask को आपकी होम स्क्रीन पर रखने की सलाह देते हैं, इससे आपको त्वरित पहुँच मिलेगी।"},step2:{title:"एक वॉलेट बनाएं या इम्पोर्ट करें",description:"सुरक्षित विधि का उपयोग करके अपने बटुए का बैकअप लेना सुनिश्चित करें। अपना गुप्त वाक्यांश कभी भी किसी के साथ साझा न करें।"},step3:{title:"स्कैन बटन पर टैप करें",description:"स्कैन करने के बाद, आपके वॉलेट को कनेक्ट करने के लिए एक कनेक्शन प्रॉम्प्ट दिखाई देगा।"}},extension:{step1:{title:"MetaMask एक्सटेंशन स्थापित करें",description:"हम अपने वॉलेट तक जल्दी से पहुँचने के लिए MetaMask को अपने टास्कबार में पिन करने की सलाह देते हैं।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेना सुनिश्चित करें। अपनी गुप्त वाक्यांश को किसी के साथ शेयर न करें।"},step3:{title:"अपना ब्राउज़र ताज़ा करें",description:"एक बार जब आप अपना वॉलेट सेट अप करते हैं, तो ब्राउजर को ताज़ा करने और एक्सटेंशन को लोड करने के लिए नीचे क्लिक करें।"}}},okx:{qr_code:{step1:{title:"OKX Wallet ऐप खोलें",description:"हम आपको OKX Wallet को अपने होम स्क्रीन पर रखने की सलाह देते हैं, जिससे आप जल्दी से पहुंच सकें।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेने का यकीन करें। कभी भी किसी के साथ अपने गुप्त वाक्यांश साझा न करें।"},step3:{title:"स्कैन बटन पर टैप करें",description:"जब आप स्कैन करते हैं, तो आपके वॉलेट को कनेक्ट करने के लिए एक कनेक्शन संकेत प्रकट होगा।"}},extension:{step1:{title:"OKX वॉलेट एक्सटेंशन स्थापित करें",description:"हम अपने वॉलेट तक तेज़ी से पहुंचने के लिए आपको OKX वॉलेट को अपने कार्यपट्टी में पिन करने की सलाह देते हैं।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेने का यकीन करें। कभी भी किसी के साथ अपने गुप्त वाक्यांश साझा न करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"जब आप अपना वॉलेट सेट अप कर लेते हैं, तो नीचे क्लिक करके ब्राउज़र को ताजा करें और एक्सटेंशन को लोड करें।"}}},omni:{qr_code:{step1:{title:"Omni ऐप को खोलें",description:"अपने वॉलेट तक अधिक जल्दी पहुंचने के लिए Omni को अपने होम स्क्रीन पर जोड़ें।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"एक नया वॉलेट बनाएं या मौजूदा एक को आयात करें।"},step3:{title:"QR आइकन पर टैप करें और स्कैन करें",description:"अपने होम स्क्रीन पर QR आइकन पर टैप करें, कोड स्कैन करें और कनेक्ट करने के लिए प्रॉम्प्ट की पुष्टि करें।"}}},token_pocket:{qr_code:{step1:{title:"TokenPocket ऐप को खोलें",description:"हम आपको TokenPocket को अपने होम स्क्रीन पर रखने की सलाह देते हैं ताकि आपको तेज एक्सेस मिल सके।"},step2:{title:"एक वॉलेट बनाएँ या आयात करें",description:"सुरक्षित विधि का उपयोग करके अपने बटुए का बैकअप लेना सुनिश्चित करें। अपना गुप्त वाक्यांश कभी भी किसी के साथ साझा न करें।"},step3:{title:"स्कैन बटन पर टैप करें",description:"एक बार स्कैन करने के बाद, आपके लिए एक कनेक्शन प्रॉम्प्ट प्रकट होगा ताकि आप अपने वॉलेट को कनेक्ट कर सकें।"}},extension:{step1:{title:"TokenPocket एक्सटेंशन स्थापित करें",description:"हम अपने वॉलेट तक त्वरित पहुंच के लिए TokenPocket को अपने taskbar पर pin करने की सिफारिश करते हैं।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"सुनिश्चित करें कि आप अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेते हैं। कभी किसी के साथ अपना गुप्त वाक्यांश साझा न करें।"},step3:{title:"अपना ब्राउज़र ताज़ा करें",description:"एक बार जब आप अपना वॉलेट सेटअप कर लेते हैं, तो नीचे क्लिक करें ताज़ा ब्राउज़र लोड करें और एक्सटेंशन अप करें।"}}},trust:{qr_code:{step1:{title:"Trust Wallet ऐप खोलें",description:"अपने वॉलेट तक तेज़ी से पहुंचने के लिए Trust Wallet को अपने होम स्क्रीन पर रखें।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"एक नया वॉलेट बनाएं या मौजूदा वॉलेट आयात करें।"},step3:{title:"सेटिंग्स में WalletConnect को टैप करें",description:"नया कनेक्शन चुनें, फिर QR कोड स्कैन करें और प्रम्प्ट की पुष्टि करें।"}},extension:{step1:{title:"Trust Wallet एक्सटेंशन को इंस्टॉल करें",description:"अपने ब्राउज़र के ऊपरी दाएं कोने पर क्लिक करें और Trust Wallet को आसानी से प्रवेश के लिए पिन करें।"},step2:{title:"एक वॉलेट बनाएं या आयात करें",description:"एक नया वॉलेट बनाएं या मौजूदा वॉलेट आयात करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार Trust Wallet सेट अप करने के बाद, नीचे क्लिक करें ब्राउज़र को ताज़ा करने और एक्सटेंशन लोड करने के लिए।"}}},uniswap:{qr_code:{step1:{title:"Uniswap ऐप को खोलें",description:"अपने होम स्क्रीन पर Uniswap वॉलेट जोड़ें, इससे आपके वॉलेट तक तेजी से पहुंचने की सुविधा होगी।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"एक नया वॉलेट बनाएं या मौजूदा वॉलेट को आयात करें।"},step3:{title:"QR आइकन पर टैप करें और स्कैन करें",description:"अपने होमस्क्रीन पर QR आइकन पर टैप करें, कोड स्कैन करें और प्रम्प्ट को कनेक्ट करने की पुष्टि करें।"}}},zerion:{qr_code:{step1:{title:"Zerion ऐप को खोलें",description:"हम सलाह देते हैं कि आप Zerion को अपने होम स्क्रीन पर रखें, इससे तेजी से एक्सेस करने में आसानी होगी।"},step2:{title:"एक वॉलेट बनाएं या आयात करें",description:"सुरक्षित विधि का उपयोग करके अपने बटुए का बैकअप लेना सुनिश्चित करें। अपना गुप्त वाक्यांश कभी भी किसी के साथ साझा न करें।"},step3:{title:"स्कैन बटन को टैप करें",description:"आप स्कैन करने के बाद, एक कनेक्शन प्रोम्प्ट आपके बटुए को कनेक्ट करने के लिए प्रकट होगा।"}},extension:{step1:{title:"Zerion एक्सटेंशन स्थापित करें",description:"हमारी सिफारिश है कि आप अपने वॉलेट तक जल्दी पहुँचने के लिए Zerion को अपने टास्कबार में पिन करें।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"सुनिश्चित करें कि आप एक सुरक्षित विधि का उपयोग करके अपने वॉलेट का बैकअप ले रहे हैं। अपना गुप्त वाक्य कभी किसी के साथ साझा न करें।"},step3:{title:"अपना ब्राउज़र ताज़ा करें",description:"एक बार जब आप अपने वॉलेट की स्थापना कर लें, तो ब्राउज़र को ताज़ा करने और एक्सटेंशन को लोड करने के लिए नीचे क्लिक करें।"}}},rainbow:{qr_code:{step1:{title:"Rainbow ऐप को खोलें",description:"हम अपने वॉलेट के तेज एक्सेस के लिए Rainbow को अपने होम स्क्रीन पर रखने की सलाह देते हैं।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"आप अपने फ़ोन पर हमारे बैकअप फीचर का उपयोग करके अपने वॉलेट का बैकअप आसानी से ले सकते हैं।"},step3:{title:"स्कैन बटन पर टैप करें",description:"जब आप स्कैन करते हैं, तो आपकी वॉलेट से कनेक्ट करने के लिए एक कनेक्शन संकेत दिखाई देगा।"}}},enkrypt:{extension:{step1:{description:"हम अपनी वॉलेट तक तेज़ी से पहुँच के लिए Enkrypt वॉलेट को अपने टास्कबार में पिन करने की सलाह देते हैं।",title:"Enkrypt वॉलेट एक्सटेंशन स्थापित करें"},step2:{description:"सुनिश्चित करें कि आप अपनी वॉलेट का बैकअप एक सुरक्षित तरीके से ले। अपनी गुप्त वाक्यांश को कभी भी किसी के साथ साझा न करें।",title:"एक वॉलेट बनाएं या आयात करें"},step3:{description:"एक बार जब आप अपनी वॉलेट सेट कर लें, तो नीचे क्लिक करें ब्राउज़र को ताज़ा करने और एक्सटेंशन लोड करने के लिए।",title:"अपने ब्राउज़र को ताज़ा करें"}}},frame:{extension:{step1:{description:"हम अपनी वॉलेट तक तेज़ी से पहुँच के लिए Frame को अपने टास्कबार में पिन करने की सलाह देते हैं।",title:"Frame और साथी एक्सटेंशन स्थापित करें"},step2:{description:"अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेना सुनिश्चित करें। कभी भी अपनी गुप्त वाक्यांश को किसी के साथ साझा न करें।",title:"वॉलेट बनाएं या आयात करें"},step3:{description:"एक बार जब आप अपने वॉलेट की सेटअप कर लेते हैं, तो नीचे क्लिक करके ब्राउज़र को ताज़ा करें और एक्सटेंशन को लोड करें।",title:"अपना ब्राउज़र ताज़ा करें"}}},one_key:{extension:{step1:{title:"OneKey Wallet एक्सटेंशन स्थापित करें",description:"हम आपको अपने वॉलेट की तेज एक्सेस के लिए OneKey Wallet को अपने टास्कबार में पिन करने की सलाह देते हैं।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"सुनिश्चित करें कि आप अपने वॉलेट का बैकअप एक सुरक्षित तरीके से ले रहे हैं। अपना गुप्त वाक्यांश किसी के साथ भी साझा न करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आप अपना वॉलेट सेट अप कर लेते हैं, तो ब्राउज़र को ताज़ा करने और एक्सटेंशन को लोड करने के लिए नीचे क्लिक करें।"}}},phantom:{extension:{step1:{title:"फैंटम एक्सटेंशन स्थापित करें",description:"हम आपके वॉलेट के आसान उपयोग के लिए फैंटम को अपने टास्कबार में पिन करने की सलाह देते हैं।"},step2:{title:"एक वॉलेट बनाएं या आयात करें",description:"सुनिश्चित करें कि आप अपने वॉलेट का बैकअप एक सुरक्षित तरीके से ले रहे हैं। अपना गुप्त वसूली वाक्यांश किसी के साथ भी साझा न करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आप अपना वॉलेट सेट कर लें, तो ब्राउज़र को ताजगी देने और एक्सटेंशन को लोड करने के लिए नीचे क्लिक करें।"}}},rabby:{extension:{step1:{title:"Rabby एक्सटेंशन स्थापित करें",description:"हम आपको सलाह देते हैं कि अपने वॉलेट की जल्दी से पहुँच के लिए Rabby को अपने टास्कबार में पिन करें।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"सुनिश्चित करें कि आप अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेते हैं। कभी भी किसी के साथ अपना गुप्त वाक्यांश साझा न करें।"},step3:{title:"अपना ब्राउज़र ताज़ा करें",description:"जब आप अपना वॉलेट सेट अप कर लेते हैं, तो ब्राउज़र को ताज़ा करने और एक्सटेंशन लोड करने के लिए नीचे क्लिक करें।"}}},safeheron:{extension:{step1:{title:"कोर एक्सटेंशन स्थापित करें",description:"हम आपको सलाह देते हैं कि अपने वॉलेट की जल्दी से पहुँच के लिए Safeheron को अपने टास्कबार में पिन करें।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"सुनिश्चित करें कि आप एक सुरक्षित तरीके से अपना वॉलेट बैकअप कर रहे हैं। कभी भी किसी के साथ अपने गुप्त वाक्यांश को साझा न करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आप अपने वॉलेट को सेट अप करते हैं, तो नीचे क्लिक करें ताकि ब्राउज़र को ताज़ा करें और एक्सटेंशन को लोड करें।"}}},taho:{extension:{step1:{title:"ताहो एक्सटेंशन स्थापित करें",description:"हम आपके वॉलेट तक त्वरित पहुँच के लिए ताहो को अपने टास्कबार में पिन करने की सलाह देते हैं।"},step2:{title:"एक वॉलेट बनाएँ या आयात करें",description:"सुनिश्चित करें कि आप एक सुरक्षित तरीके से अपना वॉलेट बैकअप कर रहे हैं। कभी भी किसी के साथ अपने गुप्त वाक्यांश को साझा न करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आप अपना बटुआ सेट कर लेते हैं, तो नीचे क्लिक करके ब्राउज़र को ताज़ा करें और एक्सटेंशन को लोड करें।"}}},talisman:{extension:{step1:{title:"तालिसमान एक्सटेंशन स्थापित करें",description:"हम आपके बटुए के त्वरित पहुँच के लिए तालिसमान को अपने टास्कबार में पिन करने की सिफारिश करते हैं।"},step2:{title:"एक ईथेरियम बटुए बनाएं या आयात करें",description:"अपने बटुए का बैकअप एक सुरक्षित तरीके से लेने का ध्यान रखें। कभी भी अपनी वसूली वाक्यांश को किसी के साथ साझा न करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आप अपना बटुआ सेट कर लेते हैं, तो नीचे क्लिक करके ब्राउज़र को ताज़ा करें और एक्सटेंशन को लोड करें।"}}},xdefi:{extension:{step1:{title:"XDEFI वॉलेट एक्सटेंशन स्थापित करें",description:"हम आपकी वॉलेट की जल्दी से पहुँच के लिए XDEFI Wallet को अपने टास्कबार में पिन करने की सलाह देते हैं।"},step2:{title:"एक वॉलेट बनाएं या आयात करें",description:"निश्चित रूप से अपने वॉलेट का बैकअप किसी सुरक्षित तरीके से लें। अपनी गोपनीय वाक्यांश को किसी के साथ शेयर ना करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आपने अपनी वॉलेट सेट अप कर ली हो, तो ब्राउज़र को ताज़ा करने और एक्सटेंशन को लोड करने के लिए नीचे क्लिक करें।"}}},zeal:{extension:{step1:{title:"Zeal एक्सटेंशन स्थापित करें",description:"हम आपको अपने वॉलेट तक जल्दी पहुँचने के लिए Zeal को अपने टास्कबार में पिन करने की सलाह देते हैं।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेने के लिए सुनिश्चित करें। किसी के साथ भी अपना गुप्त वाक्यांश साझा न करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आप अपना वॉलेट सेटअप कर लेते हैं, तो नीचे क्लिक करें ताकि ब्राउज़र को ताज़ा करें और एक्सटेंशन लोड करें।"}}},safepal:{extension:{step1:{title:"SafePal Wallet एक्सटेंशन स्थापित करें",description:"अपने ब्राउज़र के शीर्ष दाएं में क्लिक करें और SafePal Wallet को आसानी से पहुंच के लिए पिन करें।"},step2:{title:"एक बटुआ बनाएं या आयात करें",description:"नया बटुआ बनाएं या मौजूदा को आयात करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आप SafePal वॉलेट सेट अप कर लेते हैं, तो नीचे क्लिक करें ताकि ब्राउज़र को रिफ्रेश करें और एक्सटेंशन लोड करें।"}},qr_code:{step1:{title:"SafePal वॉलेट ऐप खोलें",description:"अपने वॉलेट तक जल्दी पहुंचने के लिए SafePal वॉलेट को अपनी होम स्क्रीन पर रखें।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"नया बटुआ बनाएं या मौजूदा को आयात करें।"},step3:{title:"सेटिंग्स में WalletConnect को टैप करें",description:"नया कनेक्शन चुनें, फिर QR कोड स्कैन करें और कनेक्ट करने के लिए प्रॉम्प्ट की पुष्टि करें।"}}},desig:{extension:{step1:{title:"Desig एक्सटेंशन स्थापित करें",description:"हम आपको अपने वॉलेट के लिए आसानी से पहुंच पाने के लिए Desig को अपने टास्कबार में पिन करने की सलाह देते हैं।"},step2:{title:"एक वॉलेट बनाएँ",description:"अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेने के लिए सुनिश्चित करें। किसी के साथ भी अपना गुप्त वाक्यांश साझा न करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आप अपना वॉलेट सेटअप कर लेते हैं, तो नीचे क्लिक करें ताकि ब्राउज़र को ताज़ा करें और एक्सटेंशन लोड करें।"}}},subwallet:{extension:{step1:{title:"SubWallet एक्सटेंशन स्थापित करें",description:"हम आपको अपने वॉलेट तक तेजी से पहुंचने के लिए SubWallet को अपने टास्कबार में पिन करने की सलाह देते हैं।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"अपने बटुए का बैकअप एक सुरक्षित तरीके से लेने का ध्यान रखें। कभी भी अपनी वसूली वाक्यांश को किसी के साथ साझा न करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आप अपना वॉलेट सेटअप कर लेते हैं, तो नीचे क्लिक करें ताकि ब्राउज़र को ताज़ा करें और एक्सटेंशन लोड करें।"}},qr_code:{step1:{title:"SubWallet ऐप खोलें",description:"हम आपको तेजी से पहुंचने के लिए SubWallet को अपने होम स्क्रीन पर रखने की सलाह देते हैं।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेने के लिए सुनिश्चित करें। किसी के साथ भी अपना गुप्त वाक्यांश साझा न करें।"},step3:{title:"स्कैन बटन को टैप करें",description:"जैसे ही आप स्कैन करेंगे, एक कनेक्शन संकेत आपके वॉलेट को कनेक्ट करने के लिए प्रकट होगा।"}}},clv:{extension:{step1:{title:"CLV Wallet एक्सटेंशन स्थापित करें",description:"हम आपको अपने वॉलेट तक तेजी से पहुंचने के लिए CLV Wallet को अपने टास्कबार में पिन करने की सलाह देते हैं।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेने के लिए सुनिश्चित करें। किसी के साथ भी अपना गुप्त वाक्यांश साझा न करें।"},step3:{title:"अपने ब्राउज़र को ताज़ा करें",description:"एक बार जब आप अपना वॉलेट सेटअप कर लेते हैं, तो नीचे क्लिक करें ताकि ब्राउज़र को ताज़ा करें और एक्सटेंशन लोड करें।"}},qr_code:{step1:{title:"CLV वॉलेट ऐप खोलें",description:"हम तीव्र पहुंच के लिए आपके होम स्क्रीन पर CLV वॉलेट रखने की सलाह देते हैं।"},step2:{title:"वॉलेट बनाएं या आयात करें",description:"अपने वॉलेट का बैकअप एक सुरक्षित तरीके से लेने के लिए सुनिश्चित करें। किसी के साथ भी अपना गुप्त वाक्यांश साझा न करें।"},step3:{title:"स्कैन बटन को टैप करें",description:"जैसे ही आप स्कैन करेंगे, एक कनेक्शन संकेत आपके वॉलेट को कनेक्ट करने के लिए प्रकट होगा।"}}},okto:{qr_code:{step1:{title:"Okto ऐप को खोलें",description:"त्वरित पहुंच के लिए अपने होम स्क्रीन पर Okto जोड़ें"},step2:{title:"एक MPC वॉलेट बनाएं",description:"एक खाता बनाएं और वॉलेट उत्पन्न करें"},step3:{title:"सेटिंग्स में WalletConnect को टैप करें",description:"ऊपरी दाएँ में स्कैन QR आइकन को टैप करें और कनेक्ट करने के लिए संकेत दें।"}}},ledger:{desktop:{step1:{title:"लेजर लाइव ऐप खोलें",description:"हम तेज एक्सेस के लिए अपने होम स्क्रीन पर Ledger Live डालने की सिफारिश करते हैं।"},step2:{title:"अपना लेजर सेट करें",description:"एक नया लेजर सेट अप करें या मौजूदा वाले से कनेक्ट करें।"},step3:{title:"कनेक्ट करें",description:"स्कैन करने के बाद, आपके वॉलेट को कनेक्ट करने के लिए एक कनेक्शन प्रॉम्प्ट दिखाई देगा।"}},qr_code:{step1:{title:"लेजर लाइव ऐप खोलें",description:"हम तेज एक्सेस के लिए अपने होम स्क्रीन पर Ledger Live डालने की सिफारिश करते हैं।"},step2:{title:"अपना लेजर सेट करें",description:"आप डेस्कटॉप ऐप के साथ सिंक कर सकते हैं या अपने Ledger को कनेक्ट कर सकते हैं।"},step3:{title:"कोड स्कैन करें",description:"WalletConnect पर टैप करें फिर स्कैनर पर स्विच करें। जब आप स्कैन करेंगे, तो आपके वॉलेट को कनेक्ट करने के लिए एक कनेक्शन संकेत प्रकट होगा।"}}}},Tg={connect_wallet:t4u,intro:n4u,sign_in:r4u,connect:i4u,connect_scan:a4u,connector_group:s4u,get:o4u,get_options:l4u,get_mobile:c4u,get_instructions:E4u,chains:d4u,profile:f4u,wallet_connectors:p4u},h4u={label:"Hubungkan Dompet"},C4u={title:"Apa itu Dompet?",description:"Sebuah dompet digunakan untuk mengirim, menerima, menyimpan, dan menampilkan aset digital. Ini juga cara baru untuk masuk, tanpa perlu membuat akun dan kata sandi baru di setiap situs web.",digital_asset:{title:"Sebuah Rumah untuk Aset Digital Anda",description:"Dompet digunakan untuk mengirim, menerima, menyimpan, dan menampilkan aset digital seperti Ethereum dan NFTs."},login:{title:"Cara Baru untuk Masuk",description:"Alih-alih membuat akun dan kata sandi baru di setiap situs web, cukup hubungkan dompet Anda."},get:{label:"Dapatkan Dompet"},learn_more:{label:"Pelajari lebih lanjut"}},m4u={label:"Verifikasi akun Anda",description:"Untuk menyelesaikan koneksi, Anda harus menandatangani sebuah pesan di dompet Anda untuk memastikan bahwa Anda adalah pemilik dari akun ini.",message:{send:"Kirim pesan",preparing:"Mempersiapkan pesan...",cancel:"Batal",preparing_error:"Kesalahan dalam mempersiapkan pesan, silakan coba lagi!"},signature:{waiting:"Menunggu tanda tangan...",verifying:"Memverifikasi tanda tangan...",signing_error:"Kesalahan dalam menandatangani pesan, silakan coba lagi!",verifying_error:"Kesalahan dalam memverifikasi tanda tangan, silakan coba lagi!",oops_error:"Ups, ada yang salah!"}},A4u={label:"Hubungkan",title:"Hubungkan Dompet",new_to_ethereum:{description:"Baru dalam dompet Ethereum?",learn_more:{label:"Pelajari lebih lanjut"}},learn_more:{label:"Pelajari lebih lanjut"},recent:"Terkini",status:{opening:"Membuka %{wallet}...",not_installed:"%{wallet} tidak terpasang",not_available:"%{wallet} tidak tersedia",confirm:"Konfirmasikan koneksi di ekstensi"},secondary_action:{get:{description:"Tidak memiliki %{wallet}?",label:"DAPATKAN"},install:{label:"PASANG"},retry:{label:"COBA LAGI"}},walletconnect:{description:{full:"Perlu modal resmi WalletConnect?",compact:"Perlu modal WalletConnect?"},open:{label:"BUKA"}}},g4u={title:"Pindai dengan %{wallet}",fallback_title:"Pindai dengan ponsel Anda"},B4u={recommended:"Direkomendasikan",other:"Lainnya",popular:"Populer",more:"Lebih Banyak",others:"Lainnya"},y4u={title:"Dapatkan Dompet",action:{label:"DAPATKAN"},mobile:{description:"Dompet Mobile"},extension:{description:"Ekstensi Browser"},mobile_and_extension:{description:"Dompet Mobile dan Ekstensi"},mobile_and_desktop:{description:"Dompet Seluler dan Desktop"},looking_for:{title:"Bukan yang Anda cari?",mobile:{description:"Pilih dompet di layar utama untuk memulai dengan penyedia dompet yang berbeda."},desktop:{compact_description:"Pilih dompet di layar utama untuk memulai dengan penyedia dompet yang berbeda.",wide_description:"Pilih dompet di sebelah kiri untuk memulai dengan penyedia dompet yang berbeda."}}},F4u={title:"Mulai dengan %{wallet}",short_title:"Dapatkan %{wallet}",mobile:{title:"%{wallet} untuk Mobile",description:"Gunakan dompet mobile untuk menjelajahi dunia Ethereum.",download:{label:"Dapatkan aplikasinya"}},extension:{title:"%{wallet} untuk %{browser}",description:"Akses dompet Anda langsung dari browser web favorit Anda.",download:{label:"Tambahkan ke %{browser}"}},desktop:{title:"%{wallet} untuk %{platform}",description:"Akses dompet Anda secara native dari desktop yang kuat Anda.",download:{label:"Tambahkan ke %{platform}"}}},D4u={title:"Instal %{wallet}",description:"Pindai dengan ponsel Anda untuk mengunduh di iOS atau Android",continue:{label:"Lanjutkan"}},v4u={mobile:{connect:{label:"Hubungkan"},learn_more:{label:"Pelajari lebih lanjut"}},extension:{refresh:{label:"Segarkan"},learn_more:{label:"Pelajari lebih lanjut"}},desktop:{connect:{label:"Hubungkan"},learn_more:{label:"Pelajari lebih lanjut"}}},b4u={title:"Alihkan Jaringan",wrong_network:"Jaringan yang salah terdeteksi, alihkan atau diskonek untuk melanjutkan.",confirm:"Konfirmasi di Dompet",switching_not_supported:"Dompet Anda tidak mendukung pengalihan jaringan dari %{appName}. Coba alihkan jaringan dari dalam dompet Anda.",switching_not_supported_fallback:"Wallet Anda tidak mendukung penggantian jaringan dari aplikasi ini. Cobalah ganti jaringan dari dalam wallet Anda.",disconnect:"Putuskan koneksi",connected:"Terkoneksi"},w4u={disconnect:{label:"Putuskan koneksi"},copy_address:{label:"Salin Alamat",copied:"Tersalin!"},explorer:{label:"Lihat lebih banyak di penjelajah"},transactions:{description:"%{appName} transaksi akan muncul di sini...",description_fallback:"Transaksi Anda akan muncul di sini...",recent:{title:"Transaksi Terbaru"},clear:{label:"Hapus Semua"}}},x4u={argent:{qr_code:{step1:{description:"Letakkan Argent di layar utama Anda untuk akses lebih cepat ke dompet Anda.",title:"Buka aplikasi Argent"},step2:{description:"Buat dompet dan nama pengguna, atau impor dompet yang ada.",title:"Buat atau Impor Dompet"},step3:{description:"Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda.",title:"Tekan tombol Scan QR"}}},bifrost:{qr_code:{step1:{description:"Kami merekomendasikan untuk menempatkan Bifrost Wallet di layar utama anda untuk akses yang lebih cepat.",title:"Buka aplikasi Bifrost Wallet"},step2:{description:"Buat atau impor sebuah dompet menggunakan frasa pemulihan Anda.",title:"Buat atau Impor sebuah Wallet"},step3:{description:"Setelah Anda memindai, sebuah pesan akan muncul untuk menghubungkan dompet Anda.",title:"Tekan tombol scan"}}},bitget:{qr_code:{step1:{description:"Kami menyarankan untuk meletakkan Bitget Wallet di layar depan Anda untuk akses yang lebih cepat.",title:"Buka aplikasi Bitget Wallet"},step2:{description:"Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.",title:"Buat atau Impor Wallet"},step3:{description:"Setelah Anda pindai, akan muncul petunjuk untuk menghubungkan wallet Anda.",title:"Tekan tombol pindai"}},extension:{step1:{description:"Kami menyarankan untuk memasang Bitget Wallet ke taskbar Anda untuk akses yang lebih cepat ke wallet Anda.",title:"Instal ekstensi Dompet Bitget"},step2:{description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frasa rahasia Anda kepada siapa pun.",title:"Buat atau Impor Dompet"},step3:{description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.",title:"Segarkan browser Anda"}}},bitski:{extension:{step1:{description:"Kami merekomendasikan untuk memasang Bitski ke taskbar Anda untuk akses dompet Anda yang lebih cepat.",title:"Pasang ekstensi Bitski"},step2:{description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.",title:"Buat atau Impor Dompet"},step3:{description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.",title:"Segarkan browser Anda"}}},coin98:{qr_code:{step1:{description:"Kami merekomendasikan untuk menaruh Coin98 Wallet di layar utama Anda untuk akses wallet Anda lebih cepat.",title:"Buka aplikasi Coin98 Wallet"},step2:{description:"Anda dapat dengan mudah mencadangkan wallet Anda menggunakan fitur cadangan kami di telepon Anda.",title:"Buat atau Impor Wallet"},step3:{description:"Setelah Anda melakukan pemindaian, akan muncul prompt koneksi untuk Anda menghubungkan wallet Anda.",title:"Ketuk tombol WalletConnect"}},extension:{step1:{description:"Klik di pojok kanan atas browser Anda dan sematkan Coin98 Wallet untuk akses mudah.",title:"Pasang ekstensi Coin98 Wallet"},step2:{description:"Buat dompet baru atau impor yang sudah ada.",title:"Buat atau Impor sebuah dompet"},step3:{description:"Setelah Anda menyiapkan Coin98 Wallet, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.",title:"Segarkan browser Anda"}}},coinbase:{qr_code:{step1:{description:"Kami merekomendasikan memasang Coinbase Wallet di layar utama Anda untuk akses yang lebih cepat.",title:"Buka aplikasi Coinbase Wallet"},step2:{description:"Anda dapat dengan mudah mencadangkan dompet Anda menggunakan fitur cadangan awan.",title:"Buat atau Impor sebuah Dompet"},step3:{description:"Setelah Anda memindai, akan muncul sebuah petunjuk koneksi untuk Anda menyambungkan dompet Anda.",title:"Ketuk tombol pindai"}},extension:{step1:{description:"Kami merekomendasikan untuk menempel Coinbase Wallet ke taskbar Anda untuk akses lebih cepat ke dompet Anda.",title:"Instal ekstensi Coinbase Wallet"},step2:{description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase pemulihan rahasia Anda kepada siapa pun.",title:"Buat atau Import Wallet"},step3:{description:"Setelah Anda menyiapkan wallet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.",title:"Segarkan browser Anda"}}},core:{qr_code:{step1:{description:"Kami merekomendasikan untuk meletakkan Core di layar utama Anda untuk akses lebih cepat ke wallet Anda.",title:"Buka aplikasi Core"},step2:{description:"Anda dapat dengan mudah mencadangkan wallet Anda dengan menggunakan fitur cadangan kami di telepon Anda.",title:"Buat atau Import Wallet"},step3:{description:"Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menyambungkan wallet Anda.",title:"Ketuk tombol WalletConnect"}},extension:{step1:{description:"Kami merekomendasikan untuk menempelkan Core pada taskbar Anda untuk akses ke dompet Anda lebih cepat.",title:"Pasang ekstensi Core"},step2:{description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun.",title:"Buat atau Impor Dompet"},step3:{description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.",title:"Segarkan browser Anda"}}},fox:{qr_code:{step1:{description:"Kami merekomendasikan untuk menaruh FoxWallet pada layar utama Anda untuk akses lebih cepat.",title:"Buka aplikasi FoxWallet"},step2:{description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun.",title:"Buat atau Impor Wallet"},step3:{description:"Setelah Anda memindai, prompt koneksi akan muncul untuk Anda hubungkan dompet Anda.",title:"Ketuk tombol pindai"}}},frontier:{qr_code:{step1:{description:"Kami merekomendasikan untuk meletakkan Frontier Wallet di layar awal Anda untuk akses yang lebih cepat.",title:"Buka aplikasi Frontier Wallet"},step2:{description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun.",title:"Buat atau Impor Wallet"},step3:{description:"Setelah Anda memindai, prompt koneksi akan muncul untuk Anda menghubungkan dompet Anda.",title:"Ketuk tombol pindai"}},extension:{step1:{description:"Kami menyarankan menempelkan Frontier Wallet ke taskbar Anda untuk akses yang lebih cepat ke dompet Anda.",title:"Instal ekstensi Frontier Wallet"},step2:{description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun.",title:"Buat atau Impor Dompet"},step3:{description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.",title:"Segarkan browser Anda"}}},im_token:{qr_code:{step1:{title:"Buka aplikasi imToken",description:"Letakkan aplikasi imToken di layar utama Anda untuk akses yang lebih cepat ke dompet Anda."},step2:{title:"Buat atau Impor Dompet",description:"Buat dompet baru atau impor yang sudah ada."},step3:{title:"Ketuk Ikon Scanner di pojok kanan atas",description:"Pilih Koneksi Baru, lalu pindai kode QR dan konfirmasi petunjuk untuk terhubung."}}},metamask:{qr_code:{step1:{title:"Buka aplikasi MetaMask",description:"Kami merekomendasikan untuk meletakkan MetaMask di layar beranda Anda untuk akses yang lebih cepat."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun."},step3:{title:"Ketuk tombol pindai",description:"Setelah Anda memindai, petunjuk koneksi akan muncul untuk Anda menyambungkan dompet Anda."}},extension:{step1:{title:"Pasang ekstensi MetaMask",description:"Kami menyarankan untuk memasang MetaMask pada taskbar Anda untuk akses wallet lebih cepat."},step2:{title:"Buat atau Impor Wallet",description:"Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan wallet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},okx:{qr_code:{step1:{title:"Buka aplikasi OKX Wallet",description:"Kami menyarankan untuk menaruh OKX Wallet di layar utama Anda untuk akses lebih cepat."},step2:{title:"Buat atau Impor Wallet",description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frasa rahasia Anda kepada siapa pun."},step3:{title:"Ketuk tombol scan",description:"Setelah Anda memindai, prompt koneksi akan muncul untuk Anda hubungkan dompet Anda."}},extension:{step1:{title:"Instal ekstensi OKX Wallet",description:"Kami menyarankan untuk menempelkan OKX Wallet ke taskbar Anda untuk akses lebih cepat ke dompet Anda."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frasa rahasia Anda kepada siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda mengatur wallet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},omni:{qr_code:{step1:{title:"Buka aplikasi Omni",description:"Tambahkan Omni ke layar utama Anda untuk akses yang lebih cepat ke wallet Anda."},step2:{title:"Buat atau Impor Wallet",description:"Buat wallet baru atau impor yang sudah ada."},step3:{title:"Ketuk ikon QR dan scan",description:"Ketuk ikon QR di layar utama Anda, pindai kode dan konfirmasi petunjuk untuk terhubung."}}},token_pocket:{qr_code:{step1:{title:"Buka aplikasi TokenPocket",description:"Kami sarankan meletakkan TokenPocket di layar utama Anda untuk akses yang lebih cepat."},step2:{title:"Buat atau impor Dompet",description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase pemulihan rahasia Anda kepada siapa pun."},step3:{title:"Ketuk tombol pindai",description:"Setelah Anda memindai, Indikasi sambungan akan muncul untuk Anda menghubungkan dompet Anda."}},extension:{step1:{title:"Instal ekstensi TokenPocket",description:"Kami merekomendasikan penambatan TokenPocket ke taskbar Anda untuk akses dompet Anda lebih cepat."},step2:{title:"Buat atau Impor Wallet",description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagi frasa rahasia Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda mengatur dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},trust:{qr_code:{step1:{title:"Buka aplikasi Trust Wallet",description:"Pasang Trust Wallet di layar utama Anda untuk akses dompet Anda lebih cepat."},step2:{title:"Buat atau Impor Wallet",description:"Buat dompet baru atau impor yang sudah ada."},step3:{title:"Ketuk WalletConnect di Pengaturan",description:"Pilih Koneksi Baru, kemudian pindai kode QR dan konfirmasi perintah untuk terhubung."}},extension:{step1:{title:"Instal ekstensi Trust Wallet",description:"Klik di pojok kanan atas browser Anda dan sematkan Trust Wallet untuk akses mudah."},step2:{title:"Buat atau Impor dompet",description:"Buat dompet baru atau impor yang sudah ada."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda mengatur Trust Wallet, klik di bawah untuk menyegarkan browser dan memuat ekstensi."}}},uniswap:{qr_code:{step1:{title:"Buka aplikasi Uniswap",description:"Tambahkan Uniswap Wallet ke layar utama Anda untuk akses ke wallet Anda lebih cepat."},step2:{title:"Buat atau Impor Wallet",description:"Buat wallet baru atau impor yang sudah ada."},step3:{title:"Ketuk ikon QR dan pindai",description:"Ketuk ikon QR di layar utama Anda, pindai kode dan konfirmasi prompt untuk terhubung."}}},zerion:{qr_code:{step1:{title:"Buka aplikasi Zerion",description:"Kami merekomendasikan untuk meletakkan Zerion di layar utama Anda untuk akses lebih cepat."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase pemulihan rahasia Anda kepada siapa pun."},step3:{title:"Ketuk tombol scan",description:"Setelah Anda scan, muncul prompt koneksi untuk Anda menghubungkan dompet Anda."}},extension:{step1:{title:"Instal ekstensi Zerion",description:"Kami menyarankan untuk menempelkan Zerion ke taskbar Anda untuk akses lebih cepat ke dompet Anda."},step2:{title:"Buat atau Impor Wallet",description:"Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda mengatur wallet Anda, klik di bawah untuk menyegarkan browser dan memuat ekstensi."}}},rainbow:{qr_code:{step1:{title:"Buka aplikasi Rainbow",description:"Kami menyarankan menempatkan Rainbow di layar home Anda untuk akses yang lebih cepat ke wallet Anda."},step2:{title:"Buat atau Impor Wallet",description:"Anda dapat dengan mudah mencadangkan wallet Anda menggunakan fitur cadangan kami di telepon Anda."},step3:{title:"Tekan tombol scan",description:"Setelah Anda memindai, akan muncul pesan untuk menghubungkan dompet Anda."}}},enkrypt:{extension:{step1:{description:"Kami menyarankan untuk memasang Enkrypt Wallet ke taskbar Anda untuk akses dompet yang lebih cepat.",title:"Instal ekstensi Enkrypt Wallet"},step2:{description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah berbagi frase rahasia Anda dengan siapa pun.",title:"Buat atau Impor Dompet"},step3:{description:"Setelah Anda menyiapkan dompet, klik di bawah ini untuk memuat ulang peramban dan meload ekstensi.",title:"Segarkan browser Anda"}}},frame:{extension:{step1:{description:"Kami menyarankan untuk memasang Frame ke taskbar Anda untuk akses dompet yang lebih cepat.",title:"Instal Frame & ekstensi pendamping"},step2:{description:"Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun.",title:"Buat atau Impor Wallet"},step3:{description:"Setelah Anda menyetel wallet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi.",title:"Segarkan browser Anda"}}},one_key:{extension:{step1:{title:"Instal ekstensi OneKey Wallet",description:"Kami menyarankan untuk menempelkan OneKey Wallet ke taskbar Anda untuk akses wallet yang lebih cepat."},step2:{title:"Buat atau Impor Wallet",description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase rahasia Anda kepada siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},phantom:{extension:{step1:{title:"Instal ekstensi Phantom",description:"Kami menyarankan untuk mem-pin Phantom ke taskbar Anda untuk akses dompet yang lebih mudah."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah membagikan frase pemulihan rahasia Anda kepada siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},rabby:{extension:{step1:{title:"Instal ekstensi Rabby",description:"Kami merekomendasikan menempelkan Rabby ke taskbar Anda untuk akses lebih cepat ke wallet Anda."},step2:{title:"Buat atau Impor Wallet",description:"Pastikan untuk mencadangkan wallet Anda dengan metode yang aman. Jangan pernah berbagi frase rahasia Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan wallet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},safeheron:{extension:{step1:{title:"Instal ekstensi Core",description:"Kami merekomendasikan menempelkan Safeheron ke taskbar Anda untuk akses lebih cepat ke wallet Anda."},step2:{title:"Buat atau Impor Wallet",description:"Pastikan untuk mencadangkan dompet Anda dengan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda mengatur dompet Anda, klik di bawah untuk menyegarkan browser dan memuat ekstensi."}}},taho:{extension:{step1:{title:"Instal ekstensi Taho",description:"Kami merekomendasikan pengepinan Taho ke taskbar Anda untuk akses yang lebih cepat ke dompet Anda."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan dompet Anda dengan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},talisman:{extension:{step1:{title:"Instal ekstensi Talisman",description:"Kami merekomendasikan menempelkan Talisman ke taskbar Anda untuk akses dompet Anda lebih cepat."},step2:{title:"Buat atau Impor Dompet Ethereum",description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah berbagi frase pemulihan Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},xdefi:{extension:{step1:{title:"Instal ekstensi Dompet XDEFI",description:"Kami merekomendasikan menempelkan XDEFI Wallet ke taskbar Anda untuk akses lebih cepat ke dompet Anda."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan dompet Anda dengan metode yang aman. Jangan pernah berbagi frase rahasia Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},zeal:{extension:{step1:{title:"Instal ekstensi Zeal",description:"Kami merekomendasikan untuk mem-pin Zeal ke taskbar Anda untuk akses wallet lebih cepat."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},safepal:{extension:{step1:{title:"Pasang ekstensi SafePal Wallet",description:"Klik di pojok kanan atas browser Anda dan pin SafePal Wallet untuk akses mudah."},step2:{title:"Buat atau Impor sebuah dompet",description:"Buat dompet baru atau impor yang sudah ada."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan SafePal Wallet, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}},qr_code:{step1:{title:"Buka aplikasi SafePal Wallet",description:"Letakkan SafePal Wallet di layar utama Anda untuk akses yang lebih cepat ke wallet Anda."},step2:{title:"Buat atau Impor Dompet",description:"Buat dompet baru atau impor yang sudah ada."},step3:{title:"Ketuk WalletConnect di Pengaturan",description:"Pilih Koneksi Baru, lalu pindai kode QR dan konfirmasi petunjuk untuk terhubung."}}},desig:{extension:{step1:{title:"Instal ekstensi Desig",description:"Kami merekomendasikan menempelkan Desig ke taskbar Anda untuk akses dompet Anda lebih mudah."},step2:{title:"Buat Dompet",description:"Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}}},subwallet:{extension:{step1:{title:"Instal ekstensi SubWallet",description:"Kami merekomendasikan menempelkan SubWallet ke taskbar Anda untuk akses dompet Anda lebih cepat."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan dompet Anda menggunakan metode yang aman. Jangan pernah berbagi frase pemulihan Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}},qr_code:{step1:{title:"Buka aplikasi SubWallet",description:"Kami merekomendasikan menaruh SubWallet di layar utama Anda untuk akses lebih cepat."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun."},step3:{title:"Tekan tombol scan",description:"Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda."}}},clv:{extension:{step1:{title:"Instal ekstensi CLV Wallet",description:"Kami merekomendasikan menempelkan CLV Wallet ke taskbar Anda untuk akses dompet Anda lebih cepat."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun."},step3:{title:"Segarkan browser Anda",description:"Setelah Anda menyiapkan dompet Anda, klik di bawah ini untuk menyegarkan browser dan memuat ekstensi."}},qr_code:{step1:{title:"Buka aplikasi CLV Wallet",description:"Kami sarankan untuk menempatkan CLV Wallet di layar utama Anda untuk akses yang lebih cepat."},step2:{title:"Buat atau Impor Dompet",description:"Pastikan untuk mencadangkan wallet Anda menggunakan metode yang aman. Jangan pernah berbagi frasa rahasia Anda dengan siapa pun."},step3:{title:"Tekan tombol scan",description:"Setelah Anda memindai, akan muncul petunjuk koneksi untuk Anda menghubungkan dompet Anda."}}},okto:{qr_code:{step1:{title:"Buka aplikasi Okto",description:"Tambahkan Okto ke layar utama Anda untuk akses cepat"},step2:{title:"Buat Wallet MPC",description:"Buat akun dan generate wallet"},step3:{title:"Ketuk WalletConnect di Pengaturan",description:"Ketuk ikon Scan QR di pojok kanan atas dan konfirmasi prompt untuk terhubung."}}},ledger:{desktop:{step1:{title:"Buka aplikasi Ledger Live",description:"Kami merekomendasikan menempatkan Ledger Live di layar utama Anda untuk akses lebih cepat."},step2:{title:"Atur Ledger Anda",description:"Atur Ledger baru atau hubungkan ke Ledger yang sudah ada."},step3:{title:"Hubungkan",description:"Setelah Anda scan, muncul prompt koneksi untuk Anda menghubungkan dompet Anda."}},qr_code:{step1:{title:"Buka aplikasi Ledger Live",description:"Kami merekomendasikan menempatkan Ledger Live di layar utama Anda untuk akses lebih cepat."},step2:{title:"Atur Ledger Anda",description:"Anda dapat melakukan sinkronisasi dengan aplikasi desktop atau menghubungkan Ledger Anda."},step3:{title:"Pindai kode",description:"Ketuk WalletConnect lalu Beralih ke Scanner. Setelah Anda scan, muncul prompt koneksi untuk Anda menghubungkan dompet Anda."}}}},Og={connect_wallet:h4u,intro:C4u,sign_in:m4u,connect:A4u,connect_scan:g4u,connector_group:B4u,get:y4u,get_options:F4u,get_mobile:D4u,get_instructions:v4u,chains:b4u,profile:w4u,wallet_connectors:x4u},k4u={label:"ウォレットを接続"},_4u={title:"ウォレットとは何ですか?",description:"ウォレットは、デジタルアセットを送信、受信、保存、表示するために使用されます。また、各ウェブサイトで新たなアカウントやパスワードを作成する必要なく、ログインする新しい方法でもあります。",digital_asset:{title:"あなたのデジタル資産のための家",description:"ウォレットは、EthereumやNFTのようなデジタル資産を送信、受信、保存、表示するために使用されます。"},login:{title:"新しいログイン方法",description:"すべてのウェブサイトで新しいアカウントとパスワードを作成する代わりに、ウォレットを接続します。"},get:{label:"ウォレットを取得する"},learn_more:{label:"詳しくはこちら"}},S4u={label:"アカウントを確認する",description:"接続を完了するには、このアカウントの所有者であることを証明するためにウォレットでメッセージに署名する必要があります。",message:{send:"メッセージを送信",preparing:"メッセージの準備中...",cancel:"キャンセル",preparing_error:"メッセージの準備中にエラーが発生しました、再試行してください!"},signature:{waiting:"署名を待っています...",verifying:"署名を検証中...",signing_error:"メッセージの署名中にエラーが発生しました、再試行してください!",verifying_error:"署名の検証中にエラーが発生しました、再試行してください!",oops_error:"おっと、何かが間違っていました!"}},P4u={label:"接続",title:"ウォレットを接続する",new_to_ethereum:{description:"Ethereumのウォレットが初めてですか?",learn_more:{label:"詳しくはこちら"}},learn_more:{label:"詳しくはこちら"},recent:"最近利用しました",status:{opening:"%{wallet}を開いています...",not_installed:"%{wallet} はインストールされていません",not_available:"%{wallet} は利用できません",confirm:"エクステンションで接続を確認してください"},secondary_action:{get:{description:"%{wallet}がありませんか?",label:"取得"},install:{label:"インストール"},retry:{label:"再試行"}},walletconnect:{description:{full:"公式のWalletConnectモーダルが必要ですか?",compact:"WalletConnectモーダルが必要ですか?"},open:{label:"開く"}}},T4u={title:"%{wallet}でスキャン",fallback_title:"携帯電話でスキャンしてください"},O4u={recommended:"おすすめのウォレット",other:"その他",popular:"人気のウォレット",more:"もっと",others:"その他"},I4u={title:"ウォレットを取得",action:{label:"取得"},mobile:{description:"モバイルウォレット"},extension:{description:"ブラウザ拡張"},mobile_and_extension:{description:"モバイルウォレットと拡張機能"},mobile_and_desktop:{description:"モバイルとデスクトップウォレット"},looking_for:{title:"お探しのウォレットがありませんか?",mobile:{description:"メイン画面でウォレットを選択し、異なるウォレットプロバイダーで始めてください。"},desktop:{compact_description:"メイン画面でウォレットを選択し、異なるウォレットプロバイダーで始めてください。",wide_description:"左側のウォレットを選択して、別のウォレットプロバイダーで始めてください。"}}},N4u={title:"%{wallet}で始める",short_title:"%{wallet}を取得する",mobile:{title:"モバイル用 %{wallet}",description:"モバイルウォレットを使用して、イーサリアムの世界を探索します。",download:{label:"アプリを取得"}},extension:{title:"%{wallet} for %{browser}",description:"お好きなウェブブラウザからウォレットに直接アクセスします。",download:{label:"%{browser}に追加"}},desktop:{title:"%{wallet} for %{platform}",description:"あなたの強力なデスクトップからネイティブにウォレットにアクセスします。",download:{label:"%{platform}に追加する"}}},R4u={title:"%{wallet}をインストール",description:"iOSまたはAndroidでダウンロードするために電話でスキャン",continue:{label:"続行"}},z4u={mobile:{connect:{label:"接続"},learn_more:{label:"詳しくはこちら"}},extension:{refresh:{label:"更新"},learn_more:{label:"詳しくはこちら"}},desktop:{connect:{label:"接続"},learn_more:{label:"詳しくはこちら"}}},j4u={title:"ネットワークを切り替える",wrong_network:"誤ったネットワークが検出されました、続行するには切り替えるか切断してください。",confirm:"ウォレットで確認する",switching_not_supported:"あなたのウォレットは %{appName}からネットワークを切り替えることをサポートしていません。ウォレット内でネットワークを切り替えてみてください。",switching_not_supported_fallback:"あなたのウォレットは、このアプリからネットワークを切り替えることをサポートしていません。代わりにウォレット内からネットワークを切り替えてみてください。",disconnect:"切断する",connected:"接続しました"},M4u={disconnect:{label:"切断する"},copy_address:{label:"アドレスをコピーする",copied:"コピーしました!"},explorer:{label:"エクスプローラーで詳しく見る"},transactions:{description:"%{appName} トランザクションがここに表示されます...",description_fallback:"あなたのトランザクションはここに表示されます...",recent:{title:"最近のトランザクション"},clear:{label:"すべてクリア"}}},L4u={argent:{qr_code:{step1:{description:"より速くウォレットにアクセスするために、Argentをホーム画面に置いてください。",title:"Argentアプリを開く"},step2:{description:"ウォレットとユーザーネームを作成するか、既存のウォレットをインポートします。",title:"ウォレットを作成またはインポート"},step3:{description:"スキャン後、ウォレットを接続するための接続プロンプトが表示されます。",title:"「QRをスキャン」ボタンをタップします"}}},bifrost:{qr_code:{step1:{description:"より速くアクセスできるように、Bifrost Walletをホーム画面に置くことをお勧めします。",title:"Bifrost Walletアプリを開きます"},step2:{description:"リカバリーフレーズを使用してウォレットを作成またはインポートします。",title:"ウォレットを作成またはインポート"},step3:{description:"スキャン後、ウォレットを接続するための接続プロンプトが表示されます。",title:"「スキャン」ボタンをタップします"}}},bitget:{qr_code:{step1:{description:"より迅速なアクセスのために、ホーム画面にBitget Walletを配置することをお勧めします。",title:"Bitget Walletアプリを開く"},step2:{description:"ウォレットは安全な方法でバックアップしてください。秘密のフレーズを誰とも共有しないでください。",title:"ウォレットを作成またはインポート"},step3:{description:"スキャン後、ウォレットを接続するための接続プロンプトが表示されます。",title:"スキャンボタンをタップする"}},extension:{step1:{description:"ウォレットへのより迅速なアクセスのためにBitget Walletをタスクバーにピン留めすることをお勧めします。",title:"Bitget Wallet拡張機能をインストールします"},step2:{description:"ウォレットを安全な方法でバックアップしてください。秘密のフレーズを誰とも共有しないでください。",title:"ウォレットを作成またはインポートします"},step3:{description:"ウォレットを設定したら、以下をクリックしてブラウザを更新し、拡張機能を読み込みます。",title:"ブラウザを更新する"}}},bitski:{extension:{step1:{description:"ウォレットへの素早いアクセスのために、Bitskiをタスクバーにピン留めすることをお勧めします。",title:"Bitskiエクステンションをインストールする"},step2:{description:"ウォレットを安全な方法でバックアップしてください。シークレットフレーズは誰とも共有しないでください。",title:"ウォレットを作成するか、インポートする"},step3:{description:"ウォレットのセットアップが完了したら、以下をクリックしてブラウザを更新し、エクステンションを読み込みます。",title:"ブラウザを更新する"}}},coin98:{qr_code:{step1:{description:"Coin98ウォレットをホーム画面に置くことで、ウォレットへのアクセスが高速化されることをお勧めします。",title:"Coin98ウォレットアプリを開きます"},step2:{description:"電話のバックアップ機能を使用して、ウォレットを簡単にバックアップすることができます。",title:"ウォレットを作成またはインポートする"},step3:{description:"スキャン後、ウォレットへの接続を促すプロンプトが表示されます。",title:"WalletConnectボタンをタップします"}},extension:{step1:{description:"ブラウザの右上をクリックして、Coin98ウォレットをピン留めして簡単にアクセスできるようにします。",title:"Coin98ウォレットの拡張機能をインストールします"},step2:{description:"新しいウォレットを作成するか、既存のものをインポートします。",title:"ウォレットを作成またはインポートする"},step3:{description:"Coin98ウォレットをセットアップしたら、下のリンクをクリックしてブラウザを更新し、拡張機能をロードします。",title:"ブラウザを更新する"}}},coinbase:{qr_code:{step1:{description:"より素早くアクセスできるように、Coinbaseウォレットをホームスクリーンに置くことをお勧めします。",title:"Coinbase Walletアプリを開く"},step2:{description:"クラウドバックアップ機能を使用して、簡単にウォレットをバックアップできます。",title:"ウォレットを作成またはインポートする"},step3:{description:"スキャン後、ウォレットを接続するための接続プロンプトが表示されます。",title:"スキャンボタンをタップする"}},extension:{step1:{description:"タスクバーにCoinbase Walletをピン留めして、ウォレットにより早くアクセスできるように推奨します。",title:"Coinbase Wallet拡張機能をインストールする"},step2:{description:"必ず安全な方法を使用してウォレットをバックアップしてください。秘密のフレーズを誰にも共有しないでください。",title:"ウォレットを作成またはインポート"},step3:{description:"ウォレットの設定が完了したら、下のボタンをクリックしてブラウザを更新し、拡張機能をロードします。",title:"ブラウザを更新する"}}},core:{qr_code:{step1:{description:"ウォレットへの迅速なアクセスのため、コアをホーム画面に設定することを推奨します。",title:"Coreアプリを開く"},step2:{description:"電話のバックアップ機能を使って、簡単にウォレットをバックアップできます。",title:"ウォレットを作成またはインポート"},step3:{description:"スキャン後、ウォレットを接続するようにプロンプトが表示されます。",title:"WalletConnectボタンをタップする"}},extension:{step1:{description:"ウォレットへのより迅速なアクセスのために、タスクバーにCoreをピン留めすることをお勧めします。",title:"Core拡張機能をインストールする"},step2:{description:"セキュアな方法を使用してウォレットをバックアップしてください。秘密のフレーズを誰とも共有しないでください。",title:"ウォレットを作成またはインポートする"},step3:{description:"ウォレットの設定が完了したら、以下をクリックしてブラウザを更新し、拡張機能をロードします。",title:"ブラウザを更新する"}}},fox:{qr_code:{step1:{description:"より迅速なアクセスのために、ホーム画面にFoxWalletを置くことをお勧めします。",title:"FoxWalletアプリを開く"},step2:{description:"セキュアな方法を使用してウォレットをバックアップすることを確認してください。秘密のフレーズは誰とも共有しないでください。",title:"ウォレットを作成またはインポート"},step3:{description:"スキャンした後、ウォレットを接続するための接続プロンプトが表示されます。",title:"スキャンボタンをタップします"}}},frontier:{qr_code:{step1:{description:"Frontierウォレットをホーム画面に置くことで、より早くアクセスできることをお勧めします。",title:"Frontierウォレットアプリを開きます"},step2:{description:"セキュアな方法を使用してウォレットをバックアップすることを確認してください。秘密のフレーズは誰とも共有しないでください。",title:"ウォレットを作成またはインポート"},step3:{description:"スキャン後に、ウォレットの接続を促すメッセージが表示されます。",title:"スキャンボタンをタップします"}},extension:{step1:{description:"より迅速なウォレットへのアクセスを可能にするために、フロンティアウォレットをタスクバーにピン留めすることを推奨します。",title:"フロンティアウォレットの拡張機能をインストールします"},step2:{description:"安全な方法を使用してウォレットをバックアップしてください。秘密のフレーズは決して誰とも共有しないでください。",title:"ウォレットを作成またはインポート"},step3:{description:"ウォレットの設定が完了したら、ブラウザを更新して拡張機能を読み込みます。",title:"ブラウザを更新する"}}},im_token:{qr_code:{step1:{title:"imTokenアプリを開く",description:"ウォレットへのアクセスを速くするために、imTokenアプリをホーム画面に置いてください。"},step2:{title:"ウォレットを作成またはインポート",description:"新しいウォレットを作成するか、既存のものをインポートします。"},step3:{title:"右上隅のスキャナーアイコンをタップします",description:"新しい接続を選択し、QRコードをスキャンしてプロンプトを確認し接続します。"}}},metamask:{qr_code:{step1:{title:"MetaMaskアプリを開きます",description:"迅速なアクセスのために、MetaMaskをホーム画面に置くことをお勧めします。"},step2:{title:"ウォレットを作成またはインポートします",description:"必ず安全な方法を使用してウォレットをバックアップしてください。秘密の回復フレーズを誰にも共有しないでください。"},step3:{title:"スキャンボタンをタップします",description:"スキャンすると、ウォレットを接続するための接続プロンプトが表示されます。"}},extension:{step1:{title:"MetaMaskの拡張機能をインストールします",description:"ウォレットへのより速いアクセスのために、MetaMaskをタスクバーにピン留めすることをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"安全な方法を使用してウォレットをバックアップし、秘密のフレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新",description:"ウォレットを設定した後は、下のリンクをクリックしてブラウザを更新し、エクステンションを読み込んでください。"}}},okx:{qr_code:{step1:{title:"OKX Walletアプリを開く",description:"OKX Walletをホーム画面に配置して、より早くアクセスできるようにすることをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"セキュアな方法を使ってウォレットをバックアップしてください。秘密フレーズは誰とも共有しないでください。"},step3:{title:"スキャンボタンをタップする",description:"スキャン後、ウォレットを接続するための接続プロンプトが表示されます。"}},extension:{step1:{title:"OKXウォレット拡張機能をインストールする",description:"ウォレットへの迅速なアクセスのため、OKXウォレットをタスクバーにピン止めすることをお勧めします。"},step2:{title:"ウォレットを作成するか、インポートする",description:"セキュアな方法を使ってウォレットをバックアップしてください。秘密フレーズは誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットを設定したら、下をクリックしてブラウザをリフレッシュし、拡張機能を読み込みます。"}}},omni:{qr_code:{step1:{title:"Omniアプリを開く",description:"Omniをホーム画面に追加して、ウォレットへのアクセスを早めます。"},step2:{title:"ウォレットを作成またはインポート",description:"新しいウォレットを作成するか、既存のものをインポートします。"},step3:{title:"QRアイコンをタップしてスキャン",description:"ホーム画面のQRアイコンをタップし、コードをスキャンし、プロンプトを確認して接続します。"}}},token_pocket:{qr_code:{step1:{title:"TokenPocketアプリを開く",description:"より速いアクセスのために、TokenPocketをホーム画面に置くことをお勧めします。"},step2:{title:"ウォレットを作成またはインポートする",description:"必ず安全な方法を使用してウォレットをバックアップしてください。秘密の回復フレーズを誰にも共有しないでください。"},step3:{title:"スキャンボタンをタップする",description:"スキャン後、ウォレットを接続するための接続プロンプトが表示されます。"}},extension:{step1:{title:"TokenPocketエクステンションをインストールする",description:"ウォレットへのより早いアクセスのために、TokenPocketをタスクバーにピン留めすることをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"ウォレットを安全な方法でバックアップすることを確認してください。シークレットフレーズを決して他の人と共有しないでください。"},step3:{title:"ブラウザを更新",description:"ウォレットのセットアップが完了したら、以下をクリックしてブラウザを更新し、拡張機能をロードします。"}}},trust:{qr_code:{step1:{title:"Trust Walletアプリを開く",description:"ウォレットへの高速アクセスのために、Trust Walletをホーム画面に置きます。"},step2:{title:"ウォレットを作成またはインポート",description:"新しいウォレットを作成するか、既存のものをインポートします。"},step3:{title:"設定でWalletConnectをタップします",description:"新しい接続を選択し、QRコードをスキャンして、プロンプトで接続を確認します。"}},extension:{step1:{title:"Trust Wallet拡張機能をインストールします",description:"ブラウザの右上をクリックし、Trust Walletをピン留めして簡単にアクセスできるようにします。"},step2:{title:"ウォレットを作成するかインポートします",description:"新しいウォレットを作成するか、既存のものをインポートします。"},step3:{title:"ブラウザを更新する",description:"Trust Walletの設定が完了したら、以下をクリックしてブラウザを更新し、拡張機能を読み込みます。"}}},uniswap:{qr_code:{step1:{title:"Uniswapアプリを開く",description:"Uniswapウォレットをホーム画面に追加して、ウォレットへのアクセスを高速化します。"},step2:{title:"ウォレットを作成またはインポートする",description:"新しいウォレットを作成するか、既存のものをインポートします。"},step3:{title:"QRアイコンをタップしてスキャンする",description:"ホーム画面のQRアイコンをタップし、コードをスキャンしてプロンプトを確認して接続します。"}}},zerion:{qr_code:{step1:{title:"Zerionアプリを開く",description:"より速くアクセスするために、Zerionをホーム画面に置くことをお勧めします。"},step2:{title:"ウォレットを作成するか、インポートする",description:"必ず安全な方法を使用してウォレットをバックアップしてください。秘密の回復フレーズを誰にも共有しないでください。"},step3:{title:"スキャンボタンを押す",description:"スキャンした後、ウォレットを接続するための接続プロンプトが表示されます。"}},extension:{step1:{title:"Zerion拡張機能をインストールする",description:"ウォレットへの素早いアクセスのため、Zerionをタスクバーにピン留めすることをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"ウォレットをセキュアな方法でバックアップすることを確認してください。秘密のフレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットをセットアップしたら、下のボタンをクリックしてブラウザを更新し、拡張機能をロードします。"}}},rainbow:{qr_code:{step1:{title:"Rainbowアプリを開く",description:"ウォレットへの早いアクセスのために、Rainbowをホーム画面に置くことをおすすめします。"},step2:{title:"ウォレットを作成またはインポート",description:"電話のバックアップ機能を使用して、簡単にウォレットをバックアップすることができます。"},step3:{title:"スキャンボタンをタップする",description:"スキャンした後、ウォレットを接続するための接続プロンプトが表示されます。"}}},enkrypt:{extension:{step1:{description:"ウォレットへのアクセスをより早くするため、タスクバーにEnkrypt Walletをピン留めすることを推奨します。",title:"Enkrypt Wallet拡張機能をインストールしてください"},step2:{description:"安全な方法でウォレットのバックアップを必ず取り、秘密のフレーズを誰とも共有しないでください。",title:"ウォレットを作成するか、インポートする"},step3:{description:"ウォレットの設定が完了したら、以下をクリックしてブラウザを更新し、拡張機能を読み込みます。",title:"ブラウザを更新する"}}},frame:{extension:{step1:{description:"ウォレットへのアクセスをより早くするため、タスクバーにFrameをピン留めすることを推奨します。",title:"Frameとその付属の拡張機能をインストール"},step2:{description:"ウォレットを安全な方法でバックアップしてください。秘密のフレーズを誰とも共有しないでください。",title:"ウォレットを作成、またはインポート"},step3:{description:"ウォレットの設定が完了したら、下のリンクをクリックしてブラウザを更新し、拡張機能をロードします。",title:"ブラウザを更新"}}},one_key:{extension:{step1:{title:"OneKey Wallet拡張機能をインストール",description:"ウォレットへのアクセスを素早く行うため、OneKey Walletをタスクバーにピン留めすることをお勧めします。"},step2:{title:"ウォレットを作成、またはインポート",description:"安全な方法を使用してウォレットをバックアップしてください。秘密のフレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットを設定したら、以下をクリックしてブラウザを更新し、拡張機能をロードします。"}}},phantom:{extension:{step1:{title:"Phantom拡張機能をインストールする",description:"ウォレットへの容易なアクセスのため、Phantomをタスクバーにピン留めすることを推奨します。"},step2:{title:"ウォレットを作成またはインポートする",description:"安全な方法を使用してウォレットをバックアップしてください。秘密の回復フレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットの設定が完了したら、以下をクリックしてブラウザを更新し、エクステンションを読み込みます。"}}},rabby:{extension:{step1:{title:"Rabbyエクステンションをインストールする",description:"ウォレットへの素早いアクセスのため、タスクバーにRabbyをピン止めすることをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"セキュアな方法を使用してウォレットをバックアップしてください。秘密のフレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新",description:"ウォレットの設定が完了したら、以下をクリックしてブラウザを更新し、拡張機能をロードします。"}}},safeheron:{extension:{step1:{title:"コア拡張機能をインストール",description:"ウォレットへの素早いアクセスのため、タスクバーにSafeheronをピン止めすることをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"確実に安全な方法でウォレットをバックアップしてください。秘密のフレーズは決して誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットの設定が完了したら、以下をクリックしてブラウザを更新し、拡張機能をロードします。"}}},taho:{extension:{step1:{title:"Taho拡張機能をインストールする",description:"ウォレットへのより迅速なアクセスのため、Tahoをタスクバーにピン留めすることをお勧めします。"},step2:{title:"ウォレットを作成するか、インポートする",description:"確実に安全な方法でウォレットをバックアップしてください。秘密のフレーズは決して誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットの設定が完了したら、下をクリックしてブラウザを更新し、拡張機能をロードします。"}}},talisman:{extension:{step1:{title:"Talisman拡張機能をインストールする",description:"ウォレットへのより早いアクセスのために、Talismanをタスクバーにピン留めすることをお勧めします。"},step2:{title:"Ethereumウォレットを作成するか、インポートする",description:"ウォレットを安全な方法でバックアップしておくことを確認してください。リカバリーフレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットの設定が完了したら、下をクリックしてブラウザを更新し、拡張機能をロードします。"}}},xdefi:{extension:{step1:{title:"XDEFI Wallet拡張機能をインストールする",description:"XDEFI Walletをタスクバーにピン留めすることで、ウォレットへのアクセスが速くなることをお勧めします。"},step2:{title:"ウォレットの作成またはインポート",description:"ウォレットを安全な方法でバックアップしてください。秘密のフレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットの設定が完了したら、以下をクリックしてブラウザを更新し、拡張機能をロードしてください。"}}},zeal:{extension:{step1:{title:"Zeal 拡張機能をインストール",description:"ウォレットに素早くアクセスするために、タスクバーに Zeal をピン留めすることをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"ウォレットは安全な方法でバックアップしてください。秘密のフレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットを設定したら、以下をクリックしてブラウザを更新し、拡張機能を読み込みます。"}}},safepal:{extension:{step1:{title:"SafePal Wallet拡張機能をインストールする",description:"ブラウザの右上でクリックし、Easy AccessのためにSafePal Walletをピン留めします。"},step2:{title:"ウォレットを作成またはインポートする",description:"新しいウォレットを作成するか、既存のものをインポートします。"},step3:{title:"ブラウザを更新する",description:"SafePal Walletのセットアップが完了したら、以下をクリックしてブラウザをリフレッシュし、エクステンションをロードします。"}},qr_code:{step1:{title:"SafePal Walletアプリを開く",description:"SafePal Walletをホーム画面に置くことで、ウォレットへの素早いアクセスが可能になります。"},step2:{title:"ウォレットを作成またはインポート",description:"新しいウォレットを作成するか、既存のものをインポートします。"},step3:{title:"設定でWalletConnectをタップします",description:"新しい接続を選択し、QRコードをスキャンしてプロンプトを確認し接続します。"}}},desig:{extension:{step1:{title:"Desig拡張機能をインストール",description:"あなたのウォレットへの簡単なアクセスのために、Desigをタスクバーにピン留めすることをお勧めします。"},step2:{title:"ウォレットを作成",description:"ウォレットは安全な方法でバックアップしてください。秘密のフレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットを設定したら、以下をクリックしてブラウザを更新し、拡張機能を読み込みます。"}}},subwallet:{extension:{step1:{title:"SubWallet拡張機能をインストール",description:"ウォレットへのより素早いアクセスのため、SubWalletをタスクバーにピン留めすることをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"ウォレットを安全な方法でバックアップしておくことを確認してください。リカバリーフレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットを設定したら、以下をクリックしてブラウザを更新し、拡張機能を読み込みます。"}},qr_code:{step1:{title:"SubWalletアプリを開く",description:"より迅速なアクセスのために、SubWalletをホーム画面に置くことをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"ウォレットは安全な方法でバックアップしてください。秘密のフレーズを誰とも共有しないでください。"},step3:{title:"「スキャン」ボタンをタップします",description:"スキャン後、ウォレットを接続するための接続プロンプトが表示されます。"}}},clv:{extension:{step1:{title:"CLV Wallet拡張機能をインストール",description:"ウォレットへのより素早いアクセスのため、CLV Walletをタスクバーにピン留めすることをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"ウォレットは安全な方法でバックアップしてください。秘密のフレーズを誰とも共有しないでください。"},step3:{title:"ブラウザを更新する",description:"ウォレットを設定したら、以下をクリックしてブラウザを更新し、拡張機能を読み込みます。"}},qr_code:{step1:{title:"CLV Walletアプリを開く",description:"より迅速なアクセスのために、ホーム画面にCLV Walletを置くことをお勧めします。"},step2:{title:"ウォレットを作成またはインポート",description:"ウォレットは安全な方法でバックアップしてください。秘密のフレーズを誰とも共有しないでください。"},step3:{title:"「スキャン」ボタンをタップします",description:"スキャン後、ウォレットを接続するための接続プロンプトが表示されます。"}}},okto:{qr_code:{step1:{title:"Oktoアプリを開く",description:"素早くアクセスするために、ホーム画面にOktoを追加します"},step2:{title:"MPCウォレットを作成する",description:"アカウントを作成し、ウォレットを生成します"},step3:{title:"設定でWalletConnectをタップします",description:"右上のScan QRアイコンをタップし、接続するためのプロンプトを確認します。"}}},ledger:{desktop:{step1:{title:"Ledger Liveアプリを開く",description:"より速いアクセスのために、ホーム画面にLedger Liveを置くことを推奨します。"},step2:{title:"あなたのLedgerを設定する",description:"新しいLedgerを設定するか、既存のものに接続します。"},step3:{title:"接続",description:"スキャン後、ウォレットを接続するための接続プロンプトが表示されます。"}},qr_code:{step1:{title:"Ledger Liveアプリを開く",description:"より速いアクセスのために、ホーム画面にLedger Liveを置くことを推奨します。"},step2:{title:"あなたのLedgerを設定する",description:"デスクトップアプリと同期するか、あなたのLedgerに接続することができます。"},step3:{title:"コードをスキャンする",description:"WalletConnectをタップし、スキャナーに切り替えてください。スキャン後、ウォレットを接続するための接続プロンプトが表示されます。"}}}},Ig={connect_wallet:k4u,intro:_4u,sign_in:S4u,connect:P4u,connect_scan:T4u,connector_group:O4u,get:I4u,get_options:N4u,get_mobile:R4u,get_instructions:z4u,chains:j4u,profile:M4u,wallet_connectors:L4u},U4u={label:"지갑 연결"},$4u={title:"지갑이란 무엇인가요?",description:"지갑은 디지털 자산을 보내고, 받고, 저장하고, 표시하는 데 사용됩니다. 또한, 모든 웹 사이트에서 새 계정과 비밀번호를 생성할 필요 없이 로그인하는 새로운 방법입니다.",digital_asset:{title:"당신의 디지털 자산을 위한 집",description:"지갑은 이더리움 및 NFT와 같은 디지털 자산을 보내고, 받고, 저장하고, 표시하는데 사용됩니다."},login:{title:"새로운 로그인 방식",description:"모든 웹사이트에서 새 계정과 비밀번호를 생성하는 대신, 당신의 지갑을 연결하기만 하면 됩니다."},get:{label:"지갑 가져오기"},learn_more:{label:"더 알아보기"}},W4u={label:"계정을 확인하세요",description:"연결을 완료하려면 이 계정의 소유자임을 확인하기 위해 지갑에 메시지에 서명해야 합니다.",message:{send:"메시지 보내기",preparing:"메시지 준비 중...",cancel:"취소",preparing_error:"메시지 준비 중 오류가 발생했습니다. 다시 시도하세요!"},signature:{waiting:"서명을 기다리는 중...",verifying:"서명 검증 중...",signing_error:"메시지 서명 중 오류가 발생했습니다. 다시 시도하세요!",verifying_error:"서명 검증 중 오류가 발생했습니다. 다시 시도하세요!",oops_error:"앗, 문제가 발생했습니다!"}},q4u={label:"연결",title:"지갑 연결",new_to_ethereum:{description:"이더리움 지갑에 처음 접하시나요?",learn_more:{label:"더 알아보기"}},learn_more:{label:"더 알아보기"},recent:"최근",status:{opening:"%{wallet}열기 ...",not_installed:"%{wallet} 가 설치되어 있지 않습니다",not_available:"%{wallet} 를 사용할 수 없습니다",confirm:"확장기능에서 연결을 확인하세요"},secondary_action:{get:{description:"%{wallet}가 없나요?",label:"GET"},install:{label:"설치"},retry:{label:"다시 시도"}},walletconnect:{description:{full:"공식 WalletConnect 모달이 필요한가요?",compact:"WalletConnect 모달이 필요한가요?"},open:{label:"열기"}}},H4u={title:"%{wallet}로 스캔하기",fallback_title:"휴대폰으로 스캔하기"},G4u={recommended:"추천",other:"기타",popular:"인기",more:"더 보기",others:"다른 사항들"},Q4u={title:"월렛 받기",action:{label:"받기"},mobile:{description:"모바일 월렛"},extension:{description:"브라우저 확장 프로그램"},mobile_and_extension:{description:"모바일 지갑 및 확장 프로그램"},mobile_and_desktop:{description:"모바일 및 데스크톱 지갑"},looking_for:{title:"찾고 계신 것이 아닌가요?",mobile:{description:"메인 화면에서 다른 지갑 제공자를 사용하기 위해 지갑을 선택하세요."},desktop:{compact_description:"메인 화면에서 다른 지갑 제공자를 사용하기 위해 지갑을 선택하세요.",wide_description:"왼쪽에서 지갑을 선택하여 다른 지갑 제공자를 사용하기 시작하세요."}}},K4u={title:"%{wallet}로 시작하십시오",short_title:"%{wallet}얻기",mobile:{title:"모바일용 %{wallet}",description:"모바일 지갑으로 이더리움 세계를 탐험하세요.",download:{label:"앱 받기"}},extension:{title:"%{browser}용 %{wallet}",description:"가장 좋아하는 웹 브라우저에서 바로 지갑에 접근하세요.",download:{label:"추가하기 %{browser}"}},desktop:{title:"%{wallet} 용 %{platform}",description:"강력한 데스크톱에서 네이티브로 지갑에 접근하세요.",download:{label:"%{platform}에 추가"}}},V4u={title:"설치하기 %{wallet}",description:"iOS 또는 Android에서 다운로드하기 위해 휴대폰으로 스캔하세요",continue:{label:"계속"}},J4u={mobile:{connect:{label:"연결"},learn_more:{label:"더 알아보기"}},extension:{refresh:{label:"새로고침"},learn_more:{label:"더 알아보기"}},desktop:{connect:{label:"연결"},learn_more:{label:"더 알아보기"}}},Z4u={title:"네트워크 전환",wrong_network:"잘못된 네트워크를 탐지했습니다, 계속하려면 전환하거나 연결을 해제하세요.",confirm:"지갑에서 승인",switching_not_supported:"지갑에서 %{appName}네트워크를 전환하는 것은 지원되지 않습니다. 대신 지갑 내에서 네트워크를 전환해 보세요.",switching_not_supported_fallback:"당신의 지갑은 이 앱에서 네트워크를 바꾸는 것을 지원하지 않습니다. 대신 지갑 내에서 네트워크를 변경해 보십시오.",disconnect:"연결 해제",connected:"연결됨"},Y4u={disconnect:{label:"연결 해제"},copy_address:{label:"주소 복사",copied:"복사됨!"},explorer:{label:"탐색기에서 더 보기"},transactions:{description:"%{appName} 거래가 여기에 나타납니다...",description_fallback:"여기에 트랜잭션이 표시됩니다...",recent:{title:"최근 거래 내역"},clear:{label:"모두 지우기"}}},X4u={argent:{qr_code:{step1:{description:"지갑에 더 빠르게 액세스하려면 Argent를 홈 화면에 놓으십시오.",title:"Argent 앱을 열기"},step2:{description:"지갑과 사용자 이름을 생성하거나 기존의 지갑을 가져옵니다.",title:"지갑 생성 또는 가져오기"},step3:{description:"스캔 후에 지갑을 연결하기 위한 연결 요청이 표시됩니다.",title:"QR 코드 스캔 버튼을 누르기"}}},bifrost:{qr_code:{step1:{description:"더 빠른 접근을 위해 홈 화면에 Bifrost Wallet을 놓는 것을 권장합니다.",title:"Bifrost 지갑 앱을 열어주세요"},step2:{description:"복구 문구를 사용하여 지갑을 생성하거나 가져옵니다.",title:"지갑 생성 또는 가져오기"},step3:{description:"스캔 후 연결 프롬프트가 나타나고 지갑을 연결할 수 있습니다.",title:"스캔 버튼을 누릅니다"}}},bitget:{qr_code:{step1:{description:"더 빠른 접근을 위해 Bitget 지갑을 홈 화면에 두는 것을 권장합니다.",title:"Bitget 지갑 앱을 열십시오"},step2:{description:"안전한 방법을 사용하여 지갑을 백업하십시오. 절대로 비밀 구문을 누구와도 공유하지 마십시오.",title:"지갑 생성 또는 가져오기"},step3:{description:"스캔 후, 지갑을 연결하라는 연결 요청 메시지가 나타납니다.",title:"스캔 버튼을 누르십시오"}},extension:{step1:{description:"지갑에 빠르게 액세스하기 위해 Bitget Wallet을 작업 표시줄에 고정하는 것을 권장합니다.",title:"Bitget Wallet 확장 프로그램을 설치하세요"},step2:{description:"지갑을 안전한 방법으로 백업하십시오. 절대로 비밀 문구를 누구와도 공유하지 마십시오.",title:"지갑 생성 또는 가져오기"},step3:{description:"지갑 설정을 마친 후 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하세요.",title:"브라우저를 새로 고침하세요"}}},bitski:{extension:{step1:{description:"지갑에 더 빠르게 액세스하기 위해 Bitski를 작업 표시줄에 고정하는 것을 권장합니다.",title:"Bitski 확장 기능을 설치합니다"},step2:{description:"안전한 방법을 사용하여 지갑을 백업하십시오. 비밀 문구를 누구와도 공유하지 마십시오.",title:"지갑 만들기 또는 가져오기"},step3:{description:"지갑을 설정한 후 아래를 클릭하여 브라우저를 새로 고침하고 확장 프로그램을 로드하세요.",title:"브라우저를 새로고침하세요"}}},coin98:{qr_code:{step1:{description:"지갑에 빠르게 액세스하기 위해 Coin98 Wallet을 홈 화면에 두는 것을 권장합니다.",title:"Coin98 Wallet 앱을 열기"},step2:{description:"휴대폰에서 백업 기능을 이용하여 지갑을 쉽게 백업할 수 있습니다.",title:"지갑 만들기 또는 가져오기"},step3:{description:"스캔한 후 연결 프롬프트가 나타나 지갑을 연결하도록 합니다.",title:"WalletConnect 버튼을 누르십시오"}},extension:{step1:{description:"브라우저 오른쪽 상단을 클릭하고 쉽게 액세스할 수 있도록 Coin98 Wallet을 고정하십시오.",title:"Coin98 Wallet 확장 프로그램을 설치하십시오"},step2:{description:"새로운 지갑을 만들거나 기존의 지갑을 가져옵니다.",title:"지갑을 만들거나 가져옵니다"},step3:{description:"Coin98 Wallet을 설정하면 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하십시오.",title:"브라우저를 새로 고치십시오"}}},coinbase:{qr_code:{step1:{description:"더 빠른 액세스를 위해 Coinbase Wallet을 홈 화면에 두는 것을 권장합니다.",title:"Coinbase Wallet 앱을 엽니다"},step2:{description:"클라우드 백업 기능을 사용하여 지갑을 쉽게 백업할 수 있습니다.",title:"지갑 생성 또는 가져오기"},step3:{description:"스캔한 후에 지갑을 연결하라는 연결 프롬프트가 나타납니다.",title:"스캔 버튼을 탭하세요"}},extension:{step1:{description:"지갑에 더 빠르게 접근할 수 있도록 Coinbase Wallet을 작업 표시줄에 고정하는 것을 권장합니다.",title:"Coinbase Wallet 확장 프로그램을 설치하세요"},step2:{description:"안전한 방법을 사용하여 지갑을 백업하십시오. 비밀 문구는 절대로 누구와도 공유하지 마십시오.",title:"지갑 만들기 또는 가져오기"},step3:{description:"지갑을 설정한 후 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하십시오.",title:"브라우저 새로 고침"}}},core:{qr_code:{step1:{description:"지갑에 빠르게 액세스할 수 있도록 Core를 홈 화면에 두는 것을 추천드립니다.",title:"Core 앱 열기"},step2:{description:"휴대폰에서 우리의 백업 기능을 이용해 지갑을 쉽게 백업할 수 있습니다.",title:"지갑 만들기 또는 가져오기"},step3:{description:"스캔 한 후에는 지갑을 연결하라는 연결 요청이 표시됩니다.",title:"WalletConnect 버튼을 누르세요"}},extension:{step1:{description:"지갑에 더 빠르게 액세스하기 위해 작업 표시줄에 Core를 고정하는 것을 권장합니다.",title:"Core 확장 프로그램을 설치하십시오"},step2:{description:"안전한 방법을 사용하여 지갑을 백업해야 합니다. 절대로 비밀 문구를 다른 사람과 공유하지 마십시오.",title:"지갑 만들기 또는 가져오기"},step3:{description:"지갑을 설정한 후 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하십시오.",title:"브라우저를 새로 고치세요"}}},fox:{qr_code:{step1:{description:"FoxWallet을 홈 화면에 놓는 것을 추천합니다. 이렇게 하면 더 빠르게 접근할 수 있습니다.",title:"FoxWallet 앱을 열어주세요"},step2:{description:"지갑을 안전한 방법으로 백업하십시오. 절대로 비밀 문구를 다른 사람과 공유하지 마십시오.",title:"지갑을 생성하거나 가져오기"},step3:{description:"스캔 후, 지갑을 연결하라는 연결 프롬프트가 표시됩니다.",title:"스캔 버튼을 누르세요"}}},frontier:{qr_code:{step1:{description:"Frontier Wallet을 홈 화면에 놓는 것을 추천합니다. 이렇게 하면 더 빠르게 접근할 수 있습니다.",title:"Frontier Wallet 앱을 열어주세요"},step2:{description:"지갑을 안전한 방법으로 백업해야 합니다. 비밀 구문을 누구와도 공유하지 마세요.",title:"지갑 생성 또는 가져오기"},step3:{description:"스캔 후에 지갑을 연결하라는 연결 프롬프트가 표시됩니다.",title:"스캔 버튼을 누르세요"}},extension:{step1:{description:"지갑에 더 빠르게 액세스 할 수 있도록 Frontier Wallet을 작업 표시줄에 고정하는 것을 권장합니다.",title:"Frontier Wallet 확장 기능 설치"},step2:{description:"지갑을 안전한 방법으로 백업해야 합니다. 비밀 구문을 누구와도 공유하지 마세요.",title:"지갑 생성 또는 가져오기"},step3:{description:"지갑을 설정한 후에 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하십시오.",title:"브라우저를 새로 고칩니다"}}},im_token:{qr_code:{step1:{title:"imToken 앱을 연다",description:"당신의 지갑에 더 빠르게 접근하기 위해 imToken 앱을 홈 화면에 둡니다."},step2:{title:"지갑을 만들거나 불러옵니다",description:"새 지갑을 생성하거나 기존의 것을 가져옵니다."},step3:{title:"오른쪽 상단의 스캐너 아이콘을 누릅니다",description:"새 연결을 선택하고 QR 코드를 스캔한 뒤, 연결하려는 프롬프트를 확인합니다."}}},metamask:{qr_code:{step1:{title:"MetaMask 앱을 엽니다",description:"빠른 액세스를 위해 MetaMask를 홈 화면에 두는 것을 권장합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"당신의 지갑을 안전한 방법으로 백업하는 것을 잊지 마세요. 절대로 비밀 구절을 공유하지 마세요."},step3:{title:"스캔 버튼을 누릅니다",description:"스캔한 후에 지갑을 연결하라는 연결 프롬프트가 나타납니다."}},extension:{step1:{title:"MetaMask 확장 프로그램을 설치하세요",description:"지갑에 빠르게 접근하기 위해 MetaMask를 작업표시줄에 고정하는 것을 추천합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하세요. 결코 비밀 문구를 다른 사람과 공유하지 마세요."},step3:{title:"브라우저를 새로 고치세요",description:"지갑 설정을 마친 후에는 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하세요."}}},okx:{qr_code:{step1:{title:"OKX Wallet 앱을 열기",description:"더 빠른 접근을 위해 OKX 지갑을 홈 화면에 두는 것을 추천합니다."},step2:{title:"지갑 만들기 또는 불러오기",description:"안전한 방법으로 지갑을 백업하십시오. 절대 비밀 문구를 다른 사람과 공유하지 마세요."},step3:{title:"스캔 버튼을 탭하세요",description:"스캔 후 연결 요청이 나타나며, 이를 통해 지갑을 연결할 수 있습니다."}},extension:{step1:{title:"OKX 지갑 확장 프로그램 설치하기",description:"지갑에 빠르게 접근할 수 있도록 OKX 지갑을 작업 표시줄에 고정하는 것을 추천합니다."},step2:{title:"지갑 만들기 또는 불러오기",description:"당신의 지갑을 안전한 방법으로 백업해야 합니다. 비밀 문구를 절대로 다른 사람과 공유하지 마세요."},step3:{title:"브라우저를 새로 고치세요",description:"지갑을 설정한 후, 브라우저를 새로 고치고 확장 기능을 로드하기 위해 아래를 클릭하세요."}}},omni:{qr_code:{step1:{title:"Omni 앱을 열기",description:"더 빠른 액세스를 위해 Omni를 홈 스크린에 추가하세요."},step2:{title:"지갑 만들기 또는 가져오기",description:"새로운 지갑을 만들거나 기존의 하나를 가져옵니다."},step3:{title:"QR 아이콘을 탭하고 스캔하기",description:"홈 화면의 QR 아이콘을 탭하고, 코드를 스캔하고 프롬프트를 확인하여 연결하세요."}}},token_pocket:{qr_code:{step1:{title:"TokenPocket 앱을 열어주세요",description:"빠른 접근을 위해 홈 화면에 TokenPocket을 추가하는 것을 권장합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하세요. 절대로 누구에게도 비밀 문구를 공유하지 마세요."},step3:{title:"스캔 버튼을 탭하세요",description:"스캔 후에 지갑을 연결하라는 프롬프트가 표시됩니다."}},extension:{step1:{title:"TokenPocket 확장 기능을 설치하십시오",description:"지갑에 빠르게 접근하기 위해 TokenPocket를 작업 표시줄에 고정하는 것을 추천합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하세요. 절대로 비밀 문구를 다른 사람과 공유하지 마세요."},step3:{title:"브라우저 새로 고침",description:"지갑을 설정하면 아래를 클릭하여 브라우저를 새로 고침하고 확장 기능을 로드합니다."}}},trust:{qr_code:{step1:{title:"Trust Wallet 앱을 열기",description:"지갑에 빠르게 접근하기 위해 Trust Wallet을 홈 스크린에 두십시오."},step2:{title:"지갑 생성 또는 가져오기",description:"새로운 지갑을 생성하거나 기존의 것을 가져오십시오."},step3:{title:"설정에서 WalletConnect를 탭하십시오",description:"새 연결을 선택한 다음 QR 코드를 스캔하고, 연결을 확인하는 프롬프트를 확인하십시오."}},extension:{step1:{title:"Trust Wallet 확장 기능을 설치하십시오",description:"브라우저의 오른쪽 상단을 클릭하고 Trust Wallet을 고정하여 쉽게 접근하십시오."},step2:{title:"지갑 생성 또는 가져오기",description:"새로운 지갑을 생성하거나 기존의 것을 가져오십시오."},step3:{title:"브라우저를 새로고침하세요",description:"Trust Wallet을 설정한 후 아래를 클릭하여 브라우저를 새로고침하고 확장 프로그램을 로드합니다."}}},uniswap:{qr_code:{step1:{title:"Uniswap 앱을 엽니다",description:"Uniswap Wallet을 홈 화면에 추가하여 지갑에 더 빠르게 액세스하세요."},step2:{title:"지갑을 만들거나 가져오기",description:"새 지갑을 생성하거나 기존의 것을 가져옵니다."},step3:{title:"QR 아이콘을 누르고 스캔하기",description:"홈화면의 QR 아이콘을 누르고 코드를 스캔하고 프롬프트를 확인하여 연결하세요."}}},zerion:{qr_code:{step1:{title:"Zerion 앱을 엽니다",description:"더 빠른 접근을 위해 Zerion을 홈 화면에 두는 것을 권장합니다."},step2:{title:"지갑 만들기 또는 가져오기",description:"안전한 방법으로 지갑을 백업하십시오. 절대로 비밀 구절을 누군가와 공유하지 마십시오."},step3:{title:"스캔 버튼을 탭하십시오",description:"스캔 후 연결 프롬프트가 나타나 지갑을 연결하십시오."}},extension:{step1:{title:"Zerion 확장 프로그램을 설치하십시오",description:"지갑에 더 빠르게 접근할 수 있도록 Zerion을 작업 표시줄에 고정하는 것을 권장합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하세요. 비밀 구문을 절대로 다른 사람과 공유하지 마세요."},step3:{title:"브라우저를 새로 고치세요",description:"지갑을 설정한 후 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하세요."}}},rainbow:{qr_code:{step1:{title:"Rainbow 앱 열기",description:"지갑에 더 빠르게 접근하기 위해 홈 화면에 Rainbow를 두는 것을 추천합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"휴대폰에 있는 백업 기능을 사용하여 지갑을 쉽게 백업할 수 있습니다."},step3:{title:"스캔 버튼을 누르세요",description:"스캔 후, 지갑을 연결하라는 연결 프롬프트가 나타납니다."}}},enkrypt:{extension:{step1:{description:"지갑에 더 빠르게 접근하기 위해 작업 표시줄에 Enkrypt Wallet를 고정하는 것을 추천합니다.",title:"Enkrypt Wallet 확장 프로그램을 설치하세요"},step2:{description:"지갑을 안전한 방법으로 백업하십시오. 절대로 비밀 문구를 다른 사람과 공유하지 마십시오.",title:"지갑 생성 또는 가져오기"},step3:{description:"지갑을 설정한 후에는 아래를 클릭하여 브라우저를 새로 고침하고 확장 프로그램을 로드하세요.",title:"브라우저 새로 고침"}}},frame:{extension:{step1:{description:"지갑에 더 빠르게 접근할 수 있도록 Frame을 작업 표시줄에 고정하는 것을 추천합니다.",title:"Frame 및 동반 확장 프로그램 설치"},step2:{description:"안전한 방법을 사용하여 지갑을 백업하십시오. 절대로 비밀 구문을 다른 사람과 공유하지 마세요.",title:"지갑 생성 또는 가져오기"},step3:{description:"지갑을 설정한 후에는 아래를 클릭하여 브라우저를 새로 고침하고 확장 프로그램을 로드하세요.",title:"브라우저 새로 고침"}}},one_key:{extension:{step1:{title:"OneKey Wallet 확장 프로그램을 설치하세요",description:"지갑에 빠르게 접근할 수 있도록 OneKey Wallet을 작업 표시줄에 고정하는 것을 권장합니다."},step2:{title:"지갑 생성 또는 불러오기",description:"지갑을 안전한 방법으로 백업하십시오. 절대로 비밀 문구를 다른 사람과 공유하지 마십시오."},step3:{title:"브라우저를 새로 고침하십시오",description:"지갑을 설정한 후 아래를 클릭하여 브라우저를 새로 고침하고 확장 프로그램을 로드하십시오."}}},phantom:{extension:{step1:{title:"Phantom 확장 프로그램을 설치하세요",description:"지갑에 더 쉽게 접근할 수 있도록 Phantom을 작업 표시줄에 고정하는 것을 권장합니다."},step2:{title:"지갑 생성 또는 불러오기",description:"안전한 방법을 사용하여 지갑을 백업하십시오. 절대로 누구와도 비밀 복구 구문을 공유하지 마십시오."},step3:{title:"브라우저를 새로고침하십시오",description:"지갑을 설정한 후 아래를 클릭하여 브라우저를 새로고침하고 확장 기능을 로드하십시오."}}},rabby:{extension:{step1:{title:"Rabby 확장 프로그램을 설치하십시오",description:"지갑에 더 빠르게 액세스할 수 있도록 Rabby를 작업표시줄에 고정하는 것을 권장합니다."},step2:{title:"지갑 만들기 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하십시오. 절대로 누구와도 비밀 구문을 공유하지 마십시오."},step3:{title:"브라우저를 새로 고침하십시오",description:"지갑 설정을 완료하면 아래를 클릭하여 브라우저를 새로 고침하고 확장 프로그램을 로드합니다."}}},safeheron:{extension:{step1:{title:"코어 확장 프로그램 설치",description:"지갑에 빠르게 액세스하기 위해 Safeheron을 작업 표시줄에 고정하는 것을 권장합니다."},step2:{title:"지갑 만들기 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하십시오. 비밀 문구를 절대 다른 사람과 공유하지 마십시오."},step3:{title:"브라우저 새로 고침",description:"지갑 설정을 완료하면 아래를 클릭하여 브라우저를 새로 고침하고 확장 프로그램을 로드합니다."}}},taho:{extension:{step1:{title:"Taho 확장 프로그램 설치",description:"지갑에 더 빠르게 액세스하기 위해 Taho를 작업 표시줄에 고정하는 것을 추천합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하십시오. 결코 비밀 문구를 누군가와 공유하지 마십시오."},step3:{title:"브라우저를 새로 고치십시오",description:"지갑을 설정한 후 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하십시오."}}},talisman:{extension:{step1:{title:"탈리스만 확장 프로그램 설치",description:"지갑에 더 빠르게 접근하기 위해 Talisman을 작업 표시줄에 고정하는 것을 추천합니다."},step2:{title:"이더리움 지갑 생성 또는 가져오기",description:"반드시 안전한 방법을 사용하여 지갑을 백업하십시오. 복구 문구를 누구와도 공유하지 마십시오."},step3:{title:"브라우저를 새로 고침하십시오",description:"지갑을 설정 한 후 아래를 클릭하여 브라우저를 새로 고침하고 확장 기능을 로드하십시오."}}},xdefi:{extension:{step1:{title:"XDEFI 지갑 확장 기능을 설치하십시오",description:"지갑에 빠르게 액세스하기 위해 작업 표시줄에 XDEFI Wallet을 고정하는 것을 권장합니다."},step2:{title:"지갑을 만들거나 가져오기",description:"반드시 안전한 방법을 사용하여 지갑을 백업하십시오. 비밀 문구를 누구와도 공유하지 마십시오."},step3:{title:"브라우저를 새로 고침하십시오",description:"지갑을 설정한 후 아래를 클릭하여 브라우저를 새로고침하고 확장 프로그램을 로드하십시오."}}},zeal:{extension:{step1:{title:"Zeal 확장 프로그램을 설치하십시오",description:"월렛에 더 빠르게 액세스할 수 있도록 Zeal을 작업 표시 줄에 고정하는 것을 권장합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하십시오. 절대로 비밀 구문을 누구와도 공유하지 마십시오."},step3:{title:"브라우저를 새로 고침하세요",description:"지갑 설정을 마친 후 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하세요."}}},safepal:{extension:{step1:{title:"SafePal Wallet 확장 프로그램을 설치하세요",description:"브라우저의 오른쪽 상단에서 클릭하고 SafePal Wallet을 고정하여 쉽게 접근하세요."},step2:{title:"지갑을 만들거나 가져옵니다",description:"새로운 지갑을 만들거나 기존의 지갑을 가져옵니다."},step3:{title:"브라우저를 새로 고침하세요",description:"SafePal Wallet을 설정한 후에는 아래를 클릭하여 브라우저를 새로 고치고 확장 기능을 로드하십시오."}},qr_code:{step1:{title:"SafePal Wallet 앱을 열십시오",description:"월렛에 빠르게 액세스할 수 있도록 SafePal Wallet을 홈 화면에 두십시오."},step2:{title:"지갑 생성 또는 가져오기",description:"새로운 지갑을 만들거나 기존의 지갑을 가져옵니다."},step3:{title:"설정에서 WalletConnect를 탭하십시오",description:"새 연결을 선택하고 QR 코드를 스캔한 뒤, 연결하려는 프롬프트를 확인합니다."}}},desig:{extension:{step1:{title:"Desig 확장 프로그램 설치",description:"당신의 지갑에 더 쉽게 접근하기 위해 작업 표시줄에 Desig을 고정하는 것을 권장합니다."},step2:{title:"지갑 생성",description:"안전한 방법을 사용하여 지갑을 백업하십시오. 절대로 비밀 구문을 누구와도 공유하지 마십시오."},step3:{title:"브라우저를 새로 고침하세요",description:"지갑 설정을 마친 후 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하세요."}}},subwallet:{extension:{step1:{title:"SubWallet 확장 프로그램 설치",description:"당신의 지갑에 더 빠르게 접근하기 위해 작업 표시줄에 SubWallet을 고정하는 것을 권장합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"반드시 안전한 방법을 사용하여 지갑을 백업하십시오. 복구 문구를 누구와도 공유하지 마십시오."},step3:{title:"브라우저를 새로 고침하세요",description:"지갑 설정을 마친 후 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하세요."}},qr_code:{step1:{title:"SubWallet 앱 열기",description:"더 빠른 접근을 위해 SubWallet을 홈 화면에 두는 것을 권장합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하십시오. 절대로 비밀 구문을 누구와도 공유하지 마십시오."},step3:{title:"스캔 버튼을 누릅니다",description:"스캔 후에 지갑을 연결하기 위한 연결 요청이 표시됩니다."}}},clv:{extension:{step1:{title:"CLV Wallet 확장 프로그램 설치",description:"당신의 지갑에 더 빠르게 접근하기 위해 작업 표시줄에 CLV Wallet을 고정하는 것을 권장합니다."},step2:{title:"지갑 생성 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하십시오. 절대로 비밀 구문을 누구와도 공유하지 마십시오."},step3:{title:"브라우저를 새로 고침하세요",description:"지갑 설정을 마친 후 아래를 클릭하여 브라우저를 새로 고치고 확장 프로그램을 로드하세요."}},qr_code:{step1:{title:"CLV Wallet 앱을 엽니다",description:"더 빠른 접근을 위해 CLV Wallet을 홈 화면에 놓는 것이 좋습니다."},step2:{title:"지갑 생성 또는 가져오기",description:"안전한 방법을 사용하여 지갑을 백업하십시오. 절대로 비밀 구문을 누구와도 공유하지 마십시오."},step3:{title:"스캔 버튼을 누릅니다",description:"스캔 후에 지갑을 연결하기 위한 연결 요청이 표시됩니다."}}},okto:{qr_code:{step1:{title:"Okto 앱을 엽니다",description:"빠른 접근을 위해 Okto를 홈 화면에 추가합니다"},step2:{title:"MPC Wallet을 만듭니다",description:"계정을 만들고 지갑을 생성합니다"},step3:{title:"설정에서 WalletConnect를 탭하십시오",description:"오른쪽 상단의 QR 아이콘을 탭하고 연결하려면 알림을 확인합니다."}}},ledger:{desktop:{step1:{title:"Ledger Live 앱을 엽니다",description:"빠른 접근을 위해 Ledger Live를 홈화면에 두는 것을 권장합니다."},step2:{title:"Ledger 설정",description:"새 Ledger를 설정하거나 기존 Ledger에 연결하세요."},step3:{title:"연결",description:"스캔 후 연결 요청이 나타나며, 이를 통해 지갑을 연결할 수 있습니다."}},qr_code:{step1:{title:"Ledger Live 앱을 엽니다",description:"빠른 접근을 위해 Ledger Live를 홈화면에 두는 것을 권장합니다."},step2:{title:"Ledger 설정",description:"데스크톱 앱과 동기화하거나 Ledger를 연결할 수 있습니다."},step3:{title:"코드를 스캔하십시오",description:"WalletConnect를 탭하고 스캐너로 전환합니다. 스캔 후 연결 요청이 나타나며, 이를 통해 지갑을 연결할 수 있습니다."}}}},Ng={connect_wallet:U4u,intro:$4u,sign_in:W4u,connect:q4u,connect_scan:H4u,connector_group:G4u,get:Q4u,get_options:K4u,get_mobile:V4u,get_instructions:J4u,chains:Z4u,profile:Y4u,wallet_connectors:X4u},uou={label:"Conectar Carteira"},eou={title:"O que é uma Carteira?",description:"Uma carteira é usada para enviar, receber, armazenar e exibir ativos digitais. Também é uma nova forma de se conectar, sem precisar criar novas contas e senhas em todo site.",digital_asset:{title:"Um lar para seus ativos digitais",description:"Carteiras são usadas para enviar, receber, armazenar e exibir ativos digitais como Ethereum e NFTs."},login:{title:"Uma nova maneira de fazer login",description:"Em vez de criar novas contas e senhas em todos os sites, basta conectar sua carteira."},get:{label:"Obter uma Carteira"},learn_more:{label:"Saiba mais"}},tou={label:"Verifique sua conta",description:"Para concluir a conexão, você deve assinar uma mensagem em sua carteira para confirmar que você é o proprietário desta conta.",message:{send:"Enviar mensagem",preparing:"Preparando mensagem...",cancel:"Cancelar",preparing_error:"Erro ao preparar a mensagem, tente novamente!"},signature:{waiting:"Aguardando assinatura...",verifying:"Verificando assinatura...",signing_error:"Erro ao assinar a mensagem, tente novamente!",verifying_error:"Erro ao verificar assinatura, tente novamente!",oops_error:"Ops, algo deu errado!"}},nou={label:"Conectar",title:"Conectar uma Carteira",new_to_ethereum:{description:"Novo nas carteiras Ethereum?",learn_more:{label:"Saiba mais"}},learn_more:{label:"Saiba mais"},recent:"Recente",status:{opening:"Abrindo %{wallet}...",not_installed:"%{wallet} não está instalado",not_available:"%{wallet} não está disponível",confirm:"Confirme a conexão na extensão"},secondary_action:{get:{description:"Não tem %{wallet}?",label:"OBTER"},install:{label:"INSTALAR"},retry:{label:"TENTAR DE NOVO"}},walletconnect:{description:{full:"Precisa do modal oficial do WalletConnect?",compact:"Precisa do modal WalletConnect?"},open:{label:"ABRIR"}}},rou={title:"Digitalize com %{wallet}",fallback_title:"Digitalize com o seu telefone"},iou={recommended:"Recomendado",other:"Outro",popular:"Popular",more:"Mais",others:"Outros"},aou={title:"Obter uma Carteira",action:{label:"OBTER"},mobile:{description:"Carteira Móvel"},extension:{description:"Extensão do Navegador"},mobile_and_extension:{description:"Carteira Móvel e Extensão"},mobile_and_desktop:{description:"Carteira para Mobile e Desktop"},looking_for:{title:"Não é o que você está procurando?",mobile:{description:"Selecione uma carteira na tela principal para começar com um provedor de carteira diferente."},desktop:{compact_description:"Selecione uma carteira na tela principal para começar com um provedor de carteira diferente.",wide_description:"Selecione uma carteira à esquerda para começar com um provedor de carteira diferente."}}},sou={title:"Comece com %{wallet}",short_title:"Obtenha %{wallet}",mobile:{title:"%{wallet} para Móvel",description:"Use a carteira móvel para explorar o mundo do Ethereum.",download:{label:"Baixe o aplicativo"}},extension:{title:"%{wallet} para %{browser}",description:"Acesse sua carteira diretamente do seu navegador web favorito.",download:{label:"Adicionar ao %{browser}"}},desktop:{title:"%{wallet} para %{platform}",description:"Acesse sua carteira nativamente do seu desktop poderoso.",download:{label:"Adicionar ao %{platform}"}}},oou={title:"Instale %{wallet}",description:"Escaneie com seu celular para baixar no iOS ou Android",continue:{label:"Continuar"}},lou={mobile:{connect:{label:"Conectar"},learn_more:{label:"Saiba mais"}},extension:{refresh:{label:"Atualizar"},learn_more:{label:"Saiba mais"}},desktop:{connect:{label:"Conectar"},learn_more:{label:"Saiba mais"}}},cou={title:"Mudar Redes",wrong_network:"Rede errada detectada, mude ou desconecte para continuar.",confirm:"Confirme na Carteira",switching_not_supported:"Sua carteira não suporta a mudança de redes de %{appName}. Tente mudar de redes dentro da sua carteira.",switching_not_supported_fallback:"Sua carteira não suporta a troca de redes a partir deste aplicativo. Tente trocar de rede dentro de sua carteira.",disconnect:"Desconectar",connected:"Conectado"},Eou={disconnect:{label:"Desconectar"},copy_address:{label:"Copiar Endereço",copied:"Copiado!"},explorer:{label:"Veja mais no explorador"},transactions:{description:"%{appName} transações aparecerão aqui...",description_fallback:"Suas transações aparecerão aqui...",recent:{title:"Transações Recentes"},clear:{label:"Limpar Tudo"}}},dou={argent:{qr_code:{step1:{description:"Coloque o Argent na tela inicial para um acesso mais rápido à sua carteira.",title:"Abra o aplicativo Argent"},step2:{description:"Crie uma carteira e nome de usuário, ou importe uma carteira existente.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois que você escanear, um prompt de conexão aparecerá para você conectar sua carteira.",title:"Toque no botão Scan QR"}}},bifrost:{qr_code:{step1:{description:"Recomendamos colocar a Bifrost Wallet na sua tela inicial para um acesso mais rápido.",title:"Abra o aplicativo Bifrost Wallet"},step2:{description:"Crie ou importe uma carteira usando sua frase de recuperação.",title:"Criar ou Importar uma Carteira"},step3:{description:"Após você escanear, um prompt de conexão aparecerá para você conectar sua carteira.",title:"Toque no botão de escanear"}}},bitget:{qr_code:{step1:{description:"Recomendamos colocar a Bitget Wallet na sua tela inicial para um acesso mais rápido.",title:"Abra o aplicativo Bitget Wallet"},step2:{description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de escanear, um prompt de conexão aparecerá para você conectar sua carteira.",title:"Toque no botão de escaneamento"}},extension:{step1:{description:"Recomendamos fixar a Bitget Wallet na sua barra de tarefas para um acesso mais rápido à sua carteira.",title:"Instale a extensão da Carteira Bitget"},step2:{description:"Certifique-se de fazer o backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão.",title:"Atualize seu navegador"}}},bitski:{extension:{step1:{description:"Recomendamos fixar o Bitski na sua barra de tarefas para um acesso mais rápido à sua carteira.",title:"Instale a extensão Bitski"},step2:{description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão.",title:"Atualize seu navegador"}}},coin98:{qr_code:{step1:{description:"Recomendamos colocar a Carteira Coin98 na tela inicial para um acesso mais rápido à sua carteira.",title:"Abra o aplicativo Carteira Coin98"},step2:{description:"Você pode facilmente fazer backup de sua carteira usando nosso recurso de backup em seu telefone.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de escanear, uma solicitação de conexão aparecerá para você conectar sua carteira.",title:"Toque no botão WalletConnect"}},extension:{step1:{description:"Clique no canto superior direito do seu navegador e fixe a Carteira Coin98 para fácil acesso.",title:"Instale a extensão da Carteira Coin98"},step2:{description:"Crie uma nova carteira ou importe uma existente.",title:"Criar ou Importar uma carteira"},step3:{description:"Depois de configurar a Carteira Coin98, clique abaixo para atualizar o navegador e carregar a extensão.",title:"Atualize seu navegador"}}},coinbase:{qr_code:{step1:{description:"Recomendamos colocar a Carteira Coinbase na tela inicial para um acesso mais rápido.",title:"Abra o aplicativo Coinbase Wallet"},step2:{description:"Você pode fazer backup da sua carteira facilmente usando o recurso de backup na nuvem.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de escanear, um prompt de conexão aparecerá para que você conecte sua carteira.",title:"Toque no botão de escanear"}},extension:{step1:{description:"Recomendamos fixar o Coinbase Wallet na sua barra de tarefas para um acesso mais rápido à sua carteira.",title:"Instale a extensão Coinbase Wallet"},step2:{description:"Certifique-se de fazer backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém.",title:"Criar ou Importar uma Carteira"},step3:{description:"Uma vez que você configurou sua carteira, clique abaixo para atualizar o navegador e carregar a extensão.",title:"Atualize seu navegador"}}},core:{qr_code:{step1:{description:"Recomendamos colocar o Core na tela inicial para um acesso mais rápido à sua carteira.",title:"Abra o aplicativo Core"},step2:{description:"Você pode facilmente salvar sua carteira usando nosso recurso de backup no seu celular.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de escanear, um prompt de conexão aparecerá para você conectar sua carteira.",title:"Toque no botão WalletConnect"}},extension:{step1:{description:"Recomendamos fixar o Core na sua barra de tarefas para um acesso mais rápido à sua carteira.",title:"Instale a extensão Core"},step2:{description:"Certifique-se de fazer backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão.",title:"Atualize seu navegador"}}},fox:{qr_code:{step1:{description:"Recomendamos colocar o FoxWallet na tela inicial para um acesso mais rápido.",title:"Abra o aplicativo FoxWallet"},step2:{description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de escanear, uma solicitação de conexão aparecerá para você conectar sua carteira.",title:"Toque no botão de escaneamento"}}},frontier:{qr_code:{step1:{description:"Recomendamos colocar o Frontier Wallet na tela inicial para um acesso mais rápido.",title:"Abra o aplicativo Frontier Wallet"},step2:{description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de escanear, aparecerá um prompt de conexão para você conectar sua carteira.",title:"Toque no botão de varredura"}},extension:{step1:{description:"Recomendamos fixar a Carteira Frontier na sua barra de tarefas para um acesso mais rápido à sua carteira.",title:"Instale a extensão da Carteira Frontier"},step2:{description:"Certifique-se de fazer backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão.",title:"Atualize seu navegador"}}},im_token:{qr_code:{step1:{title:"Abra o aplicativo imToken",description:"Coloque o aplicativo imToken na tela inicial para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Crie uma nova carteira ou importe uma existente."},step3:{title:"Toque no ícone do Scanner no canto superior direito",description:"Escolha Nova Conexão, em seguida, escaneie o código QR e confirme o prompt para conectar."}}},metamask:{qr_code:{step1:{title:"Abra o aplicativo MetaMask",description:"Recomendamos colocar o MetaMask na tela inicial para um acesso mais rápido."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Toque no botão escanear",description:"Depois de escanear, aparecerá um prompt de conexão para você conectar sua carteira."}},extension:{step1:{title:"Instale a extensão MetaMask",description:"Recomendamos fixar o MetaMask na barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize o seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},okx:{qr_code:{step1:{title:"Abra o aplicativo da Carteira OKX",description:"Recomendamos colocar a Carteira OKX na tela inicial para um acesso mais rápido."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer o backup da sua carteira utilizando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Toque no botão de digitalização",description:"Depois de escanear, aparecerá um prompt de conexão para você conectar sua carteira."}},extension:{step1:{title:"Instale a extensão OKX Wallet",description:"Recomendamos fixar a OKX Wallet na sua barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer o backup da sua carteira utilizando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize o seu navegador",description:"Uma vez que você configurou sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},omni:{qr_code:{step1:{title:"Abra o aplicativo Omni",description:"Adicione o Omni à sua tela inicial para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Crie uma nova carteira ou importe uma existente."},step3:{title:"Toque no ícone do QR e escaneie",description:"Toque no ícone QR na tela inicial, escaneie o código e confirme o prompt para conectar."}}},token_pocket:{qr_code:{step1:{title:"Abra o aplicativo TokenPocket",description:"Recomendamos colocar o TokenPocket na tela inicial para um acesso mais rápido."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Toque no botão de digitalização",description:"Depois de escanear, aparecerá um prompt de conexão para você conectar sua carteira."}},extension:{step1:{title:"Instale a extensão TokenPocket",description:"Recomendamos fixar o TokenPocket em sua barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize seu navegador",description:"Uma vez que você configurou sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},trust:{qr_code:{step1:{title:"Abra o aplicativo Trust Wallet",description:"Coloque o Trust Wallet na tela inicial para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Crie uma nova carteira ou importe uma existente."},step3:{title:"Toque em WalletConnect nas Configurações",description:"Escolha Nova Conexão, depois escaneie o QR code e confirme o prompt para se conectar."}},extension:{step1:{title:"Instale a extensão Trust Wallet",description:"Clique no canto superior direito do seu navegador e marque Trust Wallet para fácil acesso."},step2:{title:"Crie ou Importe uma carteira",description:"Crie uma nova carteira ou importe uma existente."},step3:{title:"Atualize seu navegador",description:"Depois que configurar a Trust Wallet, clique abaixo para atualizar o navegador e carregar a extensão."}}},uniswap:{qr_code:{step1:{title:"Abra o aplicativo Uniswap",description:"Adicione a Carteira Uniswap à sua tela inicial para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Crie uma nova carteira ou importe uma existente."},step3:{title:"Toque no ícone QR e escaneie",description:"Toque no ícone QR na sua tela inicial, escaneie o código e confirme o prompt para conectar."}}},zerion:{qr_code:{step1:{title:"Abra o aplicativo Zerion",description:"Recomendamos colocar o Zerion na sua tela inicial para um acesso mais rápido."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Toque no botão de digitalização",description:"Depois de digitalizar, um prompt de conexão aparecerá para que você possa conectar sua carteira."}},extension:{step1:{title:"Instale a extensão Zerion",description:"Recomendamos fixar o Zerion na sua barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},rainbow:{qr_code:{step1:{title:"Abra o aplicativo Rainbow",description:"Recomendamos colocar o Rainbow na tela inicial para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Você pode facilmente fazer backup da sua carteira usando nosso recurso de backup no seu telefone."},step3:{title:"Toque no botão de digitalizar",description:"Depois de escanear, uma solicitação de conexão aparecerá para você conectar sua carteira."}}},enkrypt:{extension:{step1:{description:"Recomendamos fixar a Carteira Enkrypt na sua barra de tarefas para um acesso mais rápido à sua carteira.",title:"Instale a extensão da Carteira Enkrypt"},step2:{description:"Certifique-se de fazer backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão.",title:"Atualize o seu navegador"}}},frame:{extension:{step1:{description:"Recomendamos fixar o Frame na sua barra de tarefas para um acesso mais rápido à sua carteira.",title:"Instale o Frame e a extensão complementar"},step2:{description:"Certifique-se de fazer backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém.",title:"Criar ou Importar uma Carteira"},step3:{description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão.",title:"Atualize seu navegador"}}},one_key:{extension:{step1:{title:"Instale a extensão OneKey Wallet",description:"Recomendamos fixar a OneKey Wallet na sua barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize seu navegador",description:"Uma vez que você configurou sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},phantom:{extension:{step1:{title:"Instale a extensão Phantom",description:"Recomendamos fixar o Phantom na sua barra de tarefas para facilitar o acesso à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta de recuperação com ninguém."},step3:{title:"Atualize seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},rabby:{extension:{step1:{title:"Instale a extensão Rabby",description:"Recomendamos fixar Rabby na sua barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},safeheron:{extension:{step1:{title:"Instale a extensão Core",description:"Recomendamos fixar Safeheron na sua barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer o backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},taho:{extension:{step1:{title:"Instale a extensão Taho",description:"Recomendamos fixar o Taho na sua barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer o backup da sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},talisman:{extension:{step1:{title:"Instale a extensão Talisman",description:"Recomendamos fixar o Talisman na sua barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Crie ou Importe uma Carteira Ethereum",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase de recuperação com ninguém."},step3:{title:"Atualize o seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},xdefi:{extension:{step1:{title:"Instale a extensão XDEFI Wallet",description:"Recomendamos fixar a Carteira XDEFI na sua barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},zeal:{extension:{step1:{title:"Instale a extensão Zeal",description:"Recomendamos fixar o Zeal na sua barra de tarefas para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},safepal:{extension:{step1:{title:"Instale a extensão da Carteira SafePal",description:"Clique no canto superior direito do seu navegador e fixe a Carteira SafePal para fácil acesso."},step2:{title:"Criar ou Importar uma carteira",description:"Crie uma nova carteira ou importe uma existente."},step3:{title:"Atualize seu navegador",description:"Depois de configurar a Carteira SafePal, clique abaixo para atualizar o navegador e carregar a extensão."}},qr_code:{step1:{title:"Abra o aplicativo Carteira SafePal",description:"Coloque a Carteira SafePal na tela inicial para um acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Crie uma nova carteira ou importe uma existente."},step3:{title:"Toque em WalletConnect nas Configurações",description:"Escolha Nova Conexão, em seguida, escaneie o código QR e confirme o prompt para conectar."}}},desig:{extension:{step1:{title:"Instale a extensão Desig",description:"Recomendamos fixar Desig na sua barra de tarefas para facilitar o acesso à sua carteira."},step2:{title:"Criar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}}},subwallet:{extension:{step1:{title:"Instale a extensão SubWallet",description:"Recomendamos fixar SubWallet na sua barra de tarefas para acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase de recuperação com ninguém."},step3:{title:"Atualize seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}},qr_code:{step1:{title:"Abra o aplicativo SubWallet",description:"Recomendamos colocar SubWallet na tela inicial para acesso mais rápido."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Toque no botão de escanear",description:"Depois que você escanear, um prompt de conexão aparecerá para você conectar sua carteira."}}},clv:{extension:{step1:{title:"Instale a extensão CLV Wallet",description:"Recomendamos fixar CLV Wallet na sua barra de tarefas para acesso mais rápido à sua carteira."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Atualize seu navegador",description:"Depois de configurar sua carteira, clique abaixo para atualizar o navegador e carregar a extensão."}},qr_code:{step1:{title:"Abra o aplicativo da carteira CLV",description:"Recomendamos colocar a Carteira CLV na tela inicial para acesso mais rápido."},step2:{title:"Criar ou Importar uma Carteira",description:"Certifique-se de fazer backup de sua carteira usando um método seguro. Nunca compartilhe sua frase secreta com ninguém."},step3:{title:"Toque no botão de escanear",description:"Depois que você escanear, um prompt de conexão aparecerá para você conectar sua carteira."}}},okto:{qr_code:{step1:{title:"Abra o aplicativo Okto",description:"Adicione Okto à sua tela inicial para acesso rápido"},step2:{title:"Crie uma carteira MPC",description:"Crie uma conta e gere uma carteira"},step3:{title:"Toque em WalletConnect nas Configurações",description:"Toque no ícone Scan QR no canto superior direito e confirme o prompt para conectar."}}},ledger:{desktop:{step1:{title:"Abra o aplicativo Ledger Live",description:"Recomendamos colocar o Ledger Live na tela inicial para um acesso mais rápido."},step2:{title:"Configure seu Ledger",description:"Configure um novo Ledger ou conecte-se a um já existente."},step3:{title:"Conectar",description:"Depois de escanear, aparecerá um prompt de conexão para você conectar sua carteira."}},qr_code:{step1:{title:"Abra o aplicativo Ledger Live",description:"Recomendamos colocar o Ledger Live na tela inicial para um acesso mais rápido."},step2:{title:"Configure seu Ledger",description:"Você pode sincronizar com o aplicativo de desktop ou conectar seu Ledger."},step3:{title:"Escanear o código",description:"Toque em WalletConnect e em seguida mude para Scanner. Depois de escanear, aparecerá um prompt de conexão para você conectar sua carteira."}}}},Rg={connect_wallet:uou,intro:eou,sign_in:tou,connect:nou,connect_scan:rou,connector_group:iou,get:aou,get_options:sou,get_mobile:oou,get_instructions:lou,chains:cou,profile:Eou,wallet_connectors:dou},fou={label:"Подключить кошелек"},pou={title:"Что такое кошелек?",description:"Кошелек используется для отправки, получения, хранения и отображения цифровых активов. Это также новый способ входа в систему, без необходимости создания новых учетных записей и паролей на каждом сайте.",digital_asset:{title:"Дом для ваших цифровых активов",description:"Кошельки используются для отправки, получения, хранения и отображения цифровых активов, таких как Ethereum и NFT."},login:{title:"Новый способ входа в систему",description:"Вместо создания новых аккаунтов и паролей на каждом сайте, просто подключите ваш кошелек."},get:{label:"Получить кошелек"},learn_more:{label:"Узнать больше"}},hou={label:"Проверьте ваш аккаунт",description:"Чтобы завершить подключение, вы должны подписать сообщение в вашем кошельке, чтобы подтвердить, что вы являетесь владельцем этого аккаунта.",message:{send:"Отправить сообщение",preparing:"Подготовка сообщения...",cancel:"Отмена",preparing_error:"Ошибка при подготовке сообщения, пожалуйста, попробуйте снова!"},signature:{waiting:"Ожидание подписи...",verifying:"Проверка подписи...",signing_error:"Ошибка при подписании сообщения, пожалуйста, попробуйте снова!",verifying_error:"Ошибка при проверке подписи, пожалуйста, попробуйте снова!",oops_error:"Ой, что-то пошло не так!"}},Cou={label:"Подключить",title:"Подключить кошелек",new_to_ethereum:{description:"Впервые столкнулись с кошельками Ethereum?",learn_more:{label:"Узнать больше"}},learn_more:{label:"Узнать больше"},recent:"Недавние",status:{opening:"Открывается %{wallet}...",not_installed:"%{wallet} не установлен",not_available:"%{wallet} не доступен",confirm:"Подтвердите подключение в расширении"},secondary_action:{get:{description:"У вас нет %{wallet}?",label:"ПОЛУЧИТЬ"},install:{label:"УСТАНОВИТЬ"},retry:{label:"ПОВТОРИТЬ"}},walletconnect:{description:{full:"Нужен официальный модальный окно WalletConnect?",compact:"Нужен модальный окно WalletConnect?"},open:{label:"ОТКРЫТЬ"}}},mou={title:"Сканировать с помощью %{wallet}",fallback_title:"Сканировать с помощью вашего телефона"},Aou={recommended:"Рекомендуемые",other:"Другие",popular:"Популярные",more:"Больше",others:"Другие"},gou={title:"Получить кошелек",action:{label:"ПОЛУЧИТЬ"},mobile:{description:"Мобильный кошелек"},extension:{description:"Расширение для браузера"},mobile_and_extension:{description:"Мобильный кошелек и расширение"},mobile_and_desktop:{description:"Мобильный и настольный кошелек"},looking_for:{title:"Не то, что вы ищете?",mobile:{description:"Выберите кошелек на главном экране, чтобы начать работу с другим провайдером кошелька."},desktop:{compact_description:"Выберите кошелек на главном экране, чтобы начать работу с другим провайдером кошелька.",wide_description:"Выберите кошелек слева, чтобы начать работу с другим провайдером кошелька."}}},Bou={title:"Начните с %{wallet}",short_title:"Получить %{wallet}",mobile:{title:"%{wallet} для мобильных",description:"Используйте мобильный кошелек для исследования мира Ethereum.",download:{label:"Скачать приложение"}},extension:{title:"%{wallet} для %{browser}",description:"Доступ к вашему кошельку прямо из вашего любимого веб-браузера.",download:{label:"Добавить в %{browser}"}},desktop:{title:"%{wallet} для %{platform}",description:"Получите доступ к вашему кошельку нативно со своего мощного рабочего стола.",download:{label:"Добавить в %{platform}"}}},you={title:"Установить %{wallet}",description:"Отсканируйте на своем телефоне для скачивания на iOS или Android",continue:{label:"Продолжить"}},Fou={mobile:{connect:{label:"Подключить"},learn_more:{label:"Узнать больше"}},extension:{refresh:{label:"Обновить"},learn_more:{label:"Узнать больше"}},desktop:{connect:{label:"Подключить"},learn_more:{label:"Узнать больше"}}},Dou={title:"Переключить сети",wrong_network:"Обнаружена неверная сеть, переключитесь или отключитесь для продолжения.",confirm:"Подтвердить в кошельке",switching_not_supported:"Ваш кошелек не поддерживает переключение сетей с %{appName}. Попробуйте переключить сети из вашего кошелька.",switching_not_supported_fallback:"Ваш кошелек не поддерживает переключение сетей из этого приложения. Попробуйте переключить сети из вашего кошелька.",disconnect:"Отключить",connected:"Подключено"},vou={disconnect:{label:"Отключить"},copy_address:{label:"Скопировать адрес",copied:"Скопировано!"},explorer:{label:"Посмотреть больше в эксплорере"},transactions:{description:"%{appName} транзакции появятся здесь...",description_fallback:"Ваши транзакции появятся здесь...",recent:{title:"Недавние транзакции"},clear:{label:"Очистить все"}}},bou={argent:{qr_code:{step1:{description:"Добавьте Argent на домашний экран для более быстрого доступа к вашему кошельку.",title:"Откройте приложение Argent"},step2:{description:"Создайте кошелек и имя пользователя или импортируйте существующий кошелек.",title:"Создать или Импортировать кошелек"},step3:{description:"После сканирования появится запрос на подключение для подключения вашего кошелька.",title:"Нажмите кнопку Сканировать QR"}}},bifrost:{qr_code:{step1:{description:"Мы рекомендуем добавить кошелек Bifrost на ваш начальный экран для более быстрого доступа.",title:"Откройте приложение Bifrost Wallet"},step2:{description:"Создайте или импортируйте кошелек, используя вашу фразу восстановления.",title:"Создать или импортировать кошелек"},step3:{description:"После сканирования появится запрос на подключение вашего кошелька.",title:"Нажмите кнопку сканирования"}}},bitget:{qr_code:{step1:{description:"Мы рекомендуем добавить Bitget Wallet на ваш экран для более быстрого доступа.",title:"Откройте приложение Bitget Wallet"},step2:{description:"Обязательно сделайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо.",title:"Создать или импортировать кошелек"},step3:{description:"После сканирования появится запрос на подключение вашего кошелька.",title:"Нажмите кнопку сканирования"}},extension:{step1:{description:"Мы рекомендуем закрепить Bitget Wallet на панели задач для более быстрого доступа к вашему кошельку.",title:"Установите расширение Bitget Wallet"},step2:{description:"Обязательно сохраните резервную копию вашего кошелька с помощью надёжного метода. Никогда не делитесь своей секретной фразой с кем-либо.",title:"Создать или Импортировать кошелек"},step3:{description:"После настройки вашего кошелька, нажмите ниже, чтобы обновить браузер и загрузить расширение.",title:"Обновите ваш браузер"}}},bitski:{extension:{step1:{description:"Мы рекомендуем прикрепить Bitski к вашей панели задач для более быстрого доступа к вашему кошельку.",title:"Установите расширение Bitski"},step2:{description:"Обязательно сохраните резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо.",title:"Создать кошелек или Импортировать кошелек"},step3:{description:"После того как вы настроите свой кошелек, нажмите ниже, чтобы обновить браузер и загрузить расширение.",title:"Обновите ваш браузер"}}},coin98:{qr_code:{step1:{description:"Мы рекомендуем добавить Coin98 Wallet на ваш главный экран для более быстрого доступа к вашему кошельку.",title:"Откройте приложение Coin98 Wallet"},step2:{description:"Вы можете легко сделать резервную копию вашего кошелька, используя нашу функцию резервного копирования на вашем телефоне.",title:"Создать или импортировать кошелек"},step3:{description:"После сканирования для вас появится запрос на подключение, чтобы подключить ваш кошелек.",title:"Нажмите кнопку WalletConnect"}},extension:{step1:{description:"Нажмите в верхнем правом углу вашего браузера и закрепите Coin98 Wallet для удобного доступа.",title:"Установите расширение Coin98 Wallet"},step2:{description:"Создайте новый кошелек или импортируйте существующий.",title:"Создайте или импортируйте кошелек"},step3:{description:"После того как вы настроите Кошелек Coin98, нажмите ниже, чтобы обновить браузер и загрузить расширение.",title:"Обновите ваш браузер"}}},coinbase:{qr_code:{step1:{description:"Мы рекомендуем добавить Coinbase Wallet на ваш экран начала для более быстрого доступа.",title:"Откройте приложение Coinbase Wallet"},step2:{description:"Вы легко можете сделать резервную копию вашего кошелька, используя функцию облачного резервного копирования.",title:"Создать или Импортировать кошелек"},step3:{description:"После сканирования появится запрос на подключение для подключения вашего кошелька.",title:"Нажмите кнопку сканирования"}},extension:{step1:{description:"Мы рекомендуем закрепить Coinbase Wallet на вашей панели задач для более быстрого доступа к вашему кошельку.",title:"Установите расширение Coinbase Wallet"},step2:{description:"Обязательно сделайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо.",title:"Создать или Импортировать кошелек"},step3:{description:"После настройки вашего кошелька, нажмите ниже, чтобы обновить браузер и загрузить расширение.",title:"Обновите ваш браузер"}}},core:{qr_code:{step1:{description:"Мы рекомендуем добавить Core на ваш экран быстрого доступа для ускоренного доступа к вашему кошельку.",title:"Открыть приложение Core"},step2:{description:"Вы можете легко создать резервную копию вашего кошелька, используя нашу функцию резервного копирования на вашем телефоне.",title:"Создать или Импортировать кошелек"},step3:{description:"После сканирования появится запрос на подключение, чтобы вы могли подключить ваш кошелек.",title:"Нажмите кнопку WalletConnect"}},extension:{step1:{description:"Мы рекомендуем закрепить Core на панели задач для более быстрого доступа к вашему кошельку.",title:"Установите расширение Core"},step2:{description:"Обязательно создайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь вашей секретной фразой с кем-либо.",title:"Создать или Импортировать кошелек"},step3:{description:"Как только вы настроите ваш кошелек, нажмите ниже, чтобы обновить браузер и загрузить расширение.",title:"Обновите ваш браузер"}}},fox:{qr_code:{step1:{description:"Мы рекомендуем поместить FoxWallet на ваш экран начального экрана для более быстрого доступа.",title:"Откройте приложение FoxWallet"},step2:{description:"Обязательно сделайте резервное копирование вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо.",title:"Создать или Импортировать кошелек"},step3:{description:"После сканирования появится приглашение для подключения вашего кошелька.",title:"Нажмите кнопку сканирования"}}},frontier:{qr_code:{step1:{description:"Мы рекомендуем установить Frontier Wallet на экран вашего смартфона для более быстрого доступа.",title:"Откройте приложение Frontier Wallet"},step2:{description:"Обязательно сделайте резервное копирование вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо.",title:"Создать или Импортировать кошелек"},step3:{description:"После сканирования появится запрос на подключение кошелька.",title:"Нажмите кнопку сканирования"}},extension:{step1:{description:"Мы рекомендуем прикрепить кошелек Frontier к панели задач для более быстрого доступа к вашему кошельку.",title:"Установите расширение кошелька Frontier"},step2:{description:"Обязательно сделайте резервную копию своего кошелька с использованием надежного метода. Никогда не делитесь своей секретной фразой с кем-либо.",title:"Создать или импортировать кошелек"},step3:{description:"После настройки вашего кошелька нажмите ниже, чтобы обновить браузер и загрузить расширение.",title:"Обновите ваш браузер"}}},im_token:{qr_code:{step1:{title:"Откройте приложение imToken",description:"Поместите приложение imToken на главный экран для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или импортировать кошелек",description:"Создайте новый кошелек или импортируйте существующий."},step3:{title:"Нажмите на иконку сканера в верхнем правом углу",description:"Выберите Новое соединение, затем отсканируйте QR-код и подтвердите запрос на соединение."}}},metamask:{qr_code:{step1:{title:"Откройте приложение MetaMask",description:"Мы рекомендуем поместить MetaMask на главный экран для быстрого доступа."},step2:{title:"Создайте или импортируйте кошелек",description:"Обязательно сохраните копию своего кошелька с помощью надежного метода. Никогда не делитесь своей секретной фразой с кем бы то ни было."},step3:{title:"Нажмите кнопку сканирования",description:"После сканирования появится запрос на соединение вашего кошелька."}},extension:{step1:{title:"Установите расширение MetaMask",description:"Мы рекомендуем закрепить MetaMask на вашей панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или импортировать кошелек",description:"Обязательно сохраните резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После настройки вашего кошелька, щелкните ниже, чтобы обновить браузер и загрузить расширение."}}},okx:{qr_code:{step1:{title:"Откройте приложение кошелька OKX",description:"Мы рекомендуем разместить кошелек OKX на вашем главном экране для более быстрого доступа."},step2:{title:"Создать или импортировать кошелек",description:"Обязательно сохраните резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Нажмите на кнопку сканирования",description:"После сканирования появится запрос на подключение вашего кошелька."}},extension:{step1:{title:"Установите расширение кошелька OKX",description:"Мы рекомендуем закрепить OKX Wallet на панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создать кошелек или импортировать кошелек",description:"Обязательно сохраните резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Обновите ваш браузер",description:"Как только вы настроите свой кошелек, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},omni:{qr_code:{step1:{title:"Откройте приложение Omni",description:"Добавьте Omni на свой домашний экран для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или импортировать кошелек",description:"Создайте новый кошелек или импортируйте существующий."},step3:{title:"Нажмите на иконку QR и отсканируйте",description:"Нажмите на иконку QR на вашем домашнем экране, отсканируйте код и подтвердите подсказку, чтобы подключиться."}}},token_pocket:{qr_code:{step1:{title:"Откройте приложение TokenPocket",description:"Мы рекомендуем разместить TokenPocket на вашем домашнем экране для быстрого доступа."},step2:{title:"Создать или Импортировать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька при помощи безопасного метода. Никогда не делитесь своим секретным кодом с кем-либо."},step3:{title:"Нажмите на кнопку сканирования",description:"После сканирования появится подсказка о подключении для подключения вашего кошелька."}},extension:{step1:{title:"Установите расширение TokenPocket",description:"Мы рекомендуем закрепить TokenPocket на вашей панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или Импортировать кошелек",description:"Обязательно создайте резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После того как вы настроите свой кошелек, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},trust:{qr_code:{step1:{title:"Откройте приложение Trust Wallet",description:"Разместите Trust Wallet на вашем домашнем экране для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или Импортировать кошелек",description:"Создайте новый кошелек или импортируйте существующий."},step3:{title:"Нажмите WalletConnect в настройках",description:"Выберите Новое соединение, затем сканируйте QR-код и подтвердите запрос на подключение."}},extension:{step1:{title:"Установите расширение Trust Wallet",description:"Кликните в правом верхнем углу вашего браузера и закрепите Trust Wallet для легкого доступа."},step2:{title:"Создайте или импортируйте кошелек",description:"Создайте новый кошелек или импортируйте существующий."},step3:{title:"Обновите ваш браузер",description:"После настройки Trust Wallet, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},uniswap:{qr_code:{step1:{title:"Откройте приложение Uniswap",description:"Добавьте кошелек Uniswap на главный экран для быстрого доступа к вашему кошельку."},step2:{title:"Создать или импортировать кошелек",description:"Создайте новый кошелек или импортируйте существующий."},step3:{title:"Нажмите на иконку QR и отсканируйте",description:"Нажмите на иконку QR на главном экране, отсканируйте код и подтвердите запрос на подключение."}}},zerion:{qr_code:{step1:{title:"Откройте приложение Zerion",description:"Мы рекомендуем разместить Zerion на главном экране для более быстрого доступа."},step2:{title:"Создать или импортировать кошелек",description:"Обязательно создайте резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Нажмите кнопку сканирования",description:"После сканирования вам будет предложено подключить ваш кошелек."}},extension:{step1:{title:"Установите расширение Zerion",description:"Мы рекомендуем прикрепить Zerion к вашей панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создайте или импортируйте кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с помощью безопасного метода. Никогда не делясь своим секретным паролем с кем-либо."},step3:{title:"Обновите ваш браузер",description:"Как только вы настроите свой кошелек, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},rainbow:{qr_code:{step1:{title:"Откройте приложение Rainbow",description:"Мы рекомендуем поместить Rainbow на ваш экран главного меню для более быстрого доступа к вашему кошельку."},step2:{title:"Создайте или импортируйте кошелек",description:"Вы можете легко сделать резервную копию вашего кошелька с помощью нашей функции резервного копирования на вашем телефоне."},step3:{title:"Нажмите кнопку сканировать",description:"После сканирования появится запрос на подключение вашего кошелька."}}},enkrypt:{extension:{step1:{description:"Мы рекомендуем закрепить Enkrypt Wallet на панели задач для более быстрого доступа к вашему кошельку.",title:"Установите расширение Enkrypt Wallet"},step2:{description:"Обязательно сделайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо.",title:"Создать или импортировать кошелек"},step3:{description:"Как только вы настроите свой кошелек, нажмите ниже, чтобы обновить браузер и загрузить расширение.",title:"Обновите ваш браузер"}}},frame:{extension:{step1:{description:"Мы рекомендуем закрепить Frame на панели задач для более быстрого доступа к вашему кошельку.",title:"Установите Frame и дополнительное расширение"},step2:{description:"Обязательно создайте резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо.",title:"Создайте или Импортируйте кошелек"},step3:{description:"После того как вы настроите свой кошелек, нажмите ниже, чтобы обновить браузер и загрузить расширение.",title:"Обновите ваш браузер"}}},one_key:{extension:{step1:{title:"Установите расширение OneKey Wallet",description:"Мы рекомендуем закрепить OneKey Wallet на панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создайте или Импортируйте кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После настройки кошелька нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},phantom:{extension:{step1:{title:"Установите расширение Phantom",description:"Мы рекомендуем закрепить Phantom на панели задач для более удобного доступа к вашему кошельку."},step2:{title:"Создать или Импортировать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь своей секретной фразой восстановления с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После того как вы настроите свой кошелек, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},rabby:{extension:{step1:{title:"Установите расширение Rabby",description:"Мы рекомендуем закрепить Rabby на панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или импортировать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь своей секретной фразой с кем бы то ни было."},step3:{title:"Обновите ваш браузер",description:"После настройки вашего кошелька, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},safeheron:{extension:{step1:{title:"Установите основное расширение",description:"Мы рекомендуем закрепить SafeHeron на панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или импортировать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После того, как вы настроите ваш кошелек, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},taho:{extension:{step1:{title:"Установите расширение Taho",description:"Мы рекомендуем закрепить Taho на вашей панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или импортировать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После настройки вашего кошелька, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},talisman:{extension:{step1:{title:"Установите расширение Talisman",description:"Мы рекомендуем закрепить Talisman на вашей панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создайте или импортируйте кошелек Ethereum",description:"Обязательно сделайте резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь вашей фразой восстановления с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После настройки вашего кошелька, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},xdefi:{extension:{step1:{title:"Установите расширение кошелька XDEFI",description:"Мы рекомендуем закрепить XDEFI Wallet на панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или Импортировать кошелек",description:"Обязательно создайте резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После того, как вы настроите свой кошелек, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},zeal:{extension:{step1:{title:"Установите расширение Zeal",description:"Мы рекомендуем закрепить Zeal на панели задач для быстрого доступа к вашему кошельку."},step2:{title:"Создать или Импортировать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После настройки вашего кошелька, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},safepal:{extension:{step1:{title:"Установите расширение SafePal Wallet",description:"Кликните в верхнем правом углу вашего браузера и закрепите SafePal Wallet для удобного доступа."},step2:{title:"Создайте или импортируйте кошелек",description:"Создайте новый кошелек или импортируйте существующий."},step3:{title:"Обновите ваш браузер",description:"После настройки кошелька SafePal нажмите ниже, чтобы обновить браузер и загрузить расширение."}},qr_code:{step1:{title:"Откройте приложение SafePal Wallet",description:"Разместите SafePal Wallet на главном экране для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или Импортировать кошелек",description:"Создайте новый кошелек или импортируйте существующий."},step3:{title:"Нажмите WalletConnect в настройках",description:"Выберите Новое соединение, затем отсканируйте QR-код и подтвердите запрос на соединение."}}},desig:{extension:{step1:{title:"Установите расширение Desig",description:"Мы рекомендуем закрепить Desig на вашей панели задач для более удобного доступа к вашему кошельку."},step2:{title:"Создать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После настройки вашего кошелька, нажмите ниже, чтобы обновить браузер и загрузить расширение."}}},subwallet:{extension:{step1:{title:"Установите расширение SubWallet",description:"Мы рекомендуем закрепить SubWallet на вашей панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или Импортировать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с помощью безопасного метода. Никогда не делитесь вашей фразой восстановления с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После настройки вашего кошелька, нажмите ниже, чтобы обновить браузер и загрузить расширение."}},qr_code:{step1:{title:"Откройте приложение SubWallet",description:"Мы рекомендуем добавить SubWallet на ваш экран начальной страницы для более быстрого доступа."},step2:{title:"Создать или Импортировать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Нажмите кнопку сканирования",description:"После сканирования появится запрос на подключение для подключения вашего кошелька."}}},clv:{extension:{step1:{title:"Установите расширение CLV Wallet",description:"Мы рекомендуем закрепить CLV Wallet на вашей панели задач для более быстрого доступа к вашему кошельку."},step2:{title:"Создать или Импортировать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Обновите ваш браузер",description:"После настройки вашего кошелька, нажмите ниже, чтобы обновить браузер и загрузить расширение."}},qr_code:{step1:{title:"Откройте приложение CLV Wallet",description:"Мы рекомендуем поместить CLV Wallet на ваш экран домой для более быстрого доступа."},step2:{title:"Создать или Импортировать кошелек",description:"Обязательно сделайте резервную копию вашего кошелька с использованием безопасного метода. Никогда не делитесь своей секретной фразой с кем-либо."},step3:{title:"Нажмите кнопку сканирования",description:"После сканирования появится запрос на подключение для подключения вашего кошелька."}}},okto:{qr_code:{step1:{title:"Откройте приложение Okto",description:"Добавьте Okto на ваш экран домой для быстрого доступа"},step2:{title:"Создать кошелек MPC",description:"Создайте учетную запись и сгенерируйте кошелек"},step3:{title:"Нажмите WalletConnect в настройках",description:"Коснитесь значка Scan QR в верхнем правом углу и подтвердите запрос на подключение."}}},ledger:{desktop:{step1:{title:"Откройте приложение Ledger Live",description:"Мы рекомендуем поместить Ledger Live на ваш экран домой для более быстрого доступа."},step2:{title:"Настройте ваш Ledger",description:"Настройте новый Ledger или подключитесь к существующему."},step3:{title:"Подключить",description:"После сканирования вам будет предложено подключить ваш кошелек."}},qr_code:{step1:{title:"Откройте приложение Ledger Live",description:"Мы рекомендуем поместить Ledger Live на ваш экран домой для более быстрого доступа."},step2:{title:"Настройте ваш Ledger",description:"Вы можете синхронизировать с настольным приложением или подключить свой Ledger."},step3:{title:"Сканировать код",description:"Нажмите WalletConnect, затем переключитесь на Scanner. После сканирования вам будет предложено подключить ваш кошелек."}}}},zg={connect_wallet:fou,intro:pou,sign_in:hou,connect:Cou,connect_scan:mou,connector_group:Aou,get:gou,get_options:Bou,get_mobile:you,get_instructions:Fou,chains:Dou,profile:vou,wallet_connectors:bou},wou={label:"เชื่อมต่อกระเป๋าเงิน"},xou={title:"อะไรคือกระเป๋าเงิน?",description:"กระเป๋าเงินใช้ในการส่ง, รับ, เก็บ, และแสดงสินทรัพย์ดิจิทัล มันยังเป็นวิธีใหม่ในการเข้าสู่ระบบ, โดยไม่จำเป็นต้องสร้างบัญชีและรหัสผ่านใหม่ในทุกเว็บไซต์.",digital_asset:{title:"บ้านสำหรับสินทรัพย์ดิจิทัลของคุณ",description:"กระเป๋าเงินถูกใช้เพื่อส่ง, รับ, เก็บ, แสดงสินทรัพย์ดิจิทัล เช่น Ethereum และ NFTs."},login:{title:"วิธีใหม่ในการเข้าสู่ระบบ",description:"แทนที่จะสร้างบัญชีและรหัสผ่านใหม่ในทุกเว็บไซต์, แค่เชื่อมต่อกระเป๋าของคุณ."},get:{label:"รับกระเป๋าเงิน"},learn_more:{label:"เรียนรู้เพิ่มเติม"}},kou={label:"ยืนยันบัญชีของคุณ",description:"เพื่อการเชื่อมต่อที่สมบูรณ์, คุณต้องลงนามในข้อความในกระเป๋าเงินของคุณเพื่อยืนยันว่าคุณเป็นเจ้าของบัญชีนี้",message:{send:"ส่งข้อความ",preparing:"กำลังเตรียมข้อความ...",cancel:"ยกเลิก",preparing_error:"เกิดข้อผิดพลาดในการเตรียมข้อความ โปรดลองใหม่!"},signature:{waiting:"รอการลงนาม...",verifying:"กำลังตรวจสอบลายเซ็น...",signing_error:"เกิดข้อผิดพลาดในการลงนามในข้อความ โปรดลองใหม่!",verifying_error:"เกิดข้อผิดพลาดในการตรวจสอบลายเซ็น โปรดลองใหม่!",oops_error:"อ๊ะ, เกิดข้อผิดพลาดบางอย่าง!"}},_ou={label:"เชื่อมต่อ",title:"เชื่อมต่อกระเป๋าเงิน",new_to_ethereum:{description:"ใหม่กับกระเป๋า Ethereum หรือไม่?",learn_more:{label:"เรียนรู้เพิ่มเติม"}},learn_more:{label:"เรียนรู้เพิ่มเติม"},recent:"ล่าสุด",status:{opening:"กำลังเปิด %{wallet}...",not_installed:"%{wallet} ไม่ได้ติดตั้ง",not_available:"%{wallet} ไม่สามารถใช้ได้",confirm:"ยืนยันการเชื่อมต่อในส่วนขยาย"},secondary_action:{get:{description:"ไม่มี %{wallet}?",label:"รับ"},install:{label:"ติดตั้ง"},retry:{label:"ลองใหม่"}},walletconnect:{description:{full:"ต้องการ modal อย่างเป็นทางการจาก WalletConnect หรือไม่?",compact:"ต้องการ modal จาก WalletConnect หรือไม่?"},open:{label:"เปิด"}}},Sou={title:"สแกนด้วย %{wallet}",fallback_title:"สแกนด้วยโทรศัพท์ของคุณ"},Pou={recommended:"แนะนำ",other:"อื่น ๆ",popular:"ยอดนิยม",more:"เพิ่มเติม",others:"อื่น ๆ"},Tou={title:"รับ Wallet",action:{label:"รับ"},mobile:{description:"Wallet บนมือถือ"},extension:{description:"ส่วนขยายบราวเซอร์"},mobile_and_extension:{description:"กระเป๋าเงินมือถือและส่วนขยาย"},mobile_and_desktop:{description:"กระเป๋าเงินบนมือถือและคอมพิวเตอร์"},looking_for:{title:"ไม่ใช่สิ่งที่คุณกำลังหาหรือไม่?",mobile:{description:"เลือกกระเป๋าเงินบนหน้าจอหลักเพื่อเริ่มต้นใช้งานกับผู้ให้บริการกระเป๋าเงินที่แตกต่างกัน"},desktop:{compact_description:"เลือกกระเป๋าเงินบนหน้าจอหลักเพื่อเริ่มต้นใช้งานกับผู้ให้บริการกระเป๋าเงินที่แตกต่างกัน",wide_description:"เลือกกระเป๋าเงินที่อยู่ทางซ้ายเพื่อเริ่มต้นใช้งานกับผู้ให้บริการกระเป๋าเงินที่แตกต่างกัน"}}},Oou={title:"เริ่มต้นกับ %{wallet}",short_title:"รับ %{wallet}",mobile:{title:"%{wallet} สำหรับมือถือ",description:"ใช้กระเป๋าระบบมือถือในการสำรวจโลกของ Ethereum.",download:{label:"รับแอป"}},extension:{title:"%{wallet} สำหรับ %{browser}",description:"เข้าถึงกระเป๋าเงินของคุณได้โดยตรงจากบราวเซอร์ที่คุณชื่นชอบ.",download:{label:"เพิ่มไปยัง %{browser}"}},desktop:{title:"%{wallet} สำหรับ %{platform}",description:"เข้าถึงกระเป๋าเงินของคุณโดยตรงจากคอมพิวเตอร์ที่มีประสิทธิภาพของคุณ",download:{label:"เพิ่มไปยัง %{platform}"}}},Iou={title:"ติดตั้ง %{wallet}",description:"สแกนด้วยโทรศัพท์ของคุณเพื่อดาวน์โหลดบน iOS หรือ Android",continue:{label:"ดำเนินการต่อ"}},Nou={mobile:{connect:{label:"เชื่อมต่อ"},learn_more:{label:"เรียนรู้เพิ่มเติม"}},extension:{refresh:{label:"รีเฟรช"},learn_more:{label:"เรียนรู้เพิ่มเติม"}},desktop:{connect:{label:"เชื่อมต่อ"},learn_more:{label:"เรียนรู้เพิ่มเติม"}}},Rou={title:"เปลี่ยนเครือข่าย",wrong_network:"ตรวจสอบพบเครือข่ายที่ไม่ถูกต้อง สลับหรือตัดการเชื่อมต่อเพื่อดำเนินการต่อ.",confirm:"ยืนยันใน Wallet",switching_not_supported:"กระเป๋าสตางค์ของคุณไม่สนับสนุนการเปลี่ยนเครือข่ายจาก %{appName}ลองเปลี่ยนเครือข่ายจากภายในกระเป๋าสตางค์ของคุณแทน",switching_not_supported_fallback:"กระเป๋าสตางค์ของคุณไม่สนับสนุนการสลับเครือข่ายจากแอปนี้ ลองสลับเครือข่ายจากภายในกระเป๋าสตางค์ของคุณแทน",disconnect:"ตัดการเชื่อมต่อ",connected:"เชื่อมต่อแล้ว"},zou={disconnect:{label:"ตัดการเชื่อมต่อ"},copy_address:{label:"คัดลอกที่อยู่",copied:"คัดลอกแล้ว!"},explorer:{label:"ดูเพิ่มเติมบน explorer"},transactions:{description:"%{appName} รายการจะปรากฎที่นี่...",description_fallback:"การทำธุรกรรมของคุณจะปรากฎที่นี่...",recent:{title:"ธุรกรรมล่าสุด"},clear:{label:"ลบทั้งหมด"}}},jou={argent:{qr_code:{step1:{description:"วาง Argent บนหน้าจอหลักของคุณเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น",title:"เปิดแอป Argent"},step2:{description:"สร้างกระเป๋าเงินและชื่อผู้ใช้หรือนำเข้ากระเป๋าเงินที่มีอยู่แล้ว",title:"สร้างหรือนำเข้า Wallet"},step3:{description:"หลังจากคุณสแกน จะปรากฏหน้าต่างเชื่อมต่อให้คุณเชื่อมต่อกระเป๋าเงินของคุณ",title:"แตะที่คุ่มุ่งสแกน QR"}}},bifrost:{qr_code:{step1:{description:"เราขอแนะนำให้คุณวาง Bifrost Wallet บนหน้าจอหลักของคุณเพื่อเข้าถึงได้เร็วขึ้น",title:"เปิดแอพฯ Bifrost Wallet"},step2:{description:"สร้างหรือนำเข้ากระเป๋าเงินด้วย recovery phrase ของคุณ",title:"สร้างหรือนำเข้ากระเป๋าเงิน"},step3:{description:"หลังจากที่คุณสแกนแล้วยินยันการเชื่อมต่อกับกระเป๋าเงินของคุณ",title:"แตะปุ่มสแกน"}}},bitget:{qr_code:{step1:{description:"เราขอแนะนำให้วาง Bitget Wallet บนหน้าจอหน้าแรกของคุณเพื่อการเข้าถึงที่รวดเร็วขึ้น.",title:"เปิดแอพ Bitget Wallet"},step2:{description:"ตรวจสอบการสำรองข้อมูลกระเป๋าสตางค์ของคุณให้แน่นอนโดยใช้วิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับใครเป็นอันขาด.",title:"สร้างหรือนำเข้า Wallet"},step3:{description:"หลังจากที่คุณสแกน จะมีข้อความขอเชื่อมต่อที่จะปรากฏขึ้นให้คุณเชื่อมต่อกระเป๋าสตางค์ของคุณ.",title:"แตะปุ่มสแกน"}},extension:{step1:{description:"เราแนะนำให้คุณปัก Bitget Wallet ไว้บนแถบงานของคุณเพื่อเข้าถึงกระเป๋าสตางค์ได้เร็วขึ้น",title:"ติดตั้งส่วนเสริม Bitget Wallet"},step2:{description:"โปรดแน่ใจว่าคุณได้สำรองข้อมูลกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับบุคคลใดๆ",title:"สร้างหรือนำเข้า Wallet"},step3:{description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้วคลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนเสริม",title:"รีเฟรชเบราว์เซอร์ของคุณ"}}},bitski:{extension:{step1:{description:"เราแนะนำให้ทำปัก Bitski ไว้ที่แถบงานของคุณเพื่อเข้าถึงกระเป๋าเงินได้โดยไม่ต้องรอ",title:"ติดตั้งส่วนขยาย Bitski"},step2:{description:"ควรสำรองกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าเปิดเผยคำลับของคุณให้ใครทราบ",title:"สร้างหรือนำเข้ากระเป๋าเงิน"},step3:{description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย",title:"รีเฟรชเบราว์เซอร์ของคุณ"}}},coin98:{qr_code:{step1:{description:"เราขอแนะนำให้คุณวาง Coin98 Wallet บนหน้าจอหลักของคุณ เพื่อให้เข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น.",title:"เปิดแอพ Coin98 Wallet"},step2:{description:"คุณสามารถสำรองข้อมูลกระเป๋าเงินของคุณได้ง่ายๆ ด้วยฟีเจอร์สำรองข้อมูลบนโทรศัพท์ของคุณ.",title:"สร้างหรือนำเข้ากระเป๋าเงิน"},step3:{description:"หลังจากคุณสแกน จะมีเตือนการเชื่อมต่อที่ปรากฏขึ้นให้คุณเชื่อมต่อกระเป๋าเงินของคุณ.",title:"แตะที่ปุ่ม WalletConnect"}},extension:{step1:{description:"คลิกที่ด้านบนขวาของเบราว์เซอร์ของคุณและปัก Coin98 Wallet ไว้เพื่อให้เข้าถึงได้ง่าย.",title:"ติดตั้งส่วนขยาย Coin98 Wallet"},step2:{description:"สร้างกระเป๋าเงินใหม่หรือนำเข้าที่มีอยู่แล้ว.",title:"สร้างหรือนำเข้ากระเป๋าเงิน"},step3:{description:"เมื่อคุณตั้งค่า Coin98 Wallet แล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยายขึ้นมา.",title:"รีเฟรชเบราว์เซอร์ของคุณ"}}},coinbase:{qr_code:{step1:{description:"เราแนะนำให้วาง Coinbase Wallet ไว้ที่หน้าจอหลักของคุณเพื่อให้เข้าถึงได้เร็วขึ้น.",title:"เปิดแอป Coinbase Wallet"},step2:{description:"คุณสามารถสำรองข้อมูลกระเป๋าสตางค์ของคุณได้ง่ายๆ โดยใช้ฟีเจอร์การสำรองข้อมูลด้วยคลาวด์",title:"สร้างหรือนำเข้ากระเป๋าสตางค์"},step3:{description:"หลังจากที่คุณสแกนแล้ว จะมีการแสดงขอ้มูลเพื่อให้คุณเชื่อมต่อกระเป๋าสตางค์ของคุณ",title:"แตะที่ปุ่มสแกน"}},extension:{step1:{description:"เราแนะนำให้คุณยัด Coinbase Wallet ไว้ที่แถบงานของคุณเพื่อให้สามารถเข้าถึงกระเป๋าสตางค์ของคุณได้เร็วขึ้น",title:"ติดตั้งส่วนขยาย Coinbase Wallet"},step2:{description:"ตรวจสอบให้แน่ใจว่าคุณได้สำรองข้อมูลกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าเปิดเผยประโยคลับของคุณให้กับใครเลย",title:"สร้างหรือนำเข้ากระเป๋าเงิน"},step3:{description:"เมื่อคุณได้ตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อเรียกดูเบราว์เซอร์ใหม่และโหลดส่วนขยาย",title:"รีเฟรชเบราว์เซอร์ของคุณ"}}},core:{qr_code:{step1:{description:"เราแนะนำให้คุณวาง Core ลงสนามหลักเพื่อให้เข้าถึงกระเป๋าเงินได้เร็วขึ้น",title:"เปิดแอปเครื่องมือช่วยอีเกิร์น"},step2:{description:"คุณสามารถสำรองกระเป๋าเงินของคุณได้ง่ายๆ โดยใช้ฟีเจอร์สำรองของเราบนโทรศัพท์ของคุณ",title:"สร้างหรือนำเข้ากระเป๋าเงิน"},step3:{description:"หลังจากที่คุณสแกนแล้ว จะมีการแจ้งเตือนเพื่อให้คุณเชื่อมต่อกับกระเป๋าสตางค์ของคุณ",title:"แตะปุ่ม WalletConnect"}},extension:{step1:{description:"เราขอแนะนำให้คุณปัก Core ไว้ที่แถบงานของคุณเพื่อเข้าถึงกระเป๋าสตางค์ของคุณได้อย่างรวดเร็ว",title:"ติดตั้งส่วนขยาย Core"},step2:{description:"โปรดแน่ใจว่าคุณได้สำรองกระเป๋าสตางค์ของคุณใช้วิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับใคร",title:"สร้างหรือนำเข้า Wallet"},step3:{description:"เมื่อคุณตั้งค่ากระเป๋าสตางค์ของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย",title:"รีเฟรชเบราว์เซอร์ของคุณ"}}},fox:{qr_code:{step1:{description:"เราขอแนะนำให้คุณวาง FoxWallet บนหน้าจอหลักเพื่อให้เข้าถึงได้เร็วขึ้น",title:"เปิดแอป FoxWallet"},step2:{description:"ตรวจสอบที่จะสำรองข้อมูลกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย จงอย่าเปิดเผยประโยคลับลับของคุณให้ผู้อื่นรู้",title:"สร้างหรือนำเข้ากระเป๋าเงิน"},step3:{description:"หลังจากที่คุณสแกน จะมีการเชื่อมต่อที่แสดงให้คุณเชื่อมต่อกระเป๋าเงินของคุณ",title:"แตะปุ่มสแกน"}}},frontier:{qr_code:{step1:{description:"เราขอแนะนำให้คุณวาง Frontier Wallet บนหน้าจอหลักเพื่อให้เข้าถึงได้เร็วขึ้น",title:"เปิดแอป Frontier Wallet"},step2:{description:"ตรวจสอบให้แน่ใจว่าคุณได้สำรองข้อมูลกระเป๋าสตางค์ของคุณโดยใช้วิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับใคร",title:"สร้างหรือนำเข้ากระเป๋าสตางค์"},step3:{description:"หลังจากที่คุณสแกนแล้ว จะมีการแสดงข้อมูลเพื่อให้คุณเชื่อมต่อกับกระเป๋าสตางค์ของคุณ",title:"แตะปุ่มสแกน"}},extension:{step1:{description:"เราแนะนำให้คุณปักหมุด Frontier Wallet ไว้ที่แถบงานของคุณเพื่อเข้าถึงกระเป๋าสตางค์ของคุณได้ง่ายขึ้น",title:"ติดตั้งส่วนเสริม Frontier Wallet"},step2:{description:"ตรวจสอบให้แน่ใจว่าคุณได้สำรองข้อมูลกระเป๋าสตางค์ของคุณโดยใช้วิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับใคร",title:"สร้างหรือนำเข้ากระเป๋าสตางค์"},step3:{description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย",title:"รีเฟรชเบราว์เซอร์ของคุณ"}}},im_token:{qr_code:{step1:{title:"เปิดแอพ imToken",description:"ใส่แอพ imToken ไว้ที่หน้าจอหลักเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น."},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"สร้างกระเป๋าเงินใหม่หรือนำเข้ากระเป๋าเงินที่มีอยู่แล้ว"},step3:{title:"แตะไอคอนสแกนเนอร์ในมุมบนขวา",description:"เลือก New Connection, แล้วสแกน QR code และยืนยันการรับรองสำหรับการเชื่อมต่อ"}}},metamask:{qr_code:{step1:{title:"เปิดแอป MetaMask",description:"เราขอแนะนำให้วาง MetaMask บนหน้าจอหลักของคุณเพื่อเข้าถึงได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"ตรวจสอบว่าได้สำรองกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าเปิดเผยวลีลับของคุณให้กับใคร"},step3:{title:"แตะที่ปุ่มสแกน",description:"หลังจากการสแกน, จะปรากฏข้อความเชื่อมต่อสำหรับคุณเพื่อเชื่อมต่อกับกระเป๋าเงินของคุณ"}},extension:{step1:{title:"ติดตั้งส่วนขยาย MetaMask",description:"เราขอแนะนำให้คุณปัก MetaMask ไว้ที่แถบงานของคุณเพื่อเข้าถึงกระเป๋าเงินของคุณได้รวดเร็ว"},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"อย่างแน่นอนให้สำรองข้อมูลกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าแชร์ประโยคลับของคุณกับใครเลย"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย"}}},okx:{qr_code:{step1:{title:"เปิดแอพ OKX Wallet",description:"เราแนะนำให้วาง OKX Wallet บนหน้าจอหลักของคุณเพื่อให้เข้าถึงได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"จงแน่ใจว่าคุณได้สำรองข้อมูล wallet ของคุณด้วยวิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณให้คนอื่น"},step3:{title:"แตะปุ่มสแกน",description:"หลังจากคุณสแกน จะมีการแสดงข้อมูลเพื่อให้คุณเชื่อมต่อ wallet ของคุณ"}},extension:{step1:{title:"ติดตั้งส่วนเสริม OKX Wallet",description:"เราแนะนำให้ยึด OKX Wallet ไว้ที่แถบงานของคุณเพื่อให้เข้าถึง wallet ของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"โปรดแน่ใจว่าคุณได้สำรองกระเป๋าสตางค์ของคุณด้วยวิธีที่ปลอดภัย อย่าเปิดเผยประโยคลับของคุณให้ใครทราบ"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าสตางค์ของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย"}}},omni:{qr_code:{step1:{title:"เปิดแอป Omni",description:"เพิ่ม Omni ไปยังหน้าจอแรกเพื่อเข้าถึงกระเป๋าสตางค์ของคุณได้รวดเร็วขึ้น"},step2:{title:"สร้างหรือนำเข้ากระเป๋าสตางค์",description:"สร้างกระเป๋าสตางค์ใหม่หรือนำเข้ากระเป๋าสตางค์ที่มีอยู่"},step3:{title:"แตะที่ไอคอน QR แล้วสแกน",description:"แตะที่ไอคอน QR บนหน้าจอหน้าแรกของคุณ, สแกนรหัสและยืนยันการเตือนเพื่อเชื่อมต่อ."}}},token_pocket:{qr_code:{step1:{title:"เปิดแอป TokenPocket",description:"เราแนะนำให้วาง TokenPocket บนหน้าจอหน้าแรกของคุณเพื่อเข้าถึงได้เร็วขึ้น."},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"ตรวจสอบว่าได้สำรองกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าเปิดเผยวลีลับของคุณให้ผู้อื่นทราบในทางใดทางหนึ่ง."},step3:{title:"แตะปุ่มสแกน",description:"หลังจากที่คุณสแกนแล้ว จะมีการเรียกให้เชื่อมต่อกับกระเป๋าเงินของคุณ"}},extension:{step1:{title:"ติดตั้งส่วนขยาย TokenPocket",description:"เราขอแนะนำให้คุณปัก TokenPocket ไว้ที่แถบงานเพื่อทำให้สามารถเข้าถึงกระเป๋าเงินของคุณได้ง่ายขึ้น"},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"ตรวจสอบให้แน่ใจว่าคุณได้สำรองข้อมูลกระเป๋าเงินของคุณด้วยวิธีที่ปลอดภัย อย่าทำการแชร์ประโยคลับด้วยความลับของคุณกับใคร"},step3:{title:"รีเฟรชบราวเซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชบราวเซอร์และโหลดส่วนขยาย"}}},trust:{qr_code:{step1:{title:"เปิดแอพ Trust Wallet",description:"วาง Trust Wallet ที่หน้าจอหลักของคุณเพื่อเข้าถึงกระเป๋าเงินของคุณได้รวดเร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"สร้าง wallet ใหม่หรือนำเข้า wallet ที่มีอยู่แล้ว"},step3:{title:"แตะ WalletConnect ในการตั้งค่า",description:"เลือก New Connection จากนั้นสแกน QR code และยืนยันการแจ้งเตือนเพื่อเชื่อมต่อ"}},extension:{step1:{title:"ติดตั้งส่วนขยาย Trust Wallet",description:"คลิกที่มุมบนขวาของเบราว์เซอร์ของคุณและปัก Trust Wallet เพื่อเข้าถึงได้ง่าย"},step2:{title:"สร้างหรือนำเข้า wallet",description:"สร้าง wallet ใหม่หรือนำเข้า wallet ที่มีอยู่แล้ว"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่า Trust Wallet แล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยายขึ้นมา"}}},uniswap:{qr_code:{step1:{title:"เปิดแอป Uniswap",description:"เพิ่ม Uniswap Wallet ไปยังหน้าจอหลักของคุณเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"สร้างกระเป๋าเงินใหม่หรือนำเข้ากระเป๋าเงินที่มีอยู่แล้ว"},step3:{title:"แตะที่ไอคอน QR และสแกน",description:"แตะที่ไอคอน QR บนหน้าจอหลักของคุณ สแกนรหัสและยืนยันการเชื่อมต่อ"}}},zerion:{qr_code:{step1:{title:"เปิดแอป Zerion",description:"เราแนะนำให้คุณวาง Zerion บนหน้าจอหลักของคุณเพื่อเข้าถึงได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"ลองทำสำเนาข้อมูล wallet ของคุณไว้ในช่องทางที่ปลอดภัย อย่าเปิดเผยวลีลับของคุณให้กับผู้อื่น"},step3:{title:"แตะที่ปุ่มสแกน",description:"หลังจากสแกน จะมีหน้าต่างแสดงคำสั่งเชื่อมต่อให้คุณเชื่อมต่อ wallet ของคุณ"}},extension:{step1:{title:"ติดตั้งส่วนขยาย Zerion",description:"เราแนะนำให้คุณติด Zerion บนแถบงานของคุณเพื่อเข้าถึง wallet ของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"ตรวจสอบให้แน่ใจว่าคุณได้สำรองข้อมูลกระเป๋าเงินของคุณโดยวิธีที่ปลอดภัย อย่าเปิดเผยประโยคลับลับของคุณให้ใครทราบครับ"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย"}}},rainbow:{qr_code:{step1:{title:"เปิดแอป Rainbow",description:"เราขอแนะนำให้คุณวาง Rainbow อยู่บนหน้าจอหลักของคุณเพื่อรับผิดชอบจากกระเป๋าสตางค์ของคุณอย่างรวดเร็ว"},step2:{title:"สร้างหรือนำเข้ากระเป๋าสตางค์",description:"คุณสามารถสำรองข้อมูลกระเป๋าสตางค์ของคุณได้ง่ายๆ ด้วยฟีเจอร์สำรองข้อมูลบนโทรศัพท์ของคุณ"},step3:{title:"แตะปุ่มสแกน",description:"หลังจากสแกนแล้ว จะแสดงข้อความขอเชื่อมต่อเพื่อให้คุณเชื่อมต่อกระเป๋าสตางค์ของคุณ"}}},enkrypt:{extension:{step1:{description:"เราขอแนะนำให้คุณปัก Enkrypt Wallet ไว้ที่แทบงานของคุณเพื่อให้สามารถเข้าถึงกระเป๋าสตางค์ของคุณได้เร็วขึ้น",title:"ติดตั้งส่วนขยาย Enkrypt Wallet"},step2:{description:"ตรวจสอบให้แน่ใจว่าคุณได้สำรองกระเป๋าสตางค์ของคุณโดยใช้วิธีที่ปลอดภัย ห้ามแชร์วลีลับของคุณให้กับใคร",title:"สร้างหรือนำเข้า Wallet"},step3:{description:"เมื่อคุณตั้งค่า wallet ของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรช browser และโหลดขึ้น extension",title:"รีเฟรช browser ของคุณ"}}},frame:{extension:{step1:{description:"เราแนะนำให้หมุน Frame ไว้บน taskbar ของคุณเพื่อให้เข้าถึง wallet ได้เร็วขึ้น",title:"ติดตั้ง Frame และ extension ที่เป็นคู่"},step2:{description:"ตรวจสอบว่าได้สำรอง wallet ของคุณโดยใช้วิธีการที่ปลอดภัย อย่าเปิดเผยวลีลับของคุณให้กับใคร",title:"สร้างหรือนำเข้า Wallet"},step3:{description:"เมื่อคุณตั้งค่า wallet ของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรช browser และโหลดขึ้น extension",title:"รีเฟรช browser ของคุณ"}}},one_key:{extension:{step1:{title:"ติดตั้งส่วนเสริม OneKey Wallet",description:"เราแนะนำการปัก OneKey Wallet ไว้บนแทบงานของคุณเพื่อเข้าถึงกระเป๋าเงินได้ง่ายขึ้น"},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"อย่าลืมสำรองกระเป๋าเงินของคุณด้วยวิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับใคร"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนเสริม"}}},phantom:{extension:{step1:{title:"ติดตั้งส่วนเสริม Phantom",description:"เราแนะนำการปัก Phantom ไว้บนแทบงานของคุณเพื่อเข้าถึงกระเป๋าเงินได้ง่ายขึ้น"},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"แน่ใจว่าคุณได้สำรองกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าเปิดเผยข้อความลับสำหรับการกู้คืนของคุณกับบุคคลใด ๆ"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินเรียบร้อยแล้ว, คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย"}}},rabby:{extension:{step1:{title:"ติดตั้งส่วนขยาย Rabby",description:"เราแนะนำให้คุณปัก Rabby ไว้ที่แถบงานเพื่อให้เข้าถึงกระเป๋าเงินของคุณได้รวดเร็วขึ้น."},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"แน่ใจว่าคุณได้สำรองกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าแชร์ข้อความลับของคุณกับบุคคลอื่น"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย"}}},safeheron:{extension:{step1:{title:"ติดตั้งส่วนขยาย Core",description:"เราขอแนะนำให้คุณปัก Safeheron ไว้ที่แถบงานเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"อย่าลืมสำรองกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าเปิดเผยประโยคลับของคุณให้ผู้อื่นทราบ"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย"}}},taho:{extension:{step1:{title:"ติดตั้งส่วนขยาย Taho",description:"เราแนะนำให้คุณปัก Taho ไว้ที่แถบงานของคุณเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"โปรดแน่ใจว่าคุณได้สำรองกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าแชร์ประโยคลับคุณกับผู้อื่น"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย"}}},talisman:{extension:{step1:{title:"ติดตั้งส่วนขยาย Talisman",description:"เราแนะนำให้คุณปัก Talisman ไว้ที่แถบงานของคุณเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน Ethereum",description:"ให้แน่ใจว่าคุณได้สำรองกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าเปิดเผยวลีการกู้คืนของคุณให้ใครทราบเด็ดขาด"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย"}}},xdefi:{extension:{step1:{title:"ติดตั้งส่วนขยาย XDEFI Wallet",description:"เราแนะนำให้คุณตรา XDEFI Wallet ไว้ที่แถบงานเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"ให้แน่ใจว่าคุณได้สำรองกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าเปิดเผยวลีลับของคุณให้ใครทราบเด็ดขาด"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"หลังจากที่คุณตั้งค่ากระเป๋าสตางค์ของคุณแล้ว คลิกด้านล่างเพื่อรีเฟรชบราวเซอร์และโหลดส่วนเสริม."}}},zeal:{extension:{step1:{title:"ติดตั้งส่วนขยาย Zeal",description:"เราแนะนำให้ปัก Zeal ไว้ที่แถบงานของคุณเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"ตรวจสอบการสำรองข้อมูลกระเป๋าสตางค์ของคุณให้แน่นอนโดยใช้วิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับใครเป็นอันขาด."},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้วคลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนเสริม"}}},safepal:{extension:{step1:{title:"ติดตั้งส่วนขยาย SafePal Wallet",description:"คลิกที่มุมบนขวาของเบราว์เซอร์ของคุณและปักมุม SafePal Wallet เพื่อที่จะเข้าถึงได้ง่าย"},step2:{title:"สร้างหรือนำเข้ากระเป๋าเงิน",description:"สร้างกระเป๋าเงินใหม่หรือนำเข้าที่มีอยู่แล้ว."},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"หลังจากคุณตั้งค่า SafePal Wallet เรียบร้อยแล้ว คลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนขยาย"}},qr_code:{step1:{title:"เปิดแอป SafePal Wallet",description:"วาง SafePal Wallet ที่หน้าจอหลักของคุณเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"สร้างกระเป๋าเงินใหม่หรือนำเข้าที่มีอยู่แล้ว."},step3:{title:"แตะ WalletConnect ในการตั้งค่า",description:"เลือก New Connection, แล้วสแกน QR code และยืนยันการรับรองสำหรับการเชื่อมต่อ"}}},desig:{extension:{step1:{title:"ติดตั้งส่วนขยาย Desig",description:"เราขอแนะนำให้คุณตรึง Desig ไว้ที่แถบงานของคุณเพื่อให้เข้าถึงกระเป๋าเงินของคุณได้ง่ายขึ้น"},step2:{title:"สร้างกระเป๋าเงิน",description:"ตรวจสอบการสำรองข้อมูลกระเป๋าสตางค์ของคุณให้แน่นอนโดยใช้วิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับใครเป็นอันขาด."},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้วคลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนเสริม"}}},subwallet:{extension:{step1:{title:"ติดตั้งส่วนขยาย SubWallet",description:"เราขอแนะนำให้คุณตรึง SubWallet ไว้ที่แถบงานของคุณเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"ให้แน่ใจว่าคุณได้สำรองกระเป๋าเงินของคุณโดยใช้วิธีที่ปลอดภัย อย่าเปิดเผยวลีการกู้คืนของคุณให้ใครทราบเด็ดขาด"},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้วคลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนเสริม"}},qr_code:{step1:{title:"เปิดแอพ SubWallet",description:"เราขอแนะนำให้วาง SubWallet ไว้ที่หน้าจอหลักของคุณเพื่อเข้าถึงได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"ตรวจสอบการสำรองข้อมูลกระเป๋าสตางค์ของคุณให้แน่นอนโดยใช้วิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับใครเป็นอันขาด."},step3:{title:"แตะปุ่มสแกน",description:"หลังจากคุณสแกน จะปรากฏหน้าต่างเชื่อมต่อให้คุณเชื่อมต่อกระเป๋าเงินของคุณ"}}},clv:{extension:{step1:{title:"ติดตั้งส่วนขยาย CLV Wallet",description:"เราขอแนะนำให้คุณตรึง CLV Wallet ไว้ที่แถบงานของคุณเพื่อเข้าถึงกระเป๋าเงินของคุณได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"ตรวจสอบการสำรองข้อมูลกระเป๋าสตางค์ของคุณให้แน่นอนโดยใช้วิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับใครเป็นอันขาด."},step3:{title:"รีเฟรชเบราว์เซอร์ของคุณ",description:"เมื่อคุณตั้งค่ากระเป๋าเงินของคุณแล้วคลิกด้านล่างเพื่อรีเฟรชเบราว์เซอร์และโหลดส่วนเสริม"}},qr_code:{step1:{title:"เปิดแอพ CLV Wallet",description:"เราแนะนำให้คุณวาง CLV Wallet บนหน้าจอหลักเพื่อให้สามารถเข้าถึงได้เร็วขึ้น"},step2:{title:"สร้างหรือนำเข้า Wallet",description:"ตรวจสอบการสำรองข้อมูลกระเป๋าสตางค์ของคุณให้แน่นอนโดยใช้วิธีที่ปลอดภัย อย่าแชร์วลีลับของคุณกับใครเป็นอันขาด."},step3:{title:"แตะปุ่มสแกน",description:"หลังจากคุณสแกน จะปรากฏหน้าต่างเชื่อมต่อให้คุณเชื่อมต่อกระเป๋าเงินของคุณ"}}},okto:{qr_code:{step1:{title:"เปิดแอพ Okto",description:"เพิ่ม Okto ไปยังหน้าจอหลักของคุณเพื่อเข้าถึงได้เร็ว"},step2:{title:"สร้างกระเป๋าเงิน MPC",description:"สร้างบัญชีและสร้างกระเป๋าเงิน"},step3:{title:"แตะ WalletConnect ในการตั้งค่า",description:"แตะที่ไอคอน Scan QR ที่บริเวณมุมบนขวาและยืนยันข้อความเพื่อเชื่อมต่อ."}}},ledger:{desktop:{step1:{title:"เปิดแอป Ledger Live",description:"เราแนะนำให้คุณวาง Ledger Live บนหน้าจอหลักเพื่อให้สามารถเข้าถึงได้เร็วขึ้น"},step2:{title:"ตั้งค่า Ledger ของคุณ",description:"ตั้งค่า Ledger ใหม่หรือเชื่อมต่อกับ Ledger ที่มีอยู่แล้ว"},step3:{title:"เชื่อมต่อ",description:"หลังจากที่คุณสแกนแล้ว จะมีการเรียกให้เชื่อมต่อกับกระเป๋าเงินของคุณ"}},qr_code:{step1:{title:"เปิดแอป Ledger Live",description:"เราแนะนำให้วาง Ledger Live บนหน้าจอหลักของคุณเพื่อการเข้าถึงที่รวดเร็วขึ้น"},step2:{title:"ตั้งค่า Ledger ของคุณ",description:"คุณสามารถซิงค์กับแอพพลิเคชันบนเดสก์ท็อปหรือเชื่อมต่อ Ledger ของคุณ"},step3:{title:"สแกนรหัส",description:"แตะ WalletConnect แล้วเปลี่ยนไปที่ Scanner. หลังจากที่คุณสแกนแล้ว จะมีการเรียกให้เชื่อมต่อกับกระเป๋าเงินของคุณ"}}}},jg={connect_wallet:wou,intro:xou,sign_in:kou,connect:_ou,connect_scan:Sou,connector_group:Pou,get:Tou,get_options:Oou,get_mobile:Iou,get_instructions:Nou,chains:Rou,profile:zou,wallet_connectors:jou},Mou={label:"Cüzdanı Bağla"},Lou={title:"Cüzdan nedir?",description:"Bir cüzdan, dijital varlıkları göndermek, almak, saklamak ve görüntülemek için kullanılır. Aynı zamanda her web sitesinde yeni hesaplar ve şifreler oluşturmanıza gerek kalmadan oturum açmanın yeni bir yoludur.",digital_asset:{title:"Dijital Varlıklarınız İçin Bir Ev",description:"Cüzdanlar, Ethereum ve NFT'ler gibi dijital varlıkları göndermek, almak, depolamak ve görüntülemek için kullanılır."},login:{title:"Yeni Bir Giriş Yolu",description:"Her web sitesinde yeni hesap ve parolalar oluşturmak yerine, sadece cüzdanınızı bağlayın."},get:{label:"Bir Cüzdan Edinin"},learn_more:{label:"Daha fazla bilgi edinin"}},Uou={label:"Hesabınızı doğrulayın",description:"Bağlantıyı tamamlamak için, bu hesabın sahibi olduğunuzu doğrulamak için cüzdanınızdaki bir mesaja imza atmalısınız.",message:{send:"Mesajı gönder",preparing:"Mesaj hazırlanıyor...",cancel:"İptal",preparing_error:"Mesajı hazırlarken hata oluştu, lütfen tekrar deneyin!"},signature:{waiting:"İmza bekleniyor...",verifying:"İmza doğrulanıyor...",signing_error:"Mesajı imzalarken hata oluştu, lütfen tekrar deneyin!",verifying_error:"İmza doğrulanırken hata oluştu, lütfen tekrar deneyin!",oops_error:"Hata, bir şeyler yanlış gitti!"}},$ou={label:"Bağlan",title:"Bir Cüzdanı Bağla",new_to_ethereum:{description:"Ethereum cüzdanlarına yeni misiniz?",learn_more:{label:"Daha fazla bilgi edinin"}},learn_more:{label:"Daha fazla bilgi edinin"},recent:"Son",status:{opening:"%{wallet}açılıyor...",not_installed:"%{wallet} yüklü değil",not_available:"%{wallet} kullanılabilir değil",confirm:"Bağlantıyı eklentide onaylayın"},secondary_action:{get:{description:"%{wallet}yok mu?",label:"AL"},install:{label:"YÜKLE"},retry:{label:"YENİDEN DENE"}},walletconnect:{description:{full:"Resmi WalletConnect modalına mı ihtiyacınız var?",compact:"WalletConnect modalına mı ihtiyacınız var?"},open:{label:"AÇ"}}},Wou={title:"%{wallet}ile tarama yapın",fallback_title:"Telefonunuzla tarama yapın"},qou={recommended:"Tavsiye Edilen",other:"Diğer",popular:"Popüler",more:"Daha Fazla",others:"Diğerleri"},Hou={title:"Bir Cüzdan Edinin",action:{label:"AL"},mobile:{description:"Mobil Cüzdan"},extension:{description:"Tarayıcı Eklentisi"},mobile_and_extension:{description:"Mobil Cüzdan ve Eklenti"},mobile_and_desktop:{description:"Mobil ve Masaüstü Cüzdan"},looking_for:{title:"Aradığınız şey bu değil mi?",mobile:{description:"Ana ekranda başka bir cüzdan sağlayıcısıyla başlamak için bir cüzdan seçin."},desktop:{compact_description:"Ana ekranda başka bir cüzdan sağlayıcısıyla başlamak için bir cüzdan seçin.",wide_description:"Başka bir cüzdan sağlayıcısıyla başlamak için sol tarafta bir cüzdan seçin."}}},Gou={title:"%{wallet}ile başlayın",short_title:"%{wallet}Edinin",mobile:{title:"%{wallet} Mobil İçin",description:"Mobil cüzdanı kullanarak Ethereum dünyasını keşfedin.",download:{label:"Uygulamayı alın"}},extension:{title:"%{wallet} için %{browser}",description:"Cüzdanınıza favori web tarayıcınızdan doğrudan erişin.",download:{label:"%{browser}'e ekle"}},desktop:{title:"%{wallet} için %{platform}",description:"Güçlü masaüstünüzden cüzdanınıza yerel olarak erişin.",download:{label:"%{platform}ekleyin"}}},Qou={title:"%{wallet}'i yükleyin",description:"iOS veya Android'de indirmek için telefonunuzla tarayın",continue:{label:"Devam et"}},Kou={mobile:{connect:{label:"Bağlan"},learn_more:{label:"Daha fazla bilgi edinin"}},extension:{refresh:{label:"Yenile"},learn_more:{label:"Daha fazla bilgi edinin"}},desktop:{connect:{label:"Bağlan"},learn_more:{label:"Daha fazla bilgi edinin"}}},Vou={title:"Ağları Değiştir",wrong_network:"Yanlış ağ algılandı, devam etmek için bağlantıyı kesin veya değiştirin.",confirm:"Cüzdanında Onayla",switching_not_supported:"Cüzdanınız %{appName}. ağları değiştirmeyi desteklemiyor. Bunun yerine cüzdanınızdan ağları değiştirmeyi deneyin.",switching_not_supported_fallback:"Cüzdanınız bu uygulamadan ağları değiştirmeyi desteklemiyor. Bunun yerine cüzdanınızdaki ağları değiştirmeyi deneyin.",disconnect:"Bağlantıyı Kes",connected:"Bağlı"},Jou={disconnect:{label:"Bağlantıyı Kes"},copy_address:{label:"Adresi Kopyala",copied:"Kopyalandı!"},explorer:{label:"Explorer üzerinde daha fazlasını görün"},transactions:{description:"%{appName} işlem burada görünecek...",description_fallback:"İşlemleriniz burada görünecek...",recent:{title:"Son İşlemler"},clear:{label:"Hepsini Temizle"}}},Zou={argent:{qr_code:{step1:{description:"Cüzdanınıza daha hızlı erişim için Argent'i ana ekranınıza koyun.",title:"Argent uygulamasını açın"},step2:{description:"Bir cüzdan ve kullanıcı adı oluşturun veya mevcut bir cüzdanı içe aktarın.",title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar"},step3:{description:"Taradıktan sonra, cüzdanınızı bağlamak için bir bağlantı istemi görünecektir.",title:"QR tarayıcı düğmesine dokunun"}}},bifrost:{qr_code:{step1:{description:"Daha hızlı erişim için Bifrost Cüzdan'ı ana ekranınıza koymanızı öneririz.",title:"Bifrost Cüzdan uygulamasını açın"},step2:{description:"Kurtarma ifadenizle bir cüzdan oluşturun veya içe aktarın.",title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar"},step3:{description:"Tarama işlemi sonrasında, cüzdanınızı bağlamak için bir bağlantı istemi gözükecektir.",title:"Tarayıcı düğmesine dokunun"}}},bitget:{qr_code:{step1:{description:"Daha hızlı erişim için Bitget Cüzdanınızı ana ekranınıza koymanızı öneririz.",title:"Bitget Cüzdan uygulamasını açın"},step2:{description:"Cüzdanınızı güvenli bir yöntemle yedeklemeye emin olun. Gizli ifadenizi asla kimseyle paylaşmayın.",title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar"},step3:{description:"Tarama yaptıktan sonra, cüzdanınızı bağlamak için bir bağlantı istemi görünecektir.",title:"Tarama düğmesine dokunun"}},extension:{step1:{description:"Cüzdanınıza daha hızlı erişim için Bitget Cüzdanını görev çubuğunuza sabitlemenizi öneririz.",title:"Bitget Cüzdan eklentisini yükleyin"},step2:{description:"Cüzdanınızı güvenli bir yöntemle yedeklemekten emin olun. Gizli ifadenizi hiç kimseyle paylaşmayın.",title:"Bir Cüzdan Oluşturun veya İçe Aktarın"},step3:{description:"Cüzdanınızı kurduktan sonra, aşağıya tıklayın ve tarayıcıyı yenileyin ve eklentiyi yükleyin.",title:"Tarayıcınızı yenileyin"}}},bitski:{extension:{step1:{description:"Cüzdanınıza daha hızlı erişim için Bitski'yi görev çubuğunuza sabitlemenizi öneririz.",title:"Bitski eklentisini yükleyin"},step2:{description:"Cüzdanınızı güvenli bir yöntem kullanarak yedeklediğinizden emin olun. Gizli ifadenizi kimseyle paylaşmayın.",title:"Bir Cüzdan Oluşturun veya İçe Aktarın"},step3:{description:"Cüzdanınızı kurduktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın.",title:"Tarayıcınızı yenileyin"}}},coin98:{qr_code:{step1:{description:"Cüzdanınıza daha hızlı erişim için Coin98 Cüzdanınızı ana ekranınıza koymanızı öneririz.",title:"Coin98 Cüzdan uygulamasını açın"},step2:{description:"Telefonunuzdaki yedekleme özelliğimizi kullanarak cüzdanınızı kolayca yedekleyebilirsiniz.",title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar"},step3:{description:"Tarama işlemi yaptıktan sonra, cüzdanınızı bağlamak için bir bağlantı istemi görünecektir.",title:"CüzdanBağlantısı düğmesine dokunun"}},extension:{step1:{description:"Tarayıcınızın sağ üst köşesinde tıklayın ve Coin98 Cüzdanınızı kolay erişim için sabitleyin.",title:"Coin98 Cüzdan eklentisini yükleyin"},step2:{description:"Yeni bir cüzdan oluşturun veya mevcut birini içe aktarın.",title:"Bir cüzdan oluşturun veya içe aktarın"},step3:{description:"Coin98 Cüzdan'ı kurduktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın.",title:"Tarayıcınızı yenileyin"}}},coinbase:{qr_code:{step1:{description:"Coinbase Cüzdan'ı ana ekranınıza koymanızı öneririz, böylece daha hızlı erişim sağlanır.",title:"Coinbase Wallet uygulamasını açın"},step2:{description:"Cüzdanınızı bulut yedekleme özelliğini kullanarak kolayca yedekleyebilirsiniz.",title:"Bir Cüzdan Oluşturun veya İçe Aktarın"},step3:{description:"Tarama yaptıktan sonra, cüzdanınızı bağlamanız için bir bağlantı istemi belirecektir.",title:"Tarama düğmesine dokunun"}},extension:{step1:{description:"Cüzdanınıza daha hızlı erişim için Coinbase Wallet'ı görev çubuğunuza sabitlemenizi öneririz.",title:"Coinbase Wallet uzantısını yükleyin"},step2:{description:"Cüzdanınızı güvenli bir yöntem kullanarak yedekleyin. Gizli ifadenizi asla başkalarıyla paylaşmayın.",title:"Cüzdan Oluştur veya İçe Aktar"},step3:{description:"Cüzdanınızı kurduktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın.",title:"Tarayıcınızı yenileyin"}}},core:{qr_code:{step1:{description:"Cüzdanınıza daha hızlı erişim için Core'u ana ekranınıza koymanızı öneririz.",title:"Core uygulamasını açın"},step2:{description:"Cüzdanınızın yedeğini telefonunuzda bulunan yedekleme özelliğimizi kullanarak kolayca alabilirsiniz.",title:"Cüzdan Oluştur veya İçe Aktar"},step3:{description:"Tarama yaptıktan sonra, cüzdanınızı bağlamak üzere bir bağlantı istemi görünecektir.",title:"WalletConnect düğmesine dokunun"}},extension:{step1:{description:"Cüzdanınıza daha hızlı erişim için Core'u görev çubuğunuza sabitlemenizi öneririz.",title:"Core eklentisini yükleyin"},step2:{description:"Cüzdanınızı güvenli bir yöntemle yedeklemeye dikkat edin. Gizli ifadenizi asla kimseyle paylaşmayın.",title:"Bir Cüzdan Oluşturun veya İçe Aktarın"},step3:{description:"Cüzdanınızı kurduktan sonra, aşağıya tıklayarak tarayıcıyı yenileyin ve eklentiyi yükleyin.",title:"Tarayıcınızı yenileyin"}}},fox:{qr_code:{step1:{description:"Daha hızlı erişim için FoxWallet'ı ana ekranınıza koymanızı öneririz.",title:"FoxWallet uygulamasını açın"},step2:{description:"Cüzdanınızı güvenli bir yöntem kullanarak yedeklediğinizden emin olun. Gizli ifadenizi asla kimseyle paylaşmayın.",title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar"},step3:{description:"Tarama yaptıktan sonra cüzdanınızı bağlamanız için bir bağlantı istemi belirecektir.",title:"Tarama düğmesine dokunun"}}},frontier:{qr_code:{step1:{description:"Daha hızlı erişim için Frontier Cüzdanını ana ekranınıza koymanızı öneririz.",title:"Frontier Cüzdan uygulamasını açın"},step2:{description:"Cüzdanınızı güvenli bir yöntem kullanarak yedeklediğinizden emin olun. Gizli ifadenizi asla kimseyle paylaşmayın.",title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar"},step3:{description:"Taramadan sonra, cüzdanınızı bağlamak için bir bağlantı istemi görünecektir.",title:"Tarama düğmesine dokunun"}},extension:{step1:{description:"Cüzdanınıza daha hızlı erişim için Frontier Cüzdanını görev çubuğunuza sabitlemenizi öneririz.",title:"Frontier Cüzdan eklentisini yükleyin"},step2:{description:"Cüzdanınızı güvenli bir yöntemle yedeklediğinizden emin olun. Gizli ifadenizi hiç kimseyle paylaşmayın.",title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar"},step3:{description:"Cüzdanınızı ayarladıktan sonra, tarayıcıyı yenilemeye ve eklentiyi yüklemeye başlamak için aşağıya tıklayın.",title:"Tarayıcınızı Yenileyin"}}},im_token:{qr_code:{step1:{title:"imToken uygulamasını açın",description:"Cüzdanınıza daha hızlı erişim için imToken uygulamasını ana ekranınıza koyun."},step2:{title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar",description:"Yeni bir cüzdan oluşturun veya mevcut bir cüzdanı içe aktarın."},step3:{title:"Sağ üst köşede Tarayıcı Simgesine dokunun",description:"Yeni Bağlantı'yı seçin, ardından QR kodunu tarayın ve bağlantıyı onaylamak için istemi onaylayın."}}},metamask:{qr_code:{step1:{title:"MetaMask uygulamasını açın",description:"Daha hızlı erişim için MetaMask'ı ana ekranınıza koymanızı öneririz."},step2:{title:"Bir Cüzdan Oluşturun veya İçe Aktarın",description:"Cüzdanınızı güvenli bir yöntem kullanarak yedekleyin. Gizli kurtarma ifadenizi asla başkalarıyla paylaşmayın."},step3:{title:"Tarama düğmesine dokunun",description:"Taramayı yaptıktan sonra, cüzdanınızı bağlamak için bir bağlantı istemi belirecektir."}},extension:{step1:{title:"MetaMask eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için MetaMask'i görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Bir Cüzdan Oluşturun veya İçe Aktarın",description:"Cüzdanınızı güvenli bir yöntemle yedeklediğinizden emin olun. Gizli ifadenizi hiç kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı Yenileyin",description:"Cüzdanınızı ayarladıktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}}},okx:{qr_code:{step1:{title:"OKX Wallet uygulamasını açın",description:"Daha hızlı erişim için OKX Wallet'ı ana ekranınıza koymanızı öneririz."},step2:{title:"Bir Cüzdan Oluşturun veya İçe Aktarın",description:"Cüzdanınızı güvenli bir yöntem kullanarak yedeklediğinizden emin olun. Gizli cümlenizi asla kimseyle paylaşmayın."},step3:{title:"Tarama düğmesine dokunun",description:"Tarama yaptıktan sonra, cüzdanınızı bağlama istemi görünecektir."}},extension:{step1:{title:"OKX Cüzdan eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için OKX Cüzdan'ı görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Cüzdan Oluşturun veya İçe Aktarın",description:"Cüzdanınızı güvenli bir yöntem kullanarak yedeklediğinizden emin olun. Gizli cümlenizi asla kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı kurduktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}}},omni:{qr_code:{step1:{title:"Omni uygulamasını açın",description:"Cüzdanınıza daha hızlı erişim için Omni'yi ana ekranınıza ekleyin."},step2:{title:"Bir Cüzdan Oluşturun ya da İçe Aktarın",description:"Yeni bir cüzdan oluşturun veya mevcut birini içe aktarın."},step3:{title:"QR simgesine dokunun ve tarayın",description:"Ana ekranınızdaki QR simgesine dokunun, kodu tarayın ve bağlanmak için istemi onaylayın."}}},token_pocket:{qr_code:{step1:{title:"TokenPocket uygulamasını açın",description:"Daha hızlı erişim için TokenPocket'ı ana ekranınıza koymanızı öneririz."},step2:{title:"Bir Cüzdan Oluşturun veya Cüzdanı İçe Aktarın",description:"Cüzdanınızı güvenli bir yöntem kullanarak yedekleyin. Gizli ifadenizi asla başkalarıyla paylaşmayın."},step3:{title:"Tarama düğmesine dokunun",description:"Taramayı yaptıktan sonra, cüzdanınızı bağlamak için bir bağlantı istemi belirecektir."}},extension:{step1:{title:"TokenPocket eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için TokenPocket'i görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar",description:"Cüzdanınızı güvenli bir yöntemle yedeklediğinizden emin olun. Gizli cümlenizi asla başkalarıyla paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı ayarladıktan sonra, tarayıcıyı yenilemekte ve eklentiyi yüklemek için aşağıya tıklayın."}}},trust:{qr_code:{step1:{title:"Trust Wallet uygulamasını açın",description:"Cüzdanınıza daha hızlı erişim için Trust Wallet'ı ana ekranınıza koyun."},step2:{title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar",description:"Yeni bir cüzdan oluşturun veya mevcut bir tane içe aktarın."},step3:{title:"Ayarlar'da WalletConnect'e dokunun",description:"Yeni Bağlantı'yı seçin, ardından QR kodunu tarayın ve bağlanmak için istemi onaylayın."}},extension:{step1:{title:"Trust Wallet eklentisini yükleyin",description:"Tarayıcınızın sağ üst köşesine tıklayın ve kolay erişim için Trust Wallet'i sabitleyin."},step2:{title:"Bir cüzdan oluşturun veya içe aktarın",description:"Yeni bir cüzdan oluşturun veya mevcut bir tane içe aktarın."},step3:{title:"Tarayıcınızı yenileyin",description:"Trust Wallet'ı kurduktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}}},uniswap:{qr_code:{step1:{title:"Uniswap uygulamasını açın",description:"Cüzdanınıza daha hızlı erişim için Uniswap Cüzdanınızı ana ekranınıza ekleyin."},step2:{title:"Cüzdan Oluştur veya İçe Aktar",description:"Yeni bir cüzdan oluşturun veya mevcut birini içe aktarın."},step3:{title:"QR ikonuna dokunun ve tarama yapın",description:"Ana ekranınızdaki QR simgesine dokunun, kodu tarayın ve bağlanmayı onaylamak için istemi kabul edin."}}},zerion:{qr_code:{step1:{title:"Zerion uygulamasını açın",description:"Daha hızlı erişim için Zerion'un ana ekranınıza konumlandırmanızı öneririz."},step2:{title:"Bir Cüzdan Oluşturun veya İçe Aktarın",description:"Cüzdanınızı güvenli bir yöntem kullanarak yedekleyin. Gizli ifadenizi asla başkalarıyla paylaşmayın."},step3:{title:"Tarama düğmesine basın",description:"Taramadan sonra, cüzdanınızı bağlamak için bir bağlantı istemi belirecektir."}},extension:{step1:{title:"Zerion eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için Zerion'u görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Cüzdan Oluştur veya İçe Aktar",description:"Cüzdanınızı güvenli bir yöntem kullanarak yedeklemeye emin olun. Gizli ifadenizi asla başkalarıyla paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı ayarladıktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}}},rainbow:{qr_code:{step1:{title:"Rainbow uygulamasını açın",description:"Cüzdanınıza daha hızlı erişim için Rainbow'u ana ekranınıza koymanızı öneririz."},step2:{title:"Cüzdan Oluştur veya İçe Aktar",description:"Telefonunuzdaki yedekleme özelliğimizi kullanarak cüzdanınızı kolayca yedekleyebilirsiniz."},step3:{title:"Tarama düğmesine dokunun",description:"Tarama yaptıktan sonra, cüzdanınızı bağlamanız için bir bağlantı istemi belirecektir."}}},enkrypt:{extension:{step1:{description:"Cüzdanınıza daha hızlı erişim sağlamak için Enkrypt Cüzdan'ı görev çubuğunuza sabitlemenizi öneririz.",title:"Enkrypt Cüzdan eklentisini yükleyin"},step2:{description:"Cüzdanınızı güvenli bir yöntemle yedeklediğinizden emin olun. Gizli ifadenizi hiç kimseyle paylaşmayın.",title:"Bir Cüzdan Oluşturun veya İçe Aktarın"},step3:{description:"Cüzdanınızı kurduktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın.",title:"Tarayıcınızı yenileyin"}}},frame:{extension:{step1:{description:"Cüzdanınıza daha hızlı erişim sağlamak için Frame'ı görev çubuğunuza sabitlemenizi öneririz.",title:"Frame ve eşlik eden uzantıyı yükleyin"},step2:{description:"Cüzdanınızı güvenli bir yöntem kullanarak yedeklediğinizden emin olun. Gizli ifadenizi asla başkasıyla paylaşmayın.",title:"Cüzdan Oluştur veya İçe Aktar"},step3:{description:"Cüzdanınızı ayarladıktan sonra, tarayıcıyı yenilemek ve uzantıyı yüklemek için aşağıya tıklayın.",title:"Tarayıcınızı yenileyin"}}},one_key:{extension:{step1:{title:"OneKey Wallet uzantısını yükleyin",description:"Cüzdanınıza daha hızlı erişim için OneKey Wallet'ı görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Cüzdan Oluştur veya İçe Aktar",description:"Cüzdanınızı güvenli bir yöntem kullanarak yedeklediğinizden emin olun. Gizli ifadenizi kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı kurduktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}}},phantom:{extension:{step1:{title:"Phantom eklentisini yükleyin",description:"Cüzdanınıza daha kolay erişim sağlamak için Phantom'u görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Bir Cüzdan Oluşturun veya İçe Aktarın",description:"Cüzdanınızı güvenli bir yöntem kullanarak yedeklediğinizden emin olun. Gizli kurtarma ifadenizi kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı ayarladıktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}}},rabby:{extension:{step1:{title:"Rabby eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için Rabby'yi görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Cüzdan Oluştur veya İçe Aktar",description:"Cüzdanınızı güvenli bir yöntemle yedeklediğinizden emin olun. Gizli ifadenizi asla başkalarıyla paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı kurduktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıdaki düğmeye tıklayın."}}},safeheron:{extension:{step1:{title:"Core eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için Safeheron'u görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Cüzdan Oluştur veya İçe Aktar",description:"Cüzdanınızı güvenli bir yöntemle yedeklediğinizden emin olun. Gizli ifadenizi hiç kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı ayarladıktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}}},taho:{extension:{step1:{title:"Taho uzantısını yükleyin",description:"Cüzdanınıza daha hızlı erişim için Taho'yu görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Bir Cüzdan Oluşturun veya İçe Aktarın",description:"Cüzdanınızı güvenli bir yöntemle yedeklediğinizden emin olun. Gizli ifadenizi hiç kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı ayarladıktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}}},talisman:{extension:{step1:{title:"Talisman eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için Talisman'ı görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Ethereum Cüzdanı Oluşturun veya İçe Aktarın",description:"Cüzdanınızı güvenli bir yöntemle yedeklediğinizden emin olun. Kurtarma ifadenizi hiç kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı ayarladıktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}}},xdefi:{extension:{step1:{title:"XDEFI Cüzdan eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için XDEFI Wallet'ı görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Bir Cüzdan Oluşturun veya İçe Aktarın",description:"Cüzdanınızı güvenli bir yöntemle yedeklediğinizden emin olun. Gizli ifadenizi hiç kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı ayarladıktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}}},zeal:{extension:{step1:{title:"Zeal eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için Zeal'ı görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar",description:"Cüzdanınızı güvenli bir yöntemle yedeklemeye emin olun. Gizli ifadenizi asla kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı kurduktan sonra, aşağıya tıklayın ve tarayıcıyı yenileyin ve eklentiyi yükleyin."}}},safepal:{extension:{step1:{title:"SafePal Wallet eklentisini yükleyin",description:"Tarayıcınızın sağ üst köşesine tıklayın ve kolay erişim için SafePal Wallet'ı sabitleyin."},step2:{title:"Bir cüzdan oluşturun veya içe aktarın",description:"Yeni bir cüzdan oluşturun veya mevcut birini içe aktarın."},step3:{title:"Tarayıcınızı yenileyin",description:"SafePal Cüzdan'ı kurduktan sonra, tarayıcıyı yenilemek ve eklentiyi yüklemek için aşağıya tıklayın."}},qr_code:{step1:{title:"SafePal Cüzdan uygulamasını açın",description:"SafePal Cüzdan'ı ana ekranınıza koyun, cüzdanınıza daha hızlı erişim için."},step2:{title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar",description:"Yeni bir cüzdan oluşturun veya mevcut birini içe aktarın."},step3:{title:"Ayarlar'da WalletConnect'e dokunun",description:"Yeni Bağlantı'yı seçin, ardından QR kodunu tarayın ve bağlantıyı onaylamak için istemi onaylayın."}}},desig:{extension:{step1:{title:"Desig eklentisini yükleyin",description:"Cüzdanınıza daha kolay erişim sağlamak için Desig'i görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Bir Cüzdan Oluşturun",description:"Cüzdanınızı güvenli bir yöntemle yedeklemeye emin olun. Gizli ifadenizi asla kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı kurduktan sonra, aşağıya tıklayın ve tarayıcıyı yenileyin ve eklentiyi yükleyin."}}},subwallet:{extension:{step1:{title:"SubWallet eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için SubWallet'ı görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar",description:"Cüzdanınızı güvenli bir yöntemle yedeklediğinizden emin olun. Kurtarma ifadenizi hiç kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı kurduktan sonra, aşağıya tıklayın ve tarayıcıyı yenileyin ve eklentiyi yükleyin."}},qr_code:{step1:{title:"SubWallet uygulamasını açın",description:"Daha hızlı erişim için SubWallet'ı ana ekranınıza koymenizi öneririz."},step2:{title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar",description:"Cüzdanınızı güvenli bir yöntemle yedeklemeye emin olun. Gizli ifadenizi asla kimseyle paylaşmayın."},step3:{title:"Tarayıcı düğmesine dokunun",description:"Taradıktan sonra, cüzdanınızı bağlamak için bir bağlantı istemi görünecektir."}}},clv:{extension:{step1:{title:"CLV Cüzdanı eklentisini yükleyin",description:"Cüzdanınıza daha hızlı erişim için CLV Cüzdanını görev çubuğunuza sabitlemenizi öneririz."},step2:{title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar",description:"Cüzdanınızı güvenli bir yöntemle yedeklemeye emin olun. Gizli ifadenizi asla kimseyle paylaşmayın."},step3:{title:"Tarayıcınızı yenileyin",description:"Cüzdanınızı kurduktan sonra, aşağıya tıklayın ve tarayıcıyı yenileyin ve eklentiyi yükleyin."}},qr_code:{step1:{title:"CLV Cüzdan uygulamasını açın",description:"Daha hızlı erişim için CLV Cüzdanını ana ekranınıza koymanızı öneririz."},step2:{title:"Cüzdan Oluştur veya Cüzdanı İçe Aktar",description:"Cüzdanınızı güvenli bir yöntemle yedeklemeye emin olun. Gizli ifadenizi asla kimseyle paylaşmayın."},step3:{title:"Tarayıcı düğmesine dokunun",description:"Taradıktan sonra, cüzdanınızı bağlamak için bir bağlantı istemi görünecektir."}}},okto:{qr_code:{step1:{title:"Okto uygulamasını açın",description:"Hızlı erişim için Okto'yu ana ekranınıza ekleyin"},step2:{title:"MPC Cüzdanı oluşturun",description:"Bir hesap oluşturun ve bir cüzdan oluşturun"},step3:{title:"Ayarlar'da WalletConnect'e dokunun",description:"Sağ üstteki Tarama QR simgesine dokunun ve bağlanmak için istemi onaylayın."}}},ledger:{desktop:{step1:{title:"Ledger Live uygulamasını açın",description:"Daha hızlı erişim için Ledger Live'ı ana ekranınıza koymanızı öneririz."},step2:{title:"Ledger'ınızı kurun",description:"Yeni bir Ledger kurun veya mevcut birine bağlanın."},step3:{title:"Bağlan",description:"Cüzdanınızı bağlamak için bir bağlantı istemi belirecektir."}},qr_code:{step1:{title:"Ledger Live uygulamasını açın",description:"Daha hızlı erişim için Ledger Live'ı ana ekranınıza koymanızı öneririz."},step2:{title:"Ledger'ınızı kurun",description:"Masaüstü uygulama ile senkronize olabilir veya Ledger'ınızı bağlayabilirsiniz."},step3:{title:"Kodu tarayın",description:"WalletConnect'e dokunun ve ardından Tarayıcı'ya geçin. Taramadan sonra, cüzdanınızı bağlamak için bir bağlantı istemi belirecektir."}}}},Mg={connect_wallet:Mou,intro:Lou,sign_in:Uou,connect:$ou,connect_scan:Wou,connector_group:qou,get:Hou,get_options:Gou,get_mobile:Qou,get_instructions:Kou,chains:Vou,profile:Jou,wallet_connectors:Zou},You={label:"连接钱包"},Xou={title:"什么是钱包?",description:"钱包用于发送、接收、存储和显示数字资产。它也是一种新型的登录方式,无需在每个网站上创建新账户和密码。",digital_asset:{title:"您的数字资产之家",description:"钱包用于发送、接收、存储和显示像以太坊和NFT这样的数字资产。"},login:{title:"一种新的登录方式",description:"而不是在每个网站上创建新的账户和密码,只需连接您的钱包。"},get:{label:"获取钱包"},learn_more:{label:"了解更多"}},u3u={label:"验证您的账户",description:"为了完成连接,您必须在钱包中签署一条消息,以验证您是此账户的所有者。",message:{send:"发送消息",preparing:"准备消息中...",cancel:"取消",preparing_error:"准备消息时出错,请重试!"},signature:{waiting:"等待签名...",verifying:"正在验证签名...",signing_error:"签署消息时出错,请重试!",verifying_error:"验证签名时出错,请重试!",oops_error:"哎呀,出了点问题!"}},e3u={label:"连接",title:"连接钱包",new_to_ethereum:{description:"对以太坊钱包不熟悉?",learn_more:{label:"了解更多"}},learn_more:{label:"了解更多"},recent:"近期",status:{opening:"正在打开 %{wallet}...",not_installed:"%{wallet} 尚未安装",not_available:"%{wallet} 不可用",confirm:"在扩展中确认连接"},secondary_action:{get:{description:"没有 %{wallet}吗?",label:"获取"},install:{label:"安装"},retry:{label:"重试"}},walletconnect:{description:{full:"需要官方的 WalletConnect 弹窗吗?",compact:"需要 WalletConnect 弹窗吗?"},open:{label:"打开"}}},t3u={title:"使用 %{wallet}扫描",fallback_title:"使用您的手机扫描"},n3u={recommended:"推荐",other:"其他",popular:"流行",more:"更多",others:"其他的"},r3u={title:"获取一个钱包",action:{label:"获取"},mobile:{description:"移动钱包"},extension:{description:"浏览器扩展"},mobile_and_extension:{description:"移动钱包和扩展"},mobile_and_desktop:{description:"移动和桌面钱包"},looking_for:{title:"不是你要找的吗?",mobile:{description:"在主屏幕上选择一个钱包,以开始使用不同的钱包提供商。"},desktop:{compact_description:"在主屏幕上选择一个钱包,以开始使用不同的钱包提供商。",wide_description:"在左侧选择一个钱包,以开始使用不同的钱包提供商。"}}},i3u={title:"开始使用 %{wallet}",short_title:"获取 %{wallet}",mobile:{title:"%{wallet} 用于移动",description:"使用移动钱包探索以太坊的世界。",download:{label:"获取应用"}},extension:{title:"%{wallet} 为 %{browser}",description:"从您最喜欢的网络浏览器直接访问您的钱包。",download:{label:"添加到 %{browser}"}},desktop:{title:"%{wallet} 对于 %{platform}",description:"从您强大的桌面原生访问您的钱包。",download:{label:"添加到 %{platform}"}}},a3u={title:"安装 %{wallet}",description:"用手机扫描下载 iOS 或 Android",continue:{label:"继续"}},s3u={mobile:{connect:{label:"连接"},learn_more:{label:"了解更多"}},extension:{refresh:{label:"刷新"},learn_more:{label:"了解更多"}},desktop:{connect:{label:"连接"},learn_more:{label:"了解更多"}}},o3u={title:"切换网络",wrong_network:"检测到错误的网络,请切换或断开连接以继续。",confirm:"在钱包中确认",switching_not_supported:"您的钱包不支持从 %{appName}切换网络。请尝试从您的钱包内部切换网络。",switching_not_supported_fallback:"您的钱包不支持从此应用切换网络。尝试从您的钱包内切换网络。",disconnect:"断开连接",connected:"已连接"},l3u={disconnect:{label:"断开连接"},copy_address:{label:"复制地址",copied:"已复制!"},explorer:{label:"在浏览器上查看更多"},transactions:{description:"%{appName} 交易将会出现在这里...",description_fallback:"您的交易将会出现在这里...",recent:{title:"最近交易"},clear:{label:"清除全部"}}},c3u={argent:{qr_code:{step1:{description:"将 Argent 放到您的主屏幕上,以便更快地访问您的钱包。",title:"打开 Argent 应用"},step2:{description:"创建钱包和用户名,或导入现有钱包。",title:"创建或导入钱包"},step3:{description:"在您扫描后,将出现连接提示,供您连接您的钱包。",title:"点击扫描二维码按钮"}}},bifrost:{qr_code:{step1:{description:"我们建议将Bifrost Wallet放在您的主屏幕上,以便更快地访问。",title:"打开 Bifrost Wallet 应用"},step2:{description:"使用恢复短语创建或导入钱包。",title:"创建或导入钱包"},step3:{description:"在您扫描后,将出现连接提示,供您连接您的钱包。",title:"点击扫描按钮"}}},bitget:{qr_code:{step1:{description:"我们建议您将Bitget钱包添加到主屏幕,以便更快地访问。",title:"打开Bitget钱包应用程序"},step2:{description:"务必使用安全的方法备份您的钱包。决不与任何人分享您的秘密短语。",title:"创建或导入钱包"},step3:{description:"扫描后,将出现一个连接提示,供您连接您的钱包。",title:"点击扫描按钮"}},extension:{step1:{description:"我们建议您将Bitget钱包固定在任务栏,以便更快地访问您的钱包。",title:"安装Bitget Wallet扩展"},step2:{description:"确保使用安全的方式备份您的钱包。绝不与任何人分享您的秘密短语。",title:"创建或导入钱包"},step3:{description:"设置钱包后,点击下方刷新浏览器并加载扩展。",title:"刷新您的浏览器"}}},bitski:{extension:{step1:{description:"我们建议您将Bitski固定在任务栏上,以便更快地访问您的钱包。",title:"安装Bitski扩展"},step2:{description:"请确保用安全的方法备份您的钱包。绝不与任何人共享您的秘密短语。",title:"创建或导入钱包"},step3:{description:"设置完您的钱包后,点击下方以刷新浏览器并加载扩展程序。",title:"刷新您的浏览器"}}},coin98:{qr_code:{step1:{description:"我们建议将Coin98钱包放在您的主屏幕上,以便更快地访问您的钱包。",title:"打开Coin98钱包应用程序"},step2:{description:"您可以使用我们的手机上的备份功能轻松备份您的钱包。",title:"创建或导入钱包"},step3:{description:"扫描后,将出现一个连接提示,让您连接您的钱包。",title:"点击WalletConnect按钮"}},extension:{step1:{description:"点击浏览器右上角并固定Coin98钱包,以便轻松访问。",title:"安装Coin98钱包扩展"},step2:{description:"创建新钱包或导入现有钱包。",title:"创建或导入钱包。"},step3:{description:"设置完成Coin98 钱包后,单击下方以刷新浏览器并加载扩展程序。",title:"刷新您的浏览器"}}},coinbase:{qr_code:{step1:{description:"我们建议您把Coinbase钱包放到主屏幕上,以便更快地访问。",title:"打开Coinbase钱包应用"},step2:{description:"您可以轻松地使用云备份功能备份您的钱包。",title:"创建或导入钱包"},step3:{description:"扫描后,将出现连接提示,供您连接您的钱包。",title:"点击扫描按钮"}},extension:{step1:{description:"我们建议您将Coinbase钱包固定在任务栏上,以便更快地访问您的钱包。",title:"安装Coinbase钱包扩展"},step2:{description:"务必使用安全的方法备份您的钱包。永远不要与任何人分享您的秘密短语。",title:"创建或导入钱包"},step3:{description:"设置好钱包后,点击下方以刷新浏览器并加载扩展。",title:"刷新您的浏览器"}}},core:{qr_code:{step1:{description:"我们建议您将Core添加到主屏幕,以便更快地访问您的钱包。",title:"打开Core应用程序"},step2:{description:"您可以使用我们的手机备份功能轻松备份您的钱包。",title:"创建或导入钱包"},step3:{description:"扫描后,将出现连接提示,让您连接您的钱包。",title:"点击WalletConnect按钮"}},extension:{step1:{description:"我们建议将 Core 固定到任务栏,以便更快地访问您的钱包。",title:"安装 Core 扩展"},step2:{description:"一定要使用安全的方法备份您的钱包。切勿与任何人分享您的秘密短语。",title:"创建或导入钱包"},step3:{description:"设置好钱包后,点击下方以刷新浏览器并加载扩展。",title:"刷新你的浏览器"}}},fox:{qr_code:{step1:{description:"我们建议您将 FoxWallet 放到主屏幕上,以便更快的访问。",title:"打开 FoxWallet 应用"},step2:{description:"确保使用安全的方法备份您的钱包。永远不要与任何人共享您的秘密短语。",title:"创建或导入钱包"},step3:{description:"扫描后,将出现连接提示,让您连接您的钱包。",title:"点击扫描按钮"}}},frontier:{qr_code:{step1:{description:"我们建议将 Frontier 钱包放在您的主屏幕上,以便更快地访问。",title:"打开 Frontier 钱包应用"},step2:{description:"确保使用安全的方法备份您的钱包。永远不要与任何人共享您的秘密短语。",title:"创建或导入钱包"},step3:{description:"扫描后,将出现连接提示,让您连接您的钱包。",title:"点击扫描按钮"}},extension:{step1:{description:"我们建议您将Frontier钱包固定到任务栏,以便更快地访问您的钱包。",title:"安装Frontier钱包扩展"},step2:{description:"确保使用安全的方法备份您的钱包。永远不要与任何人分享您的秘密短语。",title:"创建或导入钱包"},step3:{description:"设置完成钱包后,点击下方刷新浏览器并加载扩展。",title:"刷新你的浏览器"}}},im_token:{qr_code:{step1:{title:"打开imToken应用",description:"将imToken应用放在您的主屏幕上,以更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"创建新钱包或导入已有的钱包。"},step3:{title:"点击右上角的扫描图标",description:"选择新连接,然后扫描二维码并确认提示以进行连接。"}}},metamask:{qr_code:{step1:{title:"打开 MetaMask 应用",description:"我们建议将 MetaMask 放在您的主屏幕上,以便更快地访问。"},step2:{title:"创建或导入钱包",description:"确保使用安全的方法备份您的钱包。永远不要与任何人分享你的秘密短语。"},step3:{title:"点击扫描按钮",description:"扫描后,将出现连接提示,以便你连接你的钱包。"}},extension:{step1:{title:"安装 MetaMask 扩展",description:"我们建议将MetaMask固定在您的任务栏上,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"请务必使用安全的方法备份您的钱包。切勿与任何人分享您的秘密短语。"},step3:{title:"刷新您的浏览器",description:"一旦您设置好您的钱包,点击下面刷新浏览器并加载扩展。"}}},okx:{qr_code:{step1:{title:"打开OKX钱包应用程序",description:"我们建议将OKX钱包放在您的主屏幕上,以便更快地访问。"},step2:{title:"创建或导入钱包",description:"务必使用安全的方法备份您的钱包。千万不要与任何人分享您的秘密短语。"},step3:{title:"点击扫描按钮",description:"扫描后,将出现一个连接提示,让您连接您的钱包。"}},extension:{step1:{title:"安装 OKX 钱包扩展",description:"我们建议将 OKX 钱包固定到您的任务栏,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"务必使用安全的方法备份您的钱包。千万不要与任何人分享您的秘密短语。"},step3:{title:"刷新您的浏览器",description:"一旦你设置好你的钱包,点击下方刷新浏览器并加载扩展。"}}},omni:{qr_code:{step1:{title:"打开Omni应用",description:"将Omni添加到你的主屏幕,以便更快地访问你的钱包。"},step2:{title:"创建或导入钱包",description:"创建新的钱包或导入现有的钱包。"},step3:{title:"点击QR图标并扫描",description:"点击首页的二维码图标,扫描代码并确认提示以连接。"}}},token_pocket:{qr_code:{step1:{title:"打开TokenPocket应用",description:"我们建议将TokenPocket放在您的主屏幕上以便更快的访问。"},step2:{title:"创建或导入钱包",description:"一定要使用安全的方法备份您的钱包。切勿与任何人分享您的秘密短语。"},step3:{title:"点击扫描按钮",description:"扫描后,将出现连接提示,供您连接钱包。"}},extension:{step1:{title:"安装TokenPocket扩展",description:"我们建议将TokenPocket固定到任务栏,以便更快地访问您的钱包。"},step2:{title:"创建或导入一个钱包",description:"一定要使用安全的方法备份您的钱包。绝对不要与任何人分享您的秘密短语。"},step3:{title:"刷新您的浏览器",description:"设置好您的钱包后,点击下面刷新浏览器并加载扩展。"}}},trust:{qr_code:{step1:{title:"打开Trust Wallet应用",description:"将Trust Wallet放在主屏幕上,以便更快地访问您的钱包。"},step2:{title:"创建或导入一个钱包",description:"创建新的钱包或导入现有的钱包。"},step3:{title:"在设置中点击WalletConnect",description:"选择新的连接,然后扫描二维码并确认提示以进行连接。"}},extension:{step1:{title:"安装Trust Wallet扩展程序",description:"在浏览器的右上角点击并固定Trust Wallet以便于访问。"},step2:{title:"创建或导入钱包",description:"创建新的钱包或导入现有的钱包。"},step3:{title:"刷新您的浏览器",description:"设置Trust Wallet后,点击下面以刷新浏览器并加载扩展程序。"}}},uniswap:{qr_code:{step1:{title:"打开Uniswap应用",description:"将Uniswap钱包添加到您的主屏幕,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"创建新钱包或导入现有钱包。"},step3:{title:"点击QR图标并扫描",description:"在您的主屏幕上点击QR图标,扫描代码并确认提示以进行连接。"}}},zerion:{qr_code:{step1:{title:"打开Zerion应用",description:"我们建议将Zerion放在您的主屏幕上以便更快地访问。"},step2:{title:"创建或导入钱包",description:"确保使用安全的方式备份你的钱包。绝对不要与任何人分享你的私人密语。"},step3:{title:"点击扫描按钮",description:"你扫描后,会出现一个连接提示让你连接你的钱包。"}},extension:{step1:{title:"安装 Zerion 扩展",description:"我们建议将 Zerion 固定在你的任务栏以便更快访问你的钱包。"},step2:{title:"创建或导入钱包",description:"确保使用安全的方法备份你的钱包。永远不要与任何人分享你的秘密短语。"},step3:{title:"刷新您的浏览器",description:"设置您的钱包后,点击下面以刷新浏览器并加载扩展程序。"}}},rainbow:{qr_code:{step1:{title:"打开 Rainbow 应用",description:"我们建议将 Rainbow 放在您的主屏幕上,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"您可以使用我们的备份功能在您的手机上轻松备份你的钱包。"},step3:{title:"点击扫描按钮",description:"扫描后,将出现连接提示,让您连接您的钱包。"}}},enkrypt:{extension:{step1:{description:"我们建议将Enkrypt Wallet固定到任务栏,以便更快地访问您的钱包。",title:"安装Enkrypt Wallet扩展"},step2:{description:"请确保使用安全方法备份您的钱包。永远不要与任何人分享您的秘密短语。",title:"创建钱包或导入钱包"},step3:{description:"设置钱包后,点击下面刷新浏览器并加载扩展。",title:"刷新您的浏览器"}}},frame:{extension:{step1:{description:"我们建议将Frame固定到任务栏,以便更快地访问您的钱包。",title:"安装Frame及其配套扩展"},step2:{description:"务必使用安全的方法备份您的钱包。决不与任何人分享您的秘密短语。",title:"创建或导入钱包"},step3:{description:"设置钱包后,点击下方以刷新浏览器并加载扩展。",title:"刷新你的浏览器"}}},one_key:{extension:{step1:{title:"安装OneKey Wallet扩展",description:"我们建议将OneKey Wallet固定到任务栏,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"确保使用安全的方法备份您的钱包。切勿与任何人分享您的秘密短语。"},step3:{title:"刷新您的浏览器",description:"设置您的钱包后,点击下方以刷新浏览器并加载扩展程序。"}}},phantom:{extension:{step1:{title:"安装 Phantom 扩展程序",description:"我们建议将 Phantom 固定到您的任务栏,以便更容易访问您的钱包。"},step2:{title:"创建或导入钱包",description:"确保使用安全的方法备份您的钱包。切勿与任何人分享您的秘密恢复短语。"},step3:{title:"刷新您的浏览器",description:"设置好您的钱包后,点击下方以刷新浏览器并加载扩展程序。"}}},rabby:{extension:{step1:{title:"安装 Rabby 扩展程序",description:"我们建议将 Rabby 固定在您的任务栏,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"一定要使用安全的方法备份您的钱包。切勿与任何人分享您的密钥短语。"},step3:{title:"刷新您的浏览器",description:"一旦您设置好您的钱包,点击以下以刷新浏览器并加载扩展程序。"}}},safeheron:{extension:{step1:{title:"安装 Core 扩展",description:"我们建议将 Safeheron 固定在您的任务栏,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"确保使用安全的方法备份您的钱包。切勿与任何人分享您的秘密短语。"},step3:{title:"刷新您的浏览器",description:"设置好您的钱包后,点击下方以刷新浏览器并加载扩展程序。"}}},taho:{extension:{step1:{title:"安装Taho扩展程序",description:"我们建议将Taho固定在您的任务栏上,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"确保使用安全的方法备份您的钱包。切勿与任何人分享您的秘密短语。"},step3:{title:"刷新您的浏览器",description:"设置好您的钱包后,点击下方以刷新浏览器并加载扩展程序。"}}},talisman:{extension:{step1:{title:"安装 Talisman 扩展程序",description:"我们建议将 Talisman 固定在任务栏上,以便更快地访问您的钱包。"},step2:{title:"创建或导入以太坊钱包",description:"确保使用安全的方法备份您的钱包。永远不要与任何人分享您的恢复短语。"},step3:{title:"刷新您的浏览器",description:"设置好您的钱包后,点击下方以刷新浏览器并加载扩展程序。"}}},xdefi:{extension:{step1:{title:"安装 XDEFI 钱包扩展程序",description:"我们建议将XDEFI钱包固定到您的任务栏,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"确保使用安全的方法备份您的钱包。永远不要与任何人共享您的秘密短语。"},step3:{title:"刷新您的浏览器",description:"一旦你设置好你的钱包,点击下面刷新浏览器和加载扩展。"}}},zeal:{extension:{step1:{title:"安装Zeal扩展程序",description:"我们建议将Zeal固定在您的任务栏上,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"务必使用安全的方法备份您的钱包。决不与任何人分享您的秘密短语。"},step3:{title:"刷新您的浏览器",description:"设置钱包后,点击下方刷新浏览器并加载扩展。"}}},safepal:{extension:{step1:{title:"安装SafePal Wallet扩展程序",description:"点击浏览器右上角并固定SafePal Wallet以便于快速访问。"},step2:{title:"创建或导入钱包。",description:"创建新钱包或导入现有钱包。"},step3:{title:"刷新您的浏览器",description:"一旦设置了SafePal钱包,点击下方刷新浏览器并加载扩展程序。"}},qr_code:{step1:{title:"打开SafePal钱包应用程序",description:"将SafePal钱包放在主屏幕上以更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"创建新钱包或导入现有钱包。"},step3:{title:"在设置中点击WalletConnect",description:"选择新连接,然后扫描二维码并确认提示以进行连接。"}}},desig:{extension:{step1:{title:"安装 Desig 扩展",description:"我们建议将 Desig 固定到任务栏,以便更轻松地访问您的钱包。"},step2:{title:"创建一个钱包",description:"务必使用安全的方法备份您的钱包。决不与任何人分享您的秘密短语。"},step3:{title:"刷新您的浏览器",description:"设置钱包后,点击下方刷新浏览器并加载扩展。"}}},subwallet:{extension:{step1:{title:"安装 SubWallet 扩展",description:"我们建议将 SubWallet 固定到任务栏,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"确保使用安全的方法备份您的钱包。永远不要与任何人分享您的恢复短语。"},step3:{title:"刷新您的浏览器",description:"设置钱包后,点击下方刷新浏览器并加载扩展。"}},qr_code:{step1:{title:"打开 SubWallet 应用",description:"我们建议将 SubWallet 放置在主屏幕上,以便更快地访问。"},step2:{title:"创建或导入钱包",description:"务必使用安全的方法备份您的钱包。决不与任何人分享您的秘密短语。"},step3:{title:"点击扫描按钮",description:"在您扫描后,将出现连接提示,供您连接您的钱包。"}}},clv:{extension:{step1:{title:"安装 CLV Wallet 扩展",description:"我们建议将 CLV Wallet 固定到任务栏,以便更快地访问您的钱包。"},step2:{title:"创建或导入钱包",description:"务必使用安全的方法备份您的钱包。决不与任何人分享您的秘密短语。"},step3:{title:"刷新您的浏览器",description:"设置钱包后,点击下方刷新浏览器并加载扩展。"}},qr_code:{step1:{title:"打开 CLV 钱包应用",description:"我们建议将 CLV 钱包添加到您的主屏幕,以便更快地访问。"},step2:{title:"创建或导入钱包",description:"务必使用安全的方法备份您的钱包。决不与任何人分享您的秘密短语。"},step3:{title:"点击扫描按钮",description:"在您扫描后,将出现连接提示,供您连接您的钱包。"}}},okto:{qr_code:{step1:{title:"打开 Okto 应用",description:"将 Okto 添加到您的主屏幕以便快速访问"},step2:{title:"创建一个 MPC 钱包",description:"创建一个账户并生成一个钱包"},step3:{title:"在设置中点击WalletConnect",description:"点击右上角的扫描二维码图标,并确认提示以连接。"}}},ledger:{desktop:{step1:{title:"打开Ledger Live应用",description:"我们建议将Ledger Live放在您的主屏幕上,以便更快地访问。"},step2:{title:"设置您的Ledger",description:"设置一个新的Ledger或连接到一个现有的。"},step3:{title:"连接",description:"你扫描后,会出现一个连接提示让你连接你的钱包。"}},qr_code:{step1:{title:"打开Ledger Live应用",description:"我们建议将Ledger Live放在您的主屏幕上,以便更快地访问。"},step2:{title:"设置您的Ledger",description:"您可以同步桌面应用程式,或连接您的Ledger。"},step3:{title:"扫描代码",description:"点击 WalletConnect 然后切换到扫描器。你扫描后,会出现一个连接提示让你连接你的钱包。"}}}},Lg={connect_wallet:You,intro:Xou,sign_in:u3u,connect:e3u,connect_scan:t3u,connector_group:n3u,get:r3u,get_options:i3u,get_mobile:a3u,get_instructions:s3u,chains:o3u,profile:l3u,wallet_connectors:c3u},Oa=new dw.I18n({ar:kg,"ar-AR":kg,en:_g,"en-US":_g,es:Sg,"es-419":Sg,fr:Pg,"fr-FR":Pg,hi:Tg,"hi-IN":Tg,id:Og,"id-ID":Og,ja:Ig,"ja-JP":Ig,ko:Ng,"ko-KR":Ng,pt:Rg,"pt-BR":Rg,ru:zg,"ru-RU":zg,th:jg,"th-TH":jg,tr:Mg,"tr-TR":Mg,zh:Lg,"zh-CN":Lg});Oa.defaultLocale="en-US";Oa.locale="en-US";Oa.enableFallback=!0;var E3u=()=>{var e;if(typeof window<"u"&&typeof navigator<"u"){if((e=navigator.languages)!=null&&e.length)return navigator.languages[0];if(navigator.language)return navigator.language}},$0=M.createContext(Oa),d3u=({children:e,locale:u})=>{const t=M.useMemo(()=>E3u(),[]),n=M.useMemo(()=>(u?Oa.locale=u:!u&&t&&(Oa.locale=t),Oa),[u,t]);return x.createElement($0.Provider,{value:n},e)};function v8(e){return e!=null}var Ug={iconBackground:"#96bedc",iconUrl:async()=>(await Uu(()=>import("./arbitrum-LYDBJZP3-eb03435b.js"),[])).default},$g={iconBackground:"#e84141",iconUrl:async()=>(await Uu(()=>import("./avalanche-TFPKP544-83c89fd5.js"),[])).default},Wg={iconBackground:"#0052ff",iconUrl:async()=>(await Uu(()=>import("./base-3MIUIYGA-d99275a3.js"),[])).default},qg={iconBackground:"#ebac0e",iconUrl:async()=>(await Uu(()=>import("./bsc-S2GSW6VX-05341716.js"),[])).default},Hg={iconBackground:"#002D74",iconUrl:async()=>(await Uu(()=>import("./cronos-DQKKIEX7-67e88155.js"),[])).default},_r={iconBackground:"#484c50",iconUrl:async()=>(await Uu(()=>import("./ethereum-4FY57XJF-20f89eb8.js"),[])).default},f3u={iconBackground:"#f9f7ec",iconUrl:async()=>(await Uu(()=>import("./hardhat-ARRFHFKB-687e462a.js"),[])).default},N6={iconBackground:"#ff5a57",iconUrl:async()=>(await Uu(()=>import("./optimism-UUP5Y7TB-96a3957f.js"),[])).default},Gg={iconBackground:"#9f71ec",iconUrl:async()=>(await Uu(()=>import("./polygon-Z4QITDL7-953b4259.js"),[])).default},Qg={iconBackground:"#000000",iconUrl:async()=>(await Uu(()=>import("./zora-KVO7WIOK-bf3eb886.js"),[])).default},Kg={iconBackground:"#f9f7ec",iconUrl:async()=>(await Uu(()=>import("./zkSync-XRUC4ZHO-c03c3379.js"),[])).default},p3u={arbitrum:{chainId:42161,name:"Arbitrum",...Ug},arbitrumGoerli:{chainId:421613,...Ug},avalanche:{chainId:43114,...$g},avalancheFuji:{chainId:43113,...$g},base:{chainId:8453,name:"Base",...Wg},baseGoerli:{chainId:84531,...Wg},bsc:{chainId:56,name:"BSC",...qg},bscTestnet:{chainId:97,...qg},cronos:{chainId:25,...Hg},cronosTestnet:{chainId:338,...Hg},goerli:{chainId:5,..._r},hardhat:{chainId:31337,...f3u},holesky:{chainId:17e3,..._r},kovan:{chainId:42,..._r},localhost:{chainId:1337,..._r},mainnet:{chainId:1,name:"Ethereum",..._r},optimism:{chainId:10,name:"Optimism",...N6},optimismGoerli:{chainId:420,...N6},optimismKovan:{chainId:69,...N6},polygon:{chainId:137,name:"Polygon",...Gg},polygonMumbai:{chainId:80001,...Gg},rinkeby:{chainId:4,..._r},ropsten:{chainId:3,..._r},sepolia:{chainId:11155111,..._r},zora:{chainId:7777777,name:"Zora",...Qg},zoraTestnet:{chainId:999,...Qg},zkSync:{chainId:324,name:"zkSync",...Kg},zkSyncTestnet:{chainId:280,...Kg}},h3u=Object.fromEntries(Object.values(p3u).filter(v8).map(({chainId:e,...u})=>[e,u])),C3u=e=>e.map(u=>{var t,n,r,i;const a=(t=h3u[u.id])!=null?t:{};return{...u,name:(n=a.name)!=null?n:u.name,iconUrl:(r=u.iconUrl)!=null?r:a.iconUrl,iconBackground:(i=u.iconBackground)!=null?i:a.iconBackground}}),b8=M.createContext({chains:[]});function m3u({chains:e,children:u,initialChain:t}){return x.createElement(b8.Provider,{value:M.useMemo(()=>({chains:C3u(e),initialChainId:typeof t=="number"?t:t==null?void 0:t.id}),[e,t])},u)}var tE=()=>M.useContext(b8).chains,A3u=()=>M.useContext(b8).initialChainId,g3u=()=>{const e=tE();return M.useMemo(()=>{const u={};return e.forEach(t=>{u[t.id]=t}),u},[e])},B3u=()=>{const[e,u]=M.useReducer(()=>!0,!1);return M.useEffect(u,[u]),e};function sk(){const e=$C.id,u=Qc(),t=Array.isArray(u.chains)?u.chains:[],n=t==null?void 0:t.some(r=>(r==null?void 0:r.id)===e);return{chainId:e,enabled:n}}function ok(e){const{chainId:u,enabled:t}=sk(),{data:n}=nU({chainId:u,enabled:t,name:e});return n}function lk(e){const{chainId:u,enabled:t}=sk(),{data:n}=aU({address:e,chainId:u,enabled:t});return n}function w8(){var e;const{chain:u}=Xa();return(e=u==null?void 0:u.id)!=null?e:null}var ck="rk-transactions";function y3u(e){try{const u=e?JSON.parse(e):{};return typeof u=="object"?u:{}}catch{return{}}}function Vg(){return y3u(typeof localStorage<"u"?localStorage.getItem(ck):null)}var F3u=/^0x([A-Fa-f0-9]{64})$/;function D3u(e){const u=[];return F3u.test(e.hash)||u.push("Invalid transaction hash"),typeof e.description!="string"&&u.push("Transaction must have a description"),typeof e.confirmations<"u"&&(!Number.isInteger(e.confirmations)||e.confirmations<1)&&u.push("Transaction confirmations must be a positiver integer"),u}function v3u({provider:e}){let u=Vg(),t=e;const n=new Set,r=new Map;function i(h){t=h}function a(h,g){var A,m;return(m=(A=u[h])==null?void 0:A[g])!=null?m:[]}function s(h,g,A){const m=D3u(A);if(m.length>0)throw new Error(["Unable to add transaction",...m].join(` +`));E(h,g,B=>[{...A,status:"pending"},...B.filter(({hash:F})=>F!==A.hash)])}function o(h,g){E(h,g,()=>[])}function l(h,g,A,m){E(h,g,B=>B.map(F=>F.hash===A?{...F,status:m}:F))}async function c(h,g){await Promise.all(a(h,g).filter(A=>A.status==="pending").map(async A=>{const{confirmations:m,hash:B}=A,F=r.get(B);if(F)return await F;const w=t.waitForTransactionReceipt({confirmations:m,hash:B}).then(({status:v})=>{r.delete(B),v!==void 0&&l(h,g,B,v===0||v==="reverted"?"failed":"confirmed")});return r.set(B,w),await w}))}function E(h,g,A){var m,B;u=Vg(),u[h]=(m=u[h])!=null?m:{};let F=0;const w=10,v=A((B=u[h][g])!=null?B:[]).filter(({status:C})=>C==="pending"?!0:F++<=w);u[h][g]=v.length>0?v:void 0,d(),f(),c(h,g)}function d(){localStorage.setItem(ck,JSON.stringify(u))}function f(){n.forEach(h=>h())}function p(h){return n.add(h),()=>{n.delete(h)}}return{addTransaction:s,clearTransactions:o,getTransactions:a,onChange:p,setProvider:i,waitForPendingTransactions:c}}var R6,Ek=M.createContext(null);function b3u({children:e}){const u=Qc(),{address:t}=et(),n=w8(),[r]=M.useState(()=>R6??(R6=v3u({provider:u})));return M.useEffect(()=>{r.setProvider(u)},[r,u]),M.useEffect(()=>{t&&n&&r.waitForPendingTransactions(t,n)},[r,t,n]),x.createElement(Ek.Provider,{value:r},e)}function dk(){const e=M.useContext(Ek);if(!e)throw new Error("Transaction hooks must be used within RainbowKitProvider");return e}function fk(){const e=dk(),{address:u}=et(),t=w8(),[n,r]=M.useState(()=>e&&u&&t?e.getTransactions(u,t):[]);return M.useEffect(()=>{if(e&&u&&t)return r(e.getTransactions(u,t)),e.onChange(()=>{r(e.getTransactions(u,t))})},[e,u,t]),n}var Jg=e=>typeof e=="function"?e():e;function w3u(e,{extends:u}={}){const t={...yg(bg,Jg(e))};if(!u)return t;const n=yg(bg,Jg(u));return Object.fromEntries(Object.entries(t).filter(([i,a])=>a!==n[i]))}function Zg(e,u={}){return Object.entries(w3u(e,u)).map(([t,n])=>`${t}:${n.replace(/[:;{}]/g,"")};`).join("")}var pk=()=>{const[e,u]=M.useState({height:void 0,width:void 0});return M.useEffect(()=>{function t(){u({height:window.innerHeight,width:window.innerWidth})}return window.addEventListener("resize",t),t(),()=>window.removeEventListener("resize",t)},[]),e},hk={appName:void 0,disclaimer:void 0,learnMoreUrl:"https://learn.rainbow.me/understanding-web3?utm_source=rainbowkit&utm_campaign=learnmore"},e3=M.createContext(hk),Ck=M.createContext(!1),Ll={COMPACT:"compact",WIDE:"wide"},ad=M.createContext(Ll.WIDE),x8=M.createContext(!1),x3u="rk-version";function k3u({version:e}){localStorage.setItem(x3u,e)}function _3u(){const e=M.useCallback(()=>{k3u({version:"1.2.0"})},[]);M.useEffect(()=>{e()},[e])}function S3u(e){const u=[];for(const t of e)u.push(...t);return u}function P3u(e,u){const t={};return e.forEach(n=>{const r=u(n);r&&(t[r]=n)}),t}function k8(){return typeof navigator<"u"&&/Version\/([0-9._]+).*Safari/.test(navigator.userAgent)}function T3u(){return typeof document<"u"&&getComputedStyle(document.body).getPropertyValue("--arc-palette-focus")!==""}function _8(){var e;if(typeof navigator>"u")return"Browser";const u=navigator.userAgent.toLowerCase();return(e=navigator.brave)!=null&&e.isBrave?"Brave":u.indexOf("edg/")>-1?"Edge":u.indexOf("op")>-1?"Opera":T3u()?"Arc":u.indexOf("chrome")>-1?"Chrome":u.indexOf("firefox")>-1?"Firefox":k8()?"Safari":"Browser"}var O3u=Jiu.UAParser(),{os:S8}=O3u;function I3u(){return S8.name==="Windows"}function N3u(){return S8.name==="Mac OS"}function R3u(){return["Ubuntu","Mint","Fedora","Debian","Arch","Linux"].includes(S8.name)}function P8(){return I3u()?"Windows":N3u()?"macOS":R3u()?"Linux":"Desktop"}var z3u=e=>{var u,t,n,r,i,a,s,o,l,c,E,d;const f=_8();return(d={Arc:(u=e==null?void 0:e.downloadUrls)==null?void 0:u.chrome,Brave:(t=e==null?void 0:e.downloadUrls)==null?void 0:t.chrome,Chrome:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.chrome,Edge:((r=e==null?void 0:e.downloadUrls)==null?void 0:r.edge)||((i=e==null?void 0:e.downloadUrls)==null?void 0:i.chrome),Firefox:(a=e==null?void 0:e.downloadUrls)==null?void 0:a.firefox,Opera:((s=e==null?void 0:e.downloadUrls)==null?void 0:s.opera)||((o=e==null?void 0:e.downloadUrls)==null?void 0:o.chrome),Safari:(l=e==null?void 0:e.downloadUrls)==null?void 0:l.safari,Browser:(c=e==null?void 0:e.downloadUrls)==null?void 0:c.browserExtension}[f])!=null?d:(E=e==null?void 0:e.downloadUrls)==null?void 0:E.browserExtension},j3u=e=>{var u,t,n,r;return(r=ns()?(u=e==null?void 0:e.downloadUrls)==null?void 0:u.ios:(t=e==null?void 0:e.downloadUrls)==null?void 0:t.android)!=null?r:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.mobile},M3u=e=>{var u,t,n,r,i,a;const s=P8();return(a={Windows:(u=e==null?void 0:e.downloadUrls)==null?void 0:u.windows,macOS:(t=e==null?void 0:e.downloadUrls)==null?void 0:t.macos,Linux:(n=e==null?void 0:e.downloadUrls)==null?void 0:n.linux,Desktop:(r=e==null?void 0:e.downloadUrls)==null?void 0:r.desktop}[s])!=null?a:(i=e==null?void 0:e.downloadUrls)==null?void 0:i.desktop},mk="rk-recent";function L3u(e){try{const u=e?JSON.parse(e):[];return Array.isArray(u)?u:[]}catch{return[]}}function Ak(){return typeof localStorage<"u"?L3u(localStorage.getItem(mk)):[]}function U3u(e){return[...new Set(e)]}function $3u(e){const u=U3u([e,...Ak()]);localStorage.setItem(mk,JSON.stringify(u))}function sd(){const e=tE(),u=A3u(),{connectAsync:t,connectors:n}=LL(),r=n;async function i(f,p){var h,g,A;const m=await p.getChainId(),B=await t({chainId:(A=u??((h=e.find(({id:F})=>F===m))==null?void 0:h.id))!=null?A:(g=e[0])==null?void 0:g.id,connector:p});return B&&$3u(f),B}async function a(f,p){try{return await i(f,p)}catch(h){if(!(h.name==="UserRejectedRequestError"||h.message==="Connection request reset. Please try again."))throw h}}const s=S3u(r.map(f=>{var p;return(p=f._wallets)!=null?p:[]})).sort((f,p)=>f.index-p.index),o=P3u(s,f=>f.id),l=3,c=Ak().map(f=>o[f]).filter(v8).slice(0,l),E=[...c,...s.filter(f=>!c.includes(f))],d=[];return E.forEach(f=>{var p;if(!f)return;const h=c.includes(f);d.push({...f,connect:()=>f.connector.showQrModal?a(f.id,f.connector):i(f.id,f.connector),desktopDownloadUrl:M3u(f),extensionDownloadUrl:z3u(f),groupName:f.groupName,mobileDownloadUrl:j3u(f),onConnecting:g=>f.connector.on("message",({type:A})=>A==="connecting"?g():void 0),ready:((p=f.installed)!=null?p:!0)&&f.connector.ready,recent:h,showWalletConnectModal:f.walletConnectModalConnector?()=>a(f.id,f.walletConnectModalConnector):void 0})}),d}var gk=async()=>(await Uu(()=>import("./assets-26YY4GVD-ebee59af.js"),[])).default,W3u=()=>_n(gk),q3u=()=>x.createElement(N0,{background:"#d0d5de",borderRadius:"10",height:"48",src:gk,width:"48"}),Bk=async()=>(await Uu(()=>import("./login-ZSMM5UYL-b8add756.js"),[])).default,H3u=()=>_n(Bk),G3u=()=>x.createElement(N0,{background:"#d0d5de",borderRadius:"10",height:"48",src:Bk,width:"48"}),_u=x.forwardRef(({as:e="div",children:u,className:t,color:n,display:r,font:i="body",id:a,size:s="16",style:o,tabIndex:l,textAlign:c="inherit",weight:E="regular",testId:d},f)=>x.createElement(z,{as:e,className:t,color:n,display:r,fontFamily:i,fontSize:s,fontWeight:E,id:a,ref:f,style:o,tabIndex:l,textAlign:c,testId:d},u));_u.displayName="Text";var Q3u={large:{fontSize:"16",paddingX:"24",paddingY:"10"},medium:{fontSize:"14",height:"28",paddingX:"12",paddingY:"4"},small:{fontSize:"14",paddingX:"10",paddingY:"5"}};function Be({disabled:e=!1,href:u,label:t,onClick:n,rel:r="noreferrer noopener",size:i="medium",target:a="_blank",testId:s,type:o="primary"}){const l=o==="primary",c=i!=="large",E=J0(),d=e?"actionButtonSecondaryBackground":l?"accentColor":c?"actionButtonSecondaryBackground":null,{fontSize:f,height:p,paddingX:h,paddingY:g}=Q3u[i],A=!E||!c;return x.createElement(z,{...u?e?{}:{as:"a",href:u,rel:r,target:a}:{as:"button",type:"button"},onClick:e?void 0:n,...A?{borderColor:E&&!c&&!l?"actionButtonBorderMobile":"actionButtonBorder",borderStyle:"solid",borderWidth:"1"}:{},borderRadius:"actionButton",className:!e&&w0({active:"shrinkSm",hover:"grow"}),display:"block",paddingX:h,paddingY:g,style:{willChange:"transform"},testId:s,textAlign:"center",transition:"transform",...d?{background:d}:{},...p?{height:p}:{}},x.createElement(_u,{color:e?"modalTextSecondary":l?"accentColorForeground":"accentColor",size:f,weight:"bold"},t))}var K3u=()=>J0()?x.createElement("svg",{"aria-hidden":!0,fill:"none",height:"11.5",viewBox:"0 0 11.5 11.5",width:"11.5",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M2.13388 0.366117C1.64573 -0.122039 0.854272 -0.122039 0.366117 0.366117C-0.122039 0.854272 -0.122039 1.64573 0.366117 2.13388L3.98223 5.75L0.366117 9.36612C-0.122039 9.85427 -0.122039 10.6457 0.366117 11.1339C0.854272 11.622 1.64573 11.622 2.13388 11.1339L5.75 7.51777L9.36612 11.1339C9.85427 11.622 10.6457 11.622 11.1339 11.1339C11.622 10.6457 11.622 9.85427 11.1339 9.36612L7.51777 5.75L11.1339 2.13388C11.622 1.64573 11.622 0.854272 11.1339 0.366117C10.6457 -0.122039 9.85427 -0.122039 9.36612 0.366117L5.75 3.98223L2.13388 0.366117Z",fill:"currentColor"})):x.createElement("svg",{"aria-hidden":!0,fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z",fill:"currentColor"})),Fo=({"aria-label":e="Close",onClose:u})=>{const t=J0();return x.createElement(z,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:t?"0":"1",className:w0({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:t?"30":"28",justifyContent:"center",onClick:u,style:{willChange:"transform"},transition:"default",type:"button",width:t?"30":"28"},x.createElement(K3u,null))},yk=async()=>(await Uu(()=>import("./sign-FZVB2CS6-f23ac888.js"),[])).default;function V3u({onClose:e}){const u=M.useContext($0),[{status:t,...n},r]=x.useState({status:"idle"}),i=Hau(),a=M.useCallback(async()=>{try{const f=await i.getNonce();r(p=>({...p,nonce:f}))}catch{r(f=>({...f,errorMessage:u.t("sign_in.message.preparing_error"),status:"idle"}))}},[i]),s=M.useRef(!1);x.useEffect(()=>{s.current||(s.current=!0,a())},[a]);const o=J0(),{address:l}=et(),{chain:c}=Xa(),{signMessageAsync:E}=HL(),d=async()=>{try{const f=c==null?void 0:c.id,{nonce:p}=n;if(!l||!f||!p)return;r(A=>({...A,errorMessage:void 0,status:"signing"}));const h=i.createMessage({address:l,chainId:f,nonce:p});let g;try{g=await E({message:i.getMessageBody({message:h})})}catch(A){return A instanceof O0?r(m=>({...m,status:"idle"})):r(m=>({...m,errorMessage:u.t("sign_in.signature.signing_error"),status:"idle"}))}r(A=>({...A,status:"verifying"}));try{if(await i.verify({message:h,signature:g}))return;throw new Error}catch{return r(A=>({...A,errorMessage:u.t("sign_in.signature.verifying_error"),status:"idle"}))}}catch{r({errorMessage:u.t("sign_in.signature.oops_error"),status:"idle"})}};return x.createElement(z,{position:"relative"},x.createElement(z,{display:"flex",paddingRight:"16",paddingTop:"16",position:"absolute",right:"0"},x.createElement(Fo,{onClose:e})),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:o?"32":"24",padding:"24",paddingX:"18",style:{paddingTop:o?"60px":"36px"}},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:o?"6":"4",style:{maxWidth:o?320:280}},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:o?"32":"16"},x.createElement(N0,{height:40,src:yk,width:40}),x.createElement(_u,{color:"modalText",size:o?"20":"18",textAlign:"center",weight:"heavy"},u.t("sign_in.label"))),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:o?"16":"12"},x.createElement(_u,{color:"modalTextSecondary",size:o?"16":"14",textAlign:"center"},u.t("sign_in.description")),t==="idle"&&n.errorMessage?x.createElement(_u,{color:"error",size:o?"16":"14",textAlign:"center",weight:"bold"},n.errorMessage):null)),x.createElement(z,{alignItems:o?void 0:"center",display:"flex",flexDirection:"column",gap:"8",width:"full"},x.createElement(Be,{disabled:!n.nonce||t==="signing"||t==="verifying",label:n.nonce?t==="signing"?u.t("sign_in.signature.waiting"):t==="verifying"?u.t("sign_in.signature.verifying"):u.t("sign_in.message.send"):u.t("sign_in.message.preparing"),onClick:d,size:o?"large":"medium",testId:"auth-message-button"}),o?x.createElement(Be,{label:"Cancel",onClick:e,size:"large",type:"secondary"}):x.createElement(z,{as:"button",borderRadius:"full",className:w0({active:"shrink",hover:"grow"}),display:"block",onClick:e,paddingX:"10",paddingY:"5",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},x.createElement(_u,{color:"closeButton",size:o?"16":"14",weight:"bold"},u.t("sign_in.message.cancel"))))))}function J3u(){const e=tE(),u=sd(),t=id()==="unauthenticated",n=M.useCallback(()=>{_n(...u.map(r=>r.iconUrl),...e.map(r=>r.iconUrl).filter(v8)),J0()||(W3u(),H3u()),t&&_n(yk)},[u,e,t]);M.useEffect(()=>{n()},[n])}var Fk="WALLETCONNECT_DEEPLINK_CHOICE";function Z3u({mobileUri:e,name:u}){localStorage.setItem(Fk,JSON.stringify({href:e.split("?")[0],name:u}))}function Y3u(){localStorage.removeItem(Fk)}var Dk=M.createContext(void 0),Zp="data-rk",vk=e=>({[Zp]:e||""}),X3u=e=>{if(e&&!/^[a-zA-Z0-9_]+$/.test(e))throw new Error(`Invalid ID: ${e}`);return e?`[${Zp}="${e}"]`:`[${Zp}]`},ulu=()=>{const e=M.useContext(Dk);return vk(e)},elu=yF();function tlu({appInfo:e,avatar:u,chains:t,children:n,coolMode:r=!1,id:i,initialChain:a,locale:s,modalSize:o=Ll.WIDE,showRecentTransactions:l=!1,theme:c=elu}){if(J3u(),_3u(),et({onDisconnect:Y3u}),typeof c=="function")throw new Error('A theme function was provided to the "theme" prop instead of a theme object. You must execute this function to get the resulting theme object.');const E=X3u(i),d={...hk,...e},f=u??rk,{width:p}=pk(),h=p&&p{const t=e.querySelectorAll("button:not(:disabled), a[href]");t.length!==0&&t[u==="end"?t.length-1:0].focus()};function ilu(e){const u=M.useRef(null);return M.useEffect(()=>{const t=document.activeElement;return()=>{var n;(n=t.focus)==null||n.call(t)}},[]),M.useEffect(()=>{if(u.current){const t=u.current.querySelector("[data-auto-focus]");t?t.focus():u.current.focus()}},[u]),x.createElement(x.Fragment,null,x.createElement("div",{onFocus:M.useCallback(()=>u.current&&Yg(u.current,"end"),[]),tabIndex:0}),x.createElement("div",{ref:u,style:{outline:"none"},tabIndex:-1,...e}),x.createElement("div",{onFocus:M.useCallback(()=>u.current&&Yg(u.current,"start"),[]),tabIndex:0}))}var alu=e=>e.stopPropagation();function h2({children:e,onClose:u,open:t,titleId:n}){M.useEffect(()=>{const l=c=>t&&c.key==="Escape"&&u();return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[t,u]);const[r,i]=M.useState(!0);M.useEffect(()=>{i(getComputedStyle(window.document.body).overflow!=="hidden")},[]);const a=M.useCallback(()=>u(),[u]),s=ulu(),o=J0();return x.createElement(x.Fragment,null,t?Nv.createPortal(x.createElement(Kiu,{enabled:r},x.createElement(z,{...s},x.createElement(z,{...s,alignItems:o?"flex-end":"center","aria-labelledby":n,"aria-modal":!0,className:rlu,onClick:a,position:"fixed",role:"dialog"},x.createElement(ilu,{className:nlu,onClick:alu,role:"document"},e)))),document.body):null)}var slu="_1ckjpok7",olu="_1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m",llu="_1ckjpok4 _1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m",clu="_1ckjpok6 ju367vq",Elu="_1ckjpok3 _1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m",dlu="_1ckjpok2 _1ckjpok1 ju367vb0 ju367vdl ju367vp ju367vt ju367vv ju367vef ju367va ju367v10 ju367v67 ju367v8m";function C2({bottomSheetOnMobile:e=!1,children:u,marginTop:t,padding:n="16",paddingBottom:r,wide:i=!1}){const a=J0(),o=M.useContext(ad)===Ll.COMPACT;return x.createElement(z,{marginTop:t},x.createElement(z,{className:[i?a?dlu:o?llu:Elu:olu,a?clu:null,a&&e?slu:null].join(" ")},x.createElement(z,{padding:n,paddingBottom:r??n},u)))}var Xg=["k","m","b","t"];function UE(e,u=1){return e.toString().replace(new RegExp(`(.+\\.\\d{${u}})\\d+`),"$1").replace(/(\.[1-9]*)0+$/,"$1").replace(/\.$/,"")}function bk(e){if(e<1)return UE(e,3);if(e<10**2)return UE(e,2);if(e<10**4)return new Intl.NumberFormat().format(parseFloat(UE(e,1)));const u=10**1;let t=String(e);for(let n=Xg.length-1;n>=0;n--){const r=10**((n+1)*3);if(r<=e){e=e*u/r/u,t=UE(e,1)+Xg[n];break}}return t}function wk(e){return e.length<4+4?e:`${e.substring(0,4)}…${e.substring(e.length-4)}`}function xk(e){const u=e.split("."),t=u.pop();return u.join(".").length>24?`${u.join(".").substring(0,24)}...`:`${u.join(".")}.${t}`}var flu=()=>x.createElement("svg",{fill:"none",height:"13",viewBox:"0 0 13 13",width:"13",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z",fill:"currentColor"})),plu=()=>x.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 17 16",width:"17",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z",fill:"currentColor"})),hlu=()=>x.createElement("svg",{fill:"none",height:"16",viewBox:"0 0 18 16",width:"18",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z",fill:"currentColor"}));function Clu(){const e=dk(),{address:u}=et(),t=w8();return M.useCallback(()=>{if(!u||!t)throw new Error("No address or chain ID found");e.clearTransactions(u,t)},[e,u,t])}var kk=e=>{var u,t;return(t=(u=e==null?void 0:e.blockExplorers)==null?void 0:u.default)==null?void 0:t.url},_k=()=>x.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM12.7158 12.1416C13.2432 12.1416 13.5684 11.7549 13.5684 11.1836V7.19336C13.5684 6.44629 13.1377 6.05957 12.417 6.05957H8.40918C7.8291 6.05957 7.45117 6.38477 7.45117 6.91211C7.45117 7.43945 7.8291 7.77344 8.40918 7.77344H9.69238L10.7207 7.63281L9.53418 8.67871L6.73047 11.4912C6.53711 11.6758 6.41406 11.9395 6.41406 12.2031C6.41406 12.7832 6.85352 13.1699 7.39844 13.1699C7.68848 13.1699 7.92578 13.0732 8.1543 12.8623L10.9316 10.0762L11.9775 8.89844L11.8545 9.98828V11.1836C11.8545 11.7725 12.1885 12.1416 12.7158 12.1416Z",fill:"currentColor"})),mlu=()=>x.createElement("svg",{fill:"none",height:"19",viewBox:"0 0 20 19",width:"20",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M10 18.9443C15.0977 18.9443 19.2812 14.752 19.2812 9.6543C19.2812 4.56543 15.0889 0.373047 10 0.373047C4.90234 0.373047 0.71875 4.56543 0.71875 9.6543C0.71875 14.752 4.91113 18.9443 10 18.9443ZM10 16.6328C6.1416 16.6328 3.03906 13.5215 3.03906 9.6543C3.03906 5.7959 6.13281 2.68457 10 2.68457C13.8584 2.68457 16.9697 5.7959 16.9697 9.6543C16.9785 13.5215 13.8672 16.6328 10 16.6328ZM7.29297 13.3018C7.58301 13.3018 7.81152 13.2139 7.99609 13.0205L10 11.0166L12.0127 13.0205C12.1973 13.2051 12.4258 13.3018 12.707 13.3018C13.2432 13.3018 13.6562 12.8887 13.6562 12.3525C13.6562 12.0977 13.5508 11.8691 13.3662 11.6934L11.3535 9.67188L13.375 7.6416C13.5596 7.44824 13.6562 7.22852 13.6562 6.98242C13.6562 6.44629 13.2432 6.0332 12.7158 6.0332C12.4346 6.0332 12.2148 6.12109 12.0215 6.31445L10 8.32715L7.9873 6.32324C7.80273 6.12988 7.58301 6.04199 7.29297 6.04199C6.76562 6.04199 6.35254 6.45508 6.35254 6.99121C6.35254 7.2373 6.44922 7.46582 6.63379 7.6416L8.65527 9.67188L6.63379 11.6934C6.44922 11.8691 6.35254 12.1064 6.35254 12.3525C6.35254 12.8887 6.76562 13.3018 7.29297 13.3018Z",fill:"currentColor"})),Alu=()=>x.createElement("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M10 19.4443C15.0977 19.4443 19.2812 15.252 19.2812 10.1543C19.2812 5.06543 15.0889 0.873047 10 0.873047C4.90234 0.873047 0.71875 5.06543 0.71875 10.1543C0.71875 15.252 4.91113 19.4443 10 19.4443ZM10 17.1328C6.1416 17.1328 3.03906 14.0215 3.03906 10.1543C3.03906 6.2959 6.13281 3.18457 10 3.18457C13.8584 3.18457 16.9697 6.2959 16.9697 10.1543C16.9785 14.0215 13.8672 17.1328 10 17.1328ZM9.07715 14.3379C9.4375 14.3379 9.7627 14.1533 9.97363 13.8369L13.7441 8.00977C13.8848 7.79883 13.9814 7.5791 13.9814 7.36816C13.9814 6.84961 13.5244 6.48926 13.0322 6.48926C12.707 6.48926 12.4258 6.66504 12.2148 7.0166L9.05957 12.0967L7.5918 10.2949C7.37207 10.0225 7.13477 9.9082 6.84473 9.9082C6.33496 9.9082 5.92188 10.3125 5.92188 10.8223C5.92188 11.0684 6.00098 11.2793 6.18555 11.5078L8.1543 13.8545C8.40918 14.1709 8.70801 14.3379 9.07715 14.3379Z",fill:"currentColor"})),glu=e=>{switch(e){case"pending":return Ml;case"confirmed":return Alu;case"failed":return mlu;default:return Ml}};function Blu({tx:e}){const u=J0(),t=glu(e.status),n=e.status==="failed"?"error":"accentColor",{chain:r}=Xa(),i=e.status==="confirmed"?"Confirmed":e.status==="failed"?"Failed":"Pending",a=kk(r);return x.createElement(x.Fragment,null,x.createElement(z,{...a?{as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:w0({active:"shrink"}),href:`${a}/tx/${e.hash}`,rel:"noreferrer noopener",target:"_blank",transition:"default"}:{},color:"modalText",display:"flex",flexDirection:"row",justifyContent:"space-between",padding:"8",width:"full"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:u?"16":"14"},x.createElement(z,{color:n},x.createElement(t,null)),x.createElement(z,{display:"flex",flexDirection:"column",gap:u?"3":"1"},x.createElement(z,null,x.createElement(_u,{color:"modalText",font:"body",size:u?"16":"14",weight:"bold"},e==null?void 0:e.description)),x.createElement(z,null,x.createElement(_u,{color:e.status==="pending"?"modalTextSecondary":n,font:"body",size:"14",weight:u?"medium":"regular"},i)))),a&&x.createElement(z,{alignItems:"center",color:"modalTextDim",display:"flex"},x.createElement(_k,null))))}var ylu=3;function Flu({address:e}){const u=fk(),t=Clu(),{chain:n}=Xa(),r=kk(n),i=u.slice(0,ylu),a=i.length>0,s=J0(),{appName:o}=M.useContext(e3),l=M.useContext($0);return x.createElement(x.Fragment,null,x.createElement(z,{display:"flex",flexDirection:"column",gap:"10",paddingBottom:"2",paddingTop:"16",paddingX:s?"8":"18"},a&&x.createElement(z,{paddingBottom:s?"4":"0",paddingTop:"8",paddingX:s?"12":"6"},x.createElement(z,{display:"flex",justifyContent:"space-between"},x.createElement(_u,{color:"modalTextSecondary",size:s?"16":"14",weight:"semibold"},l.t("profile.transactions.recent.title")),x.createElement(z,{style:{marginBottom:-6,marginLeft:-10,marginRight:-10,marginTop:-6}},x.createElement(z,{as:"button",background:{hover:"profileForeground"},borderRadius:"actionButton",className:w0({active:"shrink"}),onClick:t,paddingX:s?"8":"12",paddingY:s?"4":"5",transition:"default",type:"button"},x.createElement(_u,{color:"modalTextSecondary",size:s?"16":"14",weight:"semibold"},l.t("profile.transactions.clear.label")))))),x.createElement(z,{display:"flex",flexDirection:"column",gap:"4"},a?i.map(c=>x.createElement(Blu,{key:c.hash,tx:c})):x.createElement(x.Fragment,null,x.createElement(z,{padding:s?"12":"8"},x.createElement(_u,{color:"modalTextDim",size:s?"16":"14",weight:s?"medium":"bold"},o?l.t("profile.transactions.description",{appName:o}):l.t("profile.transactions.description_fallback"))),s&&x.createElement(z,{background:"generalBorderDim",height:"1",marginX:"12",marginY:"8"})))),r&&x.createElement(z,{paddingBottom:"18",paddingX:s?"8":"18"},x.createElement(z,{alignItems:"center",as:"a",background:{hover:"profileForeground"},borderRadius:"menuButton",className:w0({active:"shrink"}),color:"modalTextDim",display:"flex",flexDirection:"row",href:`${r}/address/${e}`,justifyContent:"space-between",paddingX:"8",paddingY:"12",rel:"noreferrer noopener",style:{willChange:"transform"},target:"_blank",transition:"default",width:"full",...s?{paddingLeft:"12"}:{}},x.createElement(_u,{color:"modalText",font:"body",size:s?"16":"14",weight:s?"semibold":"bold"},l.t("profile.explorer.label")),x.createElement(_k,null))))}function uB({action:e,icon:u,label:t,testId:n,url:r}){const i=J0();return x.createElement(z,{...r?{as:"a",href:r,rel:"noreferrer noopener",target:"_blank"}:{as:"button",type:"button"},background:{base:"profileAction",...i?{}:{hover:"profileActionHover"}},borderRadius:"menuButton",boxShadow:"profileDetailsAction",className:w0({active:"shrinkSm",hover:i?void 0:"grow"}),display:"flex",onClick:e,padding:i?"6":"8",style:{willChange:"transform"},testId:n,transition:"default",width:"full"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"1",justifyContent:"center",paddingTop:"2",width:"full"},x.createElement(z,{color:"modalText",height:"max"},u),x.createElement(z,null,x.createElement(_u,{color:"modalText",size:i?"12":"13",weight:"semibold"},t))))}function Dlu({address:e,balanceData:u,ensAvatar:t,ensName:n,onClose:r,onDisconnect:i}){const a=M.useContext(x8),[s,o]=M.useState(!1),l=M.useContext($0),c=M.useCallback(()=>{e&&(navigator.clipboard.writeText(e),o(!0))},[e]);if(M.useEffect(()=>{if(s){const g=setTimeout(()=>{o(!1)},1500);return()=>clearTimeout(g)}},[s]),!e)return null;const E=n?xk(n):wk(e),d=u==null?void 0:u.formatted,f=d?bk(parseFloat(d)):void 0,p="rk_profile_title",h=J0();return x.createElement(x.Fragment,null,x.createElement(z,{display:"flex",flexDirection:"column"},x.createElement(z,{background:"profileForeground",padding:"16"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:h?"16":"12",justifyContent:"center",margin:"8",style:{textAlign:"center"}},x.createElement(z,{style:{position:"absolute",right:16,top:16,willChange:"transform"}},x.createElement(Fo,{onClose:r}))," ",x.createElement(z,{marginTop:h?"24":"0"},x.createElement(ak,{address:e,imageUrl:t,size:h?82:74})),x.createElement(z,{display:"flex",flexDirection:"column",gap:h?"4":"0",textAlign:"center"},x.createElement(z,{textAlign:"center"},x.createElement(_u,{as:"h1",color:"modalText",id:p,size:h?"20":"18",weight:"heavy"},E)),u&&x.createElement(z,{textAlign:"center"},x.createElement(_u,{as:"h1",color:"modalTextSecondary",id:p,size:h?"16":"14",weight:"semibold"},f," ",u.symbol)))),x.createElement(z,{display:"flex",flexDirection:"row",gap:"8",margin:"2",marginTop:"16"},x.createElement(uB,{action:c,icon:s?x.createElement(flu,null):x.createElement(plu,null),label:s?l.t("profile.copy_address.copied"):l.t("profile.copy_address.label")}),x.createElement(uB,{action:i,icon:x.createElement(hlu,null),label:l.t("profile.disconnect.label"),testId:"disconnect-button"}))),a&&x.createElement(x.Fragment,null,x.createElement(z,{background:"generalBorder",height:"1",marginTop:"-1"}),x.createElement(z,null,x.createElement(Flu,{address:e})))))}function vlu({onClose:e,open:u}){const{address:t}=et(),{data:n}=cw({address:t}),r=lk(t),i=ok(r),{disconnect:a}=VC();if(!t)return null;const s="rk_account_modal_title";return x.createElement(x.Fragment,null,t&&x.createElement(h2,{onClose:e,open:u,titleId:s},x.createElement(C2,{bottomSheetOnMobile:!0,padding:"0"},x.createElement(Dlu,{address:t,balanceData:n,ensAvatar:i,ensName:r,onClose:e,onDisconnect:a}))))}var blu=({size:e})=>x.createElement("svg",{fill:"none",height:e,viewBox:"0 0 28 28",width:e,xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M6.742 22.195h8.367c1.774 0 2.743-.968 2.743-2.758V16.11h-2.016v3.11c0 .625-.305.96-.969.96H6.984c-.664 0-.968-.335-.968-.96V7.984c0-.632.304-.968.968-.968h7.883c.664 0 .969.336.969.968v3.133h2.016v-3.36c0-1.78-.97-2.757-2.743-2.757H6.742C4.97 5 4 5.977 4 7.758v11.68c0 1.789.969 2.757 2.742 2.757Zm5.438-7.703h7.601l1.149-.07-.602.406-1.008.938a.816.816 0 0 0-.258.593c0 .407.313.782.758.782.227 0 .39-.086.547-.243l2.492-2.593c.235-.235.313-.47.313-.711 0-.242-.078-.477-.313-.719l-2.492-2.586c-.156-.156-.32-.25-.547-.25-.445 0-.758.367-.758.781 0 .227.094.446.258.594l1.008.945.602.407-1.149-.079H12.18a.904.904 0 0 0 0 1.805Z",fill:"currentColor"})),wlu="v9horb0",Yp=x.forwardRef(({children:e,currentlySelected:u=!1,onClick:t,testId:n,...r},i)=>{const a=J0();return x.createElement(z,{as:"button",borderRadius:"menuButton",disabled:u,display:"flex",onClick:t,ref:i,testId:n,type:"button"},x.createElement(z,{borderRadius:"menuButton",className:[a?wlu:void 0,!u&&w0({active:"shrink"})],padding:a?"8":"6",transition:"default",width:"full",...u?{background:"accentColor",borderColor:"selectedOptionBorder",borderStyle:"solid",borderWidth:"1",boxShadow:"selectedOption",color:"accentColorForeground"}:{background:{hover:"menuItemBackground"},color:"modalText",transition:"default"},...r},e))});Yp.displayName="MenuButton";var xlu="_18dqw9x0",klu="_18dqw9x1";function _lu({onClose:e,open:u}){var t;const{chain:n}=Xa(),{chains:r,pendingChainId:i,reset:a,switchNetwork:s}=KL({onSettled:()=>{a(),e()}}),o=M.useContext($0),{disconnect:l}=VC(),c="rk_chain_modal_title",E=J0(),d=(t=n==null?void 0:n.unsupported)!=null?t:!1,f=E?"36":"28",{appName:p}=M.useContext(e3),h=tE();return!n||!(n!=null&&n.id)?null:x.createElement(h2,{onClose:e,open:u,titleId:c},x.createElement(C2,{bottomSheetOnMobile:!0,paddingBottom:"0"},x.createElement(z,{display:"flex",flexDirection:"column",gap:"14"},x.createElement(z,{display:"flex",flexDirection:"row",justifyContent:"space-between"},E&&x.createElement(z,{width:"30"}),x.createElement(z,{paddingBottom:"0",paddingLeft:"8",paddingTop:"4"},x.createElement(_u,{as:"h1",color:"modalText",id:c,size:E?"20":"18",weight:"heavy"},o.t("chains.title"))),x.createElement(Fo,{onClose:e})),d&&x.createElement(z,{marginX:"8",textAlign:E?"center":"left"},x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},o.t("chains.wrong_network"))),x.createElement(z,{className:E?klu:xlu,display:"flex",flexDirection:"column",gap:"4",padding:"2",paddingBottom:"16"},s?h.map(({iconBackground:g,iconUrl:A,id:m,name:B},F)=>{const w=r.find(k=>k.id===m);if(!w)return null;const v=w.id===(n==null?void 0:n.id),C=!v&&w.id===i;return x.createElement(M.Fragment,{key:w.id},x.createElement(Yp,{currentlySelected:v,onClick:v?void 0:()=>s(w.id),testId:`chain-option-${w.id}`},x.createElement(z,{fontFamily:"body",fontSize:"16",fontWeight:"bold"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:f},A&&x.createElement(z,{height:"full",marginRight:"8"},x.createElement(N0,{alt:B??w.name,background:g,borderRadius:"full",height:f,src:A,width:f,testId:`chain-option-${w.id}-icon`})),x.createElement("div",null,B??w.name)),v&&x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},x.createElement(_u,{color:"accentColorForeground",size:"14",weight:"medium"},o.t("chains.connected")),x.createElement(z,{background:"connectionIndicator",borderColor:"selectedOptionBorder",borderRadius:"full",borderStyle:"solid",borderWidth:"1",height:"8",marginLeft:"8",width:"8"})),C&&x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",marginRight:"6"},x.createElement(_u,{color:"modalText",size:"14",weight:"medium"},o.t("chains.confirm")),x.createElement(z,{background:"standby",borderRadius:"full",height:"8",marginLeft:"8",width:"8"}))))),E&&Fl(),testId:"chain-option-disconnect"},x.createElement(z,{color:"error",fontFamily:"body",fontSize:"16",fontWeight:"bold"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",justifyContent:"space-between"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",height:f},x.createElement(z,{alignItems:"center",color:"error",height:f,justifyContent:"center",marginRight:"8"},x.createElement(blu,{size:Number(f)})),x.createElement("div",null,o.t("chains.disconnect")))))))))))}function Slu(e,u){const t={};return e.forEach(n=>{const r=u(n);r&&(t[r]||(t[r]=[]),t[r].push(n))}),t}var T8=({children:e,href:u})=>x.createElement(z,{as:"a",color:"accentColor",href:u,rel:"noreferrer",target:"_blank"},e),O8=({children:e})=>x.createElement(_u,{color:"modalTextSecondary",size:"12",weight:"medium"},e);function eB({compactModeEnabled:e=!1,getWallet:u}){const{disclaimer:t,learnMoreUrl:n}=M.useContext(e3),r=M.useContext($0);return x.createElement(x.Fragment,null,x.createElement(z,{alignItems:"center",color:"accentColor",display:"flex",flexDirection:"column",height:"full",justifyContent:"space-around"},x.createElement(z,{marginBottom:"10"},!e&&x.createElement(_u,{color:"modalText",size:"18",weight:"heavy"},r.t("intro.title"))),x.createElement(z,{display:"flex",flexDirection:"column",gap:"32",justifyContent:"center",marginY:"20",style:{maxWidth:312}},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},x.createElement(z,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},x.createElement(q3u,null)),x.createElement(z,{display:"flex",flexDirection:"column",gap:"4"},x.createElement(_u,{color:"modalText",size:"14",weight:"bold"},r.t("intro.digital_asset.title")),x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},r.t("intro.digital_asset.description")))),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},x.createElement(z,{borderRadius:"6",height:"48",minWidth:"48",width:"48"},x.createElement(G3u,null)),x.createElement(z,{display:"flex",flexDirection:"column",gap:"4"},x.createElement(_u,{color:"modalText",size:"14",weight:"bold"},r.t("intro.login.title")),x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},r.t("intro.login.description"))))),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",margin:"10"},x.createElement(Be,{label:r.t("intro.get.label"),onClick:u}),x.createElement(z,{as:"a",className:w0({active:"shrink",hover:"grow"}),display:"block",href:n,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},x.createElement(_u,{color:"accentColor",size:"14",weight:"bold"},r.t("intro.learn_more.label")))),t&&!e&&x.createElement(z,{marginBottom:"8",marginTop:"12",textAlign:"center"},x.createElement(t,{Link:T8,Text:O8}))))}var Sk=()=>x.createElement("svg",{fill:"none",height:"17",viewBox:"0 0 11 17",width:"11",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M0.99707 8.6543C0.99707 9.08496 1.15527 9.44531 1.51562 9.79688L8.16016 16.3096C8.43262 16.5732 8.74902 16.7051 9.13574 16.7051C9.90918 16.7051 10.5508 16.0811 10.5508 15.3076C10.5508 14.9121 10.3838 14.5605 10.0938 14.2705L4.30176 8.64551L10.0938 3.0293C10.3838 2.74805 10.5508 2.3877 10.5508 2.00098C10.5508 1.23633 9.90918 0.603516 9.13574 0.603516C8.74902 0.603516 8.43262 0.735352 8.16016 0.999023L1.51562 7.51172C1.15527 7.85449 1.00586 8.21484 0.99707 8.6543Z",fill:"currentColor"})),Plu=()=>x.createElement("svg",{fill:"none",height:"12",viewBox:"0 0 8 12",width:"8",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M3.64258 7.99609C4.19336 7.99609 4.5625 7.73828 4.68555 7.24609C4.69141 7.21094 4.70312 7.16406 4.70898 7.13477C4.80859 6.60742 5.05469 6.35547 6.04492 5.76367C7.14648 5.10156 7.67969 4.3457 7.67969 3.24414C7.67969 1.39844 6.17383 0.255859 3.95898 0.255859C2.32422 0.255859 1.05859 0.894531 0.548828 1.86719C0.396484 2.14844 0.320312 2.44727 0.320312 2.74023C0.314453 3.37305 0.742188 3.79492 1.42188 3.79492C1.91406 3.79492 2.33594 3.54883 2.53516 3.11523C2.78711 2.47656 3.23242 2.21289 3.83594 2.21289C4.55664 2.21289 5.10742 2.65234 5.10742 3.29102C5.10742 3.9707 4.7793 4.29883 3.81836 4.87891C3.02148 5.36523 2.50586 5.92773 2.50586 6.76562V6.90039C2.50586 7.55664 2.96289 7.99609 3.64258 7.99609ZM3.67188 11.4473C4.42773 11.4473 5.04297 10.8672 5.04297 10.1406C5.04297 9.41406 4.42773 8.83984 3.67188 8.83984C2.91602 8.83984 2.30664 9.41406 2.30664 10.1406C2.30664 10.8672 2.91602 11.4473 3.67188 11.4473Z",fill:"currentColor"})),Tlu=({"aria-label":e="Info",onClick:u})=>{const t=J0();return x.createElement(z,{alignItems:"center","aria-label":e,as:"button",background:"closeButtonBackground",borderColor:"actionButtonBorder",borderRadius:"full",borderStyle:"solid",borderWidth:t?"0":"1",className:w0({active:"shrinkSm",hover:"growLg"}),color:"closeButton",display:"flex",height:t?"30":"28",justifyContent:"center",onClick:u,style:{willChange:"transform"},transition:"default",type:"button",width:t?"30":"28"},x.createElement(Plu,null))},Pk=e=>{const u=M.useRef(null),t=M.useContext(Ck),n=D8(e);return M.useEffect(()=>{if(t&&u.current&&n)return Ilu(u.current,n)},[t,n]),u},Olu=()=>{const e="_rk_coolMode",u=document.getElementById(e);if(u)return u;const t=document.createElement("div");return t.setAttribute("id",e),t.setAttribute("style",["overflow:hidden","position:fixed","height:100%","top:0","left:0","right:0","bottom:0","pointer-events:none","z-index:2147483647"].join(";")),document.body.appendChild(t),t},tB=0;function Ilu(e,u){tB++;const t=[15,20,25,35,45],n=35;let r=[],i=!1,a=0,s=0;const o=Olu();function l(){const F=t[Math.floor(Math.random()*t.length)],w=Math.random()*10,v=Math.random()*25,C=Math.random()*360,k=Math.random()*35*(Math.random()<=.5?-1:1),j=s-F/2,N=a-F/2,uu=Math.random()<=.5?-1:1,ou=document.createElement("div");ou.innerHTML=``,ou.setAttribute("style",["position:absolute","will-change:transform",`top:${j}px`,`left:${N}px`,`transform:rotate(${C}deg)`].join(";")),o.appendChild(ou),r.push({direction:uu,element:ou,left:N,size:F,speedHorz:w,speedUp:v,spinSpeed:k,spinVal:C,top:j})}function c(){r.forEach(F=>{F.left=F.left-F.speedHorz*F.direction,F.top=F.top-F.speedUp,F.speedUp=Math.min(F.size,F.speedUp-1),F.spinVal=F.spinVal+F.spinSpeed,F.top>=Math.max(window.innerHeight,document.body.clientHeight)+F.size&&(r=r.filter(w=>w!==F),F.element.remove()),F.element.setAttribute("style",["position:absolute","will-change:transform",`top:${F.top}px`,`left:${F.left}px`,`transform:rotate(${F.spinVal}deg)`].join(";"))})}let E;function d(){i&&r.length{var w,v;"touches"in F?(a=(w=F.touches)==null?void 0:w[0].clientX,s=(v=F.touches)==null?void 0:v[0].clientY):(a=F.clientX,s=F.clientY)},m=F=>{A(F),i=!0},B=()=>{i=!1};return e.addEventListener(g,A,{passive:!1}),e.addEventListener(p,m),e.addEventListener(h,B),e.addEventListener("mouseleave",B),()=>{e.removeEventListener(g,A),e.removeEventListener(p,m),e.removeEventListener(h,B),e.removeEventListener("mouseleave",B);const F=setInterval(()=>{E&&r.length===0&&(cancelAnimationFrame(E),clearInterval(F),--tB===0&&o.remove())},500)}}var Nlu="g5kl0l0",Tk=({as:e="button",currentlySelected:u=!1,iconBackground:t,iconUrl:n,name:r,onClick:i,ready:a,recent:s,testId:o,...l})=>{const c=Pk(n),[E,d]=M.useState(!1),f=M.useContext($0);return x.createElement(z,{display:"flex",flexDirection:"column",onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),ref:c},x.createElement(z,{as:e,borderRadius:"menuButton",borderStyle:"solid",borderWidth:"1",className:u?void 0:[Nlu,w0({active:"shrink"})],disabled:u,onClick:i,padding:"5",style:{willChange:"transform"},testId:o,transition:"default",width:"full",...u?{background:"accentColor",borderColor:"selectedOptionBorder",boxShadow:"selectedWallet"}:{background:{hover:"menuItemBackground"}},...l},x.createElement(z,{color:u?"accentColorForeground":"modalText",disabled:!a,fontFamily:"body",fontSize:"16",fontWeight:"bold",transition:"default"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:"12"},x.createElement(N0,{background:t,...E?{}:{borderColor:"actionButtonBorder"},borderRadius:"6",height:"28",src:n,width:"28"}),x.createElement(z,null,x.createElement(z,{style:{marginTop:s?-2:void 0}},r),s&&x.createElement(_u,{color:u?"accentColorForeground":"accentColor",size:"12",style:{lineHeight:1,marginTop:-1},weight:"medium"},f.t("connect.recent")))))))};Tk.displayName="ModalSelection";var z6=(e,u=1)=>{let t=e.replace("#","");t.length===3&&(t=`${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}`);const n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);return u>1&&u<=100&&(u=u/100),`rgba(${n},${r},${i},${u})`},Rlu=e=>e?[z6(e,.2),z6(e,.14),z6(e,.1)]:null,zlu=e=>/^#([0-9a-f]{3}){1,2}$/i.test(e),Ok=async()=>(await Uu(()=>import("./connect-XNDTNVUH-a2aa32dd.js"),[])).default,jlu=()=>_n(Ok),Mlu=()=>x.createElement(N0,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Ok,width:"48"}),Ik=async()=>(await Uu(()=>import("./create-PAJXJDV3-ebff10a4.js"),[])).default,Nk=()=>_n(Ik),Llu=()=>x.createElement(N0,{background:"#e3a5e8",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Ik,width:"48"}),Rk=async()=>(await Uu(()=>import("./refresh-5KGGHTJP-ba752184.js"),[])).default,Ulu=()=>_n(Rk),$lu=()=>x.createElement(N0,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:Rk,width:"48"}),zk=async()=>(await Uu(()=>import("./scan-HZBLXLM4-eb21bae1.js"),[])).default,jk=()=>_n(zk),Wlu=()=>x.createElement(N0,{background:"#515a70",borderColor:"generalBorder",borderRadius:"10",height:"48",src:zk,width:"48"}),qlu="_1vwt0cg0",Hlu="_1vwt0cg2 ju367v75 ju367v7q",Glu="_1vwt0cg3",Qlu="_1vwt0cg4",Klu=(e,u)=>{const t=Array.prototype.slice.call(uE.create(e,{errorCorrectionLevel:u}).modules.data,0),n=Math.sqrt(t.length);return t.reduce((r,i,a)=>(a%n===0?r.push([i]):r[r.length-1].push(i))&&r,[])};function Mk({ecl:e="M",logoBackground:u,logoMargin:t=10,logoSize:n=50,logoUrl:r,size:i=200,uri:a}){const s="20",o=i-parseInt(s,10)*2,l=M.useMemo(()=>{const d=[],f=Klu(a,e),p=o/f.length;[{x:0,y:0},{x:1,y:0},{x:0,y:1}].forEach(({x:B,y:F})=>{const w=(f.length-7)*p*B,v=(f.length-7)*p*F;for(let C=0;C<3;C++)d.push(x.createElement("rect",{fill:C%2!==0?"white":"black",height:p*(7-C*2),key:`${C}-${B}-${F}`,rx:(C-2)*-5+(C===0?2:0),ry:(C-2)*-5+(C===0?2:0),width:p*(7-C*2),x:w+p*C,y:v+p*C}))});const g=Math.floor((n+25)/p),A=f.length/2-g/2,m=f.length/2+g/2-1;return f.forEach((B,F)=>{B.forEach((w,v)=>{f[F][v]&&(F<7&&v<7||F>f.length-8&&v<7||F<7&&v>f.length-8||F>A&&FA&&v{switch(_8()){case"Arc":return(await Uu(()=>import("./Arc-QDJFTGH2-dedcf34b.js"),[])).default;case"Brave":return(await Uu(()=>import("./Brave-YATE5BIM-7f4f924c.js"),[])).default;case"Chrome":return(await Uu(()=>import("./Chrome-LGF33C3S-f104e3bc.js"),[])).default;case"Edge":return(await Uu(()=>import("./Edge-K2JEGI5S-e4909cbd.js"),[])).default;case"Firefox":return(await Uu(()=>import("./Firefox-NP5SYEK5-47084019.js"),[])).default;case"Opera":return(await Uu(()=>import("./Opera-KV54PXPA-f31a1b5e.js"),[])).default;case"Safari":return(await Uu(()=>import("./Safari-2QIYKJ4P-594ed864.js"),[])).default;default:return(await Uu(()=>import("./Browser-HN7O5MN7-2ca1b32c.js"),[])).default}},Vlu=()=>_n(Lk),Uk=async()=>{switch(P8()){case"Windows":return(await Uu(()=>import("./Windows-R3CKAIUV-ee35f22a.js"),[])).default;case"macOS":return(await Uu(()=>import("./Macos-2KTZ2XLP-e9c2050a.js"),[])).default;case"Linux":return(await Uu(()=>import("./Linux-NS2LQPT4-00826fbc.js"),[])).default;default:return(await Uu(()=>import("./Linux-NS2LQPT4-00826fbc.js"),[])).default}},Jlu=()=>_n(Uk);function Zlu({getWalletDownload:e,compactModeEnabled:u}){const n=sd().splice(0,5),r=M.useContext($0);return x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginTop:"18",width:"full"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"28",height:"full",width:"full"},n==null?void 0:n.filter(i=>{var a;return i.extensionDownloadUrl||i.desktopDownloadUrl||i.qrCode&&((a=i.downloadUrls)==null?void 0:a.qrCode)}).map(i=>{const{downloadUrls:a,iconBackground:s,iconUrl:o,id:l,name:c,qrCode:E}=i,d=(a==null?void 0:a.qrCode)&&E,f=!!i.extensionDownloadUrl,p=(a==null?void 0:a.qrCode)&&f,h=(a==null?void 0:a.qrCode)&&!!i.desktopDownloadUrl;return x.createElement(z,{alignItems:"center",display:"flex",gap:"16",justifyContent:"space-between",key:i.id,width:"full"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16"},x.createElement(N0,{background:s,borderColor:"actionButtonBorder",borderRadius:"10",height:"48",src:o,width:"48"}),x.createElement(z,{display:"flex",flexDirection:"column",gap:"2"},x.createElement(_u,{color:"modalText",size:"14",weight:"bold"},c),x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},p?r.t("get.mobile_and_extension.description"):h?r.t("get.mobile_and_desktop.description"):d?r.t("get.mobile.description"):f?r.t("get.extension.description"):null))),x.createElement(z,{display:"flex",flexDirection:"column",gap:"4"},x.createElement(Be,{label:r.t("get.action.label"),onClick:()=>e(l),type:"secondary"})))})),x.createElement(z,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"column",gap:"8",justifyContent:"space-between",marginBottom:"4",paddingY:"8",style:{maxWidth:275,textAlign:"center"}},x.createElement(_u,{color:"modalText",size:"14",weight:"bold"},r.t("get.looking_for.title")),x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},u?r.t("get.looking_for.desktop.compact_description"):r.t("get.looking_for.desktop.wide_description"))))}var j6="44";function Ylu({changeWalletStep:e,compactModeEnabled:u,connectionError:t,onClose:n,qrCodeUri:r,reconnect:i,wallet:a}){var s;const{downloadUrls:o,iconBackground:l,iconUrl:c,name:E,qrCode:d,ready:f,showWalletConnectModal:p}=a,h=(s=a.desktop)==null?void 0:s.getUri,g=k8(),A=M.useContext($0),m=!!a.extensionDownloadUrl,B=(o==null?void 0:o.qrCode)&&m,F=(o==null?void 0:o.qrCode)&&!!a.desktopDownloadUrl,w=d&&r,v=p?{description:u?A.t("connect.walletconnect.description.compact"):A.t("connect.walletconnect.description.full"),label:A.t("connect.walletconnect.open.label"),onClick:()=>{n(),p()}}:w?{description:A.t("connect.secondary_action.get.description",{wallet:E}),label:A.t("connect.secondary_action.get.label"),onClick:()=>e(B||F?"DOWNLOAD_OPTIONS":"DOWNLOAD")}:null,{width:C}=pk(),k=C&&C<768;return M.useEffect(()=>{Vlu(),Jlu()},[]),x.createElement(z,{display:"flex",flexDirection:"column",height:"full",width:"full"},w?x.createElement(z,{alignItems:"center",display:"flex",height:"full",justifyContent:"center"},x.createElement(Mk,{logoBackground:l,logoSize:u?60:72,logoUrl:c,size:u?318:k?Math.max(280,Math.min(C-308,382)):382,uri:r})):x.createElement(z,{alignItems:"center",display:"flex",justifyContent:"center",style:{flexGrow:1}},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8"},x.createElement(z,{borderRadius:"10",height:j6,overflow:"hidden"},x.createElement(N0,{height:j6,src:c,width:j6})),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"4",paddingX:"32",style:{textAlign:"center"}},x.createElement(_u,{color:"modalText",size:"18",weight:"bold"},f?A.t("connect.status.opening",{wallet:E}):m?A.t("connect.status.not_installed",{wallet:E}):A.t("connect.status.not_available",{wallet:E})),!f&&m?x.createElement(z,{paddingTop:"20"},x.createElement(Be,{href:a.extensionDownloadUrl,label:A.t("connect.secondary_action.install.label"),type:"secondary"})):null,f&&!w&&x.createElement(x.Fragment,null,x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},x.createElement(_u,{color:"modalTextSecondary",size:"14",textAlign:"center",weight:"medium"},A.t("connect.status.confirm"))),x.createElement(z,{alignItems:"center",color:"modalText",display:"flex",flexDirection:"row",height:"32",marginTop:"8"},t?x.createElement(Be,{label:A.t("connect.secondary_action.retry.label"),onClick:h?async()=>{const j=await h();window.open(j,g?"_blank":"_self")}:()=>{i(a)}}):x.createElement(z,{color:"modalTextSecondary"},x.createElement(Ml,null))))))),x.createElement(z,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"28",justifyContent:"space-between",marginTop:"12"},f&&v&&x.createElement(x.Fragment,null,x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},v.description),x.createElement(Be,{label:v.label,onClick:v.onClick,type:"secondary"}))))}var M6=({actionLabel:e,description:u,iconAccent:t,iconBackground:n,iconUrl:r,isCompact:i,onAction:a,title:s,url:o,variant:l})=>{const c=l==="browser",E=!c&&t&&Rlu(t);return x.createElement(z,{alignItems:"center",borderRadius:"13",display:"flex",justifyContent:"center",overflow:"hidden",paddingX:i?"18":"44",position:"relative",style:{flex:1,isolation:"isolate"},width:"full"},x.createElement(z,{borderColor:"actionButtonBorder",borderRadius:"13",borderStyle:"solid",borderWidth:"1",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0",zIndex:1}}),c&&x.createElement(z,{background:"downloadTopCardBackground",height:"full",position:"absolute",style:{zIndex:0},width:"full"},x.createElement(z,{display:"flex",flexDirection:"row",justifyContent:"space-between",style:{bottom:"0",filter:"blur(20px)",left:"0",position:"absolute",right:"0",top:"0",transform:"translate3d(0, 0, 0)"}},x.createElement(z,{style:{filter:"blur(100px)",marginLeft:-27,marginTop:-20,opacity:.6,transform:"translate3d(0, 0, 0)"}},x.createElement(N0,{borderRadius:"full",height:"200",src:r,width:"200"})),x.createElement(z,{style:{filter:"blur(100px)",marginRight:0,marginTop:105,opacity:.6,overflow:"auto",transform:"translate3d(0, 0, 0)"}},x.createElement(N0,{borderRadius:"full",height:"200",src:r,width:"200"})))),!c&&E&&x.createElement(z,{background:"downloadBottomCardBackground",style:{bottom:"0",left:"0",position:"absolute",right:"0",top:"0"}},x.createElement(z,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${E[0]} 0%, ${E[1]} 25%, rgba(0,0,0,0) 100%)`,height:564,left:-215,top:-197,transform:"translate3d(0, 0, 0)",width:564}}),x.createElement(z,{position:"absolute",style:{background:`radial-gradient(50% 50% at 50% 50%, ${E[2]} 0%, rgba(0, 0, 0, 0) 100%)`,height:564,left:-1,top:-76,transform:"translate3d(0, 0, 0)",width:564}})),x.createElement(z,{alignItems:"flex-start",display:"flex",flexDirection:"row",gap:"24",height:"max",justifyContent:"center",style:{zIndex:1}},x.createElement(z,null,x.createElement(N0,{height:"60",src:r,width:"60",...n?{background:n,borderColor:"generalBorder",borderRadius:"10"}:null})),x.createElement(z,{display:"flex",flexDirection:"column",gap:"4",style:{flex:1},width:"full"},x.createElement(_u,{color:"modalText",size:"14",weight:"bold"},s),x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},u),x.createElement(z,{marginTop:"14",width:"max"},x.createElement(Be,{href:o,label:e,onClick:a,size:"medium"})))))};function Xlu({changeWalletStep:e,wallet:u}){const t=_8(),n=P8(),i=M.useContext(ad)==="compact",{desktop:a,desktopDownloadUrl:s,extension:o,extensionDownloadUrl:l,mobileDownloadUrl:c}=u,E=M.useContext($0);return M.useEffect(()=>{Nk(),jk(),Ulu(),jlu()},[]),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",marginBottom:"8",marginTop:"4",width:"full"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"8",height:"full",justifyContent:"center",width:"full"},l&&x.createElement(M6,{actionLabel:E.t("get_options.extension.download.label",{browser:t}),description:E.t("get_options.extension.description"),iconUrl:Lk,isCompact:i,onAction:()=>e(o!=null&&o.instructions?"INSTRUCTIONS_EXTENSION":"CONNECT"),title:E.t("get_options.extension.title",{wallet:u.name,browser:t}),url:l,variant:"browser"}),s&&x.createElement(M6,{actionLabel:E.t("get_options.desktop.download.label",{platform:n}),description:E.t("get_options.desktop.description"),iconUrl:Uk,isCompact:i,onAction:()=>e(a!=null&&a.instructions?"INSTRUCTIONS_DESKTOP":"CONNECT"),title:E.t("get_options.desktop.title",{wallet:u.name,platform:n}),url:s,variant:"desktop"}),c&&x.createElement(M6,{actionLabel:E.t("get_options.mobile.download.label",{wallet:u.name}),description:E.t("get_options.mobile.description"),iconAccent:u.iconAccent,iconBackground:u.iconBackground,iconUrl:u.iconUrl,isCompact:i,onAction:()=>{e("DOWNLOAD")},title:E.t("get_options.mobile.title",{wallet:u.name}),variant:"app"})))}function ucu({changeWalletStep:e,wallet:u}){const{downloadUrls:t,qrCode:n}=u,r=M.useContext($0);return M.useEffect(()=>{Nk(),jk()},[]),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"24",height:"full",width:"full"},x.createElement(z,{style:{maxWidth:220,textAlign:"center"}},x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"semibold"},r.t("get_mobile.description"))),x.createElement(z,{height:"full"},t!=null&&t.qrCode?x.createElement(Mk,{logoSize:0,size:268,uri:t.qrCode}):null),x.createElement(z,{alignItems:"center",borderRadius:"10",display:"flex",flexDirection:"row",gap:"8",height:"34",justifyContent:"space-between",marginBottom:"12",paddingY:"8"},x.createElement(Be,{label:r.t("get_mobile.continue.label"),onClick:()=>e(n!=null&&n.instructions?"INSTRUCTIONS_MOBILE":"CONNECT")})))}var Do={connect:()=>x.createElement(Mlu,null),create:()=>x.createElement(Llu,null),install:e=>x.createElement(N0,{background:e.iconBackground,borderColor:"generalBorder",borderRadius:"10",height:"48",src:e.iconUrl,width:"48"}),refresh:()=>x.createElement($lu,null),scan:()=>x.createElement(Wlu,null)};function ecu({connectWallet:e,wallet:u}){var t,n,r,i;const a=M.useContext($0);return x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},x.createElement(z,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(n=(t=u==null?void 0:u.qrCode)==null?void 0:t.instructions)==null?void 0:n.steps.map((s,o)=>{var l;return x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:o},x.createElement(z,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(l=Do[s.step])==null?void 0:l.call(Do,u)),x.createElement(z,{display:"flex",flexDirection:"column",gap:"4"},x.createElement(_u,{color:"modalText",size:"14",weight:"bold"},a.t(s.title)),x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},a.t(s.description))))})),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},x.createElement(Be,{label:a.t("get_instructions.mobile.connect.label"),onClick:()=>e(u)}),x.createElement(z,{as:"a",className:w0({active:"shrink",hover:"grow"}),display:"block",href:(i=(r=u==null?void 0:u.qrCode)==null?void 0:r.instructions)==null?void 0:i.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},x.createElement(_u,{color:"accentColor",size:"14",weight:"bold"},a.t("get_instructions.mobile.learn_more.label")))))}function tcu({wallet:e}){var u,t,n,r;const i=M.useContext($0);return x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},x.createElement(z,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(t=(u=e==null?void 0:e.extension)==null?void 0:u.instructions)==null?void 0:t.steps.map((a,s)=>{var o;return x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:s},x.createElement(z,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(o=Do[a.step])==null?void 0:o.call(Do,e)),x.createElement(z,{display:"flex",flexDirection:"column",gap:"4"},x.createElement(_u,{color:"modalText",size:"14",weight:"bold"},i.t(a.title)),x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},i.t(a.description))))})),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},x.createElement(Be,{label:i.t("get_instructions.extension.refresh.label"),onClick:window.location.reload.bind(window.location)}),x.createElement(z,{as:"a",className:w0({active:"shrink",hover:"grow"}),display:"block",href:(r=(n=e==null?void 0:e.extension)==null?void 0:n.instructions)==null?void 0:r.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},x.createElement(_u,{color:"accentColor",size:"14",weight:"bold"},i.t("get_instructions.extension.learn_more.label")))))}function ncu({connectWallet:e,wallet:u}){var t,n,r,i;const a=M.useContext($0);return x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",width:"full"},x.createElement(z,{display:"flex",flexDirection:"column",gap:"28",height:"full",justifyContent:"center",paddingY:"32",style:{maxWidth:320}},(n=(t=u==null?void 0:u.desktop)==null?void 0:t.instructions)==null?void 0:n.steps.map((s,o)=>{var l;return x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:"16",key:o},x.createElement(z,{borderRadius:"10",height:"48",minWidth:"48",overflow:"hidden",position:"relative",width:"48"},(l=Do[s.step])==null?void 0:l.call(Do,u)),x.createElement(z,{display:"flex",flexDirection:"column",gap:"4"},x.createElement(_u,{color:"modalText",size:"14",weight:"bold"},a.t(s.title)),x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},a.t(s.description))))})),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"12",justifyContent:"center",marginBottom:"16"},x.createElement(Be,{label:a.t("get_instructions.desktop.connect.label"),onClick:()=>e(u)}),x.createElement(z,{as:"a",className:w0({active:"shrink",hover:"grow"}),display:"block",href:(i=(r=u==null?void 0:u.desktop)==null?void 0:r.instructions)==null?void 0:i.learnMoreUrl,paddingX:"12",paddingY:"4",rel:"noreferrer",style:{willChange:"transform"},target:"_blank",transition:"default"},x.createElement(_u,{color:"accentColor",size:"14",weight:"bold"},a.t("get_instructions.desktop.learn_more.label")))))}function rcu({onClose:e}){const u="rk_connect_title",t=k8(),[n,r]=M.useState(),[i,a]=M.useState(),[s,o]=M.useState(),l=!!(i!=null&&i.qrCode)&&s,[c,E]=M.useState(!1),f=M.useContext(ad)===Ll.COMPACT,{disclaimer:p}=M.useContext(e3),h=M.useContext($0),g=sd().filter(H=>H.ready||!!H.extensionDownloadUrl).sort((H,iu)=>H.groupIndex-iu.groupIndex),A=Slu(g,H=>H.groupName),m=["Recommended","Other","Popular","More","Others"],B=H=>{var iu,lu,Eu;if(E(!1),H.ready){(lu=(iu=H==null?void 0:H.connect)==null?void 0:iu.call(H))==null||lu.catch(()=>{E(!0)});const hu=(Eu=H.desktop)==null?void 0:Eu.getUri;hu&&setTimeout(async()=>{const fu=await hu();window.open(fu,t?"_blank":"_self")},0)}},F=H=>{var iu;if(B(H),r(H.id),H.ready){let lu=!1;(iu=H==null?void 0:H.onConnecting)==null||iu.call(H,async()=>{var Eu,hu;if(lu)return;lu=!0;const fu=g.find(xu=>H.id===xu.id),Z=await((Eu=fu==null?void 0:fu.qrCode)==null?void 0:Eu.getUri());o(Z),setTimeout(()=>{a(fu),C("CONNECT")},Z?0:50);const Su=await(fu==null?void 0:fu.connector.getProvider()),wu=(hu=Su==null?void 0:Su.signer)==null?void 0:hu.connection;if(wu!=null&&wu.on&&(wu!=null&&wu.off)){const xu=()=>{ku(),F(H)},ku=()=>{wu.off("close",xu),wu.off("open",ku)};wu.on("close",xu),wu.on("open",ku)}})}else a(H),C(H!=null&&H.extensionDownloadUrl?"DOWNLOAD_OPTIONS":"CONNECT")},w=H=>{var iu;r(H);const lu=g.find(Z=>H===Z.id),Eu=(iu=lu==null?void 0:lu.downloadUrls)==null?void 0:iu.qrCode,hu=!!(lu!=null&&lu.desktopDownloadUrl),fu=!!(lu!=null&&lu.extensionDownloadUrl);a(lu),C(Eu&&(fu||hu)?"DOWNLOAD_OPTIONS":Eu?"DOWNLOAD":hu?"INSTRUCTIONS_DESKTOP":"INSTRUCTIONS_EXTENSION")},v=()=>{r(void 0),a(void 0),o(void 0)},C=(H,iu=!1)=>{iu&&H==="GET"&&k==="GET"?v():!iu&&H==="GET"?j("GET"):!iu&&H==="CONNECT"&&j("CONNECT"),uu(H)},[k,j]=M.useState("NONE"),[N,uu]=M.useState("NONE");let ou=null,su=null,mu=null,tu;M.useEffect(()=>{E(!1)},[N,i]);const nu=!!(!!(i!=null&&i.extensionDownloadUrl)&&(i!=null&&i.mobileDownloadUrl));switch(N){case"NONE":ou=x.createElement(eB,{getWallet:()=>C("GET")});break;case"LEARN_COMPACT":ou=x.createElement(eB,{compactModeEnabled:f,getWallet:()=>C("GET")}),su=h.t("intro.title"),mu="NONE";break;case"GET":ou=x.createElement(Zlu,{getWalletDownload:w,compactModeEnabled:f}),su=h.t("get.title"),mu=f?"LEARN_COMPACT":"NONE";break;case"CONNECT":ou=i&&x.createElement(Ylu,{changeWalletStep:C,compactModeEnabled:f,connectionError:c,onClose:e,qrCodeUri:s,reconnect:B,wallet:i}),su=l&&(i.name==="WalletConnect"?h.t("connect_scan.fallback_title"):h.t("connect_scan.title",{wallet:i.name})),mu=f?"NONE":null,tu=f?v:()=>{};break;case"DOWNLOAD_OPTIONS":ou=i&&x.createElement(Xlu,{changeWalletStep:C,wallet:i}),su=i&&h.t("get_options.short_title",{wallet:i.name}),mu=nu?k:null;break;case"DOWNLOAD":ou=i&&x.createElement(ucu,{changeWalletStep:C,wallet:i}),su=i&&h.t("get_mobile.title",{wallet:i.name}),mu=nu?"DOWNLOAD_OPTIONS":k;break;case"INSTRUCTIONS_MOBILE":ou=i&&x.createElement(ecu,{connectWallet:F,wallet:i}),su=i&&h.t("get_options.title",{wallet:f&&i.shortName||i.name}),mu="DOWNLOAD";break;case"INSTRUCTIONS_EXTENSION":ou=i&&x.createElement(tcu,{wallet:i}),su=i&&h.t("get_options.title",{wallet:f&&i.shortName||i.name}),mu="DOWNLOAD_OPTIONS";break;case"INSTRUCTIONS_DESKTOP":ou=i&&x.createElement(ncu,{connectWallet:F,wallet:i}),su=i&&h.t("get_options.title",{wallet:f&&i.shortName||i.name}),mu="DOWNLOAD_OPTIONS";break}return x.createElement(z,{display:"flex",flexDirection:"row",style:{maxHeight:f?468:504}},(f?N==="NONE":!0)&&x.createElement(z,{className:f?Qlu:Glu,display:"flex",flexDirection:"column",marginTop:"16"},x.createElement(z,{display:"flex",justifyContent:"space-between"},f&&p&&x.createElement(z,{marginLeft:"16",width:"28"},x.createElement(Tlu,{onClick:()=>C("LEARN_COMPACT")})),f&&!p&&x.createElement(z,{marginLeft:"16",width:"28"}),x.createElement(z,{marginLeft:f?"0":"6",paddingBottom:"8",paddingTop:"2",paddingX:"18"},x.createElement(_u,{as:"h1",color:"modalText",id:u,size:"18",weight:"heavy",testId:"connect-header-label"},h.t("connect.title"))),f&&x.createElement(z,{marginRight:"16"},x.createElement(Fo,{onClose:e}))),x.createElement(z,{className:Hlu,paddingBottom:"18"},Object.entries(A).map(([H,iu],lu)=>iu.length>0&&x.createElement(M.Fragment,{key:lu},H?x.createElement(z,{marginBottom:"8",marginTop:"16",marginX:"6"},x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"bold"},m.includes(H)?h.t(`connector_group.${H.toLowerCase()}`):H)):null,x.createElement(z,{display:"flex",flexDirection:"column",gap:"4"},iu.map(Eu=>x.createElement(Tk,{currentlySelected:Eu.id===n,iconBackground:Eu.iconBackground,iconUrl:Eu.iconUrl,key:Eu.id,name:Eu.name,onClick:()=>F(Eu),ready:Eu.ready,recent:Eu.recent,testId:`wallet-option-${Eu.id}`})))))),f&&x.createElement(x.Fragment,null,x.createElement(z,{background:"generalBorder",height:"1",marginTop:"-1"}),p?x.createElement(z,{paddingX:"24",paddingY:"16",textAlign:"center"},x.createElement(p,{Link:T8,Text:O8})):x.createElement(z,{alignItems:"center",display:"flex",justifyContent:"space-between",paddingX:"24",paddingY:"16"},x.createElement(z,{paddingY:"4"},x.createElement(_u,{color:"modalTextSecondary",size:"14",weight:"medium"},h.t("connect.new_to_ethereum.description"))),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"row",gap:"4",justifyContent:"center"},x.createElement(z,{className:w0({active:"shrink",hover:"grow"}),cursor:"pointer",onClick:()=>C("LEARN_COMPACT"),paddingY:"4",style:{willChange:"transform"},transition:"default"},x.createElement(_u,{color:"accentColor",size:"14",weight:"bold"},h.t("connect.new_to_ethereum.learn_more.label"))))))),(f?N!=="NONE":!0)&&x.createElement(x.Fragment,null,!f&&x.createElement(z,{background:"generalBorder",minWidth:"1",width:"1"}),x.createElement(z,{display:"flex",flexDirection:"column",margin:"16",style:{flexGrow:1}},x.createElement(z,{alignItems:"center",display:"flex",justifyContent:"space-between",marginBottom:"12"},x.createElement(z,{width:"28"},mu&&x.createElement(z,{as:"button",className:w0({active:"shrinkSm",hover:"growLg"}),color:"accentColor",onClick:()=>{mu&&C(mu,!0),tu==null||tu()},paddingX:"8",paddingY:"4",style:{boxSizing:"content-box",height:17,willChange:"transform"},transition:"default",type:"button"},x.createElement(Sk,null))),x.createElement(z,{display:"flex",justifyContent:"center",style:{flexGrow:1}},su&&x.createElement(_u,{color:"modalText",size:"18",textAlign:"center",weight:"heavy"},su)),x.createElement(Fo,{onClose:e})),x.createElement(z,{display:"flex",flexDirection:"column",style:{minHeight:f?396:432}},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"6",height:"full",justifyContent:"center",marginX:"8"},ou)))))}var icu="_1am14410";function acu({onClose:e,wallet:u}){const{connect:t,connector:n,iconBackground:r,iconUrl:i,id:a,mobile:s,name:o,onConnecting:l,ready:c,shortName:E}=u,d=s==null?void 0:s.getUri,f=Pk(i),p=M.useContext($0);return x.createElement(z,{as:"button",color:c?"modalText":"modalTextSecondary",disabled:!c,fontFamily:"body",key:a,onClick:M.useCallback(async()=>{a==="walletConnect"&&(e==null||e()),t==null||t();let h=!1;l==null||l(async()=>{if(!h&&(h=!0,d)){const g=await d();if((n.id==="walletConnect"||n.id==="walletConnectLegacy")&&Z3u({mobileUri:g,name:o}),g.startsWith("http")){const A=document.createElement("a");A.href=g,A.target="_blank",A.rel="noreferrer noopener",A.click()}else window.location.href=g}})},[n,t,d,l,e,o,a]),ref:f,style:{overflow:"visible",textAlign:"center"},testId:`wallet-option-${a}`,type:"button",width:"full"},x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",justifyContent:"center"},x.createElement(z,{paddingBottom:"8",paddingTop:"10"},x.createElement(N0,{background:r,borderRadius:"13",boxShadow:"walletLogo",height:"60",src:i,width:"60"})),x.createElement(z,{display:"flex",flexDirection:"column",textAlign:"center"},x.createElement(_u,{as:"h2",color:u.ready?"modalText":"modalTextSecondary",size:"13",weight:"medium"},x.createElement(z,{as:"span",position:"relative"},E??o,!u.ready&&" (unsupported)")),u.recent&&x.createElement(_u,{color:"accentColor",size:"12",weight:"medium"},p.t("connect.recent")))))}function scu({onClose:e}){var u;const t="rk_connect_title",n=sd(),{disclaimer:r,learnMoreUrl:i}=M.useContext(e3);let a=null,s=null,o=!1,l=null;const[c,E]=M.useState("CONNECT"),d=M.useContext($0),f=ns();switch(c){case"CONNECT":{a=d.t("connect.title"),o=!0,s=x.createElement(z,null,x.createElement(z,{background:"profileForeground",className:icu,display:"flex",paddingBottom:"20",paddingTop:"6"},x.createElement(z,{display:"flex",style:{margin:"0 auto"}},n.filter(p=>p.ready).map(p=>x.createElement(z,{key:p.id,paddingX:"20"},x.createElement(z,{width:"60"},x.createElement(acu,{onClose:e,wallet:p})))))),x.createElement(z,{background:"generalBorder",height:"1",marginBottom:"32",marginTop:"-1"}),x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",gap:"32",paddingX:"32",style:{textAlign:"center"}},x.createElement(z,{display:"flex",flexDirection:"column",gap:"8",textAlign:"center"},x.createElement(_u,{color:"modalText",size:"16",weight:"bold"},d.t("intro.title")),x.createElement(_u,{color:"modalTextSecondary",size:"16"},d.t("intro.description")))),x.createElement(z,{paddingTop:"32",paddingX:"20"},x.createElement(z,{display:"flex",gap:"14",justifyContent:"center"},x.createElement(Be,{label:d.t("intro.get.label"),onClick:()=>E("GET"),size:"large",type:"secondary"}),x.createElement(Be,{href:i,label:d.t("intro.learn_more.label"),size:"large",type:"secondary"}))),r&&x.createElement(z,{marginTop:"28",marginX:"32",textAlign:"center"},x.createElement(r,{Link:T8,Text:O8})));break}case"GET":{a=d.t("get.title"),l="CONNECT";const p=(u=n==null?void 0:n.filter(h=>{var g,A,m;return((g=h.downloadUrls)==null?void 0:g.ios)||((A=h.downloadUrls)==null?void 0:A.android)||((m=h.downloadUrls)==null?void 0:m.mobile)}))==null?void 0:u.splice(0,3);s=x.createElement(z,null,x.createElement(z,{alignItems:"center",display:"flex",flexDirection:"column",height:"full",marginBottom:"36",marginTop:"5",paddingTop:"12",width:"full"},p.map((h,g)=>{const{downloadUrls:A,iconBackground:m,iconUrl:B,name:F}=h;return!(A!=null&&A.ios)&&!(A!=null&&A.android)&&!(A!=null&&A.mobile)?null:x.createElement(z,{display:"flex",gap:"16",key:h.id,paddingX:"20",width:"full"},x.createElement(z,{style:{minHeight:48,minWidth:48}},x.createElement(N0,{background:m,borderColor:"generalBorder",borderRadius:"10",height:"48",src:B,width:"48"})),x.createElement(z,{display:"flex",flexDirection:"column",width:"full"},x.createElement(z,{alignItems:"center",display:"flex",height:"48"},x.createElement(z,{width:"full"},x.createElement(_u,{color:"modalText",size:"18",weight:"bold"},F)),x.createElement(Be,{href:(f?A==null?void 0:A.ios:A==null?void 0:A.android)||(A==null?void 0:A.mobile),label:d.t("get.action.label"),size:"small",type:"secondary"})),gE(l),padding:"16",style:{height:17,willChange:"transform"},transition:"default",type:"button"},x.createElement(Sk,null))),x.createElement(z,{marginTop:"4",textAlign:"center",width:"full"},x.createElement(_u,{as:"h1",color:"modalText",id:t,size:"20",weight:"bold"},a)),x.createElement(z,{alignItems:"center",display:"flex",height:"32",paddingRight:"14",position:"absolute",right:"0"},x.createElement(z,{style:{marginBottom:-20,marginTop:-20}},x.createElement(Fo,{onClose:e}))))),x.createElement(z,{display:"flex",flexDirection:"column"},s))}function ocu({onClose:e}){return J0()?x.createElement(scu,{onClose:e}):x.createElement(rcu,{onClose:e})}function lcu({onClose:e,open:u}){const t="rk_connect_title",n=y8(),{disconnect:r}=VC(),i=x.useCallback(()=>{e(),r()},[e,r]);return n==="disconnected"?x.createElement(h2,{onClose:e,open:u,titleId:t},x.createElement(C2,{bottomSheetOnMobile:!0,padding:"0",wide:!0},x.createElement(ocu,{onClose:e}))):n==="unauthenticated"?x.createElement(h2,{onClose:i,open:u,titleId:t},x.createElement(C2,{bottomSheetOnMobile:!0,padding:"0"},x.createElement(V3u,{onClose:i}))):null}function L6(){const[e,u]=M.useState(!1);return{closeModal:M.useCallback(()=>u(!1),[]),isModalOpen:e,openModal:M.useCallback(()=>u(!0),[])}}var nE=M.createContext({accountModalOpen:!1,chainModalOpen:!1,connectModalOpen:!1});function ccu({children:e}){const{closeModal:u,isModalOpen:t,openModal:n}=L6(),{closeModal:r,isModalOpen:i,openModal:a}=L6(),{closeModal:s,isModalOpen:o,openModal:l}=L6(),c=y8(),{chain:E}=Xa(),d=!(E!=null&&E.unsupported);function f({keepConnectModalOpen:h=!1}={}){h||u(),r(),s()}const p=id()==="unauthenticated";return et({onConnect:()=>f({keepConnectModalOpen:p}),onDisconnect:()=>f()}),x.createElement(nE.Provider,{value:M.useMemo(()=>({accountModalOpen:i,chainModalOpen:o,connectModalOpen:t,openAccountModal:d&&c==="connected"?a:void 0,openChainModal:c==="connected"?l:void 0,openConnectModal:c==="disconnected"||c==="unauthenticated"?n:void 0}),[c,d,i,o,t,a,l,n])},e,x.createElement(lcu,{onClose:u,open:t}),x.createElement(vlu,{onClose:r,open:i}),x.createElement(_lu,{onClose:s,open:o}))}function Ecu(){const{accountModalOpen:e,chainModalOpen:u,connectModalOpen:t}=M.useContext(nE);return{accountModalOpen:e,chainModalOpen:u,connectModalOpen:t}}function dcu(){const{accountModalOpen:e,openAccountModal:u}=M.useContext(nE);return{accountModalOpen:e,openAccountModal:u}}function fcu(){const{chainModalOpen:e,openChainModal:u}=M.useContext(nE);return{chainModalOpen:e,openChainModal:u}}function pcu(){const{connectModalOpen:e,openConnectModal:u}=M.useContext(nE);return{connectModalOpen:e,openConnectModal:u}}var U6=()=>{};function I8({children:e}){var u,t,n,r;const i=B3u(),{address:a}=et(),s=lk(a),o=ok(s),{data:l}=cw({address:a}),{chain:c}=Xa(),E=g3u(),d=(u=id())!=null?u:void 0,f=c?E[c.id]:void 0,p=(t=f==null?void 0:f.name)!=null?t:void 0,h=(n=f==null?void 0:f.iconUrl)!=null?n:void 0,g=(r=f==null?void 0:f.iconBackground)!=null?r:void 0,A=D8(h),m=M.useContext(x8),B=fk().some(({status:uu})=>uu==="pending")&&m,F=l?`${bk(parseFloat(l.formatted))} ${l.symbol}`:void 0,{openConnectModal:w}=pcu(),{openChainModal:v}=fcu(),{openAccountModal:C}=dcu(),{accountModalOpen:k,chainModalOpen:j,connectModalOpen:N}=Ecu();return x.createElement(x.Fragment,null,e({account:a?{address:a,balanceDecimals:l==null?void 0:l.decimals,balanceFormatted:l==null?void 0:l.formatted,balanceSymbol:l==null?void 0:l.symbol,displayBalance:F,displayName:s?xk(s):wk(a),ensAvatar:o??void 0,ensName:s??void 0,hasPendingTransactions:B}:void 0,accountModalOpen:k,authenticationStatus:d,chain:c?{hasIcon:!!h,iconBackground:g,iconUrl:A,id:c.id,name:p??c.name,unsupported:c.unsupported}:void 0,chainModalOpen:j,connectModalOpen:N,mounted:i,openAccountModal:C??U6,openChainModal:v??U6,openConnectModal:w??U6}))}I8.displayName="ConnectButton.Custom";var w3={accountStatus:"full",chainStatus:{largeScreen:"full",smallScreen:"icon"},label:"Connect Wallet",showBalance:{largeScreen:!0,smallScreen:!1}};function N8({accountStatus:e=w3.accountStatus,chainStatus:u=w3.chainStatus,label:t=w3.label,showBalance:n=w3.showBalance}){const r=tE(),i=y8(),a=M.useContext($0);return x.createElement(I8,null,({account:s,chain:o,mounted:l,openAccountModal:c,openChainModal:E,openConnectModal:d})=>{var f,p,h;const g=l&&i!=="loading",A=(f=o==null?void 0:o.unsupported)!=null?f:!1;return x.createElement(z,{display:"flex",gap:"12",...!g&&{"aria-hidden":!0,style:{opacity:0,pointerEvents:"none",userSelect:"none"}}},g&&s&&i==="connected"?x.createElement(x.Fragment,null,o&&(r.length>1||A)&&x.createElement(z,{alignItems:"center","aria-label":"Chain Selector",as:"button",background:A?"connectButtonBackgroundError":"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:w0({active:"shrink",hover:"grow"}),color:A?"connectButtonTextError":"connectButtonText",display:cs(u,m=>m==="none"?"none":"flex"),fontFamily:"body",fontWeight:"bold",gap:"6",key:A?"unsupported":"supported",onClick:E,paddingX:"10",paddingY:"8",testId:A?"wrong-network-button":"chain-button",transition:"default",type:"button"},A?x.createElement(z,{alignItems:"center",display:"flex",height:"24",paddingX:"4"},"Wrong network"):x.createElement(z,{alignItems:"center",display:"flex",gap:"6"},o.hasIcon?x.createElement(z,{display:cs(u,m=>m==="full"||m==="icon"?"block":"none"),height:"24",width:"24"},x.createElement(N0,{alt:(p=o.name)!=null?p:"Chain icon",background:o.iconBackground,borderRadius:"full",height:"24",src:o.iconUrl,width:"24"})):null,x.createElement(z,{display:cs(u,m=>m==="icon"&&!o.iconUrl||m==="full"||m==="name"?"block":"none")},(h=o.name)!=null?h:o.id)),x.createElement(xg,null)),!A&&x.createElement(z,{alignItems:"center",as:"button",background:"connectButtonBackground",borderRadius:"connectButton",boxShadow:"connectButton",className:w0({active:"shrink",hover:"grow"}),color:"connectButtonText",display:"flex",fontFamily:"body",fontWeight:"bold",onClick:c,testId:"account-button",transition:"default",type:"button"},s.displayBalance&&x.createElement(z,{display:cs(n,m=>m?"block":"none"),padding:"8",paddingLeft:"12"},s.displayBalance),x.createElement(z,{background:Uau(n)[J0()?"smallScreen":"largeScreen"]?"connectButtonInnerBackground":"connectButtonBackground",borderColor:"connectButtonBackground",borderRadius:"connectButton",borderStyle:"solid",borderWidth:"2",color:"connectButtonText",fontFamily:"body",fontWeight:"bold",paddingX:"8",paddingY:"6",transition:"default"},x.createElement(z,{alignItems:"center",display:"flex",gap:"6",height:"24"},x.createElement(z,{display:cs(e,m=>m==="full"||m==="avatar"?"block":"none")},x.createElement(ak,{address:s.address,imageUrl:s.ensAvatar,loading:s.hasPendingTransactions,size:24})),x.createElement(z,{alignItems:"center",display:"flex",gap:"6"},x.createElement(z,{display:cs(e,m=>m==="full"||m==="address"?"block":"none")},s.displayName),x.createElement(xg,null)))))):x.createElement(z,{as:"button",background:"accentColor",borderRadius:"connectButton",boxShadow:"connectButton",className:w0({active:"shrink",hover:"grow"}),color:"accentColorForeground",fontFamily:"body",fontWeight:"bold",height:"40",key:"connect",onClick:d,paddingX:"14",testId:"connect-button",transition:"default",type:"button"},l&&t==="Connect Wallet"?a.t("connect_wallet.label"):t))})}N8.__defaultProps=w3;N8.Custom=I8;var R8={},od={},$u={},$k={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function u(s,o){var l=s>>>16&65535,c=s&65535,E=o>>>16&65535,d=o&65535;return c*d+(l*d+c*E<<16>>>0)|0}e.mul=Math.imul||u;function t(s,o){return s+o|0}e.add=t;function n(s,o){return s-o|0}e.sub=n;function r(s,o){return s<>>32-o}e.rotl=r;function i(s,o){return s<<32-o|s>>>o}e.rotr=i;function a(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}e.isInteger=Number.isInteger||a,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(s){return e.isInteger(s)&&s>=-e.MAX_SAFE_INTEGER&&s<=e.MAX_SAFE_INTEGER}})($k);Object.defineProperty($u,"__esModule",{value:!0});var Wk=$k;function hcu(e,u){return u===void 0&&(u=0),(e[u+0]<<8|e[u+1])<<16>>16}$u.readInt16BE=hcu;function Ccu(e,u){return u===void 0&&(u=0),(e[u+0]<<8|e[u+1])>>>0}$u.readUint16BE=Ccu;function mcu(e,u){return u===void 0&&(u=0),(e[u+1]<<8|e[u])<<16>>16}$u.readInt16LE=mcu;function Acu(e,u){return u===void 0&&(u=0),(e[u+1]<<8|e[u])>>>0}$u.readUint16LE=Acu;function qk(e,u,t){return u===void 0&&(u=new Uint8Array(2)),t===void 0&&(t=0),u[t+0]=e>>>8,u[t+1]=e>>>0,u}$u.writeUint16BE=qk;$u.writeInt16BE=qk;function Hk(e,u,t){return u===void 0&&(u=new Uint8Array(2)),t===void 0&&(t=0),u[t+0]=e>>>0,u[t+1]=e>>>8,u}$u.writeUint16LE=Hk;$u.writeInt16LE=Hk;function Xp(e,u){return u===void 0&&(u=0),e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]}$u.readInt32BE=Xp;function u5(e,u){return u===void 0&&(u=0),(e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3])>>>0}$u.readUint32BE=u5;function e5(e,u){return u===void 0&&(u=0),e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u]}$u.readInt32LE=e5;function t5(e,u){return u===void 0&&(u=0),(e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u])>>>0}$u.readUint32LE=t5;function m2(e,u,t){return u===void 0&&(u=new Uint8Array(4)),t===void 0&&(t=0),u[t+0]=e>>>24,u[t+1]=e>>>16,u[t+2]=e>>>8,u[t+3]=e>>>0,u}$u.writeUint32BE=m2;$u.writeInt32BE=m2;function A2(e,u,t){return u===void 0&&(u=new Uint8Array(4)),t===void 0&&(t=0),u[t+0]=e>>>0,u[t+1]=e>>>8,u[t+2]=e>>>16,u[t+3]=e>>>24,u}$u.writeUint32LE=A2;$u.writeInt32LE=A2;function gcu(e,u){u===void 0&&(u=0);var t=Xp(e,u),n=Xp(e,u+4);return t*4294967296+n-(n>>31)*4294967296}$u.readInt64BE=gcu;function Bcu(e,u){u===void 0&&(u=0);var t=u5(e,u),n=u5(e,u+4);return t*4294967296+n}$u.readUint64BE=Bcu;function ycu(e,u){u===void 0&&(u=0);var t=e5(e,u),n=e5(e,u+4);return n*4294967296+t-(t>>31)*4294967296}$u.readInt64LE=ycu;function Fcu(e,u){u===void 0&&(u=0);var t=t5(e,u),n=t5(e,u+4);return n*4294967296+t}$u.readUint64LE=Fcu;function Gk(e,u,t){return u===void 0&&(u=new Uint8Array(8)),t===void 0&&(t=0),m2(e/4294967296>>>0,u,t),m2(e>>>0,u,t+4),u}$u.writeUint64BE=Gk;$u.writeInt64BE=Gk;function Qk(e,u,t){return u===void 0&&(u=new Uint8Array(8)),t===void 0&&(t=0),A2(e>>>0,u,t),A2(e/4294967296>>>0,u,t+4),u}$u.writeUint64LE=Qk;$u.writeInt64LE=Qk;function Dcu(e,u,t){if(t===void 0&&(t=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>u.length-t)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,r=1,i=e/8+t-1;i>=t;i--)n+=u[i]*r,r*=256;return n}$u.readUintBE=Dcu;function vcu(e,u,t){if(t===void 0&&(t=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>u.length-t)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,r=1,i=t;i=n;i--)t[i]=u/r&255,r*=256;return t}$u.writeUintBE=bcu;function wcu(e,u,t,n){if(t===void 0&&(t=new Uint8Array(e/8)),n===void 0&&(n=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Wk.isSafeInteger(u))throw new Error("writeUintLE value must be an integer");for(var r=1,i=n;i>>32-16|tu<<16,uu=uu+tu|0,C^=uu,C=C>>>32-12|C<<12,F=F+k|0,au^=F,au=au>>>32-16|au<<16,ou=ou+au|0,k^=ou,k=k>>>32-12|k<<12,w=w+j|0,nu^=w,nu=nu>>>32-16|nu<<16,su=su+nu|0,j^=su,j=j>>>32-12|j<<12,v=v+N|0,H^=v,H=H>>>32-16|H<<16,mu=mu+H|0,N^=mu,N=N>>>32-12|N<<12,w=w+j|0,nu^=w,nu=nu>>>32-8|nu<<8,su=su+nu|0,j^=su,j=j>>>32-7|j<<7,v=v+N|0,H^=v,H=H>>>32-8|H<<8,mu=mu+H|0,N^=mu,N=N>>>32-7|N<<7,F=F+k|0,au^=F,au=au>>>32-8|au<<8,ou=ou+au|0,k^=ou,k=k>>>32-7|k<<7,B=B+C|0,tu^=B,tu=tu>>>32-8|tu<<8,uu=uu+tu|0,C^=uu,C=C>>>32-7|C<<7,B=B+k|0,H^=B,H=H>>>32-16|H<<16,su=su+H|0,k^=su,k=k>>>32-12|k<<12,F=F+j|0,tu^=F,tu=tu>>>32-16|tu<<16,mu=mu+tu|0,j^=mu,j=j>>>32-12|j<<12,w=w+N|0,au^=w,au=au>>>32-16|au<<16,uu=uu+au|0,N^=uu,N=N>>>32-12|N<<12,v=v+C|0,nu^=v,nu=nu>>>32-16|nu<<16,ou=ou+nu|0,C^=ou,C=C>>>32-12|C<<12,w=w+N|0,au^=w,au=au>>>32-8|au<<8,uu=uu+au|0,N^=uu,N=N>>>32-7|N<<7,v=v+C|0,nu^=v,nu=nu>>>32-8|nu<<8,ou=ou+nu|0,C^=ou,C=C>>>32-7|C<<7,F=F+j|0,tu^=F,tu=tu>>>32-8|tu<<8,mu=mu+tu|0,j^=mu,j=j>>>32-7|j<<7,B=B+k|0,H^=B,H=H>>>32-8|H<<8,su=su+H|0,k^=su,k=k>>>32-7|k<<7;ue.writeUint32LE(B+n|0,e,0),ue.writeUint32LE(F+r|0,e,4),ue.writeUint32LE(w+i|0,e,8),ue.writeUint32LE(v+a|0,e,12),ue.writeUint32LE(C+s|0,e,16),ue.writeUint32LE(k+o|0,e,20),ue.writeUint32LE(j+l|0,e,24),ue.writeUint32LE(N+c|0,e,28),ue.writeUint32LE(uu+E|0,e,32),ue.writeUint32LE(ou+d|0,e,36),ue.writeUint32LE(su+f|0,e,40),ue.writeUint32LE(mu+p|0,e,44),ue.writeUint32LE(tu+h|0,e,48),ue.writeUint32LE(au+g|0,e,52),ue.writeUint32LE(nu+A|0,e,56),ue.writeUint32LE(H+m|0,e,60)}function Kk(e,u,t,n,r){if(r===void 0&&(r=0),e.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,u++;if(n>0)throw new Error("ChaCha: counter overflow")}var Vk={},Ii={};Object.defineProperty(Ii,"__esModule",{value:!0});function Lcu(e,u,t){return~(e-1)&u|e-1&t}Ii.select=Lcu;function Ucu(e,u){return(e|0)-(u|0)-1>>>31&1}Ii.lessOrEqual=Ucu;function Jk(e,u){if(e.length!==u.length)return 0;for(var t=0,n=0;n>>8}Ii.compare=Jk;function $cu(e,u){return e.length===0||u.length===0?!1:Jk(e,u)!==0}Ii.equal=$cu;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var u=Ii,t=un;e.DIGEST_LENGTH=16;var n=function(){function a(s){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var o=s[0]|s[1]<<8;this._r[0]=o&8191;var l=s[2]|s[3]<<8;this._r[1]=(o>>>13|l<<3)&8191;var c=s[4]|s[5]<<8;this._r[2]=(l>>>10|c<<6)&7939;var E=s[6]|s[7]<<8;this._r[3]=(c>>>7|E<<9)&8191;var d=s[8]|s[9]<<8;this._r[4]=(E>>>4|d<<12)&255,this._r[5]=d>>>1&8190;var f=s[10]|s[11]<<8;this._r[6]=(d>>>14|f<<2)&8191;var p=s[12]|s[13]<<8;this._r[7]=(f>>>11|p<<5)&8065;var h=s[14]|s[15]<<8;this._r[8]=(p>>>8|h<<8)&8191,this._r[9]=h>>>5&127,this._pad[0]=s[16]|s[17]<<8,this._pad[1]=s[18]|s[19]<<8,this._pad[2]=s[20]|s[21]<<8,this._pad[3]=s[22]|s[23]<<8,this._pad[4]=s[24]|s[25]<<8,this._pad[5]=s[26]|s[27]<<8,this._pad[6]=s[28]|s[29]<<8,this._pad[7]=s[30]|s[31]<<8}return a.prototype._blocks=function(s,o,l){for(var c=this._fin?0:2048,E=this._h[0],d=this._h[1],f=this._h[2],p=this._h[3],h=this._h[4],g=this._h[5],A=this._h[6],m=this._h[7],B=this._h[8],F=this._h[9],w=this._r[0],v=this._r[1],C=this._r[2],k=this._r[3],j=this._r[4],N=this._r[5],uu=this._r[6],ou=this._r[7],su=this._r[8],mu=this._r[9];l>=16;){var tu=s[o+0]|s[o+1]<<8;E+=tu&8191;var au=s[o+2]|s[o+3]<<8;d+=(tu>>>13|au<<3)&8191;var nu=s[o+4]|s[o+5]<<8;f+=(au>>>10|nu<<6)&8191;var H=s[o+6]|s[o+7]<<8;p+=(nu>>>7|H<<9)&8191;var iu=s[o+8]|s[o+9]<<8;h+=(H>>>4|iu<<12)&8191,g+=iu>>>1&8191;var lu=s[o+10]|s[o+11]<<8;A+=(iu>>>14|lu<<2)&8191;var Eu=s[o+12]|s[o+13]<<8;m+=(lu>>>11|Eu<<5)&8191;var hu=s[o+14]|s[o+15]<<8;B+=(Eu>>>8|hu<<8)&8191,F+=hu>>>5|c;var fu=0,Z=fu;Z+=E*w,Z+=d*(5*mu),Z+=f*(5*su),Z+=p*(5*ou),Z+=h*(5*uu),fu=Z>>>13,Z&=8191,Z+=g*(5*N),Z+=A*(5*j),Z+=m*(5*k),Z+=B*(5*C),Z+=F*(5*v),fu+=Z>>>13,Z&=8191;var Su=fu;Su+=E*v,Su+=d*w,Su+=f*(5*mu),Su+=p*(5*su),Su+=h*(5*ou),fu=Su>>>13,Su&=8191,Su+=g*(5*uu),Su+=A*(5*N),Su+=m*(5*j),Su+=B*(5*k),Su+=F*(5*C),fu+=Su>>>13,Su&=8191;var wu=fu;wu+=E*C,wu+=d*v,wu+=f*w,wu+=p*(5*mu),wu+=h*(5*su),fu=wu>>>13,wu&=8191,wu+=g*(5*ou),wu+=A*(5*uu),wu+=m*(5*N),wu+=B*(5*j),wu+=F*(5*k),fu+=wu>>>13,wu&=8191;var xu=fu;xu+=E*k,xu+=d*C,xu+=f*v,xu+=p*w,xu+=h*(5*mu),fu=xu>>>13,xu&=8191,xu+=g*(5*su),xu+=A*(5*ou),xu+=m*(5*uu),xu+=B*(5*N),xu+=F*(5*j),fu+=xu>>>13,xu&=8191;var ku=fu;ku+=E*j,ku+=d*k,ku+=f*C,ku+=p*v,ku+=h*w,fu=ku>>>13,ku&=8191,ku+=g*(5*mu),ku+=A*(5*su),ku+=m*(5*ou),ku+=B*(5*uu),ku+=F*(5*N),fu+=ku>>>13,ku&=8191;var Nu=fu;Nu+=E*N,Nu+=d*j,Nu+=f*k,Nu+=p*C,Nu+=h*v,fu=Nu>>>13,Nu&=8191,Nu+=g*w,Nu+=A*(5*mu),Nu+=m*(5*su),Nu+=B*(5*ou),Nu+=F*(5*uu),fu+=Nu>>>13,Nu&=8191;var S=fu;S+=E*uu,S+=d*N,S+=f*j,S+=p*k,S+=h*C,fu=S>>>13,S&=8191,S+=g*v,S+=A*w,S+=m*(5*mu),S+=B*(5*su),S+=F*(5*ou),fu+=S>>>13,S&=8191;var O=fu;O+=E*ou,O+=d*uu,O+=f*N,O+=p*j,O+=h*k,fu=O>>>13,O&=8191,O+=g*C,O+=A*v,O+=m*w,O+=B*(5*mu),O+=F*(5*su),fu+=O>>>13,O&=8191;var I=fu;I+=E*su,I+=d*ou,I+=f*uu,I+=p*N,I+=h*j,fu=I>>>13,I&=8191,I+=g*k,I+=A*C,I+=m*v,I+=B*w,I+=F*(5*mu),fu+=I>>>13,I&=8191;var W=fu;W+=E*mu,W+=d*su,W+=f*ou,W+=p*uu,W+=h*N,fu=W>>>13,W&=8191,W+=g*j,W+=A*k,W+=m*C,W+=B*v,W+=F*w,fu+=W>>>13,W&=8191,fu=(fu<<2)+fu|0,fu=fu+Z|0,Z=fu&8191,fu=fu>>>13,Su+=fu,E=Z,d=Su,f=wu,p=xu,h=ku,g=Nu,A=S,m=O,B=I,F=W,o+=16,l-=16}this._h[0]=E,this._h[1]=d,this._h[2]=f,this._h[3]=p,this._h[4]=h,this._h[5]=g,this._h[6]=A,this._h[7]=m,this._h[8]=B,this._h[9]=F},a.prototype.finish=function(s,o){o===void 0&&(o=0);var l=new Uint16Array(10),c,E,d,f;if(this._leftover){for(f=this._leftover,this._buffer[f++]=1;f<16;f++)this._buffer[f]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(c=this._h[1]>>>13,this._h[1]&=8191,f=2;f<10;f++)this._h[f]+=c,c=this._h[f]>>>13,this._h[f]&=8191;for(this._h[0]+=c*5,c=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=c,c=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=c,l[0]=this._h[0]+5,c=l[0]>>>13,l[0]&=8191,f=1;f<10;f++)l[f]=this._h[f]+c,c=l[f]>>>13,l[f]&=8191;for(l[9]-=8192,E=(c^1)-1,f=0;f<10;f++)l[f]&=E;for(E=~E,f=0;f<10;f++)this._h[f]=this._h[f]&E|l[f];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,d=this._h[0]+this._pad[0],this._h[0]=d&65535,f=1;f<8;f++)d=(this._h[f]+this._pad[f]|0)+(d>>>16)|0,this._h[f]=d&65535;return s[o+0]=this._h[0]>>>0,s[o+1]=this._h[0]>>>8,s[o+2]=this._h[1]>>>0,s[o+3]=this._h[1]>>>8,s[o+4]=this._h[2]>>>0,s[o+5]=this._h[2]>>>8,s[o+6]=this._h[3]>>>0,s[o+7]=this._h[3]>>>8,s[o+8]=this._h[4]>>>0,s[o+9]=this._h[4]>>>8,s[o+10]=this._h[5]>>>0,s[o+11]=this._h[5]>>>8,s[o+12]=this._h[6]>>>0,s[o+13]=this._h[6]>>>8,s[o+14]=this._h[7]>>>0,s[o+15]=this._h[7]>>>8,this._finished=!0,this},a.prototype.update=function(s){var o=0,l=s.length,c;if(this._leftover){c=16-this._leftover,c>l&&(c=l);for(var E=0;E=16&&(c=l-l%16,this._blocks(s,o,c),o+=c,l-=c),l){for(var E=0;E16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var f=new Uint8Array(16);f.set(l,f.length-l.length);var p=new Uint8Array(32);u.stream(this._key,f,p,4);var h=c.length+this.tagLength,g;if(d){if(d.length!==h)throw new Error("ChaCha20Poly1305: incorrect destination length");g=d}else g=new Uint8Array(h);return u.streamXOR(this._key,f,c,g,4),this._authenticate(g.subarray(g.length-this.tagLength,g.length),p,g.subarray(0,g.length-this.tagLength),E),n.wipe(f),g},o.prototype.open=function(l,c,E,d){if(l.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(c.length0&&f.update(a.subarray(d.length%16))),f.update(E),E.length%16>0&&f.update(a.subarray(E.length%16));var p=new Uint8Array(8);d&&r.writeUint64LE(d.length,p),f.update(p),r.writeUint64LE(E.length,p),f.update(p);for(var h=f.digest(),g=0;gthis.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(u){for(var t=new Uint8Array(u),n=0;n256)throw new Error("randomString charset is too long");let d="";const f=c.length,p=256-256%f;for(;l>0;){const h=r(Math.ceil(l*256/p),E);for(let g=0;g0;g++){const A=h[g];A0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=o[c++],l--;this._bufferLength===this.blockSize&&(i(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(c=i(this._temp,this._state,o,c,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=o[c++],l--;return this},s.prototype.finish=function(o){if(!this._finished){var l=this._bytesHashed,c=this._bufferLength,E=l/536870912|0,d=l<<3,f=l%64<56?64:128;this._buffer[c]=128;for(var p=c+1;p0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(o){return this._state.set(o.state),this._bufferLength=o.bufferLength,o.buffer&&this._buffer.set(o.buffer),this._bytesHashed=o.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(o){t.wipe(o.state),o.buffer&&t.wipe(o.buffer),o.bufferLength=0,o.bytesHashed=0},s}();e.SHA256=n;var r=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function i(s,o,l,c,E){for(;E>=64;){for(var d=o[0],f=o[1],p=o[2],h=o[3],g=o[4],A=o[5],m=o[6],B=o[7],F=0;F<16;F++){var w=c+F*4;s[F]=u.readUint32BE(l,w)}for(var F=16;F<64;F++){var v=s[F-2],C=(v>>>17|v<<32-17)^(v>>>19|v<<32-19)^v>>>10;v=s[F-15];var k=(v>>>7|v<<32-7)^(v>>>18|v<<32-18)^v>>>3;s[F]=(C+s[F-7]|0)+(k+s[F-16]|0)}for(var F=0;F<64;F++){var C=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&A^~g&m)|0)+(B+(r[F]+s[F]|0)|0)|0,k=((d>>>2|d<<32-2)^(d>>>13|d<<32-13)^(d>>>22|d<<32-22))+(d&f^d&p^f&p)|0;B=m,m=A,A=g,g=h+C|0,h=p,p=f,f=d,d=C+k|0}o[0]+=d,o[1]+=f,o[2]+=p,o[3]+=h,o[4]+=g,o[5]+=A,o[6]+=m,o[7]+=B,c+=64,E-=64}return c}function a(s){var o=new n;o.update(s);var l=o.digest();return o.clean(),l}e.hash=a})(fd);var j8={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const u=ld,t=un;e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;function n(F){const w=new Float64Array(16);if(F)for(let v=0;v>16&1),v[N-1]&=65535;v[15]=C[15]-32767-(v[14]>>16&1);const j=v[15]>>16&1;v[14]&=65535,s(C,v,1-j)}for(let k=0;k<16;k++)F[2*k]=C[k]&255,F[2*k+1]=C[k]>>8}function l(F,w){for(let v=0;v<16;v++)F[v]=w[2*v]+(w[2*v+1]<<8);F[15]&=32767}function c(F,w,v){for(let C=0;C<16;C++)F[C]=w[C]+v[C]}function E(F,w,v){for(let C=0;C<16;C++)F[C]=w[C]-v[C]}function d(F,w,v){let C,k,j=0,N=0,uu=0,ou=0,su=0,mu=0,tu=0,au=0,nu=0,H=0,iu=0,lu=0,Eu=0,hu=0,fu=0,Z=0,Su=0,wu=0,xu=0,ku=0,Nu=0,S=0,O=0,I=0,W=0,U=0,Q=0,Y=0,$=0,G=0,X=0,K=v[0],ru=v[1],pu=v[2],gu=v[3],Pu=v[4],Au=v[5],Fu=v[6],_=v[7],y=v[8],D=v[9],P=v[10],R=v[11],L=v[12],J=v[13],bu=v[14],Tu=v[15];C=w[0],j+=C*K,N+=C*ru,uu+=C*pu,ou+=C*gu,su+=C*Pu,mu+=C*Au,tu+=C*Fu,au+=C*_,nu+=C*y,H+=C*D,iu+=C*P,lu+=C*R,Eu+=C*L,hu+=C*J,fu+=C*bu,Z+=C*Tu,C=w[1],N+=C*K,uu+=C*ru,ou+=C*pu,su+=C*gu,mu+=C*Pu,tu+=C*Au,au+=C*Fu,nu+=C*_,H+=C*y,iu+=C*D,lu+=C*P,Eu+=C*R,hu+=C*L,fu+=C*J,Z+=C*bu,Su+=C*Tu,C=w[2],uu+=C*K,ou+=C*ru,su+=C*pu,mu+=C*gu,tu+=C*Pu,au+=C*Au,nu+=C*Fu,H+=C*_,iu+=C*y,lu+=C*D,Eu+=C*P,hu+=C*R,fu+=C*L,Z+=C*J,Su+=C*bu,wu+=C*Tu,C=w[3],ou+=C*K,su+=C*ru,mu+=C*pu,tu+=C*gu,au+=C*Pu,nu+=C*Au,H+=C*Fu,iu+=C*_,lu+=C*y,Eu+=C*D,hu+=C*P,fu+=C*R,Z+=C*L,Su+=C*J,wu+=C*bu,xu+=C*Tu,C=w[4],su+=C*K,mu+=C*ru,tu+=C*pu,au+=C*gu,nu+=C*Pu,H+=C*Au,iu+=C*Fu,lu+=C*_,Eu+=C*y,hu+=C*D,fu+=C*P,Z+=C*R,Su+=C*L,wu+=C*J,xu+=C*bu,ku+=C*Tu,C=w[5],mu+=C*K,tu+=C*ru,au+=C*pu,nu+=C*gu,H+=C*Pu,iu+=C*Au,lu+=C*Fu,Eu+=C*_,hu+=C*y,fu+=C*D,Z+=C*P,Su+=C*R,wu+=C*L,xu+=C*J,ku+=C*bu,Nu+=C*Tu,C=w[6],tu+=C*K,au+=C*ru,nu+=C*pu,H+=C*gu,iu+=C*Pu,lu+=C*Au,Eu+=C*Fu,hu+=C*_,fu+=C*y,Z+=C*D,Su+=C*P,wu+=C*R,xu+=C*L,ku+=C*J,Nu+=C*bu,S+=C*Tu,C=w[7],au+=C*K,nu+=C*ru,H+=C*pu,iu+=C*gu,lu+=C*Pu,Eu+=C*Au,hu+=C*Fu,fu+=C*_,Z+=C*y,Su+=C*D,wu+=C*P,xu+=C*R,ku+=C*L,Nu+=C*J,S+=C*bu,O+=C*Tu,C=w[8],nu+=C*K,H+=C*ru,iu+=C*pu,lu+=C*gu,Eu+=C*Pu,hu+=C*Au,fu+=C*Fu,Z+=C*_,Su+=C*y,wu+=C*D,xu+=C*P,ku+=C*R,Nu+=C*L,S+=C*J,O+=C*bu,I+=C*Tu,C=w[9],H+=C*K,iu+=C*ru,lu+=C*pu,Eu+=C*gu,hu+=C*Pu,fu+=C*Au,Z+=C*Fu,Su+=C*_,wu+=C*y,xu+=C*D,ku+=C*P,Nu+=C*R,S+=C*L,O+=C*J,I+=C*bu,W+=C*Tu,C=w[10],iu+=C*K,lu+=C*ru,Eu+=C*pu,hu+=C*gu,fu+=C*Pu,Z+=C*Au,Su+=C*Fu,wu+=C*_,xu+=C*y,ku+=C*D,Nu+=C*P,S+=C*R,O+=C*L,I+=C*J,W+=C*bu,U+=C*Tu,C=w[11],lu+=C*K,Eu+=C*ru,hu+=C*pu,fu+=C*gu,Z+=C*Pu,Su+=C*Au,wu+=C*Fu,xu+=C*_,ku+=C*y,Nu+=C*D,S+=C*P,O+=C*R,I+=C*L,W+=C*J,U+=C*bu,Q+=C*Tu,C=w[12],Eu+=C*K,hu+=C*ru,fu+=C*pu,Z+=C*gu,Su+=C*Pu,wu+=C*Au,xu+=C*Fu,ku+=C*_,Nu+=C*y,S+=C*D,O+=C*P,I+=C*R,W+=C*L,U+=C*J,Q+=C*bu,Y+=C*Tu,C=w[13],hu+=C*K,fu+=C*ru,Z+=C*pu,Su+=C*gu,wu+=C*Pu,xu+=C*Au,ku+=C*Fu,Nu+=C*_,S+=C*y,O+=C*D,I+=C*P,W+=C*R,U+=C*L,Q+=C*J,Y+=C*bu,$+=C*Tu,C=w[14],fu+=C*K,Z+=C*ru,Su+=C*pu,wu+=C*gu,xu+=C*Pu,ku+=C*Au,Nu+=C*Fu,S+=C*_,O+=C*y,I+=C*D,W+=C*P,U+=C*R,Q+=C*L,Y+=C*J,$+=C*bu,G+=C*Tu,C=w[15],Z+=C*K,Su+=C*ru,wu+=C*pu,xu+=C*gu,ku+=C*Pu,Nu+=C*Au,S+=C*Fu,O+=C*_,I+=C*y,W+=C*D,U+=C*P,Q+=C*R,Y+=C*L,$+=C*J,G+=C*bu,X+=C*Tu,j+=38*Su,N+=38*wu,uu+=38*xu,ou+=38*ku,su+=38*Nu,mu+=38*S,tu+=38*O,au+=38*I,nu+=38*W,H+=38*U,iu+=38*Q,lu+=38*Y,Eu+=38*$,hu+=38*G,fu+=38*X,k=1,C=j+k+65535,k=Math.floor(C/65536),j=C-k*65536,C=N+k+65535,k=Math.floor(C/65536),N=C-k*65536,C=uu+k+65535,k=Math.floor(C/65536),uu=C-k*65536,C=ou+k+65535,k=Math.floor(C/65536),ou=C-k*65536,C=su+k+65535,k=Math.floor(C/65536),su=C-k*65536,C=mu+k+65535,k=Math.floor(C/65536),mu=C-k*65536,C=tu+k+65535,k=Math.floor(C/65536),tu=C-k*65536,C=au+k+65535,k=Math.floor(C/65536),au=C-k*65536,C=nu+k+65535,k=Math.floor(C/65536),nu=C-k*65536,C=H+k+65535,k=Math.floor(C/65536),H=C-k*65536,C=iu+k+65535,k=Math.floor(C/65536),iu=C-k*65536,C=lu+k+65535,k=Math.floor(C/65536),lu=C-k*65536,C=Eu+k+65535,k=Math.floor(C/65536),Eu=C-k*65536,C=hu+k+65535,k=Math.floor(C/65536),hu=C-k*65536,C=fu+k+65535,k=Math.floor(C/65536),fu=C-k*65536,C=Z+k+65535,k=Math.floor(C/65536),Z=C-k*65536,j+=k-1+37*(k-1),k=1,C=j+k+65535,k=Math.floor(C/65536),j=C-k*65536,C=N+k+65535,k=Math.floor(C/65536),N=C-k*65536,C=uu+k+65535,k=Math.floor(C/65536),uu=C-k*65536,C=ou+k+65535,k=Math.floor(C/65536),ou=C-k*65536,C=su+k+65535,k=Math.floor(C/65536),su=C-k*65536,C=mu+k+65535,k=Math.floor(C/65536),mu=C-k*65536,C=tu+k+65535,k=Math.floor(C/65536),tu=C-k*65536,C=au+k+65535,k=Math.floor(C/65536),au=C-k*65536,C=nu+k+65535,k=Math.floor(C/65536),nu=C-k*65536,C=H+k+65535,k=Math.floor(C/65536),H=C-k*65536,C=iu+k+65535,k=Math.floor(C/65536),iu=C-k*65536,C=lu+k+65535,k=Math.floor(C/65536),lu=C-k*65536,C=Eu+k+65535,k=Math.floor(C/65536),Eu=C-k*65536,C=hu+k+65535,k=Math.floor(C/65536),hu=C-k*65536,C=fu+k+65535,k=Math.floor(C/65536),fu=C-k*65536,C=Z+k+65535,k=Math.floor(C/65536),Z=C-k*65536,j+=k-1+37*(k-1),F[0]=j,F[1]=N,F[2]=uu,F[3]=ou,F[4]=su,F[5]=mu,F[6]=tu,F[7]=au,F[8]=nu,F[9]=H,F[10]=iu,F[11]=lu,F[12]=Eu,F[13]=hu,F[14]=fu,F[15]=Z}function f(F,w){d(F,w,w)}function p(F,w){const v=n();for(let C=0;C<16;C++)v[C]=w[C];for(let C=253;C>=0;C--)f(v,v),C!==2&&C!==4&&d(v,v,w);for(let C=0;C<16;C++)F[C]=v[C]}function h(F,w){const v=new Uint8Array(32),C=new Float64Array(80),k=n(),j=n(),N=n(),uu=n(),ou=n(),su=n();for(let nu=0;nu<31;nu++)v[nu]=F[nu];v[31]=F[31]&127|64,v[0]&=248,l(C,w);for(let nu=0;nu<16;nu++)j[nu]=C[nu];k[0]=uu[0]=1;for(let nu=254;nu>=0;--nu){const H=v[nu>>>3]>>>(nu&7)&1;s(k,j,H),s(N,uu,H),c(ou,k,N),E(k,k,N),c(N,j,uu),E(j,j,uu),f(uu,ou),f(su,k),d(k,N,k),d(N,j,ou),c(ou,k,N),E(k,k,N),f(j,k),E(N,uu,su),d(k,N,i),c(k,k,uu),d(N,N,k),d(k,uu,su),d(uu,j,C),f(j,ou),s(k,j,H),s(N,uu,H)}for(let nu=0;nu<16;nu++)C[nu+16]=k[nu],C[nu+32]=N[nu],C[nu+48]=j[nu],C[nu+64]=uu[nu];const mu=C.subarray(32),tu=C.subarray(16);p(mu,mu),d(tu,tu,mu);const au=new Uint8Array(32);return o(au,tu),au}e.scalarMult=h;function g(F){return h(F,r)}e.scalarMultBase=g;function A(F){if(F.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const w=new Uint8Array(F);return{publicKey:g(w),secretKey:w}}e.generateKeyPairFromSeed=A;function m(F){const w=(0,u.randomBytes)(32,F),v=A(w);return(0,t.wipe)(w),v}e.generateKeyPair=m;function B(F,w,v=!1){if(F.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(w.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const C=h(F,w);if(v){let k=0;for(let j=0;jr+i.length,0));const t=Xk(u);let n=0;for(const r of e)t.set(r,n),n+=r.length;return M8(t)}function iEu(e,u){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,F=new Uint8Array(B);A!==m;){for(var w=p[A],v=0,C=B-1;(w!==0||v>>0,F[C]=w%s>>>0,w=w/s>>>0;if(w!==0)throw new Error("Non-zero carry");g=v,A++}for(var k=B-g;k!==B&&F[k]===0;)k++;for(var j=o.repeat(h);k>>0,B=new Uint8Array(m);p[h];){var F=t[p.charCodeAt(h)];if(F===255)return;for(var w=0,v=m-1;(F!==0||w>>0,B[v]=F%256>>>0,F=F/256>>>0;if(F!==0)throw new Error("Non-zero carry");A=w,h++}if(p[h]!==" "){for(var C=m-A;C!==m&&B[C]===0;)C++;for(var k=new Uint8Array(g+(m-C)),j=g;C!==m;)k[j++]=B[C++];return k}}}function f(p){var h=d(p);if(h)return h;throw new Error(`Non-${u} character`)}return{encode:E,decodeUnsafe:d,decode:f}}var aEu=iEu,sEu=aEu;const oEu=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},lEu=e=>new TextEncoder().encode(e),cEu=e=>new TextDecoder().decode(e);class EEu{constructor(u,t,n){this.name=u,this.prefix=t,this.baseEncode=n}encode(u){if(u instanceof Uint8Array)return`${this.prefix}${this.baseEncode(u)}`;throw Error("Unknown type, must be binary type")}}class dEu{constructor(u,t,n){if(this.name=u,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(u){if(typeof u=="string"){if(u.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(u)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(u.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(u){return u_(this,u)}}class fEu{constructor(u){this.decoders=u}or(u){return u_(this,u)}decode(u){const t=u[0],n=this.decoders[t];if(n)return n.decode(u);throw RangeError(`Unable to decode multibase string ${JSON.stringify(u)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const u_=(e,u)=>new fEu({...e.decoders||{[e.prefix]:e},...u.decoders||{[u.prefix]:u}});class pEu{constructor(u,t,n,r){this.name=u,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new EEu(u,t,n),this.decoder=new dEu(u,t,r)}encode(u){return this.encoder.encode(u)}decode(u){return this.decoder.decode(u)}}const pd=({name:e,prefix:u,encode:t,decode:n})=>new pEu(e,u,t,n),iE=({prefix:e,name:u,alphabet:t})=>{const{encode:n,decode:r}=sEu(t,u);return pd({prefix:e,name:u,encode:n,decode:i=>oEu(r(i))})},hEu=(e,u,t,n)=>{const r={};for(let c=0;c=8&&(s-=8,a[l++]=255&o>>s)}if(s>=t||255&o<<8-s)throw new SyntaxError("Unexpected end of data");return a},CEu=(e,u,t)=>{const n=u[u.length-1]==="=",r=(1<t;)a-=t,i+=u[r&s>>a];if(a&&(i+=u[r&s<pd({prefix:u,name:e,encode(r){return CEu(r,n,t)},decode(r){return hEu(r,n,t,e)}}),mEu=pd({prefix:"\0",name:"identity",encode:e=>cEu(e),decode:e=>lEu(e)}),AEu=Object.freeze(Object.defineProperty({__proto__:null,identity:mEu},Symbol.toStringTag,{value:"Module"})),gEu=Z0({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),BEu=Object.freeze(Object.defineProperty({__proto__:null,base2:gEu},Symbol.toStringTag,{value:"Module"})),yEu=Z0({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),FEu=Object.freeze(Object.defineProperty({__proto__:null,base8:yEu},Symbol.toStringTag,{value:"Module"})),DEu=iE({prefix:"9",name:"base10",alphabet:"0123456789"}),vEu=Object.freeze(Object.defineProperty({__proto__:null,base10:DEu},Symbol.toStringTag,{value:"Module"})),bEu=Z0({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),wEu=Z0({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),xEu=Object.freeze(Object.defineProperty({__proto__:null,base16:bEu,base16upper:wEu},Symbol.toStringTag,{value:"Module"})),kEu=Z0({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),_Eu=Z0({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),SEu=Z0({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),PEu=Z0({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),TEu=Z0({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),OEu=Z0({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),IEu=Z0({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),NEu=Z0({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),REu=Z0({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),zEu=Object.freeze(Object.defineProperty({__proto__:null,base32:kEu,base32hex:TEu,base32hexpad:IEu,base32hexpadupper:NEu,base32hexupper:OEu,base32pad:SEu,base32padupper:PEu,base32upper:_Eu,base32z:REu},Symbol.toStringTag,{value:"Module"})),jEu=iE({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),MEu=iE({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),LEu=Object.freeze(Object.defineProperty({__proto__:null,base36:jEu,base36upper:MEu},Symbol.toStringTag,{value:"Module"})),UEu=iE({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),$Eu=iE({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),WEu=Object.freeze(Object.defineProperty({__proto__:null,base58btc:UEu,base58flickr:$Eu},Symbol.toStringTag,{value:"Module"})),qEu=Z0({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),HEu=Z0({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),GEu=Z0({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),QEu=Z0({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),KEu=Object.freeze(Object.defineProperty({__proto__:null,base64:qEu,base64pad:HEu,base64url:GEu,base64urlpad:QEu},Symbol.toStringTag,{value:"Module"})),e_=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),VEu=e_.reduce((e,u,t)=>(e[t]=u,e),[]),JEu=e_.reduce((e,u,t)=>(e[u.codePointAt(0)]=t,e),[]);function ZEu(e){return e.reduce((u,t)=>(u+=VEu[t],u),"")}function YEu(e){const u=[];for(const t of e){const n=JEu[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);u.push(n)}return new Uint8Array(u)}const XEu=pd({prefix:"🚀",name:"base256emoji",encode:ZEu,decode:YEu}),u9u=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:XEu},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const sB={...AEu,...BEu,...FEu,...vEu,...xEu,...zEu,...LEu,...WEu,...KEu,...u9u};function t_(e,u,t,n){return{name:e,prefix:u,encoder:{name:e,prefix:u,encode:t},decoder:{decode:n}}}const oB=t_("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),$6=t_("ascii","a",e=>{let u="a";for(let t=0;t{e=e.substring(1);const u=Xk(e.length);for(let t=0;t"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new i9u:typeof navigator<"u"?dB(navigator.userAgent):d9u()}function c9u(e){return e!==""&&o9u.reduce(function(u,t){var n=t[0],r=t[1];if(u)return u;var i=r.exec(e);return!!i&&[n,i]},!1)}function dB(e){var u=c9u(e);if(!u)return null;var t=u[0],n=u[1];if(t==="searchbot")return new r9u;var r=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);r?r.length=0;s--)(a=e[s])&&(i=(r<3?a(i):r>3?a(u,t,i):a(u,t))||i);return r>3&&i&&Object.defineProperty(u,t,i),i}function m9u(e,u){return function(t,n){u(t,n,e)}}function A9u(e,u){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,u)}function g9u(e,u,t,n){function r(i){return i instanceof t?i:new t(function(a){a(i)})}return new(t||(t=Promise))(function(i,a){function s(c){try{l(n.next(c))}catch(E){a(E)}}function o(c){try{l(n.throw(c))}catch(E){a(E)}}function l(c){c.done?i(c.value):r(c.value).then(s,o)}l((n=n.apply(e,u||[])).next())})}function B9u(e,u){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(c){return o([l,c])}}function o(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,r&&(i=l[0]&2?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,r=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}function r_(e,u){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var n=t.call(e),r,i=[],a;try{for(;(u===void 0||u-- >0)&&!(r=n.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return i}function D9u(){for(var e=[],u=0;u1||s(d,f)})})}function s(d,f){try{o(n[d](f))}catch(p){E(i[0][3],p)}}function o(d){d.value instanceof Ul?Promise.resolve(d.value.v).then(l,c):E(i[0][2],d)}function l(d){s("next",d)}function c(d){s("throw",d)}function E(d,f){d(f),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w9u(e){var u,t;return u={},n("next"),n("throw",function(r){throw r}),n("return"),u[Symbol.iterator]=function(){return this},u;function n(r,i){u[r]=e[r]?function(a){return(t=!t)?{value:Ul(e[r](a)),done:r==="return"}:i?i(a):a}:i}}function x9u(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u=e[Symbol.asyncIterator],t;return u?u.call(e):(e=typeof a5=="function"?a5(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(a){return new Promise(function(s,o){a=e[i](a),r(s,o,a.done,a.value)})}}function r(i,a,s,o){Promise.resolve(o).then(function(l){i({value:l,done:s})},a)}}function k9u(e,u){return Object.defineProperty?Object.defineProperty(e,"raw",{value:u}):e.raw=u,e}function _9u(e){if(e&&e.__esModule)return e;var u={};if(e!=null)for(var t in e)Object.hasOwnProperty.call(e,t)&&(u[t]=e[t]);return u.default=e,u}function S9u(e){return e&&e.__esModule?e:{default:e}}function P9u(e,u){if(!u.has(e))throw new TypeError("attempted to get private field on non-instance");return u.get(e)}function T9u(e,u,t){if(!u.has(e))throw new TypeError("attempted to set private field on non-instance");return u.set(e,t),t}const O9u=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return i5},__asyncDelegator:w9u,__asyncGenerator:b9u,__asyncValues:x9u,__await:Ul,__awaiter:g9u,__classPrivateFieldGet:P9u,__classPrivateFieldSet:T9u,__createBinding:y9u,__decorate:C9u,__exportStar:F9u,__extends:p9u,__generator:B9u,__importDefault:S9u,__importStar:_9u,__makeTemplateObject:k9u,__metadata:A9u,__param:m9u,__read:r_,__rest:h9u,__spread:D9u,__spreadArrays:v9u,__values:a5},Symbol.toStringTag,{value:"Module"})),hd=nh(O9u);var W6={},m3={},fB;function I9u(){if(fB)return m3;fB=1,Object.defineProperty(m3,"__esModule",{value:!0}),m3.delay=void 0;function e(u){return new Promise(t=>{setTimeout(()=>{t(!0)},u)})}return m3.delay=e,m3}var zi={},q6={},ji={},pB;function N9u(){return pB||(pB=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.ONE_THOUSAND=ji.ONE_HUNDRED=void 0,ji.ONE_HUNDRED=100,ji.ONE_THOUSAND=1e3),ji}var H6={},hB;function R9u(){return hB||(hB=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=e.ONE_MINUTE*5,e.TEN_MINUTES=e.ONE_MINUTE*10,e.THIRTY_MINUTES=e.ONE_MINUTE*30,e.SIXTY_MINUTES=e.ONE_MINUTE*60,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=e.ONE_HOUR*3,e.SIX_HOURS=e.ONE_HOUR*6,e.TWELVE_HOURS=e.ONE_HOUR*12,e.TWENTY_FOUR_HOURS=e.ONE_HOUR*24,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=e.ONE_DAY*3,e.FIVE_DAYS=e.ONE_DAY*5,e.SEVEN_DAYS=e.ONE_DAY*7,e.THIRTY_DAYS=e.ONE_DAY*30,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=e.ONE_WEEK*2,e.THREE_WEEKS=e.ONE_WEEK*3,e.FOUR_WEEKS=e.ONE_WEEK*4,e.ONE_YEAR=e.ONE_DAY*365}(H6)),H6}var CB;function i_(){return CB||(CB=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const u=hd;u.__exportStar(N9u(),e),u.__exportStar(R9u(),e)}(q6)),q6}var mB;function z9u(){if(mB)return zi;mB=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.fromMiliseconds=zi.toMiliseconds=void 0;const e=i_();function u(n){return n*e.ONE_THOUSAND}zi.toMiliseconds=u;function t(n){return Math.floor(n/e.ONE_THOUSAND)}return zi.fromMiliseconds=t,zi}var AB;function j9u(){return AB||(AB=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const u=hd;u.__exportStar(I9u(),e),u.__exportStar(z9u(),e)}(W6)),W6}var Es={},gB;function M9u(){if(gB)return Es;gB=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(t){if(this.timestamps.has(t))throw new Error(`Watch already started for label: ${t}`);this.timestamps.set(t,{started:Date.now()})}stop(t){const n=this.get(t);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${t}`);const r=Date.now()-n.started;this.timestamps.set(t,{started:n.started,elapsed:r})}get(t){const n=this.timestamps.get(t);if(typeof n>"u")throw new Error(`No timestamp found for label: ${t}`);return n}elapsed(t){const n=this.get(t);return n.elapsed||Date.now()-n.started}}return Es.Watch=e,Es.default=e,Es}var G6={},A3={},BB;function L9u(){if(BB)return A3;BB=1,Object.defineProperty(A3,"__esModule",{value:!0}),A3.IWatch=void 0;class e{}return A3.IWatch=e,A3}var yB;function U9u(){return yB||(yB=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),hd.__exportStar(L9u(),e)}(G6)),G6}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const u=hd;u.__exportStar(j9u(),e),u.__exportStar(M9u(),e),u.__exportStar(U9u(),e),u.__exportStar(i_(),e)})(Ia);var r0={};Object.defineProperty(r0,"__esModule",{value:!0});var $9u=r0.getLocalStorage=i2u=r0.getLocalStorageOrThrow=n2u=r0.getCrypto=e2u=r0.getCryptoOrThrow=s_=r0.getLocation=Y9u=r0.getLocationOrThrow=L8=r0.getNavigator=V9u=r0.getNavigatorOrThrow=a_=r0.getDocument=G9u=r0.getDocumentOrThrow=q9u=r0.getFromWindowOrThrow=W9u=r0.getFromWindow=void 0;function rs(e){let u;return typeof window<"u"&&typeof window[e]<"u"&&(u=window[e]),u}var W9u=r0.getFromWindow=rs;function t3(e){const u=rs(e);if(!u)throw new Error(`${e} is not defined in Window`);return u}var q9u=r0.getFromWindowOrThrow=t3;function H9u(){return t3("document")}var G9u=r0.getDocumentOrThrow=H9u;function Q9u(){return rs("document")}var a_=r0.getDocument=Q9u;function K9u(){return t3("navigator")}var V9u=r0.getNavigatorOrThrow=K9u;function J9u(){return rs("navigator")}var L8=r0.getNavigator=J9u;function Z9u(){return t3("location")}var Y9u=r0.getLocationOrThrow=Z9u;function X9u(){return rs("location")}var s_=r0.getLocation=X9u;function u2u(){return t3("crypto")}var e2u=r0.getCryptoOrThrow=u2u;function t2u(){return rs("crypto")}var n2u=r0.getCrypto=t2u;function r2u(){return t3("localStorage")}var i2u=r0.getLocalStorageOrThrow=r2u;function a2u(){return rs("localStorage")}$9u=r0.getLocalStorage=a2u;var U8={};Object.defineProperty(U8,"__esModule",{value:!0});var o_=U8.getWindowMetadata=void 0;const FB=r0;function s2u(){let e,u;try{e=FB.getDocumentOrThrow(),u=FB.getLocationOrThrow()}catch{return null}function t(){const E=e.getElementsByTagName("link"),d=[];for(let f=0;f-1){const g=p.getAttribute("href");if(g)if(g.toLowerCase().indexOf("https:")===-1&&g.toLowerCase().indexOf("http:")===-1&&g.indexOf("//")!==0){let A=u.protocol+"//"+u.host;if(g.indexOf("/")===0)A+=g;else{const m=u.pathname.split("/");m.pop();const B=m.join("/");A+=B+"/"+g}d.push(A)}else if(g.indexOf("//")===0){const A=u.protocol+g;d.push(A)}else d.push(g)}}return d}function n(...E){const d=e.getElementsByTagName("meta");for(let f=0;fp.getAttribute(g)).filter(g=>g?E.includes(g):!1);if(h.length&&h){const g=p.getAttribute("content");if(g)return g}}return""}function r(){let E=n("name","og:site_name","og:title","twitter:title");return E||(E=e.title),E}function i(){return n("description","og:description","twitter:description","keywords")}const a=r(),s=i(),o=u.origin,l=t();return{description:s,url:o,icons:l,name:a}}o_=U8.getWindowMetadata=s2u;var $l={},o2u=e=>encodeURIComponent(e).replace(/[!'()*]/g,u=>`%${u.charCodeAt(0).toString(16).toUpperCase()}`),l_="%[a-f0-9]{2}",DB=new RegExp("("+l_+")|([^%]+?)","gi"),vB=new RegExp("("+l_+")+","gi");function s5(e,u){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;u=u||1;var t=e.slice(0,u),n=e.slice(u);return Array.prototype.concat.call([],s5(t),s5(n))}function l2u(e){try{return decodeURIComponent(e)}catch{for(var u=e.match(DB)||[],t=1;t{if(!(typeof e=="string"&&typeof u=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(u==="")return[e];const t=e.indexOf(u);return t===-1?[e]:[e.slice(0,t),e.slice(t+u.length)]},f2u=function(e,u){for(var t={},n=Object.keys(e),r=Array.isArray(u),i=0;im==null,a=Symbol("encodeFragmentIdentifier");function s(m){switch(m.arrayFormat){case"index":return B=>(F,w)=>{const v=F.length;return w===void 0||m.skipNull&&w===null||m.skipEmptyString&&w===""?F:w===null?[...F,[c(B,m),"[",v,"]"].join("")]:[...F,[c(B,m),"[",c(v,m),"]=",c(w,m)].join("")]};case"bracket":return B=>(F,w)=>w===void 0||m.skipNull&&w===null||m.skipEmptyString&&w===""?F:w===null?[...F,[c(B,m),"[]"].join("")]:[...F,[c(B,m),"[]=",c(w,m)].join("")];case"colon-list-separator":return B=>(F,w)=>w===void 0||m.skipNull&&w===null||m.skipEmptyString&&w===""?F:w===null?[...F,[c(B,m),":list="].join("")]:[...F,[c(B,m),":list=",c(w,m)].join("")];case"comma":case"separator":case"bracket-separator":{const B=m.arrayFormat==="bracket-separator"?"[]=":"=";return F=>(w,v)=>v===void 0||m.skipNull&&v===null||m.skipEmptyString&&v===""?w:(v=v===null?"":v,w.length===0?[[c(F,m),B,c(v,m)].join("")]:[[w,c(v,m)].join(m.arrayFormatSeparator)])}default:return B=>(F,w)=>w===void 0||m.skipNull&&w===null||m.skipEmptyString&&w===""?F:w===null?[...F,c(B,m)]:[...F,[c(B,m),"=",c(w,m)].join("")]}}function o(m){let B;switch(m.arrayFormat){case"index":return(F,w,v)=>{if(B=/\[(\d*)\]$/.exec(F),F=F.replace(/\[\d*\]$/,""),!B){v[F]=w;return}v[F]===void 0&&(v[F]={}),v[F][B[1]]=w};case"bracket":return(F,w,v)=>{if(B=/(\[\])$/.exec(F),F=F.replace(/\[\]$/,""),!B){v[F]=w;return}if(v[F]===void 0){v[F]=[w];return}v[F]=[].concat(v[F],w)};case"colon-list-separator":return(F,w,v)=>{if(B=/(:list)$/.exec(F),F=F.replace(/:list$/,""),!B){v[F]=w;return}if(v[F]===void 0){v[F]=[w];return}v[F]=[].concat(v[F],w)};case"comma":case"separator":return(F,w,v)=>{const C=typeof w=="string"&&w.includes(m.arrayFormatSeparator),k=typeof w=="string"&&!C&&E(w,m).includes(m.arrayFormatSeparator);w=k?E(w,m):w;const j=C||k?w.split(m.arrayFormatSeparator).map(N=>E(N,m)):w===null?w:E(w,m);v[F]=j};case"bracket-separator":return(F,w,v)=>{const C=/(\[\])$/.test(F);if(F=F.replace(/\[\]$/,""),!C){v[F]=w&&E(w,m);return}const k=w===null?[]:w.split(m.arrayFormatSeparator).map(j=>E(j,m));if(v[F]===void 0){v[F]=k;return}v[F]=[].concat(v[F],k)};default:return(F,w,v)=>{if(v[F]===void 0){v[F]=w;return}v[F]=[].concat(v[F],w)}}}function l(m){if(typeof m!="string"||m.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(m,B){return B.encode?B.strict?u(m):encodeURIComponent(m):m}function E(m,B){return B.decode?t(m):m}function d(m){return Array.isArray(m)?m.sort():typeof m=="object"?d(Object.keys(m)).sort((B,F)=>Number(B)-Number(F)).map(B=>m[B]):m}function f(m){const B=m.indexOf("#");return B!==-1&&(m=m.slice(0,B)),m}function p(m){let B="";const F=m.indexOf("#");return F!==-1&&(B=m.slice(F)),B}function h(m){m=f(m);const B=m.indexOf("?");return B===-1?"":m.slice(B+1)}function g(m,B){return B.parseNumbers&&!Number.isNaN(Number(m))&&typeof m=="string"&&m.trim()!==""?m=Number(m):B.parseBooleans&&m!==null&&(m.toLowerCase()==="true"||m.toLowerCase()==="false")&&(m=m.toLowerCase()==="true"),m}function A(m,B){B=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},B),l(B.arrayFormatSeparator);const F=o(B),w=Object.create(null);if(typeof m!="string"||(m=m.trim().replace(/^[?#&]/,""),!m))return w;for(const v of m.split("&")){if(v==="")continue;let[C,k]=n(B.decode?v.replace(/\+/g," "):v,"=");k=k===void 0?null:["comma","separator","bracket-separator"].includes(B.arrayFormat)?k:E(k,B),F(E(C,B),k,w)}for(const v of Object.keys(w)){const C=w[v];if(typeof C=="object"&&C!==null)for(const k of Object.keys(C))C[k]=g(C[k],B);else w[v]=g(C,B)}return B.sort===!1?w:(B.sort===!0?Object.keys(w).sort():Object.keys(w).sort(B.sort)).reduce((v,C)=>{const k=w[C];return k&&typeof k=="object"&&!Array.isArray(k)?v[C]=d(k):v[C]=k,v},Object.create(null))}e.extract=h,e.parse=A,e.stringify=(m,B)=>{if(!m)return"";B=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},B),l(B.arrayFormatSeparator);const F=k=>B.skipNull&&i(m[k])||B.skipEmptyString&&m[k]==="",w=s(B),v={};for(const k of Object.keys(m))F(k)||(v[k]=m[k]);const C=Object.keys(v);return B.sort!==!1&&C.sort(B.sort),C.map(k=>{const j=m[k];return j===void 0?"":j===null?c(k,B):Array.isArray(j)?j.length===0&&B.arrayFormat==="bracket-separator"?c(k,B)+"[]":j.reduce(w(k),[]).join("&"):c(k,B)+"="+c(j,B)}).filter(k=>k.length>0).join("&")},e.parseUrl=(m,B)=>{B=Object.assign({decode:!0},B);const[F,w]=n(m,"#");return Object.assign({url:F.split("?")[0]||"",query:A(h(m),B)},B&&B.parseFragmentIdentifier&&w?{fragmentIdentifier:E(w,B)}:{})},e.stringifyUrl=(m,B)=>{B=Object.assign({encode:!0,strict:!0,[a]:!0},B);const F=f(m.url).split("?")[0]||"",w=e.extract(m.url),v=e.parse(w,{sort:!1}),C=Object.assign(v,m.query);let k=e.stringify(C,B);k&&(k=`?${k}`);let j=p(m.url);return m.fragmentIdentifier&&(j=`#${B[a]?c(m.fragmentIdentifier,B):m.fragmentIdentifier}`),`${F}${k}${j}`},e.pick=(m,B,F)=>{F=Object.assign({parseFragmentIdentifier:!0,[a]:!1},F);const{url:w,query:v,fragmentIdentifier:C}=e.parseUrl(m,F);return e.stringifyUrl({url:w,query:r(v,B),fragmentIdentifier:C},F)},e.exclude=(m,B,F)=>{const w=Array.isArray(B)?v=>!B.includes(v):(v,C)=>!B(v,C);return e.pick(m,w,F)}})($l);const p2u={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}},h2u=":";function $5u(e){const[u,t]=e.split(h2u);return{namespace:u,reference:t}}function W5u(e,u=[]){const t=[];return Object.keys(e).forEach(n=>{if(u.length&&!u.includes(n))return;const r=e[n];t.push(...r.accounts)}),t}function c_(e,u){return e.includes(":")?[e]:u.chains||[]}const E_="base10",ze="base16",o5="base64pad",$8="utf8",d_=0,aE=1,C2u=0,bB=1,l5=12,W8=32;function q5u(){const e=j8.generateKeyPair();return{privateKey:Zt(e.secretKey,ze),publicKey:Zt(e.publicKey,ze)}}function H5u(){const e=ld.randomBytes(W8);return Zt(e,ze)}function G5u(e,u){const t=j8.sharedKey(Gt(e,ze),Gt(u,ze),!0),n=new Kcu(fd.SHA256,t).expand(W8);return Zt(n,ze)}function Q5u(e){const u=fd.hash(Gt(e,ze));return Zt(u,ze)}function K5u(e){const u=fd.hash(Gt(e,$8));return Zt(u,ze)}function m2u(e){return Gt(`${e}`,E_)}function Cd(e){return Number(Zt(e,E_))}function V5u(e){const u=m2u(typeof e.type<"u"?e.type:d_);if(Cd(u)===aE&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const t=typeof e.senderPublicKey<"u"?Gt(e.senderPublicKey,ze):void 0,n=typeof e.iv<"u"?Gt(e.iv,ze):ld.randomBytes(l5),r=new R8.ChaCha20Poly1305(Gt(e.symKey,ze)).seal(n,Gt(e.message,$8));return A2u({type:u,sealed:r,iv:n,senderPublicKey:t})}function J5u(e){const u=new R8.ChaCha20Poly1305(Gt(e.symKey,ze)),{sealed:t,iv:n}=f_(e.encoded),r=u.open(n,t);if(r===null)throw new Error("Failed to decrypt");return Zt(r,$8)}function A2u(e){if(Cd(e.type)===aE){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Zt(aB([e.type,e.senderPublicKey,e.iv,e.sealed]),o5)}return Zt(aB([e.type,e.iv,e.sealed]),o5)}function f_(e){const u=Gt(e,o5),t=u.slice(C2u,bB),n=bB;if(Cd(t)===aE){const s=n+W8,o=s+l5,l=u.slice(n,s),c=u.slice(s,o),E=u.slice(o);return{type:t,sealed:E,iv:c,senderPublicKey:l}}const r=n+l5,i=u.slice(n,r),a=u.slice(r);return{type:t,sealed:a,iv:i}}function Z5u(e,u){const t=f_(e);return g2u({type:Cd(t.type),senderPublicKey:typeof t.senderPublicKey<"u"?Zt(t.senderPublicKey,ze):void 0,receiverPublicKey:u==null?void 0:u.receiverPublicKey})}function g2u(e){const u=(e==null?void 0:e.type)||d_;if(u===aE){if(typeof(e==null?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(e==null?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:u,senderPublicKey:e==null?void 0:e.senderPublicKey,receiverPublicKey:e==null?void 0:e.receiverPublicKey}}function Y5u(e){return e.type===aE&&typeof e.senderPublicKey=="string"&&typeof e.receiverPublicKey=="string"}var B2u=Object.defineProperty,wB=Object.getOwnPropertySymbols,y2u=Object.prototype.hasOwnProperty,F2u=Object.prototype.propertyIsEnumerable,xB=(e,u,t)=>u in e?B2u(e,u,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[u]=t,kB=(e,u)=>{for(var t in u||(u={}))y2u.call(u,t)&&xB(e,t,u[t]);if(wB)for(var t of wB(u))F2u.call(u,t)&&xB(e,t,u[t]);return e};const D2u="ReactNative",Ke={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},v2u="js";function p_(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function md(){return!a_()&&!!L8()&&navigator.product===D2u}function q8(){return!p_()&&!!L8()}function sE(){return md()?Ke.reactNative:p_()?Ke.node:q8()?Ke.browser:Ke.unknown}function b2u(e,u){let t=$l.parse(e);return t=kB(kB({},t),u),e=$l.stringify(t),e}function X5u(){return o_()||{name:"",description:"",url:"",icons:[""]}}function w2u(){if(sE()===Ke.reactNative&&typeof globalThis<"u"&&typeof(globalThis==null?void 0:globalThis.Platform)<"u"){const{OS:t,Version:n}=globalThis.Platform;return[t,n].join("-")}const e=l9u();if(e===null)return"unknown";const u=e.os?e.os.replace(" ","").toLowerCase():"unknown";return e.type==="browser"?[u,e.name,e.version].join("-"):[u,e.version].join("-")}function x2u(){var e;const u=sE();return u===Ke.browser?[u,((e=s_())==null?void 0:e.host)||"unknown"].join(":"):u}function k2u(e,u,t){const n=w2u(),r=x2u();return[[e,u].join("-"),[v2u,t].join("-"),n,r].join("/")}function uhu({protocol:e,version:u,relayUrl:t,sdkVersion:n,auth:r,projectId:i,useOnCloseEvent:a}){const s=t.split("?"),o=k2u(e,u,n),l={auth:r,ua:o,projectId:i,useOnCloseEvent:a||void 0},c=b2u(s[1]||"",l);return s[0]+"?"+c}function Yi(e,u){return e.filter(t=>u.includes(t)).length===e.length}function ehu(e){return Object.fromEntries(e.entries())}function thu(e){return new Map(Object.entries(e))}function nhu(e=Ia.FIVE_MINUTES,u){const t=Ia.toMiliseconds(e||Ia.FIVE_MINUTES);let n,r,i;return{resolve:a=>{i&&n&&(clearTimeout(i),n(a))},reject:a=>{i&&r&&(clearTimeout(i),r(a))},done:()=>new Promise((a,s)=>{i=setTimeout(()=>{s(new Error(u))},t),n=a,r=s})}}function rhu(e,u,t){return new Promise(async(n,r)=>{const i=setTimeout(()=>r(new Error(t)),u);try{const a=await e;n(a)}catch(a){r(a)}clearTimeout(i)})}function h_(e,u){if(typeof u=="string"&&u.startsWith(`${e}:`))return u;if(e.toLowerCase()==="topic"){if(typeof u!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${u}`}else if(e.toLowerCase()==="id"){if(typeof u!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${u}`}throw new Error(`Unknown expirer target type: ${e}`)}function ihu(e){return h_("topic",e)}function ahu(e){return h_("id",e)}function shu(e){const[u,t]=e.split(":"),n={id:void 0,topic:void 0};if(u==="topic"&&typeof t=="string")n.topic=t;else if(u==="id"&&Number.isInteger(Number(t)))n.id=Number(t);else throw new Error(`Invalid target, expected id:number or topic:string, got ${u}:${t}`);return n}function ohu(e,u){return Ia.fromMiliseconds((u||Date.now())+Ia.toMiliseconds(e))}function lhu(e){return Date.now()>=Ia.toMiliseconds(e)}function chu(e,u){return`${e}${u?`:${u}`:""}`}function Q6(e=[],u=[]){return[...new Set([...e,...u])]}async function Ehu({id:e,topic:u,wcDeepLink:t}){try{if(!t)return;const n=typeof t=="string"?JSON.parse(t):t;let r=n==null?void 0:n.href;if(typeof r!="string")return;r.endsWith("/")&&(r=r.slice(0,-1));const i=`${r}/wc?requestId=${e}&sessionTopic=${u}`,a=sE();a===Ke.browser?i.startsWith("https://")?window.open(i,"_blank","noreferrer noopener"):window.open(i,"_self","noreferrer noopener"):a===Ke.reactNative&&typeof(globalThis==null?void 0:globalThis.Linking)<"u"&&await globalThis.Linking.openURL(i)}catch(n){console.error(n)}}const _2u="irn";function dhu(e){return(e==null?void 0:e.relay)||{protocol:_2u}}function fhu(e){const u=p2u[e];if(typeof u>"u")throw new Error(`Relay Protocol not supported: ${e}`);return u}var S2u=Object.defineProperty,_B=Object.getOwnPropertySymbols,P2u=Object.prototype.hasOwnProperty,T2u=Object.prototype.propertyIsEnumerable,SB=(e,u,t)=>u in e?S2u(e,u,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[u]=t,O2u=(e,u)=>{for(var t in u||(u={}))P2u.call(u,t)&&SB(e,t,u[t]);if(_B)for(var t of _B(u))T2u.call(u,t)&&SB(e,t,u[t]);return e};function I2u(e,u="-"){const t={},n="relay"+u;return Object.keys(e).forEach(r=>{if(r.startsWith(n)){const i=r.replace(n,""),a=e[r];t[i]=a}}),t}function phu(e){const u=e.indexOf(":"),t=e.indexOf("?")!==-1?e.indexOf("?"):void 0,n=e.substring(0,u),r=e.substring(u+1,t).split("@"),i=typeof t<"u"?e.substring(t):"",a=$l.parse(i);return{protocol:n,topic:N2u(r[0]),version:parseInt(r[1],10),symKey:a.symKey,relay:I2u(a)}}function N2u(e){return e.startsWith("//")?e.substring(2):e}function R2u(e,u="-"){const t="relay",n={};return Object.keys(e).forEach(r=>{const i=t+u+r;e[r]&&(n[i]=e[r])}),n}function hhu(e){return`${e.protocol}:${e.topic}@${e.version}?`+$l.stringify(O2u({symKey:e.symKey},R2u(e.relay)))}var z2u=Object.defineProperty,j2u=Object.defineProperties,M2u=Object.getOwnPropertyDescriptors,PB=Object.getOwnPropertySymbols,L2u=Object.prototype.hasOwnProperty,U2u=Object.prototype.propertyIsEnumerable,TB=(e,u,t)=>u in e?z2u(e,u,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[u]=t,$2u=(e,u)=>{for(var t in u||(u={}))L2u.call(u,t)&&TB(e,t,u[t]);if(PB)for(var t of PB(u))U2u.call(u,t)&&TB(e,t,u[t]);return e},W2u=(e,u)=>j2u(e,M2u(u));function n3(e){const u=[];return e.forEach(t=>{const[n,r]=t.split(":");u.push(`${n}:${r}`)}),u}function q2u(e){const u=[];return Object.values(e).forEach(t=>{u.push(...n3(t.accounts))}),u}function H2u(e,u){const t=[];return Object.values(e).forEach(n=>{n3(n.accounts).includes(u)&&t.push(...n.methods)}),t}function G2u(e,u){const t=[];return Object.values(e).forEach(n=>{n3(n.accounts).includes(u)&&t.push(...n.events)}),t}function Chu(e,u){const t=t1u(e,u);if(t)throw new Error(t.message);const n={};for(const[r,i]of Object.entries(e))n[r]={methods:i.methods,events:i.events,chains:i.accounts.map(a=>`${a.split(":")[0]}:${a.split(":")[1]}`)};return n}function C_(e){return e.includes(":")}function Q2u(e){return C_(e)?e.split(":")[0]:e}function m_(e){var u,t,n;const r={};if(!H8(e))return r;for(const[i,a]of Object.entries(e)){const s=C_(i)?[i]:a.chains,o=a.methods||[],l=a.events||[],c=Q2u(i);r[c]=W2u($2u({},r[c]),{chains:Q6(s,(u=r[c])==null?void 0:u.chains),methods:Q6(o,(t=r[c])==null?void 0:t.methods),events:Q6(l,(n=r[c])==null?void 0:n.events)})}return r}const K2u={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},V2u={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function jr(e,u){const{message:t,code:n}=V2u[e];return{message:u?`${t} ${u}`:t,code:n}}function vo(e,u){const{message:t,code:n}=K2u[e];return{message:u?`${t} ${u}`:t,code:n}}function Ad(e,u){return Array.isArray(e)?typeof u<"u"&&e.length?e.every(u):!0:!1}function H8(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function Na(e){return typeof e>"u"}function St(e,u){return u&&Na(e)?!0:typeof e=="string"&&!!e.trim().length}function G8(e,u){return u&&Na(e)?!0:typeof e=="number"&&!isNaN(e)}function mhu(e,u){const{requiredNamespaces:t}=u,n=Object.keys(e.namespaces),r=Object.keys(t);let i=!0;return Yi(r,n)?(n.forEach(a=>{const{accounts:s,methods:o,events:l}=e.namespaces[a],c=n3(s),E=t[a];(!Yi(c_(a,E),c)||!Yi(E.methods,o)||!Yi(E.events,l))&&(i=!1)}),i):!1}function g2(e){return St(e,!1)&&e.includes(":")?e.split(":").length===2:!1}function J2u(e){if(St(e,!1)&&e.includes(":")){const u=e.split(":");if(u.length===3){const t=u[0]+":"+u[1];return!!u[2]&&g2(t)}}return!1}function Ahu(e){if(St(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function ghu(e){var u;return(u=e==null?void 0:e.proposer)==null?void 0:u.publicKey}function Bhu(e){return e==null?void 0:e.topic}function yhu(e,u){let t=null;return St(e==null?void 0:e.publicKey,!1)||(t=jr("MISSING_OR_INVALID",`${u} controller public key should be a string`)),t}function OB(e){let u=!0;return Ad(e)?e.length&&(u=e.every(t=>St(t,!1))):u=!1,u}function Z2u(e,u,t){let n=null;return Ad(u)&&u.length?u.forEach(r=>{n||g2(r)||(n=vo("UNSUPPORTED_CHAINS",`${t}, chain ${r} should be a string and conform to "namespace:chainId" format`))}):g2(e)||(n=vo("UNSUPPORTED_CHAINS",`${t}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function Y2u(e,u,t){let n=null;return Object.entries(e).forEach(([r,i])=>{if(n)return;const a=Z2u(r,c_(r,i),`${u} ${t}`);a&&(n=a)}),n}function X2u(e,u){let t=null;return Ad(e)?e.forEach(n=>{t||J2u(n)||(t=vo("UNSUPPORTED_ACCOUNTS",`${u}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):t=vo("UNSUPPORTED_ACCOUNTS",`${u}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),t}function u1u(e,u){let t=null;return Object.values(e).forEach(n=>{if(t)return;const r=X2u(n==null?void 0:n.accounts,`${u} namespace`);r&&(t=r)}),t}function e1u(e,u){let t=null;return OB(e==null?void 0:e.methods)?OB(e==null?void 0:e.events)||(t=vo("UNSUPPORTED_EVENTS",`${u}, events should be an array of strings or empty array for no events`)):t=vo("UNSUPPORTED_METHODS",`${u}, methods should be an array of strings or empty array for no methods`),t}function A_(e,u){let t=null;return Object.values(e).forEach(n=>{if(t)return;const r=e1u(n,`${u}, namespace`);r&&(t=r)}),t}function Fhu(e,u,t){let n=null;if(e&&H8(e)){const r=A_(e,u);r&&(n=r);const i=Y2u(e,u,t);i&&(n=i)}else n=jr("MISSING_OR_INVALID",`${u}, ${t} should be an object with data`);return n}function t1u(e,u){let t=null;if(e&&H8(e)){const n=A_(e,u);n&&(t=n);const r=u1u(e,u);r&&(t=r)}else t=jr("MISSING_OR_INVALID",`${u}, namespaces should be an object with data`);return t}function n1u(e){return St(e.protocol,!0)}function Dhu(e,u){let t=!1;return u&&!e?t=!0:e&&Ad(e)&&e.length&&e.forEach(n=>{t=n1u(n)}),t}function vhu(e){return typeof e=="number"}function bhu(e){return typeof e<"u"&&typeof e!==null}function whu(e){return!(!e||typeof e!="object"||!e.code||!G8(e.code,!1)||!e.message||!St(e.message,!1))}function xhu(e){return!(Na(e)||!St(e.method,!1))}function khu(e){return!(Na(e)||Na(e.result)&&Na(e.error)||!G8(e.id,!1)||!St(e.jsonrpc,!1))}function _hu(e){return!(Na(e)||!St(e.name,!1))}function Shu(e,u){return!(!g2(u)||!q2u(e).includes(u))}function Phu(e,u,t){return St(t,!1)?H2u(e,u).includes(t):!1}function Thu(e,u,t){return St(t,!1)?G2u(e,u).includes(t):!1}function Ohu(e,u,t){let n=null;const r=r1u(e),i=i1u(u),a=Object.keys(r),s=Object.keys(i),o=IB(Object.keys(e)),l=IB(Object.keys(u)),c=o.filter(E=>!l.includes(E));return c.length&&(n=jr("NON_CONFORMING_NAMESPACES",`${t} namespaces keys don't satisfy requiredNamespaces. + Required: ${c.toString()} + Received: ${Object.keys(u).toString()}`)),Yi(a,s)||(n=jr("NON_CONFORMING_NAMESPACES",`${t} namespaces chains don't satisfy required namespaces. + Required: ${a.toString()} + Approved: ${s.toString()}`)),Object.keys(u).forEach(E=>{if(!E.includes(":")||n)return;const d=n3(u[E].accounts);d.includes(E)||(n=jr("NON_CONFORMING_NAMESPACES",`${t} namespaces accounts don't satisfy namespace accounts for ${E} + Required: ${E} + Approved: ${d.toString()}`))}),a.forEach(E=>{n||(Yi(r[E].methods,i[E].methods)?Yi(r[E].events,i[E].events)||(n=jr("NON_CONFORMING_NAMESPACES",`${t} namespaces events don't satisfy namespace events for ${E}`)):n=jr("NON_CONFORMING_NAMESPACES",`${t} namespaces methods don't satisfy namespace methods for ${E}`))}),n}function r1u(e){const u={};return Object.keys(e).forEach(t=>{var n;t.includes(":")?u[t]=e[t]:(n=e[t].chains)==null||n.forEach(r=>{u[r]={methods:e[t].methods,events:e[t].events}})}),u}function IB(e){return[...new Set(e.map(u=>u.includes(":")?u.split(":")[0]:u))]}function i1u(e){const u={};return Object.keys(e).forEach(t=>{if(t.includes(":"))u[t]=e[t];else{const n=n3(e[t].accounts);n==null||n.forEach(r=>{u[r]={accounts:e[t].accounts.filter(i=>i.includes(`${r}:`)),methods:e[t].methods,events:e[t].events}})}}),u}function Ihu(e,u){return G8(e,!1)&&e<=u.max&&e>=u.min}function Nhu(){const e=sE();return new Promise(u=>{switch(e){case Ke.browser:u(a1u());break;case Ke.reactNative:u(s1u());break;case Ke.node:u(o1u());break;default:u(!0)}})}function a1u(){return q8()&&(navigator==null?void 0:navigator.onLine)}async function s1u(){if(md()&&typeof globalThis<"u"&&globalThis!=null&&globalThis.NetInfo){const e=await(globalThis==null?void 0:globalThis.NetInfo.fetch());return e==null?void 0:e.isConnected}return!0}function o1u(){return!0}function Rhu(e){switch(sE()){case Ke.browser:l1u(e);break;case Ke.reactNative:c1u(e);break}}function l1u(e){!md()&&q8()&&(window.addEventListener("online",()=>e(!0)),window.addEventListener("offline",()=>e(!1)))}function c1u(e){md()&&typeof globalThis<"u"&&globalThis!=null&&globalThis.NetInfo&&(globalThis==null||globalThis.NetInfo.addEventListener(u=>e(u==null?void 0:u.isConnected)))}const K6={};class zhu{static get(u){return K6[u]}static set(u,t){K6[u]=t}static delete(u){delete K6[u]}}var g_="eip155",E1u="store",B_="requestedChains",c5="wallet_addEthereumChain",d0,J3,f9,E5,Q8,y_,p9,d5,f5,F_,B2,K8,As,x3,y2,V8,F2,J8,D2,Z8,D_=class extends Hc{constructor(e){super({...e,options:{isNewChainsStale:!0,...e.options}}),S0(this,f9),S0(this,Q8),S0(this,p9),S0(this,f5),S0(this,B2),S0(this,As),S0(this,y2),S0(this,F2),S0(this,D2),this.id="walletConnect",this.name="WalletConnect",this.ready=!0,S0(this,d0,void 0),S0(this,J3,void 0),this.onAccountsChanged=u=>{u.length===0?this.emit("disconnect"):this.emit("change",{account:oe(u[0])})},this.onChainChanged=u=>{const t=Number(u),n=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:n}})},this.onDisconnect=()=>{k0(this,As,x3).call(this,[]),this.emit("disconnect")},this.onDisplayUri=u=>{this.emit("message",{type:"display_uri",data:u})},this.onConnect=()=>{this.emit("connect",{})},k0(this,f9,E5).call(this)}async connect({chainId:e,pairingTopic:u}={}){var t,n,r,i,a;try{let s=e;if(!s){const p=(t=this.storage)==null?void 0:t.getItem(E1u),h=(i=(r=(n=p==null?void 0:p.state)==null?void 0:n.data)==null?void 0:r.chain)==null?void 0:i.id;h&&!this.isChainUnsupported(h)?s=h:s=(a=this.chains[0])==null?void 0:a.id}if(!s)throw new Error("No chains found on connector.");const o=await this.getProvider();k0(this,f5,F_).call(this);const l=k0(this,p9,d5).call(this);if(o.session&&l&&await o.disconnect(),!o.session||l){const p=this.chains.filter(h=>h.id!==s).map(h=>h.id);this.emit("message",{type:"connecting"}),await o.connect({pairingTopic:u,chains:[s],optionalChains:p.length?p:void 0}),k0(this,As,x3).call(this,this.chains.map(({id:h})=>h))}const c=await o.enable(),E=oe(c[0]),d=await this.getChainId(),f=this.isChainUnsupported(d);return{account:E,chain:{id:d,unsupported:f}}}catch(s){throw/user rejected/i.test(s==null?void 0:s.message)?new O0(s):s}}async disconnect(){const e=await this.getProvider();try{await e.disconnect()}catch(u){if(!/No matching key/i.test(u.message))throw u}finally{k0(this,B2,K8).call(this),k0(this,As,x3).call(this,[])}}async getAccount(){const{accounts:e}=await this.getProvider();return oe(e[0])}async getChainId(){const{chainId:e}=await this.getProvider();return e}async getProvider({chainId:e}={}){return Hu(this,d0)||await k0(this,f9,E5).call(this),e&&await this.switchChain(e),Hu(this,d0)}async getWalletClient({chainId:e}={}){const[u,t]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),n=this.chains.find(r=>r.id===e);if(!u)throw new Error("provider is required.");return qc({account:t,chain:n,transport:$c(u)})}async isAuthorized(){try{const[e,u]=await Promise.all([this.getAccount(),this.getProvider()]),t=k0(this,p9,d5).call(this);if(!e)return!1;if(t&&u.session){try{await u.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(e){var t,n;const u=this.chains.find(r=>r.id===e);if(!u)throw new kn(new Error("chain not found on connector."));try{const r=await this.getProvider(),i=k0(this,F2,J8).call(this),a=k0(this,D2,Z8).call(this);if(!i.includes(e)&&a.includes(c5)){await r.request({method:c5,params:[{chainId:Lu(u.id),blockExplorerUrls:[(n=(t=u.blockExplorers)==null?void 0:t.default)==null?void 0:n.url],chainName:u.name,nativeCurrency:u.nativeCurrency,rpcUrls:[...u.rpcUrls.default.http]}]});const o=k0(this,y2,V8).call(this);o.push(e),k0(this,As,x3).call(this,o)}return await r.request({method:"wallet_switchEthereumChain",params:[{chainId:Lu(e)}]}),u}catch(r){const i=typeof r=="string"?r:r==null?void 0:r.message;throw/user rejected request/i.test(i)?new O0(r):new kn(r)}}};d0=new WeakMap;J3=new WeakMap;f9=new WeakSet;E5=async function(){return!Hu(this,J3)&&typeof window<"u"&&hr(this,J3,k0(this,Q8,y_).call(this)),Hu(this,J3)};Q8=new WeakSet;y_=async function(){const{EthereumProvider:e,OPTIONAL_EVENTS:u,OPTIONAL_METHODS:t}=await Uu(()=>import("./index.es-29295ced.js"),["assets/index.es-29295ced.js","assets/events-741c5e9f.js","assets/http-d8520fe3.js"]),[n,...r]=this.chains.map(({id:i})=>i);if(n){const{projectId:i,showQrModal:a=!0,qrModalOptions:s,metadata:o,relayUrl:l}=this.options;hr(this,d0,await e.init({showQrModal:a,qrModalOptions:s,projectId:i,optionalMethods:t,optionalEvents:u,chains:[n],optionalChains:r.length?r:void 0,rpcMap:Object.fromEntries(this.chains.map(c=>[c.id,c.rpcUrls.default.http[0]])),metadata:o,relayUrl:l}))}};p9=new WeakSet;d5=function(){if(k0(this,D2,Z8).call(this).includes(c5)||!this.options.isNewChainsStale)return!1;const u=k0(this,y2,V8).call(this),t=this.chains.map(({id:r})=>r),n=k0(this,F2,J8).call(this);return n.length&&!n.some(r=>t.includes(r))?!1:!t.every(r=>u.includes(r))};f5=new WeakSet;F_=function(){Hu(this,d0)&&(k0(this,B2,K8).call(this),Hu(this,d0).on("accountsChanged",this.onAccountsChanged),Hu(this,d0).on("chainChanged",this.onChainChanged),Hu(this,d0).on("disconnect",this.onDisconnect),Hu(this,d0).on("session_delete",this.onDisconnect),Hu(this,d0).on("display_uri",this.onDisplayUri),Hu(this,d0).on("connect",this.onConnect))};B2=new WeakSet;K8=function(){Hu(this,d0)&&(Hu(this,d0).removeListener("accountsChanged",this.onAccountsChanged),Hu(this,d0).removeListener("chainChanged",this.onChainChanged),Hu(this,d0).removeListener("disconnect",this.onDisconnect),Hu(this,d0).removeListener("session_delete",this.onDisconnect),Hu(this,d0).removeListener("display_uri",this.onDisplayUri),Hu(this,d0).removeListener("connect",this.onConnect))};As=new WeakSet;x3=function(e){var u;(u=this.storage)==null||u.setItem(B_,e)};y2=new WeakSet;V8=function(){var e;return((e=this.storage)==null?void 0:e.getItem(B_))??[]};F2=new WeakSet;J8=function(){var n,r,i;if(!Hu(this,d0))return[];const e=(n=Hu(this,d0).session)==null?void 0:n.namespaces;return e?((i=(r=m_(e)[g_])==null?void 0:r.chains)==null?void 0:i.map(a=>parseInt(a.split(":")[1]||"")))??[]:[]};D2=new WeakSet;Z8=function(){var n,r;if(!Hu(this,d0))return[];const e=(n=Hu(this,d0).session)==null?void 0:n.namespaces;return e?((r=m_(e)[g_])==null?void 0:r.methods)??[]:[]};var k3,gs,d1u=class extends Hc{constructor({chains:e,options:u}){super({chains:e,options:{reloadOnDisconnect:!1,...u}}),this.id="coinbaseWallet",this.name="Coinbase Wallet",this.ready=!0,S0(this,k3,void 0),S0(this,gs,void 0),this.onAccountsChanged=t=>{t.length===0?this.emit("disconnect"):this.emit("change",{account:oe(t[0])})},this.onChainChanged=t=>{const n=qa(t),r=this.isChainUnsupported(n);this.emit("change",{chain:{id:n,unsupported:r}})},this.onDisconnect=()=>{this.emit("disconnect")}}async connect({chainId:e}={}){try{const u=await this.getProvider();u.on("accountsChanged",this.onAccountsChanged),u.on("chainChanged",this.onChainChanged),u.on("disconnect",this.onDisconnect),this.emit("message",{type:"connecting"});const t=await u.enable(),n=oe(t[0]);let r=await this.getChainId(),i=this.isChainUnsupported(r);return e&&r!==e&&(r=(await this.switchChain(e)).id,i=this.isChainUnsupported(r)),{account:n,chain:{id:r,unsupported:i}}}catch(u){throw/(user closed modal|accounts received is empty)/i.test(u.message)?new O0(u):u}}async disconnect(){if(!Hu(this,gs))return;const e=await this.getProvider();e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),e.disconnect(),e.close()}async getAccount(){const u=await(await this.getProvider()).request({method:"eth_accounts"});return oe(u[0])}async getChainId(){const e=await this.getProvider();return qa(e.chainId)}async getProvider(){var e;if(!Hu(this,gs)){let u=(await Uu(()=>import("./index-5f7b2f56.js").then(a=>a.i),["assets/index-5f7b2f56.js","assets/events-741c5e9f.js","assets/hooks.module-408dc32d.js"])).default;typeof u!="function"&&typeof u.default=="function"&&(u=u.default),hr(this,k3,new u(this.options));const t=(e=Hu(this,k3).walletExtension)==null?void 0:e.getChainId(),n=this.chains.find(a=>this.options.chainId?a.id===this.options.chainId:a.id===t)||this.chains[0],r=this.options.chainId||(n==null?void 0:n.id),i=this.options.jsonRpcUrl||(n==null?void 0:n.rpcUrls.default.http[0]);hr(this,gs,Hu(this,k3).makeWeb3Provider(i,r))}return Hu(this,gs)}async getWalletClient({chainId:e}={}){const[u,t]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find(r=>r.id===e);if(!u)throw new Error("provider is required.");return qc({account:t,chain:n,transport:$c(u)})}async isAuthorized(){try{return!!await this.getAccount()}catch{return!1}}async switchChain(e){var n;const u=await this.getProvider(),t=Lu(e);try{return await u.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]}),this.chains.find(r=>r.id===e)??{id:e,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(r){const i=this.chains.find(a=>a.id===e);if(!i)throw new Kb({chainId:e,connectorId:this.id});if(r.code===4902)try{return await u.request({method:"wallet_addEthereumChain",params:[{chainId:t,chainName:i.name,nativeCurrency:i.nativeCurrency,rpcUrls:[((n=i.rpcUrls.public)==null?void 0:n.http[0])??""],blockExplorerUrls:this.getBlockExplorerUrls(i)}]}),i}catch(a){throw new O0(a)}throw new kn(r)}}async watchAsset({address:e,decimals:u=18,image:t,symbol:n}){return(await this.getProvider()).request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:u,image:t,symbol:n}}})}};k3=new WeakMap;gs=new WeakMap;var h9,f1u=class extends Co{constructor({chains:e,options:u}={}){const t={name:"MetaMask",shimDisconnect:!0,getProvider(){function n(i){if(i!=null&&i.isMetaMask&&!(i.isBraveWallet&&!i._events&&!i._state)&&!i.isApexWallet&&!i.isAvalanche&&!i.isBitKeep&&!i.isBlockWallet&&!i.isCoin98&&!i.isFordefi&&!i.isMathWallet&&!(i.isOkxWallet||i.isOKExWallet)&&!(i.isOneInchIOSWallet||i.isOneInchAndroidWallet)&&!i.isOpera&&!i.isPortal&&!i.isRabby&&!i.isDefiant&&!i.isTokenPocket&&!i.isTokenary&&!i.isZeal&&!i.isZerion)return i}if(typeof window>"u")return;const r=window.ethereum;return r!=null&&r.providers?r.providers.find(n):n(r)},...u};super({chains:e,options:t}),this.id="metaMask",this.shimDisconnectKey=`${this.id}.shimDisconnect`,S0(this,h9,void 0),hr(this,h9,t.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:e}={}){var u,t,n,r;try{const i=await this.getProvider();if(!i)throw new ke;i.on&&(i.on("accountsChanged",this.onAccountsChanged),i.on("chainChanged",this.onChainChanged),i.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let a=null;if(Hu(this,h9)&&((u=this.options)!=null&&u.shimDisconnect)&&!((t=this.storage)!=null&&t.getItem(this.shimDisconnectKey))&&(a=await this.getAccount().catch(()=>null),!!a))try{await i.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),a=await this.getAccount()}catch(c){if(this.isUserRejectedRequestError(c))throw new O0(c);if(c.code===new Di(c).code)throw c}if(!a){const l=await i.request({method:"eth_requestAccounts"});a=oe(l[0])}let s=await this.getChainId(),o=this.isChainUnsupported(s);return e&&s!==e&&(s=(await this.switchChain(e)).id,o=this.isChainUnsupported(s)),(n=this.options)!=null&&n.shimDisconnect&&((r=this.storage)==null||r.setItem(this.shimDisconnectKey,!0)),{account:a,chain:{id:s,unsupported:o},provider:i}}catch(i){throw this.isUserRejectedRequestError(i)?new O0(i):i.code===-32002?new Di(i):i}}};h9=new WeakMap;var p1u=/(imtoken|metamask|rainbow|trust wallet|uniswap wallet|ledger)/i,$i,p5,v_,h1u=class extends Hc{constructor(){super(...arguments),S0(this,p5),this.id="walletConnectLegacy",this.name="WalletConnectLegacy",this.ready=!0,S0(this,$i,void 0),this.onAccountsChanged=e=>{e.length===0?this.emit("disconnect"):this.emit("change",{account:oe(e[0])})},this.onChainChanged=e=>{const u=qa(e),t=this.isChainUnsupported(u);this.emit("change",{chain:{id:u,unsupported:t}})},this.onDisconnect=()=>{this.emit("disconnect")}}async connect({chainId:e}={}){var u,t,n,r,i,a;try{let s=e;if(!s){const p=(u=this.storage)==null?void 0:u.getItem("store"),h=(r=(n=(t=p==null?void 0:p.state)==null?void 0:t.data)==null?void 0:n.chain)==null?void 0:r.id;h&&!this.isChainUnsupported(h)&&(s=h)}const o=await this.getProvider({chainId:s,create:!0});o.on("accountsChanged",this.onAccountsChanged),o.on("chainChanged",this.onChainChanged),o.on("disconnect",this.onDisconnect),setTimeout(()=>this.emit("message",{type:"connecting"}),0);const l=await o.enable(),c=oe(l[0]),E=await this.getChainId(),d=this.isChainUnsupported(E),f=((a=(i=o.connector)==null?void 0:i.peerMeta)==null?void 0:a.name)??"";return p1u.test(f)&&(this.switchChain=k0(this,p5,v_)),{account:c,chain:{id:E,unsupported:d}}}catch(s){throw/user closed modal/i.test(s.message)?new O0(s):s}}async disconnect(){const e=await this.getProvider();await e.disconnect(),e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),typeof localStorage<"u"&&localStorage.removeItem("walletconnect")}async getAccount(){const u=(await this.getProvider()).accounts;return oe(u[0])}async getChainId(){const e=await this.getProvider();return qa(e.chainId)}async getProvider({chainId:e,create:u}={}){var t,n;if(!Hu(this,$i)||e||u){const r=(t=this.options)!=null&&t.infuraId?{}:this.chains.reduce((a,s)=>({...a,[s.id]:s.rpcUrls.default.http[0]}),{}),i=(await Uu(()=>import("./index-c531661c.js"),["assets/index-c531661c.js","assets/events-741c5e9f.js","assets/http-d8520fe3.js","assets/hooks.module-408dc32d.js"])).default;hr(this,$i,new i({...this.options,chainId:e,rpc:{...r,...(n=this.options)==null?void 0:n.rpc}})),Hu(this,$i).http=await Hu(this,$i).setHttpProvider(e)}return Hu(this,$i)}async getWalletClient({chainId:e}={}){const[u,t]=await Promise.all([this.getProvider({chainId:e}),this.getAccount()]),n=this.chains.find(r=>r.id===e);if(!u)throw new Error("provider is required.");return qc({account:t,chain:n,transport:$c(u)})}async isAuthorized(){try{return!!await this.getAccount()}catch{return!1}}};$i=new WeakMap;p5=new WeakSet;v_=async function(e){const u=await this.getProvider(),t=Lu(e);try{return await Promise.race([u.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]}),new Promise(n=>this.on("change",({chain:r})=>{(r==null?void 0:r.id)===e&&n(e)}))]),this.chains.find(n=>n.id===e)??{id:e,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(n){const r=typeof n=="string"?n:n==null?void 0:n.message;throw/user rejected request/i.test(r)?new O0(n):new kn(n)}};var _3,S3,C1u=class extends Hc{constructor({chains:e,options:u}){const t={shimDisconnect:!1,...u};super({chains:e,options:t}),this.id="safe",this.name="Safe",this.ready=!(typeof window>"u")&&(window==null?void 0:window.parent)!==window,S0(this,_3,void 0),S0(this,S3,void 0),this.shimDisconnectKey=`${this.id}.shimDisconnect`;let n=dE;typeof dE!="function"&&typeof dE.default=="function"&&(n=dE.default),hr(this,S3,new n(t))}async connect(){var n;const e=await this.getProvider();if(!e)throw new ke;e.on&&(e.on("accountsChanged",this.onAccountsChanged),e.on("chainChanged",this.onChainChanged),e.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const u=await this.getAccount(),t=await this.getChainId();return this.options.shimDisconnect&&((n=this.storage)==null||n.setItem(this.shimDisconnectKey,!0)),{account:u,chain:{id:t,unsupported:this.isChainUnsupported(t)}}}async disconnect(){var u;const e=await this.getProvider();e!=null&&e.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&((u=this.storage)==null||u.removeItem(this.shimDisconnectKey)))}async getAccount(){const e=await this.getProvider();if(!e)throw new ke;const u=await e.request({method:"eth_accounts"});return oe(u[0])}async getChainId(){const e=await this.getProvider();if(!e)throw new ke;return qa(e.chainId)}async getProvider(){if(!Hu(this,_3)){const e=await Hu(this,S3).safe.getInfo();if(!e)throw new Error("Could not load Safe information");hr(this,_3,new FP(e,Hu(this,S3)))}return Hu(this,_3)}async getWalletClient({chainId:e}={}){const u=await this.getProvider(),t=await this.getAccount(),n=this.chains.find(r=>r.id===e);if(!u)throw new Error("provider is required.");return qc({account:t,chain:n,transport:$c(u)})}async isAuthorized(){var e;try{return this.options.shimDisconnect&&!((e=this.storage)!=null&&e.getItem(this.shimDisconnectKey))?!1:!!await this.getAccount()}catch{return!1}}onAccountsChanged(e){}onChainChanged(e){}onDisconnect(){this.emit("disconnect")}};_3=new WeakMap;S3=new WeakMap;function m1u(e){return Object.fromEntries(Object.entries(e).filter(([u,t])=>t!==void 0))}var A1u=e=>()=>{let u=-1;const t=[],n=[],r=[],i=[];return e.forEach(({groupName:s,wallets:o},l)=>{o.forEach(c=>{if(u++,c!=null&&c.iconAccent&&!zlu(c==null?void 0:c.iconAccent))throw new Error(`Property \`iconAccent\` is not a hex value for wallet: ${c.name}`);const E={...c,groupIndex:l,groupName:s,index:u};typeof c.hidden=="function"?r.push(E):n.push(E)})}),[...n,...r].forEach(({createConnector:s,groupIndex:o,groupName:l,hidden:c,index:E,...d})=>{if(typeof c=="function"&&c({wallets:[...i.map(({connector:m,id:B,installed:F,name:w})=>({connector:m,id:B,installed:F,name:w}))]}))return;const{connector:f,...p}=m1u(s());let h;if(d.id==="walletConnect"&&p.qrCode&&!J0()){const{chains:A,options:m}=f;h=new D_({chains:A,options:{...m,showQrModal:!0}}),t.push(h)}const g={connector:f,groupIndex:o,groupName:l,index:E,walletConnectModalConnector:h,...d,...p};i.push(g),t.includes(f)||(t.push(f),f._wallets=[]),f._wallets.push(g)}),t},g1u=({chains:e,...u})=>{var t;return{id:"brave",name:"Brave Wallet",iconUrl:async()=>(await Uu(()=>import("./braveWallet-BTBH4MDN-77ab02b2.js"),[])).default,iconBackground:"#fff",installed:typeof window<"u"&&((t=window.ethereum)==null?void 0:t.isBraveWallet)===!0,downloadUrls:{},createConnector:()=>({connector:new Co({chains:e,options:u})})}};function b_(e){if(typeof window>"u"||typeof window.ethereum>"u")return;const u=window.ethereum.providers;return u?u.find(t=>t[e]):window.ethereum[e]?window.ethereum:void 0}function w_(e){return!!b_(e)}function B1u(e){if(typeof window>"u"||typeof window.ethereum>"u")return;const u=window.ethereum.providers,t=b_(e);return t||(typeof u<"u"&&u.length>0?u[0]:window.ethereum)}function y1u({chains:e,flag:u,options:t}){return new Co({chains:e,options:{getProvider:()=>B1u(u),...t}})}var F1u=({appName:e,chains:u,...t})=>{const n=w_("isCoinbaseWallet");return{id:"coinbase",name:"Coinbase Wallet",shortName:"Coinbase",iconUrl:async()=>(await Uu(()=>import("./coinbaseWallet-2OUR5TUP-f6c629ff.js"),[])).default,iconAccent:"#2c5ff6",iconBackground:"#2c5ff6",installed:n||void 0,downloadUrls:{android:"https://play.google.com/store/apps/details?id=org.toshi",ios:"https://apps.apple.com/us/app/coinbase-wallet-store-crypto/id1278383455",mobile:"https://coinbase.com/wallet/downloads",qrCode:"https://coinbase-wallet.onelink.me/q5Sx/fdb9b250",chrome:"https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad",browserExtension:"https://coinbase.com/wallet"},createConnector:()=>{const r=ns(),i=new d1u({chains:u,options:{appName:e,headlessMode:!0,...t}});return{connector:i,...r?{}:{qrCode:{getUri:async()=>(await i.getProvider()).qrUrl,instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-mobile",steps:[{description:"wallet_connectors.coinbase.qr_code.step1.description",step:"install",title:"wallet_connectors.coinbase.qr_code.step1.title"},{description:"wallet_connectors.coinbase.qr_code.step2.description",step:"create",title:"wallet_connectors.coinbase.qr_code.step2.title"},{description:"wallet_connectors.coinbase.qr_code.step3.description",step:"scan",title:"wallet_connectors.coinbase.qr_code.step3.title"}]}},extension:{instructions:{learnMoreUrl:"https://coinbase.com/wallet/articles/getting-started-extension",steps:[{description:"wallet_connectors.coinbase.extension.step1.description",step:"install",title:"wallet_connectors.coinbase.extension.step1.title"},{description:"wallet_connectors.coinbase.extension.step2.description",step:"create",title:"wallet_connectors.coinbase.extension.step2.title"},{description:"wallet_connectors.coinbase.extension.step3.description",step:"refresh",title:"wallet_connectors.coinbase.extension.step3.title"}]}}}}}}},D1u=({chains:e,...u})=>({id:"injected",name:"Browser Wallet",iconUrl:async()=>(await Uu(()=>import("./injectedWallet-EUKDEAIU-b2513a2e.js"),[])).default,iconBackground:"#fff",hidden:({wallets:t})=>t.some(n=>n.installed&&n.name===n.connector.name&&(n.connector instanceof Co||n.id==="coinbase")),createConnector:()=>({connector:new Co({chains:e,options:u})})});async function Y8(e,u){const t=await e.getProvider();return u==="2"?new Promise(n=>t.once("display_uri",n)):t.connector.uri}var x_=new Map;function v1u(e,u){const t=e==="1"?new h1u(u):new D_(u);return x_.set(JSON.stringify(u),t),t}function v2({chains:e,options:u={},projectId:t,version:n="2"}){const r="21fef48091f12692cad574a6f7753643";if(n==="2"){if(!t||t==="")throw new Error("No projectId found. Every dApp must now provide a WalletConnect Cloud projectId to enable WalletConnect v2 https://www.rainbowkit.com/docs/installation#configure");(t==="YOUR_PROJECT_ID"||t===r)&&console.warn("Invalid projectId. Please create a unique WalletConnect Cloud projectId for your dApp https://www.rainbowkit.com/docs/installation#configure")}const i={chains:e,options:n==="1"?{qrcode:!1,...u}:{projectId:t==="YOUR_PROJECT_ID"?r:t,showQrModal:!1,...u}},a=JSON.stringify(i),s=x_.get(a);return s??v1u(n,i)}function NB(e){return!(!(e!=null&&e.isMetaMask)||e.isBraveWallet&&!e._events&&!e._state||e.isApexWallet||e.isAvalanche||e.isBackpack||e.isBifrost||e.isBitKeep||e.isBitski||e.isBlockWallet||e.isCoinbaseWallet||e.isDawn||e.isEnkrypt||e.isExodus||e.isFrame||e.isFrontier||e.isGamestop||e.isHyperPay||e.isImToken||e.isKuCoinWallet||e.isMathWallet||e.isOkxWallet||e.isOKExWallet||e.isOneInchIOSWallet||e.isOneInchAndroidWallet||e.isOpera||e.isPhantom||e.isPortal||e.isRabby||e.isRainbow||e.isStatus||e.isTalisman||e.isTally||e.isTokenPocket||e.isTokenary||e.isTrust||e.isTrustWallet||e.isXDEFI||e.isZeal||e.isZerion)}var b1u=({chains:e,projectId:u,walletConnectOptions:t,walletConnectVersion:n="2",...r})=>{var i,a;const s=typeof window<"u"&&((i=window.ethereum)==null?void 0:i.providers),o=typeof window<"u"&&typeof window.ethereum<"u"&&(((a=window.ethereum.providers)==null?void 0:a.some(NB))||window.ethereum.isMetaMask),l=!o;return{id:"metaMask",name:"MetaMask",iconUrl:async()=>(await Uu(()=>import("./metaMaskWallet-ORHUNQRP-ac2ea8b3.js"),[])).default,iconAccent:"#f6851a",iconBackground:"#fff",installed:l?void 0:o,downloadUrls:{android:"https://play.google.com/store/apps/details?id=io.metamask",ios:"https://apps.apple.com/us/app/metamask/id1438144202",mobile:"https://metamask.io/download",qrCode:"https://metamask.io/download",chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",firefox:"https://addons.mozilla.org/firefox/addon/ether-metamask",opera:"https://addons.opera.com/extensions/details/metamask-10",browserExtension:"https://metamask.io/download"},createConnector:()=>{const c=l?v2({projectId:u,chains:e,version:n,options:t}):new f1u({chains:e,options:{getProvider:()=>s?s.find(NB):typeof window<"u"?window.ethereum:void 0,...r}}),E=async()=>{const d=await Y8(c,n);return F8()?d:ns()?`metamask://wc?uri=${encodeURIComponent(d)}`:`https://metamask.app.link/wc?uri=${encodeURIComponent(d)}`};return{connector:c,mobile:{getUri:l?E:void 0},qrCode:l?{getUri:E,instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.qr_code.step1.description",step:"install",title:"wallet_connectors.metamask.qr_code.step1.title"},{description:"wallet_connectors.metamask.qr_code.step2.description",step:"create",title:"wallet_connectors.metamask.qr_code.step2.title"},{description:"wallet_connectors.metamask.qr_code.step3.description",step:"refresh",title:"wallet_connectors.metamask.qr_code.step3.title"}]}}:void 0,extension:{instructions:{learnMoreUrl:"https://metamask.io/faqs/",steps:[{description:"wallet_connectors.metamask.extension.step1.description",step:"install",title:"wallet_connectors.metamask.extension.step1.title"},{description:"wallet_connectors.metamask.extension.step2.description",step:"create",title:"wallet_connectors.metamask.extension.step2.title"},{description:"wallet_connectors.metamask.extension.step3.description",step:"refresh",title:"wallet_connectors.metamask.extension.step3.title"}]}}}}}},w1u=({chains:e,projectId:u,walletConnectOptions:t,walletConnectVersion:n="2",...r})=>{const i=w_("isRainbow"),a=!i;return{id:"rainbow",name:"Rainbow",iconUrl:async()=>(await Uu(()=>import("./rainbowWallet-GGU64QEI-80e56a37.js"),[])).default,iconBackground:"#0c2f78",installed:a?void 0:i,downloadUrls:{android:"https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",ios:"https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",mobile:"https://rainbow.download?utm_source=rainbowkit",qrCode:"https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",browserExtension:"https://rainbow.me/extension?utm_source=rainbowkit"},createConnector:()=>{const s=a?v2({projectId:u,chains:e,version:n,options:t}):y1u({flag:"isRainbow",chains:e,options:r}),o=async()=>{const l=await Y8(s,n);return F8()?l:ns()?`rainbow://wc?uri=${encodeURIComponent(l)}&connector=rainbowkit`:`https://rnbwapp.com/wc?uri=${encodeURIComponent(l)}&connector=rainbowkit`};return{connector:s,mobile:{getUri:a?o:void 0},qrCode:a?{getUri:o,instructions:{learnMoreUrl:"https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",steps:[{description:"wallet_connectors.rainbow.qr_code.step1.description",step:"install",title:"wallet_connectors.rainbow.qr_code.step1.title"},{description:"wallet_connectors.rainbow.qr_code.step2.description",step:"create",title:"wallet_connectors.rainbow.qr_code.step2.title"},{description:"wallet_connectors.rainbow.qr_code.step3.description",step:"scan",title:"wallet_connectors.rainbow.qr_code.step3.title"}]}}:void 0}}}},x1u=({chains:e,...u})=>({id:"safe",name:"Safe",iconAccent:"#12ff80",iconBackground:"#fff",iconUrl:async()=>(await Uu(()=>import("./safeWallet-DFMLSLCR-bb33abc9.js"),[])).default,installed:!(typeof window>"u")&&(window==null?void 0:window.parent)!==window,downloadUrls:{},createConnector:()=>({connector:new C1u({chains:e,options:u})})}),k1u=({chains:e,options:u,projectId:t,version:n="2"})=>({id:"walletConnect",name:"WalletConnect",iconUrl:async()=>(await Uu(()=>import("./walletConnectWallet-D6ZADJM7-c1d5c644.js"),[])).default,iconBackground:"#3b99fc",createConnector:()=>{const r=ns(),i=v2(n==="1"?{version:"1",chains:e,options:{qrcode:r,...u}}:{version:"2",chains:e,projectId:t,options:{showQrModal:r,...u}}),a=async()=>Y8(i,n);return{connector:i,...r?{}:{mobile:{getUri:a},qrCode:{getUri:a}}}}}),_1u=({appName:e,chains:u,projectId:t})=>{const n=[{groupName:"Popular",wallets:[D1u({chains:u}),x1u({chains:u}),w1u({chains:u,projectId:t}),F1u({appName:e,chains:u}),b1u({chains:u,projectId:t}),k1u({chains:u,projectId:t}),g1u({chains:u})]}];return{connectors:A1u(n),wallets:n}};var oE=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},bo=typeof window>"u"||"Deno"in window;function mt(){}function S1u(e,u){return typeof e=="function"?e(u):e}function h5(e){return typeof e=="number"&&e>=0&&e!==1/0}function k_(e,u){return Math.max(e+(u||0)-Date.now(),0)}function RB(e,u){const{type:t="all",exact:n,fetchStatus:r,predicate:i,queryKey:a,stale:s}=e;if(a){if(n){if(u.queryHash!==X8(a,u.options))return!1}else if(!ql(u.queryKey,a))return!1}if(t!=="all"){const o=u.isActive();if(t==="active"&&!o||t==="inactive"&&o)return!1}return!(typeof s=="boolean"&&u.isStale()!==s||typeof r<"u"&&r!==u.state.fetchStatus||i&&!i(u))}function zB(e,u){const{exact:t,status:n,predicate:r,mutationKey:i}=e;if(i){if(!u.options.mutationKey)return!1;if(t){if(Wl(u.options.mutationKey)!==Wl(i))return!1}else if(!ql(u.options.mutationKey,i))return!1}return!(n&&u.state.status!==n||r&&!r(u))}function X8(e,u){return((u==null?void 0:u.queryKeyHashFn)||Wl)(e)}function Wl(e){return JSON.stringify(e,(u,t)=>m5(t)?Object.keys(t).sort().reduce((n,r)=>(n[r]=t[r],n),{}):t)}function ql(e,u){return e===u?!0:typeof e!=typeof u?!1:e&&u&&typeof e=="object"&&typeof u=="object"?!Object.keys(u).some(t=>!ql(e[t],u[t])):!1}function __(e,u){if(e===u)return e;const t=jB(e)&&jB(u);if(t||m5(e)&&m5(u)){const n=t?e.length:Object.keys(e).length,r=t?u:Object.keys(u),i=r.length,a=t?[]:{};let s=0;for(let o=0;o"u")return!0;const t=u.prototype;return!(!MB(t)||!t.hasOwnProperty("isPrototypeOf"))}function MB(e){return Object.prototype.toString.call(e)==="[object Object]"}function S_(e){return new Promise(u=>{setTimeout(u,e)})}function LB(e){S_(0).then(e)}function A5(e,u,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,u):t.structuralSharing!==!1?__(e,u):u}function P1u(e,u,t=0){const n=[...e,u];return t&&n.length>t?n.slice(1):n}function T1u(e,u,t=0){const n=[u,...e];return t&&n.length>t?n.slice(0,-1):n}var ea,Mr,e4,Vy,O1u=(Vy=class extends oE{constructor(){super();q(this,ea,void 0);q(this,Mr,void 0);q(this,e4,void 0);T(this,e4,u=>{if(!bo&&window.addEventListener){const t=()=>u();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){b(this,Mr)||this.setEventListener(b(this,e4))}onUnsubscribe(){var u;this.hasListeners()||((u=b(this,Mr))==null||u.call(this),T(this,Mr,void 0))}setEventListener(u){var t;T(this,e4,u),(t=b(this,Mr))==null||t.call(this),T(this,Mr,u(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(u){b(this,ea)!==u&&(T(this,ea,u),this.onFocus())}onFocus(){this.listeners.forEach(u=>{u()})}isFocused(){var u;return typeof b(this,ea)=="boolean"?b(this,ea):((u=globalThis.document)==null?void 0:u.visibilityState)!=="hidden"}},ea=new WeakMap,Mr=new WeakMap,e4=new WeakMap,Vy),b2=new O1u,t4,Lr,n4,Jy,I1u=(Jy=class extends oE{constructor(){super();q(this,t4,!0);q(this,Lr,void 0);q(this,n4,void 0);T(this,n4,u=>{if(!bo&&window.addEventListener){const t=()=>u(!0),n=()=>u(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){b(this,Lr)||this.setEventListener(b(this,n4))}onUnsubscribe(){var u;this.hasListeners()||((u=b(this,Lr))==null||u.call(this),T(this,Lr,void 0))}setEventListener(u){var t;T(this,n4,u),(t=b(this,Lr))==null||t.call(this),T(this,Lr,u(this.setOnline.bind(this)))}setOnline(u){b(this,t4)!==u&&(T(this,t4,u),this.listeners.forEach(n=>{n(u)}))}isOnline(){return b(this,t4)}},t4=new WeakMap,Lr=new WeakMap,n4=new WeakMap,Jy),w2=new I1u;function N1u(e){return Math.min(1e3*2**e,3e4)}function gd(e){return(e??"online")==="online"?w2.isOnline():!0}var P_=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function V6(e){return e instanceof P_}function T_(e){let u=!1,t=0,n=!1,r,i,a;const s=new Promise((g,A)=>{i=g,a=A}),o=g=>{var A;n||(f(new P_(g)),(A=e.abort)==null||A.call(e))},l=()=>{u=!0},c=()=>{u=!1},E=()=>!b2.isFocused()||e.networkMode!=="always"&&!w2.isOnline(),d=g=>{var A;n||(n=!0,(A=e.onSuccess)==null||A.call(e,g),r==null||r(),i(g))},f=g=>{var A;n||(n=!0,(A=e.onError)==null||A.call(e,g),r==null||r(),a(g))},p=()=>new Promise(g=>{var A;r=m=>{const B=n||!E();return B&&g(m),B},(A=e.onPause)==null||A.call(e)}).then(()=>{var g;r=void 0,n||(g=e.onContinue)==null||g.call(e)}),h=()=>{if(n)return;let g;try{g=e.fn()}catch(A){g=Promise.reject(A)}Promise.resolve(g).then(d).catch(A=>{var v;if(n)return;const m=e.retry??(bo?0:3),B=e.retryDelay??N1u,F=typeof B=="function"?B(t,A):B,w=m===!0||typeof m=="number"&&t{if(E())return p()}).then(()=>{u?f(A):h()})})};return gd(e.networkMode)?h():p().then(h),{promise:s,cancel:o,continue:()=>(r==null?void 0:r())?s:Promise.resolve(),cancelRetry:l,continueRetry:c}}function R1u(){let e=[],u=0,t=c=>{c()},n=c=>{c()};const r=c=>{let E;u++;try{E=c()}finally{u--,u||s()}return E},i=c=>{u?e.push(c):LB(()=>{t(c)})},a=c=>(...E)=>{i(()=>{c(...E)})},s=()=>{const c=e;e=[],c.length&&LB(()=>{n(()=>{c.forEach(E=>{t(E)})})})};return{batch:r,batchCalls:a,schedule:i,setNotifyFunction:c=>{t=c},setBatchNotifyFunction:c=>{n=c}}}var G0=R1u(),ta,Zy,O_=(Zy=class{constructor(){q(this,ta,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),h5(this.gcTime)&&T(this,ta,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bo?1/0:5*60*1e3))}clearGcTimeout(){b(this,ta)&&(clearTimeout(b(this,ta)),T(this,ta,void 0))}},ta=new WeakMap,Zy),r4,i4,ot,Ur,lt,z0,uc,na,a4,C9,zt,On,Yy,z1u=(Yy=class extends O_{constructor(u){super();q(this,a4);q(this,zt);q(this,r4,void 0);q(this,i4,void 0);q(this,ot,void 0);q(this,Ur,void 0);q(this,lt,void 0);q(this,z0,void 0);q(this,uc,void 0);q(this,na,void 0);T(this,na,!1),T(this,uc,u.defaultOptions),cu(this,a4,C9).call(this,u.options),T(this,z0,[]),T(this,ot,u.cache),this.queryKey=u.queryKey,this.queryHash=u.queryHash,T(this,r4,u.state||j1u(this.options)),this.state=b(this,r4),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!b(this,z0).length&&this.state.fetchStatus==="idle"&&b(this,ot).remove(this)}setData(u,t){const n=A5(this.state.data,u,this.options);return cu(this,zt,On).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(u,t){cu(this,zt,On).call(this,{type:"setState",state:u,setStateOptions:t})}cancel(u){var n;const t=b(this,Ur);return(n=b(this,lt))==null||n.cancel(u),t?t.then(mt).catch(mt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(b(this,r4))}isActive(){return b(this,z0).some(u=>u.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||b(this,z0).some(u=>u.getCurrentResult().isStale)}isStaleByTime(u=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!k_(this.state.dataUpdatedAt,u)}onFocus(){var t;const u=b(this,z0).find(n=>n.shouldFetchOnWindowFocus());u==null||u.refetch({cancelRefetch:!1}),(t=b(this,lt))==null||t.continue()}onOnline(){var t;const u=b(this,z0).find(n=>n.shouldFetchOnReconnect());u==null||u.refetch({cancelRefetch:!1}),(t=b(this,lt))==null||t.continue()}addObserver(u){b(this,z0).includes(u)||(b(this,z0).push(u),this.clearGcTimeout(),b(this,ot).notify({type:"observerAdded",query:this,observer:u}))}removeObserver(u){b(this,z0).includes(u)&&(T(this,z0,b(this,z0).filter(t=>t!==u)),b(this,z0).length||(b(this,lt)&&(b(this,na)?b(this,lt).cancel({revert:!0}):b(this,lt).cancelRetry()),this.scheduleGc()),b(this,ot).notify({type:"observerRemoved",query:this,observer:u}))}getObserversCount(){return b(this,z0).length}invalidate(){this.state.isInvalidated||cu(this,zt,On).call(this,{type:"invalidate"})}fetch(u,t){var l,c,E,d;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(b(this,Ur))return(l=b(this,lt))==null||l.continueRetry(),b(this,Ur)}if(u&&cu(this,a4,C9).call(this,u),!this.options.queryFn){const f=b(this,z0).find(p=>p.options.queryFn);f&&cu(this,a4,C9).call(this,f.options)}const n=new AbortController,r={queryKey:this.queryKey,meta:this.meta},i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(T(this,na,!0),n.signal)})};i(r);const a=()=>this.options.queryFn?(T(this,na,!1),this.options.persister?this.options.persister(this.options.queryFn,r,this):this.options.queryFn(r)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),s={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:a};i(s),(c=this.options.behavior)==null||c.onFetch(s,this),T(this,i4,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((E=s.fetchOptions)==null?void 0:E.meta))&&cu(this,zt,On).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta});const o=f=>{var p,h,g,A;V6(f)&&f.silent||cu(this,zt,On).call(this,{type:"error",error:f}),V6(f)||((h=(p=b(this,ot).config).onError)==null||h.call(p,f,this),(A=(g=b(this,ot).config).onSettled)==null||A.call(g,this.state.data,f,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return T(this,lt,T_({fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var p,h,g,A;if(typeof f>"u"){o(new Error(`${this.queryHash} data is undefined`));return}this.setData(f),(h=(p=b(this,ot).config).onSuccess)==null||h.call(p,f,this),(A=(g=b(this,ot).config).onSettled)==null||A.call(g,f,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:o,onFail:(f,p)=>{cu(this,zt,On).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{cu(this,zt,On).call(this,{type:"pause"})},onContinue:()=>{cu(this,zt,On).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode})),T(this,Ur,b(this,lt).promise),b(this,Ur)}},r4=new WeakMap,i4=new WeakMap,ot=new WeakMap,Ur=new WeakMap,lt=new WeakMap,z0=new WeakMap,uc=new WeakMap,na=new WeakMap,a4=new WeakSet,C9=function(u){this.options={...b(this,uc),...u},this.updateGcTime(this.options.gcTime)},zt=new WeakSet,On=function(u){const t=n=>{switch(u.type){case"failed":return{...n,fetchFailureCount:u.failureCount,fetchFailureReason:u.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:u.meta??null,fetchStatus:gd(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...n,data:u.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:u.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!u.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=u.error;return V6(r)&&r.revert&&b(this,i4)?{...b(this,i4),fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...u.state}}};this.state=t(this.state),G0.batch(()=>{b(this,z0).forEach(n=>{n.onQueryUpdate()}),b(this,ot).notify({query:this,type:"updated",action:u})})},Yy);function j1u(e){const u=typeof e.initialData=="function"?e.initialData():e.initialData,t=typeof u<"u",n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:u,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var ln,Xy,M1u=(Xy=class extends oE{constructor(u={}){super();q(this,ln,void 0);this.config=u,T(this,ln,new Map)}build(u,t,n){const r=t.queryKey,i=t.queryHash??X8(r,t);let a=this.get(i);return a||(a=new z1u({cache:this,queryKey:r,queryHash:i,options:u.defaultQueryOptions(t),state:n,defaultOptions:u.getQueryDefaults(r)}),this.add(a)),a}add(u){b(this,ln).has(u.queryHash)||(b(this,ln).set(u.queryHash,u),this.notify({type:"added",query:u}))}remove(u){const t=b(this,ln).get(u.queryHash);t&&(u.destroy(),t===u&&b(this,ln).delete(u.queryHash),this.notify({type:"removed",query:u}))}clear(){G0.batch(()=>{this.getAll().forEach(u=>{this.remove(u)})})}get(u){return b(this,ln).get(u)}getAll(){return[...b(this,ln).values()]}find(u){const t={exact:!0,...u};return this.getAll().find(n=>RB(t,n))}findAll(u={}){const t=this.getAll();return Object.keys(u).length>0?t.filter(n=>RB(u,n)):t}notify(u){G0.batch(()=>{this.listeners.forEach(t=>{t(u)})})}onFocus(){G0.batch(()=>{this.getAll().forEach(u=>{u.onFocus()})})}onOnline(){G0.batch(()=>{this.getAll().forEach(u=>{u.onOnline()})})}},ln=new WeakMap,Xy),cn,ec,$e,s4,En,Pr,uF,L1u=(uF=class extends O_{constructor(u){super();q(this,En);q(this,cn,void 0);q(this,ec,void 0);q(this,$e,void 0);q(this,s4,void 0);this.mutationId=u.mutationId,T(this,ec,u.defaultOptions),T(this,$e,u.mutationCache),T(this,cn,[]),this.state=u.state||U1u(),this.setOptions(u.options),this.scheduleGc()}setOptions(u){this.options={...b(this,ec),...u},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(u){b(this,cn).includes(u)||(b(this,cn).push(u),this.clearGcTimeout(),b(this,$e).notify({type:"observerAdded",mutation:this,observer:u}))}removeObserver(u){T(this,cn,b(this,cn).filter(t=>t!==u)),this.scheduleGc(),b(this,$e).notify({type:"observerRemoved",mutation:this,observer:u})}optionalRemove(){b(this,cn).length||(this.state.status==="pending"?this.scheduleGc():b(this,$e).remove(this))}continue(){var u;return((u=b(this,s4))==null?void 0:u.continue())??this.execute(this.state.variables)}async execute(u){var r,i,a,s,o,l,c,E,d,f,p,h,g,A,m,B,F,w,v,C;const t=()=>(T(this,s4,T_({fn:()=>this.options.mutationFn?this.options.mutationFn(u):Promise.reject(new Error("No mutationFn found")),onFail:(k,j)=>{cu(this,En,Pr).call(this,{type:"failed",failureCount:k,error:j})},onPause:()=>{cu(this,En,Pr).call(this,{type:"pause"})},onContinue:()=>{cu(this,En,Pr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),b(this,s4).promise),n=this.state.status==="pending";try{if(!n){cu(this,En,Pr).call(this,{type:"pending",variables:u}),await((i=(r=b(this,$e).config).onMutate)==null?void 0:i.call(r,u,this));const j=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,u));j!==this.state.context&&cu(this,En,Pr).call(this,{type:"pending",context:j,variables:u})}const k=await t();return await((l=(o=b(this,$e).config).onSuccess)==null?void 0:l.call(o,k,u,this.state.context,this)),await((E=(c=this.options).onSuccess)==null?void 0:E.call(c,k,u,this.state.context)),await((f=(d=b(this,$e).config).onSettled)==null?void 0:f.call(d,k,null,this.state.variables,this.state.context,this)),await((h=(p=this.options).onSettled)==null?void 0:h.call(p,k,null,u,this.state.context)),cu(this,En,Pr).call(this,{type:"success",data:k}),k}catch(k){try{throw await((A=(g=b(this,$e).config).onError)==null?void 0:A.call(g,k,u,this.state.context,this)),await((B=(m=this.options).onError)==null?void 0:B.call(m,k,u,this.state.context)),await((w=(F=b(this,$e).config).onSettled)==null?void 0:w.call(F,void 0,k,this.state.variables,this.state.context,this)),await((C=(v=this.options).onSettled)==null?void 0:C.call(v,void 0,k,u,this.state.context)),k}finally{cu(this,En,Pr).call(this,{type:"error",error:k})}}}},cn=new WeakMap,ec=new WeakMap,$e=new WeakMap,s4=new WeakMap,En=new WeakSet,Pr=function(u){const t=n=>{switch(u.type){case"failed":return{...n,failureCount:u.failureCount,failureReason:u.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:u.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!gd(this.options.networkMode),status:"pending",variables:u.variables,submittedAt:Date.now()};case"success":return{...n,data:u.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:u.error,failureCount:n.failureCount+1,failureReason:u.error,isPaused:!1,status:"error"}}};this.state=t(this.state),G0.batch(()=>{b(this,cn).forEach(n=>{n.onMutationUpdate(u)}),b(this,$e).notify({mutation:this,type:"updated",action:u})})},uF);function U1u(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ct,tc,ra,eF,$1u=(eF=class extends oE{constructor(u={}){super();q(this,ct,void 0);q(this,tc,void 0);q(this,ra,void 0);this.config=u,T(this,ct,[]),T(this,tc,0)}build(u,t,n){const r=new L1u({mutationCache:this,mutationId:++br(this,tc)._,options:u.defaultMutationOptions(t),state:n});return this.add(r),r}add(u){b(this,ct).push(u),this.notify({type:"added",mutation:u})}remove(u){T(this,ct,b(this,ct).filter(t=>t!==u)),this.notify({type:"removed",mutation:u})}clear(){G0.batch(()=>{b(this,ct).forEach(u=>{this.remove(u)})})}getAll(){return b(this,ct)}find(u){const t={exact:!0,...u};return b(this,ct).find(n=>zB(t,n))}findAll(u={}){return b(this,ct).filter(t=>zB(u,t))}notify(u){G0.batch(()=>{this.listeners.forEach(t=>{t(u)})})}resumePausedMutations(){return T(this,ra,(b(this,ra)??Promise.resolve()).then(()=>{const u=b(this,ct).filter(t=>t.state.isPaused);return G0.batch(()=>u.reduce((t,n)=>t.then(()=>n.continue().catch(mt)),Promise.resolve()))}).then(()=>{T(this,ra,void 0)})),b(this,ra)}},ct=new WeakMap,tc=new WeakMap,ra=new WeakMap,eF);function W1u(e){return{onFetch:(u,t)=>{const n=async()=>{var p,h,g,A,m;const r=u.options,i=(g=(h=(p=u.fetchOptions)==null?void 0:p.meta)==null?void 0:h.fetchMore)==null?void 0:g.direction,a=((A=u.state.data)==null?void 0:A.pages)||[],s=((m=u.state.data)==null?void 0:m.pageParams)||[],o={pages:[],pageParams:[]};let l=!1;const c=B=>{Object.defineProperty(B,"signal",{enumerable:!0,get:()=>(u.signal.aborted?l=!0:u.signal.addEventListener("abort",()=>{l=!0}),u.signal)})},E=u.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${u.options.queryHash}'`))),d=async(B,F,w)=>{if(l)return Promise.reject();if(F==null&&B.pages.length)return Promise.resolve(B);const v={queryKey:u.queryKey,pageParam:F,direction:w?"backward":"forward",meta:u.options.meta};c(v);const C=await E(v),{maxPages:k}=u.options,j=w?T1u:P1u;return{pages:j(B.pages,C,k),pageParams:j(B.pageParams,F,k)}};let f;if(i&&a.length){const B=i==="backward",F=B?q1u:UB,w={pages:a,pageParams:s},v=F(r,w);f=await d(w,v,B)}else{f=await d(o,s[0]??r.initialPageParam);const B=e??a.length;for(let F=1;F{var r,i;return(i=(r=u.options).persister)==null?void 0:i.call(r,n,{queryKey:u.queryKey,meta:u.options.meta,signal:u.signal},t)}:u.fetchFn=n}}}function UB(e,{pages:u,pageParams:t}){const n=u.length-1;return e.getNextPageParam(u[n],u,t[n],t)}function q1u(e,{pages:u,pageParams:t}){var n;return(n=e.getPreviousPageParam)==null?void 0:n.call(e,u[0],u,t[0],t)}var x0,$r,Wr,o4,l4,qr,c4,E4,tF,H1u=(tF=class{constructor(e={}){q(this,x0,void 0);q(this,$r,void 0);q(this,Wr,void 0);q(this,o4,void 0);q(this,l4,void 0);q(this,qr,void 0);q(this,c4,void 0);q(this,E4,void 0);T(this,x0,e.queryCache||new M1u),T(this,$r,e.mutationCache||new $1u),T(this,Wr,e.defaultOptions||{}),T(this,o4,new Map),T(this,l4,new Map),T(this,qr,0)}mount(){br(this,qr)._++,b(this,qr)===1&&(T(this,c4,b2.subscribe(()=>{b2.isFocused()&&(this.resumePausedMutations(),b(this,x0).onFocus())})),T(this,E4,w2.subscribe(()=>{w2.isOnline()&&(this.resumePausedMutations(),b(this,x0).onOnline())})))}unmount(){var e,u;br(this,qr)._--,b(this,qr)===0&&((e=b(this,c4))==null||e.call(this),T(this,c4,void 0),(u=b(this,E4))==null||u.call(this),T(this,E4,void 0))}isFetching(e){return b(this,x0).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return b(this,$r).findAll({...e,status:"pending"}).length}getQueryData(e){var u;return(u=b(this,x0).find({queryKey:e}))==null?void 0:u.state.data}ensureQueryData(e){const u=this.getQueryData(e.queryKey);return u!==void 0?Promise.resolve(u):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:u,state:t})=>{const n=t.data;return[u,n]})}setQueryData(e,u,t){const n=b(this,x0).find({queryKey:e}),r=n==null?void 0:n.state.data,i=S1u(u,r);if(typeof i>"u")return;const a=this.defaultQueryOptions({queryKey:e});return b(this,x0).build(this,a).setData(i,{...t,manual:!0})}setQueriesData(e,u,t){return G0.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,u,t)]))}getQueryState(e){var u;return(u=b(this,x0).find({queryKey:e}))==null?void 0:u.state}removeQueries(e){const u=b(this,x0);G0.batch(()=>{u.findAll(e).forEach(t=>{u.remove(t)})})}resetQueries(e,u){const t=b(this,x0),n={type:"active",...e};return G0.batch(()=>(t.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries(n,u)))}cancelQueries(e={},u={}){const t={revert:!0,...u},n=G0.batch(()=>b(this,x0).findAll(e).map(r=>r.cancel(t)));return Promise.all(n).then(mt).catch(mt)}invalidateQueries(e={},u={}){return G0.batch(()=>{if(b(this,x0).findAll(e).forEach(n=>{n.invalidate()}),e.refetchType==="none")return Promise.resolve();const t={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(t,u)})}refetchQueries(e={},u){const t={...u,cancelRefetch:(u==null?void 0:u.cancelRefetch)??!0},n=G0.batch(()=>b(this,x0).findAll(e).filter(r=>!r.isDisabled()).map(r=>{let i=r.fetch(void 0,t);return t.throwOnError||(i=i.catch(mt)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(mt)}fetchQuery(e){const u=this.defaultQueryOptions(e);typeof u.retry>"u"&&(u.retry=!1);const t=b(this,x0).build(this,u);return t.isStaleByTime(u.staleTime)?t.fetch(u):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(mt).catch(mt)}fetchInfiniteQuery(e){return e.behavior=W1u(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(mt).catch(mt)}resumePausedMutations(){return b(this,$r).resumePausedMutations()}getQueryCache(){return b(this,x0)}getMutationCache(){return b(this,$r)}getDefaultOptions(){return b(this,Wr)}setDefaultOptions(e){T(this,Wr,e)}setQueryDefaults(e,u){b(this,o4).set(Wl(e),{queryKey:e,defaultOptions:u})}getQueryDefaults(e){const u=[...b(this,o4).values()];let t={};return u.forEach(n=>{ql(e,n.queryKey)&&(t={...t,...n.defaultOptions})}),t}setMutationDefaults(e,u){b(this,l4).set(Wl(e),{mutationKey:e,defaultOptions:u})}getMutationDefaults(e){const u=[...b(this,l4).values()];let t={};return u.forEach(n=>{ql(e,n.mutationKey)&&(t={...t,...n.defaultOptions})}),t}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const u={...b(this,Wr).queries,...(e==null?void 0:e.queryKey)&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return u.queryHash||(u.queryHash=X8(u.queryKey,u)),typeof u.refetchOnReconnect>"u"&&(u.refetchOnReconnect=u.networkMode!=="always"),typeof u.throwOnError>"u"&&(u.throwOnError=!!u.suspense),typeof u.networkMode>"u"&&u.persister&&(u.networkMode="offlineFirst"),u}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...b(this,Wr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){b(this,x0).clear(),b(this,$r).clear()}},x0=new WeakMap,$r=new WeakMap,Wr=new WeakMap,o4=new WeakMap,l4=new WeakMap,qr=new WeakMap,c4=new WeakMap,E4=new WeakMap,tF),De,n0,d4,ee,ia,f4,dn,nc,p4,h4,aa,sa,Hr,oa,la,P3,rc,g5,ic,B5,ac,y5,sc,F5,oc,D5,lc,v5,cc,b5,z2,I_,nF,G1u=(nF=class extends oE{constructor(u,t){super();q(this,la);q(this,rc);q(this,ic);q(this,ac);q(this,sc);q(this,oc);q(this,lc);q(this,cc);q(this,z2);q(this,De,void 0);q(this,n0,void 0);q(this,d4,void 0);q(this,ee,void 0);q(this,ia,void 0);q(this,f4,void 0);q(this,dn,void 0);q(this,nc,void 0);q(this,p4,void 0);q(this,h4,void 0);q(this,aa,void 0);q(this,sa,void 0);q(this,Hr,void 0);q(this,oa,void 0);T(this,n0,void 0),T(this,d4,void 0),T(this,ee,void 0),T(this,oa,new Set),T(this,De,u),this.options=t,T(this,dn,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(b(this,n0).addObserver(this),$B(b(this,n0),this.options)?cu(this,la,P3).call(this):this.updateResult(),cu(this,sc,F5).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return w5(b(this,n0),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return w5(b(this,n0),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,cu(this,oc,D5).call(this),cu(this,lc,v5).call(this),b(this,n0).removeObserver(this)}setOptions(u,t){const n=this.options,r=b(this,n0);if(this.options=b(this,De).defaultQueryOptions(u),C5(n,this.options)||b(this,De).getQueryCache().notify({type:"observerOptionsUpdated",query:b(this,n0),observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),cu(this,cc,b5).call(this);const i=this.hasListeners();i&&WB(b(this,n0),r,this.options,n)&&cu(this,la,P3).call(this),this.updateResult(t),i&&(b(this,n0)!==r||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&cu(this,rc,g5).call(this);const a=cu(this,ic,B5).call(this);i&&(b(this,n0)!==r||this.options.enabled!==n.enabled||a!==b(this,Hr))&&cu(this,ac,y5).call(this,a)}getOptimisticResult(u){const t=b(this,De).getQueryCache().build(b(this,De),u),n=this.createResult(t,u);return K1u(this,n)&&(T(this,ee,n),T(this,f4,this.options),T(this,ia,b(this,n0).state)),n}getCurrentResult(){return b(this,ee)}trackResult(u){const t={};return Object.keys(u).forEach(n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(b(this,oa).add(n),u[n])})}),t}getCurrentQuery(){return b(this,n0)}refetch({...u}={}){return this.fetch({...u})}fetchOptimistic(u){const t=b(this,De).defaultQueryOptions(u),n=b(this,De).getQueryCache().build(b(this,De),t);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,t))}fetch(u){return cu(this,la,P3).call(this,{...u,cancelRefetch:u.cancelRefetch??!0}).then(()=>(this.updateResult(),b(this,ee)))}createResult(u,t){var v;const n=b(this,n0),r=this.options,i=b(this,ee),a=b(this,ia),s=b(this,f4),l=u!==n?u.state:b(this,d4),{state:c}=u;let{error:E,errorUpdatedAt:d,fetchStatus:f,status:p}=c,h=!1,g;if(t._optimisticResults){const C=this.hasListeners(),k=!C&&$B(u,t),j=C&&WB(u,n,t,r);(k||j)&&(f=gd(u.options.networkMode)?"fetching":"paused",c.dataUpdatedAt||(p="pending")),t._optimisticResults==="isRestoring"&&(f="idle")}if(t.select&&typeof c.data<"u")if(i&&c.data===(a==null?void 0:a.data)&&t.select===b(this,nc))g=b(this,p4);else try{T(this,nc,t.select),g=t.select(c.data),g=A5(i==null?void 0:i.data,g,t),T(this,p4,g),T(this,dn,null)}catch(C){T(this,dn,C)}else g=c.data;if(typeof t.placeholderData<"u"&&typeof g>"u"&&p==="pending"){let C;if(i!=null&&i.isPlaceholderData&&t.placeholderData===(s==null?void 0:s.placeholderData))C=i.data;else if(C=typeof t.placeholderData=="function"?t.placeholderData((v=b(this,h4))==null?void 0:v.state.data,b(this,h4)):t.placeholderData,t.select&&typeof C<"u")try{C=t.select(C),T(this,dn,null)}catch(k){T(this,dn,k)}typeof C<"u"&&(p="success",g=A5(i==null?void 0:i.data,C,t),h=!0)}b(this,dn)&&(E=b(this,dn),g=b(this,p4),d=Date.now(),p="error");const A=f==="fetching",m=p==="pending",B=p==="error",F=m&&A;return{status:p,fetchStatus:f,isPending:m,isSuccess:p==="success",isError:B,isInitialLoading:F,isLoading:F,data:g,dataUpdatedAt:c.dataUpdatedAt,error:E,errorUpdatedAt:d,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:A,isRefetching:A&&!m,isLoadingError:B&&c.dataUpdatedAt===0,isPaused:f==="paused",isPlaceholderData:h,isRefetchError:B&&c.dataUpdatedAt!==0,isStale:um(u,t),refetch:this.refetch}}updateResult(u){const t=b(this,ee),n=this.createResult(b(this,n0),this.options);if(T(this,ia,b(this,n0).state),T(this,f4,this.options),b(this,ia).data!==void 0&&T(this,h4,b(this,n0)),C5(n,t))return;T(this,ee,n);const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!b(this,oa).size)return!0;const o=new Set(s??b(this,oa));return this.options.throwOnError&&o.add("error"),Object.keys(b(this,ee)).some(l=>{const c=l;return b(this,ee)[c]!==t[c]&&o.has(c)})};(u==null?void 0:u.listeners)!==!1&&i()&&(r.listeners=!0),cu(this,z2,I_).call(this,{...r,...u})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&cu(this,sc,F5).call(this)}},De=new WeakMap,n0=new WeakMap,d4=new WeakMap,ee=new WeakMap,ia=new WeakMap,f4=new WeakMap,dn=new WeakMap,nc=new WeakMap,p4=new WeakMap,h4=new WeakMap,aa=new WeakMap,sa=new WeakMap,Hr=new WeakMap,oa=new WeakMap,la=new WeakSet,P3=function(u){cu(this,cc,b5).call(this);let t=b(this,n0).fetch(this.options,u);return u!=null&&u.throwOnError||(t=t.catch(mt)),t},rc=new WeakSet,g5=function(){if(cu(this,oc,D5).call(this),bo||b(this,ee).isStale||!h5(this.options.staleTime))return;const t=k_(b(this,ee).dataUpdatedAt,this.options.staleTime)+1;T(this,aa,setTimeout(()=>{b(this,ee).isStale||this.updateResult()},t))},ic=new WeakSet,B5=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(b(this,n0)):this.options.refetchInterval)??!1},ac=new WeakSet,y5=function(u){cu(this,lc,v5).call(this),T(this,Hr,u),!(bo||this.options.enabled===!1||!h5(b(this,Hr))||b(this,Hr)===0)&&T(this,sa,setInterval(()=>{(this.options.refetchIntervalInBackground||b2.isFocused())&&cu(this,la,P3).call(this)},b(this,Hr)))},sc=new WeakSet,F5=function(){cu(this,rc,g5).call(this),cu(this,ac,y5).call(this,cu(this,ic,B5).call(this))},oc=new WeakSet,D5=function(){b(this,aa)&&(clearTimeout(b(this,aa)),T(this,aa,void 0))},lc=new WeakSet,v5=function(){b(this,sa)&&(clearInterval(b(this,sa)),T(this,sa,void 0))},cc=new WeakSet,b5=function(){const u=b(this,De).getQueryCache().build(b(this,De),this.options);if(u===b(this,n0))return;const t=b(this,n0);T(this,n0,u),T(this,d4,u.state),this.hasListeners()&&(t==null||t.removeObserver(this),u.addObserver(this))},z2=new WeakSet,I_=function(u){G0.batch(()=>{u.listeners&&this.listeners.forEach(t=>{t(b(this,ee))}),b(this,De).getQueryCache().notify({query:b(this,n0),type:"observerResultsUpdated"})})},nF);function Q1u(e,u){return u.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&u.retryOnMount===!1)}function $B(e,u){return Q1u(e,u)||e.state.dataUpdatedAt>0&&w5(e,u,u.refetchOnMount)}function w5(e,u,t){if(u.enabled!==!1){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&um(e,u)}return!1}function WB(e,u,t,n){return t.enabled!==!1&&(e!==u||n.enabled===!1)&&(!t.suspense||e.state.status!=="error")&&um(e,t)}function um(e,u){return e.isStaleByTime(u.staleTime)}function K1u(e,u){return!C5(e.getCurrentResult(),u)}var N_=M.createContext(void 0),V1u=e=>{const u=M.useContext(N_);if(e)return e;if(!u)throw new Error("No QueryClient set, use QueryClientProvider to set one");return u},J1u=({client:e,children:u})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),M.createElement(N_.Provider,{value:e},u)),R_=M.createContext(!1),Z1u=()=>M.useContext(R_);R_.Provider;function Y1u(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var X1u=M.createContext(Y1u()),udu=()=>M.useContext(X1u);function edu(e,u){return typeof e=="function"?e(...u):!!e}var tdu=(e,u)=>{(e.suspense||e.throwOnError)&&(u.isReset()||(e.retryOnMount=!1))},ndu=e=>{M.useEffect(()=>{e.clearReset()},[e])},rdu=({result:e,errorResetBoundary:u,throwOnError:t,query:n})=>e.isError&&!u.isReset()&&!e.isFetching&&edu(t,[e.error,n]),idu=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},adu=(e,u)=>(e==null?void 0:e.suspense)&&u.isPending,sdu=(e,u,t)=>u.fetchOptimistic(e).catch(()=>{t.clearReset()});function odu(e,u,t){const n=V1u(t),r=Z1u(),i=udu(),a=n.defaultQueryOptions(e);a._optimisticResults=r?"isRestoring":"optimistic",idu(a),tdu(a,i),ndu(i);const[s]=M.useState(()=>new u(n,a)),o=s.getOptimisticResult(a);if(M.useSyncExternalStore(M.useCallback(l=>{const c=r?()=>{}:s.subscribe(G0.batchCalls(l));return s.updateResult(),c},[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),M.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),adu(a,o))throw sdu(a,s,i);if(rdu({result:o,errorResetBoundary:i,throwOnError:a.throwOnError,query:s.getCurrentQuery()}))throw o.error;return a.notifyOnChangeProps?o:s.trackResult(o)}function ldu(e,u){return odu(e,G1u,u)}var z_,qB=Nv;z_=qB.createRoot,qB.hydrateRoot;const ur={1:"0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2",5:"0x1df10ec981ac5871240be4a94f250dd238b77901",10:"0x1df10ec981ac5871240be4a94f250dd238b77901",56:"0x1df10ec981ac5871240be4a94f250dd238b77901",137:"0x1df10ec981ac5871240be4a94f250dd238b77901",250:"0x1df10ec981ac5871240be4a94f250dd238b77901",288:"0x1df10ec981ac5871240be4a94f250dd238b77901",324:"0x1df10ec981ac5871240be4a94f250dd238b77901",420:"0x1df10ec981ac5871240be4a94f250dd238b77901",42161:"0x1df10ec981ac5871240be4a94f250dd238b77901",80001:"0x1df10ec981ac5871240be4a94f250dd238b77901",421613:"0x1df10ec981ac5871240be4a94f250dd238b77901"};var cdu="0.10.2",Pt=class x5 extends Error{constructor(u,t={}){var a;const n=t.cause instanceof x5?t.cause.details:(a=t.cause)!=null&&a.message?t.cause.message:t.details,r=t.cause instanceof x5&&t.cause.docsPath||t.docsPath,i=[u||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...r?[`Docs: https://abitype.dev${r}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${cdu}`].join(` +`);super(i),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=r,this.metaMessages=t.metaMessages,this.shortMessage=u}};function Ni(e,u){const t=e.exec(u);return t==null?void 0:t.groups}var j_=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,M_=/^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)?$/,L_=/^\(.+?\).*?$/,HB=/^tuple(?(\[(\d*)\])*)$/;function k5(e){let u=e.type;if(HB.test(e.type)&&"components"in e){u="(";const t=e.components.length;for(let r=0;r[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function ddu(e){return U_.test(e)}function fdu(e){return Ni(U_,e)}var $_=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function pdu(e){return $_.test(e)}function hdu(e){return Ni($_,e)}var W_=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;function Cdu(e){return W_.test(e)}function mdu(e){return Ni(W_,e)}var q_=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;function H_(e){return q_.test(e)}function Adu(e){return Ni(q_,e)}var G_=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;function gdu(e){return G_.test(e)}function Bdu(e){return Ni(G_,e)}var ydu=/^fallback\(\)$/;function Fdu(e){return ydu.test(e)}var Ddu=/^receive\(\) external payable$/;function vdu(e){return Ddu.test(e)}var bdu=new Set(["indexed"]),_5=new Set(["calldata","memory","storage"]),wdu=class extends Pt{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},xdu=class extends Pt{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}},kdu=class extends Pt{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},_du=class extends Pt{constructor({param:e,name:u}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${u}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},Sdu=class extends Pt{constructor({param:e,type:u,modifier:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${t}" not allowed${u?` in "${u}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},Pdu=class extends Pt{constructor({param:e,type:u,modifier:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${t}" not allowed${u?` in "${u}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${t}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},Tdu=class extends Pt{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}},T3=class extends Pt{constructor({signature:e,type:u}){super(`Invalid ${u} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},Odu=class extends Pt{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},Idu=class extends Pt{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}},Ndu=class extends Pt{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}},Rdu=class extends Pt{constructor({current:e,depth:u}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${u>0?"opening":"closing"} parentheses.`],details:`Depth "${u}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}};function zdu(e,u){return u?`${u}:${e}`:e}var J6=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function jdu(e,u={}){if(Cdu(e)){const t=mdu(e);if(!t)throw new T3({signature:e,type:"function"});const n=qt(t.parameters),r=[],i=n.length;for(let s=0;s[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Ldu=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,Udu=/^u?int$/;function qi(e,u){var E,d;const t=zdu(e,u==null?void 0:u.type);if(J6.has(t))return J6.get(t);const n=L_.test(e),r=Ni(n?Ldu:Mdu,e);if(!r)throw new kdu({param:e});if(r.name&&Wdu(r.name))throw new _du({param:e,name:r.name});const i=r.name?{name:r.name}:{},a=r.modifier==="indexed"?{indexed:!0}:{},s=(u==null?void 0:u.structs)??{};let o,l={};if(n){o="tuple";const f=qt(r.type),p=[],h=f.length;for(let g=0;g[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function K_(e,u,t=new Set){const n=[],r=e.length;for(let i=0;iObject.fromEntries(e.filter(u=>u.type==="event").map(u=>{const t=n=>({eventName:u.name,abi:[u],humanReadableAbi:wo([u]),...n});return t.abi=[u],t.eventName=u.name,t.humanReadableAbi=wo([u]),[u.name,t]})),Vdu=({methods:e})=>Object.fromEntries(e.filter(({type:u})=>u==="function").map(u=>{const t=(...n)=>{const r=e.filter(a=>a.name===(u==null?void 0:u.name)),i=n.length>0?{args:n}:{};return{abi:r,humanReadableAbi:wo([u]),functionName:u.name,...i}};return t.abi=[u],t.humanReadableAbi=wo([u]),[u.name,t]})),Jdu=({methods:e})=>Object.fromEntries(e.map(u=>{const t=(...n)=>{const r=e.filter(a=>a.name===(u==null?void 0:u.name)),i=n.length>0?{args:n}:{};return{abi:r,humanReadableAbi:wo([u]),functionName:u.name,...i}};return t.abi=[u],t.humanReadableAbi=wo([u]),[u.name,t]})),Zdu=({humanReadableAbi:e,name:u,bytecode:t})=>{const n=Qdu(e),r=n.filter(i=>i.type==="function");return{bytecode:t,name:u,abi:n,humanReadableAbi:e,events:Kdu({abi:n}),write:Jdu({methods:r}),read:Vdu({methods:r})}};const Ydu={name:"WagmiMintExample",humanReadableAbi:["constructor()","event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId)","event ApprovalForAll(address indexed owner, address indexed operator, bool approved)","event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)","function approve(address to, uint256 tokenId)","function balanceOf(address owner) view returns (uint256)","function getApproved(uint256 tokenId) view returns (address)","function isApprovedForAll(address owner, address operator) view returns (bool)","function mint()","function mint(uint256 tokenId)","function name() view returns (string)","function ownerOf(uint256 tokenId) view returns (address)","function safeTransferFrom(address from, address to, uint256 tokenId)","function safeTransferFrom(address from, address to, uint256 tokenId, bytes data)","function setApprovalForAll(address operator, bool approved)","function supportsInterface(bytes4 interfaceId) view returns (bool)","function symbol() view returns (string)","function tokenURI(uint256 tokenId) pure returns (string)","function totalSupply() view returns (uint256)","function transferFrom(address from, address to, uint256 tokenId)"]},Fn=Zdu(Ydu),Xdu="6.8.1";function u6u(e,u,t){const n=u.split("|").map(i=>i.trim());for(let i=0;iPromise.resolve(e[n])))).reduce((n,r,i)=>(n[u[i]]=r,n),{})}function Ru(e,u,t){for(let n in u){let r=u[n];const i=t?t[n]:null;i&&u6u(r,i,n),Object.defineProperty(e,n,{enumerable:!0,value:r,writable:!1})}}function Rs(e){if(e==null)return"null";if(Array.isArray(e))return"[ "+e.map(Rs).join(", ")+" ]";if(e instanceof Uint8Array){const u="0123456789abcdef";let t="0x";for(let n=0;n>4],t+=u[e[n]&15];return t}if(typeof e=="object"&&typeof e.toJSON=="function")return Rs(e.toJSON());switch(typeof e){case"boolean":case"symbol":return e.toString();case"bigint":return BigInt(e).toString();case"number":return e.toString();case"string":return JSON.stringify(e);case"object":{const u=Object.keys(e);return u.sort(),"{ "+u.map(t=>`${Rs(t)}: ${Rs(e[t])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Dt(e,u){return e&&e.code===u}function em(e){return Dt(e,"CALL_EXCEPTION")}function _0(e,u,t){let n=e;{const i=[];if(t){if("message"in t||"code"in t||"name"in t)throw new Error(`value will overwrite populated values: ${Rs(t)}`);for(const a in t){if(a==="shortMessage")continue;const s=t[a];i.push(a+"="+Rs(s))}}i.push(`code=${u}`),i.push(`version=${Xdu}`),i.length&&(e+=" ("+i.join(", ")+")")}let r;switch(u){case"INVALID_ARGUMENT":r=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":r=new RangeError(e);break;default:r=new Error(e)}return Ru(r,{code:u}),t&&Object.assign(r,t),r.shortMessage==null&&Ru(r,{shortMessage:n}),r}function du(e,u,t,n){if(!e)throw _0(u,t,n)}function V(e,u,t,n){du(e,u,"INVALID_ARGUMENT",{argument:t,value:n})}function V_(e,u,t){t==null&&(t=""),t&&(t=": "+t),du(e>=u,"missing arguemnt"+t,"MISSING_ARGUMENT",{count:e,expectedCount:u}),du(e<=u,"too many arguemnts"+t,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:u})}const e6u=["NFD","NFC","NFKD","NFKC"].reduce((e,u)=>{try{if("test".normalize(u)!=="test")throw new Error("bad");if(u==="NFD"){const t=String.fromCharCode(233).normalize("NFD"),n=String.fromCharCode(101,769);if(t!==n)throw new Error("broken")}e.push(u)}catch{}return e},[]);function t6u(e){du(e6u.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}function Bd(e,u,t){if(t==null&&(t=""),e!==u){let n=t,r="new";t&&(n+=".",r+=" "+t),du(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:r})}}function J_(e,u,t){if(e instanceof Uint8Array)return t?new Uint8Array(e):e;if(typeof e=="string"&&e.match(/^0x([0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((e.length-2)/2);let r=2;for(let i=0;i>4]+GB[r&15]}return t}function R0(e){return"0x"+e.map(u=>Ou(u).substring(2)).join("")}function Ys(e){return h0(e,!0)?(e.length-2)/2:u0(e).length}function A0(e,u,t){const n=u0(e);return t!=null&&t>n.length&&du(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:t}),Ou(n.slice(u??0,t??n.length))}function Z_(e,u,t){const n=u0(e);du(u>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:u,offset:u+1});const r=new Uint8Array(u);return r.fill(0),t?r.set(n,u-n.length):r.set(n,0),Ou(r)}function Ha(e,u){return Z_(e,u,!0)}function r6u(e,u){return Z_(e,u,!1)}const yd=BigInt(0),Ht=BigInt(1),zs=9007199254740991;function i6u(e,u){const t=Fd(e,"value"),n=BigInt(Gu(u,"width"));if(du(t>>n===yd,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),t>>n-Ht){const r=(Ht<=-zs&&e<=zs,"overflow",u||"value",e),BigInt(e);case"string":try{if(e==="")throw new Error("empty string");return e[0]==="-"&&e[1]!=="-"?-BigInt(e.substring(1)):BigInt(e)}catch(t){V(!1,`invalid BigNumberish string: ${t.message}`,u||"value",e)}}V(!1,"invalid BigNumberish value",u||"value",e)}function Fd(e,u){const t=Iu(e,u);return du(t>=yd,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),t}const QB="0123456789abcdef";function tm(e){if(e instanceof Uint8Array){let u="0x0";for(const t of e)u+=QB[t>>4],u+=QB[t&15];return BigInt(u)}return Iu(e)}function Gu(e,u){switch(typeof e){case"bigint":return V(e>=-zs&&e<=zs,"overflow",u||"value",e),Number(e);case"number":return V(Number.isInteger(e),"underflow",u||"value",e),V(e>=-zs&&e<=zs,"overflow",u||"value",e),e;case"string":try{if(e==="")throw new Error("empty string");return Gu(BigInt(e),u)}catch(t){V(!1,`invalid numeric string: ${t.message}`,u||"value",e)}}V(!1,"invalid numeric value",u||"value",e)}function a6u(e){return Gu(tm(e))}function wi(e,u){let n=Fd(e,"value").toString(16);if(u==null)n.length%2&&(n="0"+n);else{const r=Gu(u,"width");for(du(r*2>=n.length,`value exceeds width (${r} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});n.length>6===2;a++)i++;return i}return e==="OVERRUN"?t.length-u-1:0}function d6u(e,u,t,n,r){return e==="OVERLONG"?(V(typeof r=="number","invalid bad code point for replacement","badCodepoint",r),n.push(r),0):(n.push(65533),uS(e,u,t))}const f6u=Object.freeze({error:E6u,ignore:uS,replace:d6u});function p6u(e,u){u==null&&(u=f6u.error);const t=u0(e,"bytes"),n=[];let r=0;for(;r>7)){n.push(i);continue}let a=null,s=null;if((i&224)===192)a=1,s=127;else if((i&240)===224)a=2,s=2047;else if((i&248)===240)a=3,s=65535;else{(i&192)===128?r+=u("UNEXPECTED_CONTINUE",r-1,t,n):r+=u("BAD_PREFIX",r-1,t,n);continue}if(r-1+a>=t.length){r+=u("OVERRUN",r-1,t,n);continue}let o=i&(1<<8-a-1)-1;for(let l=0;l1114111){r+=u("OUT_OF_RANGE",r-1-a,t,n,o);continue}if(o>=55296&&o<=57343){r+=u("UTF16_SURROGATE",r-1-a,t,n,o);continue}if(o<=s){r+=u("OVERLONG",r-1-a,t,n,o);continue}n.push(o)}}return n}function or(e,u){u!=null&&(t6u(u),e=e.normalize(u));let t=[];for(let n=0;n>6|192),t.push(r&63|128);else if((r&64512)==55296){n++;const i=e.charCodeAt(n);V(n>18|240),t.push(a>>12&63|128),t.push(a>>6&63|128),t.push(a&63|128)}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(r&63|128)}return new Uint8Array(t)}function h6u(e){return e.map(u=>u<=65535?String.fromCharCode(u):(u-=65536,String.fromCharCode((u>>10&1023)+55296,(u&1023)+56320))).join("")}function nm(e,u){return h6u(p6u(e,u))}function eS(e){async function u(t,n){const r=t.url.split(":")[0].toLowerCase();du(r==="http"||r==="https",`unsupported protocol ${r}`,"UNSUPPORTED_OPERATION",{info:{protocol:r},operation:"request"}),du(r==="https"||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i;if(n){const E=new AbortController;i=E.signal,n.addListener(()=>{E.abort()})}const a={method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:i},s=await fetch(t.url,a),o={};s.headers.forEach((E,d)=>{o[d.toLowerCase()]=E});const l=await s.arrayBuffer(),c=l==null?null:new Uint8Array(l);return{statusCode:s.status,statusMessage:s.statusText,headers:o,body:c}}return u}const C6u=12,m6u=250;let VB=eS();const A6u=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),g6u=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let Z6=!1;async function tS(e,u){try{const t=e.match(A6u);if(!t)throw new Error("invalid data");return new gi(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?l6u(t[3]):y6u(t[3]))}catch{return new gi(599,"BAD REQUEST (invalid data: URI)",{},null,new Cr(e))}}function nS(e){async function u(t,n){try{const r=t.match(g6u);if(!r)throw new Error("invalid link");return new Cr(`${e}${r[2]}`)}catch{return new gi(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Cr(t))}}return u}const $E={data:tS,ipfs:nS("https://gateway.ipfs.io/ipfs/")},rS=new WeakMap;var ca,Gr;class B6u{constructor(u){q(this,ca,void 0);q(this,Gr,void 0);T(this,ca,[]),T(this,Gr,!1),rS.set(u,()=>{if(!b(this,Gr)){T(this,Gr,!0);for(const t of b(this,ca))setTimeout(()=>{t()},0);T(this,ca,[])}})}addListener(u){du(!b(this,Gr),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),b(this,ca).push(u)}get cancelled(){return b(this,Gr)}checkSignal(){du(!this.cancelled,"cancelled","CANCELLED",{})}}ca=new WeakMap,Gr=new WeakMap;function WE(e){if(e==null)throw new Error("missing signal; should not happen");return e.checkSignal(),e}var m4,A4,jt,Mn,g4,B4,j0,We,Ln,Ea,da,fa,fn,Un,Qr,pa,I3;const j2=class j2{constructor(u){q(this,pa);q(this,m4,void 0);q(this,A4,void 0);q(this,jt,void 0);q(this,Mn,void 0);q(this,g4,void 0);q(this,B4,void 0);q(this,j0,void 0);q(this,We,void 0);q(this,Ln,void 0);q(this,Ea,void 0);q(this,da,void 0);q(this,fa,void 0);q(this,fn,void 0);q(this,Un,void 0);q(this,Qr,void 0);T(this,B4,String(u)),T(this,m4,!1),T(this,A4,!0),T(this,jt,{}),T(this,Mn,""),T(this,g4,3e5),T(this,Un,{slotInterval:m6u,maxAttempts:C6u}),T(this,Qr,null)}get url(){return b(this,B4)}set url(u){T(this,B4,String(u))}get body(){return b(this,j0)==null?null:new Uint8Array(b(this,j0))}set body(u){if(u==null)T(this,j0,void 0),T(this,We,void 0);else if(typeof u=="string")T(this,j0,or(u)),T(this,We,"text/plain");else if(u instanceof Uint8Array)T(this,j0,u),T(this,We,"application/octet-stream");else if(typeof u=="object")T(this,j0,or(JSON.stringify(u))),T(this,We,"application/json");else throw new Error("invalid body")}hasBody(){return b(this,j0)!=null}get method(){return b(this,Mn)?b(this,Mn):this.hasBody()?"POST":"GET"}set method(u){u==null&&(u=""),T(this,Mn,String(u).toUpperCase())}get headers(){const u=Object.assign({},b(this,jt));return b(this,Ln)&&(u.authorization=`Basic ${c6u(or(b(this,Ln)))}`),this.allowGzip&&(u["accept-encoding"]="gzip"),u["content-type"]==null&&b(this,We)&&(u["content-type"]=b(this,We)),this.body&&(u["content-length"]=String(this.body.length)),u}getHeader(u){return this.headers[u.toLowerCase()]}setHeader(u,t){b(this,jt)[String(u).toLowerCase()]=String(t)}clearHeaders(){T(this,jt,{})}[Symbol.iterator](){const u=this.headers,t=Object.keys(u);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",u),T(this,g4,u)}get preflightFunc(){return b(this,Ea)||null}set preflightFunc(u){T(this,Ea,u)}get processFunc(){return b(this,da)||null}set processFunc(u){T(this,da,u)}get retryFunc(){return b(this,fa)||null}set retryFunc(u){T(this,fa,u)}get getUrlFunc(){return b(this,Qr)||VB}set getUrlFunc(u){T(this,Qr,u)}toString(){return``}setThrottleParams(u){u.slotInterval!=null&&(b(this,Un).slotInterval=u.slotInterval),u.maxAttempts!=null&&(b(this,Un).maxAttempts=u.maxAttempts)}send(){return du(b(this,fn)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),T(this,fn,new B6u(this)),cu(this,pa,I3).call(this,0,JB()+this.timeout,0,this,new gi(0,"",{},null,this))}cancel(){du(b(this,fn)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const u=rS.get(this);if(!u)throw new Error("missing signal; should not happen");u()}redirect(u){const t=this.url.split(":")[0].toLowerCase(),n=u.split(":")[0].toLowerCase();du(this.method==="GET"&&(t!=="https"||n!=="http")&&u.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(u)})`});const r=new j2(u);return r.method="GET",r.allowGzip=this.allowGzip,r.timeout=this.timeout,T(r,jt,Object.assign({},b(this,jt))),b(this,j0)&&T(r,j0,new Uint8Array(b(this,j0))),T(r,We,b(this,We)),r}clone(){const u=new j2(this.url);return T(u,Mn,b(this,Mn)),b(this,j0)&&T(u,j0,b(this,j0)),T(u,We,b(this,We)),T(u,jt,Object.assign({},b(this,jt))),T(u,Ln,b(this,Ln)),this.allowGzip&&(u.allowGzip=!0),u.timeout=this.timeout,this.allowInsecureAuthentication&&(u.allowInsecureAuthentication=!0),T(u,Ea,b(this,Ea)),T(u,da,b(this,da)),T(u,fa,b(this,fa)),T(u,Qr,b(this,Qr)),u}static lockConfig(){Z6=!0}static getGateway(u){return $E[u.toLowerCase()]||null}static registerGateway(u,t){if(u=u.toLowerCase(),u==="http"||u==="https")throw new Error(`cannot intercept ${u}; use registerGetUrl`);if(Z6)throw new Error("gateways locked");$E[u]=t}static registerGetUrl(u){if(Z6)throw new Error("gateways locked");VB=u}static createGetUrlFunc(u){return eS()}static createDataGateway(){return tS}static createIpfsGatewayFunc(u){return nS(u)}};m4=new WeakMap,A4=new WeakMap,jt=new WeakMap,Mn=new WeakMap,g4=new WeakMap,B4=new WeakMap,j0=new WeakMap,We=new WeakMap,Ln=new WeakMap,Ea=new WeakMap,da=new WeakMap,fa=new WeakMap,fn=new WeakMap,Un=new WeakMap,Qr=new WeakMap,pa=new WeakSet,I3=async function(u,t,n,r,i){var c,E,d;if(u>=b(this,Un).maxAttempts)return i.makeServerError("exceeded maximum retry limit");du(JB()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:r}),n>0&&await F6u(n);let a=this.clone();const s=(a.url.split(":")[0]||"").toLowerCase();if(s in $E){const f=await $E[s](a.url,WE(b(r,fn)));if(f instanceof gi){let p=f;if(this.processFunc){WE(b(r,fn));try{p=await this.processFunc(a,p)}catch(h){(h.throttle==null||typeof h.stall!="number")&&p.makeServerError("error in post-processing function",h).assertOk()}}return p}a=f}this.preflightFunc&&(a=await this.preflightFunc(a));const o=await this.getUrlFunc(a,WE(b(r,fn)));let l=new gi(o.statusCode,o.statusMessage,o.headers,o.body,r);if(l.statusCode===301||l.statusCode===302){try{const f=l.headers.location||"";return cu(c=a.redirect(f),pa,I3).call(c,u+1,t,0,r,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(a,l,u))){const f=l.headers["retry-after"];let p=b(this,Un).slotInterval*Math.trunc(Math.random()*Math.pow(2,u));return typeof f=="string"&&f.match(/^[1-9][0-9]*$/)&&(p=parseInt(f)),cu(E=a.clone(),pa,I3).call(E,u+1,t,p,r,l)}if(this.processFunc){WE(b(r,fn));try{l=await this.processFunc(a,l)}catch(f){(f.throttle==null||typeof f.stall!="number")&&l.makeServerError("error in post-processing function",f).assertOk();let p=b(this,Un).slotInterval*Math.trunc(Math.random()*Math.pow(2,u));return f.stall>=0&&(p=f.stall),cu(d=a.clone(),pa,I3).call(d,u+1,t,p,r,l)}}return l};let Cr=j2;var Ec,dc,fc,Mt,y4,ha;const hm=class hm{constructor(u,t,n,r,i){q(this,Ec,void 0);q(this,dc,void 0);q(this,fc,void 0);q(this,Mt,void 0);q(this,y4,void 0);q(this,ha,void 0);T(this,Ec,u),T(this,dc,t),T(this,fc,Object.keys(n).reduce((a,s)=>(a[s.toLowerCase()]=String(n[s]),a),{})),T(this,Mt,r==null?null:new Uint8Array(r)),T(this,y4,i||null),T(this,ha,{message:""})}toString(){return``}get statusCode(){return b(this,Ec)}get statusMessage(){return b(this,dc)}get headers(){return Object.assign({},b(this,fc))}get body(){return b(this,Mt)==null?null:new Uint8Array(b(this,Mt))}get bodyText(){try{return b(this,Mt)==null?"":nm(b(this,Mt))}catch{du(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{du(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const u=this.headers,t=Object.keys(u);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",t);const n=new Error(u||"throttling requests");throw Ru(n,{stall:t,throttle:!0}),n}getHeader(u){return this.headers[u.toLowerCase()]}hasBody(){return b(this,Mt)!=null}get request(){return b(this,y4)}ok(){return b(this,ha).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:u,error:t}=b(this,ha);u===""&&(u=`server response ${this.statusCode} ${this.statusMessage}`),du(!1,u,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t})}};Ec=new WeakMap,dc=new WeakMap,fc=new WeakMap,Mt=new WeakMap,y4=new WeakMap,ha=new WeakMap;let gi=hm;function JB(){return new Date().getTime()}function y6u(e){return or(e.replace(/%([0-9a-f][0-9a-f])/gi,(u,t)=>String.fromCharCode(parseInt(t,16))))}function F6u(e){return new Promise(u=>setTimeout(u,e))}function D6u(e){let u=e.toString(16);for(;u.length<2;)u="0"+u;return"0x"+u}function ZB(e,u,t){let n=0;for(let r=0;r{du(n<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:n})};if(e[u]>=248){const n=e[u]-247;t(u+1+n);const r=ZB(e,u+1,n);return t(u+1+n+r),YB(e,u,u+1+n,n+r)}else if(e[u]>=192){const n=e[u]-192;return t(u+1+n),YB(e,u,u+1,n)}else if(e[u]>=184){const n=e[u]-183;t(u+1+n);const r=ZB(e,u+1,n);t(u+1+n+r);const i=Ou(e.slice(u+1+n,u+1+n+r));return{consumed:1+n+r,result:i}}else if(e[u]>=128){const n=e[u]-128;t(u+1+n);const r=Ou(e.slice(u+1,u+1+n));return{consumed:1+n,result:r}}return{consumed:1,result:D6u(e[u])}}function rm(e){const u=u0(e,"data"),t=iS(u,0);return V(t.consumed===u.length,"unexpected junk after rlp payload","data",e),t.result}function XB(e){const u=[];for(;e;)u.unshift(e&255),e>>=8;return u}function aS(e){if(Array.isArray(e)){let n=[];if(e.forEach(function(i){n=n.concat(aS(i))}),n.length<=55)return n.unshift(192+n.length),n;const r=XB(n.length);return r.unshift(247+r.length),r.concat(n)}const u=Array.prototype.slice.call(u0(e,"object"));if(u.length===1&&u[0]<=127)return u;if(u.length<=55)return u.unshift(128+u.length),u;const t=XB(u.length);return t.unshift(183+t.length),t.concat(u)}const uy="0123456789abcdef";function Hl(e){let u="0x";for(const t of aS(e))u+=uy[t>>4],u+=uy[t&15];return u}const he=32,S5=new Uint8Array(he),v6u=["then"],qE={};function B3(e,u){const t=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw t.error=u,t}var Kr;const X3=class X3 extends Array{constructor(...t){const n=t[0];let r=t[1],i=(t[2]||[]).slice(),a=!0;n!==qE&&(r=t,i=[],a=!1);super(r.length);q(this,Kr,void 0);r.forEach((o,l)=>{this[l]=o});const s=i.reduce((o,l)=>(typeof l=="string"&&o.set(l,(o.get(l)||0)+1),o),new Map);if(T(this,Kr,Object.freeze(r.map((o,l)=>{const c=i[l];return c!=null&&s.get(c)===1?c:null}))),!!a)return Object.freeze(this),new Proxy(this,{get:(o,l,c)=>{if(typeof l=="string"){if(l.match(/^[0-9]+$/)){const d=Gu(l,"%index");if(d<0||d>=this.length)throw new RangeError("out of result range");const f=o[d];return f instanceof Error&&B3(`index ${d}`,f),f}if(v6u.indexOf(l)>=0)return Reflect.get(o,l,c);const E=o[l];if(E instanceof Function)return function(...d){return E.apply(this===c?o:this,d)};if(!(l in o))return o.getValue.apply(this===c?o:this,[l])}return Reflect.get(o,l,c)}})}toArray(){const t=[];return this.forEach((n,r)=>{n instanceof Error&&B3(`index ${r}`,n),t.push(n)}),t}toObject(){return b(this,Kr).reduce((t,n,r)=>(du(n!=null,"value at index ${ index } unnamed","UNSUPPORTED_OPERATION",{operation:"toObject()"}),n in t||(t[n]=this.getValue(n)),t),{})}slice(t,n){t==null&&(t=0),t<0&&(t+=this.length,t<0&&(t=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const r=[],i=[];for(let a=t;a{b(this,$n)[u]=ey(t)}}}$n=new WeakMap,Ca=new WeakMap,F4=new WeakSet,m9=function(u){return b(this,$n).push(u),T(this,Ca,b(this,Ca)+u.length),u.length};var qe,Et,M2,sS;const Cm=class Cm{constructor(u,t){q(this,M2);eu(this,"allowLoose");q(this,qe,void 0);q(this,Et,void 0);Ru(this,{allowLoose:!!t}),T(this,qe,Pe(u)),T(this,Et,0)}get data(){return Ou(b(this,qe))}get dataLength(){return b(this,qe).length}get consumed(){return b(this,Et)}get bytes(){return new Uint8Array(b(this,qe))}subReader(u){return new Cm(b(this,qe).slice(b(this,Et)+u),this.allowLoose)}readBytes(u,t){let n=cu(this,M2,sS).call(this,0,u,!!t);return T(this,Et,b(this,Et)+n.length),n.slice(0,u)}readValue(){return tm(this.readBytes(he))}readIndex(){return a6u(this.readBytes(he))}};qe=new WeakMap,Et=new WeakMap,M2=new WeakSet,sS=function(u,t,n){let r=Math.ceil(t/he)*he;return b(this,Et)+r>b(this,qe).length&&(this.allowLoose&&n&&b(this,Et)+t<=b(this,qe).length?r=t:du(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Pe(b(this,qe)),length:b(this,qe).length,offset:b(this,Et)+r})),b(this,qe).slice(b(this,Et),b(this,Et)+r)};let T5=Cm,oS=!1;const lS=function(e){return tb(e)};let cS=lS;function p0(e){const u=u0(e,"data");return Ou(cS(u))}p0._=lS;p0.lock=function(){oS=!0};p0.register=function(e){if(oS)throw new TypeError("keccak256 is locked");cS=e};Object.freeze(p0);const O5="0x0000000000000000000000000000000000000000",ty="0x0000000000000000000000000000000000000000000000000000000000000000",ny=BigInt(0),ry=BigInt(1),iy=BigInt(2),ay=BigInt(27),sy=BigInt(28),HE=BigInt(35),ds={};function oy(e){return Ha(Ve(e),32)}var D4,v4,b4,ma;const It=class It{constructor(u,t,n,r){q(this,D4,void 0);q(this,v4,void 0);q(this,b4,void 0);q(this,ma,void 0);Bd(u,ds,"Signature"),T(this,D4,t),T(this,v4,n),T(this,b4,r),T(this,ma,null)}get r(){return b(this,D4)}set r(u){V(Ys(u)===32,"invalid r","value",u),T(this,D4,Ou(u))}get s(){return b(this,v4)}set s(u){V(Ys(u)===32,"invalid s","value",u);const t=Ou(u);V(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),T(this,v4,t)}get v(){return b(this,b4)}set v(u){const t=Gu(u,"value");V(t===27||t===28,"invalid v","v",u),T(this,b4,t)}get networkV(){return b(this,ma)}get legacyChainId(){const u=this.networkV;return u==null?null:It.getChainId(u)}get yParity(){return this.v===27?0:1}get yParityAndS(){const u=u0(this.s);return this.yParity&&(u[0]|=128),Ou(u)}get compactSerialized(){return R0([this.r,this.yParityAndS])}get serialized(){return R0([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const u=new It(ds,this.r,this.s,this.v);return this.networkV&&T(u,ma,this.networkV),u}toJSON(){const u=this.networkV;return{_type:"signature",networkV:u!=null?u.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(u){const t=Iu(u,"v");return t==ay||t==sy?ny:(V(t>=HE,"invalid EIP-155 v","v",u),(t-HE)/iy)}static getChainIdV(u,t){return Iu(u)*iy+BigInt(35+t-27)}static getNormalizedV(u){const t=Iu(u);return t===ny||t===ay?27:t===ry||t===sy?28:(V(t>=HE,"invalid v","v",u),t&ry?27:28)}static from(u){function t(l,c){V(l,c,"signature",u)}if(u==null)return new It(ds,ty,ty,27);if(typeof u=="string"){const l=u0(u,"signature");if(l.length===64){const c=Ou(l.slice(0,32)),E=l.slice(32,64),d=E[0]&128?28:27;return E[0]&=127,new It(ds,c,Ou(E),d)}if(l.length===65){const c=Ou(l.slice(0,32)),E=l.slice(32,64);t((E[0]&128)===0,"non-canonical s");const d=It.getNormalizedV(l[64]);return new It(ds,c,Ou(E),d)}t(!1,"invalid raw signature length")}if(u instanceof It)return u.clone();const n=u.r;t(n!=null,"missing r");const r=oy(n),i=function(l,c){if(l!=null)return oy(l);if(c!=null){t(h0(c,32),"invalid yParityAndS");const E=u0(c);return E[0]&=127,Ou(E)}t(!1,"missing s")}(u.s,u.yParityAndS);t((u0(i)[0]&128)==0,"non-canonical s");const{networkV:a,v:s}=function(l,c,E){if(l!=null){const d=Iu(l);return{networkV:d>=HE?d:void 0,v:It.getNormalizedV(d)}}if(c!=null)return t(h0(c,32),"invalid yParityAndS"),{v:u0(c)[0]&128?28:27};if(E!=null){switch(Gu(E,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(u.v,u.yParityAndS,u.yParity),o=new It(ds,r,i,s);return a&&T(o,ma,a),t(u.yParity==null||Gu(u.yParity,"sig.yParity")===o.yParity,"yParity mismatch"),t(u.yParityAndS==null||u.yParityAndS===o.yParityAndS,"yParityAndS mismatch"),o}};D4=new WeakMap,v4=new WeakMap,b4=new WeakMap,ma=new WeakMap;let Yt=It;var Wn;const Hi=class Hi{constructor(u){q(this,Wn,void 0);V(Ys(u)===32,"invalid private key","privateKey","[REDACTED]"),T(this,Wn,Ou(u))}get privateKey(){return b(this,Wn)}get publicKey(){return Hi.computePublicKey(b(this,Wn))}get compressedPublicKey(){return Hi.computePublicKey(b(this,Wn),!0)}sign(u){V(Ys(u)===32,"invalid digest length","digest",u);const t=Sr.sign(Pe(u),Pe(b(this,Wn)),{lowS:!0});return Yt.from({r:wi(t.r,32),s:wi(t.s,32),v:t.recovery?28:27})}computeSharedSecret(u){const t=Hi.computePublicKey(u);return Ou(Sr.getSharedSecret(Pe(b(this,Wn)),u0(t),!1))}static computePublicKey(u,t){let n=u0(u,"key");if(n.length===32){const i=Sr.getPublicKey(n,!!t);return Ou(i)}if(n.length===64){const i=new Uint8Array(65);i[0]=4,i.set(n,1),n=i}const r=Sr.ProjectivePoint.fromHex(n);return Ou(r.toRawBytes(t))}static recoverPublicKey(u,t){V(Ys(u)===32,"invalid digest length","digest",u);const n=Yt.from(t);let r=Sr.Signature.fromCompact(Pe(R0([n.r,n.s])));r=r.addRecoveryBit(n.yParity);const i=r.recoverPublicKey(Pe(u));return V(i!=null,"invalid signautre for digest","signature",t),"0x"+i.toHex(!1)}static addPoints(u,t,n){const r=Sr.ProjectivePoint.fromHex(Hi.computePublicKey(u).substring(2)),i=Sr.ProjectivePoint.fromHex(Hi.computePublicKey(t).substring(2));return"0x"+r.add(i).toHex(!!n)}};Wn=new WeakMap;let Gl=Hi;const b6u=BigInt(0),w6u=BigInt(36);function ly(e){e=e.toLowerCase();const u=e.substring(2).split(""),t=new Uint8Array(40);for(let r=0;r<40;r++)t[r]=u[r].charCodeAt(0);const n=u0(p0(t));for(let r=0;r<40;r+=2)n[r>>1]>>4>=8&&(u[r]=u[r].toUpperCase()),(n[r>>1]&15)>=8&&(u[r+1]=u[r+1].toUpperCase());return"0x"+u.join("")}const im={};for(let e=0;e<10;e++)im[String(e)]=String(e);for(let e=0;e<26;e++)im[String.fromCharCode(65+e)]=String(10+e);const cy=15;function x6u(e){e=e.toUpperCase(),e=e.substring(4)+e.substring(0,2)+"00";let u=e.split("").map(n=>im[n]).join("");for(;u.length>=cy;){let n=u.substring(0,cy);u=parseInt(n,10)%97+u.substring(n.length)}let t=String(98-parseInt(u,10)%97);for(;t.length<2;)t="0"+t;return t}const k6u=function(){const e={};for(let u=0;u<36;u++){const t="0123456789abcdefghijklmnopqrstuvwxyz"[u];e[t]=BigInt(u)}return e}();function _6u(e){e=e.toLowerCase();let u=b6u;for(let t=0;tu.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return b(this,Aa)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return b(this,Aa)===!0?-1:b(this,Aa)===!1?this.value.length:null}static from(u,t){return new Rn(Nn,u,t)}static uint8(u){return Du(u,8)}static uint16(u){return Du(u,16)}static uint24(u){return Du(u,24)}static uint32(u){return Du(u,32)}static uint40(u){return Du(u,40)}static uint48(u){return Du(u,48)}static uint56(u){return Du(u,56)}static uint64(u){return Du(u,64)}static uint72(u){return Du(u,72)}static uint80(u){return Du(u,80)}static uint88(u){return Du(u,88)}static uint96(u){return Du(u,96)}static uint104(u){return Du(u,104)}static uint112(u){return Du(u,112)}static uint120(u){return Du(u,120)}static uint128(u){return Du(u,128)}static uint136(u){return Du(u,136)}static uint144(u){return Du(u,144)}static uint152(u){return Du(u,152)}static uint160(u){return Du(u,160)}static uint168(u){return Du(u,168)}static uint176(u){return Du(u,176)}static uint184(u){return Du(u,184)}static uint192(u){return Du(u,192)}static uint200(u){return Du(u,200)}static uint208(u){return Du(u,208)}static uint216(u){return Du(u,216)}static uint224(u){return Du(u,224)}static uint232(u){return Du(u,232)}static uint240(u){return Du(u,240)}static uint248(u){return Du(u,248)}static uint256(u){return Du(u,256)}static uint(u){return Du(u,256)}static int8(u){return Du(u,-8)}static int16(u){return Du(u,-16)}static int24(u){return Du(u,-24)}static int32(u){return Du(u,-32)}static int40(u){return Du(u,-40)}static int48(u){return Du(u,-48)}static int56(u){return Du(u,-56)}static int64(u){return Du(u,-64)}static int72(u){return Du(u,-72)}static int80(u){return Du(u,-80)}static int88(u){return Du(u,-88)}static int96(u){return Du(u,-96)}static int104(u){return Du(u,-104)}static int112(u){return Du(u,-112)}static int120(u){return Du(u,-120)}static int128(u){return Du(u,-128)}static int136(u){return Du(u,-136)}static int144(u){return Du(u,-144)}static int152(u){return Du(u,-152)}static int160(u){return Du(u,-160)}static int168(u){return Du(u,-168)}static int176(u){return Du(u,-176)}static int184(u){return Du(u,-184)}static int192(u){return Du(u,-192)}static int200(u){return Du(u,-200)}static int208(u){return Du(u,-208)}static int216(u){return Du(u,-216)}static int224(u){return Du(u,-224)}static int232(u){return Du(u,-232)}static int240(u){return Du(u,-240)}static int248(u){return Du(u,-248)}static int256(u){return Du(u,-256)}static int(u){return Du(u,-256)}static bytes1(u){return Ju(u,1)}static bytes2(u){return Ju(u,2)}static bytes3(u){return Ju(u,3)}static bytes4(u){return Ju(u,4)}static bytes5(u){return Ju(u,5)}static bytes6(u){return Ju(u,6)}static bytes7(u){return Ju(u,7)}static bytes8(u){return Ju(u,8)}static bytes9(u){return Ju(u,9)}static bytes10(u){return Ju(u,10)}static bytes11(u){return Ju(u,11)}static bytes12(u){return Ju(u,12)}static bytes13(u){return Ju(u,13)}static bytes14(u){return Ju(u,14)}static bytes15(u){return Ju(u,15)}static bytes16(u){return Ju(u,16)}static bytes17(u){return Ju(u,17)}static bytes18(u){return Ju(u,18)}static bytes19(u){return Ju(u,19)}static bytes20(u){return Ju(u,20)}static bytes21(u){return Ju(u,21)}static bytes22(u){return Ju(u,22)}static bytes23(u){return Ju(u,23)}static bytes24(u){return Ju(u,24)}static bytes25(u){return Ju(u,25)}static bytes26(u){return Ju(u,26)}static bytes27(u){return Ju(u,27)}static bytes28(u){return Ju(u,28)}static bytes29(u){return Ju(u,29)}static bytes30(u){return Ju(u,30)}static bytes31(u){return Ju(u,31)}static bytes32(u){return Ju(u,32)}static address(u){return new Rn(Nn,"address",u)}static bool(u){return new Rn(Nn,"bool",!!u)}static bytes(u){return new Rn(Nn,"bytes",u)}static string(u){return new Rn(Nn,"string",u)}static array(u,t){throw new Error("not implemented yet")}static tuple(u,t){throw new Error("not implemented yet")}static overrides(u){return new Rn(Nn,"overrides",Object.assign({},u))}static isTyped(u){return u&&typeof u=="object"&&"_typedSymbol"in u&&u._typedSymbol===Ey}static dereference(u,t){if(Rn.isTyped(u)){if(u.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${u.type}`);return u.value}return u}};Aa=new WeakMap;let le=Rn;class P6u extends vr{constructor(u){super("address","address",u,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(u,t){let n=le.dereference(t,"string");try{n=Yu(n)}catch(r){return this._throwError(r.message,t)}return u.writeValue(n)}decode(u){return Yu(wi(u.readValue(),20))}}class T6u extends vr{constructor(t){super(t.name,t.type,"_",t.dynamic);eu(this,"coder");this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,n){return this.coder.encode(t,n)}decode(t){return this.coder.decode(t)}}function dS(e,u,t){let n=[];if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let o={};n=u.map(l=>{const c=l.localName;return du(c,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:t}),du(!o[c],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:t}),o[c]=!0,t[c]})}else V(!1,"invalid tuple value","tuple",t);V(u.length===n.length,"types/value length mismatch","tuple",t);let r=new P5,i=new P5,a=[];u.forEach((o,l)=>{let c=n[l];if(o.dynamic){let E=i.length;o.encode(i,c);let d=r.writeUpdatableValue();a.push(f=>{d(f+E)})}else o.encode(r,c)}),a.forEach(o=>{o(r.length)});let s=e.appendWriter(r);return s+=e.appendWriter(i),s}function fS(e,u){let t=[],n=[],r=e.subReader(0);return u.forEach(i=>{let a=null;if(i.dynamic){let s=e.readIndex(),o=r.subReader(s);try{a=i.decode(o)}catch(l){if(Dt(l,"BUFFER_OVERRUN"))throw l;a=l,a.baseType=i.name,a.name=i.localName,a.type=i.type}}else try{a=i.decode(e)}catch(s){if(Dt(s,"BUFFER_OVERRUN"))throw s;a=s,a.baseType=i.name,a.name=i.localName,a.type=i.type}if(a==null)throw new Error("investigate");t.push(a),n.push(i.localName||null)}),x2.fromItems(t,n)}class O6u extends vr{constructor(t,n,r){const i=t.type+"["+(n>=0?n:"")+"]",a=n===-1||t.dynamic;super("array",i,r,a);eu(this,"coder");eu(this,"length");Ru(this,{coder:t,length:n})}defaultValue(){const t=this.coder.defaultValue(),n=[];for(let r=0;ra||r<-(a+L6u))&&this._throwError("value out-of-bounds",n),r=Y_(r,8*he)}else(rO3(i,this.size*8))&&this._throwError("value out-of-bounds",n);return t.writeValue(r)}decode(t){let n=O3(t.readValue(),this.size*8);return this.signed&&(n=i6u(n,this.size*8)),n}}class W6u extends pS{constructor(u){super("string",u)}defaultValue(){return""}encode(u,t){return super.encode(u,or(le.dereference(t,"string")))}decode(u){return nm(super.decode(u))}}class GE extends vr{constructor(t,n){let r=!1;const i=[];t.forEach(s=>{s.dynamic&&(r=!0),i.push(s.type)});const a="tuple("+i.join(",")+")";super("tuple",a,n,r);eu(this,"coders");Ru(this,{coders:Object.freeze(t.slice())})}defaultValue(){const t=[];this.coders.forEach(r=>{t.push(r.defaultValue())});const n=this.coders.reduce((r,i)=>{const a=i.localName;return a&&(r[a]||(r[a]=0),r[a]++),r},{});return this.coders.forEach((r,i)=>{let a=r.localName;!a||n[a]!==1||(a==="length"&&(a="_length"),t[a]==null&&(t[a]=t[i]))}),Object.freeze(t)}encode(t,n){const r=le.dereference(n,"tuple");return dS(t,this.coders,r)}decode(t){return fS(t,this.coders)}}function Ga(e){return p0(or(e))}var q6u="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const dy=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),fy=4;function H6u(e){let u=0;function t(){return e[u++]<<8|e[u++]}let n=t(),r=1,i=[0,1];for(let w=1;w>--o&1}const E=31,d=2**E,f=d>>>1,p=f>>1,h=d-1;let g=0;for(let w=0;w1;){let N=v+C>>>1;w>>1|c(),k=k<<1^f,j=(j^f)<<1|f|1;m=k,B=1+j-k}let F=n-4;return A.map(w=>{switch(w-F){case 3:return F+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return F+256+(e[s++]<<8|e[s++]);case 1:return F+e[s++];default:return w-1}})}function G6u(e){let u=0;return()=>e[u++]}function hS(e){return G6u(H6u(Q6u(e)))}function Q6u(e){let u=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((r,i)=>u[r.charCodeAt(0)]=i);let t=e.length,n=new Uint8Array(6*t>>3);for(let r=0,i=0,a=0,s=0;r=8&&(n[i++]=s>>(a-=8));return n}function K6u(e){return e&1?~e>>1:e>>1}function V6u(e,u){let t=Array(e);for(let n=0,r=0;n{let u=Ql(e);if(u.length)return u})}function mS(e){let u=[];for(;;){let t=e();if(t==0)break;u.push(J6u(t,e))}for(;;){let t=e()-1;if(t<0)break;u.push(Z6u(t,e))}return u.flat()}function Kl(e){let u=[];for(;;){let t=e(u.length);if(!t)break;u.push(t)}return u}function AS(e,u,t){let n=Array(e).fill().map(()=>[]);for(let r=0;rn[a].push(i));return n}function J6u(e,u){let t=1+u(),n=u(),r=Kl(u);return AS(r.length,1+e,u).flatMap((a,s)=>{let[o,...l]=a;return Array(r[s]).fill().map((c,E)=>{let d=E*n;return[o+E*t,l.map(f=>f+d)]})})}function Z6u(e,u){let t=1+u();return AS(t,1+e,u).map(r=>[r[0],r.slice(1)])}function Y6u(e){let u=[],t=Ql(e);return r(n([]),[]),u;function n(i){let a=e(),s=Kl(()=>{let o=Ql(e).map(l=>t[l]);if(o.length)return n(o)});return{S:a,B:s,Q:i}}function r({S:i,B:a},s,o){if(!(i&4&&o===s[s.length-1])){i&2&&(o=s[s.length-1]),i&1&&u.push(s);for(let l of a)for(let c of l.Q)r(l,[...s,c],o)}}}function X6u(e){return e.toString(16).toUpperCase().padStart(2,"0")}function gS(e){return`{${X6u(e)}}`}function ufu(e){let u=[];for(let t=0,n=e.length;t>24&255}function FS(e){return e&16777215}let I5,py,N5,A9;function ofu(){let e=hS(tfu);I5=new Map(CS(e).flatMap((u,t)=>u.map(n=>[n,t+1<<24]))),py=new Set(Ql(e)),N5=new Map,A9=new Map;for(let[u,t]of mS(e)){if(!py.has(u)&&t.length==2){let[n,r]=t,i=A9.get(n);i||(i=new Map,A9.set(n,i)),i.set(r,u)}N5.set(u,t.reverse())}}function DS(e){return e>=Vl&&e=k2&&e=_2&&uS2&&u0&&r(S2+l)}else{let a=N5.get(i);a?t.push(...a):r(i)}if(!t.length)break;i=t.pop()}if(n&&u.length>1){let i=N3(u[0]);for(let a=1;a0&&r>=a)a==0?(u.push(n,...t),t.length=0,n=s):t.push(s),r=a;else{let o=lfu(n,s);o>=0?n=o:r==0&&a==0?(u.push(n),n=s):(t.push(s),r=a)}}return n>=0&&u.push(n,...t),u}function bS(e){return vS(e).map(FS)}function Efu(e){return cfu(vS(e))}const hy=45,wS=".",xS=65039,kS=1,Ms=e=>Array.from(e);function Jl(e,u){return e.P.has(u)||e.Q.has(u)}class dfu extends Array{get is_emoji(){return!0}}let R5,_S,Xi,z5,SS,Xs,X6,Bs,PS,Cy,j5;function am(){if(R5)return;let e=hS(q6u);const u=()=>Ql(e),t=()=>new Set(u());R5=new Map(mS(e)),_S=t(),Xi=u(),z5=new Set(u().map(c=>Xi[c])),Xi=new Set(Xi),SS=t(),t();let n=CS(e),r=e();const i=()=>new Set(u().flatMap(c=>n[c]).concat(u()));Xs=Kl(c=>{let E=Kl(e).map(d=>d+96);if(E.length){let d=c>=r;E[0]-=32,E=xo(E),d&&(E=`Restricted[${E}]`);let f=i(),p=i(),h=!e();return{N:E,P:f,Q:p,M:h,R:d}}}),X6=t(),Bs=new Map;let a=u().concat(Ms(X6)).sort((c,E)=>c-E);a.forEach((c,E)=>{let d=e(),f=a[E]=d?a[E-d]:{V:[],M:new Map};f.V.push(c),X6.has(c)||Bs.set(c,f)});for(let{V:c,M:E}of new Set(Bs.values())){let d=[];for(let p of c){let h=Xs.filter(A=>Jl(A,p)),g=d.find(({G:A})=>h.some(m=>A.has(m)));g||(g={G:new Set,V:[]},d.push(g)),g.V.push(p),h.forEach(A=>g.G.add(A))}let f=d.flatMap(p=>Ms(p.G));for(let{G:p,V:h}of d){let g=new Set(f.filter(A=>!p.has(A)));for(let A of h)E.set(A,g)}}let s=new Set,o=new Set;const l=c=>s.has(c)?o.add(c):s.add(c);for(let c of Xs){for(let E of c.P)l(E);for(let E of c.Q)l(E)}for(let c of s)!Bs.has(c)&&!o.has(c)&&Bs.set(c,kS);PS=new Set(Ms(s).concat(Ms(bS(s)))),Cy=Y6u(e).map(c=>dfu.from(c)).sort(efu),j5=new Map;for(let c of Cy){let E=[j5];for(let d of c){let f=E.map(p=>{let h=p.get(d);return h||(h=new Map,p.set(d,h)),h});d===xS?E.push(...f):E=f}for(let d of E)d.V=c}}function sm(e){return(TS(e)?"":`${om(Dd([e]))} `)+gS(e)}function om(e){return`"${e}"‎`}function ffu(e){if(e.length>=4&&e[2]==hy&&e[3]==hy)throw new Error(`invalid label extension: "${xo(e.slice(0,4))}"`)}function pfu(e){for(let t=e.lastIndexOf(95);t>0;)if(e[--t]!==95)throw new Error("underscore allowed only at start")}function hfu(e){let u=e[0],t=dy.get(u);if(t)throw Z3(`leading ${t}`);let n=e.length,r=-1;for(let i=1;i{let i=ufu(r),a={input:i,offset:n};n+=i.length+1;try{let s=a.tokens=Dfu(i,u,t),o=s.length,l;if(!o)throw new Error("empty label");let c=a.output=s.flat();if(pfu(c),!(a.emoji=o>1||s[0].is_emoji)&&c.every(d=>d<128))ffu(c),l="ASCII";else{let d=s.flatMap(f=>f.is_emoji?[]:f);if(!d.length)l="Emoji";else{if(Xi.has(c[0]))throw Z3("leading combining mark");for(let h=1;ha.has(s)):Ms(a),!t.length)return}else n.push(r)}if(t){for(let r of t)if(n.every(i=>Jl(r,i)))throw new Error(`whole-script confusable: ${e.N}/${r.N}`)}}function Bfu(e){let u=Xs;for(let t of e){let n=u.filter(r=>Jl(r,t));if(!n.length)throw Xs.some(r=>Jl(r,t))?IS(u[0],t):OS(t);if(u=n,n.length==1)break}return u}function yfu(e){return e.map(({input:u,error:t,output:n})=>{if(t){let r=t.message;throw new Error(e.length==1?r:`Invalid label ${om(Dd(u))}: ${r}`)}return xo(n)}).join(wS)}function OS(e){return new Error(`disallowed character: ${sm(e)}`)}function IS(e,u){let t=sm(u),n=Xs.find(r=>r.P.has(u));return n&&(t=`${n.N} ${t}`),new Error(`illegal mixture: ${e.N} + ${t}`)}function Z3(e){return new Error(`illegal placement: ${e}`)}function Ffu(e,u){for(let t of u)if(!Jl(e,t))throw IS(e,t);if(e.M){let t=bS(u);for(let n=1,r=t.length;nfy)throw new Error(`excessive non-spacing marks: ${om(Dd(t.slice(n-1,i)))} (${i-n}/${fy})`);n=i}}}function Dfu(e,u,t){let n=[],r=[];for(e=e.slice().reverse();e.length;){let i=bfu(e);if(i)r.length&&(n.push(u(r)),r=[]),n.push(t(i));else{let a=e.pop();if(PS.has(a))r.push(a);else{let s=R5.get(a);if(s)r.push(...s);else if(!_S.has(a))throw OS(a)}}}return r.length&&n.push(u(r)),n}function vfu(e){return e.filter(u=>u!=xS)}function bfu(e,u){let t=j5,n,r=e.length;for(;r&&(t=t.get(e[--r]),!!t);){let{V:i}=t;i&&(n=i,u&&u.push(...e.slice(r).reverse()),e.length=r)}return n}const NS=new Uint8Array(32);NS.fill(0);function my(e){return V(e.length!==0,"invalid ENS name; empty component","comp",e),e}function RS(e){const u=or(wfu(e)),t=[];if(e.length===0)return t;let n=0;for(let r=0;r{if(u.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(u.length+1);return t.set(u,1),t[0]=t.length-1,t})))+"00"}function uf(e,u){return{address:Yu(e),storageKeys:u.map((t,n)=>(V(h0(t,32),"invalid slot",`storageKeys[${n}]`,t),t.toLowerCase()))}}function is(e){if(Array.isArray(e))return e.map((t,n)=>Array.isArray(t)?(V(t.length===2,"invalid slot set",`value[${n}]`,t),uf(t[0],t[1])):(V(t!=null&&typeof t=="object","invalid address-slot set","value",e),uf(t.address,t.storageKeys)));V(e!=null&&typeof e=="object","invalid access list","value",e);const u=Object.keys(e).map(t=>{const n=e[t].reduce((r,i)=>(r[i]=!0,r),{});return uf(t,Object.keys(n).sort())});return u.sort((t,n)=>t.address.localeCompare(n.address)),u}function kfu(e){let u;return typeof e=="string"?u=Gl.computePublicKey(e,!1):u=e.publicKey,Yu(p0("0x"+u.substring(4)).substring(26))}function _fu(e,u){return kfu(Gl.recoverPublicKey(e,u))}const _e=BigInt(0),Sfu=BigInt(2),Pfu=BigInt(27),Tfu=BigInt(28),Ofu=BigInt(35),Ifu=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function lm(e){return e==="0x"?null:Yu(e)}function zS(e,u){try{return is(e)}catch(t){V(!1,t.message,u,e)}}function vd(e,u){return e==="0x"?0:Gu(e,u)}function fe(e,u){if(e==="0x")return _e;const t=Iu(e,u);return V(t<=Ifu,"value exceeds uint size",u,t),t}function H0(e,u){const t=Iu(e,"value"),n=Ve(t);return V(n.length<=32,"value too large",`tx.${u}`,t),n}function jS(e){return is(e).map(u=>[u.address,u.storageKeys])}function Nfu(e){const u=rm(e);V(Array.isArray(u)&&(u.length===9||u.length===6),"invalid field count for legacy transaction","data",e);const t={type:0,nonce:vd(u[0],"nonce"),gasPrice:fe(u[1],"gasPrice"),gasLimit:fe(u[2],"gasLimit"),to:lm(u[3]),value:fe(u[4],"value"),data:Ou(u[5]),chainId:_e};if(u.length===6)return t;const n=fe(u[6],"v"),r=fe(u[7],"r"),i=fe(u[8],"s");if(r===_e&&i===_e)t.chainId=n;else{let a=(n-Ofu)/Sfu;a<_e&&(a=_e),t.chainId=a,V(a!==_e||n===Pfu||n===Tfu,"non-canonical legacy v","v",u[6]),t.signature=Yt.from({r:Ha(u[7],32),s:Ha(u[8],32),v:n}),t.hash=p0(e)}return t}function Ay(e,u){const t=[H0(e.nonce||0,"nonce"),H0(e.gasPrice||0,"gasPrice"),H0(e.gasLimit||0,"gasLimit"),e.to!=null?Yu(e.to):"0x",H0(e.value||0,"value"),e.data||"0x"];let n=_e;if(e.chainId!=_e)n=Iu(e.chainId,"tx.chainId"),V(!u||u.networkV==null||u.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",u);else if(e.signature){const i=e.signature.legacyChainId;i!=null&&(n=i)}if(!u)return n!==_e&&(t.push(Ve(n)),t.push("0x"),t.push("0x")),Hl(t);let r=BigInt(27+u.yParity);return n!==_e?r=Yt.getChainIdV(n,u.v):BigInt(u.v)!==r&&V(!1,"tx.chainId/sig.v mismatch","sig",u),t.push(Ve(r)),t.push(Ve(u.r)),t.push(Ve(u.s)),Hl(t)}function MS(e,u){let t;try{if(t=vd(u[0],"yParity"),t!==0&&t!==1)throw new Error("bad yParity")}catch{V(!1,"invalid yParity","yParity",u[0])}const n=Ha(u[1],32),r=Ha(u[2],32),i=Yt.from({r:n,s:r,yParity:t});e.signature=i}function Rfu(e){const u=rm(u0(e).slice(1));V(Array.isArray(u)&&(u.length===9||u.length===12),"invalid field count for transaction type: 2","data",Ou(e));const t=fe(u[2],"maxPriorityFeePerGas"),n=fe(u[3],"maxFeePerGas"),r={type:2,chainId:fe(u[0],"chainId"),nonce:vd(u[1],"nonce"),maxPriorityFeePerGas:t,maxFeePerGas:n,gasPrice:null,gasLimit:fe(u[4],"gasLimit"),to:lm(u[5]),value:fe(u[6],"value"),data:Ou(u[7]),accessList:zS(u[8],"accessList")};return u.length===9||(r.hash=p0(e),MS(r,u.slice(9))),r}function gy(e,u){const t=[H0(e.chainId||0,"chainId"),H0(e.nonce||0,"nonce"),H0(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),H0(e.maxFeePerGas||0,"maxFeePerGas"),H0(e.gasLimit||0,"gasLimit"),e.to!=null?Yu(e.to):"0x",H0(e.value||0,"value"),e.data||"0x",jS(e.accessList||[])];return u&&(t.push(H0(u.yParity,"yParity")),t.push(Ve(u.r)),t.push(Ve(u.s))),R0(["0x02",Hl(t)])}function zfu(e){const u=rm(u0(e).slice(1));V(Array.isArray(u)&&(u.length===8||u.length===11),"invalid field count for transaction type: 1","data",Ou(e));const t={type:1,chainId:fe(u[0],"chainId"),nonce:vd(u[1],"nonce"),gasPrice:fe(u[2],"gasPrice"),gasLimit:fe(u[3],"gasLimit"),to:lm(u[4]),value:fe(u[5],"value"),data:Ou(u[6]),accessList:zS(u[7],"accessList")};return u.length===8||(t.hash=p0(e),MS(t,u.slice(8))),t}function By(e,u){const t=[H0(e.chainId||0,"chainId"),H0(e.nonce||0,"nonce"),H0(e.gasPrice||0,"gasPrice"),H0(e.gasLimit||0,"gasLimit"),e.to!=null?Yu(e.to):"0x",H0(e.value||0,"value"),e.data||"0x",jS(e.accessList||[])];return u&&(t.push(H0(u.yParity,"recoveryParam")),t.push(Ve(u.r)),t.push(Ve(u.s))),R0(["0x01",Hl(t)])}var qn,w4,x4,k4,_4,S4,P4,T4,O4,I4,N4,R4;const Nr=class Nr{constructor(){q(this,qn,void 0);q(this,w4,void 0);q(this,x4,void 0);q(this,k4,void 0);q(this,_4,void 0);q(this,S4,void 0);q(this,P4,void 0);q(this,T4,void 0);q(this,O4,void 0);q(this,I4,void 0);q(this,N4,void 0);q(this,R4,void 0);T(this,qn,null),T(this,w4,null),T(this,k4,0),T(this,_4,BigInt(0)),T(this,S4,null),T(this,P4,null),T(this,T4,null),T(this,x4,"0x"),T(this,O4,BigInt(0)),T(this,I4,BigInt(0)),T(this,N4,null),T(this,R4,null)}get type(){return b(this,qn)}set type(u){switch(u){case null:T(this,qn,null);break;case 0:case"legacy":T(this,qn,0);break;case 1:case"berlin":case"eip-2930":T(this,qn,1);break;case 2:case"london":case"eip-1559":T(this,qn,2);break;default:V(!1,"unsupported transaction type","type",u)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559"}return null}get to(){return b(this,w4)}set to(u){T(this,w4,u==null?null:Yu(u))}get nonce(){return b(this,k4)}set nonce(u){T(this,k4,Gu(u,"value"))}get gasLimit(){return b(this,_4)}set gasLimit(u){T(this,_4,Iu(u))}get gasPrice(){const u=b(this,S4);return u==null&&(this.type===0||this.type===1)?_e:u}set gasPrice(u){T(this,S4,u==null?null:Iu(u,"gasPrice"))}get maxPriorityFeePerGas(){const u=b(this,P4);return u??(this.type===2?_e:null)}set maxPriorityFeePerGas(u){T(this,P4,u==null?null:Iu(u,"maxPriorityFeePerGas"))}get maxFeePerGas(){const u=b(this,T4);return u??(this.type===2?_e:null)}set maxFeePerGas(u){T(this,T4,u==null?null:Iu(u,"maxFeePerGas"))}get data(){return b(this,x4)}set data(u){T(this,x4,Ou(u))}get value(){return b(this,O4)}set value(u){T(this,O4,Iu(u,"value"))}get chainId(){return b(this,I4)}set chainId(u){T(this,I4,Iu(u))}get signature(){return b(this,N4)||null}set signature(u){T(this,N4,u==null?null:Yt.from(u))}get accessList(){const u=b(this,R4)||null;return u??(this.type===1||this.type===2?[]:null)}set accessList(u){T(this,R4,u==null?null:is(u))}get hash(){return this.signature==null?null:p0(this.serialized)}get unsignedHash(){return p0(this.unsignedSerialized)}get from(){return this.signature==null?null:_fu(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:Gl.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){switch(du(this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"}),this.inferType()){case 0:return Ay(this,this.signature);case 1:return By(this,this.signature);case 2:return gy(this,this.signature)}du(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get unsignedSerialized(){switch(this.inferType()){case 0:return Ay(this);case 1:return By(this);case 2:return gy(this)}du(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".unsignedSerialized"})}inferType(){return this.inferTypes().pop()}inferTypes(){const u=this.gasPrice!=null,t=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null;this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&du(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),du(!t||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),du(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const r=[];return this.type!=null?r.push(this.type):t?r.push(2):u?(r.push(1),n||r.push(0)):n?(r.push(1),r.push(2)):(r.push(0),r.push(1),r.push(2)),r.sort(),r}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}clone(){return Nr.from(this)}toJSON(){const u=t=>t==null?null:t.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:u(this.gasLimit),gasPrice:u(this.gasPrice),maxPriorityFeePerGas:u(this.maxPriorityFeePerGas),maxFeePerGas:u(this.maxFeePerGas),value:u(this.value),chainId:u(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(u){if(u==null)return new Nr;if(typeof u=="string"){const n=u0(u);if(n[0]>=127)return Nr.from(Nfu(n));switch(n[0]){case 1:return Nr.from(zfu(n));case 2:return Nr.from(Rfu(n))}du(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new Nr;return u.type!=null&&(t.type=u.type),u.to!=null&&(t.to=u.to),u.nonce!=null&&(t.nonce=u.nonce),u.gasLimit!=null&&(t.gasLimit=u.gasLimit),u.gasPrice!=null&&(t.gasPrice=u.gasPrice),u.maxPriorityFeePerGas!=null&&(t.maxPriorityFeePerGas=u.maxPriorityFeePerGas),u.maxFeePerGas!=null&&(t.maxFeePerGas=u.maxFeePerGas),u.data!=null&&(t.data=u.data),u.value!=null&&(t.value=u.value),u.chainId!=null&&(t.chainId=u.chainId),u.signature!=null&&(t.signature=Yt.from(u.signature)),u.accessList!=null&&(t.accessList=u.accessList),u.hash!=null&&(V(t.isSigned(),"unsigned transaction cannot define hash","tx",u),V(t.hash===u.hash,"hash mismatch","tx",u)),u.from!=null&&(V(t.isSigned(),"unsigned transaction cannot define from","tx",u),V(t.from.toLowerCase()===(u.from||"").toLowerCase(),"from mismatch","tx",u)),t}};qn=new WeakMap,w4=new WeakMap,x4=new WeakMap,k4=new WeakMap,_4=new WeakMap,S4=new WeakMap,P4=new WeakMap,T4=new WeakMap,O4=new WeakMap,I4=new WeakMap,N4=new WeakMap,R4=new WeakMap;let T2=Nr;const LS=new Uint8Array(32);LS.fill(0);const jfu=BigInt(-1),US=BigInt(0),$S=BigInt(1),Mfu=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Lfu(e){const u=u0(e),t=u.length%32;return t?R0([u,LS.slice(t)]):Ou(u)}const Ufu=wi($S,32),$fu=wi(US,32),yy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},ef=["name","version","chainId","verifyingContract","salt"];function Fy(e){return function(u){return V(typeof u=="string",`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,u),u}}const Wfu={name:Fy("name"),version:Fy("version"),chainId:function(e){const u=Iu(e,"domain.chainId");return V(u>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(u)?Number(u):js(u)},verifyingContract:function(e){try{return Yu(e).toLowerCase()}catch{}V(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const u=u0(e,"domain.salt");return V(u.length===32,'invalid domain value "salt"',"domain.salt",e),Ou(u)}};function tf(e){{const u=e.match(/^(u?)int(\d*)$/);if(u){const t=u[1]==="",n=parseInt(u[2]||"256");V(n%8===0&&n!==0&&n<=256&&(u[2]==null||u[2]===String(n)),"invalid numeric width","type",e);const r=O3(Mfu,t?n-1:n),i=t?(r+$S)*jfu:US;return function(a){const s=Iu(a,"value");return V(s>=i&&s<=r,`value out-of-bounds for ${e}`,"value",s),wi(t?Y_(s,256):s,32)}}}{const u=e.match(/^bytes(\d+)$/);if(u){const t=parseInt(u[1]);return V(t!==0&&t<=32&&u[1]===String(t),"invalid bytes width","type",e),function(n){const r=u0(n);return V(r.length===t,`invalid length for ${e}`,"value",n),Lfu(n)}}}switch(e){case"address":return function(u){return Ha(Yu(u),32)};case"bool":return function(u){return u?Ufu:$fu};case"bytes":return function(u){return p0(u)};case"string":return function(u){return Ga(u)}}return null}function Dy(e,u){return`${e}(${u.map(({name:t,type:n})=>n+" "+t).join(",")})`}var pc,Hn,z4,L2,WS;const it=class it{constructor(u){q(this,L2);eu(this,"primaryType");q(this,pc,void 0);q(this,Hn,void 0);q(this,z4,void 0);T(this,pc,JSON.stringify(u)),T(this,Hn,new Map),T(this,z4,new Map);const t=new Map,n=new Map,r=new Map;Object.keys(u).forEach(s=>{t.set(s,new Set),n.set(s,[]),r.set(s,new Set)});for(const s in u){const o=new Set;for(const l of u[s]){V(!o.has(l.name),`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(s)}`,"types",u),o.add(l.name);const c=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;V(c!==s,`circular type reference to ${JSON.stringify(c)}`,"types",u),!tf(c)&&(V(n.has(c),`unknown type ${JSON.stringify(c)}`,"types",u),n.get(c).push(s),t.get(s).add(c))}}const i=Array.from(n.keys()).filter(s=>n.get(s).length===0);V(i.length!==0,"missing primary type","types",u),V(i.length===1,`ambiguous primary types or unused types: ${i.map(s=>JSON.stringify(s)).join(", ")}`,"types",u),Ru(this,{primaryType:i[0]});function a(s,o){V(!o.has(s),`circular type reference to ${JSON.stringify(s)}`,"types",u),o.add(s);for(const l of t.get(s))if(n.has(l)){a(l,o);for(const c of o)r.get(c).add(l)}o.delete(s)}a(this.primaryType,new Set);for(const[s,o]of r){const l=Array.from(o);l.sort(),b(this,Hn).set(s,Dy(s,u[s])+l.map(c=>Dy(c,u[c])).join(""))}}get types(){return JSON.parse(b(this,pc))}getEncoder(u){let t=b(this,z4).get(u);return t||(t=cu(this,L2,WS).call(this,u),b(this,z4).set(u,t)),t}encodeType(u){const t=b(this,Hn).get(u);return V(t,`unknown type: ${JSON.stringify(u)}`,"name",u),t}encodeData(u,t){return this.getEncoder(u)(t)}hashStruct(u,t){return p0(this.encodeData(u,t))}encode(u){return this.encodeData(this.primaryType,u)}hash(u){return this.hashStruct(this.primaryType,u)}_visit(u,t,n){if(tf(u))return n(u,t);const r=u.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r)return V(!r[3]||parseInt(r[3])===t.length,`array length mismatch; expected length ${parseInt(r[3])}`,"value",t),t.map(a=>this._visit(r[1],a,n));const i=this.types[u];if(i)return i.reduce((a,{name:s,type:o})=>(a[s]=this._visit(o,t[s],n),a),{});V(!1,`unknown type: ${u}`,"type",u)}visit(u,t){return this._visit(this.primaryType,u,t)}static from(u){return new it(u)}static getPrimaryType(u){return it.from(u).primaryType}static hashStruct(u,t,n){return it.from(t).hashStruct(u,n)}static hashDomain(u){const t=[];for(const n in u){if(u[n]==null)continue;const r=yy[n];V(r,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",u),t.push({name:n,type:r})}return t.sort((n,r)=>ef.indexOf(n.name)-ef.indexOf(r.name)),it.hashStruct("EIP712Domain",{EIP712Domain:t},u)}static encode(u,t,n){return R0(["0x1901",it.hashDomain(u),it.from(t).hash(n)])}static hash(u,t,n){return p0(it.encode(u,t,n))}static async resolveNames(u,t,n,r){u=Object.assign({},u);for(const s in u)u[s]==null&&delete u[s];const i={};u.verifyingContract&&!h0(u.verifyingContract,20)&&(i[u.verifyingContract]="0x");const a=it.from(t);a.visit(n,(s,o)=>(s==="address"&&!h0(o,20)&&(i[o]="0x"),o));for(const s in i)i[s]=await r(s);return u.verifyingContract&&i[u.verifyingContract]&&(u.verifyingContract=i[u.verifyingContract]),n=a.visit(n,(s,o)=>s==="address"&&i[o]?i[o]:o),{domain:u,value:n}}static getPayload(u,t,n){it.hashDomain(u);const r={},i=[];ef.forEach(o=>{const l=u[o];l!=null&&(r[o]=Wfu[o](l),i.push({name:o,type:yy[o]}))});const a=it.from(t),s=Object.assign({},t);return V(s.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",t),s.EIP712Domain=i,a.encode(n),{types:s,domain:r,primaryType:a.primaryType,message:a.visit(n,(o,l)=>{if(o.match(/^bytes(\d*)/))return Ou(u0(l));if(o.match(/^u?int/))return Iu(l).toString();switch(o){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return V(typeof l=="string","invalid string","value",l),l}V(!1,"unsupported type","type",o)})}}};pc=new WeakMap,Hn=new WeakMap,z4=new WeakMap,L2=new WeakSet,WS=function(u){{const r=tf(u);if(r)return r}const t=u.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const r=t[1],i=this.getEncoder(r);return a=>{V(!t[3]||parseInt(t[3])===a.length,`array length mismatch; expected length ${parseInt(t[3])}`,"value",a);let s=a.map(i);return b(this,Hn).has(r)&&(s=s.map(p0)),p0(R0(s))}}const n=this.types[u];if(n){const r=Ga(b(this,Hn).get(u));return i=>{const a=n.map(({name:s,type:o})=>{const l=this.getEncoder(o)(i[s]);return b(this,Hn).has(o)?p0(l):l});return a.unshift(r),R0(a)}}V(!1,`unknown type: ${u}`,"type",u)};let O2=it;function me(e){const u=new Set;return e.forEach(t=>u.add(t)),Object.freeze(u)}const qfu="external public payable",Hfu=me(qfu.split(" ")),qS="constant external internal payable private public pure view",Gfu=me(qS.split(" ")),HS="constructor error event fallback function receive struct",GS=me(HS.split(" ")),QS="calldata memory storage payable indexed",Qfu=me(QS.split(" ")),Kfu="tuple returns",Vfu=[HS,QS,Kfu,qS].join(" "),Jfu=me(Vfu.split(" ")),Zfu={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},Yfu=new RegExp("^(\\s*)"),Xfu=new RegExp("^([0-9]+)"),upu=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),KS=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),VS=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var W0,Lt,hc,L5;const U2=class U2{constructor(u){q(this,hc);q(this,W0,void 0);q(this,Lt,void 0);T(this,W0,0),T(this,Lt,u.slice())}get offset(){return b(this,W0)}get length(){return b(this,Lt).length-b(this,W0)}clone(){return new U2(b(this,Lt))}reset(){T(this,W0,0)}popKeyword(u){const t=this.peek();if(t.type!=="KEYWORD"||!u.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(u){if(this.peek().type!==u)throw new Error(`expected ${u}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const u=this.peek();if(u.type!=="OPEN_PAREN")throw new Error("bad start");const t=cu(this,hc,L5).call(this,b(this,W0)+1,u.match+1);return T(this,W0,u.match+1),t}popParams(){const u=this.peek();if(u.type!=="OPEN_PAREN")throw new Error("bad start");const t=[];for(;b(this,W0)=b(this,Lt).length)throw new Error("out-of-bounds");return b(this,Lt)[b(this,W0)]}peekKeyword(u){const t=this.peekType("KEYWORD");return t!=null&&u.has(t)?t:null}peekType(u){if(this.length===0)return null;const t=this.peek();return t.type===u?t.text:null}pop(){const u=this.peek();return br(this,W0)._++,u}toString(){const u=[];for(let t=b(this,W0);t`}};W0=new WeakMap,Lt=new WeakMap,hc=new WeakSet,L5=function(u=0,t=0){return new U2(b(this,Lt).slice(u,t).map(n=>Object.freeze(Object.assign({},n,{match:n.match-u,linkBack:n.linkBack-u,linkNext:n.linkNext-u}))))};let Xt=U2;function Ri(e){const u=[],t=a=>{const s=i0&&u[u.length-1].type==="NUMBER"){const E=u.pop().text;c=E+c,u[u.length-1].value=Gu(E)}if(u.length===0||u[u.length-1].type!=="BRACKET")throw new Error("missing opening bracket");u[u.length-1].text+=c}continue}if(s=a.match(upu),s){if(o.text=s[1],i+=o.text.length,Jfu.has(o.text)){o.type="KEYWORD";continue}if(o.text.match(VS)){o.type="TYPE";continue}o.type="ID";continue}if(s=a.match(Xfu),s){o.text=s[1],o.type="NUMBER",i+=o.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${i}`)}return new Xt(u.map(a=>Object.freeze(a)))}function vy(e,u){let t=[];for(const n in u.keys())e.has(n)&&t.push(n);if(t.length>1)throw new Error(`conflicting types: ${t.join(", ")}`)}function bd(e,u){if(u.peekKeyword(GS)){const t=u.pop().text;if(t!==e)throw new Error(`expected ${e}, got ${t}`)}return u.popType("ID")}function mr(e,u){const t=new Set;for(;;){const n=e.peekType("KEYWORD");if(n==null||u&&!u.has(n))break;if(e.pop(),t.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);t.add(n)}return Object.freeze(t)}function JS(e){let u=mr(e,Gfu);return vy(u,me("constant payable nonpayable".split(" "))),vy(u,me("pure view payable nonpayable".split(" "))),u.has("view")?"view":u.has("pure")?"pure":u.has("payable")?"payable":u.has("nonpayable")?"nonpayable":u.has("constant")?"view":"nonpayable"}function lr(e,u){return e.popParams().map(t=>K0.from(t,u))}function ZS(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return Iu(e.pop().text);throw new Error("invalid gas")}return null}function Qa(e){if(e.length)throw new Error(`unexpected tokens: ${e.toString()}`)}const epu=new RegExp(/^(.*)\[([0-9]*)\]$/);function by(e){const u=e.match(VS);if(V(u,"invalid type","type",e),e==="uint")return"uint256";if(e==="int")return"int256";if(u[2]){const t=parseInt(u[2]);V(t!==0&&t<=32,"invalid bytes length","type",e)}else if(u[3]){const t=parseInt(u[3]);V(t!==0&&t<=256&&t%8===0,"invalid numeric width","type",e)}return e}const f0={},je=Symbol.for("_ethers_internal"),wy="_ParamTypeInternal",xy="_ErrorInternal",ky="_EventInternal",_y="_ConstructorInternal",Sy="_FallbackInternal",Py="_FunctionInternal",Ty="_StructInternal";var j4,g9;const at=class at{constructor(u,t,n,r,i,a,s,o){q(this,j4);eu(this,"name");eu(this,"type");eu(this,"baseType");eu(this,"indexed");eu(this,"components");eu(this,"arrayLength");eu(this,"arrayChildren");if(Bd(u,f0,"ParamType"),Object.defineProperty(this,je,{value:wy}),a&&(a=Object.freeze(a.slice())),r==="array"){if(s==null||o==null)throw new Error("")}else if(s!=null||o!=null)throw new Error("");if(r==="tuple"){if(a==null)throw new Error("")}else if(a!=null)throw new Error("");Ru(this,{name:t,type:n,baseType:r,indexed:i,components:a,arrayLength:s,arrayChildren:o})}format(u){if(u==null&&(u="sighash"),u==="json"){const n=this.name||"";if(this.isArray()){const i=JSON.parse(this.arrayChildren.format("json"));return i.name=n,i.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(i)}const r={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map(i=>JSON.parse(i.format(u)))),JSON.stringify(r)}let t="";return this.isArray()?(t+=this.arrayChildren.format(u),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?(u!=="sighash"&&(t+=this.type),t+="("+this.components.map(n=>n.format(u)).join(u==="full"?", ":",")+")"):t+=this.type,u!=="sighash"&&(this.indexed===!0&&(t+=" indexed"),u==="full"&&this.name&&(t+=" "+this.name)),t}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(u,t){if(this.isArray()){if(!Array.isArray(u))throw new Error("invalid array value");if(this.arrayLength!==-1&&u.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return u.map(r=>n.arrayChildren.walk(r,t))}if(this.isTuple()){if(!Array.isArray(u))throw new Error("invalid tuple value");if(u.length!==this.components.length)throw new Error("array is wrong length");const n=this;return u.map((r,i)=>n.components[i].walk(r,t))}return t(this.type,u)}async walkAsync(u,t){const n=[],r=[u];return cu(this,j4,g9).call(this,n,u,t,i=>{r[0]=i}),n.length&&await Promise.all(n),r[0]}static from(u,t){if(at.isParamType(u))return u;if(typeof u=="string")try{return at.from(Ri(u),t)}catch{V(!1,"invalid param type","obj",u)}else if(u instanceof Xt){let s="",o="",l=null;mr(u,me(["tuple"])).has("tuple")||u.peekType("OPEN_PAREN")?(o="tuple",l=u.popParams().map(h=>at.from(h)),s=`tuple(${l.map(h=>h.format()).join(",")})`):(s=by(u.popType("TYPE")),o=s);let c=null,E=null;for(;u.length&&u.peekType("BRACKET");){const h=u.pop();c=new at(f0,"",s,o,null,l,E,c),E=h.value,s+=h.text,o="array",l=null}let d=null;if(mr(u,Qfu).has("indexed")){if(!t)throw new Error("");d=!0}const p=u.peekType("ID")?u.pop().text:"";if(u.length)throw new Error("leftover tokens");return new at(f0,p,s,o,d,l,E,c)}const n=u.name;V(!n||typeof n=="string"&&n.match(KS),"invalid name","obj.name",n);let r=u.indexed;r!=null&&(V(t,"parameter cannot be indexed","obj.indexed",u.indexed),r=!!r);let i=u.type,a=i.match(epu);if(a){const s=parseInt(a[2]||"-1"),o=at.from({type:a[1],components:u.components});return new at(f0,n||"",i,"array",r,null,s,o)}if(i==="tuple"||i.startsWith("tuple(")||i.startsWith("(")){const s=u.components!=null?u.components.map(l=>at.from(l)):null;return new at(f0,n||"",i,"tuple",r,s,null,null)}return i=by(u.type),new at(f0,n||"",i,i,r,null,null,null)}static isParamType(u){return u&&u[je]===wy}};j4=new WeakSet,g9=function(u,t,n,r){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");const a=this.arrayChildren,s=t.slice();s.forEach((o,l)=>{var c;cu(c=a,j4,g9).call(c,u,o,n,E=>{s[l]=E})}),r(s);return}if(this.isTuple()){const a=this.components;let s;if(Array.isArray(t))s=t.slice();else{if(t==null||typeof t!="object")throw new Error("invalid tuple value");s=a.map(o=>{if(!o.name)throw new Error("cannot use object value with unnamed components");if(!(o.name in t))throw new Error(`missing value for component ${o.name}`);return t[o.name]})}if(s.length!==this.components.length)throw new Error("array is wrong length");s.forEach((o,l)=>{var c;cu(c=a[l],j4,g9).call(c,u,o,n,E=>{s[l]=E})}),r(s);return}const i=n(this.type,t);i.then?u.push(async function(){r(await i)}()):r(i)};let K0=at;class Ka{constructor(u,t,n){eu(this,"type");eu(this,"inputs");Bd(u,f0,"Fragment"),n=Object.freeze(n.slice()),Ru(this,{type:t,inputs:n})}static from(u){if(typeof u=="string"){try{Ka.from(JSON.parse(u))}catch{}return Ka.from(Ri(u))}if(u instanceof Xt)switch(u.peekKeyword(GS)){case"constructor":return rr.from(u);case"error":return Se.from(u);case"event":return Dn.from(u);case"fallback":case"receive":return jn.from(u);case"function":return vn.from(u);case"struct":return Ra.from(u)}else if(typeof u=="object"){switch(u.type){case"constructor":return rr.from(u);case"error":return Se.from(u);case"event":return Dn.from(u);case"fallback":case"receive":return jn.from(u);case"function":return vn.from(u);case"struct":return Ra.from(u)}du(!1,`unsupported type: ${u.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}V(!1,"unsupported frgament object","obj",u)}static isConstructor(u){return rr.isFragment(u)}static isError(u){return Se.isFragment(u)}static isEvent(u){return Dn.isFragment(u)}static isFunction(u){return vn.isFragment(u)}static isStruct(u){return Ra.isFragment(u)}}class wd extends Ka{constructor(t,n,r,i){super(t,n,i);eu(this,"name");V(typeof r=="string"&&r.match(KS),"invalid identifier","name",r),i=Object.freeze(i.slice()),Ru(this,{name:r})}}function Zl(e,u){return"("+u.map(t=>t.format(e)).join(e==="full"?", ":",")+")"}class Se extends wd{constructor(u,t,n){super(u,"error",t,n),Object.defineProperty(this,je,{value:xy})}get selector(){return Ga(this.format("sighash")).substring(0,10)}format(u){if(u==null&&(u="sighash"),u==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(u)))});const t=[];return u!=="sighash"&&t.push("error"),t.push(this.name+Zl(u,this.inputs)),t.join(" ")}static from(u){if(Se.isFragment(u))return u;if(typeof u=="string")return Se.from(Ri(u));if(u instanceof Xt){const t=bd("error",u),n=lr(u);return Qa(u),new Se(f0,t,n)}return new Se(f0,u.name,u.inputs?u.inputs.map(K0.from):[])}static isFragment(u){return u&&u[je]===xy}}class Dn extends wd{constructor(t,n,r,i){super(t,"event",n,r);eu(this,"anonymous");Object.defineProperty(this,je,{value:ky}),Ru(this,{anonymous:i})}get topicHash(){return Ga(this.format("sighash"))}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const n=[];return t!=="sighash"&&n.push("event"),n.push(this.name+Zl(t,this.inputs)),t!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(t,n){return n=(n||[]).map(i=>K0.from(i)),new Dn(f0,t,n,!1).topicHash}static from(t){if(Dn.isFragment(t))return t;if(typeof t=="string")try{return Dn.from(Ri(t))}catch{V(!1,"invalid event fragment","obj",t)}else if(t instanceof Xt){const n=bd("event",t),r=lr(t,!0),i=!!mr(t,me(["anonymous"])).has("anonymous");return Qa(t),new Dn(f0,n,r,i)}return new Dn(f0,t.name,t.inputs?t.inputs.map(n=>K0.from(n,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[je]===ky}}class rr extends Ka{constructor(t,n,r,i,a){super(t,n,r);eu(this,"payable");eu(this,"gas");Object.defineProperty(this,je,{value:_y}),Ru(this,{payable:i,gas:a})}format(t){if(du(t!=null&&t!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),t==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const n=[`constructor${Zl(t,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(t){if(rr.isFragment(t))return t;if(typeof t=="string")try{return rr.from(Ri(t))}catch{V(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof Xt){mr(t,me(["constructor"]));const n=lr(t),r=!!mr(t,Hfu).has("payable"),i=ZS(t);return Qa(t),new rr(f0,"constructor",n,r,i)}return new rr(f0,"constructor",t.inputs?t.inputs.map(K0.from):[],!!t.payable,t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[je]===_y}}class jn extends Ka{constructor(t,n,r){super(t,"fallback",n);eu(this,"payable");Object.defineProperty(this,je,{value:Sy}),Ru(this,{payable:r})}format(t){const n=this.inputs.length===0?"receive":"fallback";if(t==="json"){const r=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:r})}return`${n}()${this.payable?" payable":""}`}static from(t){if(jn.isFragment(t))return t;if(typeof t=="string")try{return jn.from(Ri(t))}catch{V(!1,"invalid fallback fragment","obj",t)}else if(t instanceof Xt){const n=t.toString(),r=t.peekKeyword(me(["fallback","receive"]));if(V(r,"type must be fallback or receive","obj",n),t.popKeyword(me(["fallback","receive"]))==="receive"){const o=lr(t);return V(o.length===0,"receive cannot have arguments","obj.inputs",o),mr(t,me(["payable"])),Qa(t),new jn(f0,[],!0)}let a=lr(t);a.length?V(a.length===1&&a[0].type==="bytes","invalid fallback inputs","obj.inputs",a.map(o=>o.format("minimal")).join(", ")):a=[K0.from("bytes")];const s=JS(t);if(V(s==="nonpayable"||s==="payable","fallback cannot be constants","obj.stateMutability",s),mr(t,me(["returns"])).has("returns")){const o=lr(t);V(o.length===1&&o[0].type==="bytes","invalid fallback outputs","obj.outputs",o.map(l=>l.format("minimal")).join(", "))}return Qa(t),new jn(f0,a,s==="payable")}if(t.type==="receive")return new jn(f0,[],!0);if(t.type==="fallback"){const n=[K0.from("bytes")],r=t.stateMutability==="payable";return new jn(f0,n,r)}V(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[je]===Sy}}class vn extends wd{constructor(t,n,r,i,a,s){super(t,"function",n,i);eu(this,"constant");eu(this,"outputs");eu(this,"stateMutability");eu(this,"payable");eu(this,"gas");Object.defineProperty(this,je,{value:Py}),a=Object.freeze(a.slice()),Ru(this,{constant:r==="view"||r==="pure",gas:s,outputs:a,payable:r==="payable",stateMutability:r})}get selector(){return Ga(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(r=>JSON.parse(r.format(t))),outputs:this.outputs.map(r=>JSON.parse(r.format(t)))});const n=[];return t!=="sighash"&&n.push("function"),n.push(this.name+Zl(t,this.inputs)),t!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(Zl(t,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(t,n){return n=(n||[]).map(i=>K0.from(i)),new vn(f0,t,"view",n,[],null).selector}static from(t){if(vn.isFragment(t))return t;if(typeof t=="string")try{return vn.from(Ri(t))}catch{V(!1,"invalid function fragment","obj",t)}else if(t instanceof Xt){const r=bd("function",t),i=lr(t),a=JS(t);let s=[];mr(t,me(["returns"])).has("returns")&&(s=lr(t));const o=ZS(t);return Qa(t),new vn(f0,r,a,i,s,o)}let n=t.stateMutability;return n==null&&(n="payable",typeof t.constant=="boolean"?(n="view",t.constant||(n="payable",typeof t.payable=="boolean"&&!t.payable&&(n="nonpayable"))):typeof t.payable=="boolean"&&!t.payable&&(n="nonpayable")),new vn(f0,t.name,n,t.inputs?t.inputs.map(K0.from):[],t.outputs?t.outputs.map(K0.from):[],t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[je]===Py}}class Ra extends wd{constructor(u,t,n){super(u,"struct",t,n),Object.defineProperty(this,je,{value:Ty})}format(){throw new Error("@TODO")}static from(u){if(typeof u=="string")try{return Ra.from(Ri(u))}catch{V(!1,"invalid struct fragment","obj",u)}else if(u instanceof Xt){const t=bd("struct",u),n=lr(u);return Qa(u),new Ra(f0,t,n)}return new Ra(f0,u.name,u.inputs?u.inputs.map(K0.from):[])}static isFragment(u){return u&&u[je]===Ty}}const en=new Map;en.set(0,"GENERIC_PANIC");en.set(1,"ASSERT_FALSE");en.set(17,"OVERFLOW");en.set(18,"DIVIDE_BY_ZERO");en.set(33,"ENUM_RANGE_ERROR");en.set(34,"BAD_STORAGE_DATA");en.set(49,"STACK_UNDERFLOW");en.set(50,"ARRAY_RANGE_ERROR");en.set(65,"OUT_OF_MEMORY");en.set(81,"UNINITIALIZED_FUNCTION_CALL");const tpu=new RegExp(/^bytes([0-9]*)$/),npu=new RegExp(/^(u?int)([0-9]*)$/);let nf=null;function rpu(e,u,t,n){let r="missing revert data",i=null;const a=null;let s=null;if(t){r="execution reverted";const l=u0(t);if(t=Ou(t),l.length===0)r+=" (no data present; likely require(false) occurred",i="require(false)";else if(l.length%32!==4)r+=" (could not decode reason; invalid data length)";else if(Ou(l.slice(0,4))==="0x08c379a0")try{i=n.decode(["string"],l.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[i]},r+=`: ${JSON.stringify(i)}`}catch{r+=" (could not decode reason; invalid string data)"}else if(Ou(l.slice(0,4))==="0x4e487b71")try{const c=Number(n.decode(["uint256"],l.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[c]},i=`Panic due to ${en.get(c)||"UNKNOWN"}(${c})`,r+=`: ${i}`}catch{r+=" (could not decode panic code)"}else r+=" (unknown custom error)"}const o={to:u.to?Yu(u.to):null,data:u.data||"0x"};return u.from&&(o.from=Yu(u.from)),_0(r,"CALL_EXCEPTION",{action:e,data:t,reason:i,transaction:o,invocation:a,revert:s})}var Vr,ys;const $2=class $2{constructor(){q(this,Vr)}getDefaultValue(u){const t=u.map(r=>cu(this,Vr,ys).call(this,K0.from(r)));return new GE(t,"_").defaultValue()}encode(u,t){V_(t.length,u.length,"types/values length mismatch");const n=u.map(a=>cu(this,Vr,ys).call(this,K0.from(a))),r=new GE(n,"_"),i=new P5;return r.encode(i,t),i.data}decode(u,t,n){const r=u.map(a=>cu(this,Vr,ys).call(this,K0.from(a)));return new GE(r,"_").decode(new T5(t,n))}static defaultAbiCoder(){return nf==null&&(nf=new $2),nf}static getBuiltinCallException(u,t,n){return rpu(u,t,n,$2.defaultAbiCoder())}};Vr=new WeakSet,ys=function(u){if(u.isArray())return new O6u(cu(this,Vr,ys).call(this,u.arrayChildren),u.arrayLength,u.name);if(u.isTuple())return new GE(u.components.map(n=>cu(this,Vr,ys).call(this,n)),u.name);switch(u.baseType){case"address":return new P6u(u.name);case"bool":return new I6u(u.name);case"string":return new W6u(u.name);case"bytes":return new N6u(u.name);case"":return new j6u(u.name)}let t=u.type.match(npu);if(t){let n=parseInt(t[2]||"256");return V(n!==0&&n<=256&&n%8===0,"invalid "+t[1]+" bit length","param",u),new $6u(n/8,t[1]==="int",u.name)}if(t=u.type.match(tpu),t){let n=parseInt(t[1]);return V(n!==0&&n<=32,"invalid bytes length","param",u),new R6u(n,u.name)}V(!1,"invalid type","type",u.type)};let Yl=$2;class ipu{constructor(u,t,n){eu(this,"fragment");eu(this,"name");eu(this,"signature");eu(this,"topic");eu(this,"args");const r=u.name,i=u.format();Ru(this,{fragment:u,name:r,signature:i,topic:t,args:n})}}class apu{constructor(u,t,n,r){eu(this,"fragment");eu(this,"name");eu(this,"args");eu(this,"signature");eu(this,"selector");eu(this,"value");const i=u.name,a=u.format();Ru(this,{fragment:u,name:i,args:n,signature:a,selector:t,value:r})}}class spu{constructor(u,t,n){eu(this,"fragment");eu(this,"name");eu(this,"args");eu(this,"signature");eu(this,"selector");const r=u.name,i=u.format();Ru(this,{fragment:u,name:r,args:n,signature:i,selector:t})}}class Oy{constructor(u){eu(this,"hash");eu(this,"_isIndexed");Ru(this,{hash:u,_isIndexed:!0})}static isIndexed(u){return!!(u&&u._isIndexed)}}const Iy={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},Ny={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let u="unknown panic code";return e>=0&&e<=255&&Iy[e.toString()]&&(u=Iy[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${u})`}}};var pn,hn,Cn,te,M4,B9,L4,y9;const Ls=class Ls{constructor(u){q(this,M4);q(this,L4);eu(this,"fragments");eu(this,"deploy");eu(this,"fallback");eu(this,"receive");q(this,pn,void 0);q(this,hn,void 0);q(this,Cn,void 0);q(this,te,void 0);let t=[];typeof u=="string"?t=JSON.parse(u):t=u,T(this,Cn,new Map),T(this,pn,new Map),T(this,hn,new Map);const n=[];for(const a of t)try{n.push(Ka.from(a))}catch(s){console.log("EE",s)}Ru(this,{fragments:Object.freeze(n)});let r=null,i=!1;T(this,te,this.getAbiCoder()),this.fragments.forEach((a,s)=>{let o;switch(a.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}Ru(this,{deploy:a});return;case"fallback":a.inputs.length===0?i=!0:(V(!r||a.payable!==r.payable,"conflicting fallback fragments",`fragments[${s}]`,a),r=a,i=r.payable);return;case"function":o=b(this,Cn);break;case"event":o=b(this,hn);break;case"error":o=b(this,pn);break;default:return}const l=a.format();o.has(l)||o.set(l,a)}),this.deploy||Ru(this,{deploy:rr.from("constructor()")}),Ru(this,{fallback:r,receive:i})}format(u){const t=u?"minimal":"full";return this.fragments.map(r=>r.format(t))}formatJson(){const u=this.fragments.map(t=>t.format("json"));return JSON.stringify(u.map(t=>JSON.parse(t)))}getAbiCoder(){return Yl.defaultAbiCoder()}getFunctionName(u){const t=cu(this,M4,B9).call(this,u,null,!1);return V(t,"no matching function","key",u),t.name}hasFunction(u){return!!cu(this,M4,B9).call(this,u,null,!1)}getFunction(u,t){return cu(this,M4,B9).call(this,u,t||null,!0)}forEachFunction(u){const t=Array.from(b(this,Cn).keys());t.sort((n,r)=>n.localeCompare(r));for(let n=0;nn.localeCompare(r));for(let n=0;n1){const i=r.map(a=>JSON.stringify(a.format())).join(", ");V(!1,`ambiguous error description (i.e. ${i})`,"name",u)}return r[0]}if(u=Se.from(u).format(),u==="Error(string)")return Se.from("error Error(string)");if(u==="Panic(uint256)")return Se.from("error Panic(uint256)");const n=b(this,pn).get(u);return n||null}forEachError(u){const t=Array.from(b(this,pn).keys());t.sort((n,r)=>n.localeCompare(r));for(let n=0;ni.type==="string"?Ga(a):i.type==="bytes"?p0(Ou(a)):(i.type==="bool"&&typeof a=="boolean"?a=a?"0x01":"0x00":i.type.match(/^u?int/)?a=wi(a):i.type.match(/^bytes/)?a=r6u(a,32):i.type==="address"&&b(this,te).encode(["address"],[a]),Ha(Ou(a),32));for(t.forEach((i,a)=>{const s=u.inputs[a];if(!s.indexed){V(i==null,"cannot filter non-indexed parameters; must be null","contract."+s.name,i);return}i==null?n.push(null):s.baseType==="array"||s.baseType==="tuple"?V(!1,"filtering with tuples or arrays not supported","contract."+s.name,i):Array.isArray(i)?n.push(i.map(o=>r(s,o))):n.push(r(s,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(u,t){if(typeof u=="string"){const a=this.getEvent(u);V(a,"unknown event","eventFragment",u),u=a}const n=[],r=[],i=[];return u.anonymous||n.push(u.topicHash),V(t.length===u.inputs.length,"event arguments/values mismatch","values",t),u.inputs.forEach((a,s)=>{const o=t[s];if(a.indexed)if(a.type==="string")n.push(Ga(o));else if(a.type==="bytes")n.push(p0(o));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");n.push(b(this,te).encode([a.type],[o]))}else r.push(a),i.push(o)}),{data:b(this,te).encode(r,i),topics:n}}decodeEventLog(u,t,n){if(typeof u=="string"){const f=this.getEvent(u);V(f,"unknown event","eventFragment",u),u=f}if(n!=null&&!u.anonymous){const f=u.topicHash;V(h0(n[0],32)&&n[0].toLowerCase()===f,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const r=[],i=[],a=[];u.inputs.forEach((f,p)=>{f.indexed?f.type==="string"||f.type==="bytes"||f.baseType==="tuple"||f.baseType==="array"?(r.push(K0.from({type:"bytes32",name:f.name})),a.push(!0)):(r.push(f),a.push(!1)):(i.push(f),a.push(!1))});const s=n!=null?b(this,te).decode(r,R0(n)):null,o=b(this,te).decode(i,t,!0),l=[],c=[];let E=0,d=0;return u.inputs.forEach((f,p)=>{let h=null;if(f.indexed)if(s==null)h=new Oy(null);else if(a[p])h=new Oy(s[d++]);else try{h=s[d++]}catch(g){h=g}else try{h=o[E++]}catch(g){h=g}l.push(h),c.push(f.name||null)}),x2.fromItems(l,c)}parseTransaction(u){const t=u0(u.data,"tx.data"),n=Iu(u.value!=null?u.value:0,"tx.value"),r=this.getFunction(Ou(t.slice(0,4)));if(!r)return null;const i=b(this,te).decode(r.inputs,t.slice(4));return new apu(r,r.selector,i,n)}parseCallResult(u){throw new Error("@TODO")}parseLog(u){const t=this.getEvent(u.topics[0]);return!t||t.anonymous?null:new ipu(t,t.topicHash,this.decodeEventLog(t,u.data,u.topics))}parseError(u){const t=Ou(u),n=this.getError(A0(t,0,4));if(!n)return null;const r=b(this,te).decode(n.inputs,A0(t,4));return new spu(n,n.selector,r)}static from(u){return u instanceof Ls?u:typeof u=="string"?new Ls(JSON.parse(u)):typeof u.format=="function"?new Ls(u.format("json")):new Ls(u)}};pn=new WeakMap,hn=new WeakMap,Cn=new WeakMap,te=new WeakMap,M4=new WeakSet,B9=function(u,t,n){if(h0(u)){const i=u.toLowerCase();for(const a of b(this,Cn).values())if(i===a.selector)return a;return null}if(u.indexOf("(")===-1){const i=[];for(const[a,s]of b(this,Cn))a.split("(")[0]===u&&i.push(s);if(t){const a=t.length>0?t[t.length-1]:null;let s=t.length,o=!0;le.isTyped(a)&&a.type==="overrides"&&(o=!1,s--);for(let l=i.length-1;l>=0;l--){const c=i[l].inputs.length;c!==s&&(!o||c!==s-1)&&i.splice(l,1)}for(let l=i.length-1;l>=0;l--){const c=i[l].inputs;for(let E=0;E=c.length){if(t[E].type==="overrides")continue;i.splice(l,1);break}if(t[E].type!==c[E].baseType){i.splice(l,1);break}}}}if(i.length===1&&t&&t.length!==i[0].inputs.length){const a=t[t.length-1];(a==null||Array.isArray(a)||typeof a!="object")&&i.splice(0,1)}if(i.length===0)return null;if(i.length>1&&n){const a=i.map(s=>JSON.stringify(s.format())).join(", ");V(!1,`ambiguous function description (i.e. matches ${a})`,"key",u)}return i[0]}const r=b(this,Cn).get(vn.from(u).format());return r||null},L4=new WeakSet,y9=function(u,t,n){if(h0(u)){const i=u.toLowerCase();for(const a of b(this,hn).values())if(i===a.topicHash)return a;return null}if(u.indexOf("(")===-1){const i=[];for(const[a,s]of b(this,hn))a.split("(")[0]===u&&i.push(s);if(t){for(let a=i.length-1;a>=0;a--)i[a].inputs.length=0;a--){const s=i[a].inputs;for(let o=0;o1&&n){const a=i.map(s=>JSON.stringify(s.format())).join(", ");V(!1,`ambiguous event description (i.e. matches ${a})`,"key",u)}return i[0]}const r=b(this,hn).get(Dn.from(u).format());return r||null};let U5=Ls;const YS=BigInt(0);function Y3(e){return e??null}function ae(e){return e==null?null:e.toString()}class Ry{constructor(u,t,n){eu(this,"gasPrice");eu(this,"maxFeePerGas");eu(this,"maxPriorityFeePerGas");Ru(this,{gasPrice:Y3(u),maxFeePerGas:Y3(t),maxPriorityFeePerGas:Y3(n)})}toJSON(){const{gasPrice:u,maxFeePerGas:t,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:ae(u),maxFeePerGas:ae(t),maxPriorityFeePerGas:ae(n)}}}function I2(e){const u={};e.to&&(u.to=e.to),e.from&&(u.from=e.from),e.data&&(u.data=Ou(e.data));const t="chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const r of t)!(r in e)||e[r]==null||(u[r]=Iu(e[r],`request.${r}`));const n="type,nonce".split(/,/);for(const r of n)!(r in e)||e[r]==null||(u[r]=Gu(e[r],`request.${r}`));return e.accessList&&(u.accessList=is(e.accessList)),"blockTag"in e&&(u.blockTag=e.blockTag),"enableCcipRead"in e&&(u.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(u.customData=e.customData),u}var Gn;class opu{constructor(u,t){eu(this,"provider");eu(this,"number");eu(this,"hash");eu(this,"timestamp");eu(this,"parentHash");eu(this,"nonce");eu(this,"difficulty");eu(this,"gasLimit");eu(this,"gasUsed");eu(this,"miner");eu(this,"extraData");eu(this,"baseFeePerGas");q(this,Gn,void 0);T(this,Gn,u.transactions.map(n=>typeof n!="string"?new Xl(n,t):n)),Ru(this,{provider:t,hash:Y3(u.hash),number:u.number,timestamp:u.timestamp,parentHash:u.parentHash,nonce:u.nonce,difficulty:u.difficulty,gasLimit:u.gasLimit,gasUsed:u.gasUsed,miner:u.miner,extraData:u.extraData,baseFeePerGas:Y3(u.baseFeePerGas)})}get transactions(){return b(this,Gn).map(u=>typeof u=="string"?u:u.hash)}get prefetchedTransactions(){const u=b(this,Gn).slice();return u.length===0?[]:(du(typeof u[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),u)}toJSON(){const{baseFeePerGas:u,difficulty:t,extraData:n,gasLimit:r,gasUsed:i,hash:a,miner:s,nonce:o,number:l,parentHash:c,timestamp:E,transactions:d}=this;return{_type:"Block",baseFeePerGas:ae(u),difficulty:ae(t),extraData:n,gasLimit:ae(r),gasUsed:ae(i),hash:a,miner:s,nonce:o,number:l,parentHash:c,timestamp:E,transactions:d}}[Symbol.iterator](){let u=0;const t=this.transactions;return{next:()=>unew lE(r,t))));let n=YS;u.effectiveGasPrice!=null?n=u.effectiveGasPrice:u.gasPrice!=null&&(n=u.gasPrice),Ru(this,{provider:t,to:u.to,from:u.from,contractAddress:u.contractAddress,hash:u.hash,index:u.index,blockHash:u.blockHash,blockNumber:u.blockNumber,logsBloom:u.logsBloom,gasUsed:u.gasUsed,cumulativeGasUsed:u.cumulativeGasUsed,gasPrice:n,type:u.type,status:u.status,root:u.root})}get logs(){return b(this,Cc)}toJSON(){const{to:u,from:t,contractAddress:n,hash:r,index:i,blockHash:a,blockNumber:s,logsBloom:o,logs:l,status:c,root:E}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:s,contractAddress:n,cumulativeGasUsed:ae(this.cumulativeGasUsed),from:t,gasPrice:ae(this.gasPrice),gasUsed:ae(this.gasUsed),hash:r,index:i,logs:l,logsBloom:o,root:E,status:c,to:u}}get length(){return this.logs.length}[Symbol.iterator](){let u=0;return{next:()=>u{if(s)return null;const{blockNumber:d,nonce:f}=await de({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(f{if(d==null||d.status!==0)return d;du(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:d.to,from:d.from,data:""},receipt:d})},c=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(c);if(c){if(await c.confirmations()>=n)return l(c)}else if(await o(),n===0)return null;return await new Promise((d,f)=>{const p=[],h=()=>{p.forEach(A=>A())};if(p.push(()=>{s=!0}),r>0){const A=setTimeout(()=>{h(),f(_0("wait for transaction timeout","TIMEOUT"))},r);p.push(()=>{clearTimeout(A)})}const g=async A=>{if(await A.confirmations()>=n){h();try{d(l(A))}catch(m){f(m)}}};if(p.push(()=>{this.provider.off(this.hash,g)}),this.provider.on(this.hash,g),i>=0){const A=async()=>{try{await o()}catch(m){if(Dt(m,"TRANSACTION_REPLACED")){h(),f(m);return}}s||this.provider.once("block",A)};p.push(()=>{this.provider.off("block",A)}),this.provider.once("block",A)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}removedEvent(){return du(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),eP(this)}reorderedEvent(u){return du(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),du(!u||u.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),uP(this,u)}replaceableTransaction(u){V(Number.isInteger(u)&&u>=0,"invalid startBlock","startBlock",u);const t=new mm(this,this.provider);return T(t,Jr,u),t}};Jr=new WeakMap;let Xl=mm;function lpu(e){return{orphan:"drop-block",hash:e.hash,number:e.number}}function uP(e,u){return{orphan:"reorder-transaction",tx:e,other:u}}function eP(e){return{orphan:"drop-transaction",tx:e}}function cpu(e){return{orphan:"drop-log",log:{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,address:e.address,data:e.data,topics:Object.freeze(e.topics.slice()),index:e.index}}}class cm extends lE{constructor(t,n,r){super(t,t.provider);eu(this,"interface");eu(this,"fragment");eu(this,"args");const i=n.decodeEventLog(r,t.data,t.topics);Ru(this,{args:i,fragment:r,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class tP extends lE{constructor(t,n){super(t,t.provider);eu(this,"error");Ru(this,{error:n})}}var U4;class Epu extends XS{constructor(t,n,r){super(r,n);q(this,U4,void 0);T(this,U4,t)}get logs(){return super.logs.map(t=>{const n=t.topics.length?b(this,U4).getEvent(t.topics[0]):null;if(n)try{return new cm(t,b(this,U4),n)}catch(r){return new tP(t,r)}return t})}}U4=new WeakMap;var mc;class Em extends Xl{constructor(t,n,r){super(r,n);q(this,mc,void 0);T(this,mc,t)}async wait(t){const n=await super.wait(t);return n==null?null:new Epu(b(this,mc),this.provider,n)}}mc=new WeakMap;class nP extends X_{constructor(t,n,r,i){super(t,n,r);eu(this,"log");Ru(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class dpu extends nP{constructor(u,t,n,r,i){super(u,t,n,new cm(i,u.interface,r));const a=u.interface.decodeEventLog(r,this.log.data,this.log.topics);Ru(this,{args:a,fragment:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const zy=BigInt(0);function rP(e){return e&&typeof e.call=="function"}function iP(e){return e&&typeof e.estimateGas=="function"}function xd(e){return e&&typeof e.resolveName=="function"}function aP(e){return e&&typeof e.sendTransaction=="function"}function sP(e){if(e!=null){if(xd(e))return e;if(e.provider)return e.provider}}var Ac;class fpu{constructor(u,t,n){q(this,Ac,void 0);eu(this,"fragment");if(Ru(this,{fragment:t}),t.inputs.lengthn[o]==null?null:s.walkAsync(n[o],(c,E)=>c==="address"?Array.isArray(E)?Promise.all(E.map(d=>Ce(d,i))):Ce(E,i):E)));return u.interface.encodeFilterTopics(t,a)}())}getTopicFilter(){return b(this,Ac)}}Ac=new WeakMap;function Va(e,u){return e==null?null:typeof e[u]=="function"?e:e.provider&&typeof e.provider[u]=="function"?e.provider:null}function ua(e){return e==null?null:e.provider||null}async function oP(e,u){const t=le.dereference(e,"overrides");V(typeof t=="object","invalid overrides parameter","overrides",e);const n=I2(t);return V(n.to==null||(u||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),V(n.data==null||(u||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function ppu(e,u,t){const n=Va(e,"resolveName"),r=xd(n)?n:null;return await Promise.all(u.map((i,a)=>i.walkAsync(t[a],(s,o)=>(o=le.dereference(o,s),s==="address"?Ce(o,r):o))))}function hpu(e){const u=async function(a){const s=await oP(a,["data"]);s.to=await e.getAddress(),s.from&&(s.from=await Ce(s.from,sP(e.runner)));const o=e.interface,l=Iu(s.value||zy,"overrides.value")===zy,c=(s.data||"0x")==="0x";o.fallback&&!o.fallback.payable&&o.receive&&!c&&!l&&V(!1,"cannot send data to receive or send value to non-payable fallback","overrides",a),V(o.fallback||c,"cannot send data to receive-only contract","overrides.data",s.data);const E=o.receive||o.fallback&&o.fallback.payable;return V(E||l,"cannot send value to non-payable fallback","overrides.value",s.value),V(o.fallback||c,"cannot send data to receive-only contract","overrides.data",s.data),s},t=async function(a){const s=Va(e.runner,"call");du(rP(s),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const o=await u(a);try{return await s.call(o)}catch(l){throw em(l)&&l.data?e.interface.makeError(l.data,o):l}},n=async function(a){const s=e.runner;du(aP(s),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const o=await s.sendTransaction(await u(a)),l=ua(e.runner);return new Em(e.interface,l,o)},r=async function(a){const s=Va(e.runner,"estimateGas");return du(iP(s),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await s.estimateGas(await u(a))},i=async a=>await n(a);return Ru(i,{_contract:e,estimateGas:r,populateTransaction:u,send:n,staticCall:t}),i}function Cpu(e,u){const t=function(...l){const c=e.interface.getFunction(u,l);return du(c,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:u,args:l}}),c},n=async function(...l){const c=t(...l);let E={};if(c.inputs.length+1===l.length&&(E=await oP(l.pop()),E.from&&(E.from=await Ce(E.from,sP(e.runner)))),c.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const d=await ppu(e.runner,c.inputs,l);return Object.assign({},E,await de({to:e.getAddress(),data:e.interface.encodeFunctionData(c,d)}))},r=async function(...l){const c=await s(...l);return c.length===1?c[0]:c},i=async function(...l){const c=e.runner;du(aP(c),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const E=await c.sendTransaction(await n(...l)),d=ua(e.runner);return new Em(e.interface,d,E)},a=async function(...l){const c=Va(e.runner,"estimateGas");return du(iP(c),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await c.estimateGas(await n(...l))},s=async function(...l){const c=Va(e.runner,"call");du(rP(c),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const E=await n(...l);let d="0x";try{d=await c.call(E)}catch(p){throw em(p)&&p.data?e.interface.makeError(p.data,E):p}const f=t(...l);return e.interface.decodeFunctionResult(f,d)},o=async(...l)=>t(...l).constant?await r(...l):await i(...l);return Ru(o,{name:e.interface.getFunctionName(u),_contract:e,_key:u,getFragment:t,estimateGas:a,populateTransaction:n,send:i,staticCall:r,staticCallResult:s}),Object.defineProperty(o,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=e.interface.getFunction(u);return du(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:u}}),l}}),o}function mpu(e,u){const t=function(...r){const i=e.interface.getEvent(u,r);return du(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:u,args:r}}),i},n=function(...r){return new fpu(e,t(...r),r)};return Ru(n,{name:e.interface.getEventName(u),_contract:e,_key:u,getFragment:t}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getEvent(u);return du(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:u}}),r}}),n}const N2=Symbol.for("_ethersInternal_contract"),lP=new WeakMap;function Apu(e,u){lP.set(e[N2],u)}function Ue(e){return lP.get(e[N2])}function gpu(e){return e&&typeof e=="object"&&"getTopicFilter"in e&&typeof e.getTopicFilter=="function"&&e.fragment}async function dm(e,u){let t,n=null;if(Array.isArray(u)){const i=function(a){if(h0(a,32))return a;const s=e.interface.getEvent(a);return V(s,"unknown fragment","name",a),s.topicHash};t=u.map(a=>a==null?null:Array.isArray(a)?a.map(i):i(a))}else u==="*"?t=[null]:typeof u=="string"?h0(u,32)?t=[u]:(n=e.interface.getEvent(u),V(n,"unknown fragment","event",u),t=[n.topicHash]):gpu(u)?t=await u.getTopicFilter():"fragment"in u?(n=u.fragment,t=[n.topicHash]):V(!1,"unknown event name","event",u);t=t.map(i=>{if(i==null)return null;if(Array.isArray(i)){const a=Array.from(new Set(i.map(s=>s.toLowerCase())).values());return a.length===1?a[0]:(a.sort(),a)}return i.toLowerCase()});const r=t.map(i=>i==null?"null":Array.isArray(i)?i.join("|"):i).join("&");return{fragment:n,tag:r,topics:t}}async function R3(e,u){const{subs:t}=Ue(e);return t.get((await dm(e,u)).tag)||null}async function jy(e,u,t){const n=ua(e.runner);du(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:u});const{fragment:r,tag:i,topics:a}=await dm(e,t),{addr:s,subs:o}=Ue(e);let l=o.get(i);if(!l){const E={address:s||e,topics:a},d=g=>{let A=r;if(A==null)try{A=e.interface.getEvent(g.topics[0])}catch{}if(A){const m=A,B=r?e.interface.decodeEventLog(r,g.data,g.topics):[];W5(e,t,B,F=>new dpu(e,F,t,m,g))}else W5(e,t,[],m=>new nP(e,m,t,g))};let f=[];l={tag:i,listeners:[],start:()=>{f.length||f.push(n.on(E,d))},stop:async()=>{if(f.length==0)return;let g=f;f=[],await Promise.all(g),n.off(E,d)}},o.set(i,l)}return l}let $5=Promise.resolve();async function Bpu(e,u,t,n){await $5;const r=await R3(e,u);if(!r)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:a,once:s})=>{const o=Array.from(t);n&&o.push(n(s?null:a));try{a.call(e,...o)}catch{}return!s}),r.listeners.length===0&&(r.stop(),Ue(e).subs.delete(r.tag)),i>0}async function W5(e,u,t,n){try{await $5}catch{}const r=Bpu(e,u,t,n);return $5=r,await r}const QE=["then"];var g5u;const ul=class ul{constructor(u,t,n,r){eu(this,"target");eu(this,"interface");eu(this,"runner");eu(this,"filters");eu(this,g5u);eu(this,"fallback");V(typeof u=="string"||ES(u),"invalid value for Contract target","target",u),n==null&&(n=null);const i=U5.from(t);Ru(this,{target:u,runner:n,interface:i}),Object.defineProperty(this,N2,{value:{}});let a,s=null,o=null;if(r){const E=ua(n);o=new Em(this.interface,E,r)}let l=new Map;if(typeof u=="string")if(h0(u))s=u,a=Promise.resolve(u);else{const E=Va(n,"resolveName");if(!xd(E))throw _0("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});a=E.resolveName(u).then(d=>{if(d==null)throw _0("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:u});return Ue(this).addr=d,d})}else a=u.getAddress().then(E=>{if(E==null)throw new Error("TODO");return Ue(this).addr=E,E});Apu(this,{addrPromise:a,addr:s,deployTx:o,subs:l});const c=new Proxy({},{get:(E,d,f)=>{if(typeof d=="symbol"||QE.indexOf(d)>=0)return Reflect.get(E,d,f);try{return this.getEvent(d)}catch(p){if(!Dt(p,"INVALID_ARGUMENT")||p.argument!=="key")throw p}},has:(E,d)=>QE.indexOf(d)>=0?Reflect.has(E,d):Reflect.has(E,d)||this.interface.hasEvent(String(d))});return Ru(this,{filters:c}),Ru(this,{fallback:i.receive||i.fallback?hpu(this):null}),new Proxy(this,{get:(E,d,f)=>{if(typeof d=="symbol"||d in E||QE.indexOf(d)>=0)return Reflect.get(E,d,f);try{return E.getFunction(d)}catch(p){if(!Dt(p,"INVALID_ARGUMENT")||p.argument!=="key")throw p}},has:(E,d)=>typeof d=="symbol"||d in E||QE.indexOf(d)>=0?Reflect.has(E,d):E.interface.hasFunction(d)})}connect(u){return new ul(this.target,this.interface,u)}attach(u){return new ul(u,this.interface,this.runner)}async getAddress(){return await Ue(this).addrPromise}async getDeployedCode(){const u=ua(this.runner);du(u,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await u.getCode(await this.getAddress());return t==="0x"?null:t}async waitForDeployment(){const u=this.deploymentTransaction();if(u)return await u.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=ua(this.runner);return du(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((r,i)=>{const a=async()=>{try{if(await this.getDeployedCode()!=null)return r(this);n.once("block",a)}catch(s){i(s)}};a()})}deploymentTransaction(){return Ue(this).deployTx}getFunction(u){return typeof u!="string"&&(u=u.format()),Cpu(this,u)}getEvent(u){return typeof u!="string"&&(u=u.format()),mpu(this,u)}async queryTransaction(u){throw new Error("@TODO")}async queryFilter(u,t,n){t==null&&(t=0),n==null&&(n="latest");const{addr:r,addrPromise:i}=Ue(this),a=r||await i,{fragment:s,topics:o}=await dm(this,u),l={address:a,topics:o,fromBlock:t,toBlock:n},c=ua(this.runner);return du(c,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await c.getLogs(l)).map(E=>{let d=s;if(d==null)try{d=this.interface.getEvent(E.topics[0])}catch{}if(d)try{return new cm(E,this.interface,d)}catch(f){return new tP(E,f)}return new lE(E,c)})}async on(u,t){const n=await jy(this,"on",u);return n.listeners.push({listener:t,once:!1}),n.start(),this}async once(u,t){const n=await jy(this,"once",u);return n.listeners.push({listener:t,once:!0}),n.start(),this}async emit(u,...t){return await W5(this,u,t,null)}async listenerCount(u){if(u){const r=await R3(this,u);return r?r.listeners.length:0}const{subs:t}=Ue(this);let n=0;for(const{listeners:r}of t.values())n+=r.length;return n}async listeners(u){if(u){const r=await R3(this,u);return r?r.listeners.map(({listener:i})=>i):[]}const{subs:t}=Ue(this);let n=[];for(const{listeners:r}of t.values())n=n.concat(r.map(({listener:i})=>i));return n}async off(u,t){const n=await R3(this,u);if(!n)return this;if(t){const r=n.listeners.map(({listener:i})=>i).indexOf(t);r>=0&&n.listeners.splice(r,1)}return(t==null||n.listeners.length===0)&&(n.stop(),Ue(this).subs.delete(n.tag)),this}async removeAllListeners(u){if(u){const t=await R3(this,u);if(!t)return this;t.stop(),Ue(this).subs.delete(t.tag)}else{const{subs:t}=Ue(this);for(const{tag:n,stop:r}of t.values())r(),t.delete(n)}return this}async addListener(u,t){return await this.on(u,t)}async removeListener(u,t){return await this.off(u,t)}static buildClass(u){class t extends ul{constructor(r,i=null){super(r,u,i)}}return t}static from(u,t,n){return n==null&&(n=null),new this(u,t,n)}};g5u=N2;let q5=ul;function ypu(){return q5}let u4=class extends ypu(){};function rf(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):V(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class Fpu{constructor(u){eu(this,"name");Ru(this,{name:u})}connect(u){return this}supportsCoinType(u){return!1}async encodeAddress(u,t){throw new Error("unsupported coin")}async decodeAddress(u,t){throw new Error("unsupported coin")}}const cP=new RegExp("^(ipfs)://(.*)$","i"),My=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),cP,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Zr,ga,Yr,Fs,W2,EP;const Us=class Us{constructor(u,t,n){q(this,Yr);eu(this,"provider");eu(this,"address");eu(this,"name");q(this,Zr,void 0);q(this,ga,void 0);Ru(this,{provider:u,address:t,name:n}),T(this,Zr,null),T(this,ga,new u4(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],u))}async supportsWildcard(){return b(this,Zr)==null&&T(this,Zr,(async()=>{try{return await b(this,ga).supportsInterface("0x9061b923")}catch(u){if(Dt(u,"CALL_EXCEPTION"))return!1;throw T(this,Zr,null),u}})()),await b(this,Zr)}async getAddress(u){if(u==null&&(u=60),u===60)try{const i=await cu(this,Yr,Fs).call(this,"addr(bytes32)");return i==null||i===O5?null:i}catch(i){if(Dt(i,"CALL_EXCEPTION"))return null;throw i}if(u>=0&&u<2147483648){let i=u+2147483648;const a=await cu(this,Yr,Fs).call(this,"addr(bytes32,uint)",[i]);if(h0(a,20))return Yu(a)}let t=null;for(const i of this.provider.plugins)if(i instanceof Fpu&&i.supportsCoinType(u)){t=i;break}if(t==null)return null;const n=await cu(this,Yr,Fs).call(this,"addr(bytes32,uint)",[u]);if(n==null||n==="0x")return null;const r=await t.decodeAddress(u,n);if(r!=null)return r;du(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${u})`,info:{coinType:u,data:n}})}async getText(u){const t=await cu(this,Yr,Fs).call(this,"text(bytes32,string)",[u]);return t==null||t==="0x"?null:t}async getContentHash(){const u=await cu(this,Yr,Fs).call(this,"contenthash(bytes32)");if(u==null||u==="0x")return null;const t=u.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const r=t[1]==="e3010170"?"ipfs":"ipns",i=parseInt(t[4],16);if(t[5].length===i*2)return`${r}://${o6u("0x"+t[2])}`}const n=u.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;du(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:u}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const u=[{type:"name",value:this.name}];try{const t=await this.getText("avatar");if(t==null)return u.push({type:"!avatar",value:""}),{url:null,linkage:u};u.push({type:"avatar",value:t});for(let n=0;n{if(!Array.isArray(u))throw new Error("not an array");return u.map(t=>e(t))}}function cE(e,u){return t=>{const n={};for(const r in e){let i=r;if(u&&r in u&&!(i in t)){for(const a of u[r])if(a in t){i=a;break}}try{const a=e[r](t[i]);a!==void 0&&(n[r]=a)}catch(a){const s=a instanceof Error?a.message:"not-an-error";du(!1,`invalid value for value.${r} (${s})`,"BAD_DATA",{value:t})}}return n}}function Dpu(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}V(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}function _o(e){return V(h0(e,!0),"invalid data","value",e),e}function vt(e){return V(h0(e,32),"invalid hash","value",e),e}const vpu=cE({address:Yu,blockHash:vt,blockNumber:Gu,data:_o,index:Gu,removed:c0(Dpu,!1),topics:fm(vt),transactionHash:vt,transactionIndex:Gu},{index:["logIndex"]});function bpu(e){return vpu(e)}const wpu=cE({hash:c0(vt),parentHash:vt,number:Gu,timestamp:Gu,nonce:c0(_o),difficulty:Iu,gasLimit:Iu,gasUsed:Iu,miner:c0(Yu),extraData:_o,baseFeePerGas:c0(Iu)});function xpu(e){const u=wpu(e);return u.transactions=e.transactions.map(t=>typeof t=="string"?t:dP(t)),u}const kpu=cE({transactionIndex:Gu,blockNumber:Gu,transactionHash:vt,address:Yu,topics:fm(vt),data:_o,index:Gu,blockHash:vt},{index:["logIndex"]});function _pu(e){return kpu(e)}const Spu=cE({to:c0(Yu,null),from:c0(Yu,null),contractAddress:c0(Yu,null),index:Gu,root:c0(Ou),gasUsed:Iu,logsBloom:c0(_o),blockHash:vt,hash:vt,logs:fm(_pu),blockNumber:Gu,cumulativeGasUsed:Iu,effectiveGasPrice:c0(Iu),status:c0(Gu),type:c0(Gu,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function Ppu(e){return Spu(e)}function dP(e){e.to&&Iu(e.to)===Ly&&(e.to="0x0000000000000000000000000000000000000000");const u=cE({hash:vt,type:t=>t==="0x"||t==null?0:Gu(t),accessList:c0(is,null),blockHash:c0(vt,null),blockNumber:c0(Gu,null),transactionIndex:c0(Gu,null),from:Yu,gasPrice:c0(Iu),maxPriorityFeePerGas:c0(Iu),maxFeePerGas:c0(Iu),gasLimit:Iu,to:c0(Yu,null),value:Iu,nonce:Gu,data:_o,creates:c0(Yu,null),chainId:c0(Iu,null)},{data:["input"],gasLimit:["gas"]})(e);if(u.to==null&&u.creates==null&&(u.creates=S6u(u)),(e.type===1||e.type===2)&&e.accessList==null&&(u.accessList=[]),e.signature?u.signature=Yt.from(e.signature):u.signature=Yt.from(e),u.chainId==null){const t=u.signature.legacyChainId;t!=null&&(u.chainId=t)}return u.blockHash&&Iu(u.blockHash)===Ly&&(u.blockHash=null),u}const Tpu="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class EE{constructor(u){eu(this,"name");Ru(this,{name:u})}clone(){return new EE(this.name)}}class kd extends EE{constructor(t,n){t==null&&(t=0);super(`org.ethers.network.plugins.GasCost#${t||0}`);eu(this,"effectiveBlock");eu(this,"txBase");eu(this,"txCreate");eu(this,"txDataZero");eu(this,"txDataNonzero");eu(this,"txAccessListStorageKey");eu(this,"txAccessListAddress");const r={effectiveBlock:t};function i(a,s){let o=(n||{})[a];o==null&&(o=s),V(typeof o=="number",`invalud value for ${a}`,"costs",n),r[a]=o}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),Ru(this,r)}clone(){return new kd(this.effectiveBlock,this)}}class _d extends EE{constructor(t,n){super("org.ethers.plugins.network.Ens");eu(this,"address");eu(this,"targetNetwork");Ru(this,{address:t||Tpu,targetNetwork:n??1})}clone(){return new _d(this.address,this.targetNetwork)}}var gc,Bc;class fP extends EE{constructor(t,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");q(this,gc,void 0);q(this,Bc,void 0);T(this,gc,t),T(this,Bc,n)}get url(){return b(this,gc)}get processFunc(){return b(this,Bc)}clone(){return this}}gc=new WeakMap,Bc=new WeakMap;const af=new Map;var $4,W4,Xr;const $s=class $s{constructor(u,t){q(this,$4,void 0);q(this,W4,void 0);q(this,Xr,void 0);T(this,$4,u),T(this,W4,Iu(t)),T(this,Xr,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return b(this,$4)}set name(u){T(this,$4,u)}get chainId(){return b(this,W4)}set chainId(u){T(this,W4,Iu(u,"chainId"))}matches(u){if(u==null)return!1;if(typeof u=="string"){try{return this.chainId===Iu(u)}catch{}return this.name===u}if(typeof u=="number"||typeof u=="bigint"){try{return this.chainId===Iu(u)}catch{}return!1}if(typeof u=="object"){if(u.chainId!=null){try{return this.chainId===Iu(u.chainId)}catch{}return!1}return u.name!=null?this.name===u.name:!1}return!1}get plugins(){return Array.from(b(this,Xr).values())}attachPlugin(u){if(b(this,Xr).get(u.name))throw new Error(`cannot replace existing plugin: ${u.name} `);return b(this,Xr).set(u.name,u.clone()),this}getPlugin(u){return b(this,Xr).get(u)||null}getPlugins(u){return this.plugins.filter(t=>t.name.split("#")[0]===u)}clone(){const u=new $s(this.name,this.chainId);return this.plugins.forEach(t=>{u.attachPlugin(t.clone())}),u}computeIntrinsicGas(u){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new kd;let n=t.txBase;if(u.to==null&&(n+=t.txCreate),u.data)for(let r=2;r9){let r=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||r++,n[1]=r.toString()}return BigInt(n[0]+n[1])}function $y(e){return new fP(e,async(u,t,n)=>{n.setHeader("User-Agent","ethers");let r;try{const[i,a]=await Promise.all([n.send(),u()]);r=i;const s=r.bodyJson.standard;return{gasPrice:a.gasPrice,maxFeePerGas:Uy(s.maxFee,9),maxPriorityFeePerGas:Uy(s.maxPriorityFee,9)}}catch(i){du(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:r,error:i})}})}function Opu(e){return new fP("data:",async(u,t,n)=>{const r=await u();if(r.maxFeePerGas==null||r.maxPriorityFeePerGas==null)return r;const i=r.maxFeePerGas-r.maxPriorityFeePerGas;return{gasPrice:r.gasPrice,maxFeePerGas:i+e,maxPriorityFeePerGas:e}})}let Wy=!1;function Ipu(){if(Wy)return;Wy=!0;function e(u,t,n){const r=function(){const i=new ir(u,t);return n.ensNetwork!=null&&i.attachPlugin(new _d(null,n.ensNetwork)),i.attachPlugin(new kd),(n.plugins||[]).forEach(a=>{i.attachPlugin(a)}),i};ir.register(u,r),ir.register(t,r),n.altNames&&n.altNames.forEach(i=>{ir.register(i,r)})}e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{ensNetwork:11155111}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("matic",137,{ensNetwork:1,plugins:[$y("https://gasstation.polygon.technology/v2")]}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[$y("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[Opu(BigInt("1000000"))]}),e("optimism-goerli",420,{}),e("xdai",100,{ensNetwork:1})}function H5(e){return JSON.parse(JSON.stringify(e))}var Qn,dt,ui,mn,q4,F9;class Npu{constructor(u){q(this,q4);q(this,Qn,void 0);q(this,dt,void 0);q(this,ui,void 0);q(this,mn,void 0);T(this,Qn,u),T(this,dt,null),T(this,ui,4e3),T(this,mn,-2)}get pollingInterval(){return b(this,ui)}set pollingInterval(u){T(this,ui,u)}start(){b(this,dt)||(T(this,dt,b(this,Qn)._setTimeout(cu(this,q4,F9).bind(this),b(this,ui))),cu(this,q4,F9).call(this))}stop(){b(this,dt)&&(b(this,Qn)._clearTimeout(b(this,dt)),T(this,dt,null))}pause(u){this.stop(),u&&T(this,mn,-2)}resume(){this.start()}}Qn=new WeakMap,dt=new WeakMap,ui=new WeakMap,mn=new WeakMap,q4=new WeakSet,F9=async function(){try{const u=await b(this,Qn).getBlockNumber();if(b(this,mn)===-2){T(this,mn,u);return}if(u!==b(this,mn)){for(let t=b(this,mn)+1;t<=u;t++){if(b(this,dt)==null)return;await b(this,Qn).emit("block",t)}T(this,mn,u)}}catch{}b(this,dt)!=null&&T(this,dt,b(this,Qn)._setTimeout(cu(this,q4,F9).bind(this),b(this,ui)))};var Ba,ya,ei;class pP{constructor(u){q(this,Ba,void 0);q(this,ya,void 0);q(this,ei,void 0);T(this,Ba,u),T(this,ei,!1),T(this,ya,t=>{this._poll(t,b(this,Ba))})}async _poll(u,t){throw new Error("sub-classes must override this")}start(){b(this,ei)||(T(this,ei,!0),b(this,ya).call(this,-2),b(this,Ba).on("block",b(this,ya)))}stop(){b(this,ei)&&(T(this,ei,!1),b(this,Ba).off("block",b(this,ya)))}pause(u){this.stop()}resume(){this.start()}}Ba=new WeakMap,ya=new WeakMap,ei=new WeakMap;var q2;class Rpu extends pP{constructor(t,n){super(t);q(this,q2,void 0);T(this,q2,H5(n))}async _poll(t,n){throw new Error("@TODO")}}q2=new WeakMap;var H4;class zpu extends pP{constructor(t,n){super(t);q(this,H4,void 0);T(this,H4,n)}async _poll(t,n){const r=await n.getTransactionReceipt(b(this,H4));r&&n.emit(b(this,H4),r)}}H4=new WeakMap;var Kn,G4,Q4,ti,ft,H2,hP;class pm{constructor(u,t){q(this,H2);q(this,Kn,void 0);q(this,G4,void 0);q(this,Q4,void 0);q(this,ti,void 0);q(this,ft,void 0);T(this,Kn,u),T(this,G4,H5(t)),T(this,Q4,cu(this,H2,hP).bind(this)),T(this,ti,!1),T(this,ft,-2)}start(){b(this,ti)||(T(this,ti,!0),b(this,ft)===-2&&b(this,Kn).getBlockNumber().then(u=>{T(this,ft,u)}),b(this,Kn).on("block",b(this,Q4)))}stop(){b(this,ti)&&(T(this,ti,!1),b(this,Kn).off("block",b(this,Q4)))}pause(u){this.stop(),u&&T(this,ft,-2)}resume(){this.start()}}Kn=new WeakMap,G4=new WeakMap,Q4=new WeakMap,ti=new WeakMap,ft=new WeakMap,H2=new WeakSet,hP=async function(u){if(b(this,ft)===-2)return;const t=H5(b(this,G4));t.fromBlock=b(this,ft)+1,t.toBlock=u;const n=await b(this,Kn).getLogs(t);if(n.length===0){b(this,ft){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const r=Object.keys(n);return r.sort(),r.reduce((i,a)=>(i[a]=n[a],i),{})}return n})}class CP{constructor(u){eu(this,"name");Ru(this,{name:u})}start(){}stop(){}pause(u){}resume(){}}function Lpu(e){return JSON.parse(JSON.stringify(e))}function G5(e){return e=Array.from(new Set(e).values()),e.sort(),e}async function sf(e,u){if(e==null)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),typeof e=="string")switch(e){case"block":case"pending":case"debug":case"error":case"network":return{type:e,tag:e}}if(h0(e,32)){const t=e.toLowerCase();return{type:"transaction",tag:D9("tx",{hash:t}),hash:t}}if(e.orphan){const t=e;return{type:"orphan",tag:D9("orphan",t),filter:Lpu(t)}}if(e.address||e.topics){const t=e,n={topics:(t.topics||[]).map(r=>r==null?null:Array.isArray(r)?G5(r.map(i=>i.toLowerCase())):r.toLowerCase())};if(t.address){const r=[],i=[],a=s=>{h0(s)?r.push(s):i.push((async()=>{r.push(await Ce(s,u))})())};Array.isArray(t.address)?t.address.forEach(a):a(t.address),i.length&&await Promise.all(i),n.address=G5(r.map(s=>s.toLowerCase()))}return{filter:n,tag:D9("event",n),type:"event"}}V(!1,"unknown ProviderEvent","event",e)}function of(){return new Date().getTime()}const Upu={cacheTimeout:250,pollingInterval:4e3};var ne,ni,re,K4,He,Fa,ri,Vn,yc,pt,V4,J4,ve,rt,Fc,Q5,Dc,K5,Da,z3,vc,V5,va,j3,Z4,v9;class $pu{constructor(u,t){q(this,ve);q(this,Fc);q(this,Dc);q(this,Da);q(this,vc);q(this,va);q(this,Z4);q(this,ne,void 0);q(this,ni,void 0);q(this,re,void 0);q(this,K4,void 0);q(this,He,void 0);q(this,Fa,void 0);q(this,ri,void 0);q(this,Vn,void 0);q(this,yc,void 0);q(this,pt,void 0);q(this,V4,void 0);q(this,J4,void 0);if(T(this,J4,Object.assign({},Upu,t||{})),u==="any")T(this,Fa,!0),T(this,He,null);else if(u){const n=ir.from(u);T(this,Fa,!1),T(this,He,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else T(this,Fa,!1),T(this,He,null);T(this,Vn,-1),T(this,ri,new Map),T(this,ne,new Map),T(this,ni,new Map),T(this,re,null),T(this,K4,!1),T(this,yc,1),T(this,pt,new Map),T(this,V4,!1)}get pollingInterval(){return b(this,J4).pollingInterval}get provider(){return this}get plugins(){return Array.from(b(this,ni).values())}attachPlugin(u){if(b(this,ni).get(u.name))throw new Error(`cannot replace existing plugin: ${u.name} `);return b(this,ni).set(u.name,u.connect(this)),this}getPlugin(u){return b(this,ni).get(u)||null}get disableCcipRead(){return b(this,V4)}set disableCcipRead(u){T(this,V4,!!u)}async ccipReadFetch(u,t,n){if(this.disableCcipRead||n.length===0||u.to==null)return null;const r=u.to.toLowerCase(),i=t.toLowerCase(),a=[];for(let s=0;s=500,`response not found during CCIP fetch: ${E}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:u,info:{url:o,errorMessage:E}}),a.push(E)}du(!1,`error encountered during CCIP fetch: ${a.map(s=>JSON.stringify(s)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:u,info:{urls:n,errorMessages:a}})}_wrapBlock(u,t){return new opu(xpu(u),this)}_wrapLog(u,t){return new lE(bpu(u),this)}_wrapTransactionReceipt(u,t){return new XS(Ppu(u),this)}_wrapTransactionResponse(u,t){return new Xl(dP(u),this)}_detectNetwork(){du(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(u){du(!1,`unsupported method: ${u.method}`,"UNSUPPORTED_OPERATION",{operation:u.method,info:u})}async getBlockNumber(){const u=Gu(await cu(this,ve,rt).call(this,{method:"getBlockNumber"}),"%response");return b(this,Vn)>=0&&T(this,Vn,u),u}_getAddress(u){return Ce(u,this)}_getBlockTag(u){if(u==null)return"latest";switch(u){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return u}if(h0(u))return h0(u,32)?u:js(u);if(typeof u=="bigint"&&(u=Gu(u,"blockTag")),typeof u=="number")return u>=0?js(u):b(this,Vn)>=0?js(b(this,Vn)+u):this.getBlockNumber().then(t=>js(t+u));V(!1,"invalid blockTag","blockTag",u)}_getFilter(u){const t=(u.topics||[]).map(o=>o==null?null:Array.isArray(o)?G5(o.map(l=>l.toLowerCase())):o.toLowerCase()),n="blockHash"in u?u.blockHash:void 0,r=(o,l,c)=>{let E;switch(o.length){case 0:break;case 1:E=o[0];break;default:o.sort(),E=o}if(n&&(l!=null||c!=null))throw new Error("invalid filter");const d={};return E&&(d.address=E),t.length&&(d.topics=t),l&&(d.fromBlock=l),c&&(d.toBlock=c),n&&(d.blockHash=n),d};let i=[];if(u.address)if(Array.isArray(u.address))for(const o of u.address)i.push(this._getAddress(o));else i.push(this._getAddress(u.address));let a;"fromBlock"in u&&(a=this._getBlockTag(u.fromBlock));let s;return"toBlock"in u&&(s=this._getBlockTag(u.toBlock)),i.filter(o=>typeof o!="string").length||a!=null&&typeof a!="string"||s!=null&&typeof s!="string"?Promise.all([Promise.all(i),a,s]).then(o=>r(o[0],o[1],o[2])):r(i,a,s)}_getTransactionRequest(u){const t=I2(u),n=[];if(["to","from"].forEach(r=>{if(t[r]==null)return;const i=Ce(t[r],this);KE(i)?n.push(async function(){t[r]=await i}()):t[r]=i}),t.blockTag!=null){const r=this._getBlockTag(t.blockTag);KE(r)?n.push(async function(){t.blockTag=await r}()):t.blockTag=r}return n.length?async function(){return await Promise.all(n),t}():t}async getNetwork(){if(b(this,He)==null){const r=this._detectNetwork().then(i=>(this.emit("network",i,null),i),i=>{throw b(this,He)===r&&T(this,He,null),i});return T(this,He,r),(await r).clone()}const u=b(this,He),[t,n]=await Promise.all([u,this._detectNetwork()]);return t.chainId!==n.chainId&&(b(this,Fa)?(this.emit("network",n,t),b(this,He)===u&&T(this,He,Promise.resolve(n))):du(!1,`network changed: ${t.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const u=await this.getNetwork(),t=async()=>{const{_block:r,gasPrice:i}=await de({_block:cu(this,vc,V5).call(this,"latest",!1),gasPrice:(async()=>{try{const l=await cu(this,ve,rt).call(this,{method:"getGasPrice"});return Iu(l,"%response")}catch{}return null})()});let a=null,s=null;const o=this._wrapBlock(r,u);return o&&o.baseFeePerGas&&(s=BigInt("1000000000"),a=o.baseFeePerGas*jpu+s),new Ry(i,a,s)},n=u.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const r=new Cr(n.url),i=await n.processFunc(t,this,r);return new Ry(i.gasPrice,i.maxFeePerGas,i.maxPriorityFeePerGas)}return await t()}async estimateGas(u){let t=this._getTransactionRequest(u);return KE(t)&&(t=await t),Iu(await cu(this,ve,rt).call(this,{method:"estimateGas",transaction:t}),"%response")}async call(u){const{tx:t,blockTag:n}=await de({tx:this._getTransactionRequest(u),blockTag:this._getBlockTag(u.blockTag)});return await cu(this,Dc,K5).call(this,cu(this,Fc,Q5).call(this,t,n,u.enableCcipRead?0:-1))}async getBalance(u,t){return Iu(await cu(this,Da,z3).call(this,{method:"getBalance"},u,t),"%response")}async getTransactionCount(u,t){return Gu(await cu(this,Da,z3).call(this,{method:"getTransactionCount"},u,t),"%response")}async getCode(u,t){return Ou(await cu(this,Da,z3).call(this,{method:"getCode"},u,t))}async getStorage(u,t,n){const r=Iu(t,"position");return Ou(await cu(this,Da,z3).call(this,{method:"getStorage",position:r},u,n))}async broadcastTransaction(u){const{blockNumber:t,hash:n,network:r}=await de({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:u}),network:this.getNetwork()}),i=T2.from(u);if(i.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,r).replaceableTransaction(t)}async getBlock(u,t){const{network:n,params:r}=await de({network:this.getNetwork(),params:cu(this,vc,V5).call(this,u,!!t)});return r==null?null:this._wrapBlock(r,n)}async getTransaction(u){const{network:t,params:n}=await de({network:this.getNetwork(),params:cu(this,ve,rt).call(this,{method:"getTransaction",hash:u})});return n==null?null:this._wrapTransactionResponse(n,t)}async getTransactionReceipt(u){const{network:t,params:n}=await de({network:this.getNetwork(),params:cu(this,ve,rt).call(this,{method:"getTransactionReceipt",hash:u})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const r=await cu(this,ve,rt).call(this,{method:"getTransaction",hash:u});if(r==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=r.gasPrice}return this._wrapTransactionReceipt(n,t)}async getTransactionResult(u){const{result:t}=await de({network:this.getNetwork(),result:cu(this,ve,rt).call(this,{method:"getTransactionResult",hash:u})});return t==null?null:Ou(t)}async getLogs(u){let t=this._getFilter(u);KE(t)&&(t=await t);const{network:n,params:r}=await de({network:this.getNetwork(),params:cu(this,ve,rt).call(this,{method:"getLogs",filter:t})});return r.map(i=>this._wrapLog(i,n))}_getProvider(u){du(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(u){return await R2.fromName(this,u)}async getAvatar(u){const t=await this.getResolver(u);return t?await t.getAvatar():null}async resolveName(u){const t=await this.getResolver(u);return t?await t.getAddress():null}async lookupAddress(u){u=Yu(u);const t=M5(u.substring(2).toLowerCase()+".addr.reverse");try{const n=await R2.getEnsAddress(this),i=await new u4(n,["function resolver(bytes32) view returns (address)"],this).resolver(t);if(i==null||i===O5)return null;const s=await new u4(i,["function name(bytes32) view returns (string)"],this).name(t);return await this.resolveName(s)!==u?null:s}catch(n){if(Dt(n,"BAD_DATA")&&n.value==="0x"||Dt(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(u,t,n){const r=t??1;return r===0?this.getTransactionReceipt(u):new Promise(async(i,a)=>{let s=null;const o=async l=>{try{const c=await this.getTransactionReceipt(u);if(c!=null&&l-c.blockNumber+1>=r){i(c),s&&(clearTimeout(s),s=null);return}}catch(c){console.log("EEE",c)}this.once("block",o)};n!=null&&(s=setTimeout(()=>{s!=null&&(s=null,this.off("block",o),a(_0("timeout","TIMEOUT",{reason:"timeout"})))},n)),o(await this.getBlockNumber())})}async waitForBlock(u){du(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(u){const t=b(this,pt).get(u);t&&(t.timer&&clearTimeout(t.timer),b(this,pt).delete(u))}_setTimeout(u,t){t==null&&(t=0);const n=br(this,yc)._++,r=()=>{b(this,pt).delete(n),u()};if(this.paused)b(this,pt).set(n,{timer:null,func:r,time:t});else{const i=setTimeout(r,t);b(this,pt).set(n,{timer:i,func:r,time:of()})}return n}_forEachSubscriber(u){for(const t of b(this,ne).values())u(t.subscriber)}_getSubscriber(u){switch(u.type){case"debug":case"error":case"network":return new CP(u.type);case"block":{const t=new Npu(this);return t.pollingInterval=this.pollingInterval,t}case"event":return new pm(this,u.filter);case"transaction":return new zpu(this,u.hash);case"orphan":return new Rpu(this,u.filter)}throw new Error(`unsupported event: ${u.type}`)}_recoverSubscriber(u,t){for(const n of b(this,ne).values())if(n.subscriber===u){n.started&&n.subscriber.stop(),n.subscriber=t,n.started&&t.start(),b(this,re)!=null&&t.pause(b(this,re));break}}async on(u,t){const n=await cu(this,Z4,v9).call(this,u);return n.listeners.push({listener:t,once:!1}),n.started||(n.subscriber.start(),n.started=!0,b(this,re)!=null&&n.subscriber.pause(b(this,re))),this}async once(u,t){const n=await cu(this,Z4,v9).call(this,u);return n.listeners.push({listener:t,once:!0}),n.started||(n.subscriber.start(),n.started=!0,b(this,re)!=null&&n.subscriber.pause(b(this,re))),this}async emit(u,...t){const n=await cu(this,va,j3).call(this,u,t);if(!n||n.listeners.length===0)return!1;const r=n.listeners.length;return n.listeners=n.listeners.filter(({listener:i,once:a})=>{const s=new X_(this,a?null:i,u);try{i.call(this,...t,s)}catch{}return!a}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),b(this,ne).delete(n.tag)),r>0}async listenerCount(u){if(u){const n=await cu(this,va,j3).call(this,u);return n?n.listeners.length:0}let t=0;for(const{listeners:n}of b(this,ne).values())t+=n.length;return t}async listeners(u){if(u){const n=await cu(this,va,j3).call(this,u);return n?n.listeners.map(({listener:r})=>r):[]}let t=[];for(const{listeners:n}of b(this,ne).values())t=t.concat(n.map(({listener:r})=>r));return t}async off(u,t){const n=await cu(this,va,j3).call(this,u);if(!n)return this;if(t){const r=n.listeners.map(({listener:i})=>i).indexOf(t);r>=0&&n.listeners.splice(r,1)}return(!t||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),b(this,ne).delete(n.tag)),this}async removeAllListeners(u){if(u){const{tag:t,started:n,subscriber:r}=await cu(this,Z4,v9).call(this,u);n&&r.stop(),b(this,ne).delete(t)}else for(const[t,{started:n,subscriber:r}]of b(this,ne))n&&r.stop(),b(this,ne).delete(t);return this}async addListener(u,t){return await this.on(u,t)}async removeListener(u,t){return this.off(u,t)}get destroyed(){return b(this,K4)}destroy(){this.removeAllListeners();for(const u of b(this,pt).keys())this._clearTimeout(u);T(this,K4,!0)}get paused(){return b(this,re)!=null}set paused(u){!!u!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(u){if(T(this,Vn,-1),b(this,re)!=null){if(b(this,re)==!!u)return;du(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(t=>t.pause(u)),T(this,re,!!u);for(const t of b(this,pt).values())t.timer&&clearTimeout(t.timer),t.time=of()-t.time}resume(){if(b(this,re)!=null){this._forEachSubscriber(u=>u.resume()),T(this,re,null);for(const u of b(this,pt).values()){let t=u.time;t<0&&(t=0),u.time=of(),setTimeout(u.func,t)}}}}ne=new WeakMap,ni=new WeakMap,re=new WeakMap,K4=new WeakMap,He=new WeakMap,Fa=new WeakMap,ri=new WeakMap,Vn=new WeakMap,yc=new WeakMap,pt=new WeakMap,V4=new WeakMap,J4=new WeakMap,ve=new WeakSet,rt=async function(u){const t=b(this,J4).cacheTimeout;if(t<0)return await this._perform(u);const n=D9(u.method,u);let r=b(this,ri).get(n);return r||(r=this._perform(u),b(this,ri).set(n,r),setTimeout(()=>{b(this,ri).get(n)===r&&b(this,ri).delete(n)},t)),await r},Fc=new WeakSet,Q5=async function(u,t,n){du(n=0&&t==="latest"&&r.to!=null&&A0(i.data,0,4)==="0x556f1830"){const a=i.data,s=await Ce(r.to,this);let o;try{o=Qpu(A0(i.data,4))}catch(E){du(!1,E.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:r,info:{data:a}})}du(o.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:a,reason:"OffchainLookup",transaction:r,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:o.errorArgs}});const l=await this.ccipReadFetch(r,o.calldata,o.urls);du(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:r,info:{data:i.data,errorArgs:o.errorArgs}});const c={to:s,data:R0([o.selector,Gpu([l,o.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:c});try{const E=await cu(this,Fc,Q5).call(this,c,t,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},c),result:E}),E}catch(E){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},c),error:E}),E}}throw i}},Dc=new WeakSet,K5=async function(u){const{value:t}=await de({network:this.getNetwork(),value:u});return t},Da=new WeakSet,z3=async function(u,t,n){let r=this._getAddress(t),i=this._getBlockTag(n);return(typeof r!="string"||typeof i!="string")&&([r,i]=await Promise.all([r,i])),await cu(this,Dc,K5).call(this,cu(this,ve,rt).call(this,Object.assign(u,{address:r,blockTag:i})))},vc=new WeakSet,V5=async function(u,t){if(h0(u,32))return await cu(this,ve,rt).call(this,{method:"getBlock",blockHash:u,includeTransactions:t});let n=this._getBlockTag(u);return typeof n!="string"&&(n=await n),await cu(this,ve,rt).call(this,{method:"getBlock",blockTag:n,includeTransactions:t})},va=new WeakSet,j3=async function(u,t){let n=await sf(u,this);return n.type==="event"&&t&&t.length>0&&t[0].removed===!0&&(n=await sf({orphan:"drop-log",log:t[0]},this)),b(this,ne).get(n.tag)||null},Z4=new WeakSet,v9=async function(u){const t=await sf(u,this),n=t.tag;let r=b(this,ne).get(n);return r||(r={subscriber:this._getSubscriber(t),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},b(this,ne).set(n,r)),r};function Wpu(e,u){try{const t=J5(e,u);if(t)return nm(t)}catch{}return null}function J5(e,u){if(e==="0x")return null;try{const t=Gu(A0(e,u,u+32)),n=Gu(A0(e,t,t+32));return A0(e,t+32,t+32+n)}catch{}return null}function qy(e){const u=Ve(e);if(u.length>32)throw new Error("internal; should not happen");const t=new Uint8Array(32);return t.set(u,32-u.length),t}function qpu(e){if(e.length%32===0)return e;const u=new Uint8Array(Math.ceil(e.length/32)*32);return u.set(e),u}const Hpu=new Uint8Array([]);function Gpu(e){const u=[];let t=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const t=A0(e,0,32);du(A0(t,0,12)===A0(Hy,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),u.sender=A0(t,12);try{const n=[],r=Gu(A0(e,32,64)),i=Gu(A0(e,r,r+32)),a=A0(e,r+32);for(let s=0;su[n]),u}function fs(e,u){if(e.provider)return e.provider;du(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:u})}async function Gy(e,u){let t=I2(u);if(t.to!=null&&(t.to=Ce(t.to,e)),t.from!=null){const n=t.from;t.from=Promise.all([e.getAddress(),Ce(n,e)]).then(([r,i])=>(V(r.toLowerCase()===i.toLowerCase(),"transaction from mismatch","tx.from",i),r))}else t.from=e.getAddress();return await de(t)}class Kpu{constructor(u){eu(this,"provider");Ru(this,{provider:u||null})}async getNonce(u){return fs(this,"getTransactionCount").getTransactionCount(await this.getAddress(),u)}async populateCall(u){return await Gy(this,u)}async populateTransaction(u){const t=fs(this,"populateTransaction"),n=await Gy(this,u);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const r=await this.provider.getNetwork();if(n.chainId!=null){const a=Iu(n.chainId);V(a===r.chainId,"transaction chainId mismatch","tx.chainId",u.chainId)}else n.chainId=r.chainId;const i=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||i)?V(!1,"eip-1559 transaction do not support gasPrice","tx",u):(n.type===0||n.type===1)&&i&&V(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",u),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const a=await t.getFeeData();du(a.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=a.gasPrice)}else{const a=await t.getFeeData();if(n.type==null)if(a.maxFeePerGas!=null&&a.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const s=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=s,n.maxPriorityFeePerGas=s}else n.maxFeePerGas==null&&(n.maxFeePerGas=a.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=a.maxPriorityFeePerGas);else a.gasPrice!=null?(du(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=a.gasPrice),n.type=0):du(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else n.type===2&&(n.maxFeePerGas==null&&(n.maxFeePerGas=a.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=a.maxPriorityFeePerGas))}return await de(n)}async estimateGas(u){return fs(this,"estimateGas").estimateGas(await this.populateCall(u))}async call(u){return fs(this,"call").call(await this.populateCall(u))}async resolveName(u){return await fs(this,"resolveName").resolveName(u)}async sendTransaction(u){const t=fs(this,"sendTransaction"),n=await this.populateTransaction(u);delete n.from;const r=T2.from(n);return await t.broadcastTransaction(await this.signTransaction(r))}}function Vpu(e){return JSON.parse(JSON.stringify(e))}var be,An,ba,ii,wa,Y4,bc,Z5,wc,Y5;class mP{constructor(u){q(this,bc);q(this,wc);q(this,be,void 0);q(this,An,void 0);q(this,ba,void 0);q(this,ii,void 0);q(this,wa,void 0);q(this,Y4,void 0);T(this,be,u),T(this,An,null),T(this,ba,cu(this,bc,Z5).bind(this)),T(this,ii,!1),T(this,wa,null),T(this,Y4,!1)}_subscribe(u){throw new Error("subclasses must override this")}_emitResults(u,t){throw new Error("subclasses must override this")}_recover(u){throw new Error("subclasses must override this")}start(){b(this,ii)||(T(this,ii,!0),cu(this,bc,Z5).call(this,-2))}stop(){b(this,ii)&&(T(this,ii,!1),T(this,Y4,!0),cu(this,wc,Y5).call(this),b(this,be).off("block",b(this,ba)))}pause(u){u&&cu(this,wc,Y5).call(this),b(this,be).off("block",b(this,ba))}resume(){this.start()}}be=new WeakMap,An=new WeakMap,ba=new WeakMap,ii=new WeakMap,wa=new WeakMap,Y4=new WeakMap,bc=new WeakSet,Z5=async function(u){try{b(this,An)==null&&T(this,An,this._subscribe(b(this,be)));let t=null;try{t=await b(this,An)}catch(i){if(!Dt(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(t==null){T(this,An,null),b(this,be)._recoverSubscriber(this,this._recover(b(this,be)));return}const n=await b(this,be).getNetwork();if(b(this,wa)||T(this,wa,n),b(this,wa).chainId!==n.chainId)throw new Error("chaid changed");if(b(this,Y4))return;const r=await b(this,be).send("eth_getFilterChanges",[t]);await this._emitResults(b(this,be),r)}catch(t){console.log("@TODO",t)}b(this,be).once("block",b(this,ba))},wc=new WeakSet,Y5=function(){const u=b(this,An);u&&(T(this,An,null),u.then(t=>{b(this,be).send("eth_uninstallFilter",[t])}))};var xa;class Jpu extends mP{constructor(t,n){super(t);q(this,xa,void 0);T(this,xa,Vpu(n))}_recover(t){return new pm(t,b(this,xa))}async _subscribe(t){return await t.send("eth_newFilter",[b(this,xa)])}async _emitResults(t,n){for(const r of n)t.emit(b(this,xa),t._wrapLog(r,t._network))}}xa=new WeakMap;class Zpu extends mP{async _subscribe(u){return await u.send("eth_newPendingTransactionFilter",[])}async _emitResults(u,t){for(const n of t)u.emit("pending",n)}}const Ypu="bigint,boolean,function,number,string,symbol".split(/,/g);function b9(e){if(e==null||Ypu.indexOf(typeof e)>=0||typeof e.getAddress=="function")return e;if(Array.isArray(e))return e.map(b9);if(typeof e=="object")return Object.keys(e).reduce((u,t)=>(u[t]=e[t],u),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function Xpu(e){return new Promise(u=>{setTimeout(u,e)})}function ps(e){return e&&e.toLowerCase()}function Qy(e){return e&&typeof e.pollingInterval=="number"}const u5u={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class lf extends Kpu{constructor(t,n){super(t);eu(this,"address");n=Yu(n),Ru(this,{address:n})}connect(t){du(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(t){return await this.populateCall(t)}async sendUncheckedTransaction(t){const n=b9(t),r=[];if(n.from){const a=n.from;r.push((async()=>{const s=await Ce(a,this.provider);V(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),n.from=s})())}else n.from=this.address;if(n.gasLimit==null&&r.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const a=n.to;r.push((async()=>{n.to=await Ce(a,this.provider)})())}r.length&&await Promise.all(r);const i=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(t){const n=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(t);return await new Promise((i,a)=>{const s=[1e3,100],o=async()=>{const l=await this.provider.getTransaction(r);if(l!=null){i(l.replaceableTransaction(n));return}this.provider._setTimeout(()=>{o()},s.pop()||4e3)};o()})}async signTransaction(t){const n=b9(t);if(n.from){const i=await Ce(n.from,this.provider);V(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),n.from=i}else n.from=this.address;const r=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[r])}async signMessage(t){const n=typeof t=="string"?or(t):t;return await this.provider.send("personal_sign",[Ou(n),this.address.toLowerCase()])}async signTypedData(t,n,r){const i=b9(r),a=await O2.resolveNames(t,n,i,async s=>{const o=await Ce(s);return V(o!=null,"TypedData does not support null address","value",s),o});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(O2.getPayload(a.domain,n,a.value))])}async unlock(t){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),t,null])}async _legacySignMessage(t){const n=typeof t=="string"?or(t):t;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Ou(n)])}}var ka,X4,Jn,gn,Ut,Zn,xc,X5;class e5u extends $pu{constructor(t,n){super(t,n);q(this,xc);q(this,ka,void 0);q(this,X4,void 0);q(this,Jn,void 0);q(this,gn,void 0);q(this,Ut,void 0);q(this,Zn,void 0);T(this,X4,1),T(this,ka,Object.assign({},u5u,n||{})),T(this,Jn,[]),T(this,gn,null),T(this,Zn,null);{let i=null;const a=new Promise(s=>{i=s});T(this,Ut,{promise:a,resolve:i})}const r=this._getOption("staticNetwork");r&&(V(t==null||r.matches(t),"staticNetwork MUST match network object","options",n),T(this,Zn,r))}_getOption(t){return b(this,ka)[t]}get _network(){return du(b(this,Zn),"network is not available yet","NETWORK_ERROR"),b(this,Zn)}async _perform(t){if(t.method==="call"||t.method==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&Iu(r.type)&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(t=Object.assign({},t,{transaction:Object.assign({},r,{type:void 0})}))}}const n=this.getRpcRequest(t);return n!=null?await this.send(n.method,n.args):super._perform(t)}async _detectNetwork(){const t=this._getOption("staticNetwork");if(t)return t;if(this.ready)return ir.from(Iu(await this.send("eth_chainId",[])));const n={id:br(this,X4)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let r;try{r=(await this._send(n))[0]}catch(i){throw this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:r}),"result"in r)return ir.from(Iu(r.result));throw this.getRpcError(n,r)}_start(){b(this,Ut)==null||b(this,Ut).resolve==null||(b(this,Ut).resolve(),T(this,Ut,null),(async()=>{for(;b(this,Zn)==null&&!this.destroyed;)try{T(this,Zn,await this._detectNetwork())}catch(t){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",_0("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:t}})),await Xpu(1e3)}cu(this,xc,X5).call(this)})())}async _waitUntilReady(){if(b(this,Ut)!=null)return await b(this,Ut).promise}_getSubscriber(t){return t.type==="pending"?new Zpu(this):t.type==="event"?this._getOption("polling")?new pm(this,t.filter):new Jpu(this,t.filter):t.type==="orphan"&&t.filter.orphan==="drop-log"?new CP("orphan"):super._getSubscriber(t)}get ready(){return b(this,Ut)==null}getRpcTransaction(t){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(r=>{if(t[r]==null)return;let i=r;r==="gasLimit"&&(i="gas"),n[i]=js(Iu(t[r],`tx.${r}`))}),["from","to","data"].forEach(r=>{t[r]!=null&&(n[r]=Ou(t[r]))}),t.accessList&&(n.accessList=is(t.accessList)),n}getRpcRequest(t){switch(t.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getBalance":return{method:"eth_getBalance",args:[ps(t.address),t.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[ps(t.address),t.blockTag]};case"getCode":return{method:"eth_getCode",args:[ps(t.address),t.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[ps(t.address),"0x"+t.position.toString(16),t.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[t.signedTransaction]};case"getBlock":if("blockTag"in t)return{method:"eth_getBlockByNumber",args:[t.blockTag,!!t.includeTransactions]};if("blockHash"in t)return{method:"eth_getBlockByHash",args:[t.blockHash,!!t.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[t.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[t.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(t.transaction),t.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(t.transaction)]};case"getLogs":return t.filter&&t.filter.address!=null&&(Array.isArray(t.filter.address)?t.filter.address=t.filter.address.map(ps):t.filter.address=ps(t.filter.address)),{method:"eth_getLogs",args:[t.filter]}}return null}getRpcError(t,n){const{method:r}=t,{error:i}=n;if(r==="eth_estimateGas"&&i.message){const o=i.message;if(!o.match(/revert/i)&&o.match(/insufficient funds/i))return _0("insufficient funds","INSUFFICIENT_FUNDS",{transaction:t.params[0],info:{payload:t,error:i}})}if(r==="eth_call"||r==="eth_estimateGas"){const o=uh(i),l=Yl.getBuiltinCallException(r==="eth_call"?"call":"estimateGas",t.params[0],o?o.data:null);return l.info={error:i,payload:t},l}const a=JSON.stringify(r5u(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return _0("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[r]||"unknown",reason:"rejected",info:{payload:t,error:i}});if(r==="eth_sendRawTransaction"||r==="eth_sendTransaction"){const o=t.params[0];if(a.match(/insufficient funds|base fee exceeds gas limit/i))return _0("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:o,info:{error:i}});if(a.match(/nonce/i)&&a.match(/too low/i))return _0("nonce has already been used","NONCE_EXPIRED",{transaction:o,info:{error:i}});if(a.match(/replacement transaction/i)&&a.match(/underpriced/i))return _0("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:o,info:{error:i}});if(a.match(/only replay-protected/i))return _0("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:o,info:{error:i}}})}let s=!!a.match(/the method .* does not exist/i);return s||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(s=!0),s?_0("unsupported operation","UNSUPPORTED_OPERATION",{operation:t.method,info:{error:i,payload:t}}):_0("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:t})}send(t,n){if(this.destroyed)return Promise.reject(_0("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t}));const r=br(this,X4)._++,i=new Promise((a,s)=>{b(this,Jn).push({resolve:a,reject:s,payload:{method:t,params:n,id:r,jsonrpc:"2.0"}})});return cu(this,xc,X5).call(this),i}async getSigner(t){t==null&&(t=0);const n=this.send("eth_accounts",[]);if(typeof t=="number"){const i=await n;if(t>=i.length)throw new Error("no such account");return new lf(this,i[t])}const{accounts:r}=await de({network:this.getNetwork(),accounts:n});t=Yu(t);for(const i of r)if(Yu(i)===t)return new lf(this,t);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new lf(this,n))}destroy(){b(this,gn)&&(clearTimeout(b(this,gn)),T(this,gn,null));for(const{payload:t,reject:n}of b(this,Jn))n(_0("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t.method}));T(this,Jn,[]),super.destroy()}}ka=new WeakMap,X4=new WeakMap,Jn=new WeakMap,gn=new WeakMap,Ut=new WeakMap,Zn=new WeakMap,xc=new WeakSet,X5=function(){if(b(this,gn))return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");T(this,gn,setTimeout(()=>{T(this,gn,null);const n=b(this,Jn);for(T(this,Jn,[]);n.length;){const r=[n.shift()];for(;n.length&&r.length!==b(this,ka).batchMaxCount;)if(r.push(n.shift()),JSON.stringify(r.map(a=>a.payload)).length>b(this,ka).batchMaxSize){n.unshift(r.pop());break}(async()=>{const i=r.length===1?r[0].payload:r.map(a=>a.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{const a=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:a});for(const{resolve:s,reject:o,payload:l}of r){if(this.destroyed){o(_0("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:l.method}));continue}const c=a.filter(E=>E.id===l.id)[0];if(c==null){const E=_0("missing response for request","BAD_DATA",{value:a,info:{payload:l}});this.emit("error",E),o(E);continue}if("error"in c){o(this.getRpcError(l,c));continue}s(c.result)}}catch(a){this.emit("debug",{action:"receiveRpcError",error:a});for(const{reject:s}of r)s(a)}})()}},t))};var ai;class t5u extends e5u{constructor(t,n){super(t,n);q(this,ai,void 0);T(this,ai,4e3)}_getSubscriber(t){const n=super._getSubscriber(t);return Qy(n)&&(n.pollingInterval=b(this,ai)),n}get pollingInterval(){return b(this,ai)}set pollingInterval(t){if(!Number.isInteger(t)||t<0)throw new Error("invalid interval");T(this,ai,t),this._forEachSubscriber(n=>{Qy(n)&&(n.pollingInterval=b(this,ai))})}}ai=new WeakMap;var uo;class n5u extends t5u{constructor(t,n,r){t==null&&(t="http://localhost:8545");super(n,r);q(this,uo,void 0);typeof t=="string"?T(this,uo,new Cr(t)):T(this,uo,t.clone())}_getConnection(){return b(this,uo).clone()}async send(t,n){return await this._start(),await super.send(t,n)}async _send(t){const n=this._getConnection();n.body=JSON.stringify(t),n.setHeader("content-type","application/json");const r=await n.send();r.assertOk();let i=r.bodyJson;return Array.isArray(i)||(i=[i]),i}}uo=new WeakMap;function uh(e){if(e==null)return null;if(typeof e.message=="string"&&e.message.match(/revert/i)&&h0(e.data))return{message:e.message,data:e.data};if(typeof e=="object"){for(const u in e){const t=uh(e[u]);if(t)return t}return null}if(typeof e=="string")try{return uh(JSON.parse(e))}catch{}return null}function eh(e,u){if(e!=null){if(typeof e.message=="string"&&u.push(e.message),typeof e=="object")for(const t in e)eh(e[t],u);if(typeof e=="string")try{return eh(JSON.parse(e),u)}catch{}}}function r5u(e){const u=[];return eh(e,u),u}const i5u=u4,a5u=async()=>{const e=new n5u("https://goerli.optimism.io",420);return new i5u(ur[420],Fn.abi,e).balanceOf(ur[420])},s5u=()=>{const{error:e,isLoading:u,data:t}=ldu(["ethers.Contract().balanceOf"],a5u);return u?qu.jsx("div",{children:"'loading balance...'"}):e?(console.error(e),qu.jsx("div",{children:"error loading balance"})):qu.jsx("div",{children:t==null?void 0:t.toString()})},o5u=()=>{const{address:e}=et(),{data:u}=KC(),[t,n]=M.useState([]),r=Fn.events.Transfer({fromBlock:u&&u-BigInt(1e3),args:{to:e}});return VL({...r,address:ur[420],listener:i=>{n([...t,i])}}),qu.jsx("div",{children:qu.jsx("div",{style:{display:"flex",flexDirection:"column-reverse"},children:t.map((i,a)=>qu.jsxs("div",{children:[qu.jsxs("div",{children:["Event ",a]}),qu.jsx("div",{children:JSON.stringify(i)})]}))})})},l5u=()=>{const{address:e,isConnected:u}=et(),{data:t}=Cs({...Fn.read.balanceOf(e),address:ur[420],enabled:u}),{data:n}=Cs({...Fn.read.totalSupply(),address:ur[420],enabled:u}),{data:r}=Cs({...Fn.read.tokenURI(BigInt(1)),address:ur[420],enabled:u}),{data:i}=Cs({...Fn.read.symbol(),address:ur[420],enabled:u}),{data:a}=Cs({...Fn.read.ownerOf(BigInt(1)),address:ur[420],enabled:u});return qu.jsx("div",{children:qu.jsxs("div",{children:[qu.jsxs("div",{children:["balanceOf(",e,"): ",t==null?void 0:t.toString()]}),qu.jsxs("div",{children:["totalSupply(): ",n==null?void 0:n.toString()]}),qu.jsxs("div",{children:["tokenUri(BigInt(1)): ",r==null?void 0:r.toString()]}),qu.jsxs("div",{children:["symbol(): ",i==null?void 0:i.toString()]}),qu.jsxs("div",{children:["ownerOf(BigInt(1)): ",a==null?void 0:a.toString()]})]})})};function c5u(e=1,u=1e9){const t=u-e+1;return Math.floor(Math.random()*t)+e}const E5u=()=>{const{address:e,isConnected:u}=et(),{data:t,refetch:n}=Cs({...Fn.read.balanceOf(e),enabled:u}),{writeAsync:r,data:i}=uU({address:ur[420],...Fn.write.mint});return lU({hash:i==null?void 0:i.hash,onSuccess:a=>{console.log("minted",a),n()}}),qu.jsxs("div",{children:[qu.jsx("div",{children:qu.jsxs("div",{children:["balance: ",t==null?void 0:t.toString()]})}),qu.jsx("button",{type:"button",onClick:()=>r(Fn.write.mint(BigInt(c5u()))),children:"Mint"})]})};function d5u(){const[e,u]=M.useState("unselected"),{isConnected:t}=et(),n={unselected:qu.jsx(qu.Fragment,{children:"Select which component to render"}),reads:qu.jsx(l5u,{}),writes:qu.jsx(E5u,{}),events:qu.jsx(o5u,{}),ethers:qu.jsx(s5u,{})};return qu.jsxs(qu.Fragment,{children:[qu.jsx("h1",{children:"Evmts example"}),qu.jsx(N8,{}),t&&qu.jsxs(qu.Fragment,{children:[qu.jsx("hr",{}),qu.jsx("div",{style:{display:"flex"},children:Object.keys(n).map(r=>qu.jsx("button",{type:"button",onClick:()=>u(r),children:r}))}),qu.jsx("h2",{children:e}),n[e]]})]})}function f5u({rpc:e}){return function(u){const t=e(u);return!t||t.http===""?null:{chain:{...u,rpcUrls:{...u.rpcUrls,default:{http:[t.http]}}},rpcUrls:{http:[t.http],webSocket:t.webSocket?[t.webSocket]:void 0}}}}const p5u="898f836c53a18d0661340823973f0cb4",{chains:AP,publicClient:h5u,webSocketPublicClient:C5u}=MM([$C,wM],[f5u({rpc:e=>{const u={1:{http:{}.VITE_RPC_URL_1},420:{http:{}.VITE_RPC_URL_420}};return[1,420].includes(e.id)?u[e.id]:null}})]),{connectors:m5u}=_1u({appName:"My wagmi + RainbowKit App",chains:AP,projectId:p5u}),A5u=e=>vL({autoConnect:!0,connectors:m5u,publicClient:h5u,webSocketPublicClient:C5u,queryClient:e}),Ky=new H1u,gP=document.getElementById("root");if(!gP)throw new Error("No root element found");z_(gP).render(qu.jsx(M.StrictMode,{children:qu.jsx(J1u,{client:Ky,children:qu.jsx(bL,{config:A5u(Ky),children:qu.jsx(tlu,{chains:AP,children:qu.jsx(d5u,{})})})})}));export{Cd as $,hhu as A,phu as B,nhu as C,ghu as D,chu as E,Y5u as F,lhu as G,bhu as H,Ahu as I,uhu as J,V5u as K,J5u as L,St as M,jr as N,shu as O,ihu as P,ahu as Q,g2u as R,md as S,q8 as T,vo as U,Q5u as V,p_ as W,Rhu as X,ehu as Y,Nhu as Z,aE as _,Jz as a,y1 as a$,thu as a0,K5u as a1,dhu as a2,fhu as a3,Ad as a4,X5u as a5,H8 as a6,Chu as a7,Ehu as a8,mhu as a9,L5u as aA,s_ as aB,$9u as aC,L8 as aD,W9u as aE,q9u as aF,G9u as aG,a_ as aH,V9u as aI,Y9u as aJ,e2u as aK,n2u as aL,i2u as aM,l9u as aN,o_ as aO,d2u as aP,f2u as aQ,o2u as aR,E2u as aS,fau as aT,Bau as aU,Bu as aV,c1 as aW,ge as aX,lo as aY,Bl as aZ,WR as a_,zhu as aa,Dhu as ab,Fhu as ac,t1u as ad,Ohu as ae,whu as af,n1u as ag,yhu as ah,Shu as ai,xhu as aj,Phu as ak,Ihu as al,khu as am,_hu as an,Thu as ao,vhu as ap,Q2u as aq,C_ as ar,Q6 as as,$5u as at,W5u as au,Uu as av,Xcu as aw,Zu as ax,rF as ay,U5u as az,Zz as b,pr as b0,Ic as b1,K3 as b2,xn as b3,Yz as c,bb as d,nh as e,Ia as f,zz as g,$u as h,Gt as i,aB as j,th as k,Rz as l,Na as m,l9 as n,Bhu as o,q5u as p,H5u as q,ld as r,G5u as s,Zt as t,f_ as u,ze as v,un as w,Z5u as x,rhu as y,ohu as z}; diff --git a/examples/vite/dist/assets/index-5f7b2f56.js b/examples/vite/dist/assets/index-5f7b2f56.js new file mode 100644 index 0000000000..0db8b30ca3 --- /dev/null +++ b/examples/vite/dist/assets/index-5f7b2f56.js @@ -0,0 +1,38 @@ +import{aw as Gs,ax as Z,ay as Hi,e as ln,az as Hp,aA as Vp,k as Up}from"./index-5c4ca410.js";import{e as vu}from"./events-741c5e9f.js";import{p as zp,h as qp}from"./hooks.module-408dc32d.js";function Gp(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var yu={},Pi={},Js={};Object.defineProperty(Js,"__esModule",{value:!0});Js.walletLogo=void 0;const Jp=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};Js.walletLogo=Jp;var Zs={};Object.defineProperty(Zs,"__esModule",{value:!0});Zs.LINK_API_URL=void 0;Zs.LINK_API_URL="https://www.walletlink.org";var Qs={};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.ScopedLocalStorage=void 0;class Zp{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}}Qs.ScopedLocalStorage=Zp;var Jn={},fn={};Object.defineProperty(fn,"__esModule",{value:!0});const Qp=vu;function Rc(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function Yp(t){const e=t.length,r=new Array(e);for(let n=0;n0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")Rc(s,this,r);else{const o=s.length,a=Yp(s);for(let c=0;c0?u:h},s.min=function(u,h){return u.cmp(h)<0?u:h},s.prototype._init=function(u,h,p){if(typeof u=="number")return this._initNumber(u,h,p);if(typeof u=="object")return this._initArray(u,h,p);h==="hex"&&(h=16),n(h===(h|0)&&h>=2&&h<=36),u=u.toString().replace(/\s+/g,"");var v=0;u[0]==="-"&&(v++,this.negative=1),v=0;v-=3)M=u[v]|u[v-1]<<8|u[v-2]<<16,this.words[w]|=M<>>26-T&67108863,T+=24,T>=26&&(T-=26,w++);else if(p==="le")for(v=0,w=0;v>>26-T&67108863,T+=24,T>=26&&(T-=26,w++);return this._strip()};function a(b,u){var h=b.charCodeAt(u);if(h>=48&&h<=57)return h-48;if(h>=65&&h<=70)return h-55;if(h>=97&&h<=102)return h-87;n(!1,"Invalid character in "+b)}function c(b,u,h){var p=a(b,h);return h-1>=u&&(p|=a(b,h-1)<<4),p}s.prototype._parseHex=function(u,h,p){this.length=Math.ceil((u.length-h)/6),this.words=new Array(this.length);for(var v=0;v=h;v-=2)T=c(u,h,v)<=18?(w-=18,M+=1,this.words[M]|=T>>>26):w+=8;else{var m=u.length-h;for(v=m%2===0?h+1:h;v=18?(w-=18,M+=1,this.words[M]|=T>>>26):w+=8}this._strip()};function l(b,u,h,p){for(var v=0,w=0,M=Math.min(b.length,h),T=u;T=49?w=m-49+10:m>=17?w=m-17+10:w=m,n(m>=0&&w1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=g}catch{s.prototype.inspect=g}else s.prototype.inspect=g;function g(){return(this.red?""}var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(u,h){u=u||10,h=h|0||1;var p;if(u===16||u==="hex"){p="";for(var v=0,w=0,M=0;M>>24-v&16777215,v+=2,v>=26&&(v-=26,M--),w!==0||M!==this.length-1?p=y[6-m.length]+m+p:p=m+p}for(w!==0&&(p=w.toString(16)+p);p.length%h!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(u===(u|0)&&u>=2&&u<=36){var f=C[u],E=A[u];p="";var U=this.clone();for(U.negative=0;!U.isZero();){var q=U.modrn(E).toString(u);U=U.idivn(E),U.isZero()?p=q+p:p=y[f-q.length]+q+p}for(this.isZero()&&(p="0"+p);p.length%h!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var u=this.words[0];return this.length===2?u+=this.words[1]*67108864:this.length===3&&this.words[2]===1?u+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-u:u},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(u,h){return this.toArrayLike(o,u,h)}),s.prototype.toArray=function(u,h){return this.toArrayLike(Array,u,h)};var D=function(u,h){return u.allocUnsafe?u.allocUnsafe(h):new u(h)};s.prototype.toArrayLike=function(u,h,p){this._strip();var v=this.byteLength(),w=p||Math.max(1,v);n(v<=w,"byte array longer than desired length"),n(w>0,"Requested array length <= 0");var M=D(u,w),T=h==="le"?"LE":"BE";return this["_toArrayLike"+T](M,v),M},s.prototype._toArrayLikeLE=function(u,h){for(var p=0,v=0,w=0,M=0;w>8&255),p>16&255),M===6?(p>24&255),v=0,M=0):(v=T>>>24,M+=2)}if(p=0&&(u[p--]=T>>8&255),p>=0&&(u[p--]=T>>16&255),M===6?(p>=0&&(u[p--]=T>>24&255),v=0,M=0):(v=T>>>24,M+=2)}if(p>=0)for(u[p--]=v;p>=0;)u[p--]=0},Math.clz32?s.prototype._countBits=function(u){return 32-Math.clz32(u)}:s.prototype._countBits=function(u){var h=u,p=0;return h>=4096&&(p+=13,h>>>=13),h>=64&&(p+=7,h>>>=7),h>=8&&(p+=4,h>>>=4),h>=2&&(p+=2,h>>>=2),p+h},s.prototype._zeroBits=function(u){if(u===0)return 26;var h=u,p=0;return h&8191||(p+=13,h>>>=13),h&127||(p+=7,h>>>=7),h&15||(p+=4,h>>>=4),h&3||(p+=2,h>>>=2),h&1||p++,p},s.prototype.bitLength=function(){var u=this.words[this.length-1],h=this._countBits(u);return(this.length-1)*26+h};function N(b){for(var u=new Array(b.bitLength()),h=0;h>>v&1}return u}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var u=0,h=0;hu.length?this.clone().ior(u):u.clone().ior(this)},s.prototype.uor=function(u){return this.length>u.length?this.clone().iuor(u):u.clone().iuor(this)},s.prototype.iuand=function(u){var h;this.length>u.length?h=u:h=this;for(var p=0;pu.length?this.clone().iand(u):u.clone().iand(this)},s.prototype.uand=function(u){return this.length>u.length?this.clone().iuand(u):u.clone().iuand(this)},s.prototype.iuxor=function(u){var h,p;this.length>u.length?(h=this,p=u):(h=u,p=this);for(var v=0;vu.length?this.clone().ixor(u):u.clone().ixor(this)},s.prototype.uxor=function(u){return this.length>u.length?this.clone().iuxor(u):u.clone().iuxor(this)},s.prototype.inotn=function(u){n(typeof u=="number"&&u>=0);var h=Math.ceil(u/26)|0,p=u%26;this._expand(h),p>0&&h--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-p),this._strip()},s.prototype.notn=function(u){return this.clone().inotn(u)},s.prototype.setn=function(u,h){n(typeof u=="number"&&u>=0);var p=u/26|0,v=u%26;return this._expand(p+1),h?this.words[p]=this.words[p]|1<u.length?(p=this,v=u):(p=u,v=this);for(var w=0,M=0;M>>26;for(;w!==0&&M>>26;if(this.length=p.length,w!==0)this.words[this.length]=w,this.length++;else if(p!==this)for(;Mu.length?this.clone().iadd(u):u.clone().iadd(this)},s.prototype.isub=function(u){if(u.negative!==0){u.negative=0;var h=this.iadd(u);return u.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(u),this.negative=1,this._normSign();var p=this.cmp(u);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,w;p>0?(v=this,w=u):(v=u,w=this);for(var M=0,T=0;T>26,this.words[T]=h&67108863;for(;M!==0&&T>26,this.words[T]=h&67108863;if(M===0&&T>>26,U=m&67108863,q=Math.min(f,u.length-1),R=Math.max(0,f-b.length+1);R<=q;R++){var k=f-R|0;v=b.words[k]|0,w=u.words[R]|0,M=v*w+U,E+=M/67108864|0,U=M&67108863}h.words[f]=U|0,m=E|0}return m!==0?h.words[f]=m|0:h.length--,h._strip()}var I=function(u,h,p){var v=u.words,w=h.words,M=p.words,T=0,m,f,E,U=v[0]|0,q=U&8191,R=U>>>13,k=v[1]|0,$=k&8191,V=k>>>13,se=v[2]|0,_=se&8191,S=se>>>13,F=v[3]|0,H=F&8191,re=F>>>13,ie=v[4]|0,ee=ie&8191,de=ie>>>13,Jt=v[5]|0,we=Jt&8191,Se=Jt>>>13,vr=v[6]|0,ve=vr&8191,ye=vr>>>13,ur=v[7]|0,be=ur&8191,pe=ur>>>13,xt=v[8]|0,Ee=xt&8191,xe=xt>>>13,wn=v[9]|0,Me=wn&8191,Ce=wn>>>13,_n=w[0]|0,Re=_n&8191,Ie=_n>>>13,Sn=w[1]|0,Ae=Sn&8191,Te=Sn>>>13,En=w[2]|0,ke=En&8191,Oe=En>>>13,xn=w[3]|0,Ne=xn&8191,Le=xn>>>13,Mn=w[4]|0,Pe=Mn&8191,De=Mn>>>13,Cn=w[5]|0,$e=Cn&8191,Be=Cn>>>13,Rn=w[6]|0,je=Rn&8191,Fe=Rn>>>13,In=w[7]|0,We=In&8191,He=In>>>13,An=w[8]|0,Ve=An&8191,Ue=An>>>13,Tn=w[9]|0,ze=Tn&8191,qe=Tn>>>13;p.negative=u.negative^h.negative,p.length=19,m=Math.imul(q,Re),f=Math.imul(q,Ie),f=f+Math.imul(R,Re)|0,E=Math.imul(R,Ie);var Or=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Or>>>26)|0,Or&=67108863,m=Math.imul($,Re),f=Math.imul($,Ie),f=f+Math.imul(V,Re)|0,E=Math.imul(V,Ie),m=m+Math.imul(q,Ae)|0,f=f+Math.imul(q,Te)|0,f=f+Math.imul(R,Ae)|0,E=E+Math.imul(R,Te)|0;var Nr=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,m=Math.imul(_,Re),f=Math.imul(_,Ie),f=f+Math.imul(S,Re)|0,E=Math.imul(S,Ie),m=m+Math.imul($,Ae)|0,f=f+Math.imul($,Te)|0,f=f+Math.imul(V,Ae)|0,E=E+Math.imul(V,Te)|0,m=m+Math.imul(q,ke)|0,f=f+Math.imul(q,Oe)|0,f=f+Math.imul(R,ke)|0,E=E+Math.imul(R,Oe)|0;var Lr=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,m=Math.imul(H,Re),f=Math.imul(H,Ie),f=f+Math.imul(re,Re)|0,E=Math.imul(re,Ie),m=m+Math.imul(_,Ae)|0,f=f+Math.imul(_,Te)|0,f=f+Math.imul(S,Ae)|0,E=E+Math.imul(S,Te)|0,m=m+Math.imul($,ke)|0,f=f+Math.imul($,Oe)|0,f=f+Math.imul(V,ke)|0,E=E+Math.imul(V,Oe)|0,m=m+Math.imul(q,Ne)|0,f=f+Math.imul(q,Le)|0,f=f+Math.imul(R,Ne)|0,E=E+Math.imul(R,Le)|0;var Pr=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,m=Math.imul(ee,Re),f=Math.imul(ee,Ie),f=f+Math.imul(de,Re)|0,E=Math.imul(de,Ie),m=m+Math.imul(H,Ae)|0,f=f+Math.imul(H,Te)|0,f=f+Math.imul(re,Ae)|0,E=E+Math.imul(re,Te)|0,m=m+Math.imul(_,ke)|0,f=f+Math.imul(_,Oe)|0,f=f+Math.imul(S,ke)|0,E=E+Math.imul(S,Oe)|0,m=m+Math.imul($,Ne)|0,f=f+Math.imul($,Le)|0,f=f+Math.imul(V,Ne)|0,E=E+Math.imul(V,Le)|0,m=m+Math.imul(q,Pe)|0,f=f+Math.imul(q,De)|0,f=f+Math.imul(R,Pe)|0,E=E+Math.imul(R,De)|0;var Dr=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Dr>>>26)|0,Dr&=67108863,m=Math.imul(we,Re),f=Math.imul(we,Ie),f=f+Math.imul(Se,Re)|0,E=Math.imul(Se,Ie),m=m+Math.imul(ee,Ae)|0,f=f+Math.imul(ee,Te)|0,f=f+Math.imul(de,Ae)|0,E=E+Math.imul(de,Te)|0,m=m+Math.imul(H,ke)|0,f=f+Math.imul(H,Oe)|0,f=f+Math.imul(re,ke)|0,E=E+Math.imul(re,Oe)|0,m=m+Math.imul(_,Ne)|0,f=f+Math.imul(_,Le)|0,f=f+Math.imul(S,Ne)|0,E=E+Math.imul(S,Le)|0,m=m+Math.imul($,Pe)|0,f=f+Math.imul($,De)|0,f=f+Math.imul(V,Pe)|0,E=E+Math.imul(V,De)|0,m=m+Math.imul(q,$e)|0,f=f+Math.imul(q,Be)|0,f=f+Math.imul(R,$e)|0,E=E+Math.imul(R,Be)|0;var $r=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+($r>>>26)|0,$r&=67108863,m=Math.imul(ve,Re),f=Math.imul(ve,Ie),f=f+Math.imul(ye,Re)|0,E=Math.imul(ye,Ie),m=m+Math.imul(we,Ae)|0,f=f+Math.imul(we,Te)|0,f=f+Math.imul(Se,Ae)|0,E=E+Math.imul(Se,Te)|0,m=m+Math.imul(ee,ke)|0,f=f+Math.imul(ee,Oe)|0,f=f+Math.imul(de,ke)|0,E=E+Math.imul(de,Oe)|0,m=m+Math.imul(H,Ne)|0,f=f+Math.imul(H,Le)|0,f=f+Math.imul(re,Ne)|0,E=E+Math.imul(re,Le)|0,m=m+Math.imul(_,Pe)|0,f=f+Math.imul(_,De)|0,f=f+Math.imul(S,Pe)|0,E=E+Math.imul(S,De)|0,m=m+Math.imul($,$e)|0,f=f+Math.imul($,Be)|0,f=f+Math.imul(V,$e)|0,E=E+Math.imul(V,Be)|0,m=m+Math.imul(q,je)|0,f=f+Math.imul(q,Fe)|0,f=f+Math.imul(R,je)|0,E=E+Math.imul(R,Fe)|0;var Br=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Br>>>26)|0,Br&=67108863,m=Math.imul(be,Re),f=Math.imul(be,Ie),f=f+Math.imul(pe,Re)|0,E=Math.imul(pe,Ie),m=m+Math.imul(ve,Ae)|0,f=f+Math.imul(ve,Te)|0,f=f+Math.imul(ye,Ae)|0,E=E+Math.imul(ye,Te)|0,m=m+Math.imul(we,ke)|0,f=f+Math.imul(we,Oe)|0,f=f+Math.imul(Se,ke)|0,E=E+Math.imul(Se,Oe)|0,m=m+Math.imul(ee,Ne)|0,f=f+Math.imul(ee,Le)|0,f=f+Math.imul(de,Ne)|0,E=E+Math.imul(de,Le)|0,m=m+Math.imul(H,Pe)|0,f=f+Math.imul(H,De)|0,f=f+Math.imul(re,Pe)|0,E=E+Math.imul(re,De)|0,m=m+Math.imul(_,$e)|0,f=f+Math.imul(_,Be)|0,f=f+Math.imul(S,$e)|0,E=E+Math.imul(S,Be)|0,m=m+Math.imul($,je)|0,f=f+Math.imul($,Fe)|0,f=f+Math.imul(V,je)|0,E=E+Math.imul(V,Fe)|0,m=m+Math.imul(q,We)|0,f=f+Math.imul(q,He)|0,f=f+Math.imul(R,We)|0,E=E+Math.imul(R,He)|0;var jr=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(jr>>>26)|0,jr&=67108863,m=Math.imul(Ee,Re),f=Math.imul(Ee,Ie),f=f+Math.imul(xe,Re)|0,E=Math.imul(xe,Ie),m=m+Math.imul(be,Ae)|0,f=f+Math.imul(be,Te)|0,f=f+Math.imul(pe,Ae)|0,E=E+Math.imul(pe,Te)|0,m=m+Math.imul(ve,ke)|0,f=f+Math.imul(ve,Oe)|0,f=f+Math.imul(ye,ke)|0,E=E+Math.imul(ye,Oe)|0,m=m+Math.imul(we,Ne)|0,f=f+Math.imul(we,Le)|0,f=f+Math.imul(Se,Ne)|0,E=E+Math.imul(Se,Le)|0,m=m+Math.imul(ee,Pe)|0,f=f+Math.imul(ee,De)|0,f=f+Math.imul(de,Pe)|0,E=E+Math.imul(de,De)|0,m=m+Math.imul(H,$e)|0,f=f+Math.imul(H,Be)|0,f=f+Math.imul(re,$e)|0,E=E+Math.imul(re,Be)|0,m=m+Math.imul(_,je)|0,f=f+Math.imul(_,Fe)|0,f=f+Math.imul(S,je)|0,E=E+Math.imul(S,Fe)|0,m=m+Math.imul($,We)|0,f=f+Math.imul($,He)|0,f=f+Math.imul(V,We)|0,E=E+Math.imul(V,He)|0,m=m+Math.imul(q,Ve)|0,f=f+Math.imul(q,Ue)|0,f=f+Math.imul(R,Ve)|0,E=E+Math.imul(R,Ue)|0;var Fr=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,m=Math.imul(Me,Re),f=Math.imul(Me,Ie),f=f+Math.imul(Ce,Re)|0,E=Math.imul(Ce,Ie),m=m+Math.imul(Ee,Ae)|0,f=f+Math.imul(Ee,Te)|0,f=f+Math.imul(xe,Ae)|0,E=E+Math.imul(xe,Te)|0,m=m+Math.imul(be,ke)|0,f=f+Math.imul(be,Oe)|0,f=f+Math.imul(pe,ke)|0,E=E+Math.imul(pe,Oe)|0,m=m+Math.imul(ve,Ne)|0,f=f+Math.imul(ve,Le)|0,f=f+Math.imul(ye,Ne)|0,E=E+Math.imul(ye,Le)|0,m=m+Math.imul(we,Pe)|0,f=f+Math.imul(we,De)|0,f=f+Math.imul(Se,Pe)|0,E=E+Math.imul(Se,De)|0,m=m+Math.imul(ee,$e)|0,f=f+Math.imul(ee,Be)|0,f=f+Math.imul(de,$e)|0,E=E+Math.imul(de,Be)|0,m=m+Math.imul(H,je)|0,f=f+Math.imul(H,Fe)|0,f=f+Math.imul(re,je)|0,E=E+Math.imul(re,Fe)|0,m=m+Math.imul(_,We)|0,f=f+Math.imul(_,He)|0,f=f+Math.imul(S,We)|0,E=E+Math.imul(S,He)|0,m=m+Math.imul($,Ve)|0,f=f+Math.imul($,Ue)|0,f=f+Math.imul(V,Ve)|0,E=E+Math.imul(V,Ue)|0,m=m+Math.imul(q,ze)|0,f=f+Math.imul(q,qe)|0,f=f+Math.imul(R,ze)|0,E=E+Math.imul(R,qe)|0;var Wr=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,m=Math.imul(Me,Ae),f=Math.imul(Me,Te),f=f+Math.imul(Ce,Ae)|0,E=Math.imul(Ce,Te),m=m+Math.imul(Ee,ke)|0,f=f+Math.imul(Ee,Oe)|0,f=f+Math.imul(xe,ke)|0,E=E+Math.imul(xe,Oe)|0,m=m+Math.imul(be,Ne)|0,f=f+Math.imul(be,Le)|0,f=f+Math.imul(pe,Ne)|0,E=E+Math.imul(pe,Le)|0,m=m+Math.imul(ve,Pe)|0,f=f+Math.imul(ve,De)|0,f=f+Math.imul(ye,Pe)|0,E=E+Math.imul(ye,De)|0,m=m+Math.imul(we,$e)|0,f=f+Math.imul(we,Be)|0,f=f+Math.imul(Se,$e)|0,E=E+Math.imul(Se,Be)|0,m=m+Math.imul(ee,je)|0,f=f+Math.imul(ee,Fe)|0,f=f+Math.imul(de,je)|0,E=E+Math.imul(de,Fe)|0,m=m+Math.imul(H,We)|0,f=f+Math.imul(H,He)|0,f=f+Math.imul(re,We)|0,E=E+Math.imul(re,He)|0,m=m+Math.imul(_,Ve)|0,f=f+Math.imul(_,Ue)|0,f=f+Math.imul(S,Ve)|0,E=E+Math.imul(S,Ue)|0,m=m+Math.imul($,ze)|0,f=f+Math.imul($,qe)|0,f=f+Math.imul(V,ze)|0,E=E+Math.imul(V,qe)|0;var Hr=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,m=Math.imul(Me,ke),f=Math.imul(Me,Oe),f=f+Math.imul(Ce,ke)|0,E=Math.imul(Ce,Oe),m=m+Math.imul(Ee,Ne)|0,f=f+Math.imul(Ee,Le)|0,f=f+Math.imul(xe,Ne)|0,E=E+Math.imul(xe,Le)|0,m=m+Math.imul(be,Pe)|0,f=f+Math.imul(be,De)|0,f=f+Math.imul(pe,Pe)|0,E=E+Math.imul(pe,De)|0,m=m+Math.imul(ve,$e)|0,f=f+Math.imul(ve,Be)|0,f=f+Math.imul(ye,$e)|0,E=E+Math.imul(ye,Be)|0,m=m+Math.imul(we,je)|0,f=f+Math.imul(we,Fe)|0,f=f+Math.imul(Se,je)|0,E=E+Math.imul(Se,Fe)|0,m=m+Math.imul(ee,We)|0,f=f+Math.imul(ee,He)|0,f=f+Math.imul(de,We)|0,E=E+Math.imul(de,He)|0,m=m+Math.imul(H,Ve)|0,f=f+Math.imul(H,Ue)|0,f=f+Math.imul(re,Ve)|0,E=E+Math.imul(re,Ue)|0,m=m+Math.imul(_,ze)|0,f=f+Math.imul(_,qe)|0,f=f+Math.imul(S,ze)|0,E=E+Math.imul(S,qe)|0;var Vr=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,m=Math.imul(Me,Ne),f=Math.imul(Me,Le),f=f+Math.imul(Ce,Ne)|0,E=Math.imul(Ce,Le),m=m+Math.imul(Ee,Pe)|0,f=f+Math.imul(Ee,De)|0,f=f+Math.imul(xe,Pe)|0,E=E+Math.imul(xe,De)|0,m=m+Math.imul(be,$e)|0,f=f+Math.imul(be,Be)|0,f=f+Math.imul(pe,$e)|0,E=E+Math.imul(pe,Be)|0,m=m+Math.imul(ve,je)|0,f=f+Math.imul(ve,Fe)|0,f=f+Math.imul(ye,je)|0,E=E+Math.imul(ye,Fe)|0,m=m+Math.imul(we,We)|0,f=f+Math.imul(we,He)|0,f=f+Math.imul(Se,We)|0,E=E+Math.imul(Se,He)|0,m=m+Math.imul(ee,Ve)|0,f=f+Math.imul(ee,Ue)|0,f=f+Math.imul(de,Ve)|0,E=E+Math.imul(de,Ue)|0,m=m+Math.imul(H,ze)|0,f=f+Math.imul(H,qe)|0,f=f+Math.imul(re,ze)|0,E=E+Math.imul(re,qe)|0;var Ur=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,m=Math.imul(Me,Pe),f=Math.imul(Me,De),f=f+Math.imul(Ce,Pe)|0,E=Math.imul(Ce,De),m=m+Math.imul(Ee,$e)|0,f=f+Math.imul(Ee,Be)|0,f=f+Math.imul(xe,$e)|0,E=E+Math.imul(xe,Be)|0,m=m+Math.imul(be,je)|0,f=f+Math.imul(be,Fe)|0,f=f+Math.imul(pe,je)|0,E=E+Math.imul(pe,Fe)|0,m=m+Math.imul(ve,We)|0,f=f+Math.imul(ve,He)|0,f=f+Math.imul(ye,We)|0,E=E+Math.imul(ye,He)|0,m=m+Math.imul(we,Ve)|0,f=f+Math.imul(we,Ue)|0,f=f+Math.imul(Se,Ve)|0,E=E+Math.imul(Se,Ue)|0,m=m+Math.imul(ee,ze)|0,f=f+Math.imul(ee,qe)|0,f=f+Math.imul(de,ze)|0,E=E+Math.imul(de,qe)|0;var zr=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(zr>>>26)|0,zr&=67108863,m=Math.imul(Me,$e),f=Math.imul(Me,Be),f=f+Math.imul(Ce,$e)|0,E=Math.imul(Ce,Be),m=m+Math.imul(Ee,je)|0,f=f+Math.imul(Ee,Fe)|0,f=f+Math.imul(xe,je)|0,E=E+Math.imul(xe,Fe)|0,m=m+Math.imul(be,We)|0,f=f+Math.imul(be,He)|0,f=f+Math.imul(pe,We)|0,E=E+Math.imul(pe,He)|0,m=m+Math.imul(ve,Ve)|0,f=f+Math.imul(ve,Ue)|0,f=f+Math.imul(ye,Ve)|0,E=E+Math.imul(ye,Ue)|0,m=m+Math.imul(we,ze)|0,f=f+Math.imul(we,qe)|0,f=f+Math.imul(Se,ze)|0,E=E+Math.imul(Se,qe)|0;var Ko=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Ko>>>26)|0,Ko&=67108863,m=Math.imul(Me,je),f=Math.imul(Me,Fe),f=f+Math.imul(Ce,je)|0,E=Math.imul(Ce,Fe),m=m+Math.imul(Ee,We)|0,f=f+Math.imul(Ee,He)|0,f=f+Math.imul(xe,We)|0,E=E+Math.imul(xe,He)|0,m=m+Math.imul(be,Ve)|0,f=f+Math.imul(be,Ue)|0,f=f+Math.imul(pe,Ve)|0,E=E+Math.imul(pe,Ue)|0,m=m+Math.imul(ve,ze)|0,f=f+Math.imul(ve,qe)|0,f=f+Math.imul(ye,ze)|0,E=E+Math.imul(ye,qe)|0;var Xo=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,m=Math.imul(Me,We),f=Math.imul(Me,He),f=f+Math.imul(Ce,We)|0,E=Math.imul(Ce,He),m=m+Math.imul(Ee,Ve)|0,f=f+Math.imul(Ee,Ue)|0,f=f+Math.imul(xe,Ve)|0,E=E+Math.imul(xe,Ue)|0,m=m+Math.imul(be,ze)|0,f=f+Math.imul(be,qe)|0,f=f+Math.imul(pe,ze)|0,E=E+Math.imul(pe,qe)|0;var ea=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(ea>>>26)|0,ea&=67108863,m=Math.imul(Me,Ve),f=Math.imul(Me,Ue),f=f+Math.imul(Ce,Ve)|0,E=Math.imul(Ce,Ue),m=m+Math.imul(Ee,ze)|0,f=f+Math.imul(Ee,qe)|0,f=f+Math.imul(xe,ze)|0,E=E+Math.imul(xe,qe)|0;var ta=(T+m|0)+((f&8191)<<13)|0;T=(E+(f>>>13)|0)+(ta>>>26)|0,ta&=67108863,m=Math.imul(Me,ze),f=Math.imul(Me,qe),f=f+Math.imul(Ce,ze)|0,E=Math.imul(Ce,qe);var ra=(T+m|0)+((f&8191)<<13)|0;return T=(E+(f>>>13)|0)+(ra>>>26)|0,ra&=67108863,M[0]=Or,M[1]=Nr,M[2]=Lr,M[3]=Pr,M[4]=Dr,M[5]=$r,M[6]=Br,M[7]=jr,M[8]=Fr,M[9]=Wr,M[10]=Hr,M[11]=Vr,M[12]=Ur,M[13]=zr,M[14]=Ko,M[15]=Xo,M[16]=ea,M[17]=ta,M[18]=ra,T!==0&&(M[19]=T,p.length++),p};Math.imul||(I=x);function O(b,u,h){h.negative=u.negative^b.negative,h.length=b.length+u.length;for(var p=0,v=0,w=0;w>>26)|0,v+=M>>>26,M&=67108863}h.words[w]=T,p=M,M=v}return p!==0?h.words[w]=p:h.length--,h._strip()}function P(b,u,h){return O(b,u,h)}s.prototype.mulTo=function(u,h){var p,v=this.length+u.length;return this.length===10&&u.length===10?p=I(this,u,h):v<63?p=x(this,u,h):v<1024?p=O(this,u,h):p=P(this,u,h),p},s.prototype.mul=function(u){var h=new s(null);return h.words=new Array(this.length+u.length),this.mulTo(u,h)},s.prototype.mulf=function(u){var h=new s(null);return h.words=new Array(this.length+u.length),P(this,u,h)},s.prototype.imul=function(u){return this.clone().mulTo(u,this)},s.prototype.imuln=function(u){var h=u<0;h&&(u=-u),n(typeof u=="number"),n(u<67108864);for(var p=0,v=0;v>=26,p+=w/67108864|0,p+=M>>>26,this.words[v]=M&67108863}return p!==0&&(this.words[v]=p,this.length++),h?this.ineg():this},s.prototype.muln=function(u){return this.clone().imuln(u)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(u){var h=N(u);if(h.length===0)return new s(1);for(var p=this,v=0;v=0);var h=u%26,p=(u-h)/26,v=67108863>>>26-h<<26-h,w;if(h!==0){var M=0;for(w=0;w>>26-h}M&&(this.words[w]=M,this.length++)}if(p!==0){for(w=this.length-1;w>=0;w--)this.words[w+p]=this.words[w];for(w=0;w=0);var v;h?v=(h-h%26)/26:v=0;var w=u%26,M=Math.min((u-w)/26,this.length),T=67108863^67108863>>>w<M)for(this.length-=M,f=0;f=0&&(E!==0||f>=v);f--){var U=this.words[f]|0;this.words[f]=E<<26-w|U>>>w,E=U&T}return m&&E!==0&&(m.words[m.length++]=E),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(u,h,p){return n(this.negative===0),this.iushrn(u,h,p)},s.prototype.shln=function(u){return this.clone().ishln(u)},s.prototype.ushln=function(u){return this.clone().iushln(u)},s.prototype.shrn=function(u){return this.clone().ishrn(u)},s.prototype.ushrn=function(u){return this.clone().iushrn(u)},s.prototype.testn=function(u){n(typeof u=="number"&&u>=0);var h=u%26,p=(u-h)/26,v=1<=0);var h=u%26,p=(u-h)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(h!==0&&p++,this.length=Math.min(p,this.length),h!==0){var v=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(u){if(n(typeof u=="number"),n(u<67108864),u<0)return this.iaddn(-u);if(this.negative!==0)return this.negative=0,this.iaddn(u),this.negative=1,this;if(this.words[0]-=u,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(m/67108864|0),this.words[w+p]=M&67108863}for(;w>26,this.words[w+p]=M&67108863;if(T===0)return this._strip();for(n(T===-1),T=0,w=0;w>26,this.words[w]=M&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(u,h){var p=this.length-u.length,v=this.clone(),w=u,M=w.words[w.length-1]|0,T=this._countBits(M);p=26-T,p!==0&&(w=w.ushln(p),v.iushln(p),M=w.words[w.length-1]|0);var m=v.length-w.length,f;if(h!=="mod"){f=new s(null),f.length=m+1,f.words=new Array(f.length);for(var E=0;E=0;q--){var R=(v.words[w.length+q]|0)*67108864+(v.words[w.length+q-1]|0);for(R=Math.min(R/M|0,67108863),v._ishlnsubmul(w,R,q);v.negative!==0;)R--,v.negative=0,v._ishlnsubmul(w,1,q),v.isZero()||(v.negative^=1);f&&(f.words[q]=R)}return f&&f._strip(),v._strip(),h!=="div"&&p!==0&&v.iushrn(p),{div:f||null,mod:v}},s.prototype.divmod=function(u,h,p){if(n(!u.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var v,w,M;return this.negative!==0&&u.negative===0?(M=this.neg().divmod(u,h),h!=="mod"&&(v=M.div.neg()),h!=="div"&&(w=M.mod.neg(),p&&w.negative!==0&&w.iadd(u)),{div:v,mod:w}):this.negative===0&&u.negative!==0?(M=this.divmod(u.neg(),h),h!=="mod"&&(v=M.div.neg()),{div:v,mod:M.mod}):this.negative&u.negative?(M=this.neg().divmod(u.neg(),h),h!=="div"&&(w=M.mod.neg(),p&&w.negative!==0&&w.isub(u)),{div:M.div,mod:w}):u.length>this.length||this.cmp(u)<0?{div:new s(0),mod:this}:u.length===1?h==="div"?{div:this.divn(u.words[0]),mod:null}:h==="mod"?{div:null,mod:new s(this.modrn(u.words[0]))}:{div:this.divn(u.words[0]),mod:new s(this.modrn(u.words[0]))}:this._wordDiv(u,h)},s.prototype.div=function(u){return this.divmod(u,"div",!1).div},s.prototype.mod=function(u){return this.divmod(u,"mod",!1).mod},s.prototype.umod=function(u){return this.divmod(u,"mod",!0).mod},s.prototype.divRound=function(u){var h=this.divmod(u);if(h.mod.isZero())return h.div;var p=h.div.negative!==0?h.mod.isub(u):h.mod,v=u.ushrn(1),w=u.andln(1),M=p.cmp(v);return M<0||w===1&&M===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modrn=function(u){var h=u<0;h&&(u=-u),n(u<=67108863);for(var p=(1<<26)%u,v=0,w=this.length-1;w>=0;w--)v=(p*v+(this.words[w]|0))%u;return h?-v:v},s.prototype.modn=function(u){return this.modrn(u)},s.prototype.idivn=function(u){var h=u<0;h&&(u=-u),n(u<=67108863);for(var p=0,v=this.length-1;v>=0;v--){var w=(this.words[v]|0)+p*67108864;this.words[v]=w/u|0,p=w%u}return this._strip(),h?this.ineg():this},s.prototype.divn=function(u){return this.clone().idivn(u)},s.prototype.egcd=function(u){n(u.negative===0),n(!u.isZero());var h=this,p=u.clone();h.negative!==0?h=h.umod(u):h=h.clone();for(var v=new s(1),w=new s(0),M=new s(0),T=new s(1),m=0;h.isEven()&&p.isEven();)h.iushrn(1),p.iushrn(1),++m;for(var f=p.clone(),E=h.clone();!h.isZero();){for(var U=0,q=1;!(h.words[0]&q)&&U<26;++U,q<<=1);if(U>0)for(h.iushrn(U);U-- >0;)(v.isOdd()||w.isOdd())&&(v.iadd(f),w.isub(E)),v.iushrn(1),w.iushrn(1);for(var R=0,k=1;!(p.words[0]&k)&&R<26;++R,k<<=1);if(R>0)for(p.iushrn(R);R-- >0;)(M.isOdd()||T.isOdd())&&(M.iadd(f),T.isub(E)),M.iushrn(1),T.iushrn(1);h.cmp(p)>=0?(h.isub(p),v.isub(M),w.isub(T)):(p.isub(h),M.isub(v),T.isub(w))}return{a:M,b:T,gcd:p.iushln(m)}},s.prototype._invmp=function(u){n(u.negative===0),n(!u.isZero());var h=this,p=u.clone();h.negative!==0?h=h.umod(u):h=h.clone();for(var v=new s(1),w=new s(0),M=p.clone();h.cmpn(1)>0&&p.cmpn(1)>0;){for(var T=0,m=1;!(h.words[0]&m)&&T<26;++T,m<<=1);if(T>0)for(h.iushrn(T);T-- >0;)v.isOdd()&&v.iadd(M),v.iushrn(1);for(var f=0,E=1;!(p.words[0]&E)&&f<26;++f,E<<=1);if(f>0)for(p.iushrn(f);f-- >0;)w.isOdd()&&w.iadd(M),w.iushrn(1);h.cmp(p)>=0?(h.isub(p),v.isub(w)):(p.isub(h),w.isub(v))}var U;return h.cmpn(1)===0?U=v:U=w,U.cmpn(0)<0&&U.iadd(u),U},s.prototype.gcd=function(u){if(this.isZero())return u.abs();if(u.isZero())return this.abs();var h=this.clone(),p=u.clone();h.negative=0,p.negative=0;for(var v=0;h.isEven()&&p.isEven();v++)h.iushrn(1),p.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;p.isEven();)p.iushrn(1);var w=h.cmp(p);if(w<0){var M=h;h=p,p=M}else if(w===0||p.cmpn(1)===0)break;h.isub(p)}while(!0);return p.iushln(v)},s.prototype.invm=function(u){return this.egcd(u).a.umod(u)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(u){return this.words[0]&u},s.prototype.bincn=function(u){n(typeof u=="number");var h=u%26,p=(u-h)/26,v=1<>>26,T&=67108863,this.words[M]=T}return w!==0&&(this.words[M]=w,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(u){var h=u<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this._strip();var p;if(this.length>1)p=1;else{h&&(u=-u),n(u<=67108863,"Number is too big");var v=this.words[0]|0;p=v===u?0:vu.length)return 1;if(this.length=0;p--){var v=this.words[p]|0,w=u.words[p]|0;if(v!==w){vw&&(h=1);break}}return h},s.prototype.gtn=function(u){return this.cmpn(u)===1},s.prototype.gt=function(u){return this.cmp(u)===1},s.prototype.gten=function(u){return this.cmpn(u)>=0},s.prototype.gte=function(u){return this.cmp(u)>=0},s.prototype.ltn=function(u){return this.cmpn(u)===-1},s.prototype.lt=function(u){return this.cmp(u)===-1},s.prototype.lten=function(u){return this.cmpn(u)<=0},s.prototype.lte=function(u){return this.cmp(u)<=0},s.prototype.eqn=function(u){return this.cmpn(u)===0},s.prototype.eq=function(u){return this.cmp(u)===0},s.red=function(u){return new Y(u)},s.prototype.toRed=function(u){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),u.convertTo(this)._forceRed(u)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(u){return this.red=u,this},s.prototype.forceRed=function(u){return n(!this.red,"Already a number in reduction context"),this._forceRed(u)},s.prototype.redAdd=function(u){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,u)},s.prototype.redIAdd=function(u){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,u)},s.prototype.redSub=function(u){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,u)},s.prototype.redISub=function(u){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,u)},s.prototype.redShl=function(u){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,u)},s.prototype.redMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.mul(this,u)},s.prototype.redIMul=function(u){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,u),this.red.imul(this,u)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(u){return n(this.red&&!u.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,u)};var L={k256:null,p224:null,p192:null,p25519:null};function B(b,u){this.name=b,this.p=new s(u,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var u=new s(null);return u.words=new Array(Math.ceil(this.n/13)),u},B.prototype.ireduce=function(u){var h=u,p;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),p=h.bitLength();while(p>this.n);var v=p0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},B.prototype.split=function(u,h){u.iushrn(this.n,0,h)},B.prototype.imulK=function(u){return u.imul(this.k)};function G(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(G,B),G.prototype.split=function(u,h){for(var p=4194303,v=Math.min(u.length,9),w=0;w>>22,M=T}M>>>=22,u.words[w-10]=M,M===0&&u.length>10?u.length-=10:u.length-=9},G.prototype.imulK=function(u){u.words[u.length]=0,u.words[u.length+1]=0,u.length+=2;for(var h=0,p=0;p>>=26,u.words[p]=w,h=v}return h!==0&&(u.words[u.length++]=h),u},s._prime=function(u){if(L[u])return L[u];var h;if(u==="k256")h=new G;else if(u==="p224")h=new z;else if(u==="p192")h=new W;else if(u==="p25519")h=new K;else throw new Error("Unknown prime "+u);return L[u]=h,h};function Y(b){if(typeof b=="string"){var u=s._prime(b);this.m=u.p,this.prime=u}else n(b.gtn(1),"modulus must be greater than 1"),this.m=b,this.prime=null}Y.prototype._verify1=function(u){n(u.negative===0,"red works only with positives"),n(u.red,"red works only with red numbers")},Y.prototype._verify2=function(u,h){n((u.negative|h.negative)===0,"red works only with positives"),n(u.red&&u.red===h.red,"red works only with red numbers")},Y.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(d(u,u.umod(this.m)._forceRed(this)),u)},Y.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},Y.prototype.add=function(u,h){this._verify2(u,h);var p=u.add(h);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},Y.prototype.iadd=function(u,h){this._verify2(u,h);var p=u.iadd(h);return p.cmp(this.m)>=0&&p.isub(this.m),p},Y.prototype.sub=function(u,h){this._verify2(u,h);var p=u.sub(h);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},Y.prototype.isub=function(u,h){this._verify2(u,h);var p=u.isub(h);return p.cmpn(0)<0&&p.iadd(this.m),p},Y.prototype.shl=function(u,h){return this._verify1(u),this.imod(u.ushln(h))},Y.prototype.imul=function(u,h){return this._verify2(u,h),this.imod(u.imul(h))},Y.prototype.mul=function(u,h){return this._verify2(u,h),this.imod(u.mul(h))},Y.prototype.isqr=function(u){return this.imul(u,u.clone())},Y.prototype.sqr=function(u){return this.mul(u,u)},Y.prototype.sqrt=function(u){if(u.isZero())return u.clone();var h=this.m.andln(3);if(n(h%2===1),h===3){var p=this.m.add(new s(1)).iushrn(2);return this.pow(u,p)}for(var v=this.m.subn(1),w=0;!v.isZero()&&v.andln(1)===0;)w++,v.iushrn(1);n(!v.isZero());var M=new s(1).toRed(this),T=M.redNeg(),m=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new s(2*f*f).toRed(this);this.pow(f,m).cmp(T)!==0;)f.redIAdd(T);for(var E=this.pow(f,v),U=this.pow(u,v.addn(1).iushrn(1)),q=this.pow(u,v),R=w;q.cmp(M)!==0;){for(var k=q,$=0;k.cmp(M)!==0;$++)k=k.redSqr();n($=0;w--){for(var E=h.words[w],U=f-1;U>=0;U--){var q=E>>U&1;if(M!==v[0]&&(M=this.sqr(M)),q===0&&T===0){m=0;continue}T<<=1,T|=q,m++,!(m!==p&&(w!==0||U!==0))&&(M=this.mul(M,v[T]),m=0,T=0)}f=26}return M},Y.prototype.convertTo=function(u){var h=u.umod(this.m);return h===u?h.clone():h},Y.prototype.convertFrom=function(u){var h=u.clone();return h.red=null,h},s.mont=function(u){return new X(u)};function X(b){Y.call(this,b),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(X,Y),X.prototype.convertTo=function(u){return this.imod(u.ushln(this.shift))},X.prototype.convertFrom=function(u){var h=this.imod(u.mul(this.rinv));return h.red=null,h},X.prototype.imul=function(u,h){if(u.isZero()||h.isZero())return u.words[0]=0,u.length=1,u;var p=u.imul(h),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=p.isub(v).iushrn(this.shift),M=w;return w.cmp(this.m)>=0?M=w.isub(this.m):w.cmpn(0)<0&&(M=w.iadd(this.m)),M._forceRed(this)},X.prototype.mul=function(u,h){if(u.isZero()||h.isZero())return new s(0)._forceRed(this);var p=u.mul(h),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),w=p.isub(v).iushrn(this.shift),M=w;return w.cmp(this.m)>=0?M=w.isub(this.m):w.cmpn(0)<0&&(M=w.iadd(this.m)),M._forceRed(this)},X.prototype.invm=function(u){var h=this.imod(u._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(t,Z)})(mu);var Ys=mu.exports,ui={};Object.defineProperty(ui,"__esModule",{value:!0});ui.EVENTS=void 0;ui.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var Vi={},wu={},Cr={},Xp=Di;Di.default=Di;Di.stable=qf;Di.stableStringify=qf;var Ls="[...]",Uf="[Circular]",sn=[],Xr=[];function zf(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Di(t,e,r,n){typeof n>"u"&&(n=zf()),za(t,"",0,[],void 0,0,n);var i;try{Xr.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,Gf(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;sn.length!==0;){var s=sn.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Hn(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),sn.push([n,r,e,i])):Xr.push([e,r,t]):(n[r]=t,sn.push([n,r,e]))}function za(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;ao.depthLimit){Hn(Ls,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Hn(Ls,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;ae?1:0}function qf(t,e,r,n){typeof n>"u"&&(n=zf());var i=qa(t,"",0,[],void 0,0,n)||t,s;try{Xr.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,Gf(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;sn.length!==0;){var o=sn.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function qa(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;ao.depthLimit){Hn(Ls,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Hn(Ls,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a0)for(var n=0;n=1e3&&t<=4999}function i0(t,e){if(e!=="[Circular]")return e}var _u={},Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.errorValues=Rr.errorCodes=void 0;Rr.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};Rr.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=Rr,r=Cr,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:o(n)};t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(y,C=i){if(Number.isInteger(y)){const A=y.toString();if(g(e.errorValues,A))return e.errorValues[A].message;if(l(y))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return C}t.getMessageFromCode=o;function a(y){if(!Number.isInteger(y))return!1;const C=y.toString();return!!(e.errorValues[C]||l(y))}t.isValidCode=a;function c(y,{fallbackError:C=s,shouldIncludeStack:A=!1}={}){var D,N;if(!C||!Number.isInteger(C.code)||typeof C.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(y instanceof r.EthereumRpcError)return y.serialize();const x={};if(y&&typeof y=="object"&&!Array.isArray(y)&&g(y,"code")&&a(y.code)){const O=y;x.code=O.code,O.message&&typeof O.message=="string"?(x.message=O.message,g(O,"data")&&(x.data=O.data)):(x.message=o(x.code),x.data={originalError:d(y)})}else{x.code=C.code;const O=(D=y)===null||D===void 0?void 0:D.message;x.message=O&&typeof O=="string"?O:C.message,x.data={originalError:d(y)}}const I=(N=y)===null||N===void 0?void 0:N.stack;return A&&y&&I&&typeof I=="string"&&(x.stack=I),x}t.serializeError=c;function l(y){return y>=-32099&&y<=-32e3}function d(y){return y&&typeof y=="object"&&!Array.isArray(y)?Object.assign({},y):y}function g(y,C){return Object.prototype.hasOwnProperty.call(y,C)}})(_u);var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.ethErrors=void 0;const Su=Cr,Zf=_u,dt=Rr;Ks.ethErrors={rpc:{parse:t=>At(dt.errorCodes.rpc.parse,t),invalidRequest:t=>At(dt.errorCodes.rpc.invalidRequest,t),invalidParams:t=>At(dt.errorCodes.rpc.invalidParams,t),methodNotFound:t=>At(dt.errorCodes.rpc.methodNotFound,t),internal:t=>At(dt.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return At(e,t)},invalidInput:t=>At(dt.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>At(dt.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>At(dt.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>At(dt.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>At(dt.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>At(dt.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>_i(dt.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>_i(dt.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>_i(dt.errorCodes.provider.unsupportedMethod,t),disconnected:t=>_i(dt.errorCodes.provider.disconnected,t),chainDisconnected:t=>_i(dt.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Su.EthereumProviderError(e,r,n)}}};function At(t,e){const[r,n]=Qf(e);return new Su.EthereumRpcError(t,r||Zf.getMessageFromCode(t),n)}function _i(t,e){const[r,n]=Qf(e);return new Su.EthereumProviderError(t,r||Zf.getMessageFromCode(t),n)}function Qf(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const e=Cr;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=_u;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=Ks;Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=Rr;Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(wu);var _e={},Xs={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset",e.selectProvider="selectProvider"}(t.Web3Method||(t.Web3Method={}))})(Xs);Object.defineProperty(_e,"__esModule",{value:!0});_e.EthereumAddressFromSignedMessageResponse=_e.SubmitEthereumTransactionResponse=_e.SignEthereumTransactionResponse=_e.SignEthereumMessageResponse=_e.isRequestEthereumAccountsResponse=_e.SelectProviderResponse=_e.WatchAssetReponse=_e.RequestEthereumAccountsResponse=_e.SwitchEthereumChainResponse=_e.AddEthereumChainResponse=_e.isErrorResponse=void 0;const ar=Xs;function s0(t){var e,r;return((e=t)===null||e===void 0?void 0:e.method)!==void 0&&((r=t)===null||r===void 0?void 0:r.errorMessage)!==void 0}_e.isErrorResponse=s0;function o0(t){return{method:ar.Web3Method.addEthereumChain,result:t}}_e.AddEthereumChainResponse=o0;function a0(t){return{method:ar.Web3Method.switchEthereumChain,result:t}}_e.SwitchEthereumChainResponse=a0;function u0(t){return{method:ar.Web3Method.requestEthereumAccounts,result:t}}_e.RequestEthereumAccountsResponse=u0;function c0(t){return{method:ar.Web3Method.watchAsset,result:t}}_e.WatchAssetReponse=c0;function l0(t){return{method:ar.Web3Method.selectProvider,result:t}}_e.SelectProviderResponse=l0;function f0(t){return t&&t.method===ar.Web3Method.requestEthereumAccounts}_e.isRequestEthereumAccountsResponse=f0;function h0(t){return{method:ar.Web3Method.signEthereumMessage,result:t}}_e.SignEthereumMessageResponse=h0;function d0(t){return{method:ar.Web3Method.signEthereumTransaction,result:t}}_e.SignEthereumTransactionResponse=d0;function p0(t){return{method:ar.Web3Method.submitEthereumTransaction,result:t}}_e.SubmitEthereumTransactionResponse=p0;function g0(t){return{method:ar.Web3Method.ethereumAddressFromSignedMessage,result:t}}_e.EthereumAddressFromSignedMessageResponse=g0;var ci={};Object.defineProperty(ci,"__esModule",{value:!0});ci.LIB_VERSION=void 0;ci.LIB_VERSION="3.7.2";(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;const e=wu,r=_e,n=ci;t.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},e.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},e.errorCodes.provider),{unsupportedChain:4902}))}));function i(d){return d!==void 0?(0,e.getMessageFromCode)(d):"Unknown error"}t.standardErrorMessage=i,t.standardErrors=Object.freeze(Object.assign(Object.assign({},e.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},e.ethErrors.provider),{unsupportedChain:(d="")=>e.ethErrors.provider.custom({code:t.standardErrorCodes.provider.unsupportedChain,message:`Unrecognized chain ID ${d}. Try adding the chain using wallet_addEthereumChain first.`})}))}));function s(d,g){const y=(0,e.serializeError)(o(d),{shouldIncludeStack:!0}),C=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");C.searchParams.set("version",n.LIB_VERSION),C.searchParams.set("code",y.code.toString());const A=a(y.data,g);return A&&C.searchParams.set("method",A),C.searchParams.set("message",y.message),Object.assign(Object.assign({},y),{docUrl:C.href})}t.serializeError=s;function o(d){return typeof d=="string"?{message:d,code:t.standardErrorCodes.rpc.internal}:(0,r.isErrorResponse)(d)?Object.assign(Object.assign({},d),{message:d.errorMessage,code:d.errorCode,data:{method:d.method,result:d.result}}):d}function a(d,g){var y;const C=(y=d)===null||y===void 0?void 0:y.method;if(C)return C;if(g!==void 0)return typeof g=="string"?g:Array.isArray(g)?g.length>0?g[0].method:void 0:g.method}function c(d){var g;if(typeof d=="number")return d;if(l(d))return(g=d.code)!==null&&g!==void 0?g:d.errorCode}t.getErrorCode=c;function l(d){return typeof d=="object"&&d!==null&&(typeof d.code=="number"||typeof d.errorCode=="number")}})(Vi);var li={},Yf={exports:{}},Ga={exports:{}};typeof Object.create=="function"?Ga.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ga.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var zt=Ga.exports,Ja={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(t,e){var r=Hi,n=r.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=s);function s(o,a,c){return n(o,a,c)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=n(o);return a!==void 0?typeof c=="string"?l.fill(a,c):l.fill(a):l.fill(0),l},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(Ja,Ja.exports);var hn=Ja.exports,Kf=hn.Buffer;function eo(t,e){this._block=Kf.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}eo.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=Kf.from(t,e));for(var r=this._block,n=this._blockSize,i=t.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return t?s.toString(t):s};eo.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var fi=eo,b0=zt,Xf=fi,v0=hn.Buffer,y0=[1518500249,1859775393,-1894007588,-899497514],m0=new Array(80);function Ui(){this.init(),this._w=m0,Xf.call(this,64,56)}b0(Ui,Xf);Ui.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function w0(t){return t<<5|t>>>27}function _0(t){return t<<30|t>>>2}function S0(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}Ui.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=t.readInt32BE(a*4);for(;a<80;++a)e[a]=e[a-3]^e[a-8]^e[a-14]^e[a-16];for(var c=0;c<80;++c){var l=~~(c/20),d=w0(r)+S0(l,n,i,s)+o+e[c]+y0[l]|0;o=s,s=i,i=_0(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};Ui.prototype._hash=function(){var t=v0.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var E0=Ui,x0=zt,eh=fi,M0=hn.Buffer,C0=[1518500249,1859775393,-1894007588,-899497514],R0=new Array(80);function zi(){this.init(),this._w=R0,eh.call(this,64,56)}x0(zi,eh);zi.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function I0(t){return t<<1|t>>>31}function A0(t){return t<<5|t>>>27}function T0(t){return t<<30|t>>>2}function k0(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}zi.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=t.readInt32BE(a*4);for(;a<80;++a)e[a]=I0(e[a-3]^e[a-8]^e[a-14]^e[a-16]);for(var c=0;c<80;++c){var l=~~(c/20),d=A0(r)+k0(l,n,i,s)+o+e[c]+C0[l]|0;o=s,s=i,i=T0(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};zi.prototype._hash=function(){var t=M0.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};var O0=zi,N0=zt,th=fi,L0=hn.Buffer,P0=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],D0=new Array(64);function qi(){this.init(),this._w=D0,th.call(this,64,56)}N0(qi,th);qi.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function $0(t,e,r){return r^t&(e^r)}function B0(t,e,r){return t&e|r&(t|e)}function j0(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function F0(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function W0(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function H0(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}qi.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=this._f|0,c=this._g|0,l=this._h|0,d=0;d<16;++d)e[d]=t.readInt32BE(d*4);for(;d<64;++d)e[d]=H0(e[d-2])+e[d-7]+W0(e[d-15])+e[d-16]|0;for(var g=0;g<64;++g){var y=l+F0(o)+$0(o,a,c)+P0[g]+e[g]|0,C=j0(r)+B0(r,n,i)|0;l=c,c=a,a=o,o=s+y|0,s=i,i=n,n=r,r=y+C|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0,this._f=a+this._f|0,this._g=c+this._g|0,this._h=l+this._h|0};qi.prototype._hash=function(){var t=L0.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var rh=qi,V0=zt,U0=rh,z0=fi,q0=hn.Buffer,G0=new Array(64);function to(){this.init(),this._w=G0,z0.call(this,64,56)}V0(to,U0);to.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};to.prototype._hash=function(){var t=q0.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var J0=to,Z0=zt,nh=fi,Q0=hn.Buffer,Ic=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Y0=new Array(160);function Gi(){this.init(),this._w=Y0,nh.call(this,128,112)}Z0(Gi,nh);Gi.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function Ac(t,e,r){return r^t&(e^r)}function Tc(t,e,r){return t&e|r&(t|e)}function kc(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Oc(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function K0(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function X0(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function eg(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function tg(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function it(t,e){return t>>>0>>0?1:0}Gi.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,o=this._eh|0,a=this._fh|0,c=this._gh|0,l=this._hh|0,d=this._al|0,g=this._bl|0,y=this._cl|0,C=this._dl|0,A=this._el|0,D=this._fl|0,N=this._gl|0,x=this._hl|0,I=0;I<32;I+=2)e[I]=t.readInt32BE(I*4),e[I+1]=t.readInt32BE(I*4+4);for(;I<160;I+=2){var O=e[I-30],P=e[I-15*2+1],L=K0(O,P),B=X0(P,O);O=e[I-2*2],P=e[I-2*2+1];var G=eg(O,P),z=tg(P,O),W=e[I-7*2],K=e[I-7*2+1],Y=e[I-16*2],X=e[I-16*2+1],b=B+K|0,u=L+W+it(b,B)|0;b=b+z|0,u=u+G+it(b,z)|0,b=b+X|0,u=u+Y+it(b,X)|0,e[I]=u,e[I+1]=b}for(var h=0;h<160;h+=2){u=e[h],b=e[h+1];var p=Tc(r,n,i),v=Tc(d,g,y),w=kc(r,d),M=kc(d,r),T=Oc(o,A),m=Oc(A,o),f=Ic[h],E=Ic[h+1],U=Ac(o,a,c),q=Ac(A,D,N),R=x+m|0,k=l+T+it(R,x)|0;R=R+q|0,k=k+U+it(R,q)|0,R=R+E|0,k=k+f+it(R,E)|0,R=R+b|0,k=k+u+it(R,b)|0;var $=M+v|0,V=w+p+it($,M)|0;l=c,x=N,c=a,N=D,a=o,D=A,A=C+R|0,o=s+k+it(A,C)|0,s=i,C=y,i=n,y=g,n=r,g=d,d=R+$|0,r=k+V+it(d,R)|0}this._al=this._al+d|0,this._bl=this._bl+g|0,this._cl=this._cl+y|0,this._dl=this._dl+C|0,this._el=this._el+A|0,this._fl=this._fl+D|0,this._gl=this._gl+N|0,this._hl=this._hl+x|0,this._ah=this._ah+r+it(this._al,d)|0,this._bh=this._bh+n+it(this._bl,g)|0,this._ch=this._ch+i+it(this._cl,y)|0,this._dh=this._dh+s+it(this._dl,C)|0,this._eh=this._eh+o+it(this._el,A)|0,this._fh=this._fh+a+it(this._fl,D)|0,this._gh=this._gh+c+it(this._gl,N)|0,this._hh=this._hh+l+it(this._hl,x)|0};Gi.prototype._hash=function(){var t=Q0.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var ih=Gi,rg=zt,ng=ih,ig=fi,sg=hn.Buffer,og=new Array(160);function ro(){this.init(),this._w=og,ig.call(this,128,112)}rg(ro,ng);ro.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};ro.prototype._hash=function(){var t=sg.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var ag=ro,dn=Yf.exports=function(e){e=e.toLowerCase();var r=dn[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};dn.sha=E0;dn.sha1=O0;dn.sha224=J0;dn.sha256=rh;dn.sha384=ag;dn.sha512=ih;var ug=Yf.exports,J={},cg=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0},Nc=typeof Symbol<"u"&&Symbol,lg=cg,fg=function(){return typeof Nc!="function"||typeof Symbol!="function"||typeof Nc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:lg()},Lc={foo:{}},hg=Object,dg=function(){return{__proto__:Lc}.foo===Lc.foo&&!({__proto__:null}instanceof hg)},pg="Function.prototype.bind called on incompatible ",gg=Object.prototype.toString,bg=Math.max,vg="[object Function]",Pc=function(e,r){for(var n=[],i=0;i"u"||!at?ce:at(Uint8Array),nn={"%AggregateError%":typeof AggregateError>"u"?ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ce:ArrayBuffer,"%ArrayIteratorPrototype%":kn&&at?at([][Symbol.iterator]()):ce,"%AsyncFromSyncIteratorPrototype%":ce,"%AsyncFunction%":Bn,"%AsyncGenerator%":Bn,"%AsyncGeneratorFunction%":Bn,"%AsyncIteratorPrototype%":Bn,"%Atomics%":typeof Atomics>"u"?ce:Atomics,"%BigInt%":typeof BigInt>"u"?ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ce:FinalizationRegistry,"%Function%":sh,"%GeneratorFunction%":Bn,"%Int8Array%":typeof Int8Array>"u"?ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":kn&&at?at(at([][Symbol.iterator]())):ce,"%JSON%":typeof JSON=="object"?JSON:ce,"%Map%":typeof Map>"u"?ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!kn||!at?ce:at(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ce:Promise,"%Proxy%":typeof Proxy>"u"?ce:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!kn||!at?ce:at(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":kn&&at?at(""[Symbol.iterator]()):ce,"%Symbol%":kn?Symbol:ce,"%SyntaxError%":Zn,"%ThrowTypeError%":Cg,"%TypedArray%":Ig,"%TypeError%":Vn,"%Uint8Array%":typeof Uint8Array>"u"?ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ce:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ce:WeakSet};if(at)try{null.error}catch(t){var Ag=at(at(t));nn["%Error.prototype%"]=Ag}var Tg=function t(e){var r;if(e==="%AsyncFunction%")r=na("async function () {}");else if(e==="%GeneratorFunction%")r=na("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=na("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&at&&(r=at(i.prototype))}return nn[e]=r,r},Dc={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ji=Eu,Ps=Mg,kg=Ji.call(Function.call,Array.prototype.concat),Og=Ji.call(Function.apply,Array.prototype.splice),$c=Ji.call(Function.call,String.prototype.replace),Ds=Ji.call(Function.call,String.prototype.slice),Ng=Ji.call(Function.call,RegExp.prototype.exec),Lg=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pg=/\\(\\)?/g,Dg=function(e){var r=Ds(e,0,1),n=Ds(e,-1);if(r==="%"&&n!=="%")throw new Zn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Zn("invalid intrinsic syntax, expected opening `%`");var i=[];return $c(e,Lg,function(s,o,a,c){i[i.length]=a?$c(c,Pg,"$1"):o||s}),i},$g=function(e,r){var n=e,i;if(Ps(Dc,n)&&(i=Dc[n],n="%"+i[0]+"%"),Ps(nn,n)){var s=nn[n];if(s===Bn&&(s=Tg(n)),typeof s>"u"&&!r)throw new Vn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new Zn("intrinsic "+e+" does not exist!")},pn=function(e,r){if(typeof e!="string"||e.length===0)throw new Vn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Vn('"allowMissing" argument must be a boolean');if(Ng(/^%?[^%]*%?$/,e)===null)throw new Zn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Dg(e),i=n.length>0?n[0]:"",s=$g("%"+i+"%",r),o=s.name,a=s.value,c=!1,l=s.alias;l&&(i=l[0],Og(n,kg([0,1],l)));for(var d=1,g=!0;d=n.length){var D=rn(a,y);g=!!D,g&&"get"in D&&!("originalValue"in D.get)?a=D.get:a=a[y]}else g=Ps(a,y),a=a[y];g&&!c&&(nn[o]=a)}}return a},oh={exports:{}},Bg=pn,Za=Bg("%Object.defineProperty%",!0),Qa=function(){if(Za)try{return Za({},"a",{value:1}),!0}catch{return!1}return!1};Qa.hasArrayLengthDefineBug=function(){if(!Qa())return null;try{return Za([],"length",{value:1}).length!==1}catch{return!0}};var ah=Qa,jg=pn,As=jg("%Object.getOwnPropertyDescriptor%",!0);if(As)try{As([],"length")}catch{As=null}var uh=As,Fg=ah(),xu=pn,Ii=Fg&&xu("%Object.defineProperty%",!0);if(Ii)try{Ii({},"a",{value:1})}catch{Ii=!1}var Wg=xu("%SyntaxError%"),On=xu("%TypeError%"),Bc=uh,Hg=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new On("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new On("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new On("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new On("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new On("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new On("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!Bc&&Bc(e,r);if(Ii)Ii(e,r,{configurable:o===null&&c?c.configurable:!o,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:s===null&&c?c.writable:!s});else if(a||!i&&!s&&!o)e[r]=n;else throw new Wg("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ch=pn,jc=Hg,Vg=ah(),Fc=uh,Wc=ch("%TypeError%"),Ug=ch("%Math.floor%"),zg=function(e,r){if(typeof e!="function")throw new Wc("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Ug(r)!==r)throw new Wc("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in e&&Fc){var o=Fc(e,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!n)&&(Vg?jc(e,"length",r,!0,!0):jc(e,"length",r)),e};(function(t){var e=Eu,r=pn,n=zg,i=r("%TypeError%"),s=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(o,s),c=r("%Object.defineProperty%",!0),l=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch{c=null}t.exports=function(y){if(typeof y!="function")throw new i("a function is required");var C=a(e,o,arguments);return n(C,1+l(0,y.length-(arguments.length-1)),!0)};var d=function(){return a(e,s,arguments)};c?c(t.exports,"apply",{value:d}):t.exports.apply=d})(oh);var qg=oh.exports,lh=pn,fh=qg,Gg=fh(lh("String.prototype.indexOf")),Jg=function(e,r){var n=lh(e,!!r);return typeof n=="function"&&Gg(e,".prototype.")>-1?fh(n):n},Mu=typeof Map=="function"&&Map.prototype,sa=Object.getOwnPropertyDescriptor&&Mu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$s=Mu&&sa&&typeof sa.get=="function"?sa.get:null,Hc=Mu&&Map.prototype.forEach,Cu=typeof Set=="function"&&Set.prototype,oa=Object.getOwnPropertyDescriptor&&Cu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Bs=Cu&&oa&&typeof oa.get=="function"?oa.get:null,Vc=Cu&&Set.prototype.forEach,Zg=typeof WeakMap=="function"&&WeakMap.prototype,Ai=Zg?WeakMap.prototype.has:null,Qg=typeof WeakSet=="function"&&WeakSet.prototype,Ti=Qg?WeakSet.prototype.has:null,Yg=typeof WeakRef=="function"&&WeakRef.prototype,Uc=Yg?WeakRef.prototype.deref:null,Kg=Boolean.prototype.valueOf,Xg=Object.prototype.toString,eb=Function.prototype.toString,tb=String.prototype.match,Ru=String.prototype.slice,xr=String.prototype.replace,rb=String.prototype.toUpperCase,zc=String.prototype.toLowerCase,hh=RegExp.prototype.test,qc=Array.prototype.concat,tr=Array.prototype.join,nb=Array.prototype.slice,Gc=Math.floor,Ya=typeof BigInt=="function"?BigInt.prototype.valueOf:null,aa=Object.getOwnPropertySymbols,Ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",bt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Qn||"symbol")?Symbol.toStringTag:null,dh=Object.prototype.propertyIsEnumerable,Jc=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Zc(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||hh.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Gc(-t):Gc(t);if(n!==t){var i=String(n),s=Ru.call(e,i.length+1);return xr.call(i,r,"$&_")+"."+xr.call(xr.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return xr.call(e,r,"$&_")}var Xa=Gs,Qc=Xa.custom,Yc=gh(Qc)?Qc:null,ib=function t(e,r,n,i){var s=r||{};if(_r(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(_r(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=_r(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(_r(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(_r(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return vh(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return a?Zc(e,c):c}if(typeof e=="bigint"){var l=String(e)+"n";return a?Zc(e,l):l}var d=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=d&&d>0&&typeof e=="object")return eu(e)?"[Array]":"[Object]";var g=Sb(s,n);if(typeof i>"u")i=[];else if(bh(i,e)>=0)return"[Circular]";function y(b,u,h){if(u&&(i=nb.call(i),i.push(u)),h){var p={depth:s.depth};return _r(s,"quoteStyle")&&(p.quoteStyle=s.quoteStyle),t(b,p,n+1,i)}return t(b,s,n+1,i)}if(typeof e=="function"&&!Kc(e)){var C=db(e),A=ds(e,y);return"[Function"+(C?": "+C:" (anonymous)")+"]"+(A.length>0?" { "+tr.call(A,", ")+" }":"")}if(gh(e)){var D=Qn?xr.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ka.call(e);return typeof e=="object"&&!Qn?Si(D):D}if(mb(e)){for(var N="<"+zc.call(String(e.nodeName)),x=e.attributes||[],I=0;I",N}if(eu(e)){if(e.length===0)return"[]";var O=ds(e,y);return g&&!_b(O)?"["+tu(O,g)+"]":"[ "+tr.call(O,", ")+" ]"}if(ab(e)){var P=ds(e,y);return!("cause"in Error.prototype)&&"cause"in e&&!dh.call(e,"cause")?"{ ["+String(e)+"] "+tr.call(qc.call("[cause]: "+y(e.cause),P),", ")+" }":P.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+tr.call(P,", ")+" }"}if(typeof e=="object"&&o){if(Yc&&typeof e[Yc]=="function"&&Xa)return Xa(e,{depth:d-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(pb(e)){var L=[];return Hc&&Hc.call(e,function(b,u){L.push(y(u,e,!0)+" => "+y(b,e))}),Xc("Map",$s.call(e),L,g)}if(vb(e)){var B=[];return Vc&&Vc.call(e,function(b){B.push(y(b,e))}),Xc("Set",Bs.call(e),B,g)}if(gb(e))return ua("WeakMap");if(yb(e))return ua("WeakSet");if(bb(e))return ua("WeakRef");if(cb(e))return Si(y(Number(e)));if(fb(e))return Si(y(Ya.call(e)));if(lb(e))return Si(Kg.call(e));if(ub(e))return Si(y(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===globalThis)return"{ [object globalThis] }";if(!ob(e)&&!Kc(e)){var G=ds(e,y),z=Jc?Jc(e)===Object.prototype:e instanceof Object||e.constructor===Object,W=e instanceof Object?"":"null prototype",K=!z&&bt&&Object(e)===e&&bt in e?Ru.call(kr(e),8,-1):W?"Object":"",Y=z||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",X=Y+(K||W?"["+tr.call(qc.call([],K||[],W||[]),": ")+"] ":"");return G.length===0?X+"{}":g?X+"{"+tu(G,g)+"}":X+"{ "+tr.call(G,", ")+" }"}return String(e)};function ph(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function sb(t){return xr.call(String(t),/"/g,""")}function eu(t){return kr(t)==="[object Array]"&&(!bt||!(typeof t=="object"&&bt in t))}function ob(t){return kr(t)==="[object Date]"&&(!bt||!(typeof t=="object"&&bt in t))}function Kc(t){return kr(t)==="[object RegExp]"&&(!bt||!(typeof t=="object"&&bt in t))}function ab(t){return kr(t)==="[object Error]"&&(!bt||!(typeof t=="object"&&bt in t))}function ub(t){return kr(t)==="[object String]"&&(!bt||!(typeof t=="object"&&bt in t))}function cb(t){return kr(t)==="[object Number]"&&(!bt||!(typeof t=="object"&&bt in t))}function lb(t){return kr(t)==="[object Boolean]"&&(!bt||!(typeof t=="object"&&bt in t))}function gh(t){if(Qn)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Ka)return!1;try{return Ka.call(t),!0}catch{}return!1}function fb(t){if(!t||typeof t!="object"||!Ya)return!1;try{return Ya.call(t),!0}catch{}return!1}var hb=Object.prototype.hasOwnProperty||function(t){return t in this};function _r(t,e){return hb.call(t,e)}function kr(t){return Xg.call(t)}function db(t){if(t.name)return t.name;var e=tb.call(eb.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function bh(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return vh(Ru.call(t,0,e.maxStringLength),e)+n}var i=xr.call(xr.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,wb);return ph(i,"single",e)}function wb(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+rb.call(e.toString(16))}function Si(t){return"Object("+t+")"}function ua(t){return t+" { ? }"}function Xc(t,e,r,n){var i=n?tu(r,n):tr.call(r,", ");return t+" ("+e+") {"+i+"}"}function _b(t){for(var e=0;e=0)return!1;return!0}function Sb(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=tr.call(Array(t.indent+1)," ");else return null;return{base:r,prev:tr.call(Array(e+1),r)}}function tu(t,e){if(t.length===0)return"";var r=` +`+e.prev+e.base;return r+tr.call(t,","+r)+` +`+e.prev}function ds(t,e){var r=eu(t),n=[];if(r){n.length=t.length;for(var i=0;i1;){var r=e.pop(),n=r.obj[r.prop];if(Zr(n)){for(var i=[],s=0;s=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||s===$b.RFC1738&&(l===40||l===41)){a+=o.charAt(c);continue}if(l<128){a=a+Zt[l];continue}if(l<2048){a=a+(Zt[192|l>>6]+Zt[128|l&63]);continue}if(l<55296||l>=57344){a=a+(Zt[224|l>>12]+Zt[128|l>>6&63]+Zt[128|l&63]);continue}c+=1,l=65536+((l&1023)<<10|o.charCodeAt(c)&1023),a+=Zt[240|l>>18]+Zt[128|l>>12&63]+Zt[128|l>>6&63]+Zt[128|l&63]}return a},Vb=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i"u"&&(O=0)}if(typeof c=="function"?x=c(r,x):x instanceof Date?x=g(x):n==="comma"&&fr(x)&&(x=Ts.maybeMap(x,function(p){return p instanceof Date?g(p):p})),x===null){if(s)return a&&!A?a(r,gt.encoder,D,"key",y):r;x=""}if(Yb(x)||Ts.isBuffer(x)){if(a){var B=A?r:a(r,gt.encoder,D,"key",y);return[C(B)+"="+C(a(x,gt.encoder,D,"value",y))]}return[C(r)+"="+C(String(x))]}var G=[];if(typeof x>"u")return G;var z;if(n==="comma"&&fr(x))A&&a&&(x=Ts.maybeMap(x,a)),z=[{value:x.length>0?x.join(",")||null:void 0}];else if(fr(c))z=c;else{var W=Object.keys(x);z=l?W.sort(l):W}for(var K=i&&fr(x)&&x.length===1?r+"[]":r,Y=0;Y"u"?gt.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:gt.charsetSentinel,delimiter:typeof e.delimiter>"u"?gt.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:gt.encode,encoder:typeof e.encoder=="function"?e.encoder:gt.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:gt.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:gt.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:gt.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:gt.strictNullHandling}},ev=function(t,e){var r=t,n=Xb(e),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):fr(n.filter)&&(s=n.filter,i=s);var o=[];if(typeof r!="object"||r===null)return"";var a;e&&e.arrayFormat in el?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var c=el[a];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=c==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var d=wh(),g=0;g0?A+C:""},Yn=mh,ru=Object.prototype.hasOwnProperty,tv=Array.isArray,st={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Yn.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},rv=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Sh=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},nv="utf8=%26%2310003%3B",iv="utf8=%E2%9C%93",sv=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,s),a=-1,c,l=r.charset;if(r.charsetSentinel)for(c=0;c-1&&(A=tv(A)?[A]:A),ru.call(n,C)?n[C]=Yn.combine(n[C],A):n[C]=A}return n},ov=function(t,e,r,n){for(var i=n?e:Sh(e,r),s=t.length-1;s>=0;--s){var o,a=t[s];if(a==="[]"&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,l=parseInt(c,10);!r.parseArrays&&c===""?o={0:i}:!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(o=[],o[l]=i):c!=="__proto__"&&(o[c]=i)}i=o}return i},av=function(e,r,n,i){if(e){var s=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(s),l=c?s.slice(0,c.index):s,d=[];if(l){if(!n.plainObjects&&ru.call(Object.prototype,l)&&!n.allowPrototypes)return;d.push(l)}for(var g=0;n.depth>0&&(c=a.exec(s))!==null&&g"u"?st.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?st.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:st.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:st.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:st.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:st.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:st.comma,decoder:typeof e.decoder=="function"?e.decoder:st.decoder,delimiter:typeof e.delimiter=="string"||Yn.isRegExp(e.delimiter)?e.delimiter:st.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:st.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:st.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:st.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:st.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:st.strictNullHandling}},cv=function(t,e){var r=uv(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?sv(t,r):t,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),o=0;on}t.OpaqueType=e,t.HexString=e(),t.AddressString=e(),t.BigIntString=e();function r(n){return Math.floor(n)}t.IntNumber=r,t.RegExpString=e(),function(n){n.CoinbaseWallet="CoinbaseWallet",n.MetaMask="MetaMask",n.Unselected=""}(t.ProviderType||(t.ProviderType={}))})(Zi);var pv=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(J,"__esModule",{value:!0});J.isInIFrame=J.createQrUrl=J.getFavicon=J.range=J.isBigNumber=J.ensureParsedJSONObject=J.ensureBN=J.ensureRegExpString=J.ensureIntNumber=J.ensureBuffer=J.ensureAddressString=J.ensureEvenLengthHexString=J.ensureHexString=J.isHexString=J.prepend0x=J.strip0x=J.has0xPrefix=J.hexStringFromIntNumber=J.intNumberFromHexString=J.bigIntStringFromBN=J.hexStringFromBuffer=J.hexStringToUint8Array=J.uint8ArrayToHex=J.randomBytesHex=void 0;const Sr=pv(Ys),gv=dv,gn=Vi,Pt=Zi,Eh=/^[0-9]*$/,xh=/^[a-f0-9]*$/;function bv(t){return Mh(crypto.getRandomValues(new Uint8Array(t)))}J.randomBytesHex=bv;function Mh(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}J.uint8ArrayToHex=Mh;function vv(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}J.hexStringToUint8Array=vv;function yv(t,e=!1){const r=t.toString("hex");return(0,Pt.HexString)(e?"0x"+r:r)}J.hexStringFromBuffer=yv;function mv(t){return(0,Pt.BigIntString)(t.toString(10))}J.bigIntStringFromBN=mv;function wv(t){return(0,Pt.IntNumber)(new Sr.default(Yi(t,!1),16).toNumber())}J.intNumberFromHexString=wv;function _v(t){return(0,Pt.HexString)("0x"+new Sr.default(t).toString(16))}J.hexStringFromIntNumber=_v;function ku(t){return t.startsWith("0x")||t.startsWith("0X")}J.has0xPrefix=ku;function no(t){return ku(t)?t.slice(2):t}J.strip0x=no;function Ch(t){return ku(t)?"0x"+t.slice(2):"0x"+t}J.prepend0x=Ch;function Qi(t){if(typeof t!="string")return!1;const e=no(t).toLowerCase();return xh.test(e)}J.isHexString=Qi;function Rh(t,e=!1){if(typeof t=="string"){const r=no(t).toLowerCase();if(xh.test(r))return(0,Pt.HexString)(e?"0x"+r:r)}throw gn.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}J.ensureHexString=Rh;function Yi(t,e=!1){let r=Rh(t,!1);return r.length%2===1&&(r=(0,Pt.HexString)("0"+r)),e?(0,Pt.HexString)("0x"+r):r}J.ensureEvenLengthHexString=Yi;function Sv(t){if(typeof t=="string"){const e=no(t).toLowerCase();if(Qi(e)&&e.length===40)return(0,Pt.AddressString)(Ch(e))}throw gn.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}J.ensureAddressString=Sv;function Ev(t){if(Buffer.isBuffer(t))return t;if(typeof t=="string")if(Qi(t)){const e=Yi(t,!1);return Buffer.from(e,"hex")}else return Buffer.from(t,"utf8");throw gn.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}J.ensureBuffer=Ev;function Ih(t){if(typeof t=="number"&&Number.isInteger(t))return(0,Pt.IntNumber)(t);if(typeof t=="string"){if(Eh.test(t))return(0,Pt.IntNumber)(Number(t));if(Qi(t))return(0,Pt.IntNumber)(new Sr.default(Yi(t,!1),16).toNumber())}throw gn.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}J.ensureIntNumber=Ih;function xv(t){if(t instanceof RegExp)return(0,Pt.RegExpString)(t.toString());throw gn.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}J.ensureRegExpString=xv;function Mv(t){if(t!==null&&(Sr.default.isBN(t)||Ah(t)))return new Sr.default(t.toString(10),10);if(typeof t=="number")return new Sr.default(Ih(t));if(typeof t=="string"){if(Eh.test(t))return new Sr.default(t,10);if(Qi(t))return new Sr.default(Yi(t,!1),16)}throw gn.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}J.ensureBN=Mv;function Cv(t){if(typeof t=="string")return JSON.parse(t);if(typeof t=="object")return t;throw gn.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}J.ensureParsedJSONObject=Cv;function Ah(t){if(t==null||typeof t.constructor!="function")return!1;const{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}J.isBigNumber=Ah;function Rv(t,e){return Array.from({length:e-t},(r,n)=>t+n)}J.range=Rv;function Iv(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute("href"):null;return!n||n.startsWith("javascript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${r}${n}`}J.getFavicon=Iv;function Av(t,e,r,n,i,s){const o=n?"parent-id":"id",a=(0,gv.stringify)({[o]:t,secret:e,server:r,v:i,chainId:s});return`${r}/#/link?${a}`}J.createQrUrl=Av;function Tv(){try{return window.frameElement!==null}catch{return!1}}J.isInIFrame=Tv;Object.defineProperty(li,"__esModule",{value:!0});li.Session=void 0;const rl=ug,nl=J,il="session:id",sl="session:secret",ol="session:linked";class Ou{constructor(e,r,n,i){this._storage=e,this._id=r||(0,nl.randomBytesHex)(16),this._secret=n||(0,nl.randomBytesHex)(32),this._key=new rl.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){const r=e.getItem(il),n=e.getItem(ol),i=e.getItem(sl);return r&&i?new Ou(e,r,i,n==="1"):null}static hash(e){return new rl.sha256().update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(il,this._id),this._storage.setItem(sl,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(ol,this._linked?"1":"0")}}li.Session=Ou;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.WalletSDKRelayAbstract=Ut.APP_VERSION_KEY=Ut.LOCAL_STORAGE_ADDRESSES_KEY=Ut.WALLET_USER_NAME_KEY=void 0;const al=Vi;Ut.WALLET_USER_NAME_KEY="walletUsername";Ut.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Ut.APP_VERSION_KEY="AppVersion";class kv{async makeEthereumJSONRPCRequest(e,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw al.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,al.serializeError)(s,e.method);return i})}}Ut.WalletSDKRelayAbstract=kv;var nu={exports:{}},Th=vu.EventEmitter,ha,ul;function Ov(){if(ul)return ha;ul=1;function t(A,D){var N=Object.keys(A);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(A);D&&(x=x.filter(function(I){return Object.getOwnPropertyDescriptor(A,I).enumerable})),N.push.apply(N,x)}return N}function e(A){for(var D=1;D0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(N){var x={data:N,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var N=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,N}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(N){if(this.length===0)return"";for(var x=this.head,I=""+x.data;x=x.next;)I+=N+x.data;return I}},{key:"concat",value:function(N){if(this.length===0)return l.alloc(0);for(var x=l.allocUnsafe(N>>>0),I=this.head,O=0;I;)C(I.data,x,O),O+=I.data.length,I=I.next;return x}},{key:"consume",value:function(N,x){var I;return NP.length?P.length:N;if(L===P.length?O+=P:O+=P.slice(0,N),N-=L,N===0){L===P.length?(++I,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=P.slice(L));break}++I}return this.length-=I,O}},{key:"_getBuffer",value:function(N){var x=l.allocUnsafe(N),I=this.head,O=1;for(I.data.copy(x),N-=I.data.length;I=I.next;){var P=I.data,L=N>P.length?P.length:N;if(P.copy(x,x.length-N,0,L),N-=L,N===0){L===P.length?(++O,I.next?this.head=I.next:this.head=this.tail=null):(this.head=I,I.data=P.slice(L));break}++O}return this.length-=O,x}},{key:y,value:function(N,x){return g(this,e(e({},x),{},{depth:0,customInspect:!1}))}}]),A}(),ha}function Nv(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(iu,this,t)):process.nextTick(iu,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(ks,r):(r._writableState.errorEmitted=!0,process.nextTick(cl,r,s)):process.nextTick(cl,r,s):e?(process.nextTick(ks,r),e(s)):process.nextTick(ks,r)}),this)}function cl(t,e){iu(t,e),ks(t)}function ks(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Lv(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function iu(t,e){t.emit("error",e)}function Pv(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}var kh={destroy:Nv,undestroy:Lv,errorOrDestroy:Pv},bn={};function Dv(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Oh={};function $t(t,e,r){r||(r=Error);function n(s,o,a){return typeof e=="string"?e:e(s,o,a)}var i=function(s){Dv(o,s);function o(a,c,l){return s.call(this,n(a,c,l))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=t,Oh[t]=i}function ll(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function $v(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Bv(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function jv(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}$t("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);$t("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&$v(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(Bv(t," argument"))i="The ".concat(t," ").concat(n," ").concat(ll(e,"type"));else{var s=jv(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(s," ").concat(n," ").concat(ll(e,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);$t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");$t("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});$t("ERR_STREAM_PREMATURE_CLOSE","Premature close");$t("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});$t("ERR_MULTIPLE_CALLBACK","Callback called multiple times");$t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");$t("ERR_STREAM_WRITE_AFTER_END","write after end");$t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);$t("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);$t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");bn.codes=Oh;var Fv=bn.codes.ERR_INVALID_OPT_VALUE;function Wv(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Hv(t,e,r,n){var i=Wv(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new Fv(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}var Nh={getHighWaterMark:Hv},Vv=Uv;function Uv(t,e){if(da("noDeprecation"))return t;var r=!1;function n(){if(!r){if(da("throwDeprecation"))throw new Error(e);da("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function da(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var e=globalThis.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var pa,fl;function Lh(){if(fl)return pa;fl=1,pa=z;function t(R){var k=this;this.next=null,this.entry=null,this.finish=function(){q(k,R)}}var e;z.WritableState=B;var r={deprecate:Vv},n=Th,i=Hi.Buffer,s=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(R){return i.from(R)}function a(R){return i.isBuffer(R)||R instanceof s}var c=kh,l=Nh,d=l.getHighWaterMark,g=bn.codes,y=g.ERR_INVALID_ARG_TYPE,C=g.ERR_METHOD_NOT_IMPLEMENTED,A=g.ERR_MULTIPLE_CALLBACK,D=g.ERR_STREAM_CANNOT_PIPE,N=g.ERR_STREAM_DESTROYED,x=g.ERR_STREAM_NULL_VALUES,I=g.ERR_STREAM_WRITE_AFTER_END,O=g.ERR_UNKNOWN_ENCODING,P=c.errorOrDestroy;zt(z,n);function L(){}function B(R,k,$){e=e||Kn(),R=R||{},typeof $!="boolean"&&($=k instanceof e),this.objectMode=!!R.objectMode,$&&(this.objectMode=this.objectMode||!!R.writableObjectMode),this.highWaterMark=d(this,R,"writableHighWaterMark",$),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var V=R.decodeStrings===!1;this.decodeStrings=!V,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(se){p(k,se)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=R.emitClose!==!1,this.autoDestroy=!!R.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}B.prototype.getBuffer=function(){for(var k=this.bufferedRequest,$=[];k;)$.push(k),k=k.next;return $},function(){try{Object.defineProperty(B.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(k){return G.call(this,k)?!0:this!==z?!1:k&&k._writableState instanceof B}})):G=function(k){return k instanceof this};function z(R){e=e||Kn();var k=this instanceof e;if(!k&&!G.call(z,this))return new z(R);this._writableState=new B(R,this,k),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),n.call(this)}z.prototype.pipe=function(){P(this,new D)};function W(R,k){var $=new I;P(R,$),process.nextTick(k,$)}function K(R,k,$,V){var se;return $===null?se=new x:typeof $!="string"&&!k.objectMode&&(se=new y("chunk",["string","Buffer"],$)),se?(P(R,se),process.nextTick(V,se),!1):!0}z.prototype.write=function(R,k,$){var V=this._writableState,se=!1,_=!V.objectMode&&a(R);return _&&!i.isBuffer(R)&&(R=o(R)),typeof k=="function"&&($=k,k=null),_?k="buffer":k||(k=V.defaultEncoding),typeof $!="function"&&($=L),V.ending?W(this,$):(_||K(this,V,R,$))&&(V.pendingcb++,se=X(this,V,_,R,k,$)),se},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){var R=this._writableState;R.corked&&(R.corked--,!R.writing&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&M(this,R))},z.prototype.setDefaultEncoding=function(k){if(typeof k=="string"&&(k=k.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((k+"").toLowerCase())>-1))throw new O(k);return this._writableState.defaultEncoding=k,this},Object.defineProperty(z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Y(R,k,$){return!R.objectMode&&R.decodeStrings!==!1&&typeof k=="string"&&(k=i.from(k,$)),k}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function X(R,k,$,V,se,_){if(!$){var S=Y(k,V,se);V!==S&&($=!0,se="buffer",V=S)}var F=k.objectMode?1:V.length;k.length+=F;var H=k.length */var dl;function zv(){return dl||(dl=1,function(t,e){var r=Hi,n=r.Buffer;function i(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=s);function s(o,a,c){return n(o,a,c)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},s.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=n(o);return a!==void 0?typeof c=="string"?l.fill(a,c):l.fill(a):l.fill(0),l},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}}(bs,bs.exports)),bs.exports}var pl;function gl(){if(pl)return ba;pl=1;var t=zv().Buffer,e=t.isEncoding||function(x){switch(x=""+x,x&&x.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(x){if(!x)return"utf8";for(var I;;)switch(x){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return x;default:if(I)return;x=(""+x).toLowerCase(),I=!0}}function n(x){var I=r(x);if(typeof I!="string"&&(t.isEncoding===e||!e(x)))throw new Error("Unknown encoding: "+x);return I||x}ba.StringDecoder=i;function i(x){this.encoding=n(x);var I;switch(this.encoding){case"utf16le":this.text=g,this.end=y,I=4;break;case"utf8":this.fillLast=c,I=4;break;case"base64":this.text=C,this.end=A,I=3;break;default:this.write=D,this.end=N;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(I)}i.prototype.write=function(x){if(x.length===0)return"";var I,O;if(this.lastNeed){if(I=this.fillLast(x),I===void 0)return"";O=this.lastNeed,this.lastNeed=0}else O=0;return O>5===6?2:x>>4===14?3:x>>3===30?4:x>>6===2?-1:-2}function o(x,I,O){var P=I.length-1;if(P=0?(L>0&&(x.lastNeed=L-1),L):--P=0?(L>0&&(x.lastNeed=L-2),L):--P=0?(L>0&&(L===2?L=0:x.lastNeed=L-3),L):0))}function a(x,I,O){if((I[0]&192)!==128)return x.lastNeed=0,"�";if(x.lastNeed>1&&I.length>1){if((I[1]&192)!==128)return x.lastNeed=1,"�";if(x.lastNeed>2&&I.length>2&&(I[2]&192)!==128)return x.lastNeed=2,"�"}}function c(x){var I=this.lastTotal-this.lastNeed,O=a(this,x);if(O!==void 0)return O;if(this.lastNeed<=x.length)return x.copy(this.lastChar,I,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);x.copy(this.lastChar,I,0,x.length),this.lastNeed-=x.length}function l(x,I){var O=o(this,x,I);if(!this.lastNeed)return x.toString("utf8",I);this.lastTotal=O;var P=x.length-(O-this.lastNeed);return x.copy(this.lastChar,0,P),x.toString("utf8",I,P)}function d(x){var I=x&&x.length?this.write(x):"";return this.lastNeed?I+"�":I}function g(x,I){if((x.length-I)%2===0){var O=x.toString("utf16le",I);if(O){var P=O.charCodeAt(O.length-1);if(P>=55296&&P<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=x[x.length-2],this.lastChar[1]=x[x.length-1],O.slice(0,-1)}return O}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=x[x.length-1],x.toString("utf16le",I,x.length-1)}function y(x){var I=x&&x.length?this.write(x):"";if(this.lastNeed){var O=this.lastTotal-this.lastNeed;return I+this.lastChar.toString("utf16le",0,O)}return I}function C(x,I){var O=(x.length-I)%3;return O===0?x.toString("base64",I):(this.lastNeed=3-O,this.lastTotal=3,O===1?this.lastChar[0]=x[x.length-1]:(this.lastChar[0]=x[x.length-2],this.lastChar[1]=x[x.length-1]),x.toString("base64",I,x.length-O))}function A(x){var I=x&&x.length?this.write(x):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function D(x){return x.toString(this.encoding)}function N(x){return x&&x.length?this.write(x):""}return ba}var bl=bn.codes.ERR_STREAM_PREMATURE_CLOSE;function qv(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i0)if(typeof S!="string"&&!ie.objectMode&&Object.getPrototypeOf(S)!==n.prototype&&(S=s(S)),H)ie.endEmitted?L(_,new x):Y(_,ie,S,!0);else if(ie.ended)L(_,new D);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!F?(S=ie.decoder.write(S),ie.objectMode||S.length!==0?Y(_,ie,S,!1):M(_,ie)):Y(_,ie,S,!1)}else H||(ie.reading=!1,M(_,ie))}return!ie.ended&&(ie.length=b?_=b:(_--,_|=_>>>1,_|=_>>>2,_|=_>>>4,_|=_>>>8,_|=_>>>16,_++),_}function h(_,S){return _<=0||S.length===0&&S.ended?0:S.objectMode?1:_!==_?S.flowing&&S.length?S.buffer.head.data.length:S.length:(_>S.highWaterMark&&(S.highWaterMark=u(_)),_<=S.length?_:S.ended?S.length:(S.needReadable=!0,0))}W.prototype.read=function(_){c("read",_),_=parseInt(_,10);var S=this._readableState,F=_;if(_!==0&&(S.emittedReadable=!1),_===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return c("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?$(this):v(this),null;if(_=h(_,S),_===0&&S.ended)return S.length===0&&$(this),null;var H=S.needReadable;c("need readable",H),(S.length===0||S.length-_0?re=k(_,S):re=null,re===null?(S.needReadable=S.length<=S.highWaterMark,_=0):(S.length-=_,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),F!==_&&S.ended&&$(this)),re!==null&&this.emit("data",re),re};function p(_,S){if(c("onEofChunk"),!S.ended){if(S.decoder){var F=S.decoder.end();F&&F.length&&(S.buffer.push(F),S.length+=S.objectMode?1:F.length)}S.ended=!0,S.sync?v(_):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,w(_)))}}function v(_){var S=_._readableState;c("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(c("emitReadable",S.flowing),S.emittedReadable=!0,process.nextTick(w,_))}function w(_){var S=_._readableState;c("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(_.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,R(_)}function M(_,S){S.readingMore||(S.readingMore=!0,process.nextTick(T,_,S))}function T(_,S){for(;!S.reading&&!S.ended&&(S.length1&&se(H.pipes,_)!==-1)&&!we&&(c("false write response, pause",H.awaitDrain),H.awaitDrain++),F.pause())}function ve(pe){c("onerror",pe),be(),_.removeListener("error",ve),e(_,"error")===0&&L(_,pe)}G(_,"error",ve);function ye(){_.removeListener("finish",ur),be()}_.once("close",ye);function ur(){c("onfinish"),_.removeListener("close",ye),be()}_.once("finish",ur);function be(){c("unpipe"),F.unpipe(_)}return _.emit("pipe",F),H.flowing||(c("pipe resume"),F.resume()),_};function m(_){return function(){var F=_._readableState;c("pipeOnDrain",F.awaitDrain),F.awaitDrain&&F.awaitDrain--,F.awaitDrain===0&&e(_,"data")&&(F.flowing=!0,R(_))}}W.prototype.unpipe=function(_){var S=this._readableState,F={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return _&&_!==S.pipes?this:(_||(_=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,_&&_.emit("unpipe",this,F),this);if(!_){var H=S.pipes,re=S.pipesCount;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var ie=0;ie0,H.flowing!==!1&&this.resume()):_==="readable"&&!H.endEmitted&&!H.readableListening&&(H.readableListening=H.needReadable=!0,H.flowing=!1,H.emittedReadable=!1,c("on readable",H.length,H.reading),H.length?v(this):H.reading||process.nextTick(E,this)),F},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(_,S){var F=r.prototype.removeListener.call(this,_,S);return _==="readable"&&process.nextTick(f,this),F},W.prototype.removeAllListeners=function(_){var S=r.prototype.removeAllListeners.apply(this,arguments);return(_==="readable"||_===void 0)&&process.nextTick(f,this),S};function f(_){var S=_._readableState;S.readableListening=_.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:_.listenerCount("data")>0&&_.resume()}function E(_){c("readable nexttick read 0"),_.read(0)}W.prototype.resume=function(){var _=this._readableState;return _.flowing||(c("resume"),_.flowing=!_.readableListening,U(this,_)),_.paused=!1,this};function U(_,S){S.resumeScheduled||(S.resumeScheduled=!0,process.nextTick(q,_,S))}function q(_,S){c("resume",S.reading),S.reading||_.read(0),S.resumeScheduled=!1,_.emit("resume"),R(_),S.flowing&&!S.reading&&_.read(0)}W.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function R(_){var S=_._readableState;for(c("flow",S.flowing);S.flowing&&_.read()!==null;);}W.prototype.wrap=function(_){var S=this,F=this._readableState,H=!1;_.on("end",function(){if(c("wrapped end"),F.decoder&&!F.ended){var ee=F.decoder.end();ee&&ee.length&&S.push(ee)}S.push(null)}),_.on("data",function(ee){if(c("wrapped data"),F.decoder&&(ee=F.decoder.write(ee)),!(F.objectMode&&ee==null)&&!(!F.objectMode&&(!ee||!ee.length))){var de=S.push(ee);de||(H=!0,_.pause())}});for(var re in _)this[re]===void 0&&typeof _[re]=="function"&&(this[re]=function(de){return function(){return _[de].apply(_,arguments)}}(re));for(var ie=0;ie=S.length?(S.decoder?F=S.buffer.join(""):S.buffer.length===1?F=S.buffer.first():F=S.buffer.concat(S.length),S.buffer.clear()):F=S.buffer.consume(_,S.decoder),F}function $(_){var S=_._readableState;c("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,process.nextTick(V,S,_))}function V(_,S){if(c("endReadableNT",_.endEmitted,_.length),!_.endEmitted&&_.length===0&&(_.endEmitted=!0,S.readable=!1,S.emit("end"),_.autoDestroy)){var F=S._writableState;(!F||F.autoDestroy&&F.finished)&&S.destroy()}}typeof Symbol=="function"&&(W.from=function(_,S){return P===void 0&&(P=Qv()),P(W,_,S)});function se(_,S){for(var F=0,H=_.length;F0;return uy(o,c,l,function(d){i||(i=d),d&&s.forEach(Sl),!c&&(s.forEach(Sl),n(i))})});return e.reduce(cy)}var hy=fy;(function(t,e){e=t.exports=Dh(),e.Stream=e,e.Readable=e,e.Writable=Lh(),e.Duplex=Kn(),e.Transform=$h,e.PassThrough=ny,e.finished=Nu,e.pipeline=hy})(nu,nu.exports);var Fh=nu.exports;const{Transform:dy}=Fh;var py=t=>class Wh extends dy{constructor(r,n,i,s,o){super(o),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=o,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Wh(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:gy}=Fh;var by=t=>class Hh extends gy{constructor(r,n,i,s){super(s),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Hh(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const vy=py,yy=by;var my=function(t){const e=vy(t),r=yy(t);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new r(1344,256,31,i);case"shake256":return new r(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}},Vh={};const El=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];Vh.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],a=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],g=t[9]^t[19]^t[29]^t[39]^t[49];let y=d^(i<<1|s>>>31),C=g^(s<<1|i>>>31);const A=t[0]^y,D=t[1]^C,N=t[10]^y,x=t[11]^C,I=t[20]^y,O=t[21]^C,P=t[30]^y,L=t[31]^C,B=t[40]^y,G=t[41]^C;y=r^(o<<1|a>>>31),C=n^(a<<1|o>>>31);const z=t[2]^y,W=t[3]^C,K=t[12]^y,Y=t[13]^C,X=t[22]^y,b=t[23]^C,u=t[32]^y,h=t[33]^C,p=t[42]^y,v=t[43]^C;y=i^(c<<1|l>>>31),C=s^(l<<1|c>>>31);const w=t[4]^y,M=t[5]^C,T=t[14]^y,m=t[15]^C,f=t[24]^y,E=t[25]^C,U=t[34]^y,q=t[35]^C,R=t[44]^y,k=t[45]^C;y=o^(d<<1|g>>>31),C=a^(g<<1|d>>>31);const $=t[6]^y,V=t[7]^C,se=t[16]^y,_=t[17]^C,S=t[26]^y,F=t[27]^C,H=t[36]^y,re=t[37]^C,ie=t[46]^y,ee=t[47]^C;y=c^(r<<1|n>>>31),C=l^(n<<1|r>>>31);const de=t[8]^y,Jt=t[9]^C,we=t[18]^y,Se=t[19]^C,vr=t[28]^y,ve=t[29]^C,ye=t[38]^y,ur=t[39]^C,be=t[48]^y,pe=t[49]^C,xt=A,Ee=D,xe=x<<4|N>>>28,wn=N<<4|x>>>28,Me=I<<3|O>>>29,Ce=O<<3|I>>>29,_n=L<<9|P>>>23,Re=P<<9|L>>>23,Ie=B<<18|G>>>14,Sn=G<<18|B>>>14,Ae=z<<1|W>>>31,Te=W<<1|z>>>31,En=Y<<12|K>>>20,ke=K<<12|Y>>>20,Oe=X<<10|b>>>22,xn=b<<10|X>>>22,Ne=h<<13|u>>>19,Le=u<<13|h>>>19,Mn=p<<2|v>>>30,Pe=v<<2|p>>>30,De=M<<30|w>>>2,Cn=w<<30|M>>>2,$e=T<<6|m>>>26,Be=m<<6|T>>>26,Rn=E<<11|f>>>21,je=f<<11|E>>>21,Fe=U<<15|q>>>17,In=q<<15|U>>>17,We=k<<29|R>>>3,He=R<<29|k>>>3,An=$<<28|V>>>4,Ve=V<<28|$>>>4,Ue=_<<23|se>>>9,Tn=se<<23|_>>>9,ze=S<<25|F>>>7,qe=F<<25|S>>>7,Or=H<<21|re>>>11,Nr=re<<21|H>>>11,Lr=ee<<24|ie>>>8,Pr=ie<<24|ee>>>8,Dr=de<<27|Jt>>>5,$r=Jt<<27|de>>>5,Br=we<<20|Se>>>12,jr=Se<<20|we>>>12,Fr=ve<<7|vr>>>25,Wr=vr<<7|ve>>>25,Hr=ye<<8|ur>>>24,Vr=ur<<8|ye>>>24,Ur=be<<14|pe>>>18,zr=pe<<14|be>>>18;t[0]=xt^~En&Rn,t[1]=Ee^~ke&je,t[10]=An^~Br&Me,t[11]=Ve^~jr&Ce,t[20]=Ae^~$e&ze,t[21]=Te^~Be&qe,t[30]=Dr^~xe&Oe,t[31]=$r^~wn&xn,t[40]=De^~Ue&Fr,t[41]=Cn^~Tn&Wr,t[2]=En^~Rn&Or,t[3]=ke^~je&Nr,t[12]=Br^~Me&Ne,t[13]=jr^~Ce&Le,t[22]=$e^~ze&Hr,t[23]=Be^~qe&Vr,t[32]=xe^~Oe&Fe,t[33]=wn^~xn&In,t[42]=Ue^~Fr&_n,t[43]=Tn^~Wr&Re,t[4]=Rn^~Or&Ur,t[5]=je^~Nr&zr,t[14]=Me^~Ne&We,t[15]=Ce^~Le&He,t[24]=ze^~Hr&Ie,t[25]=qe^~Vr&Sn,t[34]=Oe^~Fe&Lr,t[35]=xn^~In&Pr,t[44]=Fr^~_n&Mn,t[45]=Wr^~Re&Pe,t[6]=Or^~Ur&xt,t[7]=Nr^~zr&Ee,t[16]=Ne^~We&An,t[17]=Le^~He&Ve,t[26]=Hr^~Ie&Ae,t[27]=Vr^~Sn&Te,t[36]=Fe^~Lr&Dr,t[37]=In^~Pr&$r,t[46]=_n^~Mn&De,t[47]=Re^~Pe&Cn,t[8]=Ur^~xt&En,t[9]=zr^~Ee&ke,t[18]=We^~An&Br,t[19]=He^~Ve&jr,t[28]=Ie^~Ae&$e,t[29]=Sn^~Te&Be,t[38]=Lr^~Dr&xe,t[39]=Pr^~$r&wn,t[48]=Mn^~De&Ue,t[49]=Pe^~Cn&Tn,t[0]^=El[e*2],t[1]^=El[e*2+1]}};const js=Vh;function di(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}di.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};di.prototype.absorb=function(t){for(let e=0;e>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(js.p1600(this.state),this.count=0);return e};di.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};var wy=di,_y=my(wy);const Sy=_y,Ey=Ys;function Uh(t){return Buffer.allocUnsafe(t).fill(0)}function zh(t,e,r){const n=Uh(e);return t=oo(t),r?t.length"u")throw new Error("Not an array?");if(r=Qh(t),r!=="dynamic"&&r!==0&&e.length>r)throw new Error("Elements exceed array size: "+r);i=[],t=t.slice(0,t.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(s in e)i.push(Xt(t,e[s]));if(r==="dynamic"){var o=Xt("uint256",e.length);i.unshift(o)}return Buffer.concat(i)}else{if(t==="bytes")return e=new Buffer(e),i=Buffer.concat([Xt("uint256",e.length),e]),e.length%32!==0&&(i=Buffer.concat([i,on.zeros(32-e.length%32)])),i;if(t.startsWith("bytes")){if(r=Un(t),r<1||r>32)throw new Error("Invalid bytes width: "+r);return on.setLengthRight(e,32)}else if(t.startsWith("uint")){if(r=Un(t),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(n=Qr(e),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(Buffer,"be",32)}else if(t.startsWith("int")){if(r=Un(t),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(n=Qr(e),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(Buffer,"be",32)}else if(t.startsWith("ufixed")){if(r=xl(t),n=Qr(e),n<0)throw new Error("Supplied ufixed is negative");return Xt("uint256",n.mul(new en(2).pow(new en(r[1]))))}else if(t.startsWith("fixed"))return r=xl(t),Xt("int256",Qr(e).mul(new en(2).pow(new en(r[1]))))}throw new Error("Unsupported or invalid type: "+t)}function Iy(t){return t==="string"||t==="bytes"||Qh(t)==="dynamic"}function Ay(t){return t.lastIndexOf("]")===t.length-1}function Ty(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var o=Zh(t[s]),a=e[s],c=Xt(o,a);Iy(o)?(r.push(Xt("uint256",i)),n.push(c),i+=c.length):r.push(c)}return Buffer.concat(r.concat(n))}function Yh(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r,n,i=[],s=0;s32)throw new Error("Invalid bytes width: "+r);i.push(on.setLengthRight(a,r))}else if(o.startsWith("uint")){if(r=Un(o),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(n=Qr(a),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());i.push(n.toArrayLike(Buffer,"be",r/8))}else if(o.startsWith("int")){if(r=Un(o),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(n=Qr(a),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());i.push(n.toTwos(r).toArrayLike(Buffer,"be",r/8))}else throw new Error("Unsupported or invalid type: "+o)}return Buffer.concat(i)}function ky(t,e){return on.keccak(Yh(t,e))}var Oy={rawEncode:Ty,solidityPack:Yh,soliditySHA3:ky};const Wt=Jh,Oi=Oy,Kh={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},_a={encodeData(t,e,r,n=!0){const i=["bytes32"],s=[this.hashType(t,r)];if(n){const o=(a,c,l)=>{if(r[c]!==void 0)return["bytes32",l==null?"0x0000000000000000000000000000000000000000000000000000000000000000":Wt.keccak(this.encodeData(c,l,r,n))];if(l===void 0)throw new Error(`missing value for field ${a} of type ${c}`);if(c==="bytes")return["bytes32",Wt.keccak(l)];if(c==="string")return typeof l=="string"&&(l=Buffer.from(l,"utf8")),["bytes32",Wt.keccak(l)];if(c.lastIndexOf("]")===c.length-1){const d=c.slice(0,c.lastIndexOf("[")),g=l.map(y=>o(a,d,y));return["bytes32",Wt.keccak(Oi.rawEncode(g.map(([y])=>y),g.map(([,y])=>y)))]}return[c,l]};for(const a of r[t]){const[c,l]=o(a.name,a.type,e[a.name]);i.push(c),s.push(l)}}else for(const o of r[t]){let a=e[o.name];if(a!==void 0)if(o.type==="bytes")i.push("bytes32"),a=Wt.keccak(a),s.push(a);else if(o.type==="string")i.push("bytes32"),typeof a=="string"&&(a=Buffer.from(a,"utf8")),a=Wt.keccak(a),s.push(a);else if(r[o.type]!==void 0)i.push("bytes32"),a=Wt.keccak(this.encodeData(o.type,a,r,n)),s.push(a);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(o.type),s.push(a)}}return Oi.rawEncode(i,s)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(const i of n){if(!e[i])throw new Error("No type definition specified: "+i);r+=i+"("+e[i].map(({name:o,type:a})=>a+" "+o).join(",")+")"}return r},findTypeDependencies(t,e,r=[]){if(t=t.match(/^\w*/)[0],r.includes(t)||e[t]===void 0)return r;r.push(t);for(const n of e[t])for(const i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return Wt.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return Wt.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const r in Kh.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){const r=this.sanitizeData(t),n=[Buffer.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,e)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,e)),Wt.keccak(Buffer.concat(n))}};var Ny={TYPED_MESSAGE_SCHEMA:Kh,TypedDataUtils:_a,hashForSignTypedDataLegacy:function(t){return Ly(t.data)},hashForSignTypedData_v3:function(t){return _a.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return _a.hash(t.data)}};function Ly(t){const e=new Error("Expect argument to be non-empty array");if(typeof t!="object"||!t.length)throw e;const r=t.map(function(s){return s.type==="bytes"?Wt.toBuffer(s.value):s.value}),n=t.map(function(s){return s.type}),i=t.map(function(s){if(!s.name)throw e;return s.type+" "+s.name});return Oi.soliditySHA3(["bytes32","bytes32"],[Oi.soliditySHA3(new Array(t.length).fill("string"),i),Oi.soliditySHA3(n,r)])}var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.filterFromParam=Xn.FilterPolyfill=void 0;const jn=Zi,vt=J,Py=5*60*1e3,Yr={jsonrpc:"2.0",id:0};class Dy{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,jn.IntNumber)(1),this.provider=e}async newFilter(e){const r=Xh(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,r.fromBlock);return console.log(`Installing new log filter(${n}):`,r,"initial cursor position:",i),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,vt.hexStringFromIntNumber)(n)}async newBlockFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,r),this.blockFilters.add(e),this.setFilterTimeout(e),(0,vt.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){const e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.log(`Installing new block filter (${e}) with initial cursor position:`,r),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,vt.hexStringFromIntNumber)(e)}uninstallFilter(e){const r=(0,vt.intNumberFromHexString)(e);return console.log(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(e){const r=(0,vt.intNumberFromHexString)(e);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(vs())}async getFilterLogs(e){const r=(0,vt.intNumberFromHexString)(e),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},Yr),{method:"eth_getLogs",params:[Ml(n)]})):vs()}makeFilterId(){return(0,jn.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((r,n)=>{this.provider.sendAsync(e,(i,s)=>{if(i)return n(i);if(Array.isArray(s)||s==null)return n(new Error(`unexpected response received: ${JSON.stringify(s)}`));r(s)})})}deleteFilter(e){console.log(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){const r=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!r)return vs();const i=await this.getCurrentBlockHeight(),s=r.toBlock==="latest"?i:r.toBlock;if(n>i||n>r.toBlock)return ys();console.log(`Fetching logs from ${n} to ${s} for filter ${e}`);const o=await this.sendAsyncPromise(Object.assign(Object.assign({},Yr),{method:"eth_getLogs",params:[Ml(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(o.result)){const a=o.result.map(l=>(0,vt.intNumberFromHexString)(l.blockNumber||"0x0")),c=Math.max(...a);if(c&&c>n){const l=(0,jn.IntNumber)(c+1);console.log(`Moving cursor position for filter (${e}) from ${n} to ${l}`),this.cursors.set(e,l)}}return o}async getBlockFilterChanges(e){const r=this.cursors.get(e);if(!r)return vs();const n=await this.getCurrentBlockHeight();if(r>n)return ys();console.log(`Fetching blocks from ${r} to ${n} for filter (${e})`);const i=(await Promise.all((0,vt.range)(r,n+1).map(o=>this.getBlockHashByNumber((0,jn.IntNumber)(o))))).filter(o=>!!o),s=(0,jn.IntNumber)(r+i.length);return console.log(`Moving cursor position for filter (${e}) from ${r} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},Yr),{result:i})}async getPendingTransactionFilterChanges(e){return Promise.resolve(ys())}async setInitialCursorPosition(e,r){const n=await this.getCurrentBlockHeight(),i=typeof r=="number"&&r>n?r:n;return this.cursors.set(e,i),i}setFilterTimeout(e){const r=this.timeouts.get(e);r&&window.clearTimeout(r);const n=window.setTimeout(()=>{console.log(`Filter (${e}) timed out`),this.deleteFilter(e)},Py);this.timeouts.set(e,n)}async getCurrentBlockHeight(){const{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},Yr),{method:"eth_blockNumber",params:[]}));return(0,vt.intNumberFromHexString)((0,vt.ensureHexString)(e))}async getBlockHashByNumber(e){const r=await this.sendAsyncPromise(Object.assign(Object.assign({},Yr),{method:"eth_getBlockByNumber",params:[(0,vt.hexStringFromIntNumber)(e),!1]}));return r.result&&typeof r.result.hash=="string"?(0,vt.ensureHexString)(r.result.hash):null}}Xn.FilterPolyfill=Dy;function Xh(t){return{fromBlock:Cl(t.fromBlock),toBlock:Cl(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}Xn.filterFromParam=Xh;function Ml(t){const e={fromBlock:Rl(t.fromBlock),toBlock:Rl(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function Cl(t){if(t===void 0||t==="latest"||t==="pending")return"latest";if(t==="earliest")return(0,jn.IntNumber)(0);if((0,vt.isHexString)(t))return(0,vt.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function Rl(t){return t==="latest"?t:(0,vt.hexStringFromIntNumber)(t)}function vs(){return Object.assign(Object.assign({},Yr),{error:{code:-32e3,message:"filter not found"}})}function ys(){return Object.assign(Object.assign({},Yr),{result:[]})}var ed={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSONRPCMethod=void 0,function(e){e.eth_accounts="eth_accounts",e.eth_coinbase="eth_coinbase",e.net_version="net_version",e.eth_chainId="eth_chainId",e.eth_uninstallFilter="eth_uninstallFilter",e.eth_requestAccounts="eth_requestAccounts",e.eth_sign="eth_sign",e.eth_ecRecover="eth_ecRecover",e.personal_sign="personal_sign",e.personal_ecRecover="personal_ecRecover",e.eth_signTransaction="eth_signTransaction",e.eth_sendRawTransaction="eth_sendRawTransaction",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTypedData_v1="eth_signTypedData_v1",e.eth_signTypedData_v2="eth_signTypedData_v2",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_signTypedData="eth_signTypedData",e.cbWallet_arbitrary="walletlink_arbitrary",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.wallet_watchAsset="wallet_watchAsset",e.eth_subscribe="eth_subscribe",e.eth_unsubscribe="eth_unsubscribe",e.eth_newFilter="eth_newFilter",e.eth_newBlockFilter="eth_newBlockFilter",e.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",e.eth_getFilterChanges="eth_getFilterChanges",e.eth_getFilterLogs="eth_getFilterLogs"}(t.JSONRPCMethod||(t.JSONRPCMethod={}))})(ed);var ao={},td={},uo={},Lu=$y;function $y(t){t=t||{};var e=t.max||Number.MAX_SAFE_INTEGER,r=typeof t.start<"u"?t.start:Math.floor(Math.random()*e);return function(){return r=r%e,r++}}const Il=(t,e)=>function(){const r=e.promiseModule,n=new Array(arguments.length);for(let i=0;i{e.errorFirst?n.push(function(o,a){if(e.multiArgs){const c=new Array(arguments.length-1);for(let l=1;l{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const r=i=>{const s=o=>typeof o=="string"?i===o:o.test(i);return e.include?e.include.some(s):!e.exclude.some(s)};let n;typeof t=="function"?n=function(){return e.excludeMain?t.apply(this,arguments):Il(t,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(t));for(const i in t){const s=t[i];n[i]=typeof s=="function"&&r(i)?Il(s,e):s}return n},Ki={},jy=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.BaseBlockTracker=void 0;const Fy=jy(fn),Wy=1e3,Hy=(t,e)=>t+e,Al=["sync","latest"];class Vy extends Fy.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*Wy,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(r=>this.once("latest",r))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){Al.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return Al.map(e=>this.listenerCount(e)).reduce(Hy)}_newPotentialLatest(e){const r=this._currentBlock;r&&Tl(e)<=Tl(r)||this._setCurrentBlock(e)}_setCurrentBlock(e){const r=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:r,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}Ki.BaseBlockTracker=Vy;function Tl(t){return Number.parseInt(t,16)}var rd={},nd={},ht={};class id extends TypeError{constructor(e,r){let n;const{message:i,explanation:s,...o}=e,{path:a}=e,c=a.length===0?i:`At path: ${a.join(".")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}}function Uy(t){return Dt(t)&&typeof t[Symbol.iterator]=="function"}function Dt(t){return typeof t=="object"&&t!=null}function kl(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function nt(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function zy(t){const{done:e,value:r}=t.next();return e?void 0:r}function qy(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:i,branch:s}=e,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${nt(n)}\``}=t;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...t,message:c}}function*su(t,e,r,n){Uy(t)||(t=[t]);for(const i of t){const s=qy(i,e,r,n);s&&(yield s)}}function*Pu(t,e,r={}){const{path:n=[],branch:i=[t],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i};if(s&&(t=e.coercer(t,a),o&&e.type!=="type"&&Dt(e.schema)&&Dt(t)&&!Array.isArray(t)))for(const l in t)e.schema[l]===void 0&&delete t[l];let c="valid";for(const l of e.validator(t,a))l.explanation=r.message,c="not_valid",yield[l,void 0];for(let[l,d,g]of e.entries(t,a)){const y=Pu(d,g,{path:l===void 0?n:[...n,l],branch:l===void 0?i:[...i,d],coerce:s,mask:o,message:r.message});for(const C of y)C[0]?(c=C[0].refinement!=null?"not_refined":"not_valid",yield[C[0],void 0]):s&&(d=C[1],l===void 0?t=d:t instanceof Map?t.set(l,d):t instanceof Set?t.add(d):Dt(t)&&(d!==void 0||l in t)&&(t[l]=d))}if(c!=="not_valid")for(const l of e.refiner(t,a))l.explanation=r.message,c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,t])}class et{constructor(e){const{type:r,schema:n,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=e;this.type=r,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(c,l)=>{const d=i(c,l);return su(d,l,this,c)}:this.validator=()=>[],s?this.refiner=(c,l)=>{const d=s(c,l);return su(d,l,this,c)}:this.refiner=()=>[]}assert(e,r){return sd(e,this,r)}create(e,r){return od(e,this,r)}is(e){return Du(e,this)}mask(e,r){return ad(e,this,r)}validate(e,r={}){return pi(e,this,r)}}function sd(t,e,r){const n=pi(t,e,{message:r});if(n[0])throw n[0]}function od(t,e,r){const n=pi(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function ad(t,e,r){const n=pi(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function Du(t,e){return!pi(t,e)[0]}function pi(t,e,r={}){const n=Pu(t,e,r),i=zy(n);return i[0]?[new id(i[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function Gy(...t){const e=t[0].type==="type",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?Bu(n):Xi(n)}function Et(t,e){return new et({type:t,schema:null,validator:e})}function Jy(t,e){return new et({...t,refiner:(r,n)=>r===void 0||t.refiner(r,n),validator(r,n){return r===void 0?!0:(e(r,n),t.validator(r,n))}})}function Zy(t){return new et({type:"dynamic",schema:null,*entries(e,r){yield*t(e,r).entries(e,r)},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function Qy(t){let e;return new et({type:"lazy",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator(r,n){return e??(e=t()),e.validator(r,n)},coercer(r,n){return e??(e=t()),e.coercer(r,n)},refiner(r,n){return e??(e=t()),e.refiner(r,n)}})}function Yy(t,e){const{schema:r}=t,n={...r};for(const i of e)delete n[i];switch(t.type){case"type":return Bu(n);default:return Xi(n)}}function Ky(t){const e=t instanceof et?{...t.schema}:{...t};for(const r in e)e[r]=ud(e[r]);return Xi(e)}function Xy(t,e){const{schema:r}=t,n={};for(const i of e)n[i]=r[i];return Xi(n)}function em(t,e){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Et(t,e)}function tm(){return Et("any",()=>!0)}function rm(t){return new et({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${nt(e)}`}})}function nm(){return Et("bigint",t=>typeof t=="bigint")}function im(){return Et("boolean",t=>typeof t=="boolean")}function sm(){return Et("date",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${nt(t)}`)}function om(t){const e={},r=t.map(n=>nt(n)).join();for(const n of t)e[n]=n;return new et({type:"enums",schema:e,validator(n){return t.includes(n)||`Expected one of \`${r}\`, but received: ${nt(n)}`}})}function am(){return Et("func",t=>typeof t=="function"||`Expected a function, but received: ${nt(t)}`)}function um(t){return Et("instance",e=>e instanceof t||`Expected a \`${t.name}\` instance, but received: ${nt(e)}`)}function cm(){return Et("integer",t=>typeof t=="number"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${nt(t)}`)}function lm(t){return new et({type:"intersection",schema:null,*entries(e,r){for(const n of t)yield*n.entries(e,r)},*validator(e,r){for(const n of t)yield*n.validator(e,r)},*refiner(e,r){for(const n of t)yield*n.refiner(e,r)}})}function fm(t){const e=nt(t),r=typeof t;return new et({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${nt(n)}`}})}function hm(t,e){return new et({type:"map",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,t],yield[n,i,e]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${nt(r)}`}})}function $u(){return Et("never",()=>!1)}function dm(t){return new et({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function pm(){return Et("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${nt(t)}`)}function Xi(t){const e=t?Object.keys(t):[],r=$u();return new et({type:"object",schema:t||null,*entries(n){if(t&&Dt(n)){const i=new Set(Object.keys(n));for(const s of e)i.delete(s),yield[s,n[s],t[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return Dt(n)||`Expected an object, but received: ${nt(n)}`},coercer(n){return Dt(n)?{...n}:n}})}function ud(t){return new et({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function gm(t,e){return new et({type:"record",schema:null,*entries(r){if(Dt(r))for(const n in r){const i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return Dt(r)||`Expected an object, but received: ${nt(r)}`}})}function bm(){return Et("regexp",t=>t instanceof RegExp)}function vm(t){return new et({type:"set",schema:null,*entries(e){if(t&&e instanceof Set)for(const r of e)yield[r,r,t]},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \`Set\` object, but received: ${nt(e)}`}})}function cd(){return Et("string",t=>typeof t=="string"||`Expected a string, but received: ${nt(t)}`)}function ym(t){const e=$u();return new et({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(t.length,r.length);for(let i=0;ir.type).join(" | ");return new et({type:"union",schema:null,coercer(r){for(const n of t){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of t){const[...o]=Pu(r,s,n),[a]=o;if(a[0])for(const[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${nt(r)}`,...i]}})}function ld(){return Et("unknown",()=>!0)}function ju(t,e,r){return new et({...t,coercer:(n,i)=>Du(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function wm(t,e,r={}){return ju(t,ld(),n=>{const i=typeof e=="function"?e():e;if(n===void 0)return i;if(!r.strict&&kl(n)&&kl(i)){const s={...n};let o=!1;for(const a in i)s[a]===void 0&&(s[a]=i[a],o=!0);if(o)return s}return n})}function _m(t){return ju(t,cd(),e=>e.trim())}function Sm(t){return vn(t,"empty",e=>{const r=fd(e);return r===0||`Expected an empty ${t.type} but received one with a size of \`${r}\``})}function fd(t){return t instanceof Map||t instanceof Set?t.size:t.length}function Em(t,e,r={}){const{exclusive:n}=r;return vn(t,"max",i=>n?in?i>e:i>=e||`Expected a ${t.type} greater than ${n?"":"or equal to "}${e} but received \`${i}\``)}function Mm(t){return vn(t,"nonempty",e=>fd(e)>0||`Expected a nonempty ${t.type} but received an empty one`)}function Cm(t,e){return vn(t,"pattern",r=>e.test(r)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`)}function Rm(t,e,r=e){const n=`Expected a ${t.type}`,i=e===r?`of \`${e}\``:`between \`${e}\` and \`${r}\``;return vn(t,"size",s=>{if(typeof s=="number"||s instanceof Date)return e<=s&&s<=r||`${n} ${i} but received \`${s}\``;if(s instanceof Map||s instanceof Set){const{size:o}=s;return e<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}else{const{length:o}=s;return e<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}})}function vn(t,e,r){return new et({...t,*refiner(n,i){yield*t.refiner(n,i);const s=r(n,i),o=su(s,i,t,n);for(const a of o)yield{...a,refinement:e}}})}const Im=Object.freeze(Object.defineProperty({__proto__:null,Struct:et,StructError:id,any:tm,array:rm,assert:sd,assign:Gy,bigint:nm,boolean:im,coerce:ju,create:od,date:sm,defaulted:wm,define:Et,deprecated:Jy,dynamic:Zy,empty:Sm,enums:om,func:am,instance:um,integer:cm,intersection:lm,is:Du,lazy:Qy,literal:fm,map:hm,mask:ad,max:Em,min:xm,never:$u,nonempty:Mm,nullable:dm,number:pm,object:Xi,omit:Yy,optional:ud,partial:Ky,pattern:Cm,pick:Xy,record:gm,refine:vn,regexp:bm,set:vm,size:Rm,string:cd,struct:em,trimmed:_m,tuple:ym,type:Bu,union:mm,unknown:ld,validate:pi},Symbol.toStringTag,{value:"Module"})),yn=ln(Im);Object.defineProperty(ht,"__esModule",{value:!0});ht.assertExhaustive=ht.assertStruct=ht.assert=ht.AssertionError=void 0;const Am=yn;function Tm(t){return typeof t=="object"&&t!==null&&"message"in t}function km(t){var e,r;return typeof((r=(e=t==null?void 0:t.prototype)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.name)=="string"}function Om(t){const e=Tm(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}function hd(t,e){return km(t)?new t({message:e}):t({message:e})}class Fu extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}ht.AssertionError=Fu;function Nm(t,e="Assertion failed.",r=Fu){if(!t)throw e instanceof Error?e:hd(r,e)}ht.assert=Nm;function Lm(t,e,r="Assertion failed",n=Fu){try{(0,Am.assert)(t,e)}catch(i){throw hd(n,`${r}: ${Om(i)}.`)}}ht.assertStruct=Lm;function Pm(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}ht.assertExhaustive=Pm;var es={};Object.defineProperty(es,"__esModule",{value:!0});es.base64=void 0;const Dm=yn,$m=ht,Bm=(t,e={})=>{var r,n;const i=(r=e.paddingRequired)!==null&&r!==void 0?r:!1,s=(n=e.characterSet)!==null&&n!==void 0?n:"base64";let o;s==="base64"?o=String.raw`[A-Za-z0-9+\/]`:((0,$m.assert)(s==="base64url"),o=String.raw`[-_A-Za-z0-9]`);let a;return i?a=new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):a=new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,Dm.pattern)(t,a)};es.base64=Bm;var fe={},ts={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const e=yn,r=ht;t.HexStruct=(0,e.pattern)((0,e.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,e.pattern)((0,e.string)(),/^0x[0-9a-f]+$/iu);function n(l){return(0,e.is)(l,t.HexStruct)}t.isHexString=n;function i(l){return(0,e.is)(l,t.StrictHexStruct)}t.isStrictHexString=i;function s(l){(0,r.assert)(n(l),"Value must be a hexadecimal string.")}t.assertIsHexString=s;function o(l){(0,r.assert)(i(l),'Value must be a hexadecimal string, starting with "0x".')}t.assertIsStrictHexString=o;function a(l){return l.startsWith("0x")?l:l.startsWith("0X")?`0x${l.substring(2)}`:`0x${l}`}t.add0x=a;function c(l){return l.startsWith("0x")||l.startsWith("0X")?l.substring(2):l}t.remove0x=c})(ts);Object.defineProperty(fe,"__esModule",{value:!0});fe.createDataView=fe.concatBytes=fe.valueToBytes=fe.stringToBytes=fe.numberToBytes=fe.signedBigIntToBytes=fe.bigIntToBytes=fe.hexToBytes=fe.bytesToString=fe.bytesToNumber=fe.bytesToSignedBigInt=fe.bytesToBigInt=fe.bytesToHex=fe.assertIsBytes=fe.isBytes=void 0;const Ct=ht,ou=ts,Ol=48,Nl=58,Ll=87;function jm(){const t=[];return()=>{if(t.length===0)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,"0"));return t}}const Fm=jm();function Wu(t){return t instanceof Uint8Array}fe.isBytes=Wu;function gi(t){(0,Ct.assert)(Wu(t),"Value must be a Uint8Array.")}fe.assertIsBytes=gi;function dd(t){if(gi(t),t.length===0)return"0x";const e=Fm(),r=new Array(t.length);for(let n=0;n=BigInt(0),"Value must be a non-negative bigint.");const e=t.toString(16);return co(e)}fe.bigIntToBytes=gd;function Um(t,e){(0,Ct.assert)(e>0);const r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function zm(t,e){(0,Ct.assert)(typeof t=="bigint","Value must be a bigint."),(0,Ct.assert)(typeof e=="number","Byte length must be a number."),(0,Ct.assert)(e>0,"Byte length must be greater than 0."),(0,Ct.assert)(Um(t,e),"Byte length is too small to represent the given value.");let r=t;const n=new Uint8Array(e);for(let i=0;i>=BigInt(8);return n.reverse()}fe.signedBigIntToBytes=zm;function bd(t){(0,Ct.assert)(typeof t=="number","Value must be a number."),(0,Ct.assert)(t>=0,"Value must be a non-negative number."),(0,Ct.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToBytes` instead.");const e=t.toString(16);return co(e)}fe.numberToBytes=bd;function vd(t){return(0,Ct.assert)(typeof t=="string","Value must be a string."),new TextEncoder().encode(t)}fe.stringToBytes=vd;function yd(t){if(typeof t=="bigint")return gd(t);if(typeof t=="number")return bd(t);if(typeof t=="string")return t.startsWith("0x")?co(t):vd(t);if(Wu(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}fe.valueToBytes=yd;function qm(t){const e=new Array(t.length);let r=0;for(let i=0;ie.call(r,n,i,this))}get(e){return yt(this,jt,"f").get(e)}has(e){return yt(this,jt,"f").has(e)}keys(){return yt(this,jt,"f").keys()}values(){return yt(this,jt,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(", ")} `:""}}`}}ei.FrozenMap=Hu;class Vu{constructor(e){Qt.set(this,void 0),_d(this,Qt,new Set(e),"f"),Object.freeze(this)}get size(){return yt(this,Qt,"f").size}[(Qt=new WeakMap,Symbol.iterator)](){return yt(this,Qt,"f")[Symbol.iterator]()}entries(){return yt(this,Qt,"f").entries()}forEach(e,r){return yt(this,Qt,"f").forEach((n,i,s)=>e.call(r,n,i,this))}has(e){return yt(this,Qt,"f").has(e)}keys(){return yt(this,Qt,"f").keys()}values(){return yt(this,Qt,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}ei.FrozenSet=Vu;Object.freeze(Hu);Object.freeze(Hu.prototype);Object.freeze(Vu);Object.freeze(Vu.prototype);var Sd={},Uu={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0;function e(l){return Array.isArray(l)&&l.length>0}t.isNonEmptyArray=e;function r(l){return l==null}t.isNullOrUndefined=r;function n(l){return!!l&&typeof l=="object"&&!Array.isArray(l)}t.isObject=n;const i=(l,d)=>Object.hasOwnProperty.call(l,d);t.hasProperty=i,function(l){l[l.Null=4]="Null",l[l.Comma=1]="Comma",l[l.Wrapper=1]="Wrapper",l[l.True=4]="True",l[l.False=5]="False",l[l.Quote=1]="Quote",l[l.Colon=1]="Colon",l[l.Date=24]="Date"}(t.JsonSize||(t.JsonSize={})),t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function s(l){if(typeof l!="object"||l===null)return!1;try{let d=l;for(;Object.getPrototypeOf(d)!==null;)d=Object.getPrototypeOf(d);return Object.getPrototypeOf(l)===d}catch{return!1}}t.isPlainObject=s;function o(l){return l.charCodeAt(0)<=127}t.isASCII=o;function a(l){var d;return l.split("").reduce((y,C)=>o(C)?y+1:y+2,0)+((d=l.match(t.ESCAPE_CHARACTERS_REGEXP))!==null&&d!==void 0?d:[]).length}t.calculateStringSize=a;function c(l){return l.toString().length}t.calculateNumberSize=c})(Uu);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonAndGetSize=t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.isValidJson=t.JsonStruct=void 0;const e=yn,r=ht,n=Uu;t.JsonStruct=(0,e.define)("Json",L=>{const[B]=P(L,!0);return B?!0:"Expected a valid JSON-serializable value"});function i(L){return(0,e.is)(L,t.JsonStruct)}t.isValidJson=i,t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,e.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,e.nullable)((0,e.union)([(0,e.number)(),(0,e.string)()])),t.JsonRpcErrorStruct=(0,e.object)({code:(0,e.integer)(),message:(0,e.string)(),data:(0,e.optional)(t.JsonStruct),stack:(0,e.optional)((0,e.string)())}),t.JsonRpcParamsStruct=(0,e.optional)((0,e.union)([(0,e.record)((0,e.string)(),t.JsonStruct),(0,e.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,e.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,e.omit)(t.JsonRpcRequestStruct,["id"]);function s(L){return(0,e.is)(L,t.JsonRpcNotificationStruct)}t.isJsonRpcNotification=s;function o(L,B){(0,r.assertStruct)(L,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",B)}t.assertIsJsonRpcNotification=o;function a(L){return(0,e.is)(L,t.JsonRpcRequestStruct)}t.isJsonRpcRequest=a;function c(L,B){(0,r.assertStruct)(L,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",B)}t.assertIsJsonRpcRequest=c,t.PendingJsonRpcResponseStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,e.optional)((0,e.unknown)()),error:(0,e.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,e.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,e.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]);function l(L){return(0,e.is)(L,t.PendingJsonRpcResponseStruct)}t.isPendingJsonRpcResponse=l;function d(L,B){(0,r.assertStruct)(L,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",B)}t.assertIsPendingJsonRpcResponse=d;function g(L){return(0,e.is)(L,t.JsonRpcResponseStruct)}t.isJsonRpcResponse=g;function y(L,B){(0,r.assertStruct)(L,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",B)}t.assertIsJsonRpcResponse=y;function C(L){return(0,e.is)(L,t.JsonRpcSuccessStruct)}t.isJsonRpcSuccess=C;function A(L,B){(0,r.assertStruct)(L,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",B)}t.assertIsJsonRpcSuccess=A;function D(L){return(0,e.is)(L,t.JsonRpcFailureStruct)}t.isJsonRpcFailure=D;function N(L,B){(0,r.assertStruct)(L,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",B)}t.assertIsJsonRpcFailure=N;function x(L){return(0,e.is)(L,t.JsonRpcErrorStruct)}t.isJsonRpcError=x;function I(L,B){(0,r.assertStruct)(L,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",B)}t.assertIsJsonRpcError=I;function O(L){const{permitEmptyString:B,permitFractions:G,permitNull:z}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},L);return K=>!!(typeof K=="number"&&(G||Number.isInteger(K))||typeof K=="string"&&(B||K.length>0)||z&&K===null)}t.getJsonRpcIdValidator=O;function P(L,B=!1){const G=new Set;function z(W,K){if(W===void 0)return[!1,0];if(W===null)return[!0,K?0:n.JsonSize.Null];const Y=typeof W;try{if(Y==="function")return[!1,0];if(Y==="string"||W instanceof String)return[!0,K?0:(0,n.calculateStringSize)(W)+n.JsonSize.Quote*2];if(Y==="boolean"||W instanceof Boolean)return K?[!0,0]:[!0,W==!0?n.JsonSize.True:n.JsonSize.False];if(Y==="number"||W instanceof Number)return K?[!0,0]:[!0,(0,n.calculateNumberSize)(W)];if(W instanceof Date)return K?[!0,0]:[!0,isNaN(W.getDate())?n.JsonSize.Null:n.JsonSize.Date+n.JsonSize.Quote*2]}catch{return[!1,0]}if(!(0,n.isPlainObject)(W)&&!Array.isArray(W))return[!1,0];if(G.has(W))return[!1,0];G.add(W);try{return[!0,Object.entries(W).reduce((X,[b,u],h,p)=>{let[v,w]=z(u,K);if(!v)throw new Error("JSON validation did not pass. Validation process stopped.");if(G.delete(W),K)return 0;const M=Array.isArray(W)?0:b.length+n.JsonSize.Comma+n.JsonSize.Colon*2,T=h0)return o(d);if(y==="number"&&isFinite(d))return g.long?c(d):a(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function o(d){if(d=String(d),!(d.length>100)){var g=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(g){var y=parseFloat(g[1]),C=(g[2]||"ms").toLowerCase();switch(C){case"years":case"year":case"yrs":case"yr":case"y":return y*s;case"weeks":case"week":case"w":return y*i;case"days":case"day":case"d":return y*n;case"hours":case"hour":case"hrs":case"hr":case"h":return y*r;case"minutes":case"minute":case"mins":case"min":case"m":return y*e;case"seconds":case"second":case"secs":case"sec":case"s":return y*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return y;default:return}}}}function a(d){var g=Math.abs(d);return g>=n?Math.round(d/n)+"d":g>=r?Math.round(d/r)+"h":g>=e?Math.round(d/e)+"m":g>=t?Math.round(d/t)+"s":d+"ms"}function c(d){var g=Math.abs(d);return g>=n?l(d,g,n,"day"):g>=r?l(d,g,r,"hour"):g>=e?l(d,g,e,"minute"):g>=t?l(d,g,t,"second"):d+" ms"}function l(d,g,y,C){var A=g>=y*1.5;return Math.round(d/y)+" "+C+(A?"s":"")}return Sa}function s1(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=i1(),r.destroy=l,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function e(d){let g=0;for(let y=0;y{if(B==="%%")return"%";P++;const z=r.formatters[G];if(typeof z=="function"){const W=N[P];B=z.call(x,W),N.splice(P,1),P--}return B}),r.formatArgs.call(x,N),(x.log||r.log).apply(x,N)}return D.namespace=d,D.useColors=r.useColors(),D.color=r.selectColor(d),D.extend=n,D.destroy=r.destroy,Object.defineProperty(D,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(C!==r.namespaces&&(C=r.namespaces,A=r.enabled(d)),A),set:N=>{y=N}}),typeof r.init=="function"&&r.init(D),D}function n(d,g){const y=r(this.namespace+(typeof g>"u"?":":g)+d);return y.log=this.log,y}function i(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let g;const y=(typeof d=="string"?d:"").split(/[\s,]+/),C=y.length;for(g=0;g"-"+g)].join(",");return r.enable(""),d}function o(d){if(d[d.length-1]==="*")return!0;let g,y;for(g=0,y=r.skips.length;g{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let d=0,g=0;c[0].replace(/%[a-zA-Z%]/g,y=>{y!=="%%"&&(d++,y==="%c"&&(g=d))}),c.splice(g,0,l)}e.log=console.debug||console.log||(()=>{});function i(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function s(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c={}.DEBUG),c}function o(){try{return localStorage}catch{}}t.exports=o1(e);const{formatters:a}=t.exports;a.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(au,au.exports);var a1=au.exports,u1=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ti,"__esModule",{value:!0});ti.createModuleLogger=ti.createProjectLogger=void 0;const c1=u1(a1),l1=(0,c1.default)("metamask");function f1(t){return l1.extend(t)}ti.createProjectLogger=f1;function h1(t,e){return t.extend(e)}ti.createModuleLogger=h1;var ir={};Object.defineProperty(ir,"__esModule",{value:!0});ir.hexToBigInt=ir.hexToNumber=ir.bigIntToHex=ir.numberToHex=void 0;const zn=ht,Bi=ts,d1=t=>((0,zn.assert)(typeof t=="number","Value must be a number."),(0,zn.assert)(t>=0,"Value must be a non-negative number."),(0,zn.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,Bi.add0x)(t.toString(16)));ir.numberToHex=d1;const p1=t=>((0,zn.assert)(typeof t=="bigint","Value must be a bigint."),(0,zn.assert)(t>=0,"Value must be a non-negative bigint."),(0,Bi.add0x)(t.toString(16)));ir.bigIntToHex=p1;const g1=t=>{(0,Bi.assertIsHexString)(t);const e=parseInt(t,16);return(0,zn.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};ir.hexToNumber=g1;const b1=t=>((0,Bi.assertIsHexString)(t),BigInt((0,Bi.add0x)(t)));ir.hexToBigInt=b1;var Ed={};Object.defineProperty(Ed,"__esModule",{value:!0});var xd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,function(s){s[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Year=31536e6]="Year"}(t.Duration||(t.Duration={}));const e=s=>Number.isInteger(s)&&s>=0,r=(s,o)=>{if(!e(s))throw new Error(`"${o}" must be a non-negative integer. Received: "${s}".`)};function n(s,o){return r(s,"count"),s*o}t.inMilliseconds=n;function i(s){return r(s,"timestamp"),Date.now()-s}t.timeSince=i})(xd);var Md={},uu={exports:{}};const v1="2.0.0",Cd=256,y1=Number.MAX_SAFE_INTEGER||9007199254740991,m1=16,w1=Cd-6,_1=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var ho={MAX_LENGTH:Cd,MAX_SAFE_COMPONENT_LENGTH:m1,MAX_SAFE_BUILD_LENGTH:w1,MAX_SAFE_INTEGER:y1,RELEASE_TYPES:_1,SEMVER_SPEC_VERSION:v1,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const S1=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var po=S1;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=ho,s=po;e=t.exports={};const o=e.re=[],a=e.safeRe=[],c=e.src=[],l=e.t={};let d=0;const g="[a-zA-Z0-9-]",y=[["\\s",1],["\\d",i],[g,n]],C=D=>{for(const[N,x]of y)D=D.split(`${N}*`).join(`${N}{0,${x}}`).split(`${N}+`).join(`${N}{1,${x}}`);return D},A=(D,N,x)=>{const I=C(N),O=d++;s(D,O,N),l[D]=O,c[O]=N,o[O]=new RegExp(N,x?"g":void 0),a[O]=new RegExp(I,x?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*"),A("NUMERICIDENTIFIERLOOSE","\\d+"),A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${g}*`),A("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),A("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),A("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),A("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),A("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),A("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),A("BUILDIDENTIFIER",`${g}+`),A("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),A("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),A("FULL",`^${c[l.FULLPLAIN]}$`),A("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),A("LOOSE",`^${c[l.LOOSEPLAIN]}$`),A("GTLT","((?:<|>)?=?)"),A("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),A("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),A("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),A("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),A("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),A("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),A("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),A("COERCERTL",c[l.COERCE],!0),A("LONETILDE","(?:~>?)"),A("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",A("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),A("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),A("LONECARET","(?:\\^)"),A("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",A("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),A("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),A("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),A("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),A("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",A("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),A("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),A("STAR","(<|>)?=?\\s*\\*"),A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(uu,uu.exports);var rs=uu.exports;const E1=Object.freeze({loose:!0}),x1=Object.freeze({}),M1=t=>t?typeof t!="object"?E1:t:x1;var zu=M1;const $l=/^[0-9]+$/,Rd=(t,e)=>{const r=$l.test(t),n=$l.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:tRd(e,t);var Id={compareIdentifiers:Rd,rcompareIdentifiers:C1};const ms=po,{MAX_LENGTH:Bl,MAX_SAFE_INTEGER:ws}=ho,{safeRe:jl,t:Fl}=rs,R1=zu,{compareIdentifiers:Nn}=Id;let I1=class Kt{constructor(e,r){if(r=R1(r),e instanceof Kt){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Bl)throw new TypeError(`version is longer than ${Bl} characters`);ms("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?jl[Fl.LOOSE]:jl[Fl.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ws||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ws||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ws||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),Nn(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var _t=I1;const Wl=_t,A1=(t,e,r=!1)=>{if(t instanceof Wl)return t;try{return new Wl(t,e)}catch(n){if(!r)return null;throw n}};var bi=A1;const T1=bi,k1=(t,e)=>{const r=T1(t,e);return r?r.version:null};var O1=k1;const N1=bi,L1=(t,e)=>{const r=N1(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var P1=L1;const Hl=_t,D1=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new Hl(t instanceof Hl?t.version:t,r).inc(e,n,i).version}catch{return null}};var $1=D1;const Vl=bi,B1=(t,e)=>{const r=Vl(t,null,!0),n=Vl(e,null,!0),i=r.compare(n);if(i===0)return null;const s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";const d=c?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"};var j1=B1;const F1=_t,W1=(t,e)=>new F1(t,e).major;var H1=W1;const V1=_t,U1=(t,e)=>new V1(t,e).minor;var z1=U1;const q1=_t,G1=(t,e)=>new q1(t,e).patch;var J1=G1;const Z1=bi,Q1=(t,e)=>{const r=Z1(t,e);return r&&r.prerelease.length?r.prerelease:null};var Y1=Q1;const Ul=_t,K1=(t,e,r)=>new Ul(t,r).compare(new Ul(e,r));var qt=K1;const X1=qt,ew=(t,e,r)=>X1(e,t,r);var tw=ew;const rw=qt,nw=(t,e)=>rw(t,e,!0);var iw=nw;const zl=_t,sw=(t,e,r)=>{const n=new zl(t,r),i=new zl(e,r);return n.compare(i)||n.compareBuild(i)};var qu=sw;const ow=qu,aw=(t,e)=>t.sort((r,n)=>ow(r,n,e));var uw=aw;const cw=qu,lw=(t,e)=>t.sort((r,n)=>cw(n,r,e));var fw=lw;const hw=qt,dw=(t,e,r)=>hw(t,e,r)>0;var go=dw;const pw=qt,gw=(t,e,r)=>pw(t,e,r)<0;var Gu=gw;const bw=qt,vw=(t,e,r)=>bw(t,e,r)===0;var Ad=vw;const yw=qt,mw=(t,e,r)=>yw(t,e,r)!==0;var Td=mw;const ww=qt,_w=(t,e,r)=>ww(t,e,r)>=0;var Ju=_w;const Sw=qt,Ew=(t,e,r)=>Sw(t,e,r)<=0;var Zu=Ew;const xw=Ad,Mw=Td,Cw=go,Rw=Ju,Iw=Gu,Aw=Zu,Tw=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return xw(t,r,n);case"!=":return Mw(t,r,n);case">":return Cw(t,r,n);case">=":return Rw(t,r,n);case"<":return Iw(t,r,n);case"<=":return Aw(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var kd=Tw;const kw=_t,Ow=bi,{safeRe:_s,t:Ss}=rs,Nw=(t,e)=>{if(t instanceof kw)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(_s[Ss.COERCE]);else{let n;for(;(n=_s[Ss.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),_s[Ss.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;_s[Ss.COERCERTL].lastIndex=-1}return r===null?null:Ow(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var Lw=Nw,Ea,ql;function Pw(){return ql||(ql=1,Ea=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),Ea}var Dw=he;he.Node=an;he.create=he;function he(t){var e=this;if(e instanceof he||(e=new he),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r1)r=e;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=t(r,n.value,i),n=n.next;return r};he.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=t(r,n.value,i),n=n.prev;return r};he.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};he.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};he.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new he;if(ethis.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&nthis.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>t;n--,i=i.prev)r.push(i.value);return r};he.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,i=this.head;i!==null&&n1;class Ww{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[Kr]=e.max||1/0;const r=e.length||xa;if(this[Ln]=typeof r!="function"?xa:r,this[Ni]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[tn]=e.maxAge||0,this[cr]=e.dispose,this[Gl]=e.noDisposeOnSet||!1,this[Od]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Kr]=e||1/0,Ei(this)}get max(){return this[Kr]}set allowStale(e){this[Ni]=!!e}get allowStale(){return this[Ni]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[tn]=e,Ei(this)}get maxAge(){return this[tn]}set lengthCalculator(e){typeof e!="function"&&(e=xa),e!==this[Ln]&&(this[Ln]=e,this[hr]=0,this[ot].forEach(r=>{r.length=this[Ln](r.value,r.key),this[hr]+=r.length})),Ei(this)}get lengthCalculator(){return this[Ln]}get length(){return this[hr]}get itemCount(){return this[ot].length}rforEach(e,r){r=r||this;for(let n=this[ot].tail;n!==null;){const i=n.prev;Jl(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[ot].head;n!==null;){const i=n.next;Jl(this,e,n,r),n=i}}keys(){return this[ot].toArray().map(e=>e.key)}values(){return this[ot].toArray().map(e=>e.value)}reset(){this[cr]&&this[ot]&&this[ot].length&&this[ot].forEach(e=>this[cr](e.key,e.value)),this[Ht]=new Map,this[ot]=new Fw,this[hr]=0}dump(){return this[ot].map(e=>Fs(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[ot]}set(e,r,n){if(n=n||this[tn],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,s=this[Ln](r,e);if(this[Ht].has(e)){if(s>this[Kr])return qn(this,this[Ht].get(e)),!1;const c=this[Ht].get(e).value;return this[cr]&&(this[Gl]||this[cr](e,c.value)),c.now=i,c.maxAge=n,c.value=r,this[hr]+=s-c.length,c.length=s,this.get(e),Ei(this),!0}const o=new Hw(e,r,s,i,n);return o.length>this[Kr]?(this[cr]&&this[cr](e,r),!1):(this[hr]+=o.length,this[ot].unshift(o),this[Ht].set(e,this[ot].head),Ei(this),!0)}has(e){if(!this[Ht].has(e))return!1;const r=this[Ht].get(e).value;return!Fs(this,r)}get(e){return Ma(this,e,!0)}peek(e){return Ma(this,e,!1)}pop(){const e=this[ot].tail;return e?(qn(this,e),e.value):null}del(e){qn(this,this[Ht].get(e))}load(e){this.reset();const r=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{const o=s-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[Ht].forEach((e,r)=>Ma(this,r,!1))}}const Ma=(t,e,r)=>{const n=t[Ht].get(e);if(n){const i=n.value;if(Fs(t,i)){if(qn(t,n),!t[Ni])return}else r&&(t[Od]&&(n.value.now=Date.now()),t[ot].unshiftNode(n));return i.value}},Fs=(t,e)=>{if(!e||!e.maxAge&&!t[tn])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[tn]&&r>t[tn]},Ei=t=>{if(t[hr]>t[Kr])for(let e=t[ot].tail;t[hr]>t[Kr]&&e!==null;){const r=e.prev;qn(t,e),e=r}},qn=(t,e)=>{if(e){const r=e.value;t[cr]&&t[cr](r.key,r.value),t[hr]-=r.length,t[Ht].delete(r.key),t[ot].removeNode(e)}};class Hw{constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const Jl=(t,e,r,n)=>{let i=r.value;Fs(t,i)&&(qn(t,r),t[Ni]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var Vw=Ww,Ca,Zl;function Gt(){if(Zl)return Ca;Zl=1;class t{constructor(u,h){if(h=n(h),u instanceof t)return u.loose===!!h.loose&&u.includePrerelease===!!h.includePrerelease?u:new t(u.raw,h);if(u instanceof i)return this.raw=u.value,this.set=[[u]],this.format(),this;if(this.options=h,this.loose=!!h.loose,this.includePrerelease=!!h.includePrerelease,this.raw=u.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(p=>this.parseRange(p.trim())).filter(p=>p.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const p=this.set[0];if(this.set=this.set.filter(v=>!A(v[0])),this.set.length===0)this.set=[p];else if(this.set.length>1){for(const v of this.set)if(v.length===1&&D(v[0])){this.set=[v];break}}}this.format()}format(){return this.range=this.set.map(u=>u.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(u){const p=((this.options.includePrerelease&&y)|(this.options.loose&&C))+":"+u,v=r.get(p);if(v)return v;const w=this.options.loose,M=w?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];u=u.replace(M,Y(this.options.includePrerelease)),s("hyphen replace",u),u=u.replace(a[c.COMPARATORTRIM],l),s("comparator trim",u),u=u.replace(a[c.TILDETRIM],d),s("tilde trim",u),u=u.replace(a[c.CARETTRIM],g),s("caret trim",u);let T=u.split(" ").map(U=>x(U,this.options)).join(" ").split(/\s+/).map(U=>K(U,this.options));w&&(T=T.filter(U=>(s("loose invalid filter",U,this.options),!!U.match(a[c.COMPARATORLOOSE])))),s("range list",T);const m=new Map,f=T.map(U=>new i(U,this.options));for(const U of f){if(A(U))return[U];m.set(U.value,U)}m.size>1&&m.has("")&&m.delete("");const E=[...m.values()];return r.set(p,E),E}intersects(u,h){if(!(u instanceof t))throw new TypeError("a Range is required");return this.set.some(p=>N(p,h)&&u.set.some(v=>N(v,h)&&p.every(w=>v.every(M=>w.intersects(M,h)))))}test(u){if(!u)return!1;if(typeof u=="string")try{u=new o(u,this.options)}catch{return!1}for(let h=0;hb.value==="<0.0.0-0",D=b=>b.value==="",N=(b,u)=>{let h=!0;const p=b.slice();let v=p.pop();for(;h&&p.length;)h=p.every(w=>v.intersects(w,u)),v=p.pop();return h},x=(b,u)=>(s("comp",b,u),b=L(b,u),s("caret",b),b=O(b,u),s("tildes",b),b=G(b,u),s("xrange",b),b=W(b,u),s("stars",b),b),I=b=>!b||b.toLowerCase()==="x"||b==="*",O=(b,u)=>b.trim().split(/\s+/).map(h=>P(h,u)).join(" "),P=(b,u)=>{const h=u.loose?a[c.TILDELOOSE]:a[c.TILDE];return b.replace(h,(p,v,w,M,T)=>{s("tilde",b,p,v,w,M,T);let m;return I(v)?m="":I(w)?m=`>=${v}.0.0 <${+v+1}.0.0-0`:I(M)?m=`>=${v}.${w}.0 <${v}.${+w+1}.0-0`:T?(s("replaceTilde pr",T),m=`>=${v}.${w}.${M}-${T} <${v}.${+w+1}.0-0`):m=`>=${v}.${w}.${M} <${v}.${+w+1}.0-0`,s("tilde return",m),m})},L=(b,u)=>b.trim().split(/\s+/).map(h=>B(h,u)).join(" "),B=(b,u)=>{s("caret",b,u);const h=u.loose?a[c.CARETLOOSE]:a[c.CARET],p=u.includePrerelease?"-0":"";return b.replace(h,(v,w,M,T,m)=>{s("caret",b,v,w,M,T,m);let f;return I(w)?f="":I(M)?f=`>=${w}.0.0${p} <${+w+1}.0.0-0`:I(T)?w==="0"?f=`>=${w}.${M}.0${p} <${w}.${+M+1}.0-0`:f=`>=${w}.${M}.0${p} <${+w+1}.0.0-0`:m?(s("replaceCaret pr",m),w==="0"?M==="0"?f=`>=${w}.${M}.${T}-${m} <${w}.${M}.${+T+1}-0`:f=`>=${w}.${M}.${T}-${m} <${w}.${+M+1}.0-0`:f=`>=${w}.${M}.${T}-${m} <${+w+1}.0.0-0`):(s("no pr"),w==="0"?M==="0"?f=`>=${w}.${M}.${T}${p} <${w}.${M}.${+T+1}-0`:f=`>=${w}.${M}.${T}${p} <${w}.${+M+1}.0-0`:f=`>=${w}.${M}.${T} <${+w+1}.0.0-0`),s("caret return",f),f})},G=(b,u)=>(s("replaceXRanges",b,u),b.split(/\s+/).map(h=>z(h,u)).join(" ")),z=(b,u)=>{b=b.trim();const h=u.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return b.replace(h,(p,v,w,M,T,m)=>{s("xRange",b,p,v,w,M,T,m);const f=I(w),E=f||I(M),U=E||I(T),q=U;return v==="="&&q&&(v=""),m=u.includePrerelease?"-0":"",f?v===">"||v==="<"?p="<0.0.0-0":p="*":v&&q?(E&&(M=0),T=0,v===">"?(v=">=",E?(w=+w+1,M=0,T=0):(M=+M+1,T=0)):v==="<="&&(v="<",E?w=+w+1:M=+M+1),v==="<"&&(m="-0"),p=`${v+w}.${M}.${T}${m}`):E?p=`>=${w}.0.0${m} <${+w+1}.0.0-0`:U&&(p=`>=${w}.${M}.0${m} <${w}.${+M+1}.0-0`),s("xRange return",p),p})},W=(b,u)=>(s("replaceStars",b,u),b.trim().replace(a[c.STAR],"")),K=(b,u)=>(s("replaceGTE0",b,u),b.trim().replace(a[u.includePrerelease?c.GTE0PRE:c.GTE0],"")),Y=b=>(u,h,p,v,w,M,T,m,f,E,U,q,R)=>(I(p)?h="":I(v)?h=`>=${p}.0.0${b?"-0":""}`:I(w)?h=`>=${p}.${v}.0${b?"-0":""}`:M?h=`>=${h}`:h=`>=${h}${b?"-0":""}`,I(f)?m="":I(E)?m=`<${+f+1}.0.0-0`:I(U)?m=`<${f}.${+E+1}.0-0`:q?m=`<=${f}.${E}.${U}-${q}`:b?m=`<${f}.${E}.${+U+1}-0`:m=`<=${m}`,`${h} ${m}`.trim()),X=(b,u,h)=>{for(let p=0;p0){const v=b[p].semver;if(v.major===u.major&&v.minor===u.minor&&v.patch===u.patch)return!0}return!1}return!0};return Ca}var Ra,Ql;function bo(){if(Ql)return Ra;Ql=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(d,g){if(g=r(g),d instanceof e){if(d.loose===!!g.loose)return d;d=d.value}d=d.trim().split(/\s+/).join(" "),o("comparator",d,g),this.options=g,this.loose=!!g.loose,this.parse(d),this.semver===t?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(d){const g=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],y=d.match(g);if(!y)throw new TypeError(`Invalid comparator: ${d}`);this.operator=y[1]!==void 0?y[1]:"",this.operator==="="&&(this.operator=""),y[2]?this.semver=new a(y[2],this.options.loose):this.semver=t}toString(){return this.value}test(d){if(o("Comparator.test",d,this.options.loose),this.semver===t||d===t)return!0;if(typeof d=="string")try{d=new a(d,this.options)}catch{return!1}return s(d,this.operator,this.semver,this.options)}intersects(d,g){if(!(d instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(d.value,g).test(this.value):d.operator===""?d.value===""?!0:new c(this.value,g).test(d.semver):(g=r(g),g.includePrerelease&&(this.value==="<0.0.0-0"||d.value==="<0.0.0-0")||!g.includePrerelease&&(this.value.startsWith("<0.0.0")||d.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&d.operator.startsWith(">")||this.operator.startsWith("<")&&d.operator.startsWith("<")||this.semver.version===d.semver.version&&this.operator.includes("=")&&d.operator.includes("=")||s(this.semver,"<",d.semver,g)&&this.operator.startsWith(">")&&d.operator.startsWith("<")||s(this.semver,">",d.semver,g)&&this.operator.startsWith("<")&&d.operator.startsWith(">")))}}Ra=e;const r=zu,{safeRe:n,t:i}=rs,s=kd,o=po,a=_t,c=Gt();return Ra}const Uw=Gt(),zw=(t,e,r)=>{try{e=new Uw(e,r)}catch{return!1}return e.test(t)};var vo=zw;const qw=Gt(),Gw=(t,e)=>new qw(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Jw=Gw;const Zw=_t,Qw=Gt(),Yw=(t,e,r)=>{let n=null,i=null,s=null;try{s=new Qw(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Zw(n,r))}),n};var Kw=Yw;const Xw=_t,e_=Gt(),t_=(t,e,r)=>{let n=null,i=null,s=null;try{s=new e_(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new Xw(n,r))}),n};var r_=t_;const Ia=_t,n_=Gt(),Yl=go,i_=(t,e)=>{t=new n_(t,e);let r=new Ia("0.0.0");if(t.test(r)||(r=new Ia("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{const a=new Ia(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||Yl(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||Yl(r,s))&&(r=s)}return r&&t.test(r)?r:null};var s_=i_;const o_=Gt(),a_=(t,e)=>{try{return new o_(t,e).range||"*"}catch{return null}};var u_=a_;const c_=_t,Nd=bo(),{ANY:l_}=Nd,f_=Gt(),h_=vo,Kl=go,Xl=Gu,d_=Zu,p_=Ju,g_=(t,e,r,n)=>{t=new c_(t,n),e=new f_(e,n);let i,s,o,a,c;switch(r){case">":i=Kl,s=d_,o=Xl,a=">",c=">=";break;case"<":i=Xl,s=p_,o=Kl,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(h_(t,e,n))return!1;for(let l=0;l{C.semver===l_&&(C=new Nd(">=0.0.0")),g=g||C,y=y||C,i(C.semver,g.semver,n)?g=C:o(C.semver,y.semver,n)&&(y=C)}),g.operator===a||g.operator===c||(!y.operator||y.operator===a)&&s(t,y.semver))return!1;if(y.operator===c&&o(t,y.semver))return!1}return!0};var Qu=g_;const b_=Qu,v_=(t,e,r)=>b_(t,e,">",r);var y_=v_;const m_=Qu,w_=(t,e,r)=>m_(t,e,"<",r);var __=w_;const ef=Gt(),S_=(t,e,r)=>(t=new ef(t,r),e=new ef(e,r),t.intersects(e,r));var E_=S_;const x_=vo,M_=qt;var C_=(t,e,r)=>{const n=[];let i=null,s=null;const o=t.sort((d,g)=>M_(d,g,r));for(const d of o)x_(d,e,r)?(s=d,i||(i=d)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const a=[];for(const[d,g]of n)d===g?a.push(d):!g&&d===o[0]?a.push("*"):g?d===o[0]?a.push(`<=${g}`):a.push(`${d} - ${g}`):a.push(`>=${d}`);const c=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length{if(t===e)return!0;t=new tf(t,r),e=new tf(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const o=A_(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},I_=[new Yu(">=0.0.0-0")],rf=[new Yu(">=0.0.0")],A_=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Aa){if(e.length===1&&e[0].semver===Aa)return!0;r.includePrerelease?t=I_:t=rf}if(e.length===1&&e[0].semver===Aa){if(r.includePrerelease)return!0;e=rf}const n=new Set;let i,s;for(const C of t)C.operator===">"||C.operator===">="?i=nf(i,C,r):C.operator==="<"||C.operator==="<="?s=sf(s,C,r):n.add(C.semver);if(n.size>1)return null;let o;if(i&&s){if(o=Ku(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const C of n){if(i&&!xi(C,String(i),r)||s&&!xi(C,String(s),r))return null;for(const A of e)if(!xi(C,String(A),r))return!1;return!0}let a,c,l,d,g=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,y=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(const C of e){if(d=d||C.operator===">"||C.operator===">=",l=l||C.operator==="<"||C.operator==="<=",i){if(y&&C.semver.prerelease&&C.semver.prerelease.length&&C.semver.major===y.major&&C.semver.minor===y.minor&&C.semver.patch===y.patch&&(y=!1),C.operator===">"||C.operator===">="){if(a=nf(i,C,r),a===C&&a!==i)return!1}else if(i.operator===">="&&!xi(i.semver,String(C),r))return!1}if(s){if(g&&C.semver.prerelease&&C.semver.prerelease.length&&C.semver.major===g.major&&C.semver.minor===g.minor&&C.semver.patch===g.patch&&(g=!1),C.operator==="<"||C.operator==="<="){if(c=sf(s,C,r),c===C&&c!==s)return!1}else if(s.operator==="<="&&!xi(s.semver,String(C),r))return!1}if(!C.operator&&(s||i)&&o!==0)return!1}return!(i&&l&&!s&&o!==0||s&&d&&!i&&o!==0||y||g)},nf=(t,e,r)=>{if(!t)return e;const n=Ku(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},sf=(t,e,r)=>{if(!t)return e;const n=Ku(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var T_=R_;const Ta=rs,of=ho,k_=_t,af=Id,O_=bi,N_=O1,L_=P1,P_=$1,D_=j1,$_=H1,B_=z1,j_=J1,F_=Y1,W_=qt,H_=tw,V_=iw,U_=qu,z_=uw,q_=fw,G_=go,J_=Gu,Z_=Ad,Q_=Td,Y_=Ju,K_=Zu,X_=kd,e2=Lw,t2=bo(),r2=Gt(),n2=vo,i2=Jw,s2=Kw,o2=r_,a2=s_,u2=u_,c2=Qu,l2=y_,f2=__,h2=E_,d2=C_,p2=T_;var g2={parse:O_,valid:N_,clean:L_,inc:P_,diff:D_,major:$_,minor:B_,patch:j_,prerelease:F_,compare:W_,rcompare:H_,compareLoose:V_,compareBuild:U_,sort:z_,rsort:q_,gt:G_,lt:J_,eq:Z_,neq:Q_,gte:Y_,lte:K_,cmp:X_,coerce:e2,Comparator:t2,Range:r2,satisfies:n2,toComparators:i2,maxSatisfying:s2,minSatisfying:o2,minVersion:a2,validRange:u2,outside:c2,gtr:l2,ltr:f2,intersects:h2,simplifyRange:d2,subset:p2,SemVer:k_,re:Ta.re,src:Ta.src,tokens:Ta.t,SEMVER_SPEC_VERSION:of.SEMVER_SPEC_VERSION,RELEASE_TYPES:of.RELEASE_TYPES,compareIdentifiers:af.compareIdentifiers,rcompareIdentifiers:af.rcompareIdentifiers};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const e=g2,r=yn,n=ht;t.VersionStruct=(0,r.refine)((0,r.string)(),"Version",g=>(0,e.valid)(g)===null?`Expected SemVer version, got "${g}"`:!0),t.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",g=>(0,e.validRange)(g)===null?`Expected SemVer range, got "${g}"`:!0);function i(g){return(0,r.is)(g,t.VersionStruct)}t.isValidSemVerVersion=i;function s(g){return(0,r.is)(g,t.VersionRangeStruct)}t.isValidSemVerRange=s;function o(g){(0,n.assertStruct)(g,t.VersionStruct)}t.assertIsSemVerVersion=o;function a(g){(0,n.assertStruct)(g,t.VersionRangeStruct)}t.assertIsSemVerRange=a;function c(g,y){return(0,e.gt)(g,y)}t.gtVersion=c;function l(g,y){return(0,e.gtr)(g,y)}t.gtRange=l;function d(g,y){return(0,e.satisfies)(g,y,{includePrerelease:!0})}t.satisfiesVersionRange=d})(Md);(function(t){var e=Z&&Z.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s);var a=Object.getOwnPropertyDescriptor(i,s);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,o,a)}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=Z&&Z.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(ht,t),r(es,t),r(fe,t),r(lo,t),r(nr,t),r(ei,t),r(ts,t),r(Sd,t),r(ti,t),r(Uu,t),r(ir,t),r(Ed,t),r(xd,t),r(Md,t)})(nd);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.projectLogger=void 0;const e=nd;Object.defineProperty(t,"createModuleLogger",{enumerable:!0,get:function(){return e.createModuleLogger}}),t.projectLogger=(0,e.createProjectLogger)("eth-block-tracker")})(rd);var Ld=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uo,"__esModule",{value:!0});uo.PollingBlockTracker=void 0;const b2=Ld(Lu),v2=Ld(By),y2=Ki,uf=rd,cf=(0,uf.createModuleLogger)(uf.projectLogger,"polling-block-tracker"),m2=(0,b2.default)(),w2=1e3;class _2 extends y2.BaseBlockTracker{constructor(e={}){var r;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super({blockResetDuration:(r=e.blockResetDuration)!==null&&r!==void 0?r:e.pollingInterval}),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*w2,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();const r=lf(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await r}catch(r){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block: +${(e=r.stack)!==null&&e!==void 0?e:r}`);try{this.emit("error",n)}catch{console.error(n)}const i=lf(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:m2(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),cf("Making request",e);const r=await(0,v2.default)(n=>this._provider.sendAsync(e,n))();if(cf("Got response",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block: +${r.error.message}`);return r.result}}uo.PollingBlockTracker=_2;function lf(t,e){return new Promise(r=>{const n=setTimeout(r,t);n.unref&&e&&n.unref()})}var yo={},S2=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yo,"__esModule",{value:!0});yo.SubscribeBlockTracker=void 0;const E2=S2(Lu),x2=Ki,M2=(0,E2.default)();class C2 extends x2.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}_call(e,...r){return new Promise((n,i)=>{this._provider.sendAsync({id:M2(),method:e,params:r,jsonrpc:"2.0"},(s,o)=>{s?i(s):n(o.result)})})}_handleSubData(e,r){var n;r.method==="eth_subscription"&&((n=r.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(r.params.result.number)}}yo.SubscribeBlockTracker=C2;var Pd={};Object.defineProperty(Pd,"__esModule",{value:!0});(function(t){var e=Z&&Z.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=Z&&Z.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(uo,t),r(yo,t),r(Pd,t)})(td);var Xu={},mo={},ns={};Object.defineProperty(ns,"__esModule",{value:!0});ns.getUniqueId=void 0;const Dd=4294967295;let ka=Math.floor(Math.random()*Dd);function R2(){return ka=(ka+1)%Dd,ka}ns.getUniqueId=R2;Object.defineProperty(mo,"__esModule",{value:!0});mo.createIdRemapMiddleware=void 0;const I2=ns;function A2(){return(t,e,r,n)=>{const i=t.id,s=I2.getUniqueId();t.id=s,e.id=s,r(o=>{t.id=i,e.id=i,o()})}}mo.createIdRemapMiddleware=A2;var wo={};Object.defineProperty(wo,"__esModule",{value:!0});wo.createAsyncMiddleware=void 0;function T2(t){return async(e,r,n,i)=>{let s;const o=new Promise(d=>{s=d});let a=null,c=!1;const l=async()=>{c=!0,n(d=>{a=d,s()}),await o};try{await t(e,r,l),c?(await o,a(null)):i(null)}catch(d){a?a(d):i(d)}}}wo.createAsyncMiddleware=T2;var _o={};Object.defineProperty(_o,"__esModule",{value:!0});_o.createScaffoldMiddleware=void 0;function k2(t){return(e,r,n,i)=>{const s=t[e.method];return s===void 0?n():typeof s=="function"?s(e,r,n,i):(r.result=s,i())}}_o.createScaffoldMiddleware=k2;var is={},O2=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(is,"__esModule",{value:!0});is.JsonRpcEngine=void 0;const N2=O2(fn),Tt=wu;class lr extends N2.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?r?this._handleBatch(e,r):this._handleBatch(e):r?this._handle(e,r):this._promiseHandle(e)}asMiddleware(){return async(e,r,n,i)=>{try{const[s,o,a]=await lr._runAllMiddleware(e,r,this._middleware);return o?(await lr._runReturnHandlers(a),i(s)):n(async c=>{try{await lr._runReturnHandlers(a)}catch(l){return c(l)}return c()})}catch(s){return i(s)}}}async _handleBatch(e,r){try{const n=await Promise.all(e.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}}_promiseHandle(e){return new Promise(r=>{this._handle(e,(n,i)=>{r(i)})})}async _handle(e,r){if(!e||Array.isArray(e)||typeof e!="object"){const o=new Tt.EthereumRpcError(Tt.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof e}`,{request:e});return r(o,{id:void 0,jsonrpc:"2.0",error:o})}if(typeof e.method!="string"){const o=new Tt.EthereumRpcError(Tt.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof e.method}`,{request:e});return r(o,{id:e.id,jsonrpc:"2.0",error:o})}const n=Object.assign({},e),i={id:n.id,jsonrpc:n.jsonrpc};let s=null;try{await this._processRequest(n,i)}catch(o){s=o}return s&&(delete i.result,i.error||(i.error=Tt.serializeError(s))),r(s,i)}async _processRequest(e,r){const[n,i,s]=await lr._runAllMiddleware(e,r,this._middleware);if(lr._checkForCompletion(e,r,i),await lr._runReturnHandlers(s),n)throw n}static async _runAllMiddleware(e,r,n){const i=[];let s=null,o=!1;for(const a of n)if([s,o]=await lr._runMiddleware(e,r,a,i),o)break;return[s,o,i.reverse()]}static _runMiddleware(e,r,n,i){return new Promise(s=>{const o=c=>{const l=c||r.error;l&&(r.error=Tt.serializeError(l)),s([l,!0])},a=c=>{r.error?o(r.error):(c&&(typeof c!="function"&&o(new Tt.EthereumRpcError(Tt.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof c}" for request: +${Oa(e)}`,{request:e})),i.push(c)),s([null,!1]))};try{n(e,r,a,o)}catch(c){o(c)}})}static async _runReturnHandlers(e){for(const r of e)await new Promise((n,i)=>{r(s=>s?i(s):n())})}static _checkForCompletion(e,r,n){if(!("result"in r)&&!("error"in r))throw new Tt.EthereumRpcError(Tt.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request: +${Oa(e)}`,{request:e});if(!n)throw new Tt.EthereumRpcError(Tt.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request: +${Oa(e)}`,{request:e})}}is.JsonRpcEngine=lr;function Oa(t){return JSON.stringify(t,null,2)}var So={};Object.defineProperty(So,"__esModule",{value:!0});So.mergeMiddleware=void 0;const L2=is;function P2(t){const e=new L2.JsonRpcEngine;return t.forEach(r=>e.push(r)),e.asMiddleware()}So.mergeMiddleware=P2;(function(t){var e=Z&&Z.__createBinding||(Object.create?function(n,i,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,o){o===void 0&&(o=s),n[o]=i[s]}),r=Z&&Z.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(mo,t),r(wo,t),r(_o,t),r(ns,t),r(is,t),r(So,t)})(Xu);var $d={},ec={};const tc=ln(Hp);var Eo={};Object.defineProperty(Eo,"__esModule",{value:!0});var ff=tc,D2=function(){function t(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return t.prototype.acquire=function(){var e=this,r=this.isLocked(),n=new Promise(function(i){return e._queue.push(i)});return r||this._dispatch(),n},t.prototype.runExclusive=function(e){return ff.__awaiter(this,void 0,void 0,function(){var r,n,i;return ff.__generator(this,function(s){switch(s.label){case 0:return[4,this.acquire()];case 1:r=s.sent(),n=r[0],i=r[1],s.label=2;case 2:return s.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,s.sent()];case 4:return i(),[7];case 5:return[2]}})})},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},t.prototype._dispatch=function(){var e=this,r=this._queue.shift();if(r){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},r([this._value--,this._currentReleaser])}},t}();Eo.default=D2;Object.defineProperty(ec,"__esModule",{value:!0});var hf=tc,$2=Eo,B2=function(){function t(){this._semaphore=new $2.default(1)}return t.prototype.acquire=function(){return hf.__awaiter(this,void 0,void 0,function(){var e,r;return hf.__generator(this,function(n){switch(n.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=n.sent(),r=e[1],[2,r]}})})},t.prototype.runExclusive=function(e){return this._semaphore.runExclusive(function(){return e()})},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();ec.default=B2;var xo={};Object.defineProperty(xo,"__esModule",{value:!0});xo.withTimeout=void 0;var Es=tc;function j2(t,e,r){var n=this;return r===void 0&&(r=new Error("timeout")),{acquire:function(){return new Promise(function(i,s){return Es.__awaiter(n,void 0,void 0,function(){var o,a,c;return Es.__generator(this,function(l){switch(l.label){case 0:return o=!1,setTimeout(function(){o=!0,s(r)},e),[4,t.acquire()];case 1:return a=l.sent(),o?(c=Array.isArray(a)?a[1]:a,c()):i(a),[2]}})})})},runExclusive:function(i){return Es.__awaiter(this,void 0,void 0,function(){var s,o;return Es.__generator(this,function(a){switch(a.label){case 0:s=function(){},a.label=1;case 1:return a.trys.push([1,,7,8]),[4,this.acquire()];case 2:return o=a.sent(),Array.isArray(o)?(s=o[1],[4,i(o[0])]):[3,4];case 3:return[2,a.sent()];case 4:return s=o,[4,i()];case 5:return[2,a.sent()];case 6:return[3,8];case 7:return s(),[7];case 8:return[2]}})})},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}xo.withTimeout=j2;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.withTimeout=t.Semaphore=t.Mutex=void 0;var e=ec;Object.defineProperty(t,"Mutex",{enumerable:!0,get:function(){return e.default}});var r=Eo;Object.defineProperty(t,"Semaphore",{enumerable:!0,get:function(){return r.default}});var n=xo;Object.defineProperty(t,"withTimeout",{enumerable:!0,get:function(){return n.withTimeout}})})($d);var F2=H2,W2=Object.prototype.hasOwnProperty;function H2(){for(var t={},e=0;efunction(...i){const s=e.promiseModule;return new s((o,a)=>{e.multiArgs?i.push((...l)=>{e.errorFirst?l[0]?a(l):(l.shift(),o(l)):o(l)}):e.errorFirst?i.push((l,d)=>{l?a(l):o(d)}):i.push(o),Reflect.apply(t,this===r?n:this,i)})},pf=new WeakMap;var G2=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const r=typeof t;if(!(t!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${t===null?"null":r}\``);const n=(o,a)=>{let c=pf.get(o);if(c||(c={},pf.set(o,c)),a in c)return c[a];const l=A=>typeof A=="string"||typeof a=="symbol"?a===A:A.test(a),d=Reflect.getOwnPropertyDescriptor(o,a),g=d===void 0||d.writable||d.configurable,C=(e.include?e.include.some(l):!e.exclude.some(l))&&g;return c[a]=C,C},i=new WeakMap,s=new Proxy(t,{apply(o,a,c){const l=i.get(o);if(l)return Reflect.apply(l,a,c);const d=e.excludeMain?o:df(o,e,s,o);return i.set(o,d),Reflect.apply(d,a,c)},get(o,a){const c=o[a];if(!n(o,a)||c===Function.prototype[a])return c;const l=i.get(c);if(l)return l;if(typeof c=="function"){const d=df(c,e,s,o);return i.set(c,d),d}return c}});return s};const J2=fn.default;let Z2=class extends J2{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach(r=>this.emit("update",r))}addInitialResults(e){}getChangesAndClear(){const e=this.updates;return this.updates=[],e}};var rc=Z2;const Q2=rc;let Y2=class extends Q2{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}};var K2=Y2,os={minBlockRef:X2,maxBlockRef:eS,sortBlockRefs:nc,bnToHex:tS,blockRefIsNumber:rS,hexToInt:Ws,incrementHexInt:nS,intToHex:Bd,unsafeRandomBytes:iS};function X2(...t){return nc(t)[0]}function eS(...t){const e=nc(t);return e[e.length-1]}function nc(t){return t.sort((e,r)=>e==="latest"||r==="earliest"?1:r==="latest"||e==="earliest"?-1:Ws(e)-Ws(r))}function tS(t){return"0x"+t.toString(16)}function rS(t){return t&&!["earliest","latest","pending"].includes(t)}function Ws(t){return t==null?t:Number.parseInt(t,16)}function nS(t){if(t==null)return t;const e=Ws(t);return Bd(e+1)}function Bd(t){if(t==null)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function iS(t){let e="0x";for(let r=0;rn.toLowerCase()))}async initialize({currentBlock:e}){let r=this.params.fromBlock;["latest","pending"].includes(r)&&(r=e),r==="earliest"&&(r="0x0"),this.params.fromBlock=r;const n=cS(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:n}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update({oldBlock:e,newBlock:r}){const n=r;let i;e?i=uS(e):i=r;const s=Object.assign({},this.params,{fromBlock:i,toBlock:n}),a=(await this._fetchLogs(s)).filter(c=>this.matchLog(c));this.addResults(a)}async _fetchLogs(e){return await oS(n=>this.ethQuery.getLogs(e,n))()}matchLog(e){if(xs(this.params.fromBlock)>=xs(e.blockNumber)||lS(this.params.toBlock)&&xs(this.params.toBlock)<=xs(e.blockNumber))return!1;const r=e.address&&e.address.toLowerCase();return this.params.address&&r&&!this.params.address.includes(r)?!1:this.params.topics.every((i,s)=>{let o=e.topics[s];if(!o)return!1;o=o.toLowerCase();let a=Array.isArray(i)?i:[i];return a.includes(null)?!0:(a=a.map(d=>d.toLowerCase()),a.includes(o))})}};var hS=fS,ic=dS;async function dS({provider:t,fromBlock:e,toBlock:r}){e||(e=r);const n=bf(e),s=bf(r)-n+1,o=Array(s).fill().map((c,l)=>n+l).map(pS);return await Promise.all(o.map(c=>bS(t,"eth_getBlockByNumber",[c,!1])))}function bf(t){return t==null?t:Number.parseInt(t,16)}function pS(t){return t==null?t:"0x"+t.toString(16)}function gS(t,e){return new Promise((r,n)=>{t.sendAsync(e,(i,s)=>{i?n(i):s.error?n(s.error):s.result?r(s.result):n(new Error("Result was empty"))})})}async function bS(t,e,r){for(let n=0;n<3;n++)try{return await gS(t,{id:1,jsonrpc:"2.0",method:e,params:r})}catch(i){console.error(`provider.sendAsync failed: ${i.stack||i.message||i}`)}throw new Error(`Block not found for params: ${JSON.stringify(r)}`)}const vS=rc,yS=ic,{incrementHexInt:mS}=os;let wS=class extends vS{constructor({provider:e,params:r}){super(),this.type="block",this.provider=e}async update({oldBlock:e,newBlock:r}){const n=r,i=mS(e),o=(await yS({provider:this.provider,fromBlock:i,toBlock:n})).map(a=>a.hash);this.addResults(o)}};var _S=wS;const SS=rc,ES=ic,{incrementHexInt:xS}=os;let MS=class extends SS{constructor({provider:e}){super(),this.type="tx",this.provider=e}async update({oldBlock:e}){const r=e,n=xS(e),i=await ES({provider:this.provider,fromBlock:n,toBlock:r}),s=[];for(const o of i)s.push(...o.transactions);this.addResults(s)}};var CS=MS;const RS=$d.Mutex,{createAsyncMiddleware:IS,createScaffoldMiddleware:AS}=Xu,TS=hS,kS=_S,OS=CS,{intToHex:jd,hexToInt:Na}=os;var NS=LS;function LS({blockTracker:t,provider:e}){let r=0,n={};const i=new RS,s=PS({mutex:i}),o=AS({eth_newFilter:s(La(c)),eth_newBlockFilter:s(La(l)),eth_newPendingTransactionFilter:s(La(d)),eth_uninstallFilter:s(Os(C)),eth_getFilterChanges:s(Os(g)),eth_getFilterLogs:s(Os(y))}),a=async({oldBlock:I,newBlock:O})=>{if(n.length===0)return;const P=await i.acquire();try{await Promise.all(Pn(n).map(async L=>{try{await L.update({oldBlock:I,newBlock:O})}catch(B){console.error(B)}}))}catch(L){console.error(L)}P()};return o.newLogFilter=c,o.newBlockFilter=l,o.newPendingTransactionFilter=d,o.uninstallFilter=C,o.getFilterChanges=g,o.getFilterLogs=y,o.destroy=()=>{N()},o;async function c(I){const O=new TS({provider:e,params:I});return await A(O),O}async function l(){const I=new kS({provider:e});return await A(I),I}async function d(){const I=new OS({provider:e});return await A(I),I}async function g(I){const O=Na(I),P=n[O];if(!P)throw new Error(`No filter for index "${O}"`);return P.getChangesAndClear()}async function y(I){const O=Na(I),P=n[O];if(!P)throw new Error(`No filter for index "${O}"`);let L=[];return P.type==="log"&&(L=P.getAllResults()),L}async function C(I){const O=Na(I),L=!!n[O];return L&&await D(O),L}async function A(I){const O=Pn(n).length,P=await t.getLatestBlock();await I.initialize({currentBlock:P}),r++,n[r]=I,I.id=r,I.idHex=jd(r);const L=Pn(n).length;return x({prevFilterCount:O,newFilterCount:L}),r}async function D(I){const O=Pn(n).length;delete n[I];const P=Pn(n).length;x({prevFilterCount:O,newFilterCount:P})}async function N(){const I=Pn(n).length;n={},x({prevFilterCount:I,newFilterCount:0})}function x({prevFilterCount:I,newFilterCount:O}){if(I===0&&O>0){t.on("sync",a);return}if(I>0&&O===0){t.removeListener("sync",a);return}}}function La(t){return Os(async(...e)=>{const r=await t(...e);return jd(r.id)})}function Os(t){return IS(async(e,r)=>{const n=await t.apply(null,e.params);r.result=n})}function PS({mutex:t}){return e=>async(r,n,i,s)=>{(await t.acquire())(),e(r,n,i,s)}}function Pn(t,e){const r=[];for(let n in t)r.push(t[n]);return r}const DS=fn.default,{createAsyncMiddleware:vf,createScaffoldMiddleware:$S}=Xu,BS=NS,{unsafeRandomBytes:jS,incrementHexInt:FS}=os,WS=ic;var HS=VS;function VS({blockTracker:t,provider:e}){const r={},n=BS({blockTracker:t,provider:e});let i=!1;const s=new DS,o=$S({eth_subscribe:vf(a),eth_unsubscribe:vf(c)});return o.destroy=d,{events:s,middleware:o};async function a(g,y){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const C=g.params[0],A=jS(16);let D;switch(C){case"newHeads":D=N({subId:A});break;case"logs":const I=g.params[1],O=await n.newLogFilter(I);D=x({subId:A,filter:O});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${C}"`)}r[A]=D,y.result=A;return;function N({subId:I}){const O={type:C,destroy:async()=>{t.removeListener("sync",O.update)},update:async({oldBlock:P,newBlock:L})=>{const B=L,G=FS(P);(await WS({provider:e,fromBlock:G,toBlock:B})).map(US).filter(K=>K!==null).forEach(K=>{l(I,K)})}};return t.on("sync",O.update),O}function x({subId:I,filter:O}){return O.on("update",L=>l(I,L)),{type:C,destroy:async()=>await n.uninstallFilter(O.idHex)}}}async function c(g,y){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const C=g.params[0],A=r[C];if(!A){y.result=!1;return}delete r[C],await A.destroy(),y.result=!0}function l(g,y){s.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:g,result:y}})}function d(){s.removeAllListeners();for(const g in r)r[g].destroy(),delete r[g];i=!0}}function US(t){return t==null?null:{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}Object.defineProperty(ao,"__esModule",{value:!0});ao.SubscriptionManager=void 0;const zS=td,qS=HS,yf=()=>{};class GS{constructor(e){const r=new zS.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:i}=qS({blockTracker:r,provider:e});this.events=n,this.subscriptionMiddleware=i}async handleRequest(e){const r={};return await this.subscriptionMiddleware(e,r,yf,yf),r}destroy(){this.subscriptionMiddleware.destroy()}}ao.SubscriptionManager=GS;var sc=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.CoinbaseWalletProvider=void 0;const JS=sc(fn),ZS=sc(Ys),Pa=ui,me=Vi,mf=li,wf=Ut,Da=Xs,QS=_e,oe=J,$a=sc(Ny),YS=Xn,ge=ed,KS=ao,_f="DefaultChainId",Sf="DefaultJsonRpcUrl";class XS extends JS.default{constructor(e){var r,n;super(),this._filterPolyfill=new YS.FilterPolyfill(this),this._subscriptionManager=new KS.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=e.chainId,this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this.isCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this.qrUrl=e.qrUrl;const i=this.getChainId(),s=(0,oe.prepend0x)(i.toString(16));this.emit("connect",{chainIdStr:s});const o=this._storage.getItem(wf.LOCAL_STORAGE_ADDRESSES_KEY);if(o){const a=o.split(" ");a[0]!==""&&(this._addresses=a.map(c=>(0,oe.ensureAddressString)(c)),this.emit("accountsChanged",a))}this._subscriptionManager.events.on("notification",a=>{this.emit("message",{type:a.method,data:a.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",a=>{var c;if(!(a.origin!==location.origin||a.source!==window)&&a.data.type==="walletLinkMessage"){if(a.data.data.action==="dappChainSwitched"){const l=a.data.data.chainId,d=(c=a.data.data.jsonRpcUrl)!==null&&c!==void 0?c:this.jsonRpcUrl;this.updateProviderInfo(d,Number(l))}a.data.data.action==="addressChanged"&&this._setAddresses([a.data.data.address])}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,oe.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(Sf))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(Sf,e)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(e,r){this.isCoinbaseBrowser||(this._chainIdFromOpts=r,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(e,r){this.jsonRpcUrl=e;const n=this.getChainId();this._storage.setItem(_f,r.toString(10)),((0,oe.ensureIntNumber)(r)!==n||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,r,n,i,s,o){return!!(await(await this.initializeRelay()).watchAsset(e,r,n,i,s,o==null?void 0:o.toString()).promise).result}async addEthereumChain(e,r,n,i,s,o){var a,c;if((0,oe.ensureIntNumber)(e)===this.getChainId())return!1;const l=await this.initializeRelay(),d=l.inlineAddEthereumChain(e.toString());!this._isAuthorized()&&!d&&await l.requestEthereumAccounts().promise;const g=await l.addEthereumChain(e.toString(),r,s,n,i,o).promise;return((a=g.result)===null||a===void 0?void 0:a.isApproved)===!0&&this.updateProviderInfo(r[0],e),((c=g.result)===null||c===void 0?void 0:c.isApproved)===!0}async switchEthereumChain(e){const n=await(await this.initializeRelay()).switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,QS.isErrorResponse)(n)&&n.errorCode)throw n.errorCode===me.standardErrorCodes.provider.unsupportedChain?me.standardErrors.provider.unsupportedChain(e):me.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode});const i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,e)}setAppInfo(e,r){this.initializeRelay().then(n=>n.setAppInfo(e,r))}async enable(){var e;return(e=this.diagnostic)===null||e===void 0||e.log(Pa.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?mf.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send(ge.JSONRPCMethod.eth_requestAccounts)}async close(){(await this.initializeRelay()).resetAndReload()}send(e,r){try{const n=this._send(e,r);if(n instanceof Promise)return n.catch(i=>{throw(0,me.serializeError)(i,e)})}catch(n){throw(0,me.serializeError)(n,e)}}_send(e,r){if(typeof e=="string"){const i=e,s=Array.isArray(r)?r:r!==void 0?[r]:[],o={jsonrpc:"2.0",id:0,method:i,params:s};return this._sendRequestAsync(o).then(a=>a.result)}if(typeof r=="function"){const i=e,s=r;return this._sendAsync(i,s)}if(Array.isArray(e))return e.map(s=>this._sendRequest(s));const n=e;return this._sendRequest(n)}async sendAsync(e,r){try{return this._sendAsync(e,r).catch(n=>{throw(0,me.serializeError)(n,e)})}catch(n){return Promise.reject((0,me.serializeError)(n,e))}}async _sendAsync(e,r){if(typeof r!="function")throw new Error("callback is required");if(Array.isArray(e)){const i=r;this._sendMultipleRequestsAsync(e).then(s=>i(null,s)).catch(s=>i(s,null));return}const n=r;return this._sendRequestAsync(e).then(i=>n(null,i)).catch(i=>n(i,null))}async request(e){try{return this._request(e).catch(r=>{throw(0,me.serializeError)(r,e.method)})}catch(r){return Promise.reject((0,me.serializeError)(r,e.method))}}async _request(e){if(!e||typeof e!="object"||Array.isArray(e))throw me.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});const{method:r,params:n}=e;if(typeof r!="string"||r.length===0)throw me.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw me.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});const i=n===void 0?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:r,params:i,jsonrpc:"2.0",id:s})).result}async scanQRCode(e){var r;const i=await(await this.initializeRelay()).scanQRCode((0,oe.ensureRegExpString)(e)).promise;if(typeof i.result!="string")throw(0,me.serializeError)((r=i.errorMessage)!==null&&r!==void 0?r:"result was not a string",Da.Web3Method.scanQRCode);return i.result}async genericRequest(e,r){var n;const s=await(await this.initializeRelay()).genericRequest(e,r).promise;if(typeof s.result!="string")throw(0,me.serializeError)((n=s.errorMessage)!==null&&n!==void 0?n:"result was not a string",Da.Web3Method.generic);return s.result}async selectProvider(e){var r;const i=await(await this.initializeRelay()).selectProvider(e).promise;if(typeof i.result!="string")throw(0,me.serializeError)((r=i.errorMessage)!==null&&r!==void 0?r:"result was not a string",Da.Web3Method.selectProvider);return i.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){const r={jsonrpc:"2.0",id:e.id},{method:n}=e;if(r.result=this._handleSynchronousMethods(e),r.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return r}_setAddresses(e,r){if(!Array.isArray(e))throw new Error("addresses is not an array");const n=e.map(i=>(0,oe.ensureAddressString)(i));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(wf.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" ")))}_sendRequestAsync(e){return new Promise((r,n)=>{try{const i=this._handleSynchronousMethods(e);if(i!==void 0)return r({jsonrpc:"2.0",id:e.id,result:i});const s=this._handleAsynchronousFilterMethods(e);if(s!==void 0){s.then(a=>r(Object.assign(Object.assign({},a),{id:e.id}))).catch(a=>n(a));return}const o=this._handleSubscriptionMethods(e);if(o!==void 0){o.then(a=>r({jsonrpc:"2.0",id:e.id,result:a.result})).catch(a=>n(a));return}}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(i=>i&&r(Object.assign(Object.assign({},i),{id:e.id}))).catch(i=>n(i))})}_sendMultipleRequestsAsync(e){return Promise.all(e.map(r=>this._sendRequestAsync(r)))}_handleSynchronousMethods(e){const{method:r}=e,n=e.params||[];switch(r){case ge.JSONRPCMethod.eth_accounts:return this._eth_accounts();case ge.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case ge.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case ge.JSONRPCMethod.net_version:return this._net_version();case ge.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){const{method:r}=e,n=e.params||[];switch(r){case ge.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case ge.JSONRPCMethod.eth_sign:return this._eth_sign(n);case ge.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case ge.JSONRPCMethod.personal_sign:return this._personal_sign(n);case ge.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case ge.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case ge.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case ge.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case ge.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case ge.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case ge.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case ge.JSONRPCMethod.eth_signTypedData_v4:case ge.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case ge.JSONRPCMethod.cbWallet_arbitrary:return this._cbwallet_arbitrary(n);case ge.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case ge.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n);case ge.JSONRPCMethod.wallet_watchAsset:return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(e){const{method:r}=e,n=e.params||[];switch(r){case ge.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case ge.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case ge.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case ge.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case ge.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case ge.JSONRPCMethod.eth_subscribe:case ge.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{const r=(0,oe.ensureAddressString)(e);return this._addresses.map(i=>(0,oe.ensureAddressString)(i)).includes(r)}catch{}return!1}_ensureKnownAddress(e){var r;if(!this._isKnownAddress(e))throw(r=this.diagnostic)===null||r===void 0||r.log(Pa.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const r=e.from?(0,oe.ensureAddressString)(e.from):this.selectedAddress;if(!r)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(r);const n=e.to?(0,oe.ensureAddressString)(e.to):null,i=e.value!=null?(0,oe.ensureBN)(e.value):new ZS.default(0),s=e.data?(0,oe.ensureBuffer)(e.data):Buffer.alloc(0),o=e.nonce!=null?(0,oe.ensureIntNumber)(e.nonce):null,a=e.gasPrice!=null?(0,oe.ensureBN)(e.gasPrice):null,c=e.maxFeePerGas!=null?(0,oe.ensureBN)(e.maxFeePerGas):null,l=e.maxPriorityFeePerGas!=null?(0,oe.ensureBN)(e.maxPriorityFeePerGas):null,d=e.gas!=null?(0,oe.ensureBN)(e.gas):null,g=this.getChainId();return{fromAddress:r,toAddress:n,weiValue:i,data:s,nonce:o,gasPriceInWei:a,maxFeePerGas:c,maxPriorityFeePerGas:l,gasLimit:d,chainId:g}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw me.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw me.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,r,n,i){this._ensureKnownAddress(r);try{return{jsonrpc:"2.0",id:0,result:(await(await this.initializeRelay()).signEthereumMessage(e,r,n,i).promise).result}}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?me.standardErrors.provider.userRejectedRequest("User denied message signature"):s}}async _ethereumAddressFromSignedMessage(e,r,n){return{jsonrpc:"2.0",id:0,result:(await(await this.initializeRelay()).ethereumAddressFromSignedMessage(e,r,n).promise).result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,oe.hexStringFromIntNumber)(this.getChainId())}getChainId(){const e=this._storage.getItem(_f);if(!e)return(0,oe.ensureIntNumber)(this._chainIdFromOpts);const r=parseInt(e,10);return(0,oe.ensureIntNumber)(r)}async _eth_requestAccounts(){var e;if((e=this.diagnostic)===null||e===void 0||e.log(Pa.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?mf.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let r;try{r=await(await this.initializeRelay()).requestEthereumAccounts().promise}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?me.standardErrors.provider.userRejectedRequest("User denied account authorization"):n}if(!r.result)throw new Error("accounts received is empty");return this._setAddresses(r.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();const r=(0,oe.ensureAddressString)(e[0]),n=(0,oe.ensureBuffer)(e[1]);return this._signEthereumMessage(n,r,!1)}_eth_ecRecover(e){const r=(0,oe.ensureBuffer)(e[0]),n=(0,oe.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!1)}_personal_sign(e){this._requireAuthorization();const r=(0,oe.ensureBuffer)(e[0]),n=(0,oe.ensureAddressString)(e[1]);return this._signEthereumMessage(r,n,!0)}_personal_ecRecover(e){const r=(0,oe.ensureBuffer)(e[0]),n=(0,oe.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();const r=this._prepareTransactionParams(e[0]||{});try{return{jsonrpc:"2.0",id:0,result:(await(await this.initializeRelay()).signEthereumTransaction(r).promise).result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?me.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_sendRawTransaction(e){const r=(0,oe.ensureBuffer)(e[0]);return{jsonrpc:"2.0",id:0,result:(await(await this.initializeRelay()).submitEthereumTransaction(r,this.getChainId()).promise).result}}async _eth_sendTransaction(e){this._requireAuthorization();const r=this._prepareTransactionParams(e[0]||{});try{return{jsonrpc:"2.0",id:0,result:(await(await this.initializeRelay()).signAndSubmitEthereumTransaction(r).promise).result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?me.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_signTypedData_v1(e){this._requireAuthorization();const r=(0,oe.ensureParsedJSONObject)(e[0]),n=(0,oe.ensureAddressString)(e[1]);this._ensureKnownAddress(n);const i=$a.default.hashForSignTypedDataLegacy({data:r}),s=JSON.stringify(r,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();const r=(0,oe.ensureAddressString)(e[0]),n=(0,oe.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);const i=$a.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();const r=(0,oe.ensureAddressString)(e[0]),n=(0,oe.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);const i=$a.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)}async _cbwallet_arbitrary(e){const r=e[0],n=e[1];if(typeof n!="string")throw new Error("parameter must be a string");if(typeof r!="object"||r===null)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(r,n)}}async _wallet_addEthereumChain(e){var r,n,i,s;const o=e[0];if(((r=o.rpcUrls)===null||r===void 0?void 0:r.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||o.chainName.trim()==="")throw me.standardErrors.rpc.invalidParams("chainName is a required field");if(!o.nativeCurrency)throw me.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const a=parseInt(o.chainId,16);return await this.addEthereumChain(a,(n=o.rpcUrls)!==null&&n!==void 0?n:[],(i=o.blockExplorerUrls)!==null&&i!==void 0?i:[],o.chainName,(s=o.iconUrls)!==null&&s!==void 0?s:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){const r=e[0];return await this.switchEthereumChain(parseInt(r.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){const r=Array.isArray(e)?e[0]:e;if(!r.type)throw me.standardErrors.rpc.invalidParams("Type is required");if((r==null?void 0:r.type)!=="ERC20")throw me.standardErrors.rpc.invalidParams(`Asset of type '${r.type}' is not supported`);if(!(r!=null&&r.options))throw me.standardErrors.rpc.invalidParams("Options are required");if(!(r!=null&&r.options.address))throw me.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:i,symbol:s,image:o,decimals:a}=r.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(r.type,i,s,a,o,n)}}_eth_uninstallFilter(e){const r=(0,oe.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(r)}async _eth_newFilter(e){const r=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(r)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){const r=(0,oe.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(r)}_eth_getFilterLogs(e){const r=(0,oe.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(r)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(e=>(e.setAccountsCallback((r,n)=>this._setAddresses(r,n)),e.setChainCallback((r,n)=>{this.updateProviderInfo(n,parseInt(r,10))}),e.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=e,e))}}Jn.CoinbaseWalletProvider=XS;var Mo={},Co={};const It=ln(zp);/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var cu=function(t,e){return cu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},cu(t,e)};function j(t,e){cu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function ri(t){return typeof t=="function"}var Ef=!1,Ot={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;""+e.stack}Ef=t},get useDeprecatedSynchronousErrorHandling(){return Ef}};function Fn(t){setTimeout(function(){throw t},0)}var Hs={closed:!0,next:function(t){},error:function(t){if(Ot.useDeprecatedSynchronousErrorHandling)throw t;Fn(t)},complete:function(){}},mt=function(){return Array.isArray||function(t){return t&&typeof t.length=="number"}}();function oc(t){return t!==null&&typeof t=="object"}var eE=function(){function t(e){return Error.call(this),this.message=e?e.length+` errors occurred during unsubscription: +`+e.map(function(r,n){return n+1+") "+r.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=e,this}return t.prototype=Object.create(Error.prototype),t}(),Li=eE,Qe=function(){function t(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return t.prototype.unsubscribe=function(){var e;if(!this.closed){var r=this,n=r._parentOrParents,i=r._ctorUnsubscribe,s=r._unsubscribe,o=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(n!==null)for(var a=0;a1){this.connection=null;return}var i=this.connection,s=r._connection;this.connection=null,s&&(!i||s===i)&&s.unsubscribe()},e}(Q),Vd=function(t){j(e,t);function e(r,n){var i=t.call(this)||this;return i.source=r,i.subjectFactory=n,i._refCount=0,i._isComplete=!1,i}return e.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},e.prototype.getSubject=function(){var r=this._subject;return(!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var r=this._connection;return r||(this._isComplete=!1,r=this._connection=new Qe,r.add(this.source.subscribe(new oE(this.getSubject(),this))),r.closed&&(this._connection=null,r=Qe.EMPTY)),r},e.prototype.refCount=function(){return uc()(this)},e}(ae),sE=function(){var t=Vd.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),oE=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.connectable=n,i}return e.prototype._error=function(r){this._unsubscribe(),t.prototype._error.call(this,r)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var r=this.connectable;if(r){this.connectable=null;var n=r._connection;r._refCount=0,r._subject=null,r._connection=null,n&&n.unsubscribe()}},e}(Hd);function aE(t,e,r,n){return function(i){return i.lift(new uE(t,e,r,n))}}var uE=function(){function t(e,r,n,i){this.keySelector=e,this.elementSelector=r,this.durationSelector=n,this.subjectSelector=i}return t.prototype.call=function(e,r){return r.subscribe(new cE(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),cE=function(t){j(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;return a.keySelector=n,a.elementSelector=i,a.durationSelector=s,a.subjectSelector=o,a.groups=null,a.attemptedToUnsubscribe=!1,a.count=0,a}return e.prototype._next=function(r){var n;try{n=this.keySelector(r)}catch(i){this.error(i);return}this._group(r,n)},e.prototype._group=function(r,n){var i=this.groups;i||(i=this.groups=new Map);var s=i.get(n),o;if(this.elementSelector)try{o=this.elementSelector(r)}catch(l){this.error(l)}else o=r;if(!s){s=this.subjectSelector?this.subjectSelector():new ct,i.set(n,s);var a=new fu(n,s,this);if(this.destination.next(a),this.durationSelector){var c=void 0;try{c=this.durationSelector(new fu(n,s))}catch(l){this.error(l);return}this.add(c.subscribe(new lE(n,s,this)))}}s.closed||s.next(o)},e.prototype._error=function(r){var n=this.groups;n&&(n.forEach(function(i,s){i.error(r)}),n.clear()),this.destination.error(r)},e.prototype._complete=function(){var r=this.groups;r&&(r.forEach(function(n,i){n.complete()}),r.clear()),this.destination.complete()},e.prototype.removeGroup=function(r){this.groups.delete(r)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,this.count===0&&t.prototype.unsubscribe.call(this))},e}(Q),lE=function(t){j(e,t);function e(r,n,i){var s=t.call(this,n)||this;return s.key=r,s.group=n,s.parent=i,s}return e.prototype._next=function(r){this.complete()},e.prototype._unsubscribe=function(){var r=this,n=r.parent,i=r.key;this.key=this.parent=null,n&&n.removeGroup(i)},e}(Q),fu=function(t){j(e,t);function e(r,n,i){var s=t.call(this)||this;return s.key=r,s.groupSubject=n,s.refCountSubscription=i,s}return e.prototype._subscribe=function(r){var n=new Qe,i=this,s=i.refCountSubscription,o=i.groupSubject;return s&&!s.closed&&n.add(new fE(s)),n.add(o.subscribe(r)),n},e}(ae),fE=function(t){j(e,t);function e(r){var n=t.call(this)||this;return n.parent=r,r.count++,n}return e.prototype.unsubscribe=function(){var r=this.parent;!r.closed&&!this.closed&&(t.prototype.unsubscribe.call(this),r.count-=1,r.count===0&&r.attemptedToUnsubscribe&&r.unsubscribe())},e}(Qe),Ud=function(t){j(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return n&&!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Er;return this._value},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e}(ct),hE=function(t){j(e,t);function e(r,n){return t.call(this)||this}return e.prototype.schedule=function(r,n){return this},e}(Qe),as=function(t){j(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return e.prototype.schedule=function(r,n){if(n===void 0&&(n=0),this.closed)return this;this.state=r;var i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(s,this.id,n),this},e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),setInterval(r.flush.bind(r,this),i)},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!==null&&this.delay===i&&this.pending===!1)return n;clearInterval(n)},e.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(r,n){var i=!1,s=void 0;try{this.work(r)}catch(o){i=!0,s=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),s},e.prototype._unsubscribe=function(){var r=this.id,n=this.scheduler,i=n.actions,s=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,s!==-1&&i.splice(s,1),r!=null&&(this.id=this.recycleAsyncId(n,r,null)),this.delay=null},e}(hE),dE=function(t){j(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return e.prototype.schedule=function(r,n){return n===void 0&&(n=0),n>0?t.prototype.schedule.call(this,r,n):(this.delay=n,this.state=r,this.scheduler.flush(this),this)},e.prototype.execute=function(r,n){return n>0||this.closed?t.prototype.execute.call(this,r,n):this._execute(r,n)},e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0||i===null&&this.delay>0?t.prototype.requestAsyncId.call(this,r,n,i):r.flush(this)},e}(as),hu=function(){function t(e,r){r===void 0&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(e,r,n){return r===void 0&&(r=0),new this.SchedulerAction(this,e).schedule(n,r)},t.now=function(){return Date.now()},t}(),us=function(t){j(e,t);function e(r,n){n===void 0&&(n=hu.now);var i=t.call(this,r,function(){return e.delegate&&e.delegate!==i?e.delegate.now():n()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return e.prototype.schedule=function(r,n,i){return n===void 0&&(n=0),e.delegate&&e.delegate!==this?e.delegate.schedule(r,n,i):t.prototype.schedule.call(this,r,n,i)},e.prototype.flush=function(r){var n=this.actions;if(this.active){n.push(r);return}var i;this.active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this.active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},e}(hu),pE=function(t){j(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(us),zd=new pE(dE),qd=zd,ni=new ae(function(t){return t.complete()});function yi(t){return t?gE(t):ni}function gE(t){return new ae(function(e){return t.schedule(function(){return e.complete()})})}function Rt(t){return t&&typeof t.schedule=="function"}var Gd=function(t){return function(e){for(var r=0,n=t.length;rthis._bufferSize&&n.shift()}t.prototype.next.call(this,r)},e.prototype.nextTimeWindow=function(r){this.isStopped||(this._events.push(new wE(this._getNow(),r)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,r)},e.prototype._subscribe=function(r){var n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),s=this.scheduler,o=i.length,a;if(this.closed)throw new Er;if(this.isStopped||this.hasError?a=Qe.EMPTY:(this.observers.push(r),a=new Wd(this,r)),s&&r.add(r=new Jd(r,s)),n)for(var c=0;cn&&(a=Math.max(a,o-n)),a>0&&s.splice(0,a),s},e}(ct),wE=function(){function t(e,r){this.time=e,this.value=r}return t}(),mi=function(t){j(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.value=null,r.hasNext=!1,r.hasCompleted=!1,r}return e.prototype._subscribe=function(r){return this.hasError?(r.error(this.thrownError),Qe.EMPTY):this.hasCompleted&&this.hasNext?(r.next(this.value),r.complete(),Qe.EMPTY):t.prototype._subscribe.call(this,r)},e.prototype.next=function(r){this.hasCompleted||(this.value=r,this.hasNext=!0)},e.prototype.error=function(r){this.hasCompleted||t.prototype.error.call(this,r)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(ct),_E=1,SE=function(){return Promise.resolve()}(),pu={};function If(t){return t in pu?(delete pu[t],!0):!1}var Af={setImmediate:function(t){var e=_E++;return pu[e]=!0,SE.then(function(){return If(e)&&t()}),e},clearImmediate:function(t){If(t)}},EE=function(t){j(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?t.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r.scheduled||(r.scheduled=Af.setImmediate(r.flush.bind(r,null))))},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!==null&&i>0||i===null&&this.delay>0)return t.prototype.recycleAsyncId.call(this,r,n,i);r.actions.length===0&&(Af.clearImmediate(n),r.scheduled=void 0)},e}(as),xE=function(t){j(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.flush=function(r){this.active=!0,this.scheduled=void 0;var n=this.actions,i,s=-1,o=n.length;r=r||n.shift();do if(i=r.execute(r.state,r.delay))break;while(++s0?t.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r.scheduled||(r.scheduled=requestAnimationFrame(function(){return r.flush(null)})))},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!==null&&i>0||i===null&&this.delay>0)return t.prototype.recycleAsyncId.call(this,r,n,i);r.actions.length===0&&(cancelAnimationFrame(n),r.scheduled=void 0)},e}(as),CE=function(t){j(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.flush=function(r){this.active=!0,this.scheduled=void 0;var n=this.actions,i,s=-1,o=n.length;r=r||n.shift();do if(i=r.execute(r.state,r.delay))break;while(++sn.index?1:-1:r.delay>n.delay?1:-1},e}(as);function er(){}function AE(t){return!!t&&(t instanceof ae||typeof t.lift=="function"&&typeof t.subscribe=="function")}var TE=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}(),ii=TE,kE=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}(),ls=kE,OE=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}(),Xd=OE;function Bt(t,e){return function(n){if(typeof t!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new NE(t,e))}}var NE=function(){function t(e,r){this.project=e,this.thisArg=r}return t.prototype.call=function(e,r){return r.subscribe(new LE(e,this.project,this.thisArg))},t}(),LE=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.project=n,s.count=0,s.thisArg=i||s,s}return e.prototype._next=function(r){var n;try{n=this.project.call(this.thisArg,r,this.count++)}catch(i){this.destination.error(i);return}this.destination.next(n)},e}(Q);function ep(t,e,r){if(e)if(Rt(e))r=e;else return function(){for(var n=[],i=0;i0?this._next(r.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},e}(Ke),XE=un;function dc(t){return t===void 0&&(t=Number.POSITIVE_INFINITY),un(Ir,t)}function sp(){return dc(1)}function Fi(){for(var t=[],e=0;e1?i.next(Array.prototype.slice.call(arguments)):i.next(o)}ap(t,e,s,i,r)})}function ap(t,e,r,n,i){var s;if(n3(t)){var o=t;t.addEventListener(e,r,i),s=function(){return o.removeEventListener(e,r,i)}}else if(r3(t)){var a=t;t.on(e,r),s=function(){return a.off(e,r)}}else if(t3(t)){var c=t;t.addListener(e,r),s=function(){return c.removeListener(e,r)}}else if(t&&t.length)for(var l=0,d=t.length;l=0}function a3(t,e){return t===void 0&&(t=0),e===void 0&&(e=wt),(!si(t)||t<0)&&(t=0),(!e||typeof e.schedule!="function")&&(e=wt),new ae(function(r){return r.add(e.schedule(u3,t,{subscriber:r,counter:0,period:t})),r})}function u3(t){var e=t.subscriber,r=t.counter,n=t.period;e.next(r),this.schedule({subscriber:e,counter:r+1,period:n},n)}function cp(){for(var t=[],e=0;e1&&typeof t[t.length-1]=="number"&&(r=t.pop())):typeof i=="number"&&(r=t.pop()),n===null&&t.length===1&&t[0]instanceof ae?t[0]:dc(r)(cs(t,n))}var lp=new ae(er);function c3(){return lp}function gu(){for(var t=[],e=0;e=e){n.complete();break}if(n.next(s++),n.closed)break}while(!0)})}function y3(t){var e=t.start,r=t.index,n=t.count,i=t.subscriber;if(r>=n){i.complete();return}i.next(e),!i.closed&&(t.index=r+1,t.start=e+1,this.schedule(t))}function dp(t,e,r){t===void 0&&(t=0);var n=-1;return si(e)?n=Number(e)<1&&1||Number(e):Rt(e)&&(r=e),Rt(r)||(r=wt),new ae(function(i){var s=si(t)?t:+t-r.now();return r.schedule(m3,s,{index:0,period:n,subscriber:i})})}function m3(t){var e=t.index,r=t.period,n=t.subscriber;if(n.next(e),!n.closed){if(r===-1)return n.complete();t.index=e+1,this.schedule(t,r)}}function w3(t,e){return new ae(function(r){var n;try{n=t()}catch(a){r.error(a);return}var i;try{i=e(n)}catch(a){r.error(a);return}var s=i?br(i):ni,o=s.subscribe(r);return function(){o.unsubscribe(),n&&n.unsubscribe()}})}function pp(){for(var t=[],e=0;ethis.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),x3=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.parent=n,s.observable=i,s.stillUnsubscribed=!0,s.buffer=[],s.isComplete=!1,s}return e.prototype[Ar]=function(){return this},e.prototype.next=function(){var r=this.buffer;return r.length===0&&this.isComplete?{value:null,done:!0}:{value:r.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return this.buffer.length===0&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(r){this.buffer.push(r),this.parent.checkIterators()},e.prototype.subscribe=function(){return Xe(this.observable,new Ye(this))},e}(Ke);const M3=Object.freeze(Object.defineProperty({__proto__:null,ArgumentOutOfRangeError:ii,AsyncSubject:mi,BehaviorSubject:Ud,ConnectableObservable:Vd,EMPTY:ni,EmptyError:ls,GroupedObservable:fu,NEVER:lp,Notification:dr,get NotificationKind(){return du},ObjectUnsubscribedError:Er,Observable:ae,ReplaySubject:fc,Scheduler:hu,Subject:ct,Subscriber:Q,Subscription:Qe,TimeoutError:Xd,UnsubscriptionError:Li,VirtualAction:Kd,VirtualTimeScheduler:IE,animationFrame:RE,animationFrameScheduler:Yd,asap:Ns,asapScheduler:Zd,async:wt,asyncScheduler:Qd,bindCallback:ep,bindNodeCallback:tp,combineLatest:UE,concat:Fi,config:Ot,defer:pc,empty:yi,forkJoin:e3,from:br,fromEvent:op,fromEventPattern:up,generate:i3,identity:Ir,iif:o3,interval:a3,isObservable:AE,merge:cp,never:c3,noop:er,observable:vi,of:Ro,onErrorResumeNext:gu,pairs:l3,partition:p3,pipe:lu,queue:qd,queueScheduler:zd,race:hp,range:v3,scheduled:ip,throwError:lc,timer:dp,using:w3,zip:pp},Symbol.toStringTag,{value:"Module"})),Io=ln(M3);var Ao={};const To=ln(Vp),fs=ln(qp);var sr={},ko={};Object.defineProperty(ko,"__esModule",{value:!0});ko.CloseIcon=void 0;const Of=It;function C3(t){return(0,Of.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,Of.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}ko.CloseIcon=C3;var gc={};Object.defineProperty(gc,"__esModule",{value:!0});gc.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMTQuMDM3IDE4LjkyNmMtMi43NSAwLTQuOTA3LTIuMjA1LTQuOTA3LTQuOTI2IDAtMi43MiAyLjIzLTQuOTI2IDQuOTA3LTQuOTI2YTQuODY2IDQuODY2IDAgMCAxIDQuODMzIDQuMTE4aDQuOTgyYy0uNDQ2LTUuMDczLTQuNjg0LTkuMDQ0LTkuODE1LTkuMDQ0QzguNjEgNC4xNDggNC4xNDkgOC41NiA0LjE0OSAxNHM0LjM4NyA5Ljg1MiA5Ljg5IDkuODUyYzUuMjA0IDAgOS4zNjgtMy45NyA5LjgxNC05LjA0M0gxOC44N2E0Ljg2NiA0Ljg2NiAwIDAgMS00LjgzMyA0LjExN1oiIGZpbGw9IiNmZmYiLz48L3N2Zz4=";var bc={};Object.defineProperty(bc,"__esModule",{value:!0});bc.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTQiIGZpbGw9IiMwMDUyRkYiLz48cGF0aCBkPSJNMjMuODUyIDE0QTkuODM0IDkuODM0IDAgMCAxIDE0IDIzLjg1MiA5LjgzNCA5LjgzNCAwIDAgMSA0LjE0OCAxNCA5LjgzNCA5LjgzNCAwIDAgMSAxNCA0LjE0OCA5LjgzNCA5LjgzNCAwIDAgMSAyMy44NTIgMTRaIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTExLjE4NSAxMi41MDRjMC0uNDU2IDAtLjcxLjA5OC0uODYyLjA5OC0uMTUyLjE5Ni0uMzA0LjM0My0uMzU1LjE5Ni0uMTAyLjM5Mi0uMTAyLjg4MS0uMTAyaDIuOTg2Yy40OSAwIC42ODYgMCAuODgyLjEwMi4xNDYuMTAxLjI5My4yMDMuMzQyLjM1NS4wOTguMjAzLjA5OC40MDYuMDk4Ljg2MnYyLjk5MmMwIC40NTcgMCAuNzEtLjA5OC44NjMtLjA5OC4xNTItLjE5NS4zMDQtLjM0Mi4zNTUtLjE5Ni4xMDEtLjM5Mi4xMDEtLjg4Mi4xMDFoLTIuOTg2Yy0uNDkgMC0uNjg1IDAtLjg4LS4xMDEtLjE0OC0uMTAyLS4yOTUtLjIwMy0uMzQ0LS4zNTUtLjA5OC0uMjAzLS4wOTgtLjQwNi0uMDk4LS44NjN2LTIuOTkyWiIgZmlsbD0iIzAwNTJGRiIvPjwvc3ZnPg==";var Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.QRCodeIcon=void 0;const Yt=It;function R3(t){return(0,Yt.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t),(0,Yt.h)("path",{d:"M8.2271 1.77124L7.0271 1.77124V2.97124H8.2271V1.77124Z"}),(0,Yt.h)("path",{d:"M5.44922 0.199219L5.44922 4.54922L9.79922 4.54922V0.199219L5.44922 0.199219ZM8.89922 3.64922L6.34922 3.64922L6.34922 1.09922L8.89922 1.09922V3.64922Z"}),(0,Yt.h)("path",{d:"M2.97124 1.77124L1.77124 1.77124L1.77124 2.97124H2.97124V1.77124Z"}),(0,Yt.h)("path",{d:"M0.199219 4.54922L4.54922 4.54922L4.54922 0.199219L0.199219 0.199219L0.199219 4.54922ZM1.09922 1.09922L3.64922 1.09922L3.64922 3.64922L1.09922 3.64922L1.09922 1.09922Z"}),(0,Yt.h)("path",{d:"M2.97124 7.0271H1.77124L1.77124 8.2271H2.97124V7.0271Z"}),(0,Yt.h)("path",{d:"M0.199219 9.79922H4.54922L4.54922 5.44922L0.199219 5.44922L0.199219 9.79922ZM1.09922 6.34922L3.64922 6.34922L3.64922 8.89922H1.09922L1.09922 6.34922Z"}),(0,Yt.h)("path",{d:"M8.89922 7.39912H7.99922V5.40112H5.44922L5.44922 9.79912H6.34922L6.34922 6.30112H7.09922V8.29912H9.79922V5.40112H8.89922V7.39912Z"}),(0,Yt.h)("path",{d:"M7.99912 8.89917H7.09912V9.79917H7.99912V8.89917Z"}),(0,Yt.h)("path",{d:"M9.79917 8.89917H8.89917V9.79917H9.79917V8.89917Z"}))}Oo.QRCodeIcon=R3;var vc={};Object.defineProperty(vc,"__esModule",{value:!0});const I3=` + + + + + +`;vc.default=I3;var yc={};Object.defineProperty(yc,"__esModule",{value:!0});yc.default=` + + + + + + +`;var No={};Object.defineProperty(No,"__esModule",{value:!0});No.StatusDotIcon=void 0;const Nf=It;function A3(t){return(0,Nf.h)("svg",Object.assign({width:"10",height:"10",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg"},t),(0,Nf.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.29995 4.99995C2.29995 5.57985 1.82985 6.04995 1.24995 6.04995C0.670052 6.04995 0.199951 5.57985 0.199951 4.99995C0.199951 4.42005 0.670052 3.94995 1.24995 3.94995C1.82985 3.94995 2.29995 4.42005 2.29995 4.99995ZM4.99995 6.04995C5.57985 6.04995 6.04995 5.57985 6.04995 4.99995C6.04995 4.42005 5.57985 3.94995 4.99995 3.94995C4.42005 3.94995 3.94995 4.42005 3.94995 4.99995C3.94995 5.57985 4.42005 6.04995 4.99995 6.04995ZM8.74995 6.04995C9.32985 6.04995 9.79995 5.57985 9.79995 4.99995C9.79995 4.42005 9.32985 3.94995 8.74995 3.94995C8.17005 3.94995 7.69995 4.42005 7.69995 4.99995C7.69995 5.57985 8.17005 6.04995 8.74995 6.04995Z"}))}No.StatusDotIcon=A3;var Lo={};function bp(t){this.mode=Mt.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e65536?(n[0]=240|(i&1835008)>>>18,n[1]=128|(i&258048)>>>12,n[2]=128|(i&4032)>>>6,n[3]=128|i&63):i>2048?(n[0]=224|(i&61440)>>>12,n[1]=128|(i&4032)>>>6,n[2]=128|i&63):i>128?(n[0]=192|(i&1984)>>>6,n[1]=128|i&63):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}bp.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=or.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[t+r][e+n]=!0:this.modules[t+r][e+n]=!1)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=Je.getLostPoint(this);(r==0||t>n)&&(t=n,e=r)}return e},createMovieClip:function(t,e,r){var n=t.createEmptyMovieClip(e,r),i=1;this.make();for(var s=0;s>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,n=Je.getBCHTypeInfo(r),i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,n=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var a=0;a<2;a++)if(this.modules[n][o-a]==null){var c=!1;s>>i&1)==1);var l=Je.getMask(e,n,o-a);l&&(c=!c),this.modules[n][o-a]=c,i--,i==-1&&(s++,i=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};or.PAD0=236;or.PAD1=17;or.createData=function(t,e,r){for(var n=rr.getRSBlocks(t,e),i=new vp,s=0;sa*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+a*8+")");for(i.getLengthInBits()+4<=a*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=a*8||(i.put(or.PAD0,8),i.getLengthInBits()>=a*8));)i.put(or.PAD1,8);return or.createBytes(i,n)};or.createBytes=function(t,e){for(var r=0,n=0,i=0,s=new Array(e.length),o=new Array(e.length),a=0;a=0?C.get(A):0}}for(var D=0,d=0;d=0;)e^=Je.G15<=0;)e^=Je.G18<>>=1;return e},getPatternPosition:function(t){return Je.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case yr.PATTERN000:return(e+r)%2==0;case yr.PATTERN001:return e%2==0;case yr.PATTERN010:return r%3==0;case yr.PATTERN011:return(e+r)%3==0;case yr.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case yr.PATTERN101:return e*r%2+e*r%3==0;case yr.PATTERN110:return(e*r%2+e*r%3)%2==0;case yr.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new Gn([1],0),r=0;r5&&(r+=3+s-5)}for(var n=0;n=256;)t-=255;return ut.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var ft=0;ft<8;ft++)ut.EXP_TABLE[ft]=1<>>7-t%8&1)==1},put:function(t,e){for(var r=0;r>>e-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Ba=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function yp(t){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof t=="string"&&(t={content:t}),t)for(var e in t)this.options[e]=t[e];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function r(c){switch(c){case"L":return Mr.L;case"M":return Mr.M;case"Q":return Mr.Q;case"H":return Mr.H;default:throw new Error("Unknwon error correction level: "+c)}}function n(c,l){for(var d=i(c),g=1,y=0,C=0,A=Ba.length;C<=A;C++){var D=Ba[C];if(!D)throw new Error("Content too long: expected "+y+" but got "+d);switch(l){case"L":y=D[0];break;case"M":y=D[1];break;case"Q":y=D[2];break;case"H":y=D[3];break;default:throw new Error("Unknwon error correction level: "+l)}if(d<=y)break;g++}if(g>Ba.length)throw new Error("Content too long");return g}function i(c){var l=encodeURI(c).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return l.length+(l.length!=c?3:0)}var s=this.options.content,o=n(s,this.options.ecl),a=r(this.options.ecl);this.qrcode=new or(o,a),this.qrcode.addData(s),this.qrcode.make()}yp.prototype.svg=function(t){var e=this.options||{},r=this.qrcode.modules;typeof t>"u"&&(t={container:e.container||"svg"});for(var n=typeof e.pretty<"u"?!!e.pretty:!0,i=n?" ":"",s=n?`\r +`:"",o=e.width,a=e.height,c=r.length,l=o/(c+2*e.padding),d=a/(c+2*e.padding),g=typeof e.join<"u"?!!e.join:!1,y=typeof e.swap<"u"?!!e.swap:!1,C=typeof e.xmlDeclaration<"u"?!!e.xmlDeclaration:!0,A=typeof e.predefined<"u"?!!e.predefined:!1,D=A?i+''+s:"",N=i+''+s,x="",I="",O=0;O'+s:x+=i+''+s}}g&&(x=i+'');let Y="";if(this.options.image!==void 0&&this.options.image.svg){const b=o*this.options.image.width/100,u=a*this.options.image.height/100,h=o/2-b/2,p=a/2-u/2;Y+=``,Y+=this.options.image.svg+s,Y+=""}var X="";switch(t.container){case"svg":C&&(X+=''+s),X+=''+s,X+=D+N+x,X+=Y,X+="";break;case"svg-viewbox":C&&(X+=''+s),X+=''+s,X+=D+N+x,X+=Y,X+="";break;case"g":X+=''+s,X+=D+N+x,X+=Y,X+="";break;default:X+=(D+N+x+Y).replace(/^\s+/,"");break}return X};var T3=yp,k3=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Lo,"__esModule",{value:!0});Lo.QRCode=void 0;const O3=It,Lf=fs,N3=k3(T3),L3=t=>{const[e,r]=(0,Lf.useState)("");return(0,Lf.useEffect)(()=>{var n,i;const s=new N3.default({content:t.content,background:t.bgColor||"#ffffff",color:t.fgColor||"#000000",container:"svg",ecl:"M",width:(n=t.width)!==null&&n!==void 0?n:256,height:(i=t.height)!==null&&i!==void 0?i:256,padding:0,image:t.image}),o=Buffer.from(s.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${o}`)}),e?(0,O3.h)("img",{src:e,alt:"QR Code"}):null};Lo.QRCode=L3;var Po={},mc={};Object.defineProperty(mc,"__esModule",{value:!0});mc.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}";var P3=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Po,"__esModule",{value:!0});Po.Spinner=void 0;const Cs=It,D3=P3(mc),$3=t=>{var e;const r=(e=t.size)!==null&&e!==void 0?e:64,n=t.color||"#000";return(0,Cs.h)("div",{class:"-cbwsdk-spinner"},(0,Cs.h)("style",null,D3.default),(0,Cs.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},(0,Cs.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};Po.Spinner=$3;var wc={};Object.defineProperty(wc,"__esModule",{value:!0});wc.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-item.light.selected{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark.selected{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item.selected{border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}";var wi=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sr,"__esModule",{value:!0});sr.CoinbaseAppSteps=sr.CoinbaseWalletSteps=sr.ConnectItem=sr.ConnectContent=void 0;const Lt=wi(To),te=It,Pf=fs,B3=J,j3=ci,F3=ko,W3=wi(gc),H3=wi(bc),mp=Oo,V3=wi(vc),U3=wi(yc),z3=No,q3=Lo,G3=Po,J3=wi(wc),Df={"coinbase-wallet-app":{title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",icon:H3.default,steps:_p},"coinbase-app":{title:"Coinbase app",description:"Connect with your Coinbase account",icon:W3.default,steps:Sp}},Z3=t=>{switch(t){case"coinbase-app":return V3.default;case"coinbase-wallet-app":default:return U3.default}},bu=t=>t==="light"?"#FFFFFF":"#0A0B0D";function Q3(t){const{theme:e}=t,[r,n]=(0,Pf.useState)("coinbase-wallet-app"),i=(0,Pf.useCallback)(l=>{n(l)},[]),s=(0,B3.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection,t.version,t.chainId),o=Df[r];if(!r)return null;const a=o.steps,c=r==="coinbase-app";return(0,te.h)("div",{"data-testid":"connect-content",class:(0,Lt.default)("-cbwsdk-connect-content",e)},(0,te.h)("style",null,J3.default),(0,te.h)("div",{class:"-cbwsdk-connect-content-header"},(0,te.h)("h2",{class:(0,Lt.default)("-cbwsdk-connect-content-heading",e)},"Scan to connect with one of our mobile apps"),t.onCancel&&(0,te.h)("button",{type:"button",class:"-cbwsdk-cancel-button",onClick:t.onCancel},(0,te.h)(F3.CloseIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,te.h)("div",{class:"-cbwsdk-connect-content-layout"},(0,te.h)("div",{class:"-cbwsdk-connect-content-column-left"},(0,te.h)("div",null,Object.entries(Df).map(([l,d])=>(0,te.h)(wp,{key:l,title:d.title,description:d.description,icon:d.icon,selected:r===l,onClick:()=>i(l),theme:e}))),c&&(0,te.h)("div",{class:(0,Lt.default)("-cbwsdk-connect-content-update-app",e)},"Don’t see a ",(0,te.h)("strong",null,"Scan")," option? Update your Coinbase app to the latest version and try again.")),(0,te.h)("div",{class:"-cbwsdk-connect-content-column-right"},(0,te.h)("div",{class:"-cbwsdk-connect-content-qr-wrapper"},(0,te.h)(q3.QRCode,{content:s,width:200,height:200,fgColor:"#000",bgColor:"transparent",image:{svg:Z3(r),width:25,height:25}}),(0,te.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:j3.LIB_VERSION}),(0,te.h)("input",{type:"hidden",value:s})),(0,te.h)(a,{theme:e}),!t.isConnected&&(0,te.h)("div",{"data-testid":"connecting-spinner",class:(0,Lt.default)("-cbwsdk-connect-content-qr-connecting",e)},(0,te.h)(G3.Spinner,{size:36,color:e==="dark"?"#FFF":"#000"}),(0,te.h)("p",null,"Connecting...")))))}sr.ConnectContent=Q3;function wp({title:t,description:e,icon:r,selected:n,theme:i,onClick:s}){return(0,te.h)("div",{onClick:s,class:(0,Lt.default)("-cbwsdk-connect-item",i,{selected:n})},(0,te.h)("div",null,(0,te.h)("img",{src:r,alt:t})),(0,te.h)("div",{class:"-cbwsdk-connect-item-copy-wrapper"},(0,te.h)("h3",{class:"-cbwsdk-connect-item-title"},t),(0,te.h)("p",{class:"-cbwsdk-connect-item-description"},e)))}sr.ConnectItem=wp;function _p({theme:t}){return(0,te.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,te.h)("li",{class:(0,Lt.default)("-cbwsdk-wallet-steps-item",t)},(0,te.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,te.h)("li",{class:(0,Lt.default)("-cbwsdk-wallet-steps-item",t)},(0,te.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,te.h)("span",null,"Tap ",(0,te.h)("strong",null,"Scan")," "),(0,te.h)("span",{class:(0,Lt.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,te.h)(mp.QRCodeIcon,{fill:bu(t)})))))}sr.CoinbaseWalletSteps=_p;function Sp({theme:t}){return(0,te.h)("ol",{class:"-cbwsdk-wallet-steps"},(0,te.h)("li",{class:(0,Lt.default)("-cbwsdk-wallet-steps-item",t)},(0,te.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase app")),(0,te.h)("li",{class:(0,Lt.default)("-cbwsdk-wallet-steps-item",t)},(0,te.h)("div",{class:"-cbwsdk-wallet-steps-item-wrapper"},(0,te.h)("span",null,"Tap ",(0,te.h)("strong",null,"More")),(0,te.h)("span",{class:(0,Lt.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,te.h)(z3.StatusDotIcon,{fill:bu(t)})),(0,te.h)("span",{class:"-cbwsdk-wallet-steps-pad-left"},"then ",(0,te.h)("strong",null,"Scan")),(0,te.h)("span",{class:(0,Lt.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,te.h)(mp.QRCodeIcon,{fill:bu(t)})))))}sr.CoinbaseAppSteps=Sp;var Do={},$o={};Object.defineProperty($o,"__esModule",{value:!0});$o.ArrowLeftIcon=void 0;const $f=It;function Y3(t){return(0,$f.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t),(0,$f.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}$o.ArrowLeftIcon=Y3;var Bo={};Object.defineProperty(Bo,"__esModule",{value:!0});Bo.LaptopIcon=void 0;const ja=It;function K3(t){return(0,ja.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,ja.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,ja.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}Bo.LaptopIcon=K3;var jo={};Object.defineProperty(jo,"__esModule",{value:!0});jo.SafeIcon=void 0;const Bf=It;function X3(t){return(0,Bf.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,Bf.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}jo.SafeIcon=X3;var _c={};Object.defineProperty(_c,"__esModule",{value:!0});_c.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}";var Ep=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Do,"__esModule",{value:!0});Do.TryExtensionContent=void 0;const qr=Ep(To),tt=It,Fa=fs,e4=$o,t4=Bo,r4=jo,n4=Ep(_c);function i4({theme:t}){const[e,r]=(0,Fa.useState)(!1),n=(0,Fa.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),i=(0,Fa.useCallback)(()=>{e?window.location.reload():(n(),r(!0))},[n,e]);return(0,tt.h)("div",{class:(0,qr.default)("-cbwsdk-try-extension",t)},(0,tt.h)("style",null,n4.default),(0,tt.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,tt.h)("h3",{class:(0,qr.default)("-cbwsdk-try-extension-heading",t)},"Or try the Coinbase Wallet browser extension"),(0,tt.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,tt.h)("button",{class:(0,qr.default)("-cbwsdk-try-extension-cta",t),onClick:i},e?"Refresh":"Install"),(0,tt.h)("div",null,!e&&(0,tt.h)(e4.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:t==="light"?"#0052FF":"#588AF5"})))),(0,tt.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,tt.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,tt.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,tt.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,tt.h)("span",{class:(0,qr.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,tt.h)(t4.LaptopIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,tt.h)("div",{class:(0,qr.default)("-cbwsdk-try-extension-list-item-copy",t)},"Connect with dapps with just one click on your desktop browser")),(0,tt.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,tt.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,tt.h)("span",{class:(0,qr.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,tt.h)(r4.SafeIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,tt.h)("div",{class:(0,qr.default)("-cbwsdk-try-extension-list-item-copy",t)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}Do.TryExtensionContent=i4;var Sc={};Object.defineProperty(Sc,"__esModule",{value:!0});Sc.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}";var xp=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.ConnectDialog=void 0;const Wa=xp(To),Gr=It,Ha=fs,s4=sr,o4=Do,a4=xp(Sc),u4=t=>{const{isOpen:e,darkMode:r}=t,[n,i]=(0,Ha.useState)(!e),[s,o]=(0,Ha.useState)(!e);(0,Ha.useEffect)(()=>{const c=[window.setTimeout(()=>{o(!e)},10)];return e?i(!1):c.push(window.setTimeout(()=>{i(!0)},360)),()=>{c.forEach(window.clearTimeout)}},[t.isOpen]);const a=r?"dark":"light";return(0,Gr.h)("div",{class:(0,Wa.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,Gr.h)("style",null,a4.default),(0,Gr.h)("div",{class:(0,Wa.default)("-cbwsdk-connect-dialog-backdrop",a,s&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,Gr.h)("div",{class:"-cbwsdk-connect-dialog"},(0,Gr.h)("div",{class:(0,Wa.default)("-cbwsdk-connect-dialog-box",s&&"-cbwsdk-connect-dialog-box-hidden")},t.connectDisabled?null:(0,Gr.h)(s4.ConnectContent,{theme:a,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection,chainId:t.chainId,onCancel:t.onCancel}),(0,Gr.h)(o4.TryExtensionContent,{theme:a}))))};Ao.ConnectDialog=u4;Object.defineProperty(Co,"__esModule",{value:!0});Co.LinkFlow=void 0;const Va=It,jf=Io,c4=Ao;class l4{constructor(e){this.extensionUI$=new jf.BehaviorSubject({}),this.subscriptions=new jf.Subscription,this.isConnected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection,this.connected$=e.connected$,this.chainId$=e.chainId$}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe(r=>{this.isConnected!==r&&(this.isConnected=r,this.render())})),this.subscriptions.add(this.chainId$.subscribe(r=>{this.chainId!==r&&(this.chainId=r,this.render())}))}detach(){var e;this.root&&(this.subscriptions.unsubscribe(),(0,Va.render)(null,this.root),(e=this.root.parentElement)===null||e===void 0||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const e=this.extensionUI$.subscribe(()=>{this.root&&(0,Va.render)((0,Va.h)(c4.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)});this.subscriptions.add(e)}}Co.LinkFlow=l4;var Mp={},Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}";(function(t){var e=Z&&Z.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(t,"__esModule",{value:!0}),t.SnackbarInstance=t.SnackbarContainer=t.Snackbar=void 0;const r=e(To),n=It,i=fs,s=e(Ec),o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";function a(g){switch(g){case"coinbase-app":return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE0LjY3NCAxOC44NThjLTIuMDQ1IDAtMy42NDgtMS43MjItMy42NDgtMy44NDVzMS42NTktMy44NDUgMy42NDgtMy44NDVjMS44MjQgMCAzLjMxNyAxLjM3NyAzLjU5MyAzLjIxNGgzLjcwM2MtLjMzMS0zLjk2LTMuNDgyLTcuMDU5LTcuMjk2LTcuMDU5LTQuMDM0IDAtNy4zNSAzLjQ0My03LjM1IDcuNjkgMCA0LjI0NiAzLjI2IDcuNjkgNy4zNSA3LjY5IDMuODcgMCA2Ljk2NS0zLjEgNy4yOTYtNy4wNTloLTMuNzAzYy0uMjc2IDEuODM2LTEuNzY5IDMuMjE0LTMuNTkzIDMuMjE0WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0wIDEwLjY3OGMwLTMuNzExIDAtNS41OTYuNzQyLTcuMDIzQTYuNTMyIDYuNTMyIDAgMCAxIDMuNjU1Ljc0MkM1LjA4MiAwIDYuOTY3IDAgMTAuNjc4IDBoNy45MzhjMy43MTEgMCA1LjU5NiAwIDcuMDIzLjc0MmE2LjUzMSA2LjUzMSAwIDAgMSAyLjkxMyAyLjkxM2MuNzQyIDEuNDI3Ljc0MiAzLjMxMi43NDIgNy4wMjN2Ny45MzhjMCAzLjcxMSAwIDUuNTk2LS43NDIgNy4wMjNhNi41MzEgNi41MzEgMCAwIDEtMi45MTMgMi45MTNjLTEuNDI3Ljc0Mi0zLjMxMi43NDItNy4wMjMuNzQyaC03LjkzOGMtMy43MTEgMC01LjU5NiAwLTcuMDIzLS43NDJhNi41MzEgNi41MzEgMCAwIDEtMi45MTMtMi45MTNDMCAyNC4yMTIgMCAyMi4zODQgMCAxOC42MTZ2LTcuOTM4WiIgZmlsbD0iIzAwNTJGRiIvPjxwYXRoIGQ9Ik0xNC42ODQgMTkuNzczYy0yLjcyNyAwLTQuODY0LTIuMjk1LTQuODY0LTUuMTI2IDAtMi44MzEgMi4yMS01LjEyNyA0Ljg2NC01LjEyNyAyLjQzMiAwIDQuNDIyIDEuODM3IDQuNzkgNC4yODVoNC45MzhjLS40NDItNS4yOC00LjY0My05LjQxMS05LjcyOC05LjQxMS01LjM4IDAtOS44MDIgNC41OS05LjgwMiAxMC4yNTMgMCA1LjY2MiA0LjM0OCAxMC4yNTMgOS44MDIgMTAuMjUzIDUuMTU5IDAgOS4yODYtNC4xMzIgOS43MjgtOS40MTFoLTQuOTM4Yy0uMzY4IDIuNDQ4LTIuMzU4IDQuMjg0LTQuNzkgNC4yODRaIiBmaWxsPSIjZmZmIi8+PC9zdmc+";case"coinbase-wallet-app":default:return"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"}}class c{constructor(y){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=y.darkMode}attach(y){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",y.appendChild(this.root),this.render()}presentItem(y){const C=this.nextItemKey++;return this.items.set(C,y),this.render(),()=>{this.items.delete(C),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(t.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([y,C])=>(0,n.h)(t.SnackbarInstance,Object.assign({},C,{key:y}))))),this.root)}}t.Snackbar=c;const l=g=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,s.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},g.children));t.SnackbarContainer=l;const d=({autoExpand:g,message:y,menuItems:C,appSrc:A})=>{const[D,N]=(0,i.useState)(!0),[x,I]=(0,i.useState)(g??!1);(0,i.useEffect)(()=>{const P=[window.setTimeout(()=>{N(!1)},1),window.setTimeout(()=>{I(!0)},1e4)];return()=>{P.forEach(window.clearTimeout)}});const O=()=>{I(!x)};return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance",D&&"-cbwsdk-snackbar-instance-hidden",x&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:O},(0,n.h)("img",{src:a(A),class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},y),(0,n.h)("div",{class:"-gear-container"},!x&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:o,class:"-gear-icon",title:"Expand"}))),C&&C.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},C.map((P,L)=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item",P.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:P.onClick,key:L},(0,n.h)("svg",{width:P.svgWidth,height:P.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":P.defaultFillRule,"clip-rule":P.defaultClipRule,d:P.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item-info",P.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},P.info)))))};t.SnackbarInstance=d})(Mp);var Fo={},xc={};Object.defineProperty(xc,"__esModule",{value:!0});xc.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';var f4=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fo,"__esModule",{value:!0});Fo.injectCssReset=void 0;const h4=f4(xc);function d4(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(h4.default)),document.documentElement.appendChild(t)}Fo.injectCssReset=d4;Object.defineProperty(Mo,"__esModule",{value:!0});Mo.WalletSDKUI=void 0;const p4=Co,g4=Mp,b4=Fo;class v4{constructor(e){this.standalone=null,this.attached=!1,this.appSrc=null,this.snackbar=new g4.Snackbar({darkMode:e.darkMode}),this.linkFlow=new p4.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,connected$:e.connected$,chainId$:e.chainId$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const e=document.documentElement,r=document.createElement("div");r.className="-cbwsdk-css-reset",e.appendChild(r),this.linkFlow.attach(r),this.snackbar.attach(r),this.attached=!0,(0,b4.injectCssReset)()}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(e){}watchAsset(e){}switchEthereumChain(e){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(e){}signEthereumTransaction(e){}submitEthereumTransaction(e){}ethereumAddressFromSignedMessage(e){}showConnecting(e){let r;return e.isUnlinkedErrorState?r={autoExpand:!0,message:"Connection lost",appSrc:this.appSrc,menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:r={message:"Confirm on phone",appSrc:this.appSrc,menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(r)}setAppSrc(e){this.appSrc=e}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(e){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return(e=this.standalone)!==null&&e!==void 0?e:!1}}Mo.WalletSDKUI=v4;var Wo={},Ho={};Object.defineProperty(Ho,"__esModule",{value:!0});var Wn;(function(t){t.typeOfFunction="function",t.boolTrue=!0})(Wn||(Wn={}));function Cp(t,e,r){if(!r||typeof r.value!==Wn.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:Wn.boolTrue,get:function(){var n=r.value.bind(this);return Object.defineProperty(this,e,{value:n,configurable:Wn.boolTrue,writable:Wn.boolTrue}),n}}}Ho.bind=Cp;Ho.default=Cp;function Rp(t){return function(r){return r.lift(new y4(t))}}var y4=function(){function t(e){this.durationSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new m4(e,this.durationSelector))},t}(),m4=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.durationSelector=n,i.hasValue=!1,i}return e.prototype._next=function(r){if(this.value=r,this.hasValue=!0,!this.throttled){var n=void 0;try{var i=this.durationSelector;n=i(r)}catch(o){return this.destination.error(o)}var s=Xe(n,new Ye(this));!s||s.closed?this.clearThrottle():this.add(this.throttled=s)}},e.prototype.clearThrottle=function(){var r=this,n=r.value,i=r.hasValue,s=r.throttled;s&&(this.remove(s),this.throttled=void 0,s.unsubscribe()),i&&(this.value=void 0,this.hasValue=!1,this.destination.next(n))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(Ke);function w4(t,e){return e===void 0&&(e=wt),Rp(function(){return dp(t,e)})}function _4(t){return function(r){return r.lift(new S4(t))}}var S4=function(){function t(e){this.closingNotifier=e}return t.prototype.call=function(e,r){return r.subscribe(new E4(e,this.closingNotifier))},t}(),E4=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.buffer=[],i.add(Xe(n,new Ye(i))),i}return e.prototype._next=function(r){this.buffer.push(r)},e.prototype.notifyNext=function(){var r=this.buffer;this.buffer=[],this.destination.next(r)},e}(Ke);function x4(t,e){return e===void 0&&(e=null),function(n){return n.lift(new M4(t,e))}}var M4=function(){function t(e,r){this.bufferSize=e,this.startBufferEvery=r,!r||e===r?this.subscriberClass=C4:this.subscriberClass=R4}return t.prototype.call=function(e,r){return r.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},t}(),C4=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.bufferSize=n,i.buffer=[],i}return e.prototype._next=function(r){var n=this.buffer;n.push(r),n.length==this.bufferSize&&(this.destination.next(n),this.buffer=[])},e.prototype._complete=function(){var r=this.buffer;r.length>0&&this.destination.next(r),t.prototype._complete.call(this)},e}(Q),R4=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.bufferSize=n,s.startBufferEvery=i,s.buffers=[],s.count=0,s}return e.prototype._next=function(r){var n=this,i=n.bufferSize,s=n.startBufferEvery,o=n.buffers,a=n.count;this.count++,a%s===0&&o.push([]);for(var c=o.length;c--;){var l=o[c];l.push(r),l.length===i&&(o.splice(c,1),this.destination.next(l))}},e.prototype._complete=function(){for(var r=this,n=r.buffers,i=r.destination;n.length>0;){var s=n.shift();s.length>0&&i.next(s)}t.prototype._complete.call(this)},e}(Q);function I4(t){var e=arguments.length,r=wt;Rt(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],e--);var n=null;e>=2&&(n=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(o){return o.lift(new A4(t,n,i,r))}}var A4=function(){function t(e,r,n,i){this.bufferTimeSpan=e,this.bufferCreationInterval=r,this.maxBufferSize=n,this.scheduler=i}return t.prototype.call=function(e,r){return r.subscribe(new k4(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),T4=function(){function t(){this.buffer=[]}return t}(),k4=function(t){j(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;a.bufferTimeSpan=n,a.bufferCreationInterval=i,a.maxBufferSize=s,a.scheduler=o,a.contexts=[];var c=a.openContext();if(a.timespanOnly=i==null||i<0,a.timespanOnly){var l={subscriber:a,context:c,bufferTimeSpan:n};a.add(c.closeAction=o.schedule(Ff,n,l))}else{var d={subscriber:a,context:c},g={bufferTimeSpan:n,bufferCreationInterval:i,subscriber:a,scheduler:o};a.add(c.closeAction=o.schedule(Ip,n,d)),a.add(o.schedule(O4,i,g))}return a}return e.prototype._next=function(r){for(var n=this.contexts,i=n.length,s,o=0;o0;){var s=n.shift();i.next(s.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(r){this.closeContext(r);var n=r.closeAction;if(n.unsubscribe(),this.remove(n),!this.closed&&this.timespanOnly){r=this.openContext();var i=this.bufferTimeSpan,s={subscriber:this,context:r,bufferTimeSpan:i};this.add(r.closeAction=this.scheduler.schedule(Ff,i,s))}},e.prototype.openContext=function(){var r=new T4;return this.contexts.push(r),r},e.prototype.closeContext=function(r){this.destination.next(r.buffer);var n=this.contexts,i=n?n.indexOf(r):-1;i>=0&&n.splice(n.indexOf(r),1)},e}(Q);function Ff(t){var e=t.subscriber,r=t.context;r&&e.closeContext(r),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function O4(t){var e=t.bufferCreationInterval,r=t.bufferTimeSpan,n=t.subscriber,i=t.scheduler,s=n.openContext(),o=this;n.closed||(n.add(s.closeAction=i.schedule(Ip,r,{subscriber:n,context:s})),o.schedule(t,e))}function Ip(t){var e=t.subscriber,r=t.context;e.closeContext(r)}function N4(t,e){return function(n){return n.lift(new L4(t,e))}}var L4=function(){function t(e,r){this.openings=e,this.closingSelector=r}return t.prototype.call=function(e,r){return r.subscribe(new P4(e,this.openings,this.closingSelector))},t}(),P4=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.closingSelector=i,s.contexts=[],s.add(gr(s,n)),s}return e.prototype._next=function(r){for(var n=this.contexts,i=n.length,s=0;s0;){var i=n.shift();i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,t.prototype._error.call(this,r)},e.prototype._complete=function(){for(var r=this.contexts;r.length>0;){var n=r.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(r,n){r?this.closeBuffer(r):this.openBuffer(n)},e.prototype.notifyComplete=function(r){this.closeBuffer(r.context)},e.prototype.openBuffer=function(r){try{var n=this.closingSelector,i=n.call(this,r);i&&this.trySubscribe(i)}catch(s){this._error(s)}},e.prototype.closeBuffer=function(r){var n=this.contexts;if(n&&r){var i=r.buffer,s=r.subscription;this.destination.next(i),n.splice(n.indexOf(r),1),this.remove(s),s.unsubscribe()}},e.prototype.trySubscribe=function(r){var n=this.contexts,i=[],s=new Qe,o={buffer:i,subscription:s};n.push(o);var a=gr(this,r,o);!a||a.closed?this.closeBuffer(o):(a.context=o,this.add(a),s.add(a))},e}(mn);function D4(t){return function(e){return e.lift(new $4(t))}}var $4=function(){function t(e){this.closingSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new B4(e,this.closingSelector))},t}(),B4=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.closingSelector=n,i.subscribing=!1,i.openBuffer(),i}return e.prototype._next=function(r){this.buffer.push(r)},e.prototype._complete=function(){var r=this.buffer;r&&this.destination.next(r),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var r=this.closingSubscription;r&&(this.remove(r),r.unsubscribe());var n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];var i;try{var s=this.closingSelector;i=s()}catch(o){return this.error(o)}r=new Qe,this.closingSubscription=r,this.add(r),this.subscribing=!0,r.add(Xe(i,new Ye(this))),this.subscribing=!1},e}(Ke);function j4(t){return function(r){var n=new F4(t),i=r.lift(n);return n.caught=i}}var F4=function(){function t(e){this.selector=e}return t.prototype.call=function(e,r){return r.subscribe(new W4(e,this.selector,this.caught))},t}(),W4=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.selector=n,s.caught=i,s}return e.prototype.error=function(r){if(!this.isStopped){var n=void 0;try{n=this.selector(r,this.caught)}catch(o){t.prototype.error.call(this,o);return}this._unsubscribeAndRecycle();var i=new Ye(this);this.add(i);var s=Xe(n,i);s!==i&&this.add(s)}},e}(Ke);function H4(t){return function(e){return e.lift(new hc(t))}}function V4(){for(var t=[],e=0;e0&&i[0].time-s.now()<=0;)i.shift().notification.observe(o);if(i.length>0){var a=Math.max(0,i[0].time-s.now());this.schedule(r,a)}else this.unsubscribe(),n.active=!1},e.prototype._schedule=function(r){this.active=!0;var n=this.destination;n.add(r.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:r}))},e.prototype.scheduleNotification=function(r){if(this.errored!==!0){var n=this.scheduler,i=new a5(n.now()+this.delay,r);this.queue.push(i),this.active===!1&&this._schedule(n)}},e.prototype._next=function(r){this.scheduleNotification(dr.createNext(r))},e.prototype._error=function(r){this.errored=!0,this.queue=[],this.destination.error(r),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(dr.createComplete()),this.unsubscribe()},e}(Q),a5=function(){function t(e,r){this.time=e,this.notification=r}return t}();function u5(t,e){return e?function(r){return new l5(r,e).lift(new Wf(t))}:function(r){return r.lift(new Wf(t))}}var Wf=function(){function t(e){this.delayDurationSelector=e}return t.prototype.call=function(e,r){return r.subscribe(new c5(e,this.delayDurationSelector))},t}(),c5=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.delayDurationSelector=n,i.completed=!1,i.delayNotifierSubscriptions=[],i.index=0,i}return e.prototype.notifyNext=function(r,n,i,s,o){this.destination.next(r),this.removeSubscription(o),this.tryComplete()},e.prototype.notifyError=function(r,n){this._error(r)},e.prototype.notifyComplete=function(r){var n=this.removeSubscription(r);n&&this.destination.next(n),this.tryComplete()},e.prototype._next=function(r){var n=this.index++;try{var i=this.delayDurationSelector(r,n);i&&this.tryDelay(i,r)}catch(s){this.destination.error(s)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(r){r.unsubscribe();var n=this.delayNotifierSubscriptions.indexOf(r);return n!==-1&&this.delayNotifierSubscriptions.splice(n,1),r.outerValue},e.prototype.tryDelay=function(r,n){var i=gr(this,r,n);if(i&&!i.closed){var s=this.destination;s.add(i),this.delayNotifierSubscriptions.push(i)}},e.prototype.tryComplete=function(){this.completed&&this.delayNotifierSubscriptions.length===0&&this.destination.complete()},e}(mn),l5=function(t){j(e,t);function e(r,n){var i=t.call(this)||this;return i.source=r,i.subscriptionDelay=n,i}return e.prototype._subscribe=function(r){this.subscriptionDelay.subscribe(new f5(r,this.source))},e}(ae),f5=function(t){j(e,t);function e(r,n){var i=t.call(this)||this;return i.parent=r,i.source=n,i.sourceSubscribed=!1,i}return e.prototype._next=function(r){this.subscribeToSource()},e.prototype._error=function(r){this.unsubscribe(),this.parent.error(r)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(Q);function h5(){return function(e){return e.lift(new d5)}}var d5=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new p5(e))},t}(),p5=function(t){j(e,t);function e(r){return t.call(this,r)||this}return e.prototype._next=function(r){r.observe(this.destination)},e}(Q);function g5(t,e){return function(r){return r.lift(new b5(t,e))}}var b5=function(){function t(e,r){this.keySelector=e,this.flushes=r}return t.prototype.call=function(e,r){return r.subscribe(new v5(e,this.keySelector,this.flushes))},t}(),v5=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.keySelector=n,s.values=new Set,i&&s.add(Xe(i,new Ye(s))),s}return e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(r){this._error(r)},e.prototype._next=function(r){this.keySelector?this._useKeySelector(r):this._finalizeNext(r,r)},e.prototype._useKeySelector=function(r){var n,i=this.destination;try{n=this.keySelector(r)}catch(s){i.error(s);return}this._finalizeNext(n,r)},e.prototype._finalizeNext=function(r,n){var i=this.values;i.has(r)||(i.add(r),this.destination.next(n))},e}(Ke);function kp(t,e){return function(r){return r.lift(new y5(t,e))}}var y5=function(){function t(e,r){this.compare=e,this.keySelector=r}return t.prototype.call=function(e,r){return r.subscribe(new m5(e,this.compare,this.keySelector))},t}(),m5=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.keySelector=i,s.hasKey=!1,typeof n=="function"&&(s.compare=n),s}return e.prototype.compare=function(r,n){return r===n},e.prototype._next=function(r){var n;try{var i=this.keySelector;n=i?i(r):r}catch(a){return this.destination.error(a)}var s=!1;if(this.hasKey)try{var o=this.compare;s=o(this.key,n)}catch(a){return this.destination.error(a)}else this.hasKey=!0;s||(this.key=n,this.destination.next(r))},e}(Q);function w5(t,e){return kp(function(r,n){return e?e(r[t],n[t]):r[t]===n[t]})}function Vo(t){return t===void 0&&(t=E5),function(e){return e.lift(new _5(t))}}var _5=function(){function t(e){this.errorFactory=e}return t.prototype.call=function(e,r){return r.subscribe(new S5(e,this.errorFactory))},t}(),S5=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.errorFactory=n,i.hasValue=!1,i}return e.prototype._next=function(r){this.hasValue=!0,this.destination.next(r)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var r=void 0;try{r=this.errorFactory()}catch(n){r=n}this.destination.error(r)},e}(Q);function E5(){return new ls}function Mc(t){return function(e){return t===0?yi():e.lift(new x5(t))}}var x5=function(){function t(e){if(this.total=e,this.total<0)throw new ii}return t.prototype.call=function(e,r){return r.subscribe(new M5(e,this.total))},t}(),M5=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.total=n,i.count=0,i}return e.prototype._next=function(r){var n=this.total,i=++this.count;i<=n&&(this.destination.next(r),i===n&&(this.destination.complete(),this.unsubscribe()))},e}(Q);function C5(t,e){if(t<0)throw new ii;var r=arguments.length>=2;return function(n){return n.pipe(Tr(function(i,s){return s===t}),Mc(1),r?hs(e):Vo(function(){return new ii}))}}function R5(){for(var t=[],e=0;e0&&this._next(r.shift()),this.hasCompleted&&this.active===0&&this.destination.complete()},e}(Ke);function j5(t){return function(e){return e.lift(new F5(t))}}var F5=function(){function t(e){this.callback=e}return t.prototype.call=function(e,r){return r.subscribe(new W5(e,this.callback))},t}(),W5=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.add(new Qe(n)),i}return e}(Q);function H5(t,e){if(typeof t!="function")throw new TypeError("predicate is not a function");return function(r){return r.lift(new Np(t,r,!1,e))}}var Np=function(){function t(e,r,n,i){this.predicate=e,this.source=r,this.yieldIndex=n,this.thisArg=i}return t.prototype.call=function(e,r){return r.subscribe(new V5(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),V5=function(t){j(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;return a.predicate=n,a.source=i,a.yieldIndex=s,a.thisArg=o,a.index=0,a}return e.prototype.notifyComplete=function(r){var n=this.destination;n.next(r),n.complete(),this.unsubscribe()},e.prototype._next=function(r){var n=this,i=n.predicate,s=n.thisArg,o=this.index++;try{var a=i.call(s||this,r,o,this.source);a&&this.notifyComplete(this.yieldIndex?o:r)}catch(c){this.destination.error(c)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(Q);function U5(t,e){return function(r){return r.lift(new Np(t,r,!0,e))}}function z5(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?Tr(function(i,s){return t(i,s,n)}):Ir,Mc(1),r?hs(e):Vo(function(){return new ls}))}}function q5(){return function(e){return e.lift(new G5)}}var G5=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new J5(e))},t}(),J5=function(t){j(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype._next=function(r){},e}(Q);function Z5(){return function(t){return t.lift(new Q5)}}var Q5=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new Y5(e))},t}(),Y5=function(t){j(e,t);function e(r){return t.call(this,r)||this}return e.prototype.notifyComplete=function(r){var n=this.destination;n.next(r),n.complete()},e.prototype._next=function(r){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(Q);function Us(t){return function(r){return t===0?yi():r.lift(new K5(t))}}var K5=function(){function t(e){if(this.total=e,this.total<0)throw new ii}return t.prototype.call=function(e,r){return r.subscribe(new X5(e,this.total))},t}(),X5=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.total=n,i.ring=new Array,i.count=0,i}return e.prototype._next=function(r){var n=this.ring,i=this.total,s=this.count++;if(n.length0)for(var i=this.count>=this.total?this.total:this.count,s=this.ring,o=0;o=2;return function(n){return n.pipe(t?Tr(function(i,s){return t(i,s,n)}):Ir,Us(1),r?hs(e):Vo(function(){return new ls}))}}function tx(t){return function(e){return e.lift(new rx(t))}}var rx=function(){function t(e){this.value=e}return t.prototype.call=function(e,r){return r.subscribe(new nx(e,this.value))},t}(),nx=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.value=n,i}return e.prototype._next=function(r){this.destination.next(this.value)},e}(Q);function ix(){return function(e){return e.lift(new sx)}}var sx=function(){function t(){}return t.prototype.call=function(e,r){return r.subscribe(new ox(e))},t}(),ox=function(t){j(e,t);function e(r){return t.call(this,r)||this}return e.prototype._next=function(r){this.destination.next(dr.createNext(r))},e.prototype._error=function(r){var n=this.destination;n.next(dr.createError(r)),n.complete()},e.prototype._complete=function(){var r=this.destination;r.next(dr.createComplete()),r.complete()},e}(Q);function zs(t,e){var r=!1;return arguments.length>=2&&(r=!0),function(i){return i.lift(new ax(t,e,r))}}var ax=function(){function t(e,r,n){n===void 0&&(n=!1),this.accumulator=e,this.seed=r,this.hasSeed=n}return t.prototype.call=function(e,r){return r.subscribe(new ux(e,this.accumulator,this.seed,this.hasSeed))},t}(),ux=function(t){j(e,t);function e(r,n,i,s){var o=t.call(this,r)||this;return o.accumulator=n,o._seed=i,o.hasSeed=s,o.index=0,o}return Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(r){this.hasSeed=!0,this._seed=r},enumerable:!0,configurable:!0}),e.prototype._next=function(r){if(!this.hasSeed)this.seed=r,this.destination.next(r);else return this._tryNext(r)},e.prototype._tryNext=function(r){var n=this.index++,i;try{i=this.accumulator(this.seed,r,n)}catch(s){this.destination.error(s)}this.seed=i,this.destination.next(i)},e}(Q);function Uo(t,e){return arguments.length>=2?function(n){return lu(zs(t,e),Us(1),hs(e))(n)}:function(n){return lu(zs(function(i,s,o){return t(i,s,o+1)}),Us(1))(n)}}function cx(t){var e=typeof t=="function"?function(r,n){return t(r,n)>0?r:n}:function(r,n){return r>n?r:n};return Uo(e)}function lx(){for(var t=[],e=0;e0?this._next(r.shift()):this.active===0&&this.hasCompleted&&(this.hasValue===!1&&this.destination.next(this.acc),this.destination.complete())},e}(Ke);function gx(t){var e=typeof t=="function"?function(r,n){return t(r,n)<0?r:n}:function(r,n){return r-1&&(this.count=i-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(Q);function Nx(t){return function(e){return e.lift(new Lx(t))}}var Lx=function(){function t(e){this.notifier=e}return t.prototype.call=function(e,r){return r.subscribe(new Px(e,this.notifier,r))},t}(),Px=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.notifier=n,s.source=i,s.sourceIsBeingSubscribedTo=!0,s}return e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(this.sourceIsBeingSubscribedTo===!1)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var r=this,n=r.notifications,i=r.retriesSubscription;n&&(n.unsubscribe(),this.notifications=void 0),i&&(i.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var r=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=r,this},e.prototype.subscribeToRetries=function(){this.notifications=new ct;var r;try{var n=this.notifier;r=n(this.notifications)}catch{return t.prototype.complete.call(this)}this.retries=r,this.retriesSubscription=Xe(r,new Ye(this))},e}(Ke);function Dx(t){return t===void 0&&(t=-1),function(e){return e.lift(new $x(t,e))}}var $x=function(){function t(e,r){this.count=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new Bx(e,this.count,this.source))},t}(),Bx=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.count=n,s.source=i,s}return e.prototype.error=function(r){if(!this.isStopped){var n=this,i=n.source,s=n.count;if(s===0)return t.prototype.error.call(this,r);s>-1&&(this.count=s-1),i.subscribe(this._unsubscribeAndRecycle())}},e}(Q);function jx(t){return function(e){return e.lift(new Fx(t,e))}}var Fx=function(){function t(e,r){this.notifier=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new Wx(e,this.notifier,this.source))},t}(),Wx=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.notifier=n,s.source=i,s}return e.prototype.error=function(r){if(!this.isStopped){var n=this.errors,i=this.retries,s=this.retriesSubscription;if(i)this.errors=void 0,this.retriesSubscription=void 0;else{n=new ct;try{var o=this.notifier;i=o(n)}catch(a){return t.prototype.error.call(this,a)}s=Xe(i,new Ye(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=s,n.next(r)}},e.prototype._unsubscribe=function(){var r=this,n=r.errors,i=r.retriesSubscription;n&&(n.unsubscribe(),this.errors=void 0),i&&(i.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var r=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=r,this.source.subscribe(this)},e}(Ke);function Hx(t){return function(e){return e.lift(new Vx(t))}}var Vx=function(){function t(e){this.notifier=e}return t.prototype.call=function(e,r){var n=new Ux(e),i=r.subscribe(n);return i.add(Xe(this.notifier,new Ye(n))),i},t}(),Ux=function(t){j(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasValue=!1,r}return e.prototype._next=function(r){this.value=r,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(Ke);function zx(t,e){return e===void 0&&(e=wt),function(r){return r.lift(new qx(t,e))}}var qx=function(){function t(e,r){this.period=e,this.scheduler=r}return t.prototype.call=function(e,r){return r.subscribe(new Gx(e,this.period,this.scheduler))},t}(),Gx=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.period=n,s.scheduler=i,s.hasValue=!1,s.add(i.schedule(Jx,n,{subscriber:s,period:n})),s}return e.prototype._next=function(r){this.lastValue=r,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(Q);function Jx(t){var e=t.subscriber,r=t.period;e.notifyNext(),this.schedule(t,r)}function Zx(t,e){return function(r){return r.lift(new Qx(t,e))}}var Qx=function(){function t(e,r){this.compareTo=e,this.comparator=r}return t.prototype.call=function(e,r){return r.subscribe(new Yx(e,this.compareTo,this.comparator))},t}(),Yx=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.compareTo=n,s.comparator=i,s._a=[],s._b=[],s._oneComplete=!1,s.destination.add(n.subscribe(new Kx(r,s))),s}return e.prototype._next=function(r){this._oneComplete&&this._b.length===0?this.emit(!1):(this._a.push(r),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(this._a.length===0&&this._b.length===0):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var r=this,n=r._a,i=r._b,s=r.comparator;n.length>0&&i.length>0;){var o=n.shift(),a=i.shift(),c=!1;try{c=s?s(o,a):o===a}catch(l){this.destination.error(l)}c||this.emit(!1)}},e.prototype.emit=function(r){var n=this.destination;n.next(r),n.complete()},e.prototype.nextB=function(r){this._oneComplete&&this._a.length===0?this.emit(!1):(this._b.push(r),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(this._a.length===0&&this._b.length===0):this._oneComplete=!0},e}(Q),Kx=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.parent=n,i}return e.prototype._next=function(r){this.parent.nextB(r)},e.prototype._error=function(r){this.parent.error(r),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(Q);function Xx(){return new ct}function eM(){return function(t){return uc()(cn(Xx)(t))}}function tM(t,e,r){var n;return t&&typeof t=="object"?n=t:n={bufferSize:t,windowTime:e,refCount:!1,scheduler:r},function(i){return i.lift(rM(n))}}function rM(t){var e=t.bufferSize,r=e===void 0?Number.POSITIVE_INFINITY:e,n=t.windowTime,i=n===void 0?Number.POSITIVE_INFINITY:n,s=t.refCount,o=t.scheduler,a,c=0,l,d=!1,g=!1;return function(C){c++;var A;!a||d?(d=!1,a=new fc(r,i,o),A=a.subscribe(this),l=C.subscribe({next:function(D){a.next(D)},error:function(D){d=!0,a.error(D)},complete:function(){g=!0,l=void 0,a.complete()}}),g&&(l=void 0)):A=a.subscribe(this),this.add(function(){c--,A.unsubscribe(),A=void 0,l&&!g&&s&&c===0&&(l.unsubscribe(),l=void 0,a=void 0)})}}function nM(t){return function(e){return e.lift(new iM(t,e))}}var iM=function(){function t(e,r){this.predicate=e,this.source=r}return t.prototype.call=function(e,r){return r.subscribe(new sM(e,this.predicate,this.source))},t}(),sM=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.predicate=n,s.source=i,s.seenValue=!1,s.index=0,s}return e.prototype.applySingleValue=function(r){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=r)},e.prototype._next=function(r){var n=this.index++;this.predicate?this.tryNext(r,n):this.applySingleValue(r)},e.prototype.tryNext=function(r,n){try{this.predicate(r,n,this.source)&&this.applySingleValue(r)}catch(i){this.destination.error(i)}},e.prototype._complete=function(){var r=this.destination;this.index>0?(r.next(this.seenValue?this.singleValue:void 0),r.complete()):r.error(new ls)},e}(Q);function oM(t){return function(e){return e.lift(new aM(t))}}var aM=function(){function t(e){this.total=e}return t.prototype.call=function(e,r){return r.subscribe(new uM(e,this.total))},t}(),uM=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i.total=n,i.count=0,i}return e.prototype._next=function(r){++this.count>this.total&&this.destination.next(r)},e}(Q);function cM(t){return function(e){return e.lift(new lM(t))}}var lM=function(){function t(e){if(this._skipCount=e,this._skipCount<0)throw new ii}return t.prototype.call=function(e,r){return this._skipCount===0?r.subscribe(new Q(e)):r.subscribe(new fM(e,this._skipCount))},t}(),fM=function(t){j(e,t);function e(r,n){var i=t.call(this,r)||this;return i._skipCount=n,i._count=0,i._ring=new Array(n),i}return e.prototype._next=function(r){var n=this._skipCount,i=this._count++;if(i0?this.startWindowEvery:this.windowSize,i=this.destination,s=this.windowSize,o=this.windows,a=o.length,c=0;c=0&&l%n===0&&!this.closed&&o.shift().complete(),++this.count%n===0&&!this.closed){var d=new ct;o.push(d),i.next(d)}},e.prototype._error=function(r){var n=this.windows;if(n)for(;n.length>0&&!this.closed;)n.shift().error(r);this.destination.error(r)},e.prototype._complete=function(){var r=this.windows;if(r)for(;r.length>0&&!this.closed;)r.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(Q);function nC(t){var e=wt,r=null,n=Number.POSITIVE_INFINITY;return Rt(arguments[3])&&(e=arguments[3]),Rt(arguments[2])?e=arguments[2]:si(arguments[2])&&(n=Number(arguments[2])),Rt(arguments[1])?e=arguments[1]:si(arguments[1])&&(r=Number(arguments[1])),function(s){return s.lift(new iC(t,r,n,e))}}var iC=function(){function t(e,r,n,i){this.windowTimeSpan=e,this.windowCreationInterval=r,this.maxWindowSize=n,this.scheduler=i}return t.prototype.call=function(e,r){return r.subscribe(new oC(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),sC=function(t){j(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._numberOfNextedValues=0,r}return e.prototype.next=function(r){this._numberOfNextedValues++,t.prototype.next.call(this,r)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(ct),oC=function(t){j(e,t);function e(r,n,i,s,o){var a=t.call(this,r)||this;a.destination=r,a.windowTimeSpan=n,a.windowCreationInterval=i,a.maxWindowSize=s,a.scheduler=o,a.windows=[];var c=a.openWindow();if(i!==null&&i>=0){var l={subscriber:a,window:c,context:null},d={windowTimeSpan:n,windowCreationInterval:i,subscriber:a,scheduler:o};a.add(o.schedule(Dp,n,l)),a.add(o.schedule(uC,i,d))}else{var g={subscriber:a,window:c,windowTimeSpan:n};a.add(o.schedule(aC,n,g))}return a}return e.prototype._next=function(r){for(var n=this.windows,i=n.length,s=0;s=this.maxWindowSize&&this.closeWindow(o))}},e.prototype._error=function(r){for(var n=this.windows;n.length>0;)n.shift().error(r);this.destination.error(r)},e.prototype._complete=function(){for(var r=this.windows;r.length>0;){var n=r.shift();n.closed||n.complete()}this.destination.complete()},e.prototype.openWindow=function(){var r=new sC;this.windows.push(r);var n=this.destination;return n.next(r),r},e.prototype.closeWindow=function(r){r.complete();var n=this.windows;n.splice(n.indexOf(r),1)},e}(Q);function aC(t){var e=t.subscriber,r=t.windowTimeSpan,n=t.window;n&&e.closeWindow(n),t.window=e.openWindow(),this.schedule(t,r)}function uC(t){var e=t.windowTimeSpan,r=t.subscriber,n=t.scheduler,i=t.windowCreationInterval,s=r.openWindow(),o=this,a={action:o,subscription:null},c={subscriber:r,window:s,context:a};a.subscription=n.schedule(Dp,e,c),o.add(a.subscription),o.schedule(t,i)}function Dp(t){var e=t.subscriber,r=t.window,n=t.context;n&&n.action&&n.subscription&&n.action.remove(n.subscription),e.closeWindow(r)}function cC(t,e){return function(r){return r.lift(new lC(t,e))}}var lC=function(){function t(e,r){this.openings=e,this.closingSelector=r}return t.prototype.call=function(e,r){return r.subscribe(new fC(e,this.openings,this.closingSelector))},t}(),fC=function(t){j(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.openings=n,s.closingSelector=i,s.contexts=[],s.add(s.openSubscription=gr(s,n,n)),s}return e.prototype._next=function(r){var n=this.contexts;if(n)for(var i=n.length,s=0;s0){var o=s.indexOf(i);o!==-1&&s.splice(o,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(r){if(this.toRespond.length===0){var n=[r].concat(this.values);this.project?this._tryProject(n):this.destination.next(n)}},e.prototype._tryProject=function(r){var n;try{n=this.project.apply(this,r)}catch(i){this.destination.error(i);return}this.destination.next(n)},e}(mn);function yC(){for(var t=[],e=0;e{let a;try{this.webSocket=a=new this.WebSocketClass(this.url)}catch(c){o.error(c);return}this.connectionStateSubject.next(n.CONNECTING),a.onclose=c=>{this.clearWebSocket(),o.error(new Error(`websocket error ${c.code}: ${c.reason}`)),this.connectionStateSubject.next(n.DISCONNECTED)},a.onopen=c=>{o.next(),o.complete(),this.connectionStateSubject.next(n.CONNECTED)},a.onmessage=c=>{this.incomingDataSubject.next(c.data)}}).pipe((0,r.take)(1))}disconnect(){const{webSocket:o}=this;if(o){this.clearWebSocket(),this.connectionStateSubject.next(n.DISCONNECTED);try{o.close()}catch{}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,r.flatMap)(o=>{let a;try{a=JSON.parse(o)}catch{return(0,e.empty)()}return(0,e.of)(a)}))}sendData(o){const{webSocket:a}=this;if(!a)throw new Error("websocket is not connected");a.send(o)}clearWebSocket(){const{webSocket:o}=this;o&&(this.webSocket=null,o.onclose=null,o.onerror=null,o.onmessage=null,o.onopen=null)}}t.RxWebSocket=i})($p);var qo={};Object.defineProperty(qo,"__esModule",{value:!0});qo.isServerMessageFail=void 0;function CC(t){return t&&t.type==="Fail"&&typeof t.id=="number"&&typeof t.sessionId=="string"&&typeof t.error=="string"}qo.isServerMessageFail=CC;Object.defineProperty(zo,"__esModule",{value:!0});zo.WalletSDKConnection=void 0;const Ft=Io,le=Cc,Mi=li,Dn=Zi,Ci=Nt,Ri=ui,Rs=$p,Ua=qo,Vf=1e4,RC=6e4;class IC{constructor(e,r,n,i,s=WebSocket){this.sessionId=e,this.sessionKey=r,this.diagnostic=i,this.subscriptions=new Ft.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,Dn.IntNumber)(1),this.connectedSubject=new Ft.BehaviorSubject(!1),this.linkedSubject=new Ft.BehaviorSubject(!1),this.sessionConfigSubject=new Ft.ReplaySubject(1);const o=new Rs.RxWebSocket(n+"/rpc",s);this.ws=o,this.subscriptions.add(o.connectionState$.pipe((0,le.tap)(a=>{var c;return(c=this.diagnostic)===null||c===void 0?void 0:c.log(Ri.EVENTS.CONNECTED_STATE_CHANGE,{state:a,sessionIdHash:Mi.Session.hash(e)})}),(0,le.skip)(1),(0,le.filter)(a=>a===Rs.ConnectionState.DISCONNECTED&&!this.destroyed),(0,le.delay)(5e3),(0,le.filter)(a=>!this.destroyed),(0,le.flatMap)(a=>o.connect()),(0,le.retry)()).subscribe()),this.subscriptions.add(o.connectionState$.pipe((0,le.skip)(2),(0,le.switchMap)(a=>(0,Ft.iif)(()=>a===Rs.ConnectionState.CONNECTED,this.authenticate().pipe((0,le.tap)(c=>this.sendIsLinked()),(0,le.tap)(c=>this.sendGetSessionConfig()),(0,le.map)(c=>!0)),(0,Ft.of)(!1))),(0,le.distinctUntilChanged)(),(0,le.catchError)(a=>(0,Ft.of)(!1))).subscribe(a=>this.connectedSubject.next(a))),this.subscriptions.add(o.connectionState$.pipe((0,le.skip)(1),(0,le.switchMap)(a=>(0,Ft.iif)(()=>a===Rs.ConnectionState.CONNECTED,(0,Ft.timer)(0,Vf)))).subscribe(a=>a===0?this.updateLastHeartbeat():this.heartbeat())),this.subscriptions.add(o.incomingData$.pipe((0,le.filter)(a=>a==="h")).subscribe(a=>this.updateLastHeartbeat())),this.subscriptions.add(o.incomingJSONData$.pipe((0,le.filter)(a=>["IsLinkedOK","Linked"].includes(a.type))).subscribe(a=>{var c;const l=a;(c=this.diagnostic)===null||c===void 0||c.log(Ri.EVENTS.LINKED,{sessionIdHash:Mi.Session.hash(e),linked:l.linked,type:a.type,onlineGuests:l.onlineGuests}),this.linkedSubject.next(l.linked||l.onlineGuests>0)})),this.subscriptions.add(o.incomingJSONData$.pipe((0,le.filter)(a=>["GetSessionConfigOK","SessionConfigUpdated"].includes(a.type))).subscribe(a=>{var c;const l=a;(c=this.diagnostic)===null||c===void 0||c.log(Ri.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:Mi.Session.hash(e),metadata_keys:l&&l.metadata?Object.keys(l.metadata):void 0}),this.sessionConfigSubject.next({webhookId:l.webhookId,webhookUrl:l.webhookUrl,metadata:l.metadata})}))}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");(e=this.diagnostic)===null||e===void 0||e.log(Ri.EVENTS.STARTED_CONNECTING,{sessionIdHash:Mi.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var e;this.subscriptions.unsubscribe(),this.ws.disconnect(),(e=this.diagnostic)===null||e===void 0||e.log(Ri.EVENTS.DISCONNECTED,{sessionIdHash:Mi.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,le.filter)(e=>e),(0,le.take)(1),(0,le.map)(()=>{}))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,le.filter)(e=>e),(0,le.take)(1),(0,le.map)(()=>{}))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,le.filter)(e=>{if(e.type!=="Event")return!1;const r=e;return typeof r.sessionId=="string"&&typeof r.eventId=="string"&&typeof r.event=="string"&&typeof r.data=="string"}),(0,le.map)(e=>e))}setSessionMetadata(e,r){const n=(0,Ci.ClientMessageSetSessionConfig)({id:(0,Dn.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[e]:r}});return this.onceConnected$.pipe((0,le.flatMap)(i=>this.makeRequest(n)),(0,le.map)(i=>{if((0,Ua.isServerMessageFail)(i))throw new Error(i.error||"failed to set session metadata")}))}publishEvent(e,r,n=!1){const i=(0,Ci.ClientMessagePublishEvent)({id:(0,Dn.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:e,data:r,callWebhook:n});return this.onceLinked$.pipe((0,le.flatMap)(s=>this.makeRequest(i)),(0,le.map)(s=>{if((0,Ua.isServerMessageFail)(s))throw new Error(s.error||"failed to publish event");return s.eventId}))}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Vf*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}makeRequest(e,r=RC){const n=e.id;try{this.sendData(e)}catch(i){return(0,Ft.throwError)(i)}return this.ws.incomingJSONData$.pipe((0,le.timeoutWith)(r,(0,Ft.throwError)(new Error(`request ${n} timed out`))),(0,le.filter)(i=>i.id===n),(0,le.take)(1))}authenticate(){const e=(0,Ci.ClientMessageHostSession)({id:(0,Dn.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(e).pipe((0,le.map)(r=>{if((0,Ua.isServerMessageFail)(r))throw new Error(r.error||"failed to authentcate")}))}sendIsLinked(){const e=(0,Ci.ClientMessageIsLinked)({id:(0,Dn.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}sendGetSessionConfig(){const e=(0,Ci.ClientMessageGetSessionConfig)({id:(0,Dn.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(e)}}zo.WalletSDKConnection=IC;var oi={};Object.defineProperty(oi,"__esModule",{value:!0});oi.decrypt=oi.encrypt=void 0;const qs=J;async function AC(t,e){if(e.length!==64)throw Error("secret must be 256 bits");const r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.importKey("raw",(0,qs.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,s=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},n,i.encode(t)),o=16,a=s.slice(s.byteLength-o),c=s.slice(0,s.byteLength-o),l=new Uint8Array(a),d=new Uint8Array(c),g=new Uint8Array([...r,...l,...d]);return(0,qs.uint8ArrayToHex)(g)}oi.encrypt=AC;function TC(t,e){if(e.length!==64)throw Error("secret must be 256 bits");return new Promise((r,n)=>{(async function(){const i=await crypto.subtle.importKey("raw",(0,qs.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=(0,qs.hexStringToUint8Array)(t),o=s.slice(0,12),a=s.slice(12,28),c=s.slice(28),l=new Uint8Array([...c,...a]),d={name:"AES-GCM",iv:new Uint8Array(o)};try{const g=await window.crypto.subtle.decrypt(d,i,l),y=new TextDecoder;r(y.decode(g))}catch(g){n(g)}})()})}oi.decrypt=TC;var Go={},Jo={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RelayMessageType=void 0,function(e){e.SESSION_ID_REQUEST="SESSION_ID_REQUEST",e.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",e.LINKED="LINKED",e.UNLINKED="UNLINKED",e.WEB3_REQUEST="WEB3_REQUEST",e.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",e.WEB3_RESPONSE="WEB3_RESPONSE"}(t.RelayMessageType||(t.RelayMessageType={}))})(Jo);Object.defineProperty(Go,"__esModule",{value:!0});Go.Web3RequestCanceledMessage=void 0;const kC=Jo;function OC(t){return{type:kC.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}Go.Web3RequestCanceledMessage=OC;var Zo={};Object.defineProperty(Zo,"__esModule",{value:!0});Zo.Web3RequestMessage=void 0;const NC=Jo;function LC(t){return Object.assign({type:NC.RelayMessageType.WEB3_REQUEST},t)}Zo.Web3RequestMessage=LC;var ai={};Object.defineProperty(ai,"__esModule",{value:!0});ai.isWeb3ResponseMessage=ai.Web3ResponseMessage=void 0;const Bp=Jo;function PC(t){return Object.assign({type:Bp.RelayMessageType.WEB3_RESPONSE},t)}ai.Web3ResponseMessage=PC;function DC(t){return t&&t.type===Bp.RelayMessageType.WEB3_RESPONSE}ai.isWeb3ResponseMessage=DC;var $C=Z&&Z.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),BC=Z&&Z.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jp=Z&&Z.__decorate||function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},jC=Z&&Z.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&$C(e,t,r);return BC(e,t),e},FC=Z&&Z.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Wo,"__esModule",{value:!0});Wo.WalletSDKRelay=void 0;const Fp=FC(Ho),Jr=Io,rt=Cc,pt=ui,WC=zo,$n=Vi,HC=Zi,Ge=J,mr=jC(oi),wr=li,Is=Ut,lt=Xs,VC=Go,UC=Zo,kt=_e,St=ai;class Vt extends Is.WalletSDKRelayAbstract{constructor(e){var r;super(),this.accountsCallback=null,this.chainCallback=null,this.dappDefaultChainSubject=new Jr.BehaviorSubject(1),this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.subscriptions=new Jr.Subscription,this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;const{session:n,ui:i,connection:s}=this.subscribe();if(this._session=n,this.connection=s,this.relayEventManager=e.relayEventManager,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");e.eventListener?this.diagnostic={log:e.eventListener.onEvent}:this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=(r=e.reloadOnDisconnect)!==null&&r!==void 0?r:!0,this.ui=i}subscribe(){this.subscriptions.add(this.dappDefaultChainSubject.subscribe(i=>{this.dappDefaultChain!==i&&(this.dappDefaultChain=i)}));const e=wr.Session.load(this.storage)||new wr.Session(this.storage).save(),r=new WC.WalletSDKConnection(e.id,e.key,this.linkAPIUrl,this.diagnostic);this.subscriptions.add(r.sessionConfig$.subscribe({next:i=>{this.onSessionConfigChanged(i)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(pt.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),this.subscriptions.add(r.incomingEvent$.pipe((0,rt.filter)(i=>i.event==="Web3Response")).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(r.linked$.pipe((0,rt.skip)(1),(0,rt.tap)(i=>{var s;this.isLinked=i;const o=this.storage.getItem(Is.LOCAL_STORAGE_ADDRESSES_KEY);if(i&&(this.session.linked=i),this.isUnlinkedErrorState=!1,o){const a=o.split(" "),c=this.storage.getItem("IsStandaloneSigning")==="true";if(a[0]!==""&&!i&&this.session.linked&&!c){this.isUnlinkedErrorState=!0;const l=this.getSessionIdHash();(s=this.diagnostic)===null||s===void 0||s.log(pt.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:l})}}})).subscribe()),this.subscriptions.add(r.sessionConfig$.pipe((0,rt.filter)(i=>!!i.metadata&&i.metadata.__destroyed==="1")).subscribe(()=>{var i;const s=r.isDestroyed;return(i=this.diagnostic)===null||i===void 0||i.log(pt.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:s,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()})),this.subscriptions.add(r.sessionConfig$.pipe((0,rt.filter)(i=>i.metadata&&i.metadata.WalletUsername!==void 0)).pipe((0,rt.mergeMap)(i=>mr.decrypt(i.metadata.WalletUsername,e.secret))).subscribe({next:i=>{this.storage.setItem(Is.WALLET_USER_NAME_KEY,i)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(pt.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,rt.filter)(i=>i.metadata&&i.metadata.AppVersion!==void 0)).pipe((0,rt.mergeMap)(i=>mr.decrypt(i.metadata.AppVersion,e.secret))).subscribe({next:i=>{this.storage.setItem(Is.APP_VERSION_KEY,i)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(pt.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,rt.filter)(i=>i.metadata&&i.metadata.ChainId!==void 0&&i.metadata.JsonRpcUrl!==void 0)).pipe((0,rt.mergeMap)(i=>(0,Jr.zip)(mr.decrypt(i.metadata.ChainId,e.secret),mr.decrypt(i.metadata.JsonRpcUrl,e.secret)))).pipe((0,rt.distinctUntilChanged)()).subscribe({next:([i,s])=>{this.chainCallback&&this.chainCallback(i,s)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(pt.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,rt.filter)(i=>i.metadata&&i.metadata.EthereumAddress!==void 0)).pipe((0,rt.mergeMap)(i=>mr.decrypt(i.metadata.EthereumAddress,e.secret))).subscribe({next:i=>{this.accountsCallback&&this.accountsCallback([i]),Vt.accountRequestCallbackIds.size>0&&(Array.from(Vt.accountRequestCallbackIds.values()).forEach(s=>{const o=(0,St.Web3ResponseMessage)({id:s,response:(0,kt.RequestEthereumAccountsResponse)([i])});this.invokeCallback(Object.assign(Object.assign({},o),{id:s}))}),Vt.accountRequestCallbackIds.clear())},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(pt.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.subscriptions.add(r.sessionConfig$.pipe((0,rt.filter)(i=>i.metadata&&i.metadata.AppSrc!==void 0)).pipe((0,rt.mergeMap)(i=>mr.decrypt(i.metadata.AppSrc,e.secret))).subscribe({next:i=>{this.ui.setAppSrc(i)},error:()=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(pt.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appSrc"})}}));const n=this.options.uiConstructor({linkAPIUrl:this.options.linkAPIUrl,version:this.options.version,darkMode:this.options.darkMode,session:e,connected$:r.connected$,chainId$:this.dappDefaultChainSubject});return r.connect(),{session:e,ui:n,connection:r}}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,rt.timeout)(1e3),(0,rt.catchError)(e=>(0,Jr.of)(null))).subscribe(e=>{var r,n,i;const s=this.ui.isStandalone();try{this.subscriptions.unsubscribe()}catch{(r=this.diagnostic)===null||r===void 0||r.log(pt.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}(n=this.diagnostic)===null||n===void 0||n.log(pt.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const o=wr.Session.load(this.storage);if((o==null?void 0:o.id)===this._session.id?this.storage.clear():o&&((i=this.diagnostic)===null||i===void 0||i.log(pt.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:wr.Session.hash(o.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0),this.subscriptions=new Jr.Subscription;const{session:a,ui:c,connection:l}=this.subscribe();this._session=a,this.connection=l,this.ui=c,s&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()},e=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(pt.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(e,r){this.appName=e,this.appLogoUrl=r}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,r){this.storage.setItem(e,r)}signEthereumMessage(e,r,n,i){return this.sendRequest({method:lt.Web3Method.signEthereumMessage,params:{message:(0,Ge.hexStringFromBuffer)(e,!0),address:r,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,r,n){return this.sendRequest({method:lt.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,Ge.hexStringFromBuffer)(e,!0),signature:(0,Ge.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:lt.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,Ge.bigIntStringFromBN)(e.weiValue),data:(0,Ge.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,Ge.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,Ge.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,Ge.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,Ge.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:lt.Web3Method.signEthereumTransaction,params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,Ge.bigIntStringFromBN)(e.weiValue),data:(0,Ge.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,Ge.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,Ge.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,Ge.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,Ge.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,r){return this.sendRequest({method:lt.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,Ge.hexStringFromBuffer)(e,!0),chainId:r}})}scanQRCode(e){return this.sendRequest({method:lt.Web3Method.scanQRCode,params:{regExp:e}})}getQRCodeUrl(){return(0,Ge.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,r){return this.sendRequest({method:lt.Web3Method.generic,params:{action:r,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let r=null;const n=(0,Ge.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,o),r==null||r()};return{promise:new Promise((o,a)=>{this.ui.isStandalone()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,c=>{if(r==null||r(),c.errorMessage)return a(new Error(c.errorMessage));o(c)}),this.ui.isStandalone()?this.sendRequestStandalone(n,e):this.publishWeb3RequestEvent(n,e)}),cancel:i}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChainSubject.next(e)}publishWeb3RequestEvent(e,r){var n;const i=(0,UC.Web3RequestMessage)({id:e,request:r}),s=wr.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log(pt.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${i.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?wr.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",i,!0).subscribe({next:o=>{var a;(a=this.diagnostic)===null||a===void 0||a.log(pt.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${i.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?wr.Session.hash(s.id):"",isSessionMismatched:((s==null?void 0:s.id)!==this._session.id).toString()})},error:o=>{this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:i.id,response:{method:i.request.method,errorMessage:o.message}}))}}))}publishWeb3RequestCanceledEvent(e){const r=(0,VC.Web3RequestCanceledMessage)(e);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",r,!1).subscribe())}publishEvent(e,r,n){const i=this.session.secret;return new Jr.Observable(s=>{mr.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin})),i).then(o=>{s.next(o),s.complete()})}).pipe((0,rt.mergeMap)(s=>this.connection.publishEvent(e,s,n)))}handleIncomingEvent(e){try{this.subscriptions.add((0,Jr.from)(mr.decrypt(e.data,this.session.secret)).pipe((0,rt.map)(r=>JSON.parse(r))).subscribe({next:r=>{const n=(0,St.isWeb3ResponseMessage)(r)?r:null;n&&this.handleWeb3ResponseMessage(n)},error:()=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(pt.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch{return}}handleWeb3ResponseMessage(e){var r;const{response:n}=e;if((r=this.diagnostic)===null||r===void 0||r.log(pt.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),(0,kt.isRequestEthereumAccountsResponse)(n)){Vt.accountRequestCallbackIds.forEach(i=>this.invokeCallback(Object.assign(Object.assign({},e),{id:i}))),Vt.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,r,n,i){var s;const o=(s=n==null?void 0:n.message)!==null&&s!==void 0?s:(0,$n.standardErrorMessage)(i);this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:e,response:{method:r,errorMessage:o,errorCode:i}}))}invokeCallback(e){const r=this.relayEventManager.callbacks.get(e.id);r&&(r(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){const e={method:lt.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=(0,Ge.randomBytesHex)(8),n=s=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,s)};return{promise:new Promise((s,o)=>{var a;this.relayEventManager.callbacks.set(r,l=>{if(this.ui.hideRequestEthereumAccounts(),l.errorMessage)return o(new Error(l.errorMessage));s(l)});const c=((a=window==null?void 0:window.navigator)===null||a===void 0?void 0:a.userAgent)||null;if(c&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(c)){let l;try{(0,Ge.isInIFrame)()&&window.top?l=window.top.location:l=window.location}catch{l=window.location}l.href=`https://www.coinbase.com/connect-dapp?uri=${encodeURIComponent(l.href)}`;return}if(this.ui.inlineAccountsResponse()){const l=d=>{this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:r,response:(0,kt.RequestEthereumAccountsResponse)(d)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:l})}else{const l=$n.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(l)})}Vt.accountRequestCallbackIds.add(r),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(r,e)}),cancel:n}}selectProvider(e){const r={method:lt.Web3Method.selectProvider,params:{providerOptions:e}},n=(0,Ge.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,o)},s=new Promise((o,a)=>{this.relayEventManager.callbacks.set(n,d=>{if(d.errorMessage)return a(new Error(d.errorMessage));o(d)});const c=d=>{this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:n,response:(0,kt.SelectProviderResponse)(HC.ProviderType.Unselected)}))},l=d=>{this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:n,response:(0,kt.SelectProviderResponse)(d)}))};this.ui.selectProvider&&this.ui.selectProvider({onApprove:l,onCancel:c,providerOptions:e})});return{cancel:i,promise:s}}watchAsset(e,r,n,i,s,o){const a={method:lt.Web3Method.watchAsset,params:{type:e,options:{address:r,symbol:n,decimals:i,image:s},chainId:o}};let c=null;const l=(0,Ge.randomBytesHex)(8),d=y=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,y),c==null||c()};this.ui.inlineWatchAsset()||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}));const g=new Promise((y,C)=>{this.relayEventManager.callbacks.set(l,N=>{if(c==null||c(),N.errorMessage)return C(new Error(N.errorMessage));y(N)});const A=N=>{this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:l,response:(0,kt.WatchAssetReponse)(!1)}))},D=()=>{this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:l,response:(0,kt.WatchAssetReponse)(!0)}))};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:D,onCancel:A,type:e,address:r,symbol:n,decimals:i,image:s,chainId:o}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(l,a)});return{cancel:d,promise:g}}addEthereumChain(e,r,n,i,s,o){const a={method:lt.Web3Method.addEthereumChain,params:{chainId:e,rpcUrls:r,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:o}};let c=null;const l=(0,Ge.randomBytesHex)(8),d=y=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,y),c==null||c()};return this.ui.inlineAddEthereumChain(e)||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload})),{promise:new Promise((y,C)=>{this.relayEventManager.callbacks.set(l,N=>{if(c==null||c(),N.errorMessage)return C(new Error(N.errorMessage));y(N)});const A=N=>{this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:l,response:(0,kt.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},D=N=>{this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:l,response:(0,kt.AddEthereumChainResponse)({isApproved:!0,rpcUrl:N})}))};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:A,onApprove:D,chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(e)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(l,a)}),cancel:d}}switchEthereumChain(e,r){const n={method:lt.Web3Method.switchEthereumChain,params:Object.assign({chainId:e},{address:r})},i=(0,Ge.randomBytesHex)(8),s=a=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,n.method,a)};return{promise:new Promise((a,c)=>{this.relayEventManager.callbacks.set(i,g=>{if((0,kt.isErrorResponse)(g)&&g.errorCode)return c($n.standardErrors.provider.custom({code:g.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if(g.errorMessage)return c(new Error(g.errorMessage));a(g)});const l=g=>{var y;if(g){const C=(y=(0,$n.getErrorCode)(g))!==null&&y!==void 0?y:$n.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(i,lt.Web3Method.switchEthereumChain,g instanceof Error?g:$n.standardErrors.provider.unsupportedChain(e),C)}else this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:i,response:(0,kt.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},d=g=>{this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:i,response:(0,kt.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:g})}))};this.ui.switchEthereumChain({onCancel:l,onApprove:d,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(i,n)}),cancel:s}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return wr.Session.hash(this._session.id)}sendRequestStandalone(e,r){const n=s=>{this.handleErrorResponse(e,r.method,s)},i=s=>{this.handleWeb3ResponseMessage((0,St.Web3ResponseMessage)({id:e,response:s}))};switch(r.method){case lt.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:r,onSuccess:i,onCancel:n});break;case lt.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case lt.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case lt.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:r,onSuccess:i});break;default:n();break}}onSessionConfigChanged(e){}}Vt.accountRequestCallbackIds=new Set;jp([Fp.default],Vt.prototype,"resetAndReload",null);jp([Fp.default],Vt.prototype,"handleIncomingEvent",null);Wo.WalletSDKRelay=Vt;var Qo={};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.WalletSDKRelayEventManager=void 0;const zC=J;class qC{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const e=this._nextRequestId,r=(0,zC.prepend0x)(e.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),e}}Qo.WalletSDKRelayEventManager=qC;Object.defineProperty(Pi,"__esModule",{value:!0});Pi.CoinbaseWalletSDK=void 0;const GC=Js,JC=Zs,ZC=Qs,QC=Jn,YC=Mo,KC=Wo,XC=Qo,e6=J,Wp=ci;class Yo{constructor(e){var r,n,i;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const s=e.linkAPIUrl||JC.LINK_API_URL;let o;if(e.uiConstructor?o=e.uiConstructor:o=l=>new YC.WalletSDKUI(l),typeof e.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this._overrideIsCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,e.diagnosticLogger&&e.eventListener)throw new Error("Can't have both eventListener and diagnosticLogger options, use only diagnosticLogger");e.eventListener?this._diagnosticLogger={log:e.eventListener.onEvent}:this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=(i=e.reloadOnDisconnect)!==null&&i!==void 0?i:!0;const a=new URL(s),c=`${a.protocol}//${a.host}`;this._storage=new ZC.ScopedLocalStorage(`-walletlink:${c}`),this._storage.setItem("version",Yo.VERSION),!(this.walletExtension||this.coinbaseBrowser)&&(this._relayEventManager=new XC.WalletSDKRelayEventManager,this._relay=new KC.WalletSDKRelay({linkAPIUrl:s,version:Wp.LIB_VERSION,darkMode:!!e.darkMode,uiConstructor:o,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect}),this.setAppInfo(e.appName,e.appLogoUrl),!e.headlessMode&&this._relay.attachUI())}makeWeb3Provider(e="",r=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,r),this._reloadOnDisconnect===!1&&typeof n.disableReloadOnDisconnect=="function"&&n.disableReloadOnDisconnect(),n;const i=this.coinbaseBrowser;if(i)return i;const s=this._relay;if(!s||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||s.setConnectDisabled(!0),new QC.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(s),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:r,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,r){var n;this._appName=e||"DApp",this._appLogoUrl=r||(0,e6.getFavicon)();const i=this.walletExtension;i?this.isCipherProvider(i)||i.setAppInfo(this._appName,this._appLogoUrl):(n=this._relay)===null||n===void 0||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;const r=this.walletExtension;r?r.close():(e=this._relay)===null||e===void 0||e.resetAndReload()}getQrUrl(){var e,r;return(r=(e=this._relay)===null||e===void 0?void 0:e.getQRCodeUrl())!==null&&r!==void 0?r:null}getCoinbaseWalletLogo(e,r=240){return(0,GC.walletLogo)(e,r)}get walletExtension(){var e;return(e=window.coinbaseWalletExtension)!==null&&e!==void 0?e:window.walletLinkExtension}get coinbaseBrowser(){var e,r;try{const n=(e=window.ethereum)!==null&&e!==void 0?e:(r=window.top)===null||r===void 0?void 0:r.ethereum;return n&&"isCoinbaseBrowser"in n&&n.isCoinbaseBrowser?n:void 0}catch{return}}isCipherProvider(e){return typeof e.isCipher=="boolean"&&e.isCipher}}Pi.CoinbaseWalletSDK=Yo;Yo.VERSION=Wp.LIB_VERSION;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CoinbaseWalletProvider=t.CoinbaseWalletSDK=void 0;const e=Pi,r=Jn;var n=Pi;Object.defineProperty(t,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return n.CoinbaseWalletSDK}});var i=Jn;Object.defineProperty(t,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return i.CoinbaseWalletProvider}}),t.default=e.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=e.CoinbaseWalletSDK,window.CoinbaseWalletProvider=r.CoinbaseWalletProvider,window.WalletLink=e.CoinbaseWalletSDK,window.WalletLinkProvider=r.CoinbaseWalletProvider)})(yu);const t6=Up(yu),h6=Gp({__proto__:null,default:t6},[yu]);export{h6 as i}; diff --git a/examples/vite/dist/assets/index-aa193446.js b/examples/vite/dist/assets/index-aa193446.js new file mode 100644 index 0000000000..d07db29835 --- /dev/null +++ b/examples/vite/dist/assets/index-aa193446.js @@ -0,0 +1 @@ +import{g as Be,a as Qe,b as Ee,c as ae,d as he,l as ue,n as Me}from"./index-5c4ca410.js";import"@safe-globalThis/safe-apps-provider";import"@safe-globalThis/safe-apps-sdk";function IA(A){let e=0;function t(){return A[e++]<<8|A[e++]}let l=t(),C=1,o=[0,1];for(let Q=1;Q>--r&1}const I=31,f=2**I,i=f>>>1,d=i>>1,E=f-1;let w=0;for(let Q=0;Q1;){let H=u+T>>>1;Q>>1|s(),a=a<<1^i,M=(M^i)<<1|i|1;O=a,k=1+M-a}let V=l-4;return j.map(Q=>{switch(Q-V){case 3:return V+65792+(A[g++]<<16|A[g++]<<8|A[g++]);case 2:return V+256+(A[g++]<<8|A[g++]);case 1:return V+A[g++];default:return Q-1}})}function DA(A){let e=0;return()=>A[e++]}function eA(A){return DA(IA(pA(A)))}function pA(A){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((C,o)=>e[C.charCodeAt(0)]=o);let t=A.length,l=new Uint8Array(6*t>>3);for(let C=0,o=0,n=0,g=0;C=8&&(l[o++]=g>>(n-=8));return l}function UA(A){return A&1?~A>>1:A>>1}function dA(A,e){let t=Array(A);for(let l=0,C=0;l{let e=h(A);if(e.length)return e})}function CA(A){let e=[];for(;;){let t=A();if(t==0)break;e.push(NA(t,A))}for(;;){let t=A()-1;if(t<0)break;e.push(RA(t,A))}return e.flat()}function m(A){let e=[];for(;;){let t=A(e.length);if(!t)break;e.push(t)}return e}function oA(A,e,t){let l=Array(A).fill().map(()=>[]);for(let C=0;Cl[n].push(o));return l}function NA(A,e){let t=1+e(),l=e(),C=m(e);return oA(C.length,1+A,e).flatMap((n,g)=>{let[r,...c]=n;return Array(C[g]).fill().map((s,I)=>{let f=I*l;return[r+I*t,c.map(i=>i+f)]})})}function RA(A,e){let t=1+e();return oA(t,1+A,e).map(C=>[C[0],C.slice(1)])}function mA(A){let e=[],t=h(A);return C(l([]),[]),e;function l(o){let n=A(),g=m(()=>{let r=h(A).map(c=>t[c]);if(r.length)return l(r)});return{S:n,B:g,Q:o}}function C({S:o,B:n},g,r){if(!(o&4&&r===g[g.length-1])){o&2&&(r=g[g.length-1]),o&1&&e.push(g);for(let c of n)for(let s of c.Q)C(c,[...g,s],r)}}}var B=eA("AEITLAk1DSsBxwKEAQMBOQDpATAAngDUAHsAoABoAM4AagCNAEQAhABMAHIAOwA9ACsANgAmAGIAHgAvACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGAAeABMAFwAXBOcF2QEXE943ygXaALgArkYBbgCsCAPMAK6GNjY2NgE/rgwQ8gAEB0YG6zgFXgVfAD0yOQf2vRgFDc/IABUDz546AswKNgKOqAKG3z+Vb5ACxdICg/kBJuYQAPK0AUgCNJQKRpYA6gDpChwAHtvAzxMSRKQEIn4BBAJAGMQP8hAGMPAMBIhuDSIHNACyAHCY76ychgBiBpoCKgbwACIAQgyaFwKqAspCINYIwjADuBRCAPc0cqoAqIQfAB4ELALeHQEkAMAZ1AUBECBTPgmeCY8lIlZgTOqDSQAaABMAHAAVclsAKAAVAE71HN89+gI5X8qc5jUKFyRfVAJfPfMAGgATABwAFXIgY0CeAMPyACIAQAzMFsKqAgHavwViBekC0KYCxLcCClMjpGwUehp0TPwAwhRuAugAEjQ0kBfQmAKBggETIgDEFG4C6AASNAFPUCyYTBEDLgIFLxDecB60Ad5KAHgyEn4COBYoAy4uwD5yAEDoAfwsAM4O0rwBImqIALgMAAwCAIraUAUi3HIeAKgu2AGoBgYGBgYrNAOiAG4BCiA+9Dd7BB8eALEBzgIoAgDmMhJ6OvpQtzOoLjVPBQAGAS4FYAVftr8FcDtkQhlBWEiee5pmZqH/EhoDzA4s+H4qBKpSAlpaAnwisi4BlqqsPGIDTB4EimgQANgCBrJGNioCBzACQGQAcgFoJngAiiQgAJwBUL4ALnAeAbbMAz40KEoEWgF2YAZsAmwA+FAeAzAIDABQSACyAABkAHoAMrwGDvr2IJSGBgAQKAAwALoiTgHYAeIOEjiXf4HvABEAGAA7AEQAPzp3gNrHEGYQYwgFTRBMc0EVEgKzD60L7BEcDNgq0tPfADSwB/IDWgfyA1oDWgfyB/IDWgfyA1oDWgNaA1ocEfAh2scQZg9PBHQFlQWSBN0IiiZQEYgHLwjZVBR0JRxOA0wBAyMsSSM7mjMSJUlME00KCAM2SWyufT8DTjGyVPyQqQPSMlY5cwgFHngSpwAxD3ojNbxOhXpOcacKUk+1tYZJaU5uAsU6rz//CigJmm/Cd1UGRBAeJ6gQ+gw2AbgBPg3wS9sE9AY+BMwfgBkcD9CVnwioLeAM8CbmLqSAXSP4KoYF8Ev3POALUFFrD1wLaAnmOmaBUQMkARAijgrgDTwIcBD2CsxuDegRSAc8A9hJnQCoBwQLFB04FbgmE2KvCww5egb+GvkLkiayEyx6/wXWGiQGUAEsGwIA0i7qhbNaNFwfT2IGBgsoI8oUq1AjDShAunhLGh4HGCWsApRDc0qKUTkeliH5PEANaS4WUX8H+DwIGVILhDyhRq5FERHVPpA9SyJMTC8EOIIsMieOCdIPiAy8fHUBXAkkCbQMdBM0ERo3yAg8BxwwlycnGAgkRphgnQT6ogP2E9QDDgVCCUQHFgO4HDATMRUsBRCBJ9oC9jbYLrYCklaDARoFzg8oH+IQU0fjDuwIngJoA4Yl7gAwFSQAGiKeCEZmAGKP21MILs4IympvI3cDahTqZBF2B5QOWgeqHDYVwhzkcMteDoYLKKayCV4BeAmcAWIE5ggMNV6MoyBEZ1aLWxieIGRBQl3/AjQMaBWiRMCHewKOD24SHgE4AXYHPA0EAnoR8BFuEJgI7oYHNbgz+zooBFIhhiAUCioDUmzRCyom/Az7bAGmEmUDDzRAd/FnrmC5JxgABxwyyEFjIfQLlU/QDJ8axBhFVDEZ5wfCA/Ya9iftQVoGAgOmBhY6UDPxBMALbAiOCUIATA6mGgfaGG0KdIzTATSOAbqcA1qUhgJykgY6Bw4Aag6KBXzoACACqgimAAgA0gNaADwCsAegABwAiEQBQAMqMgEk6AKSA5YINM4BmDIB9iwEHsYMGAD6Om5NAsO0AoBtZqUF4FsCkQJMOAFQKAQIUUpUA7J05ADeAE4GFuJKARiuTc4d5kYB4nIuAMoA/gAIOAcIRAHQAfZwALoBYgs0CaW2uAFQ7CwAhgAYbgHaAowA4AA4AIL0AVYAUAVc/AXWAlJMARQ0Gy5aZAG+AyIBNgEQAHwGzpCozAoiBHAH1gIQHhXkAu8xB7gEAyLiE9BCyAK94VgAMhkKOwqqCqlgXmM2CTR1PVMAER+rPso/UQVUO1Y7WztWO1s7VjtbO1Y7WztWO1sDmsLlwuUKb19IYe4MqQ3XRMs6TBPeYFRgNRPLLboUxBXRJVkZQBq/Jwgl51UMDwct1mYzCC80eBe/AEIpa4NEY4keMwpOHOpTlFT7LR4AtEulM7INrxsYREMFSnXwYi0WEQolAmSEAmJFXlCyAF43IwKh+gJomwJmDAKfhzgeDgJmPgJmKQRxBIIDfxYDfpU5CTl6GjmFOiYmAmwgAjI5OA0CbcoCbbHyjQI2akguAWoA4QDkAE0IB5sMkAEBDsUAELgCdzICdqVCAnlORgJ4vSBf3kWxRvYCfEICessCfQwCfPNIA0iAZicALhhJW0peGBpKzwLRBALQz0sqA4hSA4fpRMiRNQLypF0GAwOxS9FMMCgG0k1PTbICi0ICitvEHgogRmoIugKOOgKOX0OahAKO3AKOX3tRt1M4AA1S11SIApP+ApMPAOwAH1UhVbJV0wksHimYiTLkeGlFPjwCl6IC77VYJKsAXCgClpICln+fAKxZr1oMhFAAPgKWuAKWUVxHXNQCmc4CmWdczV0KHAKcnjnFOqACnBkCn54CnruNACASNC0SAp30Ap6VALhAYTdh8gKe1gKgcQGsAp6iIgKeUahjy2QqKC4CJ7ICJoECoP4CoE/aAqYyAqXRAqgCAIACp/Vof2i0AAZMah9q1AKs5gKssQKtagKtBQJXIAJV3wKx5NoDH1FsmgKywBACsusabONtZm1LYgMl0AK2Xz5CbpMDKUgCuGECuUoYArktenA5cOQCvRwDLbUDMhQCvotyBQMzdAK+HXMlc1ICw84CwwdzhXROOEh04wM8qgADPJ0DPcICxX8CxkoCxhOMAshsVALIRwLJUgLJMQJkoALd1Xh8ZHixeShL0wMYpmcFAmH3GfaVJ3sOXpVevhQCz24Cz28yTlbV9haiAMmwAs92ASztA04Vfk4IAtwqAtuNAtJSA1JfA1NiAQQDVY+AjEIDzhnwY0h4AoLRg5AC2soC2eGEE4RMpz8DhqgAMgNkEYZ0XPwAWALfaALeu3Z6AuIy7RcB8zMqAfSeAfLVigLr9gLpc3wCAur8AurnAPxKAbwC7owC65+WrZcGAu5CA4XjmHxw43GkAvMGAGwDjhmZlgL3FgORcQOSigL3mwL53AL4aZofmq6+OpshA52GAv79AR4APJ8fAJ+2AwWQA6ZtA6bcANTIAwZtoYuiCAwDDEwBEgEiB3AGZLxqCAC+BG7CFI4ethAAGng8ACYDNhJQA4yCAWYqJACM8gAkAOamCqKUCLoGIqbIBQCuBRjCBfAkREUEFn8Fbz5FRzJCKEK7X3gYX8MAlswFOQCQUyCbwDstYDkYutYONhjNGJDJ/QVeBV8FXgVfBWoFXwVeBV8FXgVfBV4FXwVeBV9NHAjejG4JCQkKa17wMgTQA7gGNsLCAMIErsIA7kcwFrkFTT5wPndCRkK9X3w+X+8AWBgzsgCNBcxyzAOm7kaBRC0qCzIdLj08fnTfccH4GckscAFy13U3HgVmBXHJyMm/CNZQYgcHBwqDXoSSxQA6P4gAChbYBuy0KgwAjMoSAwgUAOVsJEQrJlFCuELDSD8qXy5gPS4/KgnIRAUKSz9KPn8+iD53PngCkELDUElCX9JVVnFUETNyWzYCcQASdSZf5zpBIgluogppKjJDJC1CskLDMswIzANf0BUmNRAPEAMGAQYpfqTfcUE0UR7JssmzCWzI0tMKZ0FmD+wQqhgAk5QkTEIsG7BtQM4/Cjo/Sj53QkYcDhEkU05zYjM0Wui8GQqE9CQyQkYcZA9REBU6W0pJPgs7SpwzCogiNEJGG/wPWikqHzc4BwyPaPBlCnhk0GASYDQqdQZKYCBACSIlYLoNCXIXbFVgVBgIBQZk7mAcYJxghGC6YFJgmG8WHga8FdxcsLxhC0MdsgHCMtTICSYcByMKJQGAAnMBNjecWYcCAZEKv04hAOsqdJUR0RQErU3xAaICjqNWBUdmAP4ARBEHOx1egRKsEysmwbZOAFYTOwMAHBO+NVsC2RJLbBEiAN9VBnwEESVhADgAvQKhLgsWdrI5P6YgAWIBjQoDA+D0FgaxBlEGwAAky1ywYRC7aBOQCy1GDsIBwgEpCU4DYQUvLy8nJSYoMxktDSgTlABbAnVel1CcCHUmBA94TgHadRbVWCcgsLdN8QcYBVNmAP4ARBEHgQYNK3MRjhKsPzc0zrZdFBIAZsMSAGpKblAoIiLGADgAvQKhLi1CFdUClxiCAVDCWM90eY7epaIO/KAVRBvzEuASDQ8iAwHOCUEQmgwXMhM9EgBCALrVAQkAqwDoAJuRNgAbAGIbzTVzfTEUyAIXCUIrStroIyUSG4QCggTIEbHxcwA+QDQOrT8u1agjB8IQABBBLtUYIAB9suEjD8IhThzUqHclAUQqZiMC8qAPBFPz6x9sDMMNAQhDCkUABccLRAJSDcIIww1DCUMKwy7VqDEOwgyYCCIPkhroBCILwhZCAKcLQhDCCwUYp3vjADtyDEMAAq0JwwUi1/UMBQ110QaCAAfCEmIYEsMBCADxCAAAexViDRbSG/x2F8IYQgAuwgLyqMIAHsICXCcxhgABwgAC6hVDFcIr8qPCz6hCCgKlJ1IAAmIA5+QZwg+lYhW/ywD7GoIIqAUR/3cA38KnwhjiARrCo5J5eQcCqaKKABLCDRsSAAOaAG3CDQALwqdCCBpCAsEIqJzRDwIHx6lCBQDhgi+9bcUDTwAD8gAVwgAHAgAJwgBpkgAawgAOwgkYwo5wFgIAAWIADnIALlIlAAbCABfCCCgADVEAusItAAPCAA6iKvIAsmEAHCIAG8IAAfIKqAAFzQscFeIAB6IAQsIBCQBpwgALggAdwgAIwgmoAAXRAG6mGdwAmAgoAAXRAAFCAAfiAB2iCCgABqEACYIAGzIAbSIA5sKHAAhiAAhCABTCAwBpAgkoAAbRAOOSAAlCC6gOy/tmAAdCAG6jQE8ATgAKwgsAA0IACbQDPgAHIgAZggACEqcCAAoiAApCAAoCp/IGwgAJIgADEgAQQgcAFEIAEXIAD5IADfIADcIAGRINFiIAFUIAbqIWugHCAMEAE0IKAGkyEQDhUgACQgAEWQAXggUiAAbXABjCBCUBgi9ZAEBMALYPBxQMeQAvMXcBqwwIZQJzKhMGBBAOdlJzZjGQJgWHGwVpND0DqAq7BgjfAB0DAgp1AX15TlkbKANWAhxFATMGCnpNxIJZgUcAMAA4CAACAAAAWhHiAIKXMwEyAH3sFBg5TQhRAF4MAAhXAQ6R0wB/QgQnrABhAN0cAJxvPiaSANRyuADW2wEdD8l8eiIfXSQQ2AGPl7IpWlpUTxlDyZAAAACGIz5HMDLnGJ5WAHkBMCw3KUkgFgM3XAT+zPUAUmzjAHECeAJGEYE6zng1NdwCAQwXGSYLGw60tQIBAQEABQIEAgIAGdMCACwBAAUFBQUFBQQEBAQEBAMEBQYHCAMEBAQEAwEBIQCMAI8AlDwA6QC6ANsAo0MAwQCxAKwApwDtAKUA2QCiAOYBBwECAMYAgABhANEA0wECAN0A8QCPAKgBMADpAN4A2woACA4xOtnZ2dm7xeHS1dNINxwBUQFbNEwBWQFoAWcBWgFLUEhKbRIBUhoMDwo5PRINACYTKiwuMT0/P0JCQkNEE0UFI1ZWVlZYWFdYLllaXFtbImJmZmVnZilrbXV0d3d3d3d3eXl5eXl5eXl5eXl7e3x7emEAQ/EASACZAHcAMQBl9wCNAFYAVgA2AnXuAIoABPf3AGMAkvEAngBOAGEAY/7+rwCEAIQAaABVALAAIwC1AIICPwJCAPsA5gD9AP0A5wD+AOgA6ADnAOUALgJ6AVABPwE9AVMBPQE9AT0BOAE3ATcBNwEbAVcWADAPBwAAUh4RHQocHRUAjQCVAKUAUABpHwIwAHUAbgCWAxQDJjEDIEhFTjAAkAJOAMYCVgKjAL8ClQKVApUClQKVApUCigKVApUClQKVApUClQKUApQClwKfApYClQKVApMCkwKTApMCkQKUAnQB0wKWAp4ClQKVApQdgBIEAP0MA54CYAI5HgFTFzwC4RgRMhoBTT4aVJgBeqtDAWhgAQQDQE4BBQCYMB4flnEAMGcAcAA1AJADm8yS8LWLYQzBMhXJARgIpNx7MQsEKmFzAbkA5IWHhoWHhYiJiYWKjYuFjI+Nh46Jj4mQhZGFkoWTkZSFlYWWiZeFmIWZhZqFm4qcj52JnoUAiXMrc6cAinNzBEIEPwRBBEQEQgRIBEUEQARGBEgERwRDBEUESACqA45zANBYc3MA1nMCE3MA/WFzAP0BIAD9APsA+wD8APvbA4sqbMUA/QD7APsA/AD7I3NzAJBhcwD9AJABIAD9AJAC8wD9AJDbA4sqbMUjcwD+YXMBIAD9AP0A+wD7APwA+wD+APsA+wD8APvbA4sqbMUjc3MAkGFzASAA/QCQAP0AkALzAP0AkNsDiypsxSNzAkoBPXMCUQFAcwJSyHNzA6UC8wOl2wOLKmzFI3NzAJBhcwEgA6UAkAOlAJAC8wOlAJDbA4sqbMUjcwQ3cwCQBDgAkA2UOHQnATNz3QdFdQoqcwEEAM1hCXNzAFthAAUaOQlzcwCQCXNE3wBQc90JcwCdbXNzQ4CD8BW5tNbewS6T/Np1iIh1Iy3DtPDAAXjPx9ENpwOgreI1z2BewtbX8Yi21FG1bBeCk7aB4sFY/Hi+/ekcwwyBHP+f0YI9G/iFY/5bObtuyY4MTYyHeQiZ62eBq/P8+68/rJI6cCQTfucgoskxeeDzvfo6MGQtbufZbw0FPGPpUNSG9SSs7NDWGUbpnlDGReZvnpkqvyGbE9edMaFydt2lujOB9XLYEAXRfM2Kx0lHbXJ4cszHh5aoooqxDeYXz4qvSy3ahNyE6DBY8J7v31dfMFEdiyjfirJ6hX3Pa2ygMOeuVytsRijRhyF9mVnMu2RxuZv3hI/Amu/2xe54SmySPFpHGxTUY0pe8SZ3I+HauujP4GbIzZYg6enubuUlyP0funGhg8HHYTHFSQD9Hm7HGbFy4n0sziYcpwdArgmsyy41VMV2ppGXMiMR4deCi34NNmlnftVdxoyCJzK+r1GvJvWDtbf4dPnrf0G9qOgEs2CpD3n+1P6MHu+kHtsR6lMcf3NcCDlg2BVcCpSVRHQRiw7qolVbxHeM9xvBMbdwjpFKXi7QUZOi6YaKam2q+tP/4Q5El2aNNWkj5UfSZY4ugEdPUnNXG3TnvpCSZ5IpiIvjM/Q7pZNYYv80gD+OdT5J+D+8K7RPkhzH4w8mJHEG67poqLR0JygXeOe4Qz7fpS6uh/vOXaryaHpamD78JfCU/VdaCwy9bCrfgh13NQynhoIdWRr1IQREtBfsr9bRjkodN4IdiTUMDdlCuM8mKFhoQzu5fn+1PZwtWpT+RAfPcOYqFvyg15NH3r44CwuiNOuJa3QiXx/LenV02OWmQIs/SX/g9e97kXeFyzzC5o3GZEj1A4edoQL/Hfudd5DbKP9jRl8TN4J6Kc1PFyNVAX5Xac6bdFhUIzF/y2fxEOMqCLdbgMjAScVBfo62Fi65kWkU5AuSnpXNEa53A8jiHAFWPQRbvChz7XzIQ1/JFkW4oI8xBV6UfjKIPDLC7squNvW2nzcUx+fOUY3Ocin2ftqIvHfTUJTRNcd7Ke70yAIwvqOtwoyPaZMBpoXD8wnXXhGcZwxMUx5c5bPIUoEI0NmMFTasTLrC3msRFOTj05Bautfl1sY/SvMF/LAsyI9YLxLDyLAdk5DR3UM3aUic2osD5OeVdqZVW/Q1m1ebiFPdS2jIqNLulNQ8bGE2SLfELriR1KiTO9P5+lrvWYO1fSrGrUt2bWuylLbZPkwOvWGZpLOHyarck2ZRqWS6sCGey7WyzKtSLDf8N998dc1hh6BN4lUthsFzHww9KK8RpC1vUV1amMjRDMR+KvY6u8hOpZEzHdLMb13izFQP3ijwSQCEFVH7Js8hL21h1Vgxap8exSPY1CBI89DYkx6Tv5XhsKTqejQ6qbBFVPb0FeZ+D1SdjxYgqAq6uvJHq7PW8hluldBOJ7puqANPsXDOtG/su5LwU1PnRExiBpZNO+7blORJ7i9gQYmu2AXSSiKxSZIyyJ+0umdON6y4aPTTM0FbgQzMWfO3PXOymBuZ9DjNH4dcMJSwm9PsU05clrl3w1WkZ04jCxhragJpQ4w9q2B/PX0G25bXPNnUGKSL3EAHAUkcsOzO66BRomJQr0Z8uQAcdKYDE3iFkuZQy+yZq2C3vghrwhw2d8jCgn3V2SEF0Obph80afZ5zohDVBkZps5UEZmSaeyACcgZ6Ecj/Z3Shx0cxedqpF4rbvSD14by33Qb4gSiKqHx0WH7WjNWW+fZz2t1PtJAPWvC6IaLarFyTSGtiv46IG1Q3YMBw5bDrisQFBnBi22oUgsO/eSzcLI5+wpv1ZX3aTHBQ79qiLoPd5uu6JrnhGzEeM0/gRT5wwCJ6uPDv35Qi4MGUO2s9+aimuET6TexV/KC9BGv9ibvW0+9hFedmTLXfrk2/sgHRe5wZPR6ao7kFwN3Egab8d2ApFPLOUgTY+d32/+XKglFsszuassqJBzo6MTbCwlYKO4yYdfk2gfjuHXxxdIjaUUcqePg/jf4AWUOsz7EjkKaPqLCzwTwkuPoskO+HPvSSIj56NBqwhlukh/SUlBPCAvpc+1hWM5aIt7e+NWicwHeXmf7JihSLmAxjDWNDmv6lSpQAYgl3KGYcLR/SwD/UbzS+YBYGKLhVlwwyGYf2autLOFuC7hdVncxFH6lx4+53/q/z8ukeP5C9jWhZLQvvvXJkWbnwQUbH8WW8VDTl7dYYgEw/d8e8PZVIP8QO8aJwNBObbcAh1bZg/ev/mIcRpHqvapWZBZJccfvQ55WYxxTdBLqYbSDjLNfI0d/IB7j1JaX07Z1abn2SGfV7zm8TU65Tqui5ZG/m8fTS7ZJVkQbJqcHfdRPbFKgIm9Q6lqhbspKIufB0JN5lyRQHiZp5cOyRLL44fHhfM56Ukt8hCMN0cSOYZcp5mvcoAcpVNPjMcA/siqAhaIn3EO6j0+ArsfN/wEexl90dGjecxE+R4JAHU9hBGZrDrJJ0L3FasUPVvPdmvrRUYY0LSEJpgUBo4pykiQr4GRZ9cAVKhzBxs86T9E+h0iOclANvJaS1ozReL9coKT4XJH2R15ed78yO6xqF3vPVSvwW+hApUYHspT4xNknEfEBks2ZT80sBfcq+kKqQeraVh2FtwOkIyPZc2PIZqDVqS2OfSXUEJ+aPajbV+aVHDMxPd4ak0ln8Lm3mlBsJjoNzm1LCOw1FWMbUNFmAyj82fesmdYwbtO9hz97ErIjkGBD8ojAOzSZzPT7bq7FxmZzdfzjVX5lq0DgHNm/HtOP0Fha40VmytaL4VvkkkmaH1vfbxgid+hNPqf//ggLAH9wOu9cN3TPGf7RkhvnFBg9Ue9dEMIY0QnUn6WfZwgFnf37KcfXeA/7qvv2NJesfukMgngn3pyJLjhbJ8DGZvbF61Q19ZVHZ/HfiOf3XZwiD/xlEDb+fuGzUrWRq7IMm/Qsd6SJc6Lqt4i6YC+L5h62FwYHiS63//p0lyL3iAb18QEPtnpbEUty0Zrt0fktA9L/YFLfrzYT6atdQjL6OMhCrZ4O3UUaYR0yme/4GNO/yHHufyAVpH/OIPEf2OzptXJ19+tA+NpivJNqCKOwUsJHqTzrT2G77O9dBe4ZcGyF0mPkzzJEpTJOjkgCt47TXZnFahlCXR9VbZ0lb1c1wAqXTKUqyPVaxz4Eu3rPJHiM3IXQQ0NjTvzUPG258V7vbrgoezETHlADY7B1WeyNMFYVE/LaWY7bSfQb7lKJ/KMRmoFwCrkwMEEkDen5KTEXCfVJrN+v4OeBxxE44mtzJOKdlLb7tqPfXrxftovGQyuaJhwlI3qpYBgfatKX2BJFeGTK5b4b9aSrMIv0QoyWUKQxoWaM41bP4QW5RbSawNQdN/0wv7aL9Jkk5J66IDpo7KQGXAKznLFeMn7t0F83ZTXPCDUhEjgWM2SA9ChmM5YEHa5l1hI1fsf77dxeRWfVHKPsN3Pbl3Dy5b4QIYb6N4Pm9jAAQLmQlaBBhZw5Ia7PfQ+xKgKJFQbR4F32mFfupbsbWLM9jDeqYdACLyf6uAKgVu9AJQpYtNbCj5wj9nXAWUWbWQL1cXcTXoVZqxjtyS/BsoaURCQi3dk09KVzUA0V6ZlrQ53Kj5AnQOcl+5F45QK+I7z2+zhbRVGq2VwcLCugx3BCQZwoiwsqtS8RQRixu4k8uRiaKZ/k7rmghRah8nMGZhmN6r12o0TqdMaPiD/n4TLE9VhVaO0KPZEGCIhU8QX+UXBAqICxssIsyKn1OrvUgTYYTO4jXEpu2+kVS6L6T5gjC1tufk8YssX4CRRcvyMaWoJuzmhC3Bq/DBUCuPaMuhQPIQfcmps2oqp9AqlngtSCo26+n5fKqSzEU3lpH1SMPRDrw6OdD/LhpNrs1YTHgMmP068bb8qMgF+/ASQedI7CvWdu04rAtlsP7kSnTDkyMw2LiZnpMx+i+ayXB7c3ckJcjFuig7H00vq2OQzM5PPevRdYi+cZJifcz1t3cNSD0yuvsuFXD/Nk2j60H5RpUU+Zrlp99wSgKEAkuC8nBJJnZ9PR+DkXPe3s4UeOKoq99964VWB9Pnva6uKI779pgq9oaspNcGV8vSOMCM8ACQn9kUPweu9UwI2n5+goo05CFaR5kALF5jhYmybPavdtAxmaC//LVF0ZLRkIcU+NGJzY3OdUKILkQKUDGABumIZHHzKw/jCOmPL+Zl8t46Wkz0WFvi9Gu4zuSn4okuXcj0BSeDVzHIf7sqCBjmC4zCJ+jyS/+Gq2fPUkgfW0bxdgVFMY+zY3TQuMfygLLiF9MzfKQiZXIgzRm4z85AALjRtWp3nO7kFP7ApIqqe2zn0NfjROHgw/hqbhgKGKjsXzu+rrdu5HeSlhWO8hxwDmVaQObSdcyTFMG/YiFD6lJGKdFb4NNS1HnW8T1P6nNQPqraOBTSnQKxz5tTGqNrbaAE4Iio3Cj50ZUqo6/O5OAtJ6Bznp4gKMgBetgD11fCO++j1RdcFdTbD0tkgfxXgzJTUtWCUmdYjl93RR27ifZGYzgK23MdwF4zvKNem782m0dQnmh47Rxz3+2MVhiiS85nTOXxmaODvzAWBE2IQowSrbzE12IJ82fOrvritWvRIF0aLCLdEytK+NVdDxLvmdW+dFeKOa/ocw1Son0O6OzX0lBLmjYSMQSrFe5X5yf6WE2ehsLrv6M8Cqjvwr+u9X+kP/f3iAk31TV+K9yZKQqAn3QOWy+9Hz7iVWRMuM9hs35+avVy4pXASFbOjGdXM1fSQkLOWmFUhyadKWYPjRZoZo0g3CS0qhz+mjygAvmtkYRBcGNpYAEYoIDEwQaswtATb9HLzTetQL8aK79YSb0vJNPSYzsij3FcXbmfnMiaOJIGrrBJnAPRqg2lmCZFXOFah9l2GRBm8HJMGeiupFvR0aRN41otN6X6tGTxS53wk+2+w+Q5ABTdCd15LYZm/a/3bxe9RDQJ5HZhLzr5x1ccTkxBkbxlYBGd8AKvkL2IR3V283R5noyhAM5o/2rKEi4U6kxCV5efr8llvLFrgjPIwS8iES5jxmV5zyPzj7TyzJTJze+9tgDNGYRyyXPkU4mtAh8XUy9vMigfO+1+ZKYW2WCFjDUfvyNiplha4LliPPg8Rc890ZT+F9pMYPAmEg3JJVUm3fp5N0IPNMAYKmbdj8dkIpjDhDJUd6o3G858DgYwPhSC+z3a78QpEmqq+tRaHEcQ30ZN5KVVdASN8NMTnLKoA+IJdapqCRgooGTkhyjB1yEmjSy52110hPaqe1upiUeObsTXtGELTk2p2NZw/3PzU281tafWNmFUPAmooj83DhoQgKPIB7f+NGTDlTOtyPgN8pIB/lnFLL/gcwigZPKDW7p6hnW/GnAzyNS46gLJAl0Eyhqx6UWLeQTU7odMYORK5zf/FV79JGVPOQpNUA58rlB0ugHsyeub8Lnf9QQ4/N5sRKaUjEEhdpF28vfgPZACBbg5UHuVHl8Lby8mVGsrtI7TjL9U3mbtcF+cXQI/5AxT2i0MyciXEKZ8OjvPoQHHU/YSnCXtEp2r08SJxUAHIz1zM+FwdRCYPffQNi2NhkPWTiYTxJ00WVZIrHwmG7jzOLcfWnquJkpOmdPzXfAu+s5EADm0X4VmatqLjVa86dS7Os55qXuRa1Y7dWGvv57LjBlKKgqsbI7lwfyBN3qkKBqe7nwUDn6xqhGPiUPT7j7s+oD52AF6oj6SFXhYWlRXy+1FL7YSbjFxfFvJt5tVXMAr8/voIg8YRiBsKB6eLeIG5Y/KmGmFBxxYzSH7W0IaK3IId+cBlEk6H3Y5BqIBfvhOOBtInLWnsAoRpqlkxd7o/+LP9UXEahdcYlifFlURgUJl0Ly6LHjSZN1CfHB7OORacnBdpIM1lRpBcvwkeyXUvndU4zrfqwtuBEpxqvk4PZPJMByJXUbXie52mfUB689h9GRV99U4gzn1aTbHPWjbB0DQ0Aes2E/ZzoCTxCef56sExSu8ynaPxuDOOeD31OWT0zHo1XxSPQbclDivD+4/v1aWdhGXLR1Ui+NzuQK1NTedznX44c5T3b+2GZZjl5RqH8KR7FTVjLAXvg64Gpc1RROH24J9jrNDyvrMxY453DRUjZ/K3zYJC+M1JxcvLkuZALsXVQ4Z7sj0EuLbRnhTKzRGwFrpXcixvnCgRbJrCl3+RjyWVipph0VLB0nDop/tvjfFmysZ+d2/k6baJMxYoqnE7PFceicrxUYyoJ2LMxicgJqrgvSR3mNJTkvfTU8BIoZz3PpSIS+Y7Ey3MXecxcxYZTeX62egI5Nub2z8Bj4Eg71YCz8Oiapkinw4RRlL+0c2/6jDqc8UK4Zzi1X4aIpgYsPJQOEz2YWBdvH6z5CuY7UvWK2F0Mg4ofRVBArX1p9Gv5VLqWYyL/raRVWkPNI4FEv9+ePcdmBSQR4CFSO6TG13hIV+cm1dkd0/Nt3r28H4NU2knSniDCeozM/Btc4i/ni4H83S2/ktAAvUM7UKJPT+RO8LOlvxhuI8HQmAuJCzVH23R/0JovidxgdJ7g7whCdVQa9/TLFUJWmNSYAaPRAXW/kk2UBmAz6f6POK1zcMlmI8P9tqW2qVXABN0L0zHarXbWHlhtYpXMEda/pIHLwu8RHqmWWMgMzkyKicSFKK10UvZRdcO8fCiSijtFIY8qW7CscvtzpP92lm+c648urehw35v1EOfO3kdny+CQm/Y0u+zPuevhCrQKhTsUq4G1rNPoGuVzvhf2Ui1f8jzvx9fJbQR69A0ETLUUC2ndk1YFQNi22yLwyZyw4xU8P3RGLM5qojKNwHAZAMAEudzg8UdfV6i4VktOLbhhHUPqpCn6dtpnr16rINs5hWJGMYXaEn0irFCuoYnJEVhdJ4PZLKuTkrP1UUVWZ0SMgJ3F2I8YRhtLwK4dhh/oKk0hdVgEH/l2/0c+cLlF7kpDuF3lC4fsFw3V0QrwH3GLNb2waS18OmYB07yaLEqhd58bSaGJZzePoroV5v3UK46/sWdKczstFIiYLmmKeaVGRNo3IWk+dYUqWy5aJClXj5tf/v47ijlkmMDP+ROUxoGk7LFzne4/0CRPl/5SUyOa679jibvdVQFZ1o0H9kBux7OSC9B+qVKE1trxr4xqTkjc1ZGZBpY0zyKBiu8wr+/KXc37u0cdXGJwY/aTic3kGj4jt3y4ZwleKskyXMFHKGwVhqpFH3ba02boSzGHyPMAe/reVqWSTT2Uz47+uYvHZGNASqYQ23uZoxalHK+PGoH9trTVaw2KB4dH8fNrXRLhiyxGdRtS0x8k3feeOvsOdKEdaOf3IrfWCZM/n3+hVJizA4zoX8MzsIf6bDfuFXIIRR2RN0rICZcMRmnRxUXT+YMOid50gg+Nt4Uucemmbd9kvJG/O04PVC0vm5gGDlIY3THI2+l1rZcMOuSDWBp6I4Eltp7naHZCdaPUWnQ07VqO49znDgCmtu5Tb+SSEQJV+rJsiXgCqoeeQciher8cqF616P8qlZeonKihdVkj+RTnjOcnoERWubvyaeFO6Ub3dhh0qmm2RD4enszxE1JaAaiezuSoCayJQP931HGcy0NmuVr/UV0pvbwICLpBbVkxC6qebjLGRXucTG0dbQDFPz049hMem2pb/FOTGYRLR0uPCa0oIwc9Z/g+Iy/zYFDThHi1cqbK824savKGMLMj7j87RT9NMwxaI0eKTfMFioi9SyLq5sN9pV8be2FrOc7xMOdv6btXyqFx63y9fIGMBP2T9Wmeeg61ZGdTE4IwybcGlXLJ3qLbRRpQ8vSzcqFobN+QPtL+51hadAWtRbF6aJpeb7Gca4/Ldh7BDvEbrUuEm+gTyVMeRQ3Ypf9uyFjVstrQIcdY+aur3LC5I5OOnJck1zLUKxLobjy9slG3hv6zylhtKbAbpX5p8Hc910fCT7FNH5/t9xEJX9kkeZ9IMCHAk9zn7L3pXEGZVvdaf85NtlemPpY7iSgSC7zRGsI5W6/UEwX6jDtNVZ9VqPDBe/EqmEEsGcs7jZPQPhi3xpj9UXWQLiy6tsxv/ft9aKQnUg0Sps/x3AZ2uK3ETGTQogPTMQPOnoU6p5KuS3uY6DfW0GeGQ1wNpGzGoUdRJRvHP9MDQpWRSZqZkE/rcNnQ5lS9BmMDW/umgZQD1C2YXfZMy7fIVXo121293Gfx9n7DQP6OxSqiSTNx48KId9kfGYOnV2Wg2TQQywNBRB0mSmqa/jwoBDYVDl6B0XFrVEAwbnhLyqGp5BH9bzsWrrFlu0x285RpqTylTZk3rgcm57prav0DUAKUd02vXdYyNBf7sfX7VYn0Syug9++ey/dHoG7GQzMbhXhtEuRXv6YR20SQgSOrgDUGPR4HhS+Qvk2zOtyH8N/lHYfQxNKt/f7uCpsBBh5eGZaeWNRTBdOObWOvyKJMfD8FLEX1v/5ywtRV27weRzSNaHEQFE0hIzzS4VPzgWtg/4bcetwXpabsePP192muNPyXiRzRZkoeudA9D9x/oVWfRieLfjdXbi/41RGNB3aIj0IxCBHSvUN7LzntO6Oh910zV9u4Glrouyr5odjs8/fW9r0buiTMWTjjLbi2k5tZ3m/134ci/d9f8zuv+4BI7F13Mjb7DTTD5ukfqNTlNC4V9PnfbGAJdKLEDJgBPKyYXCaAL9U5Cxi2j5j+IWmNg6NSnWcATzmOO4+dNBmefy6ceyd8J9/Q7amUWVVkuNVSq3iWEb3UJP7kG+P8wfL4xS0ZNuSKYuo9KpdkJ3b4PYRNSzF+8OXKDWqXuWsan/wconybIRBoGWHMuCkb35BtGfiqZ4hc2CCapKiLmrWnBLlRT+9GA0Qcykkg1B6C3kESJMu2dWyGabbhRwxUeMxARHqbXzHmHpr4Z3vmOxHZ6b1q6MJ0Vb/XKkaPF4xn/VindEJ3S8/9xcGF+PNFuAXc2Jf9uZLLtjxDAEeohd7wjie66LHvcNT0UpWif4uCox2YR/liegMgx8vEbvQClJBMBub7zJQMCr1C/Vf8siWQASp0Ewd7D2uP6f9YTISdEaUAzF9rST9JTHxez310BfdgtWKU1ZYoRuDZvGn2tj9DPjXrkgCr/13OHsP4MOC5b6YqHSedYMW9bEfS5M3nO7zTGS85BzpLTIFqAGhZJLEyLFcZXS7hDhDYVvlm10RLEslMK0cUL/9xqTMOX2iR65umsC8dW4hT0Sg6Tf3T2HAxsHKcNzoqFwuM9k3/LpYekhRc0C+f1I+vMQ4thkfSotx9GUt/cdRosaE8XwqV0k+8ZtU+jv8nn3lbcNxfXXKi5l0SL5kMmrCdrxeVVqxBobrFF+tb0wtkN+DMm88I4jWH/DcdJOjcMOLEsN70vlsfIi+NexpaT0ZsnfewPoTvUSXqqfhRcRk3jA7AdYHEFk4l6O3fe65uZNIMf1lbtJNCNaK2+c5hGKLcTSrBmwWv9TP6JDfZ6UY96g4baayVCbrDpXePgXTG6xO3rT0DAXG9OuPxkSEPLJnqxQViyYQhCp36Q2yFpF6cR04RO7Ab5HPrECqGR0Fnr2gzmjx49XjQf8N5Bk5XH0dh8NOoB62acHwMhlBM8duW9tghc7CN7oz91UEyd8fOtwDK/j7SykdllCAN5kUrcawufMV9y/EqUoKHtP5i8MgQY9RlZFZzi0BeT9Ang4mMIvWAFChZCNnb4tT5cS20jeit8JEN4tz4mUmZxDwiWkEucI1KF/FyAnvE4wybWvbaxBYjT2jdhlzd4y/eTmTl3im5YImADc2unOtmNTcgMdOb9kUgJmgzY/hDaAxqvwLEulLsjq0bsfSE3tRYCRn6xb0uv5B5yFshhewdO5KgoLcaGeqeg0pa9k2RXM32g1jE1UDWO0CaMobavPk+4u26Tmgg6VindBdYdRxpGqlvkxai0K/atC5CWUxlHuukX5b+hg83khzsZK7AVRVptyVNicu0sfQToTDEeIeDdFvDrReJUiJGZcXAhpRL3OufhL4aDfO1zsCmfGq8qFspBiJe13lgS9GguiMsdmgpWOhHkSTVkWnMOnUeIJgqZks/AwL/1yKPm00t6x6qLXQrCJrysUwR+ILJdyyyuUN4BuEtCDUXMXPU5srsAnDUhSfFM/j4RK+cK01o6lXAVbhiOLaaQtpYN6mCOwtJNcVqEpyrxXuWxvE4mbVCytBu/qKO4X2BI1NUSlj/g6FQEiYsXMAQuM9wnHngXKLZRWFHcgroF7URRzLPrMQUfALjbga6S+tGc3Tshv6PA6xeSqRPDbLG+X+0qt9crNzbaxGbStSCfYhdRY4t5BSVY9Pxl9trcYFiUdsV1BSwaZM5u8K+hUm8HV6PoLD/jlsRRzgUq6O+Qw3asFkTKm3clSTo8VtXdpTdzFAZP+tVvAjkfGq3MkSLyTYi08pvQ3h/L9o0JpUnnQeKxXk3qIsGGsH1BXzcZT+voCNv39FSdg6gNY51z9Cyq5Dql8wER5ylTwnLVeHlHAn/HNwxGYeUqrrc2gcmIybVKVD1XAPXjKks2+oHZk4OXYP6+LwVaFEApqEMyEusTgVFTzdjVa2BAaELvpyVhOSMW/ae3NwMfWId4Ue28z5IzumOF/CmY1GmXBOWBf2hgp/r3qS0GU7nGETmj+7Tudbjd1cKhgP39tVtWogjxHt6NLXz8OCbV1nIBG+mmrrZDCbH/o4Vgn3gZkRkq+iHOVW82LunJPXBZjX/ntmptWsqP8nDZBSb3TzAD4vSQeQ1GmtgGWAYfB951YKUnFVJb0z1YRjQqVksL5VpD4N/Vy31vtYY/2g9TmyMADPgCwwA6MhjQ9bd1JFJ3Vls7lD2RYjdIwQwhWzBRPfrxpKcYeu03F0/odRbEc9RZ11TxVY8mXqgJx/vDk0eF4MPV7lgBxYqxoGfEtGZBC1kZlxbcez4Ts4/TuXJ/QsfWT95Fwpc4CtiGCgU4i7LHgoDalqmBabvzV5xvq2pMVourJYZ4paytzilEG+lADOGx7qf9O5/4cP5SqyTCMG4I16I/6I5o4Y/QkWX9ctABry/8Adxz+ZB8AI1yUyNXk1Z073ECiDJ1EuVT69eIDEAlbnv24j4DJGeqIV1b1GDCHJ+OFD4W0gXUs/1bMkNESNKl2ON6DZzAXvqmr8X68yRDgIReKbX1SUwtzYnyadBLhEWS0WTE7T1IxC2SHChb1NFD+2rtJSN8OPTIZRqiizaoh7OSSNpBXJMkKcUQZV8sXw8VkU5ea8j0WZ/YK35loUxE1aG30SL/JYxZWlUenDyKrfbHWJ+z6JOsV0e1Xfw7VGavtHACLwn0tTG9e3lf++w1MCVjFIyU57uOlbTkUSnxAjzmA71qvjTzHeMDWcK099tm9rS8cnfuwxq+YRWANkfmLbCl+74mg4bccPsNY5zz7cjbaFAL0hAwId61yM5uqhMBr4Wcew3b2spG5tkKFOnADeXkGkH4vk+f+an92mWXemOFCpjRsFeEnPEAIsLemM3QfMoME5/w+7Y48y/SvkBN6/KSRVmB7/rHiW7iVkXF6Y1T853OaDg66cIfWkD5TqCDugrlaXlEL1fFjxPoKRHkP5GD/xDiscNH+Dp2fXEKUpwAvC8JTNC+k9JpaMXUB7oj4p77qiAOjXD2pT4v/v0Ukid02LpuYsS7/ScDL1SxB9hxxbkeGOMyPyL4HZPAbyagOgP5Xe2pCqMPyj/KJ0blDHzFVBqzeLIO5D4yq7IpSi9p/QlHa50sCHzGoMqrBS8l9IfRyhq8IDQtOZzjgdvgQDwH7cqa/sybwdfcQse9THS08maKkkgnOi0ShO8Gyf+WL4K9DX11CF9uIbVwJUaCv8r/6FDVOdsEjeumisIJlLJQsjjkEL2QfEc68oqsevnNAEdp4YMJivwBJnE0R2GiBFRTJZNkq/MHDP9O5unQoRoivMJkPm+A0K8CQNXL6V3apC4ROBTyJSW9oOGNF4YrwoTFyz/pexIkeWQADpi+M7q8gBlmGRUune0k7cXyacdbOsD0Q1JQat9T8nmHhyO8PNd2k4qjZsQCs6lEcmaThpVUzGzWOJQGGf2oz7+F/bMfUMARo1PD0/yIhVDK+8MGRo/uByG5UAwPfNeHAd09gkMFpZmTN2rZgoqdSjwv1SbFnFRAqYuzwW8P4+Rk9fE3PVu80HKcXyIEvPfit+o+pnlHDUKKo32HapcVtQhsNiIdH80j/lRnJ2y5RYRbECyY4vl20j/NiBAD0Z5jxWWiL6xAZIonSEJb1qhwmdRp3hISLL9Q1QYOt6C/OixU3eUtXblgBu+fGPAQE0o");const Z=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),W=4;function LA(A){return A.toString(16).toUpperCase().padStart(2,"0")}function lA(A){return`{${LA(A)}}`}function SA(A){let e=[];for(let t=0,l=A.length;t>24&255}function nA(A){return A&16777215}const FA=new Map(tA(X).flatMap((A,e)=>A.map(t=>[t,e+1<<24]))),OA=new Set(h(X)),gA=new Map,x=new Map;for(let[A,e]of CA(X)){if(!OA.has(A)&&e.length==2){let[t,l]=e,C=x.get(t);C||(C=new Map,x.set(t,C)),C.set(l,A)}gA.set(A,e.reverse())}const L=44032,b=4352,J=4449,G=4519,rA=19,cA=21,p=28,Y=cA*p,kA=rA*Y,VA=L+kA,bA=b+rA,JA=J+cA,GA=G+p;function iA(A){return A>=L&&A=b&&A=J&&eG&&e0&&C(G+c)}else{let n=gA.get(o);n?t.push(...n):C(o)}if(!t.length)break;o=t.pop()}if(l&&e.length>1){let o=N(e[0]);for(let n=1;n0&&C>=n)n==0?(e.push(l,...t),t.length=0,l=g):t.push(g),C=n;else{let r=YA(l,g);r>=0?l=r:C==0&&n==0?(e.push(l),l=g):(t.push(g),C=n)}}return l>=0&&e.push(l,...t),e}function sA(A){return wA(A).map(nA)}function zA(A){return KA(wA(A))}const fA=65039,BA=".",QA=1,v=45;function U(){return new Set(h(B))}const TA=new Map(CA(B)),HA=U(),K=U(),_=new Set(h(B).map(function(A){return this[A]},[...K])),xA=U();U();const XA=tA(B);function $(){return new Set([h(B).map(A=>XA[A]),h(B)].flat(2))}const qA=B(),S=m(A=>{let e=m(B).map(t=>t+96);if(e.length){let t=A>=qA;e[0]-=32,e=D(e),t&&(e=`Restricted[${e}]`);let l=$(),C=$(),o=[...l,...C].sort((g,r)=>g-r),n=!B();return{N:e,P:l,M:n,R:t,V:new Set(o)}}}),AA=U(),P=new Map;[...AA,...U()].sort((A,e)=>A-e).map((A,e,t)=>{let l=B(),C=t[e]=l?t[e-l]:{V:[],M:new Map};C.V.push(A),AA.has(A)||P.set(A,C)});for(let{V:A,M:e}of new Set(P.values())){let t=[];for(let C of A){let o=S.filter(g=>g.V.has(C)),n=t.find(({G:g})=>o.some(r=>g.has(r)));n||(n={G:new Set,V:[]},t.push(n)),n.V.push(C),o.forEach(g=>n.G.add(g))}let l=t.flatMap(({G:C})=>[...C]);for(let{G:C,V:o}of t){let n=new Set(l.filter(g=>!C.has(g)));for(let g of o)e.set(g,n)}}let F=new Set,EA=new Set;for(let A of S)for(let e of A.V)(F.has(e)?EA:F).add(e);for(let A of F)!P.has(A)&&!EA.has(A)&&P.set(A,QA);const yA=new Set([...F,...sA(F)]);class jA extends Array{get is_emoji(){return!0}}const ZA=mA(B).map(A=>jA.from(A)).sort(PA),aA=new Map;for(let A of ZA){let e=[aA];for(let t of A){let l=e.map(C=>{let o=C.get(t);return o||(o=new Map,C.set(t,o)),o});t===fA?e.push(...l):e=l}for(let t of e)t.V=A}function z(A,e=lA){let t=[];$A(A[0])&&t.push("◌");let l=0,C=A.length;for(let o=0;o=4&&A[2]==v&&A[3]==v)throw new Error(`invalid label extension: "${D(A.slice(0,4))}"`)}function vA(A){for(let t=A.lastIndexOf(95);t>0;)if(A[--t]!==95)throw new Error("underscore allowed only at start")}function _A(A){let e=A[0],t=Z.get(e);if(t)throw R(`leading ${t}`);let l=A.length,C=-1;for(let o=1;o{let o=SA(C),n={input:o,offset:l};l+=o.length+1;let g;try{let r=n.tokens=ne(o,e,t),c=r.length,s;if(c)if(g=r.flat(),vA(g),!(n.emoji=c>1||r[0].is_emoji)&&g.every(f=>f<128))WA(g),s="ASCII";else{let f=r.flatMap(i=>i.is_emoji?[]:i);if(!f.length)s="Emoji";else{if(K.has(g[0]))throw R("leading combining mark");for(let E=1;En.has(g)):[...n],!t.length)return}else l.push(C)}if(t){for(let C of t)if(l.every(o=>C.V.has(o)))throw new Error(`whole-script confusable: ${A.N}/${C.N}`)}}function Ce(A){let e=S;for(let t of A){let l=e.filter(C=>C.V.has(t));if(!l.length)throw S.some(C=>C.V.has(t))?MA(e[0],t):uA(t);if(e=l,l.length==1)break}return e}function oe(A){return A.map(({input:e,error:t,output:l})=>{if(t){let C=t.message;throw new Error(A.length==1?C:`Invalid label ${y(z(e))}: ${C}`)}return D(l)}).join(BA)}function uA(A){return new Error(`disallowed character: ${q(A)}`)}function MA(A,e){let t=q(e),l=S.find(C=>C.P.has(e));return l&&(t=`${l.N} ${t}`),new Error(`illegal mixture: ${A.N} + ${t}`)}function R(A){return new Error(`illegal placement: ${A}`)}function le(A,e){let{V:t,M:l}=A;for(let C of e)if(!t.has(C))throw MA(A,C);if(l){let C=sA(e);for(let o=1,n=C.length;oW)throw new Error(`excessive non-spacing marks: ${y(z(C.slice(o-1,g)))} (${g-o}/${W})`);o=g}}}function ne(A,e,t){let l=[],C=[];for(A=A.slice().reverse();A.length;){let o=re(A);if(o)C.length&&(l.push(e(C)),C=[]),l.push(t(o));else{let n=A.pop();if(yA.has(n))C.push(n);else{let g=TA.get(n);if(g)C.push(...g);else if(!HA.has(n))throw uA(n)}}}return C.length&&l.push(e(C)),l}function ge(A){return A.filter(e=>e!=fA)}function re(A,e){let t=aA,l,C=A.length;for(;C&&(t=t.get(A[--C]),!!t);){let{V:o}=t;o&&(l=o,e&&e.push(...A.slice(C).reverse()),A.length=C)}return l}function we(A){return Ae(A)}export{Be as getEnsAddress,Qe as getEnsAvatar,Ee as getEnsName,ae as getEnsResolver,he as getEnsText,ue as labelhash,Me as namehash,we as normalize}; diff --git a/examples/vite/dist/assets/index-c531661c.js b/examples/vite/dist/assets/index-c531661c.js new file mode 100644 index 0000000000..e296cceec6 --- /dev/null +++ b/examples/vite/dist/assets/index-c531661c.js @@ -0,0 +1,522 @@ +import{E as Dt}from"./events-741c5e9f.js";import{a as Fr,s as $r,m as jr,c as ie,I as Hr,f as vt,J as Et,H as zr}from"./http-d8520fe3.js";import{k as Ve,aB as Wr,aC as Vr,aD as Jr,aE as Qr,aF as Kr,aG as Yr,aH as Gr,aI as Zr,aJ as Xr,aK as eo,aL as to,aM as no,aN as ro,aO as oo,aP as io,aQ as so,aR as ao,aS as co,e as Ft,aT as lo,aU as uo}from"./index-5c4ca410.js";import{b as j,l as N,y as O,g as W,$ as B,q as ge,B as fo,E as ho,a as ye,c as Je,d as Qe,V as $t,s as jt,_ as Ht,A as zt,F as Wt,T as Vt,e as Jt,x as Qt,f as Kt,i as Yt,P as go}from"./hooks.module-408dc32d.js";import"@safe-globalThis/safe-apps-provider";import"@safe-globalThis/safe-apps-sdk";const Ne="Session currently connected",$="Session currently disconnected",_o="Session Rejected",po="Missing JSON RPC response",mo='JSON-RPC success response must include "result" field',wo='JSON-RPC error response must include "error" field',yo='JSON RPC request must have valid "method" value',bo='JSON RPC request must have valid "id" value',vo="Missing one of the required parameters: bridge / uri / session",Ct="JSON RPC response format is invalid",Eo="URI format is invalid",Co="QRCode Modal not provided",St="User close QRCode Modal",So=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],Io=["wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],Ke=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign",...Io],Pe="WALLETCONNECT_DEEPLINK_CHOICE",Ro={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"};var Gt=Ye;Ye.strict=Zt;Ye.loose=Xt;var ko=Object.prototype.toString,To={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function Ye(t){return Zt(t)||Xt(t)}function Zt(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function Xt(t){return To[ko.call(t)]}const No=Ve(Gt);var xo=Gt.strict,Mo=function(e){if(xo(e)){var n=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(n=n.slice(e.byteOffset,e.byteOffset+e.byteLength)),n}else return Buffer.from(e)};const Ao=Ve(Mo),Ge="hex",Ze="utf8",Oo="binary",Lo="buffer",Bo="array",Uo="typed-array",Po="array-buffer",be="0";function V(t){return new Uint8Array(t)}function Xe(t,e=!1){const n=t.toString(Ge);return e?se(n):n}function et(t){return t.toString(Ze)}function en(t){return t.readUIntBE(0,t.length)}function Z(t){return Ao(t)}function U(t,e=!1){return Xe(Z(t),e)}function tn(t){return et(Z(t))}function nn(t){return en(Z(t))}function tt(t){return Buffer.from(J(t),Ge)}function P(t){return V(tt(t))}function qo(t){return et(tt(t))}function Do(t){return nn(P(t))}function nt(t){return Buffer.from(t,Ze)}function rn(t){return V(nt(t))}function Fo(t,e=!1){return Xe(nt(t),e)}function $o(t){const e=parseInt(t,10);return ii(oi(e),"Number can only safely store up to 53 bits"),e}function jo(t){return Vo(rt(t))}function Ho(t){return ot(rt(t))}function zo(t,e){return Jo(rt(t),e)}function Wo(t){return`${t}`}function rt(t){const e=(t>>>0).toString(2);return st(e)}function Vo(t){return Z(ot(t))}function ot(t){return new Uint8Array(Xo(t).map(e=>parseInt(e,2)))}function Jo(t,e){return U(ot(t),e)}function Qo(t){return!(typeof t!="string"||!new RegExp(/^[01]+$/).test(t)||t.length%8!==0)}function on(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}function ve(t){return Buffer.isBuffer(t)}function it(t){return No.strict(t)&&!ve(t)}function sn(t){return!it(t)&&!ve(t)&&typeof t.byteLength<"u"}function Ko(t){return ve(t)?Lo:it(t)?Uo:sn(t)?Po:Array.isArray(t)?Bo:typeof t}function Yo(t){return Qo(t)?Oo:on(t)?Ge:Ze}function Go(...t){return Buffer.concat(t)}function an(...t){let e=[];return t.forEach(n=>e=e.concat(Array.from(n))),new Uint8Array([...e])}function Zo(t,e=8){const n=t%e;return n?(t-n)/e*e+e:t}function Xo(t,e=8){const n=st(t).match(new RegExp(`.{${e}}`,"gi"));return Array.from(n||[])}function st(t,e=8,n=be){return ei(t,Zo(t.length,e),n)}function ei(t,e,n=be){return si(t,e,!0,n)}function J(t){return t.replace(/^0x/,"")}function se(t){return t.startsWith("0x")?t:`0x${t}`}function ti(t){return t=J(t),t=st(t,2),t&&(t=se(t)),t}function ni(t){const e=t.startsWith("0x");return t=J(t),t=t.startsWith(be)?t.substring(1):t,e?se(t):t}function ri(t){return typeof t>"u"}function oi(t){return!ri(t)}function ii(t,e){if(!t)throw new Error(e)}function si(t,e,n,r=be){const o=e-t.length;let i=t;if(o>0){const s=r.repeat(o);i=n?s+t:t+s}return i}function _e(t){return Z(new Uint8Array(t))}function ai(t){return tn(new Uint8Array(t))}function cn(t,e){return U(new Uint8Array(t),!e)}function ci(t){return nn(new Uint8Array(t))}function li(...t){return P(t.map(e=>U(new Uint8Array(e))).join("")).buffer}function ln(t){return V(t).buffer}function ui(t){return et(t)}function di(t,e){return Xe(t,!e)}function fi(t){return en(t)}function hi(...t){return Go(...t)}function gi(t){return rn(t).buffer}function _i(t){return nt(t)}function pi(t,e){return Fo(t,!e)}function mi(t){return $o(t)}function wi(t){return tt(t)}function un(t){return P(t).buffer}function yi(t){return qo(t)}function bi(t){return Do(t)}function vi(t){return jo(t)}function Ei(t){return Ho(t).buffer}function Ci(t){return Wo(t)}function dn(t,e){return zo(Number(t),!e)}const Si=Qr,Ii=Kr,Ri=Yr,ki=Gr,Ti=Zr,fn=Jr,Ni=Xr,hn=Wr,xi=eo,Mi=to,Ai=no,Ee=Vr;function Ce(t){return ro(t)}function Se(){const t=Ce();return t&&t.os?t.os:void 0}function gn(){const t=Se();return t?t.toLowerCase().includes("android"):!1}function _n(){const t=Se();return t?t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function pn(){return Se()?gn()||_n():!1}function mn(){const t=Ce();return t&&t.name?t.name.toLowerCase()==="node":!1}function wn(){return!mn()&&!!fn()}const yn=Fr,bn=$r;function at(t,e){const n=bn(e),r=Ee();r&&r.setItem(t,n)}function ct(t){let e=null,n=null;const r=Ee();return r&&(n=r.getItem(t)),e=n&&yn(n),e}function lt(t){const e=Ee();e&&e.removeItem(t)}function qe(){return oo()}function Oi(t){return ti(t)}function Li(t){return se(t)}function Bi(t){return J(t)}function Ui(t){return ni(se(t))}const vn=jr;function he(){return((e,n)=>{for(n=e="";e++<36;n+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return n})()}function Pi(){console.warn("DEPRECATION WARNING: This WalletConnect client library will be deprecated in favor of @walletconnect/client. Please check docs.walletconnect.org to learn more about this migration!")}function En(t,e){let n;const r=Ro[t];return r&&(n=`https://${r}.infura.io/v3/${e}`),n}function Cn(t,e){let n;const r=En(t,e.infuraId);return e.custom&&e.custom[t]?n=e.custom[t]:r&&(n=r),n}function qi(t,e){const n=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${n}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function Di(t){const e=t.href.split("?")[0];at(Pe,Object.assign(Object.assign({},t),{href:e}))}function Sn(t,e){return t.filter(n=>n.name.toLowerCase().includes(e.toLowerCase()))[0]}function Fi(t,e){let n=t;return e&&(n=e.map(r=>Sn(t,r)).filter(Boolean)),n}function $i(t,e){return async(...r)=>new Promise((o,i)=>{const s=(a,c)=>{(a===null||typeof a>"u")&&i(a),o(c)};t.apply(e,[...r,s])})}function In(t){const e=t.message||"Failed or Rejected Request";let n=-32e3;if(t&&!t.code)switch(e){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3;break}const r={code:n,message:e};return t.data&&(r.data=t.data),r}const Rn="https://registry.walletconnect.com";function ji(){return Rn+"/api/v2/wallets"}function Hi(){return Rn+"/api/v2/dapps"}function kn(t,e="mobile"){var n;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:(n=t.image_url.sm)!==null&&n!==void 0?n:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function zi(t,e="mobile"){return Object.values(t).filter(n=>!!n[e].universal||!!n[e].native).map(n=>kn(n,e))}var ut={};(function(t){const e=ao,n=co,r=io,o=so,i=l=>l==null;function s(l){switch(l.arrayFormat){case"index":return d=>(f,u)=>{const g=f.length;return u===void 0||l.skipNull&&u===null||l.skipEmptyString&&u===""?f:u===null?[...f,[h(d,l),"[",g,"]"].join("")]:[...f,[h(d,l),"[",h(g,l),"]=",h(u,l)].join("")]};case"bracket":return d=>(f,u)=>u===void 0||l.skipNull&&u===null||l.skipEmptyString&&u===""?f:u===null?[...f,[h(d,l),"[]"].join("")]:[...f,[h(d,l),"[]=",h(u,l)].join("")];case"comma":case"separator":return d=>(f,u)=>u==null||u.length===0?f:f.length===0?[[h(d,l),"=",h(u,l)].join("")]:[[f,h(u,l)].join(l.arrayFormatSeparator)];default:return d=>(f,u)=>u===void 0||l.skipNull&&u===null||l.skipEmptyString&&u===""?f:u===null?[...f,h(d,l)]:[...f,[h(d,l),"=",h(u,l)].join("")]}}function a(l){let d;switch(l.arrayFormat){case"index":return(f,u,g)=>{if(d=/\[(\d*)\]$/.exec(f),f=f.replace(/\[\d*\]$/,""),!d){g[f]=u;return}g[f]===void 0&&(g[f]={}),g[f][d[1]]=u};case"bracket":return(f,u,g)=>{if(d=/(\[\])$/.exec(f),f=f.replace(/\[\]$/,""),!d){g[f]=u;return}if(g[f]===void 0){g[f]=[u];return}g[f]=[].concat(g[f],u)};case"comma":case"separator":return(f,u,g)=>{const y=typeof u=="string"&&u.includes(l.arrayFormatSeparator),m=typeof u=="string"&&!y&&_(u,l).includes(l.arrayFormatSeparator);u=m?_(u,l):u;const S=y||m?u.split(l.arrayFormatSeparator).map(R=>_(R,l)):u===null?u:_(u,l);g[f]=S};default:return(f,u,g)=>{if(g[f]===void 0){g[f]=u;return}g[f]=[].concat(g[f],u)}}}function c(l){if(typeof l!="string"||l.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function h(l,d){return d.encode?d.strict?e(l):encodeURIComponent(l):l}function _(l,d){return d.decode?n(l):l}function v(l){return Array.isArray(l)?l.sort():typeof l=="object"?v(Object.keys(l)).sort((d,f)=>Number(d)-Number(f)).map(d=>l[d]):l}function b(l){const d=l.indexOf("#");return d!==-1&&(l=l.slice(0,d)),l}function w(l){let d="";const f=l.indexOf("#");return f!==-1&&(d=l.slice(f)),d}function E(l){l=b(l);const d=l.indexOf("?");return d===-1?"":l.slice(d+1)}function C(l,d){return d.parseNumbers&&!Number.isNaN(Number(l))&&typeof l=="string"&&l.trim()!==""?l=Number(l):d.parseBooleans&&l!==null&&(l.toLowerCase()==="true"||l.toLowerCase()==="false")&&(l=l.toLowerCase()==="true"),l}function I(l,d){d=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},d),c(d.arrayFormatSeparator);const f=a(d),u=Object.create(null);if(typeof l!="string"||(l=l.trim().replace(/^[?#&]/,""),!l))return u;for(const g of l.split("&")){if(g==="")continue;let[y,m]=r(d.decode?g.replace(/\+/g," "):g,"=");m=m===void 0?null:["comma","separator"].includes(d.arrayFormat)?m:_(m,d),f(_(y,d),m,u)}for(const g of Object.keys(u)){const y=u[g];if(typeof y=="object"&&y!==null)for(const m of Object.keys(y))y[m]=C(y[m],d);else u[g]=C(y,d)}return d.sort===!1?u:(d.sort===!0?Object.keys(u).sort():Object.keys(u).sort(d.sort)).reduce((g,y)=>{const m=u[y];return m&&typeof m=="object"&&!Array.isArray(m)?g[y]=v(m):g[y]=m,g},Object.create(null))}t.extract=E,t.parse=I,t.stringify=(l,d)=>{if(!l)return"";d=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},d),c(d.arrayFormatSeparator);const f=m=>d.skipNull&&i(l[m])||d.skipEmptyString&&l[m]==="",u=s(d),g={};for(const m of Object.keys(l))f(m)||(g[m]=l[m]);const y=Object.keys(g);return d.sort!==!1&&y.sort(d.sort),y.map(m=>{const S=l[m];return S===void 0?"":S===null?h(m,d):Array.isArray(S)?S.reduce(u(m),[]).join("&"):h(m,d)+"="+h(S,d)}).filter(m=>m.length>0).join("&")},t.parseUrl=(l,d)=>{d=Object.assign({decode:!0},d);const[f,u]=r(l,"#");return Object.assign({url:f.split("?")[0]||"",query:I(E(l),d)},d&&d.parseFragmentIdentifier&&u?{fragmentIdentifier:_(u,d)}:{})},t.stringifyUrl=(l,d)=>{d=Object.assign({encode:!0,strict:!0},d);const f=b(l.url).split("?")[0]||"",u=t.extract(l.url),g=t.parse(u,{sort:!1}),y=Object.assign(g,l.query);let m=t.stringify(y,d);m&&(m=`?${m}`);let S=w(l.url);return l.fragmentIdentifier&&(S=`#${h(l.fragmentIdentifier,d)}`),`${f}${m}${S}`},t.pick=(l,d,f)=>{f=Object.assign({parseFragmentIdentifier:!0},f);const{url:u,query:g,fragmentIdentifier:y}=t.parseUrl(l,f);return t.stringifyUrl({url:u,query:o(g,d),fragmentIdentifier:y},f)},t.exclude=(l,d,f)=>{const u=Array.isArray(d)?g=>!d.includes(g):(g,y)=>!d(g,y);return t.pick(l,u,f)}})(ut);function Tn(t){const e=t.indexOf("?")!==-1?t.indexOf("?"):void 0;return typeof e<"u"?t.substr(e):""}function Nn(t,e){let n=dt(t);return n=Object.assign(Object.assign({},n),e),t=xn(n),t}function dt(t){return ut.parse(t)}function xn(t){return ut.stringify(t)}function Mn(t){return typeof t.bridge<"u"}function An(t){const e=t.indexOf(":"),n=t.indexOf("?")!==-1?t.indexOf("?"):void 0,r=t.substring(0,e),o=t.substring(e+1,n);function i(v){const b="@",w=v.split(b);return{handshakeTopic:w[0],version:parseInt(w[1],10)}}const s=i(o),a=typeof n<"u"?t.substr(n):"";function c(v){const b=dt(v);return{key:b.key||"",bridge:b.bridge||""}}const h=c(a);return Object.assign(Object.assign({protocol:r},s),h)}function Wi(t){return t===""||typeof t=="string"&&t.trim()===""}function Vi(t){return!(t&&t.length)}function Ji(t){return ve(t)}function Qi(t){return it(t)}function Ki(t){return sn(t)}function Yi(t){return Ko(t)}function Gi(t){return Yo(t)}function Zi(t,e){return on(t,e)}function Xi(t){return typeof t.params=="object"}function On(t){return typeof t.method<"u"}function H(t){return typeof t.result<"u"}function re(t){return typeof t.error<"u"}function De(t){return typeof t.event<"u"}function Ln(t){return So.includes(t)||t.startsWith("wc_")}function Bn(t){return t.method.startsWith("wc_")?!0:!Ke.includes(t.method)}const es=Object.freeze(Object.defineProperty({__proto__:null,addHexPrefix:Li,appendToQueryString:Nn,concatArrayBuffers:li,concatBuffers:hi,convertArrayBufferToBuffer:_e,convertArrayBufferToHex:cn,convertArrayBufferToNumber:ci,convertArrayBufferToUtf8:ai,convertBufferToArrayBuffer:ln,convertBufferToHex:di,convertBufferToNumber:fi,convertBufferToUtf8:ui,convertHexToArrayBuffer:un,convertHexToBuffer:wi,convertHexToNumber:bi,convertHexToUtf8:yi,convertNumberToArrayBuffer:Ei,convertNumberToBuffer:vi,convertNumberToHex:dn,convertNumberToUtf8:Ci,convertUtf8ToArrayBuffer:gi,convertUtf8ToBuffer:_i,convertUtf8ToHex:pi,convertUtf8ToNumber:mi,detectEnv:Ce,detectOS:Se,formatIOSMobile:qi,formatMobileRegistry:zi,formatMobileRegistryEntry:kn,formatQueryString:xn,formatRpcError:In,getClientMeta:qe,getCrypto:Mi,getCryptoOrThrow:xi,getDappRegistryUrl:Hi,getDocument:ki,getDocumentOrThrow:Ri,getEncoding:Gi,getFromWindow:Si,getFromWindowOrThrow:Ii,getInfuraRpcUrl:En,getLocal:ct,getLocalStorage:Ee,getLocalStorageOrThrow:Ai,getLocation:hn,getLocationOrThrow:Ni,getMobileLinkRegistry:Fi,getMobileRegistryEntry:Sn,getNavigator:fn,getNavigatorOrThrow:Ti,getQueryString:Tn,getRpcUrl:Cn,getType:Yi,getWalletRegistryUrl:ji,isAndroid:gn,isArrayBuffer:Ki,isBrowser:wn,isBuffer:Ji,isEmptyArray:Vi,isEmptyString:Wi,isHexString:Zi,isIOS:_n,isInternalEvent:De,isJsonRpcRequest:On,isJsonRpcResponseError:re,isJsonRpcResponseSuccess:H,isJsonRpcSubscription:Xi,isMobile:pn,isNode:mn,isReservedEvent:Ln,isSilentPayload:Bn,isTypedArray:Qi,isWalletConnectSession:Mn,logDeprecationWarning:Pi,parseQueryString:dt,parseWalletConnectUri:An,payloadId:vn,promisify:$i,removeHexLeadingZeros:Ui,removeHexPrefix:Bi,removeLocal:lt,safeJsonParse:yn,safeJsonStringify:bn,sanitizeHex:Oi,saveMobileLinkInfo:Di,setLocal:at,uuid:he},Symbol.toStringTag,{value:"Module"}));class ts{constructor(){this._eventEmitters=[],typeof window<"u"&&typeof window.addEventListener<"u"&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(e,n){this._eventEmitters.push({event:e,callback:n})}trigger(e){let n=[];e&&(n=this._eventEmitters.filter(r=>r.event===e)),n.forEach(r=>{r.callback()})}}const ns=typeof globalThis.WebSocket<"u"?globalThis.WebSocket:require("ws");class rs{constructor(e){if(this.opts=e,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=e.protocol,this._version=e.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=e.subscriptions||[],this._netMonitor=e.netMonitor||new ts,!e.url||typeof e.url!="string")throw new Error("Missing or invalid WebSocket url");this._url=e.url,this._netMonitor.on("online",()=>this._socketCreate())}set readyState(e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(e){}get connecting(){return this.readyState===0}set connected(e){}get connected(){return this.readyState===1}set closing(e){}get closing(){return this.readyState===2}set closed(e){}get closed(){return this.readyState===3}open(){this._socketCreate()}close(){this._socketClose()}send(e,n,r){if(!n||typeof n!="string")throw new Error("Missing or invalid topic field");this._socketSend({topic:n,type:"pub",payload:e,silent:!!r})}subscribe(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}on(e,n){this._events.push({event:e,callback:n})}_socketCreate(){if(this._nextSocket)return;const e=os(this._url,this._protocol,this._version);if(this._nextSocket=new ns(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=n=>this._socketReceive(n),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=n=>this._socketError(n),this._nextSocket.onclose=()=>{setTimeout(()=>{this._nextSocket=null,this._socketCreate()},1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(e){const n=JSON.stringify(e);this._socket&&this._socket.readyState===1?this._socket.send(n):(this._setToQueue(e),this._socketCreate())}async _socketReceive(e){let n;try{n=JSON.parse(e.data)}catch{return}if(this._socketSend({topic:n.topic,type:"ack",payload:"",silent:!0}),this._socket&&this._socket.readyState===1){const r=this._events.filter(o=>o.event==="message");r&&r.length&&r.forEach(o=>o.callback(n))}}_socketError(e){const n=this._events.filter(r=>r.event==="error");n&&n.length&&n.forEach(r=>r.callback(e))}_queueSubscriptions(){this._subscriptions.forEach(n=>this._queue.push({topic:n,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(e){this._queue.push(e)}_pushQueue(){this._queue.forEach(n=>this._socketSend(n)),this._queue=[]}}function os(t,e,n){var r,o;const s=(t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t).split("?"),a=wn()?{protocol:e,version:n,env:"browser",host:((r=hn())===null||r===void 0?void 0:r.host)||""}:{protocol:e,version:n,env:((o=Ce())===null||o===void 0?void 0:o.name)||""},c=Nn(Tn(s[1]||""),a);return s[0]+"?"+c}class is{constructor(){this._eventEmitters=[]}subscribe(e){this._eventEmitters.push(e)}unsubscribe(e){this._eventEmitters=this._eventEmitters.filter(n=>n.event!==e)}trigger(e){let n=[],r;On(e)?r=e.method:H(e)||re(e)?r=`response:${e.id}`:De(e)?r=e.event:r="",r&&(n=this._eventEmitters.filter(o=>o.event===r)),(!n||!n.length)&&!Ln(r)&&!De(r)&&(n=this._eventEmitters.filter(o=>o.event==="call_request")),n.forEach(o=>{if(re(e)){const i=new Error(e.error.message);o.callback(i,null)}else o.callback(null,e)})}}class ss{constructor(e="walletconnect"){this.storageId=e}getSession(){let e=null;const n=ct(this.storageId);return n&&Mn(n)&&(e=n),e}setSession(e){return at(this.storageId,e),e}removeSession(){lt(this.storageId)}}const as="walletconnect.org",cs="abcdefghijklmnopqrstuvwxyz0123456789",Un=cs.split("").map(t=>`https://${t}.bridge.walletconnect.org`);function ls(t){let e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return e=e.split(":")[0],e=e.split("?")[0],e}function us(t){return ls(t).split(".").slice(-2).join(".")}function ds(){return Math.floor(Math.random()*Un.length)}function fs(){return Un[ds()]}function hs(t){return us(t)===as}function gs(t){return hs(t)?fs():t}class _s{constructor(e){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new is,this._clientMeta=qe()||e.connectorOpts.clientMeta||null,this._cryptoLib=e.cryptoLib,this._sessionStorage=e.sessionStorage||new ss(e.connectorOpts.storageId),this._qrcodeModal=e.connectorOpts.qrcodeModal,this._qrcodeModalOptions=e.connectorOpts.qrcodeModalOptions,this._signingMethods=[...Ke,...e.connectorOpts.signingMethods||[]],!e.connectorOpts.bridge&&!e.connectorOpts.uri&&!e.connectorOpts.session)throw new Error(vo);e.connectorOpts.bridge&&(this.bridge=gs(e.connectorOpts.bridge)),e.connectorOpts.uri&&(this.uri=e.connectorOpts.uri);const n=e.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=e.transport||new rs({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),e.connectorOpts.uri&&this._subscribeToSessionRequest(),e.pushServerOpts&&this._registerPushServer(e.pushServerOpts)}set bridge(e){e&&(this._bridge=e)}get bridge(){return this._bridge}set key(e){if(!e)return;const n=un(e);this._key=n}get key(){return this._key?cn(this._key,!0):""}set clientId(e){e&&(this._clientId=e)}get clientId(){let e=this._clientId;return e||(e=this._clientId=he()),this._clientId}set peerId(e){e&&(this._peerId=e)}get peerId(){return this._peerId}set clientMeta(e){}get clientMeta(){let e=this._clientMeta;return e||(e=this._clientMeta=qe()),e}set peerMeta(e){this._peerMeta=e}get peerMeta(){return this._peerMeta}set handshakeTopic(e){e&&(this._handshakeTopic=e)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(e){e&&(this._handshakeId=e)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(e){if(!e)return;const{handshakeTopic:n,bridge:r,key:o}=this._parseUri(e);this.handshakeTopic=n,this.bridge=r,this.key=o}set chainId(e){this._chainId=e}get chainId(){return this._chainId}set networkId(e){this._networkId=e}get networkId(){return this._networkId}set accounts(e){this._accounts=e}get accounts(){return this._accounts}set rpcUrl(e){this._rpcUrl=e}get rpcUrl(){return this._rpcUrl}set connected(e){}get connected(){return this._connected}set pending(e){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}on(e,n){const r={event:e,callback:n};this._eventManager.subscribe(r)}off(e){this._eventManager.unsubscribe(e)}async createInstantRequest(e){this._key=await this._generateKey();const n=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]});this.handshakeId=n.id,this.handshakeTopic=he(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",()=>{throw new Error(St)});const r=()=>{this.killSession()};try{const o=await this._sendCallRequest(n);return o&&r(),o}catch(o){throw r(),o}}async connect(e){if(!this._qrcodeModal)throw new Error(Co);return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(e),new Promise(async(n,r)=>{this.on("modal_closed",()=>r(new Error(St))),this.on("connect",(o,i)=>{if(o)return r(o);n(i.params[0])})}))}async createSession(e){if(this._connected)throw new Error(Ne);if(this.pending)return;this._key=await this._generateKey();const n=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]});this.handshakeId=n.id,this.handshakeTopic=he(),this._sendSessionRequest(n,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(e){if(this._connected)throw new Error(Ne);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const n={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},r={id:this.handshakeId,jsonrpc:"2.0",result:n};this._sendResponse(r),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(e){if(this._connected)throw new Error(Ne);const n=e&&e.message?e.message:_o,r=this._formatResponse({id:this.handshakeId,error:{message:n}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:n}]}),this._removeStorageSession()}updateSession(e){if(!this._connected)throw new Error($);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";const n={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[n]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(e){const n=e?e.message:"Session Disconnected",r={approved:!1,chainId:null,networkId:null,accounts:null},o=this._formatRequest({method:"wc_sessionUpdate",params:[r]});await this._sendRequest(o),this._handleSessionDisconnect(n)}async sendTransaction(e){if(!this._connected)throw new Error($);const n=e,r=this._formatRequest({method:"eth_sendTransaction",params:[n]});return await this._sendCallRequest(r)}async signTransaction(e){if(!this._connected)throw new Error($);const n=e,r=this._formatRequest({method:"eth_signTransaction",params:[n]});return await this._sendCallRequest(r)}async signMessage(e){if(!this._connected)throw new Error($);const n=this._formatRequest({method:"eth_sign",params:e});return await this._sendCallRequest(n)}async signPersonalMessage(e){if(!this._connected)throw new Error($);const n=this._formatRequest({method:"personal_sign",params:e});return await this._sendCallRequest(n)}async signTypedData(e){if(!this._connected)throw new Error($);const n=this._formatRequest({method:"eth_signTypedData",params:e});return await this._sendCallRequest(n)}async updateChain(e){if(!this._connected)throw new Error("Session currently disconnected");const n=this._formatRequest({method:"wallet_updateChain",params:[e]});return await this._sendCallRequest(n)}unsafeSend(e,n){return this._sendRequest(e,n),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:n}]}),new Promise((r,o)=>{this._subscribeToResponse(e.id,(i,s)=>{if(i){o(i);return}if(!s)throw new Error(po);r(s)})})}async sendCustomRequest(e,n){if(!this._connected)throw new Error($);switch(e.method){case"eth_accounts":return this.accounts;case"eth_chainId":return dn(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":e.params;break;case"personal_sign":e.params;break}const r=this._formatRequest(e);return await this._sendCallRequest(r,n)}approveRequest(e){if(H(e)){const n=this._formatResponse(e);this._sendResponse(n)}else throw new Error(mo)}rejectRequest(e){if(re(e)){const n=this._formatResponse(e);this._sendResponse(n)}else throw new Error(wo)}transportClose(){this._transport.close()}async _sendRequest(e,n){const r=this._formatRequest(e),o=await this._encrypt(r),i=typeof(n==null?void 0:n.topic)<"u"?n.topic:this.peerId,s=JSON.stringify(o),a=typeof(n==null?void 0:n.forcePushNotification)<"u"?!n.forcePushNotification:Bn(r);this._transport.send(s,i,a)}async _sendResponse(e){const n=await this._encrypt(e),r=this.peerId,o=JSON.stringify(n),i=!0;this._transport.send(o,r,i)}async _sendSessionRequest(e,n,r){this._sendRequest(e,r),this._subscribeToSessionResponse(e.id,n)}_sendCallRequest(e,n){return this._sendRequest(e,n),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:n}]}),this._subscribeToCallResponse(e.id)}_formatRequest(e){if(typeof e.method>"u")throw new Error(yo);return{id:typeof e.id>"u"?vn():e.id,jsonrpc:"2.0",method:e.method,params:typeof e.params>"u"?[]:e.params}}_formatResponse(e){if(typeof e.id>"u")throw new Error(bo);const n={id:e.id,jsonrpc:"2.0"};if(re(e)){const r=In(e.error);return Object.assign(Object.assign(Object.assign({},n),e),{error:r})}else if(H(e))return Object.assign(Object.assign({},n),e);throw new Error(Ct)}_handleSessionDisconnect(e){const n=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),lt(Pe)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:n}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(e,n){n?n.approved?(this._connected?(n.chainId&&(this.chainId=n.chainId),n.accounts&&(this.accounts=n.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,n.chainId&&(this.chainId=n.chainId),n.accounts&&(this.accounts=n.accounts),n.peerId&&!this.peerId&&(this.peerId=n.peerId),n.peerMeta&&!this.peerMeta&&(this.peerMeta=n.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(e):this._handleSessionDisconnect(e)}async _handleIncomingMessages(e){if(![this.clientId,this.handshakeTopic].includes(e.topic))return;let r;try{r=JSON.parse(e.payload)}catch{return}const o=await this._decrypt(r);o&&this._eventManager.trigger(o)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(e,n){this.on(`response:${e}`,n)}_subscribeToSessionResponse(e,n){this._subscribeToResponse(e,(r,o)=>{if(r){this._handleSessionResponse(r.message);return}H(o)?this._handleSessionResponse(n,o.result):o.error&&o.error.message?this._handleSessionResponse(o.error.message):this._handleSessionResponse(n)})}_subscribeToCallResponse(e){return new Promise((n,r)=>{this._subscribeToResponse(e,(o,i)=>{if(o){r(o);return}H(i)?n(i.result):i.error&&i.error.message?r(i.error):r(new Error(Ct))})})}_subscribeToInternalEvents(){this.on("display_uri",()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,()=>{this._eventManager.trigger({event:"modal_closed",params:[]})},this._qrcodeModalOptions)}),this.on("connect",()=>{this._qrcodeModal&&this._qrcodeModal.close()}),this.on("call_request_sent",(e,n)=>{const{request:r}=n.params[0];if(pn()&&this._signingMethods.includes(r.method)){const o=ct(Pe);o&&(window.location.href=o.href)}}),this.on("wc_sessionRequest",(e,n)=>{e&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),this.handshakeId=n.id,this.peerId=n.params[0].peerId,this.peerMeta=n.params[0].peerMeta;const r=Object.assign(Object.assign({},n),{method:"session_request"});this._eventManager.trigger(r)}),this.on("wc_sessionUpdate",(e,n)=>{e&&this._handleSessionResponse(e.message),this._handleSessionResponse("Session disconnected",n.params[0])})}_initTransport(){this._transport.on("message",e=>this._handleIncomingMessages(e)),this._transport.on("open",()=>this._eventManager.trigger({event:"transport_open",params:[]})),this._transport.on("close",()=>this._eventManager.trigger({event:"transport_close",params:[]})),this._transport.on("error",()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})),this._transport.open()}_formatUri(){const e=this.protocol,n=this.handshakeTopic,r=this.version,o=encodeURIComponent(this.bridge),i=this.key;return`${e}:${n}@${r}?bridge=${o}&key=${i}`}_parseUri(e){const n=An(e);if(n.protocol===this.protocol){if(!n.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const r=n.handshakeTopic;if(!n.bridge)throw Error("Invalid or missing bridge url parameter value");const o=decodeURIComponent(n.bridge);if(!n.key)throw Error("Invalid or missing key parameter value");const i=n.key;return{handshakeTopic:r,bridge:o,key:i}}else throw new Error(Eo)}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(e){const n=this._key;return this._cryptoLib&&n?await this._cryptoLib.encrypt(e,n):null}async _decrypt(e){const n=this._key;return this._cryptoLib&&n?await this._cryptoLib.decrypt(e,n):null}_getStorageSession(){let e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(e){if(!e.url||typeof e.url!="string")throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||typeof e.type!="string")throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||typeof e.token!="string")throw Error("Invalid or missing pushServerOpts.token parameter value");const n={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",async(r,o)=>{if(r)throw r;if(e.peerMeta){const i=o.params[0].peerMeta.name;n.peerName=i}try{if(!(await(await fetch(`${e.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})).json()).success)throw Error("Failed to register in Push Server")}catch{throw Error("Failed to register in Push Server")}})}}function ps(t){return ie.getBrowerCrypto().getRandomValues(new Uint8Array(t))}const Pn=256,qn=Pn,ms=Pn,q="AES-CBC",ws=`SHA-${qn}`,Fe="HMAC",ys="encrypt",bs="decrypt",vs="sign",Es="verify";function Cs(t){return t===q?{length:qn,name:q}:{hash:{name:ws},name:Fe}}function Ss(t){return t===q?[ys,bs]:[vs,Es]}async function ft(t,e=q){return ie.getSubtleCrypto().importKey("raw",t,Cs(e),!0,Ss(e))}async function Is(t,e,n){const r=ie.getSubtleCrypto(),o=await ft(e,q),i=await r.encrypt({iv:t,name:q},o,n);return new Uint8Array(i)}async function Rs(t,e,n){const r=ie.getSubtleCrypto(),o=await ft(e,q),i=await r.decrypt({iv:t,name:q},o,n);return new Uint8Array(i)}async function ks(t,e){const n=ie.getSubtleCrypto(),r=await ft(t,Fe),o=await n.sign({length:ms,name:Fe},r,e);return new Uint8Array(o)}function Ts(t,e,n){return Is(t,e,n)}function Ns(t,e,n){return Rs(t,e,n)}async function Dn(t,e){return await ks(t,e)}async function Fn(t){const e=(t||256)/8,n=ps(e);return ln(Z(n))}async function $n(t,e){const n=P(t.data),r=P(t.iv),o=P(t.hmac),i=U(o,!1),s=an(n,r),a=await Dn(e,s),c=U(a,!1);return J(i)===J(c)}async function xs(t,e,n){const r=V(_e(e)),o=n||await Fn(128),i=V(_e(o)),s=U(i,!1),a=JSON.stringify(t),c=rn(a),h=await Ts(i,r,c),_=U(h,!1),v=an(h,i),b=await Dn(r,v),w=U(b,!1);return{data:_,hmac:w,iv:s}}async function Ms(t,e){const n=V(_e(e));if(!n)throw new Error("Missing key: required for decryption");if(!await $n(t,n))return null;const o=P(t.data),i=P(t.iv),s=await Ns(i,n,o),a=tn(s);let c;try{c=JSON.parse(a)}catch{return null}return c}const As=Object.freeze(Object.defineProperty({__proto__:null,decrypt:Ms,encrypt:xs,generateKey:Fn,verifyHmac:$n},Symbol.toStringTag,{value:"Module"}));class Os extends _s{constructor(e,n){super({cryptoLib:As,connectorOpts:e,pushServerOpts:n})}}const Ls=Ft(es);var ae={},Bs=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},jn={},M={};let ht;const Us=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];M.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};M.getSymbolTotalCodewords=function(e){return Us[e]};M.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};M.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');ht=e};M.isKanjiModeEnabled=function(){return typeof ht<"u"};M.toSJIS=function(e){return ht(e)};var Ie={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,o){if(t.isValid(r))return r;try{return e(r)}catch{return o}}})(Ie);function Hn(){this.buffer=[],this.length=0}Hn.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Ps=Hn;function ce(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}ce.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)};ce.prototype.get=function(t,e){return this.data[t*this.size+e]};ce.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};ce.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var qs=ce,zn={};(function(t){const e=M.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,i=e(r),s=i===145?26:Math.ceil((i-13)/(2*o-2))*2,a=[i-7];for(let c=1;c=0&&o<=7},t.from=function(o){return t.isValid(o)?parseInt(o,10):void 0},t.getPenaltyN1=function(o){const i=o.size;let s=0,a=0,c=0,h=null,_=null;for(let v=0;v=5&&(s+=e.N1+(a-5)),h=w,a=1),w=o.get(b,v),w===_?c++:(c>=5&&(s+=e.N1+(c-5)),_=w,c=1)}a>=5&&(s+=e.N1+(a-5)),c>=5&&(s+=e.N1+(c-5))}return s},t.getPenaltyN2=function(o){const i=o.size;let s=0;for(let a=0;a=10&&(a===1488||a===93)&&s++,c=c<<1&2047|o.get(_,h),_>=10&&(c===1488||c===93)&&s++}return s*e.N3},t.getPenaltyN4=function(o){let i=0;const s=o.data.length;for(let c=0;c=0;){const s=i[0];for(let c=0;c0){const i=new Uint8Array(this.degree);return i.set(r,o),i}return r};var Fs=gt,Kn={},D={},_t={};_t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var A={};const Yn="[0-9]+",$s="[A-Z $%*+\\-./:]+";let oe="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";oe=oe.replace(/u/g,"\\u");const js="(?:(?![A-Z0-9 $%*+\\-./:]|"+oe+`)(?:.|[\r +]))+`;A.KANJI=new RegExp(oe,"g");A.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");A.BYTE=new RegExp(js,"g");A.NUMERIC=new RegExp(Yn,"g");A.ALPHANUMERIC=new RegExp($s,"g");const Hs=new RegExp("^"+oe+"$"),zs=new RegExp("^"+Yn+"$"),Ws=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");A.testKanji=function(e){return Hs.test(e)};A.testNumeric=function(e){return zs.test(e)};A.testAlphanumeric=function(e){return Ws.test(e)};(function(t){const e=_t,n=A;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},t.getBestModeForData=function(i){return n.testNumeric(i)?t.NUMERIC:n.testAlphanumeric(i)?t.ALPHANUMERIC:n.testKanji(i)?t.KANJI:t.BYTE},t.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},t.isValid=function(i){return i&&i.bit&&i.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+o)}}t.from=function(i,s){if(t.isValid(i))return i;try{return r(i)}catch{return s}}})(D);(function(t){const e=M,n=Re,r=Ie,o=D,i=_t,s=7973,a=e.getBCHDigit(s);function c(b,w,E){for(let C=1;C<=40;C++)if(w<=t.getCapacity(C,E,b))return C}function h(b,w){return o.getCharCountIndicator(b,w)+4}function _(b,w){let E=0;return b.forEach(function(C){const I=h(C.mode,w);E+=I+C.getBitsLength()}),E}function v(b,w){for(let E=1;E<=40;E++)if(_(b,E)<=t.getCapacity(E,w,o.MIXED))return E}t.from=function(w,E){return i.isValid(w)?parseInt(w,10):E},t.getCapacity=function(w,E,C){if(!i.isValid(w))throw new Error("Invalid QR Code version");typeof C>"u"&&(C=o.BYTE);const I=e.getSymbolTotalCodewords(w),l=n.getTotalCodewordsCount(w,E),d=(I-l)*8;if(C===o.MIXED)return d;const f=d-h(C,w);switch(C){case o.NUMERIC:return Math.floor(f/10*3);case o.ALPHANUMERIC:return Math.floor(f/11*2);case o.KANJI:return Math.floor(f/13);case o.BYTE:default:return Math.floor(f/8)}},t.getBestVersionForData=function(w,E){let C;const I=r.from(E,r.M);if(Array.isArray(w)){if(w.length>1)return v(w,I);if(w.length===0)return 1;C=w[0]}else C=w;return c(C.mode,C.getLength(),I)},t.getEncodedBits=function(w){if(!i.isValid(w)||w<7)throw new Error("Invalid QR Code version");let E=w<<12;for(;e.getBCHDigit(E)-a>=0;)E^=s<=0;)o^=Zn<<$e.getBCHDigit(o)-Rt;return(r<<10|o)^Vs};var Xn={};const Js=D;function Q(t){this.mode=Js.NUMERIC,this.data=t.toString()}Q.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};Q.prototype.getLength=function(){return this.data.length};Q.prototype.getBitsLength=function(){return Q.getBitsLength(this.data.length)};Q.prototype.write=function(e){let n,r,o;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),o=parseInt(r,10),e.put(o,10);const i=this.data.length-n;i>0&&(r=this.data.substr(n),o=parseInt(r,10),e.put(o,i*3+1))};var Qs=Q;const Ks=D,xe=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function K(t){this.mode=Ks.ALPHANUMERIC,this.data=t}K.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};K.prototype.getLength=function(){return this.data.length};K.prototype.getBitsLength=function(){return K.getBitsLength(this.data.length)};K.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let r=xe.indexOf(this.data[n])*45;r+=xe.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put(xe.indexOf(this.data[n]),6)};var Ys=K;const Gs=lo,Zs=D;function Y(t){this.mode=Zs.BYTE,typeof t=="string"&&(t=Gs(t)),this.data=new Uint8Array(t)}Y.getBitsLength=function(e){return e*8};Y.prototype.getLength=function(){return this.data.length};Y.prototype.getBitsLength=function(){return Y.getBitsLength(this.data.length)};Y.prototype.write=function(t){for(let e=0,n=this.data.length;e=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` +Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var na=G;(function(t){const e=D,n=Qs,r=Ys,o=Xs,i=na,s=A,a=M,c=uo;function h(l){return unescape(encodeURIComponent(l)).length}function _(l,d,f){const u=[];let g;for(;(g=l.exec(f))!==null;)u.push({data:g[0],index:g.index,mode:d,length:g[0].length});return u}function v(l){const d=_(s.NUMERIC,e.NUMERIC,l),f=_(s.ALPHANUMERIC,e.ALPHANUMERIC,l);let u,g;return a.isKanjiModeEnabled()?(u=_(s.BYTE,e.BYTE,l),g=_(s.KANJI,e.KANJI,l)):(u=_(s.BYTE_KANJI,e.BYTE,l),g=[]),d.concat(f,u,g).sort(function(m,S){return m.index-S.index}).map(function(m){return{data:m.data,mode:m.mode,length:m.length}})}function b(l,d){switch(d){case e.NUMERIC:return n.getBitsLength(l);case e.ALPHANUMERIC:return r.getBitsLength(l);case e.KANJI:return i.getBitsLength(l);case e.BYTE:return o.getBitsLength(l)}}function w(l){return l.reduce(function(d,f){const u=d.length-1>=0?d[d.length-1]:null;return u&&u.mode===f.mode?(d[d.length-1].data+=f.data,d):(d.push(f),d)},[])}function E(l){const d=[];for(let f=0;f=0&&a<=6&&(c===0||c===6)||c>=0&&c<=6&&(a===0||a===6)||a>=2&&a<=4&&c>=2&&c<=4?t.set(i+a,s+c,!0,!0):t.set(i+a,s+c,!1,!0))}}function da(t){const e=t.size;for(let n=8;n>a&1)===1,t.set(o,i,s,!0),t.set(i,o,s,!0)}function Oe(t,e,n){const r=t.size,o=ca.getEncodedBits(e,n);let i,s;for(i=0;i<15;i++)s=(o>>i&1)===1,i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(r-15+i,8,s,!0),i<8?t.set(8,r-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(r-8,8,1,!0)}function ga(t,e){const n=t.size;let r=-1,o=n-1,i=7,s=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let c=0;c<2;c++)if(!t.isReserved(o,a-c)){let h=!1;s>>i&1)===1),t.set(o,a-c,h),i--,i===-1&&(s++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}function _a(t,e,n){const r=new ra;n.forEach(function(c){r.put(c.mode.bit,4),r.put(c.getLength(),la.getCharCountIndicator(c.mode,t)),c.write(r)});const o=Te.getSymbolTotalCodewords(t),i=He.getTotalCodewordsCount(t,e),s=(o-i)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const a=(s-r.getLengthInBits())/8;for(let c=0;c=7&&ha(c,e),ga(c,s),isNaN(r)&&(r=je.getBestMask(c,Oe.bind(null,c,n))),je.applyMask(r,c),Oe(c,n,r),{modules:c,version:e,errorCorrectionLevel:n,maskPattern:r,segments:o}}jn.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let r=Me.M,o,i;return typeof n<"u"&&(r=Me.from(n.errorCorrectionLevel,Me.M),o=me.from(n.version),i=je.from(n.maskPattern),n.toSJISFunc&&Te.setToSJISFunction(n.toSJISFunc)),ma(e,o,r,i)};var er={},pt={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(i){return[i,i]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,i=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:i,scale:i?4:s,margin:o,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},t.getImageWidth=function(r,o){const i=t.getScale(r,o);return Math.floor((r+o.margin*2)*i)},t.qrToImageData=function(r,o,i){const s=o.modules.size,a=o.modules.data,c=t.getScale(s,i),h=Math.floor((s+i.margin*2)*c),_=i.margin*c,v=[i.color.light,i.color.dark];for(let b=0;b=_&&w>=_&&b"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(h=r()),c=e.getOptions(c);const _=e.getImageWidth(i.modules.size,c),v=h.getContext("2d"),b=v.createImageData(_,_);return e.qrToImageData(b.data,i,c),n(v,h,_),v.putImageData(b,0,0),h},t.renderToDataURL=function(i,s,a){let c=a;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const h=t.render(i,s,c),_=c.type||"image/png",v=c.rendererOpts||{};return h.toDataURL(_,v.quality)}})(er);var tr={};const wa=pt;function kt(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function Le(t,e,n){let r=t+e;return typeof n<"u"&&(r+=" "+n),r}function ya(t,e,n){let r="",o=0,i=!1,s=0;for(let a=0;a0&&c>0&&t[a-1]||(r+=i?Le("M",c+n,.5+h+n):Le("m",o,0),o=0,i=!1),c+1':"",h="',_='viewBox="0 0 '+a+" "+a+'"',b=''+c+h+` +`;return typeof r=="function"&&r(null,b),b};const ba=Bs,ze=jn,nr=er,va=tr;function mt(t,e,n,r,o){const i=[].slice.call(arguments,1),s=i.length,a=typeof i[s-1]=="function";if(!a&&!ba())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(o=n,n=e,e=r=void 0):s===3&&(e.getContext&&typeof o>"u"?(o=r,r=void 0):(o=r,r=n,n=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=e,e=r=void 0):s===2&&!e.getContext&&(r=n,n=e,e=void 0),new Promise(function(c,h){try{const _=ze.create(n,r);c(t(_,e,r))}catch(_){h(_)}})}try{const c=ze.create(n,r);o(null,t(c,e,r))}catch(c){o(c)}}ae.create=ze.create;ae.toCanvas=mt.bind(null,nr.render);ae.toDataURL=mt.bind(null,nr.renderToDataURL);ae.toString=mt.bind(null,function(t,e,n){return va.render(t,n)});var Ea=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var v=Tt[e.format]||Tt.default;window.clipboardData.setData(v,t)}else _.clipboardData.clearData(),_.clipboardData.setData(e.format,t);e.onCopy&&(_.preventDefault(),e.onCopy(_.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),s.addRange(i);var h=document.execCommand("copy");if(!h)throw new Error("copy command was unsuccessful");c=!0}catch(_){n&&console.error("unable to copy using execCommand: ",_),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(v){n&&console.error("unable to copy using clipboardData: ",v),n&&console.error("falling back to prompt"),r=Ia("message"in e?e.message:Sa),window.prompt(r,t)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(i):s.removeAllRanges()),a&&document.body.removeChild(a),o()}return c}var ka=Ra;function rr(t,e){for(var n in e)t[n]=e[n];return t}function We(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function we(t){this.props=t}function or(t,e){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!s:We(this.props,o)}function r(o){return this.shouldComponentUpdate=n,O(t,o)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(we.prototype=new j).isPureReactComponent=!0,we.prototype.shouldComponentUpdate=function(t,e){return We(this.props,t)||We(this.state,e)};var Nt=N.__b;N.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Nt&&Nt(t)};var Ta=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ir(t){function e(n){var r=rr({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=Ta,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var xt=function(t,e){return t==null?null:B(B(t).map(e))},sr={map:xt,forEach:xt,count:function(t){return t?B(t).length:0},only:function(t){var e=B(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:B},Na=N.__e;N.__e=function(t,e,n,r){if(t.then){for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e)}Na(t,e,n,r)};var Mt=N.unmount;function ar(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=rr({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return ar(r,e,n)})),t}function cr(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return cr(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function ne(){this.__u=0,this.t=null,this.__b=null}function lr(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ur(t){var e,n,r;function o(i){if(e||(e=t()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw e;return O(n,i)}return o.displayName="Lazy",o.__f=!0,o}function z(){this.u=null,this.o=null}N.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Mt&&Mt(t)},(ne.prototype=new j).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=lr(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=cr(c,c.__c.__P,c.__c.__O)}var h;for(r.setState({__a:r.__b=null});h=r.t.pop();)h.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},ne.prototype.componentWillUnmount=function(){this.t=[]},ne.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ar(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&O(W,null,t.fallback);return o&&(o.__u&=-33),[O(W,null,e.__a?null:t.children),o]};var At=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),e.i.removeChild(r)}}),ge(O(xa,{context:e.context},t.__v),e.l)}function dr(t,e){var n=O(Ma,{__v:t,i:e});return n.containerInfo=e,n}(z.prototype=new j).__a=function(t){var e=this,n=lr(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),At(e,t,r)):o()};n?n(i):i()}},z.prototype.render=function(t){this.u=null,this.o=new Map;var e=B(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},z.prototype.componentDidUpdate=z.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){At(t,n,e)})};var fr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Aa=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Oa=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,La=/[A-Z0-9]/g,Ba=typeof document<"u",Ua=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function hr(t,e,n){return e.__k==null&&(e.textContent=""),ge(t,e),typeof n=="function"&&n(),t?t.__c:null}function gr(t,e,n){return fo(t,e),typeof n=="function"&&n(),t?t.__c:null}j.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(j.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ot=N.event;function Pa(){}function qa(){return this.cancelBubble}function Da(){return this.defaultPrevented}N.event=function(t){return Ot&&(t=Ot(t)),t.persist=Pa,t.isPropagationStopped=qa,t.isDefaultPrevented=Da,t.nativeEvent=t};var wt,Fa={enumerable:!1,configurable:!0,get:function(){return this.class}},Lt=N.vnode;N.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||Ba&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Ua(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":Oa.test(i)?i=a:r.indexOf("-")===-1&&Aa.test(i)?i=i.replace(La,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=B(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=B(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Fa)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),e.props=o}(t),t.$$typeof=fr,Lt&&Lt(t)};var Bt=N.__r;N.__r=function(t){Bt&&Bt(t),wt=t.__c};var Ut=N.diffed;N.diffed=function(t){Ut&&Ut(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),wt=null};var _r={ReactCurrentDispatcher:{current:{readContext:function(t){return wt.__n[t.__c].props.value}}}},$a="17.0.2";function pr(t){return O.bind(null,t)}function le(t){return!!t&&t.$$typeof===fr}function mr(t){return le(t)&&t.type===W}function wr(t){return le(t)?ho.apply(null,arguments):t}function yr(t){return!!t.__k&&(ge(null,t),!0)}function br(t){return t&&(t.base||t.nodeType===1&&t)||null}var vr=function(t,e){return t(e)},Er=function(t,e){return t(e)},Cr=W;function yt(t){t()}function Sr(t){return t}function Ir(){return[!1,yt]}var Rr=ye,kr=le;function Tr(t,e){var n=e(),r=Je({h:{__:n,v:e}}),o=r[0].h,i=r[1];return ye(function(){o.__=n,o.v=e,Be(o)&&i({h:o})},[t,n,e]),Qe(function(){return Be(o)&&i({h:o}),t(function(){Be(o)&&i({h:o})})},[t]),n}function Be(t){var e,n,r=t.v,o=t.__;try{var i=r();return!((e=o)===(n=i)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}var ja={useState:Je,useId:$t,useReducer:jt,useEffect:Qe,useLayoutEffect:ye,useInsertionEffect:Rr,useTransition:Ir,useDeferredValue:Sr,useSyncExternalStore:Tr,startTransition:yt,useRef:Ht,useImperativeHandle:zt,useMemo:Wt,useCallback:Vt,useContext:Jt,useDebugValue:Qt,version:"17.0.2",Children:sr,render:hr,hydrate:gr,unmountComponentAtNode:yr,createPortal:dr,createElement:O,createContext:Kt,createFactory:pr,cloneElement:wr,createRef:Yt,Fragment:W,isValidElement:le,isElement:kr,isFragment:mr,findDOMNode:br,Component:j,PureComponent:we,memo:or,forwardRef:ir,flushSync:Er,unstable_batchedUpdates:vr,StrictMode:Cr,Suspense:ne,SuspenseList:z,lazy:ur,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:_r};const Ha=Object.freeze(Object.defineProperty({__proto__:null,Children:sr,Component:j,Fragment:W,PureComponent:we,StrictMode:Cr,Suspense:ne,SuspenseList:z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:_r,cloneElement:wr,createContext:Kt,createElement:O,createFactory:pr,createPortal:dr,createRef:Yt,default:ja,findDOMNode:br,flushSync:Er,forwardRef:ir,hydrate:gr,isElement:kr,isFragment:mr,isValidElement:le,lazy:ur,memo:or,render:hr,startTransition:yt,unmountComponentAtNode:yr,unstable_batchedUpdates:vr,useCallback:Vt,useContext:Jt,useDebugValue:Qt,useDeferredValue:Sr,useEffect:Qe,useErrorBoundary:go,useId:$t,useImperativeHandle:zt,useInsertionEffect:Rr,useLayoutEffect:ye,useMemo:Wt,useReducer:jt,useRef:Ht,useState:Je,useSyncExternalStore:Tr,useTransition:Ir,version:$a},Symbol.toStringTag,{value:"Module"})),za=Ft(Ha);function Nr(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var T=Ls,xr=Nr(ae),Wa=Nr(ka),p=za;function Va(t){xr.toString(t,{type:"terminal"}).then(console.log)}var Ja=`:root { + --animation-duration: 300ms; +} + +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +@keyframes fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} + +.animated { + animation-duration: var(--animation-duration); + animation-fill-mode: both; +} + +.fadeIn { + animation-name: fadeIn; +} + +.fadeOut { + animation-name: fadeOut; +} + +#walletconnect-wrapper { + -webkit-user-select: none; + align-items: center; + display: flex; + height: 100%; + justify-content: center; + left: 0; + pointer-events: none; + position: fixed; + top: 0; + user-select: none; + width: 100%; + z-index: 99999999999999; +} + +.walletconnect-modal__headerLogo { + height: 21px; +} + +.walletconnect-modal__header p { + color: #ffffff; + font-size: 20px; + font-weight: 600; + margin: 0; + align-items: flex-start; + display: flex; + flex: 1; + margin-left: 5px; +} + +.walletconnect-modal__close__wrapper { + position: absolute; + top: 0px; + right: 0px; + z-index: 10000; + background: white; + border-radius: 26px; + padding: 6px; + box-sizing: border-box; + width: 26px; + height: 26px; + cursor: pointer; +} + +.walletconnect-modal__close__icon { + position: relative; + top: 7px; + right: 0; + display: flex; + align-items: center; + justify-content: center; + transform: rotate(45deg); +} + +.walletconnect-modal__close__line1 { + position: absolute; + width: 100%; + border: 1px solid rgb(48, 52, 59); +} + +.walletconnect-modal__close__line2 { + position: absolute; + width: 100%; + border: 1px solid rgb(48, 52, 59); + transform: rotate(90deg); +} + +.walletconnect-qrcode__base { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + background: rgba(37, 41, 46, 0.95); + height: 100%; + left: 0; + pointer-events: auto; + position: fixed; + top: 0; + transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1); + width: 100%; + will-change: opacity; + padding: 40px; + box-sizing: border-box; +} + +.walletconnect-qrcode__text { + color: rgba(60, 66, 82, 0.6); + font-size: 16px; + font-weight: 600; + letter-spacing: 0; + line-height: 1.1875em; + margin: 10px 0 20px 0; + text-align: center; + width: 100%; +} + +@media only screen and (max-width: 768px) { + .walletconnect-qrcode__text { + font-size: 4vw; + } +} + +@media only screen and (max-width: 320px) { + .walletconnect-qrcode__text { + font-size: 14px; + } +} + +.walletconnect-qrcode__image { + width: calc(100% - 30px); + box-sizing: border-box; + cursor: none; + margin: 0 auto; +} + +.walletconnect-qrcode__notification { + position: absolute; + bottom: 0; + left: 0; + right: 0; + font-size: 16px; + padding: 16px 20px; + border-radius: 16px; + text-align: center; + transition: all 0.1s ease-in-out; + background: white; + color: black; + margin-bottom: -60px; + opacity: 0; +} + +.walletconnect-qrcode__notification.notification__show { + opacity: 1; +} + +@media only screen and (max-width: 768px) { + .walletconnect-modal__header { + height: 130px; + } + .walletconnect-modal__base { + overflow: auto; + } +} + +@media only screen and (min-device-width: 415px) and (max-width: 768px) { + #content { + max-width: 768px; + box-sizing: border-box; + } +} + +@media only screen and (min-width: 375px) and (max-width: 415px) { + #content { + max-width: 414px; + box-sizing: border-box; + } +} + +@media only screen and (min-width: 320px) and (max-width: 375px) { + #content { + max-width: 375px; + box-sizing: border-box; + } +} + +@media only screen and (max-width: 320px) { + #content { + max-width: 320px; + box-sizing: border-box; + } +} + +.walletconnect-modal__base { + -webkit-font-smoothing: antialiased; + background: #ffffff; + border-radius: 24px; + box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4); + font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font, + -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, + "Open Sans", "Helvetica Neue", sans-serif; + margin-top: 41px; + padding: 24px 24px 22px; + pointer-events: auto; + position: relative; + text-align: center; + transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1); + will-change: transform; + overflow: visible; + transform: translateY(-50%); + top: 50%; + max-width: 500px; + margin: auto; +} + +@media only screen and (max-width: 320px) { + .walletconnect-modal__base { + padding: 24px 12px; + } +} + +.walletconnect-modal__base .hidden { + transform: translateY(150%); + transition: 0.125s cubic-bezier(0.4, 0, 1, 1); +} + +.walletconnect-modal__header { + align-items: center; + display: flex; + height: 26px; + left: 0; + justify-content: space-between; + position: absolute; + top: -42px; + width: 100%; +} + +.walletconnect-modal__base .wc-logo { + align-items: center; + display: flex; + height: 26px; + margin-top: 15px; + padding-bottom: 15px; + pointer-events: auto; +} + +.walletconnect-modal__base .wc-logo div { + background-color: #3399ff; + height: 21px; + margin-right: 5px; + mask-image: url("images/wc-logo.svg") center no-repeat; + width: 32px; +} + +.walletconnect-modal__base .wc-logo p { + color: #ffffff; + font-size: 20px; + font-weight: 600; + margin: 0; +} + +.walletconnect-modal__base h2 { + color: rgba(60, 66, 82, 0.6); + font-size: 16px; + font-weight: 600; + letter-spacing: 0; + line-height: 1.1875em; + margin: 0 0 19px 0; + text-align: center; + width: 100%; +} + +.walletconnect-modal__base__row { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + align-items: center; + border-radius: 20px; + cursor: pointer; + display: flex; + height: 56px; + justify-content: space-between; + padding: 0 15px; + position: relative; + margin: 0px 0px 8px; + text-align: left; + transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94); + will-change: transform; + text-decoration: none; +} + +.walletconnect-modal__base__row:hover { + background: rgba(60, 66, 82, 0.06); +} + +.walletconnect-modal__base__row:active { + background: rgba(60, 66, 82, 0.06); + transform: scale(0.975); + transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94); +} + +.walletconnect-modal__base__row__h3 { + color: #25292e; + font-size: 20px; + font-weight: 700; + margin: 0; + padding-bottom: 3px; +} + +.walletconnect-modal__base__row__right { + align-items: center; + display: flex; + justify-content: center; +} + +.walletconnect-modal__base__row__right__app-icon { + border-radius: 8px; + height: 34px; + margin: 0 11px 2px 0; + width: 34px; + background-size: 100%; + box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25); +} + +.walletconnect-modal__base__row__right__caret { + height: 18px; + opacity: 0.3; + transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94); + width: 8px; + will-change: opacity; +} + +.walletconnect-modal__base__row:hover .caret, +.walletconnect-modal__base__row:active .caret { + opacity: 0.6; +} + +.walletconnect-modal__mobile__toggle { + width: 80%; + display: flex; + margin: 0 auto; + position: relative; + overflow: hidden; + border-radius: 8px; + margin-bottom: 18px; + background: #d4d5d9; +} + +.walletconnect-modal__single_wallet { + display: flex; + justify-content: center; + margin-top: 7px; + margin-bottom: 18px; +} + +.walletconnect-modal__single_wallet a { + cursor: pointer; + color: rgb(64, 153, 255); + font-size: 21px; + font-weight: 800; + text-decoration: none !important; + margin: 0 auto; +} + +.walletconnect-modal__mobile__toggle_selector { + width: calc(50% - 8px); + background: white; + position: absolute; + border-radius: 5px; + height: calc(100% - 8px); + top: 4px; + transition: all 0.2s ease-in-out; + transform: translate3d(4px, 0, 0); +} + +.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector { + transform: translate3d(calc(100% + 12px), 0, 0); +} + +.walletconnect-modal__mobile__toggle a { + font-size: 12px; + width: 50%; + text-align: center; + padding: 8px; + margin: 0; + font-weight: 600; + z-index: 1; +} + +.walletconnect-modal__footer { + display: flex; + justify-content: center; + margin-top: 20px; +} + +@media only screen and (max-width: 768px) { + .walletconnect-modal__footer { + margin-top: 5vw; + } +} + +.walletconnect-modal__footer a { + cursor: pointer; + color: #898d97; + font-size: 15px; + margin: 0 auto; +} + +@media only screen and (max-width: 320px) { + .walletconnect-modal__footer a { + font-size: 14px; + } +} + +.walletconnect-connect__buttons__wrapper { + max-height: 44vh; +} + +.walletconnect-connect__buttons__wrapper__android { + margin: 50% 0; +} + +.walletconnect-connect__buttons__wrapper__wrap { + display: grid; + grid-template-columns: repeat(4, 1fr); + margin: 10px 0; +} + +@media only screen and (min-width: 768px) { + .walletconnect-connect__buttons__wrapper__wrap { + margin-top: 40px; + } +} + +.walletconnect-connect__button { + background-color: rgb(64, 153, 255); + padding: 12px; + border-radius: 8px; + text-decoration: none; + color: rgb(255, 255, 255); + font-weight: 500; +} + +.walletconnect-connect__button__icon_anchor { + cursor: pointer; + display: flex; + justify-content: flex-start; + align-items: center; + margin: 8px; + width: 42px; + justify-self: center; + flex-direction: column; + text-decoration: none !important; +} + +@media only screen and (max-width: 320px) { + .walletconnect-connect__button__icon_anchor { + margin: 4px; + } +} + +.walletconnect-connect__button__icon { + border-radius: 10px; + height: 42px; + margin: 0; + width: 42px; + background-size: cover !important; + box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25); +} + +.walletconnect-connect__button__text { + color: #424952; + font-size: 2.7vw; + text-decoration: none !important; + padding: 0; + margin-top: 1.8vw; + font-weight: 600; +} + +@media only screen and (min-width: 768px) { + .walletconnect-connect__button__text { + font-size: 16px; + margin-top: 12px; + } +} + +.walletconnect-search__input { + border: none; + background: #d4d5d9; + border-style: none; + padding: 8px 16px; + outline: none; + font-style: normal; + font-stretch: normal; + font-size: 16px; + font-style: normal; + font-stretch: normal; + line-height: normal; + letter-spacing: normal; + text-align: left; + border-radius: 8px; + width: calc(100% - 16px); + margin: 0; + margin-bottom: 8px; +} +`;typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function Qa(t,e){try{var n=t()}catch(r){return e(r)}return n&&n.then?n.then(void 0,e):n}var Ka="data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg width='300px' height='185px' viewBox='0 0 300 185' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 49.3 (51167) - http://www.bohemiancoding.com/sketch --%3E %3Ctitle%3EWalletConnect%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cdefs%3E%3C/defs%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='walletconnect-logo-alt' fill='%233B99FC' fill-rule='nonzero'%3E %3Cpath d='M61.4385429,36.2562612 C110.349767,-11.6319051 189.65053,-11.6319051 238.561752,36.2562612 L244.448297,42.0196786 C246.893858,44.4140867 246.893858,48.2961898 244.448297,50.690599 L224.311602,70.406102 C223.088821,71.6033071 221.106302,71.6033071 219.883521,70.406102 L211.782937,62.4749541 C177.661245,29.0669724 122.339051,29.0669724 88.2173582,62.4749541 L79.542302,70.9685592 C78.3195204,72.1657633 76.337001,72.1657633 75.1142214,70.9685592 L54.9775265,51.2530561 C52.5319653,48.8586469 52.5319653,44.9765439 54.9775265,42.5821357 L61.4385429,36.2562612 Z M280.206339,77.0300061 L298.128036,94.5769031 C300.573585,96.9713 300.573599,100.85338 298.128067,103.247793 L217.317896,182.368927 C214.872352,184.763353 210.907314,184.76338 208.461736,182.368989 C208.461726,182.368979 208.461714,182.368967 208.461704,182.368957 L151.107561,126.214385 C150.496171,125.615783 149.504911,125.615783 148.893521,126.214385 C148.893517,126.214389 148.893514,126.214393 148.89351,126.214396 L91.5405888,182.368927 C89.095052,184.763359 85.1300133,184.763399 82.6844276,182.369014 C82.6844133,182.369 82.684398,182.368986 82.6843827,182.36897 L1.87196327,103.246785 C-0.573596939,100.852377 -0.573596939,96.9702735 1.87196327,94.5758653 L19.7936929,77.028998 C22.2392531,74.6345898 26.2042918,74.6345898 28.6498531,77.028998 L86.0048306,133.184355 C86.6162214,133.782957 87.6074796,133.782957 88.2188704,133.184355 C88.2188796,133.184346 88.2188878,133.184338 88.2188969,133.184331 L145.571,77.028998 C148.016505,74.6345347 151.981544,74.6344449 154.427161,77.028798 C154.427195,77.0288316 154.427229,77.0288653 154.427262,77.028899 L211.782164,133.184331 C212.393554,133.782932 213.384814,133.782932 213.996204,133.184331 L271.350179,77.0300061 C273.79574,74.6355969 277.760778,74.6355969 280.206339,77.0300061 Z' id='WalletConnect'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E",Ya="WalletConnect",Ga=300,Za="rgb(64, 153, 255)",Mr="walletconnect-wrapper",Pt="walletconnect-style-sheet",Ar="walletconnect-qrcode-modal",Xa="walletconnect-qrcode-close",Or="walletconnect-qrcode-text",ec="walletconnect-connect-button";function tc(t){return p.createElement("div",{className:"walletconnect-modal__header"},p.createElement("img",{src:Ka,className:"walletconnect-modal__headerLogo"}),p.createElement("p",null,Ya),p.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:t.onClose},p.createElement("div",{id:Xa,className:"walletconnect-modal__close__icon"},p.createElement("div",{className:"walletconnect-modal__close__line1"}),p.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function nc(t){return p.createElement("a",{className:"walletconnect-connect__button",href:t.href,id:ec+"-"+t.name,onClick:t.onClick,rel:"noopener noreferrer",style:{backgroundColor:t.color},target:"_blank"},t.name)}var rc="data:image/svg+xml,%3Csvg width='8' height='18' viewBox='0 0 8 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.586301 0.213898C0.150354 0.552968 0.0718197 1.18124 0.41089 1.61719L5.2892 7.88931C5.57007 8.25042 5.57007 8.75608 5.2892 9.11719L0.410889 15.3893C0.071819 15.8253 0.150353 16.4535 0.586301 16.7926C1.02225 17.1317 1.65052 17.0531 1.98959 16.6172L6.86791 10.3451C7.7105 9.26174 7.7105 7.74476 6.86791 6.66143L1.98959 0.38931C1.65052 -0.0466374 1.02225 -0.125172 0.586301 0.213898Z' fill='%233C4252'/%3E %3C/svg%3E";function oc(t){var e=t.color,n=t.href,r=t.name,o=t.logo,i=t.onClick;return p.createElement("a",{className:"walletconnect-modal__base__row",href:n,onClick:i,rel:"noopener noreferrer",target:"_blank"},p.createElement("h3",{className:"walletconnect-modal__base__row__h3"},r),p.createElement("div",{className:"walletconnect-modal__base__row__right"},p.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+o+"') "+e,backgroundSize:"100%"}}),p.createElement("img",{src:rc,className:"walletconnect-modal__base__row__right__caret"})))}function ic(t){var e=t.color,n=t.href,r=t.name,o=t.logo,i=t.onClick,s=window.innerWidth<768?(r.length>8?2.5:2.7)+"vw":"inherit";return p.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n,onClick:i,rel:"noopener noreferrer",target:"_blank"},p.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+o+"') "+e,backgroundSize:"100%"}}),p.createElement("div",{style:{fontSize:s},className:"walletconnect-connect__button__text"},r))}var sc=5,Ue=12;function ac(t){var e=T.isAndroid(),n=p.useState(""),r=n[0],o=n[1],i=p.useState(""),s=i[0],a=i[1],c=p.useState(1),h=c[0],_=c[1],v=s?t.links.filter(function(u){return u.name.toLowerCase().includes(s.toLowerCase())}):t.links,b=t.errorMessage,w=s||v.length>sc,E=Math.ceil(v.length/Ue),C=[(h-1)*Ue+1,h*Ue],I=v.length?v.filter(function(u,g){return g+1>=C[0]&&g+1<=C[1]}):[],l=!e&&E>1,d=void 0;function f(u){o(u.target.value),clearTimeout(d),u.target.value?d=setTimeout(function(){a(u.target.value),_(1)},1e3):(o(""),a(""),_(1))}return p.createElement("div",null,p.createElement("p",{id:Or,className:"walletconnect-qrcode__text"},e?t.text.connect_mobile_wallet:t.text.choose_preferred_wallet),!e&&p.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:r,onChange:f}),p.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(e?"__android":w&&v.length?"__wrap":"")},e?p.createElement(nc,{name:t.text.connect,color:Za,href:t.uri,onClick:p.useCallback(function(){T.saveMobileLinkInfo({name:"Unknown",href:t.uri})},[])}):I.length?I.map(function(u){var g=u.color,y=u.name,m=u.shortName,S=u.logo,R=T.formatIOSMobile(t.uri,u),k=p.useCallback(function(){T.saveMobileLinkInfo({name:y,href:R})},[I]);return w?p.createElement(ic,{color:g,href:R,name:m||y,logo:S,onClick:k}):p.createElement(oc,{color:g,href:R,name:y,logo:S,onClick:k})}):p.createElement(p.Fragment,null,p.createElement("p",null,b.length?t.errorMessage:t.links.length&&!v.length?t.text.no_wallets_found:t.text.loading))),l&&p.createElement("div",{className:"walletconnect-modal__footer"},Array(E).fill(0).map(function(u,g){var y=g+1,m=h===y;return p.createElement("a",{style:{margin:"auto 10px",fontWeight:m?"bold":"normal"},onClick:function(){return _(y)}},y)})))}function cc(t){var e=!!t.message.trim();return p.createElement("div",{className:"walletconnect-qrcode__notification"+(e?" notification__show":"")},t.message)}var lc=function(t){try{var e="";return Promise.resolve(xr.toString(t,{margin:0,type:"svg"})).then(function(n){return typeof n=="string"&&(e=n.replace("0||p.useEffect(function(){var X=function(){try{if(e)return Promise.resolve();s(!0);var x=Qa(function(){var ee=t.qrcodeModalOptions&&t.qrcodeModalOptions.registryUrl?t.qrcodeModalOptions.registryUrl:T.getWalletRegistryUrl();return Promise.resolve(fetch(ee)).then(function(Ur){return Promise.resolve(Ur.json()).then(function(Pr){var qr=Pr.listings,Dr=n?"mobile":"desktop",ue=T.getMobileLinkRegistry(T.formatMobileRegistry(qr,Dr),r);s(!1),h(!0),R(ue.length?"":t.text.no_supported_wallets),y(ue);var bt=ue.length===1;bt&&(I(T.formatIOSMobile(t.uri,ue[0])),b(!0)),f(bt)})})},function(ee){s(!1),h(!0),R(t.text.something_went_wrong),console.error(ee)});return Promise.resolve(x&&x.then?x.then(function(){}):void 0)}catch(ee){return Promise.reject(ee)}};X()})};k();var F=n?v:!v;return p.createElement("div",{id:Ar,className:"walletconnect-qrcode__base animated fadeIn"},p.createElement("div",{className:"walletconnect-modal__base"},p.createElement(tc,{onClose:t.onClose}),d&&v?p.createElement("div",{className:"walletconnect-modal__single_wallet"},p.createElement("a",{onClick:function(){return T.saveMobileLinkInfo({name:g[0].name,href:C})},href:C,rel:"noopener noreferrer",target:"_blank"},t.text.connect_with+" "+(d?g[0].name:"")+" ›")):e||i||!i&&g.length?p.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(F?" right__selected":"")},p.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),n?p.createElement(p.Fragment,null,p.createElement("a",{onClick:function(){return b(!1),k()}},t.text.mobile),p.createElement("a",{onClick:function(){return b(!0)}},t.text.qrcode)):p.createElement(p.Fragment,null,p.createElement("a",{onClick:function(){return b(!0)}},t.text.qrcode),p.createElement("a",{onClick:function(){return b(!1),k()}},t.text.desktop))):null,p.createElement("div",null,v||!e&&!i&&!g.length?p.createElement(uc,Object.assign({},w)):p.createElement(ac,Object.assign({},w,{links:g,errorMessage:S})))))}var fc={choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},hc={choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},gc={choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},_c={choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},pc={choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},mc={choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},wc={choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},yc={choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"},qt={de:fc,en:hc,es:gc,fr:_c,ko:pc,pt:mc,zh:wc,fa:yc};function bc(){var t=T.getDocumentOrThrow(),e=t.getElementById(Pt);e&&t.head.removeChild(e);var n=t.createElement("style");n.setAttribute("id",Pt),n.innerText=Ja,t.head.appendChild(n)}function vc(){var t=T.getDocumentOrThrow(),e=t.createElement("div");return e.setAttribute("id",Mr),t.body.appendChild(e),e}function Lr(){var t=T.getDocumentOrThrow(),e=t.getElementById(Ar);e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout(function(){var n=t.getElementById(Mr);n&&t.body.removeChild(n)},Ga))}function Ec(t){return function(){Lr(),t&&t()}}function Cc(){var t=T.getNavigatorOrThrow().language.split("-")[0]||"en";return qt[t]||qt.en}function Sc(t,e,n){bc();var r=vc();p.render(p.createElement(dc,{text:Cc(),uri:t,onClose:Ec(e),qrcodeModalOptions:n}),r)}function Ic(){Lr()}var Br=function(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"};function Rc(t,e,n){console.log(t),Br()?Va(t):Sc(t,e,n)}function kc(){Br()||Ic()}var Tc={open:Rc,close:kc},Nc=Tc;const xc=Ve(Nc);class Mc extends Hr{constructor(e){super(),this.events=new Dt,this.accounts=[],this.chainId=1,this.pending=!1,this.bridge="https://bridge.walletconnect.org",this.qrcode=!0,this.qrcodeModalOptions=void 0,this.opts=e,this.chainId=(e==null?void 0:e.chainId)||this.chainId,this.wc=this.register(e)}get connected(){return typeof this.wc<"u"&&this.wc.connected}get connecting(){return this.pending}get connector(){return this.wc=this.register(this.opts),this.wc}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async open(e){if(this.connected){this.onOpen();return}return new Promise((n,r)=>{this.on("error",o=>{r(o)}),this.on("open",()=>{n()}),this.create(e)})}async close(){typeof this.wc>"u"||(this.wc.connected&&this.wc.killSession(),this.onClose())}async send(e){this.wc=this.register(this.opts),this.connected||await this.open(),this.sendPayload(e).then(n=>this.events.emit("payload",n)).catch(n=>this.events.emit("payload",vt(e.id,n.message)))}register(e){if(this.wc)return this.wc;this.opts=e||this.opts,this.bridge=e!=null&&e.connector?e.connector.bridge:(e==null?void 0:e.bridge)||"https://bridge.walletconnect.org",this.qrcode=typeof(e==null?void 0:e.qrcode)>"u"||e.qrcode!==!1,this.chainId=typeof(e==null?void 0:e.chainId)<"u"?e.chainId:this.chainId,this.qrcodeModalOptions=e==null?void 0:e.qrcodeModalOptions;const n={bridge:this.bridge,qrcodeModal:this.qrcode?xc:void 0,qrcodeModalOptions:this.qrcodeModalOptions,storageId:e==null?void 0:e.storageId,signingMethods:e==null?void 0:e.signingMethods,clientMeta:e==null?void 0:e.clientMeta};if(this.wc=typeof(e==null?void 0:e.connector)<"u"?e.connector:new Os(n),typeof this.wc>"u")throw new Error("Failed to register WalletConnect connector");return this.wc.accounts.length&&(this.accounts=this.wc.accounts),this.wc.chainId&&(this.chainId=this.wc.chainId),this.registerConnectorEvents(),this.wc}onOpen(e){this.pending=!1,e&&(this.wc=e),this.events.emit("open")}onClose(){this.pending=!1,this.wc&&(this.wc=void 0),this.events.emit("close")}onError(e,n="Failed or Rejected Request",r=-32e3){const o={id:e.id,jsonrpc:e.jsonrpc,error:{code:r,message:n}};return this.events.emit("payload",o),o}create(e){this.wc=this.register(this.opts),this.chainId=e||this.chainId,!(this.connected||this.pending)&&(this.pending=!0,this.registerConnectorEvents(),this.wc.createSession({chainId:this.chainId}).then(()=>this.events.emit("created")).catch(n=>this.events.emit("error",n)))}registerConnectorEvents(){this.wc=this.register(this.opts),this.wc.on("connect",e=>{var n,r;if(e){this.events.emit("error",e);return}this.accounts=((n=this.wc)===null||n===void 0?void 0:n.accounts)||[],this.chainId=((r=this.wc)===null||r===void 0?void 0:r.chainId)||this.chainId,this.onOpen()}),this.wc.on("disconnect",e=>{if(e){this.events.emit("error",e);return}this.onClose()}),this.wc.on("modal_closed",()=>{this.events.emit("error",new Error("User closed modal"))}),this.wc.on("session_update",(e,n)=>{const{accounts:r,chainId:o}=n.params[0];(!this.accounts||r&&this.accounts!==r)&&(this.accounts=r,this.events.emit("accountsChanged",r)),(!this.chainId||o&&this.chainId!==o)&&(this.chainId=o,this.events.emit("chainChanged",o))})}async sendPayload(e){this.wc=this.register(this.opts);try{const n=await this.wc.unsafeSend(e);return this.sanitizeResponse(n)}catch(n){return this.onError(e,n.message)}}sanitizeResponse(e){return typeof e.error<"u"&&typeof e.error.code>"u"?vt(e.id,e.error.message,e.error.data):e}}class qc{constructor(e){this.events=new Dt,this.rpc={infuraId:e==null?void 0:e.infuraId,custom:e==null?void 0:e.rpc},this.signer=new Et(new Mc(e));const n=this.signer.connection.chainId||(e==null?void 0:e.chainId)||1;this.http=this.setHttpProvider(n),this.registerEventListeners()}get connected(){return this.signer.connection.connected}get connector(){return this.signer.connection.connector}get accounts(){return this.signer.connection.accounts}get chainId(){return this.signer.connection.chainId}get rpcUrl(){var e;return((e=this.http)===null||e===void 0?void 0:e.connection).url||""}async request(e){switch(e.method){case"eth_requestAccounts":return await this.connect(),this.signer.connection.accounts;case"eth_accounts":return this.signer.connection.accounts;case"eth_chainId":return this.signer.connection.chainId}if(Ke.includes(e.method))return this.signer.request(e);if(typeof this.http>"u")throw new Error(`Cannot request JSON-RPC method (${e.method}) without provided rpc url`);return this.http.request(e)}sendAsync(e,n){this.request(e).then(r=>n(null,r)).catch(r=>n(r,void 0))}async enable(){return await this.request({method:"eth_requestAccounts"})}async connect(){this.signer.connection.connected||await this.signer.connect()}async disconnect(){this.signer.connection.connected&&await this.signer.disconnect()}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}removeListener(e,n){this.events.removeListener(e,n)}off(e,n){this.events.off(e,n)}get isWalletConnect(){return!0}registerEventListeners(){this.signer.connection.on("accountsChanged",e=>{this.events.emit("accountsChanged",e)}),this.signer.connection.on("chainChanged",e=>{this.http=this.setHttpProvider(e),this.events.emit("chainChanged",e)}),this.signer.on("disconnect",()=>{this.events.emit("disconnect")})}setHttpProvider(e){const n=Cn(e,this.rpc);return typeof n>"u"?void 0:new Et(new zr(n))}}export{qc as default}; diff --git a/examples/vite/dist/assets/index.es-29295ced.js b/examples/vite/dist/assets/index.es-29295ced.js new file mode 100644 index 0000000000..e2a92827e2 --- /dev/null +++ b/examples/vite/dist/assets/index.es-29295ced.js @@ -0,0 +1,53 @@ +import{e as Ec,f as ie,h as Zv,w as Dl,r as Ll,i as Ic,t as ga,j as em,k as tm,m as _i,D as rm,o as im,N as X,p as nm,q as cc,s as sm,V as am,R as om,F as Fh,K as cm,x as um,L as hm,u as Dh,$ as lm,v as fm,y as Bn,Z as Lh,J as pm,X as dm,_ as ql,z as Fr,A as gm,B as ym,C as hn,E as $t,U as tr,G as wi,H as hr,I as vm,M as ln,O as jl,P as mm,Q as wm,S as _m,T as zl,W as bm,Y as Ml,a0 as Ul,a1 as fn,a2 as uc,a3 as oa,a4 as pn,a5 as Em,a6 as ca,a7 as Im,a8 as xm,a9 as Sm,aa as ta,ab as Pm,ac as Om,ad as Bo,ae as qh,af as Cm,ag as Am,ah as Tm,ai as jh,aj as Rm,ak as Nm,al as $m,am as Fm,an as Dm,ao as Lm,ap as qm,aq as Un,ar as Hl,as as Vo,at as jm,au as zm,av as Mm}from"./index-5c4ca410.js";import{e as kr,E as xc}from"./events-741c5e9f.js";import{s as Wn,a as ya,i as zh,c as Um,b as Hm,f as Sc,p as km,J as si,d as Pc,e as Oc,g as Cc,h as mi,j as ni,k as Kn,l as Km,m as Bm,H as Ii}from"./http-d8520fe3.js";import"@safe-globalThis/safe-apps-provider";import"@safe-globalThis/safe-apps-sdk";const Vm=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Gm=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Wm=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Jm(o,i){if(o==="__proto__"||o==="constructor"&&i&&typeof i=="object"&&"prototype"in i){Qm(o);return}return i}function Qm(o){console.warn(`[destr] Dropping "${o}" key to prevent prototype pollution.`)}function ra(o,i={}){if(typeof o!="string")return o;const t=o.trim();if(o[0]==='"'&&o.at(-1)==='"'&&!o.includes("\\"))return t.slice(1,-1);if(t.length<=9){const n=t.toLowerCase();if(n==="true")return!0;if(n==="false")return!1;if(n==="undefined")return;if(n==="null")return null;if(n==="nan")return Number.NaN;if(n==="infinity")return Number.POSITIVE_INFINITY;if(n==="-infinity")return Number.NEGATIVE_INFINITY}if(!Wm.test(o)){if(i.strict)throw new SyntaxError("[destr] Invalid JSON");return o}try{if(Vm.test(o)||Gm.test(o)){if(i.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(o,Jm)}return JSON.parse(o)}catch(n){if(i.strict)throw n;return o}}function Ym(o){return!o||typeof o.then!="function"?Promise.resolve(o):o}function Mt(o,...i){try{return Ym(o(...i))}catch(t){return Promise.reject(t)}}function Xm(o){const i=typeof o;return o===null||i!=="object"&&i!=="function"}function Zm(o){const i=Object.getPrototypeOf(o);return!i||i.isPrototypeOf(Object)}function ua(o){if(Xm(o))return String(o);if(Zm(o)||Array.isArray(o))return JSON.stringify(o);if(typeof o.toJSON=="function")return ua(o.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function kl(){if(typeof Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const hc="base64:";function e1(o){if(typeof o=="string")return o;kl();const i=Buffer.from(o).toString("base64");return hc+i}function t1(o){return typeof o!="string"||!o.startsWith(hc)?o:(kl(),Buffer.from(o.slice(hc.length),"base64"))}function ur(o){return o?o.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function r1(...o){return ur(o.join(":"))}function ia(o){return o=ur(o),o?o+":":""}const i1="memory",n1=()=>{const o=new Map;return{name:i1,options:{},hasItem(i){return o.has(i)},getItem(i){return o.get(i)??null},getItemRaw(i){return o.get(i)??null},setItem(i,t){o.set(i,t)},setItemRaw(i,t){o.set(i,t)},removeItem(i){o.delete(i)},getKeys(){return Array.from(o.keys())},clear(){o.clear()},dispose(){o.clear()}}};function s1(o={}){const i={mounts:{"":o.driver||n1()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=d=>{for(const _ of i.mountpoints)if(d.startsWith(_))return{base:_,relativeKey:d.slice(_.length),driver:i.mounts[_]};return{base:"",relativeKey:d,driver:i.mounts[""]}},n=(d,_)=>i.mountpoints.filter(O=>O.startsWith(d)||_&&d.startsWith(O)).map(O=>({relativeBase:d.length>O.length?d.slice(O.length):void 0,mountpoint:O,driver:i.mounts[O]})),a=(d,_)=>{if(i.watching){_=ur(_);for(const O of i.watchListeners)O(d,_)}},u=async()=>{if(!i.watching){i.watching=!0;for(const d in i.mounts)i.unwatch[d]=await Mh(i.mounts[d],a,d)}},f=async()=>{if(i.watching){for(const d in i.unwatch)await i.unwatch[d]();i.unwatch={},i.watching=!1}},y=(d,_,O)=>{const P=new Map,L=N=>{let K=P.get(N.base);return K||(K={driver:N.driver,base:N.base,items:[]},P.set(N.base,K)),K};for(const N of d){const K=typeof N=="string",re=ur(K?N:N.key),ce=K?void 0:N.value,ue=K||!N.options?_:{..._,...N.options},he=t(re);L(he).items.push({key:re,value:ce,relativeKey:he.relativeKey,options:ue})}return Promise.all([...P.values()].map(N=>O(N))).then(N=>N.flat())},w={hasItem(d,_={}){d=ur(d);const{relativeKey:O,driver:P}=t(d);return Mt(P.hasItem,O,_)},getItem(d,_={}){d=ur(d);const{relativeKey:O,driver:P}=t(d);return Mt(P.getItem,O,_).then(L=>ra(L))},getItems(d,_){return y(d,_,O=>O.driver.getItems?Mt(O.driver.getItems,O.items.map(P=>({key:P.relativeKey,options:P.options})),_).then(P=>P.map(L=>({key:r1(O.base,L.key),value:ra(L.value)}))):Promise.all(O.items.map(P=>Mt(O.driver.getItem,P.relativeKey,P.options).then(L=>({key:P.key,value:ra(L)})))))},getItemRaw(d,_={}){d=ur(d);const{relativeKey:O,driver:P}=t(d);return P.getItemRaw?Mt(P.getItemRaw,O,_):Mt(P.getItem,O,_).then(L=>t1(L))},async setItem(d,_,O={}){if(_===void 0)return w.removeItem(d);d=ur(d);const{relativeKey:P,driver:L}=t(d);L.setItem&&(await Mt(L.setItem,P,ua(_),O),L.watch||a("update",d))},async setItems(d,_){await y(d,_,async O=>{O.driver.setItems&&await Mt(O.driver.setItems,O.items.map(P=>({key:P.relativeKey,value:ua(P.value),options:P.options})),_),O.driver.setItem&&await Promise.all(O.items.map(P=>Mt(O.driver.setItem,P.relativeKey,ua(P.value),P.options)))})},async setItemRaw(d,_,O={}){if(_===void 0)return w.removeItem(d,O);d=ur(d);const{relativeKey:P,driver:L}=t(d);if(L.setItemRaw)await Mt(L.setItemRaw,P,_,O);else if(L.setItem)await Mt(L.setItem,P,e1(_),O);else return;L.watch||a("update",d)},async removeItem(d,_={}){typeof _=="boolean"&&(_={removeMeta:_}),d=ur(d);const{relativeKey:O,driver:P}=t(d);P.removeItem&&(await Mt(P.removeItem,O,_),(_.removeMeta||_.removeMata)&&await Mt(P.removeItem,O+"$",_),P.watch||a("remove",d))},async getMeta(d,_={}){typeof _=="boolean"&&(_={nativeOnly:_}),d=ur(d);const{relativeKey:O,driver:P}=t(d),L=Object.create(null);if(P.getMeta&&Object.assign(L,await Mt(P.getMeta,O,_)),!_.nativeOnly){const N=await Mt(P.getItem,O+"$",_).then(K=>ra(K));N&&typeof N=="object"&&(typeof N.atime=="string"&&(N.atime=new Date(N.atime)),typeof N.mtime=="string"&&(N.mtime=new Date(N.mtime)),Object.assign(L,N))}return L},setMeta(d,_,O={}){return this.setItem(d+"$",_,O)},removeMeta(d,_={}){return this.removeItem(d+"$",_)},async getKeys(d,_={}){d=ia(d);const O=n(d,!0);let P=[];const L=[];for(const N of O){const re=(await Mt(N.driver.getKeys,N.relativeBase,_)).map(ce=>N.mountpoint+ur(ce)).filter(ce=>!P.some(ue=>ce.startsWith(ue)));L.push(...re),P=[N.mountpoint,...P.filter(ce=>!ce.startsWith(N.mountpoint))]}return d?L.filter(N=>N.startsWith(d)&&!N.endsWith("$")):L.filter(N=>!N.endsWith("$"))},async clear(d,_={}){d=ia(d),await Promise.all(n(d,!1).map(async O=>{if(O.driver.clear)return Mt(O.driver.clear,O.relativeBase,_);if(O.driver.removeItem){const P=await O.driver.getKeys(O.relativeBase||"",_);return Promise.all(P.map(L=>O.driver.removeItem(L,_)))}}))},async dispose(){await Promise.all(Object.values(i.mounts).map(d=>Uh(d)))},async watch(d){return await u(),i.watchListeners.push(d),async()=>{i.watchListeners=i.watchListeners.filter(_=>_!==d),i.watchListeners.length===0&&await f()}},async unwatch(){i.watchListeners=[],await f()},mount(d,_){if(d=ia(d),d&&i.mounts[d])throw new Error(`already mounted at ${d}`);return d&&(i.mountpoints.push(d),i.mountpoints.sort((O,P)=>P.length-O.length)),i.mounts[d]=_,i.watching&&Promise.resolve(Mh(_,a,d)).then(O=>{i.unwatch[d]=O}).catch(console.error),w},async unmount(d,_=!0){d=ia(d),!(!d||!i.mounts[d])&&(i.watching&&d in i.unwatch&&(i.unwatch[d](),delete i.unwatch[d]),_&&await Uh(i.mounts[d]),i.mountpoints=i.mountpoints.filter(O=>O!==d),delete i.mounts[d])},getMount(d=""){d=ur(d)+":";const _=t(d);return{driver:_.driver,base:_.base}},getMounts(d="",_={}){return d=ur(d),n(d,_.parents).map(P=>({driver:P.driver,base:P.mountpoint}))}};return w}function Mh(o,i,t){return o.watch?o.watch((n,a)=>i(n,t+a)):()=>{}}async function Uh(o){typeof o.dispose=="function"&&await Mt(o.dispose)}function Mi(o){return new Promise((i,t)=>{o.oncomplete=o.onsuccess=()=>i(o.result),o.onabort=o.onerror=()=>t(o.error)})}function Kl(o,i){const t=indexedDB.open(o);t.onupgradeneeded=()=>t.result.createObjectStore(i);const n=Mi(t);return(a,u)=>n.then(f=>u(f.transaction(i,a).objectStore(i)))}let Go;function Jn(){return Go||(Go=Kl("keyval-store","keyval")),Go}function Hh(o,i=Jn()){return i("readonly",t=>Mi(t.get(o)))}function a1(o,i,t=Jn()){return t("readwrite",n=>(n.put(i,o),Mi(n.transaction)))}function o1(o,i=Jn()){return i("readwrite",t=>(t.delete(o),Mi(t.transaction)))}function c1(o=Jn()){return o("readwrite",i=>(i.clear(),Mi(i.transaction)))}function u1(o,i){return o.openCursor().onsuccess=function(){this.result&&(i(this.result),this.result.continue())},Mi(o.transaction)}function h1(o=Jn()){return o("readonly",i=>{if(i.getAllKeys)return Mi(i.getAllKeys());const t=[];return u1(i,n=>t.push(n.key)).then(()=>t)})}const l1="idb-keyval";var f1=(o={})=>{const i=o.base&&o.base.length>0?`${o.base}:`:"",t=a=>i+a;let n;return o.dbName&&o.storeName&&(n=Kl(o.dbName,o.storeName)),{name:l1,options:o,async hasItem(a){return!(typeof await Hh(t(a),n)>"u")},async getItem(a){return await Hh(t(a),n)??null},setItem(a,u){return a1(t(a),u,n)},removeItem(a){return o1(t(a),n)},getKeys(){return h1(n)},clear(){return c1(n)}}};const p1="WALLET_CONNECT_V2_INDEXED_DB",d1="keyvaluestorage";let g1=class{constructor(){this.indexedDb=s1({driver:f1({dbName:p1,storeName:d1})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(i=>[i.key,i.value])}async getItem(i){const t=await this.indexedDb.getItem(i);if(t!==null)return t}async setItem(i,t){await this.indexedDb.setItem(i,Wn(t))}async removeItem(i){await this.indexedDb.removeItem(i)}};var Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},ha={exports:{}};(function(){let o;function i(){}o=i,o.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},o.prototype.setItem=function(t,n){this[t]=String(n)},o.prototype.removeItem=function(t){delete this[t]},o.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(n){t[n]=void 0,delete t[n]})},o.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},o.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Wo<"u"&&Wo.localStorage?ha.exports=Wo.localStorage:typeof window<"u"&&window.localStorage?ha.exports=window.localStorage:ha.exports=new i})();function y1(o){var i;return[o[0],ya((i=o[1])!=null?i:"")]}let v1=class{constructor(){this.localStorage=ha.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(y1)}async getItem(i){const t=this.localStorage.getItem(i);if(t!==null)return ya(t)}async setItem(i,t){this.localStorage.setItem(i,Wn(t))}async removeItem(i){this.localStorage.removeItem(i)}};const m1="wc_storage_version",kh=1,w1=async(o,i,t)=>{const n=m1,a=await i.getItem(n);if(a&&a>=kh){t(i);return}const u=await o.getKeys();if(!u.length){t(i);return}const f=[];for(;u.length;){const y=u.shift();if(!y)continue;const w=y.toLowerCase();if(w.includes("wc@")||w.includes("walletconnect")||w.includes("wc_")||w.includes("wallet_connect")){const d=await o.getItem(y);await i.setItem(y,d),f.push(y)}}await i.setItem(n,kh),t(i),_1(o,f)},_1=async(o,i)=>{i.length&&i.forEach(async t=>{await o.removeItem(t)})};let b1=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const i=new v1;this.storage=i;try{const t=new g1;w1(i,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(i){return await this.initialize(),this.storage.getItem(i)}async setItem(i,t){return await this.initialize(),this.storage.setItem(i,t)}async removeItem(i){return await this.initialize(),this.storage.removeItem(i)}async initialize(){this.initialized||await new Promise(i=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),i())},20)})}};var dn={};/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var lc=function(o,i){return lc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a])},lc(o,i)};function E1(o,i){lc(o,i);function t(){this.constructor=o}o.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}var fc=function(){return fc=Object.assign||function(i){for(var t,n=1,a=arguments.length;n=0;y--)(f=o[y])&&(u=(a<3?f(u):a>3?f(i,t,u):f(i,t))||u);return a>3&&u&&Object.defineProperty(i,t,u),u}function S1(o,i){return function(t,n){i(t,n,o)}}function P1(o,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(o,i)}function O1(o,i,t,n){function a(u){return u instanceof t?u:new t(function(f){f(u)})}return new(t||(t=Promise))(function(u,f){function y(_){try{d(n.next(_))}catch(O){f(O)}}function w(_){try{d(n.throw(_))}catch(O){f(O)}}function d(_){_.done?u(_.value):a(_.value).then(y,w)}d((n=n.apply(o,i||[])).next())})}function C1(o,i){var t={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},n,a,u,f;return f={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function y(d){return function(_){return w([d,_])}}function w(d){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,a&&(u=d[0]&2?a.return:d[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,d[1])).done)return u;switch(a=0,u&&(d=[d[0]&2,u.value]),d[0]){case 0:case 1:u=d;break;case 4:return t.label++,{value:d[1],done:!1};case 5:t.label++,a=d[1],d=[0];continue;case 7:d=t.ops.pop(),t.trys.pop();continue;default:if(u=t.trys,!(u=u.length>0&&u[u.length-1])&&(d[0]===6||d[0]===2)){t=0;continue}if(d[0]===3&&(!u||d[1]>u[0]&&d[1]=o.length&&(o=void 0),{value:o&&o[n++],done:!o}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function Bl(o,i){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var n=t.call(o),a,u=[],f;try{for(;(i===void 0||i-- >0)&&!(a=n.next()).done;)u.push(a.value)}catch(y){f={error:y}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(f)throw f.error}}return u}function R1(){for(var o=[],i=0;i1||y(P,L)})})}function y(P,L){try{w(n[P](L))}catch(N){O(u[0][3],N)}}function w(P){P.value instanceof Vn?Promise.resolve(P.value.v).then(d,_):O(u[0][2],P)}function d(P){y("next",P)}function _(P){y("throw",P)}function O(P,L){P(L),u.shift(),u.length&&y(u[0][0],u[0][1])}}function F1(o){var i,t;return i={},n("next"),n("throw",function(a){throw a}),n("return"),i[Symbol.iterator]=function(){return this},i;function n(a,u){i[a]=o[a]?function(f){return(t=!t)?{value:Vn(o[a](f)),done:a==="return"}:u?u(f):f}:u}}function D1(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=o[Symbol.asyncIterator],t;return i?i.call(o):(o=typeof pc=="function"?pc(o):o[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(u){t[u]=o[u]&&function(f){return new Promise(function(y,w){f=o[u](f),a(y,w,f.done,f.value)})}}function a(u,f,y,w){Promise.resolve(w).then(function(d){u({value:d,done:y})},f)}}function L1(o,i){return Object.defineProperty?Object.defineProperty(o,"raw",{value:i}):o.raw=i,o}function q1(o){if(o&&o.__esModule)return o;var i={};if(o!=null)for(var t in o)Object.hasOwnProperty.call(o,t)&&(i[t]=o[t]);return i.default=o,i}function j1(o){return o&&o.__esModule?o:{default:o}}function z1(o,i){if(!i.has(o))throw new TypeError("attempted to get private field on non-instance");return i.get(o)}function M1(o,i,t){if(!i.has(o))throw new TypeError("attempted to set private field on non-instance");return i.set(o,t),t}const U1=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return fc},__asyncDelegator:F1,__asyncGenerator:$1,__asyncValues:D1,__await:Vn,__awaiter:O1,__classPrivateFieldGet:z1,__classPrivateFieldSet:M1,__createBinding:A1,__decorate:x1,__exportStar:T1,__extends:E1,__generator:C1,__importDefault:j1,__importStar:q1,__makeTemplateObject:L1,__metadata:P1,__param:S1,__read:Bl,__rest:I1,__spread:R1,__spreadArrays:N1,__values:pc},Symbol.toStringTag,{value:"Module"})),va=Ec(U1);var Fn={},Jo={},Dn={};class Ui{}const H1=Object.freeze(Object.defineProperty({__proto__:null,IEvents:Ui},Symbol.toStringTag,{value:"Module"})),k1=Ec(H1);var Kh;function K1(){if(Kh)return Dn;Kh=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.IHeartBeat=void 0;const o=k1;class i extends o.IEvents{constructor(n){super()}}return Dn.IHeartBeat=i,Dn}var Bh;function Vl(){return Bh||(Bh=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),va.__exportStar(K1(),o)}(Jo)),Jo}var Qo={},ji={},Vh;function B1(){if(Vh)return ji;Vh=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.HEARTBEAT_EVENTS=ji.HEARTBEAT_INTERVAL=void 0;const o=ie;return ji.HEARTBEAT_INTERVAL=o.FIVE_SECONDS,ji.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},ji}var Gh;function Gl(){return Gh||(Gh=1,function(o){Object.defineProperty(o,"__esModule",{value:!0}),va.__exportStar(B1(),o)}(Qo)),Qo}var Wh;function V1(){if(Wh)return Fn;Wh=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.HeartBeat=void 0;const o=va,i=kr,t=ie,n=Vl(),a=Gl();class u extends n.IHeartBeat{constructor(y){super(y),this.events=new i.EventEmitter,this.interval=a.HEARTBEAT_INTERVAL,this.interval=(y==null?void 0:y.interval)||a.HEARTBEAT_INTERVAL}static init(y){return o.__awaiter(this,void 0,void 0,function*(){const w=new u(y);return yield w.init(),w})}init(){return o.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(y,w){this.events.on(y,w)}once(y,w){this.events.once(y,w)}off(y,w){this.events.off(y,w)}removeListener(y,w){this.events.removeListener(y,w)}initialize(){return o.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),t.toMiliseconds(this.interval))})}pulse(){this.events.emit(a.HEARTBEAT_EVENTS.pulse)}}return Fn.HeartBeat=u,Fn}(function(o){Object.defineProperty(o,"__esModule",{value:!0});const i=va;i.__exportStar(V1(),o),i.__exportStar(Vl(),o),i.__exportStar(Gl(),o)})(dn);var Ce={};/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var dc=function(o,i){return dc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a])},dc(o,i)};function G1(o,i){dc(o,i);function t(){this.constructor=o}o.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}var gc=function(){return gc=Object.assign||function(i){for(var t,n=1,a=arguments.length;n=0;y--)(f=o[y])&&(u=(a<3?f(u):a>3?f(i,t,u):f(i,t))||u);return a>3&&u&&Object.defineProperty(i,t,u),u}function Q1(o,i){return function(t,n){i(t,n,o)}}function Y1(o,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(o,i)}function X1(o,i,t,n){function a(u){return u instanceof t?u:new t(function(f){f(u)})}return new(t||(t=Promise))(function(u,f){function y(_){try{d(n.next(_))}catch(O){f(O)}}function w(_){try{d(n.throw(_))}catch(O){f(O)}}function d(_){_.done?u(_.value):a(_.value).then(y,w)}d((n=n.apply(o,i||[])).next())})}function Z1(o,i){var t={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},n,a,u,f;return f={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function y(d){return function(_){return w([d,_])}}function w(d){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,a&&(u=d[0]&2?a.return:d[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,d[1])).done)return u;switch(a=0,u&&(d=[d[0]&2,u.value]),d[0]){case 0:case 1:u=d;break;case 4:return t.label++,{value:d[1],done:!1};case 5:t.label++,a=d[1],d=[0];continue;case 7:d=t.ops.pop(),t.trys.pop();continue;default:if(u=t.trys,!(u=u.length>0&&u[u.length-1])&&(d[0]===6||d[0]===2)){t=0;continue}if(d[0]===3&&(!u||d[1]>u[0]&&d[1]=o.length&&(o=void 0),{value:o&&o[n++],done:!o}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function Wl(o,i){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var n=t.call(o),a,u=[],f;try{for(;(i===void 0||i-- >0)&&!(a=n.next()).done;)u.push(a.value)}catch(y){f={error:y}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(f)throw f.error}}return u}function rw(){for(var o=[],i=0;i1||y(P,L)})})}function y(P,L){try{w(n[P](L))}catch(N){O(u[0][3],N)}}function w(P){P.value instanceof Gn?Promise.resolve(P.value.v).then(d,_):O(u[0][2],P)}function d(P){y("next",P)}function _(P){y("throw",P)}function O(P,L){P(L),u.shift(),u.length&&y(u[0][0],u[0][1])}}function sw(o){var i,t;return i={},n("next"),n("throw",function(a){throw a}),n("return"),i[Symbol.iterator]=function(){return this},i;function n(a,u){i[a]=o[a]?function(f){return(t=!t)?{value:Gn(o[a](f)),done:a==="return"}:u?u(f):f}:u}}function aw(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=o[Symbol.asyncIterator],t;return i?i.call(o):(o=typeof yc=="function"?yc(o):o[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(u){t[u]=o[u]&&function(f){return new Promise(function(y,w){f=o[u](f),a(y,w,f.done,f.value)})}}function a(u,f,y,w){Promise.resolve(w).then(function(d){u({value:d,done:y})},f)}}function ow(o,i){return Object.defineProperty?Object.defineProperty(o,"raw",{value:i}):o.raw=i,o}function cw(o){if(o&&o.__esModule)return o;var i={};if(o!=null)for(var t in o)Object.hasOwnProperty.call(o,t)&&(i[t]=o[t]);return i.default=o,i}function uw(o){return o&&o.__esModule?o:{default:o}}function hw(o,i){if(!i.has(o))throw new TypeError("attempted to get private field on non-instance");return i.get(o)}function lw(o,i,t){if(!i.has(o))throw new TypeError("attempted to set private field on non-instance");return i.set(o,t),t}const fw=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return gc},__asyncDelegator:sw,__asyncGenerator:nw,__asyncValues:aw,__await:Gn,__awaiter:X1,__classPrivateFieldGet:hw,__classPrivateFieldSet:lw,__createBinding:ew,__decorate:J1,__exportStar:tw,__extends:G1,__generator:Z1,__importDefault:uw,__importStar:cw,__makeTemplateObject:ow,__metadata:Y1,__param:Q1,__read:Wl,__rest:W1,__spread:rw,__spreadArrays:iw,__values:yc},Symbol.toStringTag,{value:"Module"})),pw=Ec(fw);var Yo,Jh;function dw(){if(Jh)return Yo;Jh=1;function o(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}Yo=i;function i(t,n,a){var u=a&&a.stringify||o,f=1;if(typeof t=="object"&&t!==null){var y=n.length+f;if(y===1)return t;var w=new Array(y);w[0]=u(t);for(var d=1;d-1?L:0,t.charCodeAt(K+1)){case 100:case 102:if(P>=_||n[P]==null)break;L=_||n[P]==null)break;L=_||n[P]===void 0)break;L",L=K+2,K++;break}O+=u(n[P]),L=K+2,K++;break;case 115:if(P>=_)break;L-1&&(Ee=!1);const Ae=["error","fatal","warn","info","debug","trace"];typeof W=="function"&&(W.error=W.fatal=W.warn=W.info=W.debug=W.trace=W),F.enabled===!1&&(F.level="silent");const et=F.level||"info",T=Object.create(W);T.log||(T.log=re),Object.defineProperty(T,"levelVal",{get:ze}),Object.defineProperty(T,"level",{get:Te,set:J});const z={transmit:H,serialize:te,asObject:F.browser.asObject,levels:Ae,timestamp:L(F)};T.levels=a.levels,T.level=et,T.setMaxListeners=T.getMaxListeners=T.emit=T.addListener=T.on=T.prependListener=T.once=T.prependOnceListener=T.removeListener=T.removeAllListeners=T.listeners=T.listenerCount=T.eventNames=T.write=T.flush=re,T.serializers=ye,T._serialize=te,T._stdErrSerialize=Ee,T.child=B,H&&(T._logEvent=O());function ze(){return this.level==="silent"?1/0:this.levels.values[this.level]}function Te(){return this._level}function J(k){if(k!=="silent"&&!this.levels.values[k])throw Error("unknown level "+k);this._level=k,u(z,T,"error","log"),u(z,T,"fatal","error"),u(z,T,"warn","error"),u(z,T,"info","log"),u(z,T,"debug","log"),u(z,T,"trace","log")}function B(k,V){if(!k)throw new Error("missing bindings for child Pino");V=V||{},te&&k.serializers&&(V.serializers=k.serializers);const ut=V.serializers;if(te&&ut){var He=Object.assign({},ye,ut),Dr=F.browser.serialize===!0?Object.keys(He):te;delete k.serializers,w([k],Dr,He,this._stdErrSerialize)}function _e(It){this._childLevel=(It._childLevel|0)+1,this.error=d(It,k,"error"),this.fatal=d(It,k,"fatal"),this.warn=d(It,k,"warn"),this.info=d(It,k,"info"),this.debug=d(It,k,"debug"),this.trace=d(It,k,"trace"),He&&(this.serializers=He,this._serialize=Dr),H&&(this._logEvent=O([].concat(It._logEvent.bindings,k)))}return _e.prototype=this,new _e(this)}return T}a.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},a.stdSerializers=t,a.stdTimeFunctions=Object.assign({},{nullTime:ce,epochTime:ue,unixTime:he,isoTime:fe});function u(F,H,W,ye){const te=Object.getPrototypeOf(H);H[W]=H.levelVal>H.levels.values[W]?re:te[W]?te[W]:i[W]||i[ye]||re,f(F,H,W)}function f(F,H,W){!F.transmit&&H[W]===re||(H[W]=function(ye){return function(){const Ee=F.timestamp(),Ae=new Array(arguments.length),et=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var T=0;T-1&&Ee in W&&(F[te][Ee]=W[Ee](F[te][Ee]))}function d(F,H,W){return function(){const ye=new Array(1+arguments.length);ye[0]=H;for(var te=1;te"u"?d=t(y,w):d=y.bindings().context||"",d}er.getLoggerContext=a;function u(y,w,d=o.PINO_CUSTOM_CONTEXT_KEY){const _=a(y,d);return _.trim()?`${_}/${w}`:w}er.formatChildLoggerContext=u;function f(y,w,d=o.PINO_CUSTOM_CONTEXT_KEY){const _=u(y,w,d),O=y.child({context:_});return n(O,_,d)}return er.generateChildLogger=f,er}(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.pino=void 0;const i=pw,t=i.__importDefault(gw());Object.defineProperty(o,"pino",{enumerable:!0,get:function(){return t.default}}),i.__exportStar(Jl(),o),i.__exportStar(yw(),o)})(Ce);class vw extends Ui{constructor(i){super(),this.opts=i,this.protocol="wc",this.version=2}}class mw extends Ui{constructor(i,t){super(),this.core=i,this.logger=t,this.records=new Map}}class ww{constructor(i,t){this.logger=i,this.core=t}}let _w=class extends Ui{constructor(i,t){super(),this.relayer=i,this.logger=t}},bw=class extends Ui{constructor(i){super()}},Ew=class{constructor(i,t,n,a){this.core=i,this.logger=t,this.name=n}};class Iw extends Ui{constructor(i,t){super(),this.relayer=i,this.logger=t}}let xw=class extends Ui{constructor(i,t){super(),this.core=i,this.logger=t}},Sw=class{constructor(i,t){this.projectId=i,this.logger=t}},Pw=class{constructor(i){this.opts=i,this.protocol="wc",this.version=2}},Ow=class{constructor(i){this.client=i}};var Ac={},Ql={};(function(o){Object.defineProperty(o,"__esModule",{value:!0});var i=Zv,t=Dl;o.DIGEST_LENGTH=64,o.BLOCK_SIZE=128;var n=function(){function y(){this.digestLength=o.DIGEST_LENGTH,this.blockSize=o.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return y.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},y.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},y.prototype.clean=function(){t.wipe(this._buffer),t.wipe(this._tempHi),t.wipe(this._tempLo),this.reset()},y.prototype.update=function(w,d){if(d===void 0&&(d=w.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var _=0;if(this._bytesHashed+=d,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=w[_++],d--;this._bufferLength===this.blockSize&&(u(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(d>=this.blockSize&&(_=u(this._tempHi,this._tempLo,this._stateHi,this._stateLo,w,_,d),d%=this.blockSize);d>0;)this._buffer[this._bufferLength++]=w[_++],d--;return this},y.prototype.finish=function(w){if(!this._finished){var d=this._bytesHashed,_=this._bufferLength,O=d/536870912|0,P=d<<3,L=d%128<112?128:256;this._buffer[_]=128;for(var N=_+1;N0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},y.prototype.restoreState=function(w){return this._stateHi.set(w.stateHi),this._stateLo.set(w.stateLo),this._bufferLength=w.bufferLength,w.buffer&&this._buffer.set(w.buffer),this._bytesHashed=w.bytesHashed,this._finished=!1,this},y.prototype.cleanSavedState=function(w){t.wipe(w.stateHi),t.wipe(w.stateLo),w.buffer&&t.wipe(w.buffer),w.bufferLength=0,w.bytesHashed=0},y}();o.SHA512=n;var a=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function u(y,w,d,_,O,P,L){for(var N=d[0],K=d[1],re=d[2],ce=d[3],ue=d[4],he=d[5],fe=d[6],pe=d[7],F=_[0],H=_[1],W=_[2],ye=_[3],te=_[4],Ee=_[5],Ae=_[6],et=_[7],T,z,ze,Te,J,B,k,V;L>=128;){for(var ut=0;ut<16;ut++){var He=8*ut+P;y[ut]=i.readUint32BE(O,He),w[ut]=i.readUint32BE(O,He+4)}for(var ut=0;ut<80;ut++){var Dr=N,_e=K,It=re,$=ce,R=ue,C=he,h=fe,E=pe,Z=F,oe=H,me=W,Re=ye,$e=te,xe=Ee,xt=Ae,mt=et;if(T=pe,z=et,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=(ue>>>14|te<<32-14)^(ue>>>18|te<<32-18)^(te>>>41-32|ue<<32-(41-32)),z=(te>>>14|ue<<32-14)^(te>>>18|ue<<32-18)^(ue>>>41-32|te<<32-(41-32)),J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,T=ue&he^~ue&fe,z=te&Ee^~te&Ae,J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,T=a[ut*2],z=a[ut*2+1],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,T=y[ut%16],z=w[ut%16],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,ze=k&65535|V<<16,Te=J&65535|B<<16,T=ze,z=Te,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=(N>>>28|F<<32-28)^(F>>>34-32|N<<32-(34-32))^(F>>>39-32|N<<32-(39-32)),z=(F>>>28|N<<32-28)^(N>>>34-32|F<<32-(34-32))^(N>>>39-32|F<<32-(39-32)),J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,T=N&K^N&re^K&re,z=F&H^F&W^H&W,J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,E=k&65535|V<<16,mt=J&65535|B<<16,T=$,z=Re,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=ze,z=Te,J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,$=k&65535|V<<16,Re=J&65535|B<<16,K=Dr,re=_e,ce=It,ue=$,he=R,fe=C,pe=h,N=E,H=Z,W=oe,ye=me,te=Re,Ee=$e,Ae=xe,et=xt,F=mt,ut%16===15)for(var He=0;He<16;He++)T=y[He],z=w[He],J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=y[(He+9)%16],z=w[(He+9)%16],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,ze=y[(He+1)%16],Te=w[(He+1)%16],T=(ze>>>1|Te<<32-1)^(ze>>>8|Te<<32-8)^ze>>>7,z=(Te>>>1|ze<<32-1)^(Te>>>8|ze<<32-8)^(Te>>>7|ze<<32-7),J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,ze=y[(He+14)%16],Te=w[(He+14)%16],T=(ze>>>19|Te<<32-19)^(Te>>>61-32|ze<<32-(61-32))^ze>>>6,z=(Te>>>19|ze<<32-19)^(ze>>>61-32|Te<<32-(61-32))^(Te>>>6|ze<<32-6),J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,y[He]=k&65535|V<<16,w[He]=J&65535|B<<16}T=N,z=F,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=d[0],z=_[0],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,d[0]=N=k&65535|V<<16,_[0]=F=J&65535|B<<16,T=K,z=H,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=d[1],z=_[1],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,d[1]=K=k&65535|V<<16,_[1]=H=J&65535|B<<16,T=re,z=W,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=d[2],z=_[2],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,d[2]=re=k&65535|V<<16,_[2]=W=J&65535|B<<16,T=ce,z=ye,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=d[3],z=_[3],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,d[3]=ce=k&65535|V<<16,_[3]=ye=J&65535|B<<16,T=ue,z=te,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=d[4],z=_[4],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,d[4]=ue=k&65535|V<<16,_[4]=te=J&65535|B<<16,T=he,z=Ee,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=d[5],z=_[5],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,d[5]=he=k&65535|V<<16,_[5]=Ee=J&65535|B<<16,T=fe,z=Ae,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=d[6],z=_[6],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,d[6]=fe=k&65535|V<<16,_[6]=Ae=J&65535|B<<16,T=pe,z=et,J=z&65535,B=z>>>16,k=T&65535,V=T>>>16,T=d[7],z=_[7],J+=z&65535,B+=z>>>16,k+=T&65535,V+=T>>>16,B+=J>>>16,k+=B>>>16,V+=k>>>16,d[7]=pe=k&65535|V<<16,_[7]=et=J&65535|B<<16,P+=128,L-=128}return P}function f(y){var w=new n;w.update(y);var d=w.digest();return w.clean(),d}o.hash=f})(Ql);(function(o){Object.defineProperty(o,"__esModule",{value:!0}),o.convertSecretKeyToX25519=o.convertPublicKeyToX25519=o.verify=o.sign=o.extractPublicKeyFromSecretKey=o.generateKeyPair=o.generateKeyPairFromSeed=o.SEED_LENGTH=o.SECRET_KEY_LENGTH=o.PUBLIC_KEY_LENGTH=o.SIGNATURE_LENGTH=void 0;const i=Ll,t=Ql,n=Dl;o.SIGNATURE_LENGTH=64,o.PUBLIC_KEY_LENGTH=32,o.SECRET_KEY_LENGTH=64,o.SEED_LENGTH=32;function a($){const R=new Float64Array(16);if($)for(let C=0;C<$.length;C++)R[C]=$[C];return R}const u=new Uint8Array(32);u[0]=9;const f=a(),y=a([1]),w=a([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),d=a([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),_=a([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),O=a([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),P=a([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function L($,R){for(let C=0;C<16;C++)$[C]=R[C]|0}function N($){let R=1;for(let C=0;C<16;C++){let h=$[C]+R+65535;R=Math.floor(h/65536),$[C]=h-R*65536}$[0]+=R-1+37*(R-1)}function K($,R,C){const h=~(C-1);for(let E=0;E<16;E++){const Z=h&($[E]^R[E]);$[E]^=Z,R[E]^=Z}}function re($,R){const C=a(),h=a();for(let E=0;E<16;E++)h[E]=R[E];N(h),N(h),N(h);for(let E=0;E<2;E++){C[0]=h[0]-65517;for(let oe=1;oe<15;oe++)C[oe]=h[oe]-65535-(C[oe-1]>>16&1),C[oe-1]&=65535;C[15]=h[15]-32767-(C[14]>>16&1);const Z=C[15]>>16&1;C[14]&=65535,K(h,C,1-Z)}for(let E=0;E<16;E++)$[2*E]=h[E]&255,$[2*E+1]=h[E]>>8}function ce($,R){let C=0;for(let h=0;h<32;h++)C|=$[h]^R[h];return(1&C-1>>>8)-1}function ue($,R){const C=new Uint8Array(32),h=new Uint8Array(32);return re(C,$),re(h,R),ce(C,h)}function he($){const R=new Uint8Array(32);return re(R,$),R[0]&1}function fe($,R){for(let C=0;C<16;C++)$[C]=R[2*C]+(R[2*C+1]<<8);$[15]&=32767}function pe($,R,C){for(let h=0;h<16;h++)$[h]=R[h]+C[h]}function F($,R,C){for(let h=0;h<16;h++)$[h]=R[h]-C[h]}function H($,R,C){let h,E,Z=0,oe=0,me=0,Re=0,$e=0,xe=0,xt=0,mt=0,st=0,De=0,Je=0,Qe=0,at=0,Me=0,Ye=0,Ne=0,ke=0,ht=0,qe=0,St=0,Ft=0,Ut=0,Ht=0,qt=0,Wt=0,rr=0,Lr=0,Jt=0,Kr=0,oi=0,xi=0,lt=C[0],tt=C[1],ft=C[2],pt=C[3],ot=C[4],rt=C[5],Pt=C[6],Ot=C[7],dt=C[8],Ct=C[9],gt=C[10],wt=C[11],yt=C[12],We=C[13],At=C[14],Tt=C[15];h=R[0],Z+=h*lt,oe+=h*tt,me+=h*ft,Re+=h*pt,$e+=h*ot,xe+=h*rt,xt+=h*Pt,mt+=h*Ot,st+=h*dt,De+=h*Ct,Je+=h*gt,Qe+=h*wt,at+=h*yt,Me+=h*We,Ye+=h*At,Ne+=h*Tt,h=R[1],oe+=h*lt,me+=h*tt,Re+=h*ft,$e+=h*pt,xe+=h*ot,xt+=h*rt,mt+=h*Pt,st+=h*Ot,De+=h*dt,Je+=h*Ct,Qe+=h*gt,at+=h*wt,Me+=h*yt,Ye+=h*We,Ne+=h*At,ke+=h*Tt,h=R[2],me+=h*lt,Re+=h*tt,$e+=h*ft,xe+=h*pt,xt+=h*ot,mt+=h*rt,st+=h*Pt,De+=h*Ot,Je+=h*dt,Qe+=h*Ct,at+=h*gt,Me+=h*wt,Ye+=h*yt,Ne+=h*We,ke+=h*At,ht+=h*Tt,h=R[3],Re+=h*lt,$e+=h*tt,xe+=h*ft,xt+=h*pt,mt+=h*ot,st+=h*rt,De+=h*Pt,Je+=h*Ot,Qe+=h*dt,at+=h*Ct,Me+=h*gt,Ye+=h*wt,Ne+=h*yt,ke+=h*We,ht+=h*At,qe+=h*Tt,h=R[4],$e+=h*lt,xe+=h*tt,xt+=h*ft,mt+=h*pt,st+=h*ot,De+=h*rt,Je+=h*Pt,Qe+=h*Ot,at+=h*dt,Me+=h*Ct,Ye+=h*gt,Ne+=h*wt,ke+=h*yt,ht+=h*We,qe+=h*At,St+=h*Tt,h=R[5],xe+=h*lt,xt+=h*tt,mt+=h*ft,st+=h*pt,De+=h*ot,Je+=h*rt,Qe+=h*Pt,at+=h*Ot,Me+=h*dt,Ye+=h*Ct,Ne+=h*gt,ke+=h*wt,ht+=h*yt,qe+=h*We,St+=h*At,Ft+=h*Tt,h=R[6],xt+=h*lt,mt+=h*tt,st+=h*ft,De+=h*pt,Je+=h*ot,Qe+=h*rt,at+=h*Pt,Me+=h*Ot,Ye+=h*dt,Ne+=h*Ct,ke+=h*gt,ht+=h*wt,qe+=h*yt,St+=h*We,Ft+=h*At,Ut+=h*Tt,h=R[7],mt+=h*lt,st+=h*tt,De+=h*ft,Je+=h*pt,Qe+=h*ot,at+=h*rt,Me+=h*Pt,Ye+=h*Ot,Ne+=h*dt,ke+=h*Ct,ht+=h*gt,qe+=h*wt,St+=h*yt,Ft+=h*We,Ut+=h*At,Ht+=h*Tt,h=R[8],st+=h*lt,De+=h*tt,Je+=h*ft,Qe+=h*pt,at+=h*ot,Me+=h*rt,Ye+=h*Pt,Ne+=h*Ot,ke+=h*dt,ht+=h*Ct,qe+=h*gt,St+=h*wt,Ft+=h*yt,Ut+=h*We,Ht+=h*At,qt+=h*Tt,h=R[9],De+=h*lt,Je+=h*tt,Qe+=h*ft,at+=h*pt,Me+=h*ot,Ye+=h*rt,Ne+=h*Pt,ke+=h*Ot,ht+=h*dt,qe+=h*Ct,St+=h*gt,Ft+=h*wt,Ut+=h*yt,Ht+=h*We,qt+=h*At,Wt+=h*Tt,h=R[10],Je+=h*lt,Qe+=h*tt,at+=h*ft,Me+=h*pt,Ye+=h*ot,Ne+=h*rt,ke+=h*Pt,ht+=h*Ot,qe+=h*dt,St+=h*Ct,Ft+=h*gt,Ut+=h*wt,Ht+=h*yt,qt+=h*We,Wt+=h*At,rr+=h*Tt,h=R[11],Qe+=h*lt,at+=h*tt,Me+=h*ft,Ye+=h*pt,Ne+=h*ot,ke+=h*rt,ht+=h*Pt,qe+=h*Ot,St+=h*dt,Ft+=h*Ct,Ut+=h*gt,Ht+=h*wt,qt+=h*yt,Wt+=h*We,rr+=h*At,Lr+=h*Tt,h=R[12],at+=h*lt,Me+=h*tt,Ye+=h*ft,Ne+=h*pt,ke+=h*ot,ht+=h*rt,qe+=h*Pt,St+=h*Ot,Ft+=h*dt,Ut+=h*Ct,Ht+=h*gt,qt+=h*wt,Wt+=h*yt,rr+=h*We,Lr+=h*At,Jt+=h*Tt,h=R[13],Me+=h*lt,Ye+=h*tt,Ne+=h*ft,ke+=h*pt,ht+=h*ot,qe+=h*rt,St+=h*Pt,Ft+=h*Ot,Ut+=h*dt,Ht+=h*Ct,qt+=h*gt,Wt+=h*wt,rr+=h*yt,Lr+=h*We,Jt+=h*At,Kr+=h*Tt,h=R[14],Ye+=h*lt,Ne+=h*tt,ke+=h*ft,ht+=h*pt,qe+=h*ot,St+=h*rt,Ft+=h*Pt,Ut+=h*Ot,Ht+=h*dt,qt+=h*Ct,Wt+=h*gt,rr+=h*wt,Lr+=h*yt,Jt+=h*We,Kr+=h*At,oi+=h*Tt,h=R[15],Ne+=h*lt,ke+=h*tt,ht+=h*ft,qe+=h*pt,St+=h*ot,Ft+=h*rt,Ut+=h*Pt,Ht+=h*Ot,qt+=h*dt,Wt+=h*Ct,rr+=h*gt,Lr+=h*wt,Jt+=h*yt,Kr+=h*We,oi+=h*At,xi+=h*Tt,Z+=38*ke,oe+=38*ht,me+=38*qe,Re+=38*St,$e+=38*Ft,xe+=38*Ut,xt+=38*Ht,mt+=38*qt,st+=38*Wt,De+=38*rr,Je+=38*Lr,Qe+=38*Jt,at+=38*Kr,Me+=38*oi,Ye+=38*xi,E=1,h=Z+E+65535,E=Math.floor(h/65536),Z=h-E*65536,h=oe+E+65535,E=Math.floor(h/65536),oe=h-E*65536,h=me+E+65535,E=Math.floor(h/65536),me=h-E*65536,h=Re+E+65535,E=Math.floor(h/65536),Re=h-E*65536,h=$e+E+65535,E=Math.floor(h/65536),$e=h-E*65536,h=xe+E+65535,E=Math.floor(h/65536),xe=h-E*65536,h=xt+E+65535,E=Math.floor(h/65536),xt=h-E*65536,h=mt+E+65535,E=Math.floor(h/65536),mt=h-E*65536,h=st+E+65535,E=Math.floor(h/65536),st=h-E*65536,h=De+E+65535,E=Math.floor(h/65536),De=h-E*65536,h=Je+E+65535,E=Math.floor(h/65536),Je=h-E*65536,h=Qe+E+65535,E=Math.floor(h/65536),Qe=h-E*65536,h=at+E+65535,E=Math.floor(h/65536),at=h-E*65536,h=Me+E+65535,E=Math.floor(h/65536),Me=h-E*65536,h=Ye+E+65535,E=Math.floor(h/65536),Ye=h-E*65536,h=Ne+E+65535,E=Math.floor(h/65536),Ne=h-E*65536,Z+=E-1+37*(E-1),E=1,h=Z+E+65535,E=Math.floor(h/65536),Z=h-E*65536,h=oe+E+65535,E=Math.floor(h/65536),oe=h-E*65536,h=me+E+65535,E=Math.floor(h/65536),me=h-E*65536,h=Re+E+65535,E=Math.floor(h/65536),Re=h-E*65536,h=$e+E+65535,E=Math.floor(h/65536),$e=h-E*65536,h=xe+E+65535,E=Math.floor(h/65536),xe=h-E*65536,h=xt+E+65535,E=Math.floor(h/65536),xt=h-E*65536,h=mt+E+65535,E=Math.floor(h/65536),mt=h-E*65536,h=st+E+65535,E=Math.floor(h/65536),st=h-E*65536,h=De+E+65535,E=Math.floor(h/65536),De=h-E*65536,h=Je+E+65535,E=Math.floor(h/65536),Je=h-E*65536,h=Qe+E+65535,E=Math.floor(h/65536),Qe=h-E*65536,h=at+E+65535,E=Math.floor(h/65536),at=h-E*65536,h=Me+E+65535,E=Math.floor(h/65536),Me=h-E*65536,h=Ye+E+65535,E=Math.floor(h/65536),Ye=h-E*65536,h=Ne+E+65535,E=Math.floor(h/65536),Ne=h-E*65536,Z+=E-1+37*(E-1),$[0]=Z,$[1]=oe,$[2]=me,$[3]=Re,$[4]=$e,$[5]=xe,$[6]=xt,$[7]=mt,$[8]=st,$[9]=De,$[10]=Je,$[11]=Qe,$[12]=at,$[13]=Me,$[14]=Ye,$[15]=Ne}function W($,R){H($,R,R)}function ye($,R){const C=a();let h;for(h=0;h<16;h++)C[h]=R[h];for(h=253;h>=0;h--)W(C,C),h!==2&&h!==4&&H(C,C,R);for(h=0;h<16;h++)$[h]=C[h]}function te($,R){const C=a();let h;for(h=0;h<16;h++)C[h]=R[h];for(h=250;h>=0;h--)W(C,C),h!==1&&H(C,C,R);for(h=0;h<16;h++)$[h]=C[h]}function Ee($,R){const C=a(),h=a(),E=a(),Z=a(),oe=a(),me=a(),Re=a(),$e=a(),xe=a();F(C,$[1],$[0]),F(xe,R[1],R[0]),H(C,C,xe),pe(h,$[0],$[1]),pe(xe,R[0],R[1]),H(h,h,xe),H(E,$[3],R[3]),H(E,E,d),H(Z,$[2],R[2]),pe(Z,Z,Z),F(oe,h,C),F(me,Z,E),pe(Re,Z,E),pe($e,h,C),H($[0],oe,me),H($[1],$e,Re),H($[2],Re,me),H($[3],oe,$e)}function Ae($,R,C){for(let h=0;h<4;h++)K($[h],R[h],C)}function et($,R){const C=a(),h=a(),E=a();ye(E,R[2]),H(C,R[0],E),H(h,R[1],E),re($,h),$[31]^=he(C)<<7}function T($,R,C){L($[0],f),L($[1],y),L($[2],y),L($[3],f);for(let h=255;h>=0;--h){const E=C[h/8|0]>>(h&7)&1;Ae($,R,E),Ee(R,$),Ee($,$),Ae($,R,E)}}function z($,R){const C=[a(),a(),a(),a()];L(C[0],_),L(C[1],O),L(C[2],y),H(C[3],_,O),T($,C,R)}function ze($){if($.length!==o.SEED_LENGTH)throw new Error(`ed25519: seed must be ${o.SEED_LENGTH} bytes`);const R=(0,t.hash)($);R[0]&=248,R[31]&=127,R[31]|=64;const C=new Uint8Array(32),h=[a(),a(),a(),a()];z(h,R),et(C,h);const E=new Uint8Array(64);return E.set($),E.set(C,32),{publicKey:C,secretKey:E}}o.generateKeyPairFromSeed=ze;function Te($){const R=(0,i.randomBytes)(32,$),C=ze(R);return(0,n.wipe)(R),C}o.generateKeyPair=Te;function J($){if($.length!==o.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${o.SECRET_KEY_LENGTH} bytes`);return new Uint8Array($.subarray(32))}o.extractPublicKeyFromSecretKey=J;const B=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function k($,R){let C,h,E,Z;for(h=63;h>=32;--h){for(C=0,E=h-32,Z=h-12;E>4)*B[E],C=R[E]>>8,R[E]&=255;for(E=0;E<32;E++)R[E]-=C*B[E];for(h=0;h<32;h++)R[h+1]+=R[h]>>8,$[h]=R[h]&255}function V($){const R=new Float64Array(64);for(let C=0;C<64;C++)R[C]=$[C];for(let C=0;C<64;C++)$[C]=0;k($,R)}function ut($,R){const C=new Float64Array(64),h=[a(),a(),a(),a()],E=(0,t.hash)($.subarray(0,32));E[0]&=248,E[31]&=127,E[31]|=64;const Z=new Uint8Array(64);Z.set(E.subarray(32),32);const oe=new t.SHA512;oe.update(Z.subarray(32)),oe.update(R);const me=oe.digest();oe.clean(),V(me),z(h,me),et(Z,h),oe.reset(),oe.update(Z.subarray(0,32)),oe.update($.subarray(32)),oe.update(R);const Re=oe.digest();V(Re);for(let $e=0;$e<32;$e++)C[$e]=me[$e];for(let $e=0;$e<32;$e++)for(let xe=0;xe<32;xe++)C[$e+xe]+=Re[$e]*E[xe];return k(Z.subarray(32),C),Z}o.sign=ut;function He($,R){const C=a(),h=a(),E=a(),Z=a(),oe=a(),me=a(),Re=a();return L($[2],y),fe($[1],R),W(E,$[1]),H(Z,E,w),F(E,E,$[2]),pe(Z,$[2],Z),W(oe,Z),W(me,oe),H(Re,me,oe),H(C,Re,E),H(C,C,Z),te(C,C),H(C,C,E),H(C,C,Z),H(C,C,Z),H($[0],C,Z),W(h,$[0]),H(h,h,Z),ue(h,E)&&H($[0],$[0],P),W(h,$[0]),H(h,h,Z),ue(h,E)?-1:(he($[0])===R[31]>>7&&F($[0],f,$[0]),H($[3],$[0],$[1]),0)}function Dr($,R,C){const h=new Uint8Array(32),E=[a(),a(),a(),a()],Z=[a(),a(),a(),a()];if(C.length!==o.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${o.SIGNATURE_LENGTH} bytes`);if(He(Z,$))return!1;const oe=new t.SHA512;oe.update(C.subarray(0,32)),oe.update($),oe.update(R);const me=oe.digest();return V(me),T(E,Z,me),z(Z,C.subarray(32)),Ee(E,Z),et(h,E),!ce(C,h)}o.verify=Dr;function _e($){let R=[a(),a(),a(),a()];if(He(R,$))throw new Error("Ed25519: invalid public key");let C=a(),h=a(),E=R[1];pe(C,y,E),F(h,y,E),ye(h,h),H(C,C,h);let Z=new Uint8Array(32);return re(Z,C),Z}o.convertPublicKeyToX25519=_e;function It($){const R=(0,t.hash)($.subarray(0,32));R[0]&=248,R[31]&=127,R[31]|=64;const C=new Uint8Array(R.subarray(0,32));return(0,n.wipe)(R),C}o.convertSecretKeyToX25519=It})(Ac);const Cw="EdDSA",Aw="JWT",Yl=".",Xl="base64url",Tw="utf8",Rw="utf8",Nw=":",$w="did",Fw="key",Zh="base58btc",Dw="z",Lw="K36",qw=32;function fa(o){return ga(Ic(Wn(o),Tw),Xl)}function Zl(o){const i=Ic(Lw,Zh),t=Dw+ga(em([i,o]),Zh);return[$w,Fw,t].join(Nw)}function jw(o){return ga(o,Xl)}function zw(o){return Ic([fa(o.header),fa(o.payload)].join(Yl),Rw)}function Mw(o){return[fa(o.header),fa(o.payload),jw(o.signature)].join(Yl)}function el(o=Ll.randomBytes(qw)){return Ac.generateKeyPairFromSeed(o)}async function Uw(o,i,t,n,a=ie.fromMiliseconds(Date.now())){const u={alg:Cw,typ:Aw},f=Zl(n.publicKey),y=a+t,w={iss:f,sub:o,aud:i,iat:a,exp:y},d=zw({header:u,payload:w}),_=Ac.sign(n.secretKey,d);return Mw({header:u,payload:w,signature:_})}const Hw=()=>typeof WebSocket<"u"?WebSocket:typeof globalThis<"u"&&typeof globalThis.WebSocket<"u"?globalThis.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws"),kw=()=>typeof WebSocket<"u"||typeof globalThis<"u"&&typeof globalThis.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",tl=o=>o.split("?")[0],rl=10,Kw=Hw();class Bw{constructor(i){if(this.url=i,this.events=new kr.EventEmitter,this.registering=!1,!zh(i))throw new Error(`Provided URL is not compatible with WebSocket connection: ${i}`);this.url=i}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(i,t){this.events.on(i,t)}once(i,t){this.events.once(i,t)}off(i,t){this.events.off(i,t)}removeListener(i,t){this.events.removeListener(i,t)}async open(i=this.url){await this.register(i)}async close(){return new Promise((i,t)=>{if(typeof this.socket>"u"){t(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),i()},this.socket.close()})}async send(i,t){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(Wn(i))}catch(n){this.onError(i.id,n)}}register(i=this.url){if(!zh(i))throw new Error(`Provided URL is not compatible with WebSocket connection: ${i}`);if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise((n,a)=>{this.events.once("register_error",u=>{this.resetMaxListeners(),a(u)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return a(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=i,this.registering=!0,new Promise((t,n)=>{const a=Um.isReactNative()?void 0:{rejectUnauthorized:!Hm(i)},u=new Kw(i,[],a);kw()?u.onerror=f=>{const y=f;n(this.emitError(y.error))}:u.on("error",f=>{n(this.emitError(f))}),u.onopen=()=>{this.onOpen(u),t(u)}})}onOpen(i){i.onmessage=t=>this.onPayload(t),i.onclose=t=>this.onClose(t),this.socket=i,this.registering=!1,this.events.emit("open")}onClose(i){this.socket=void 0,this.registering=!1,this.events.emit("close",i)}onPayload(i){if(typeof i.data>"u")return;const t=typeof i.data=="string"?ya(i.data):i.data;this.events.emit("payload",t)}onError(i,t){const n=this.parseError(t),a=n.message||n.toString(),u=Sc(i,a);this.events.emit("payload",u)}parseError(i,t=this.url){return km(i,tl(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>rl&&this.events.setMaxListeners(rl)}emitError(i){const t=this.parseError(new Error((i==null?void 0:i.message)||`WebSocket connection failed for host: ${tl(this.url)}`));return this.events.emit("register_error",t),t}}var pa={exports:{}};pa.exports;(function(o,i){var t=200,n="__lodash_hash_undefined__",a=1,u=2,f=9007199254740991,y="[object Arguments]",w="[object Array]",d="[object AsyncFunction]",_="[object Boolean]",O="[object Date]",P="[object Error]",L="[object Function]",N="[object GeneratorFunction]",K="[object Map]",re="[object Number]",ce="[object Null]",ue="[object Object]",he="[object Promise]",fe="[object Proxy]",pe="[object RegExp]",F="[object Set]",H="[object String]",W="[object Symbol]",ye="[object Undefined]",te="[object WeakMap]",Ee="[object ArrayBuffer]",Ae="[object DataView]",et="[object Float32Array]",T="[object Float64Array]",z="[object Int8Array]",ze="[object Int16Array]",Te="[object Int32Array]",J="[object Uint8Array]",B="[object Uint8ClampedArray]",k="[object Uint16Array]",V="[object Uint32Array]",ut=/[\\^$.*+?()[\]{}|]/g,He=/^\[object .+?Constructor\]$/,Dr=/^(?:0|[1-9]\d*)$/,_e={};_e[et]=_e[T]=_e[z]=_e[ze]=_e[Te]=_e[J]=_e[B]=_e[k]=_e[V]=!0,_e[y]=_e[w]=_e[Ee]=_e[_]=_e[Ae]=_e[O]=_e[P]=_e[L]=_e[K]=_e[re]=_e[ue]=_e[pe]=_e[F]=_e[H]=_e[te]=!1;var It=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,$=typeof self=="object"&&self&&self.Object===Object&&self,R=It||$||Function("return this")(),C=i&&!i.nodeType&&i,h=C&&!0&&o&&!o.nodeType&&o,E=h&&h.exports===C,Z=E&&It.process,oe=function(){try{return Z&&Z.binding&&Z.binding("util")}catch{}}(),me=oe&&oe.isTypedArray;function Re(v,I){for(var M=-1,Q=v==null?0:v.length,Be=0,de=[];++M-1}function Oa(v,I){var M=this.__data__,Q=Si(M,v);return Q<0?(++this.size,M.push([v,I])):M[Q][1]=I,this}vr.prototype.clear=Ia,vr.prototype.delete=xa,vr.prototype.get=Sa,vr.prototype.has=Pa,vr.prototype.set=Oa;function Br(v){var I=-1,M=v==null?0:v.length;for(this.clear();++IRt))return!1;var Ve=de.get(v);if(Ve&&de.get(I))return Ve==I;var _t=-1,ir=!0,Nt=M&u?new Bi:void 0;for(de.set(v,I),de.set(I,v);++_t-1&&v%1==0&&v-1&&v%1==0&&v<=f}function ds(v){var I=typeof v;return v!=null&&(I=="object"||I=="function")}function Ci(v){return v!=null&&typeof v=="object"}var gs=me?mt(me):rs;function Ma(v){return ja(v)?es(v):is(v)}function Ke(){return[]}function Ue(){return!1}o.exports=za})(pa,pa.exports);var Vw=pa.exports;const Gw=tm(Vw);function Ww(o,i){if(o.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,fe=new Uint8Array(he);ce!==ue;){for(var pe=N[ce],F=0,H=he-1;(pe!==0||F>>0,fe[H]=pe%y>>>0,pe=pe/y>>>0;if(pe!==0)throw new Error("Non-zero carry");re=F,ce++}for(var W=he-re;W!==he&&fe[W]===0;)W++;for(var ye=w.repeat(K);W>>0,he=new Uint8Array(ue);N[K];){var fe=t[N.charCodeAt(K)];if(fe===255)return;for(var pe=0,F=ue-1;(fe!==0||pe>>0,he[F]=fe%256>>>0,fe=fe/256>>>0;if(fe!==0)throw new Error("Non-zero carry");ce=pe,K++}if(N[K]!==" "){for(var H=ue-ce;H!==ue&&he[H]===0;)H++;for(var W=new Uint8Array(re+(ue-H)),ye=re;H!==ue;)W[ye++]=he[H++];return W}}}function L(N){var K=P(N);if(K)return K;throw new Error(`Non-${i} character`)}return{encode:O,decodeUnsafe:P,decode:L}}var Jw=Ww,Qw=Jw;const ef=o=>{if(o instanceof Uint8Array&&o.constructor.name==="Uint8Array")return o;if(o instanceof ArrayBuffer)return new Uint8Array(o);if(ArrayBuffer.isView(o))return new Uint8Array(o.buffer,o.byteOffset,o.byteLength);throw new Error("Unknown type, must be binary type")},Yw=o=>new TextEncoder().encode(o),Xw=o=>new TextDecoder().decode(o);class Zw{constructor(i,t,n){this.name=i,this.prefix=t,this.baseEncode=n}encode(i){if(i instanceof Uint8Array)return`${this.prefix}${this.baseEncode(i)}`;throw Error("Unknown type, must be binary type")}}class e_{constructor(i,t,n){if(this.name=i,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(i){if(typeof i=="string"){if(i.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(i)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(i.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(i){return tf(this,i)}}class t_{constructor(i){this.decoders=i}or(i){return tf(this,i)}decode(i){const t=i[0],n=this.decoders[t];if(n)return n.decode(i);throw RangeError(`Unable to decode multibase string ${JSON.stringify(i)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const tf=(o,i)=>new t_({...o.decoders||{[o.prefix]:o},...i.decoders||{[i.prefix]:i}});class r_{constructor(i,t,n,a){this.name=i,this.prefix=t,this.baseEncode=n,this.baseDecode=a,this.encoder=new Zw(i,t,n),this.decoder=new e_(i,t,a)}encode(i){return this.encoder.encode(i)}decode(i){return this.decoder.decode(i)}}const ma=({name:o,prefix:i,encode:t,decode:n})=>new r_(o,i,t,n),Qn=({prefix:o,name:i,alphabet:t})=>{const{encode:n,decode:a}=Qw(t,i);return ma({prefix:o,name:i,encode:n,decode:u=>ef(a(u))})},i_=(o,i,t,n)=>{const a={};for(let _=0;_=8&&(y-=8,f[d++]=255&w>>y)}if(y>=t||255&w<<8-y)throw new SyntaxError("Unexpected end of data");return f},n_=(o,i,t)=>{const n=i[i.length-1]==="=",a=(1<t;)f-=t,u+=i[a&y>>f];if(f&&(u+=i[a&y<ma({prefix:i,name:o,encode(a){return n_(a,n,t)},decode(a){return i_(a,n,t,o)}}),s_=ma({prefix:"\0",name:"identity",encode:o=>Xw(o),decode:o=>Yw(o)});var a_=Object.freeze({__proto__:null,identity:s_});const o_=Kt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var c_=Object.freeze({__proto__:null,base2:o_});const u_=Kt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var h_=Object.freeze({__proto__:null,base8:u_});const l_=Qn({prefix:"9",name:"base10",alphabet:"0123456789"});var f_=Object.freeze({__proto__:null,base10:l_});const p_=Kt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),d_=Kt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var g_=Object.freeze({__proto__:null,base16:p_,base16upper:d_});const y_=Kt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),v_=Kt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),m_=Kt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),w_=Kt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),__=Kt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),b_=Kt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),E_=Kt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),I_=Kt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),x_=Kt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var S_=Object.freeze({__proto__:null,base32:y_,base32upper:v_,base32pad:m_,base32padupper:w_,base32hex:__,base32hexupper:b_,base32hexpad:E_,base32hexpadupper:I_,base32z:x_});const P_=Qn({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),O_=Qn({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var C_=Object.freeze({__proto__:null,base36:P_,base36upper:O_});const A_=Qn({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),T_=Qn({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var R_=Object.freeze({__proto__:null,base58btc:A_,base58flickr:T_});const N_=Kt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),$_=Kt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),F_=Kt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),D_=Kt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var L_=Object.freeze({__proto__:null,base64:N_,base64pad:$_,base64url:F_,base64urlpad:D_});const rf=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),q_=rf.reduce((o,i,t)=>(o[t]=i,o),[]),j_=rf.reduce((o,i,t)=>(o[i.codePointAt(0)]=t,o),[]);function z_(o){return o.reduce((i,t)=>(i+=q_[t],i),"")}function M_(o){const i=[];for(const t of o){const n=j_[t.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${t}`);i.push(n)}return new Uint8Array(i)}const U_=ma({prefix:"🚀",name:"base256emoji",encode:z_,decode:M_});var H_=Object.freeze({__proto__:null,base256emoji:U_}),k_=nf,il=128,K_=127,B_=~K_,V_=Math.pow(2,31);function nf(o,i,t){i=i||[],t=t||0;for(var n=t;o>=V_;)i[t++]=o&255|il,o/=128;for(;o&B_;)i[t++]=o&255|il,o>>>=7;return i[t]=o|0,nf.bytes=t-n+1,i}var G_=vc,W_=128,nl=127;function vc(o,n){var t=0,n=n||0,a=0,u=n,f,y=o.length;do{if(u>=y)throw vc.bytes=0,new RangeError("Could not decode varint");f=o[u++],t+=a<28?(f&nl)<=W_);return vc.bytes=u-n,t}var J_=Math.pow(2,7),Q_=Math.pow(2,14),Y_=Math.pow(2,21),X_=Math.pow(2,28),Z_=Math.pow(2,35),eb=Math.pow(2,42),tb=Math.pow(2,49),rb=Math.pow(2,56),ib=Math.pow(2,63),nb=function(o){return o(sf.encode(o,i,t),i),al=o=>sf.encodingLength(o),mc=(o,i)=>{const t=i.byteLength,n=al(o),a=n+al(t),u=new Uint8Array(a+t);return sl(o,u,0),sl(t,u,n),u.set(i,a),new ab(o,t,i,u)};class ab{constructor(i,t,n,a){this.code=i,this.size=t,this.digest=n,this.bytes=a}}const af=({name:o,code:i,encode:t})=>new ob(o,i,t);class ob{constructor(i,t,n){this.name=i,this.code=t,this.encode=n}digest(i){if(i instanceof Uint8Array){const t=this.encode(i);return t instanceof Uint8Array?mc(this.code,t):t.then(n=>mc(this.code,n))}else throw Error("Unknown type, must be binary type")}}const of=o=>async i=>new Uint8Array(await crypto.subtle.digest(o,i)),cb=af({name:"sha2-256",code:18,encode:of("SHA-256")}),ub=af({name:"sha2-512",code:19,encode:of("SHA-512")});var hb=Object.freeze({__proto__:null,sha256:cb,sha512:ub});const cf=0,lb="identity",uf=ef,fb=o=>mc(cf,uf(o)),pb={code:cf,name:lb,encode:uf,digest:fb};var db=Object.freeze({__proto__:null,identity:pb});new TextEncoder,new TextDecoder;const ol={...a_,...c_,...h_,...f_,...g_,...S_,...C_,...R_,...L_,...H_};({...hb,...db});function hf(o){return globalThis.Buffer!=null?new Uint8Array(o.buffer,o.byteOffset,o.byteLength):o}function gb(o=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?hf(globalThis.Buffer.allocUnsafe(o)):new Uint8Array(o)}function lf(o,i,t,n){return{name:o,prefix:i,encoder:{name:o,prefix:i,encode:t},decoder:{decode:n}}}const cl=lf("utf8","u",o=>"u"+new TextDecoder("utf8").decode(o),o=>new TextEncoder().encode(o.substring(1))),Zo=lf("ascii","a",o=>{let i="a";for(let t=0;t{o=o.substring(1);const i=gb(o.length);for(let t=0;t{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,a)=>{this.isInitialized(),this.keychain.set(n,a),await this.persist()},this.get=n=>{this.isInitialized();const a=this.keychain.get(n);if(typeof a>"u"){const{message:u}=X("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(u)}return a},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=i,this.logger=Ce.generateChildLogger(t,this.name)}get context(){return Ce.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(i){await this.core.storage.setItem(this.storageKey,Ml(i))}async getKeyChain(){const i=await this.core.storage.getItem(this.storageKey);return typeof i<"u"?Ul(i):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:i}=X("NOT_INITIALIZED",this.name);throw new Error(i)}}}class Gb{constructor(i,t,n){this.core=i,this.logger=t,this.name=bb,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=a=>(this.isInitialized(),this.keychain.has(a)),this.getClientId=async()=>{this.isInitialized();const a=await this.getClientSeed(),u=el(a);return Zl(u.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const a=nm();return this.setPrivateKey(a.publicKey,a.privateKey)},this.signJWT=async a=>{this.isInitialized();const u=await this.getClientSeed(),f=el(u),y=cc();return await Uw(y,a,Eb,f)},this.generateSharedKey=(a,u,f)=>{this.isInitialized();const y=this.getPrivateKey(a),w=sm(y,u);return this.setSymKey(w,f)},this.setSymKey=async(a,u)=>{this.isInitialized();const f=u||am(a);return await this.keychain.set(f,a),f},this.deleteKeyPair=async a=>{this.isInitialized(),await this.keychain.del(a)},this.deleteSymKey=async a=>{this.isInitialized(),await this.keychain.del(a)},this.encode=async(a,u,f)=>{this.isInitialized();const y=om(f),w=Wn(u);if(Fh(y)){const P=y.senderPublicKey,L=y.receiverPublicKey;a=await this.generateSharedKey(P,L)}const d=this.getSymKey(a),{type:_,senderPublicKey:O}=y;return cm({type:_,symKey:d,message:w,senderPublicKey:O})},this.decode=async(a,u,f)=>{this.isInitialized();const y=um(u,f);if(Fh(y)){const w=y.receiverPublicKey,d=y.senderPublicKey;a=await this.generateSharedKey(w,d)}try{const w=this.getSymKey(a),d=hm({symKey:w,encoded:u});return ya(d)}catch(w){this.logger.error(`Failed to decode message from topic: '${a}', clientId: '${await this.getClientId()}'`),this.logger.error(w)}},this.getPayloadType=a=>{const u=Dh(a);return lm(u.type)},this.getPayloadSenderPublicKey=a=>{const u=Dh(a);return u.senderPublicKey?ga(u.senderPublicKey,fm):void 0},this.core=i,this.logger=Ce.generateChildLogger(t,this.name),this.keychain=n||new Vb(this.core,this.logger)}get context(){return Ce.getLoggerContext(this.logger)}async setPrivateKey(i,t){return await this.keychain.set(i,t),i}getPrivateKey(i){return this.keychain.get(i)}async getClientSeed(){let i="";try{i=this.keychain.get(ul)}catch{i=cc(),await this.keychain.set(ul,i)}return vb(i,"base16")}getSymKey(i){return this.keychain.get(i)}isInitialized(){if(!this.initialized){const{message:i}=X("NOT_INITIALIZED",this.name);throw new Error(i)}}}class Wb extends ww{constructor(i,t){super(i,t),this.logger=i,this.core=t,this.messages=new Map,this.name=Sb,this.version=Pb,this.initialized=!1,this.storagePrefix=bi,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,a)=>{this.isInitialized();const u=fn(a);let f=this.messages.get(n);return typeof f>"u"&&(f={}),typeof f[u]<"u"||(f[u]=a,this.messages.set(n,f),await this.persist()),u},this.get=n=>{this.isInitialized();let a=this.messages.get(n);return typeof a>"u"&&(a={}),a},this.has=(n,a)=>{this.isInitialized();const u=this.get(n),f=fn(a);return typeof u[f]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=Ce.generateChildLogger(i,this.name),this.core=t}get context(){return Ce.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(i){await this.core.storage.setItem(this.storageKey,Ml(i))}async getRelayerMessages(){const i=await this.core.storage.getItem(this.storageKey);return typeof i<"u"?Ul(i):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:i}=X("NOT_INITIALIZED",this.name);throw new Error(i)}}}class Jb extends _w{constructor(i,t){super(i,t),this.relayer=i,this.logger=t,this.events=new kr.EventEmitter,this.name=Cb,this.queue=new Map,this.publishTimeout=ie.toMiliseconds(ie.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(n,a,u)=>{var f;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:a,opts:u}});try{const y=(u==null?void 0:u.ttl)||Ob,w=uc(u),d=(u==null?void 0:u.prompt)||!1,_=(u==null?void 0:u.tag)||0,O=(u==null?void 0:u.id)||Km().toString(),P={topic:n,message:a,opts:{ttl:y,relay:w,prompt:d,tag:_,id:O}},L=setTimeout(()=>this.queue.set(O,P),this.publishTimeout);try{await await Bn(this.rpcPublish(n,a,y,w,d,_,O),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(O),this.relayer.events.emit(Gt.publish,P)}catch(N){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,(f=u==null?void 0:u.internal)!=null&&f.throwOnFailedPublish)throw this.removeRequestFromQueue(O),N;return}finally{clearTimeout(L)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:a,opts:u}})}catch(y){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(y),y}},this.on=(n,a)=>{this.events.on(n,a)},this.once=(n,a)=>{this.events.once(n,a)},this.off=(n,a)=>{this.events.off(n,a)},this.removeListener=(n,a)=>{this.events.removeListener(n,a)},this.relayer=i,this.logger=Ce.generateChildLogger(t,this.name),this.registerEventListeners()}get context(){return Ce.getLoggerContext(this.logger)}rpcPublish(i,t,n,a,u,f,y){var w,d,_,O;const P={method:oa(a.protocol).publish,params:{topic:i,message:t,ttl:n,prompt:u,tag:f},id:y};return _i((w=P.params)==null?void 0:w.prompt)&&((d=P.params)==null||delete d.prompt),_i((_=P.params)==null?void 0:_.tag)&&((O=P.params)==null||delete O.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:P}),this.relayer.request(P)}removeRequestFromQueue(i){this.queue.delete(i)}checkQueue(){this.queue.forEach(async i=>{const{topic:t,message:n,opts:a}=i;await this.publish(t,n,a)})}registerEventListeners(){this.relayer.core.heartbeat.on(dn.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Gt.connection_stalled);return}this.checkQueue()}),this.relayer.on(Gt.message_ack,i=>{this.removeRequestFromQueue(i.id.toString())})}}class Qb{constructor(){this.map=new Map,this.set=(i,t)=>{const n=this.get(i);this.exists(i,t)||this.map.set(i,[...n,t])},this.get=i=>this.map.get(i)||[],this.exists=(i,t)=>this.get(i).includes(t),this.delete=(i,t)=>{if(typeof t>"u"){this.map.delete(i);return}if(!this.map.has(i))return;const n=this.get(i);if(!this.exists(i,t))return;const a=n.filter(u=>u!==t);if(!a.length){this.map.delete(i);return}this.map.set(i,a)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Yb=Object.defineProperty,Xb=Object.defineProperties,Zb=Object.getOwnPropertyDescriptors,fl=Object.getOwnPropertySymbols,eE=Object.prototype.hasOwnProperty,tE=Object.prototype.propertyIsEnumerable,pl=(o,i,t)=>i in o?Yb(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,qn=(o,i)=>{for(var t in i||(i={}))eE.call(i,t)&&pl(o,t,i[t]);if(fl)for(var t of fl(i))tE.call(i,t)&&pl(o,t,i[t]);return o},tc=(o,i)=>Xb(o,Zb(i));class rE extends Iw{constructor(i,t){super(i,t),this.relayer=i,this.logger=t,this.subscriptions=new Map,this.topicMap=new Qb,this.events=new kr.EventEmitter,this.name=qb,this.version=jb,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=bi,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,a)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:a}});try{const u=uc(a),f={topic:n,relay:u};this.pending.set(n,f);const y=await this.rpcSubscribe(n,u);return this.onSubscribe(y,f),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:a}}),y}catch(u){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(u),u}},this.unsubscribe=async(n,a)=>{await this.restartToComplete(),this.isInitialized(),typeof(a==null?void 0:a.id)<"u"?await this.unsubscribeById(n,a.id,a):await this.unsubscribeByTopic(n,a)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((a,u)=>{const f=new ie.Watch;f.start(this.pendingSubscriptionWatchLabel);const y=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(y),f.stop(this.pendingSubscriptionWatchLabel),a(!0)),f.elapsed(this.pendingSubscriptionWatchLabel)>=zb&&(clearInterval(y),f.stop(this.pendingSubscriptionWatchLabel),u(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1),this.on=(n,a)=>{this.events.on(n,a)},this.once=(n,a)=>{this.events.once(n,a)},this.off=(n,a)=>{this.events.off(n,a)},this.removeListener=(n,a)=>{this.events.removeListener(n,a)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=i,this.logger=Ce.generateChildLogger(t,this.name),this.clientId=""}get context(){return Ce.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(i,t){let n=!1;try{n=this.getSubscription(i).topic===t}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(i,t){const n=this.topicMap.get(i);await Promise.all(n.map(async a=>await this.unsubscribeById(i,a,t)))}async unsubscribeById(i,t,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:i,id:t,opts:n}});try{const a=uc(n);await this.rpcUnsubscribe(i,t,a);const u=tr("USER_DISCONNECTED",`${this.name}, ${i}`);await this.onUnsubscribe(i,t,u),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:i,id:t,opts:n}})}catch(a){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(a),a}}async rpcSubscribe(i,t){const n={method:oa(t.protocol).subscribe,params:{topic:i}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Bn(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Gt.connection_stalled)}return fn(i+this.clientId)}async rpcBatchSubscribe(i){if(!i.length)return;const t=i[0].relay,n={method:oa(t.protocol).batchSubscribe,params:{topics:i.map(a=>a.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await Bn(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Gt.connection_stalled)}}rpcUnsubscribe(i,t,n){const a={method:oa(n.protocol).unsubscribe,params:{topic:i,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:a}),this.relayer.request(a)}onSubscribe(i,t){this.setSubscription(i,tc(qn({},t),{id:i})),this.pending.delete(t.topic)}onBatchSubscribe(i){i.length&&i.forEach(t=>{this.setSubscription(t.id,qn({},t)),this.pending.delete(t.topic)})}async onUnsubscribe(i,t,n){this.events.removeAllListeners(t),this.hasSubscription(t,i)&&this.deleteSubscription(t,n),await this.relayer.messages.del(i)}async setRelayerSubscriptions(i){await this.relayer.core.storage.setItem(this.storageKey,i)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(i,t){this.subscriptions.has(i)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:i,subscription:t}),this.addSubscription(i,t))}addSubscription(i,t){this.subscriptions.set(i,qn({},t)),this.topicMap.set(t.topic,i),this.events.emit($r.created,t)}getSubscription(i){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:i});const t=this.subscriptions.get(i);if(!t){const{message:n}=X("NO_MATCHING_KEY",`${this.name}: ${i}`);throw new Error(n)}return t}deleteSubscription(i,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:i,reason:t});const n=this.getSubscription(i);this.subscriptions.delete(i),this.topicMap.delete(n.topic,i),this.events.emit($r.deleted,tc(qn({},n),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit($r.sync)}async reset(){if(this.cached.length){const i=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let t=0;t"u"||!i.length)return;if(this.subscriptions.size){const{message:t}=X("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(t)}this.cached=i,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(i){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(i)}}async batchSubscribe(i){if(!i.length)return;const t=await this.rpcBatchSubscribe(i);pn(t)&&this.onBatchSubscribe(t.map((n,a)=>tc(qn({},i[a]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const i=[];this.pending.forEach(t=>{i.push(t)}),await this.batchSubscribe(i)}registerEventListeners(){this.relayer.core.heartbeat.on(dn.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(Gt.connect,async()=>{await this.onConnect()}),this.relayer.on(Gt.disconnect,()=>{this.onDisconnect()}),this.events.on($r.created,async i=>{const t=$r.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:i}),await this.persist()}),this.events.on($r.deleted,async i=>{const t=$r.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:i}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:i}=X("NOT_INITIALIZED",this.name);throw new Error(i)}}async restartToComplete(){this.restartInProgress&&await new Promise(i=>{const t=setInterval(()=>{this.restartInProgress||(clearInterval(t),i())},this.pollingInterval)})}}var iE=Object.defineProperty,dl=Object.getOwnPropertySymbols,nE=Object.prototype.hasOwnProperty,sE=Object.prototype.propertyIsEnumerable,gl=(o,i,t)=>i in o?iE(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,aE=(o,i)=>{for(var t in i||(i={}))nE.call(i,t)&&gl(o,t,i[t]);if(dl)for(var t of dl(i))sE.call(i,t)&&gl(o,t,i[t]);return o};class oE extends bw{constructor(i){super(i),this.protocol="wc",this.version=2,this.events=new kr.EventEmitter,this.name=Tb,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=async t=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(t)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.onPayloadHandler=t=>{this.onProviderPayload(t)},this.onConnectHandler=()=>{this.events.emit(Gt.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=t=>{this.logger.error(t),this.events.emit(Gt.error,t),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(ri.payload,this.onPayloadHandler),this.provider.on(ri.connect,this.onConnectHandler),this.provider.on(ri.disconnect,this.onDisconnectHandler),this.provider.on(ri.error,this.onProviderErrorHandler)},this.core=i.core,this.logger=typeof i.logger<"u"&&typeof i.logger!="string"?Ce.generateChildLogger(i.logger,this.name):Ce.pino(Ce.getDefaultLoggerOptions({level:i.logger||Ab})),this.messages=new Wb(this.logger,i.core),this.subscriber=new rE(this,this.logger),this.publisher=new Jb(this,this.logger),this.relayUrl=(i==null?void 0:i.relayUrl)||df,this.projectId=i.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${hl}...`),await this.restartTransport(hl)}this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},Fb)}get context(){return Ce.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(i,t,n){this.isInitialized(),await this.publisher.publish(i,t,n),await this.recordMessageEvent({topic:i,message:t,publishedAt:Date.now()})}async subscribe(i,t){var n;this.isInitialized();let a=((n=this.subscriber.topicMap.get(i))==null?void 0:n[0])||"";if(a)return a;let u;const f=y=>{y.topic===i&&(this.subscriber.off($r.created,f),u())};return await Promise.all([new Promise(y=>{u=y,this.subscriber.on($r.created,f)}),new Promise(async y=>{a=await this.subscriber.subscribe(i,t),y()})]),a}async unsubscribe(i,t){this.isInitialized(),await this.subscriber.unsubscribe(i,t)}on(i,t){this.events.on(i,t)}once(i,t){this.events.once(i,t)}off(i,t){this.events.off(i,t)}removeListener(i,t){this.events.removeListener(i,t)}async transportClose(){this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await Bn(this.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.connected&&await this.provider.disconnect()}async transportOpen(i){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){i&&i!==this.relayUrl&&(this.relayUrl=i,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise(t=>{if(!this.initialized)return t();this.subscriber.once($r.resubscribed,()=>{t()})}),new Promise(async(t,n)=>{try{await Bn(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(a){n(a);return}t()})])}catch(t){this.logger.error(t);const n=t;if(!this.isConnectionStalled(n.message))throw t;this.provider.events.emit(ri.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(i){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=i||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await Lh())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(i){return this.staleConnectionErrors.some(t=>i.includes(t))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const i=await this.core.crypto.signJWT(this.relayUrl);this.provider=new si(new Bw(pm({sdkVersion:$b,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:i,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(i){const{topic:t,message:n}=i;await this.messages.set(t,n)}async shouldIgnoreMessageEvent(i){const{topic:t,message:n}=i;if(!n||n.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(t))return this.logger.debug(`Ignoring message for non-subscribed topic ${t}`),!0;const a=this.messages.has(t,n);return a&&this.logger.debug(`Ignoring duplicate message: ${n}`),a}async onProviderPayload(i){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:i}),Pc(i)){if(!i.method.endsWith(Rb))return;const t=i.params,{topic:n,message:a,publishedAt:u}=t.data,f={topic:n,message:a,publishedAt:u};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(aE({type:"event",event:t.id},f)),this.events.emit(t.id,f),await this.acknowledgePayload(i),await this.onMessageEvent(f)}else Oc(i)&&this.events.emit(Gt.message_ack,i)}async onMessageEvent(i){await this.shouldIgnoreMessageEvent(i)||(this.events.emit(Gt.message,i),await this.recordMessageEvent(i))}async acknowledgePayload(i){const t=Cc(i.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(ri.payload,this.onPayloadHandler),this.provider.off(ri.connect,this.onConnectHandler),this.provider.off(ri.disconnect,this.onDisconnectHandler),this.provider.off(ri.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(Gt.connection_stalled,()=>{this.restartTransport().catch(t=>this.logger.error(t))});let i=await Lh();dm(async t=>{this.initialized&&i!==t&&(i=t,t?await this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(n=>this.logger.error(n))))})}onProviderDisconnect(){this.events.emit(Gt.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(async()=>{await this.restartTransport().catch(i=>this.logger.error(i))},ie.toMiliseconds(Nb)))}isInitialized(){if(!this.initialized){const{message:i}=X("NOT_INITIALIZED",this.name);throw new Error(i)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise(i=>{const t=setInterval(()=>{this.connected&&(clearInterval(t),i())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var cE=Object.defineProperty,yl=Object.getOwnPropertySymbols,uE=Object.prototype.hasOwnProperty,hE=Object.prototype.propertyIsEnumerable,vl=(o,i,t)=>i in o?cE(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,ml=(o,i)=>{for(var t in i||(i={}))uE.call(i,t)&&vl(o,t,i[t]);if(yl)for(var t of yl(i))hE.call(i,t)&&vl(o,t,i[t]);return o};class wa extends Ew{constructor(i,t,n,a=bi,u=void 0){super(i,t,n,a),this.core=i,this.logger=t,this.name=n,this.map=new Map,this.version=Db,this.cached=[],this.initialized=!1,this.storagePrefix=bi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(f=>{this.getKey&&f!==null&&!_i(f)?this.map.set(this.getKey(f),f):rm(f)?this.map.set(f.id,f):im(f)&&this.map.set(f.topic,f)}),this.cached=[],this.initialized=!0)},this.set=async(f,y)=>{this.isInitialized(),this.map.has(f)?await this.update(f,y):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:f,value:y}),this.map.set(f,y),await this.persist())},this.get=f=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:f}),this.getData(f)),this.getAll=f=>(this.isInitialized(),f?this.values.filter(y=>Object.keys(f).every(w=>Gw(y[w],f[w]))):this.values),this.update=async(f,y)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:f,update:y});const w=ml(ml({},this.getData(f)),y);this.map.set(f,w),await this.persist()},this.delete=async(f,y)=>{this.isInitialized(),this.map.has(f)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:f,reason:y}),this.map.delete(f),await this.persist())},this.logger=Ce.generateChildLogger(t,this.name),this.storagePrefix=a,this.getKey=u}get context(){return Ce.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(i){await this.core.storage.setItem(this.storageKey,i)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(i){const t=this.map.get(i);if(!t){const{message:n}=X("NO_MATCHING_KEY",`${this.name}: ${i}`);throw this.logger.error(n),new Error(n)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{const i=await this.getDataStore();if(typeof i>"u"||!i.length)return;if(this.map.size){const{message:t}=X("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=i,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(i){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(i)}}isInitialized(){if(!this.initialized){const{message:i}=X("NOT_INITIALIZED",this.name);throw new Error(i)}}}class lE{constructor(i,t){this.core=i,this.logger=t,this.name=Mb,this.version=Ub,this.events=new xc,this.initialized=!1,this.storagePrefix=bi,this.ignoredPayloadTypes=[ql],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=cc(),a=await this.core.crypto.setSymKey(n),u=Fr(ie.FIVE_MINUTES),f={protocol:pf},y={topic:a,expiry:u,relay:f,active:!1},w=gm({protocol:this.core.protocol,version:this.core.version,topic:a,symKey:n,relay:f});return await this.pairings.set(a,y),await this.core.relayer.subscribe(a),this.core.expirer.set(a,u),{topic:a,uri:w}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:a,symKey:u,relay:f}=ym(n.uri);let y;if(this.pairings.keys.includes(a)&&(y=this.pairings.get(a),y.active))throw new Error(`Pairing already exists: ${a}. Please try again with a new connection URI.`);this.core.crypto.keychain.has(a)||(await this.core.crypto.setSymKey(u,a),await this.core.relayer.subscribe(a,{relay:f}));const w=Fr(ie.FIVE_MINUTES),d={topic:a,relay:f,expiry:w,active:!1};return await this.pairings.set(a,d),this.core.expirer.set(a,w),n.activatePairing&&await this.activate({topic:a}),this.events.emit(Hn.create,d),d},this.activate=async({topic:n})=>{this.isInitialized();const a=Fr(ie.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:a}),this.core.expirer.set(n,a)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:a}=n;if(this.pairings.keys.includes(a)){const u=await this.sendRequest(a,"wc_pairingPing",{}),{done:f,resolve:y,reject:w}=hn();this.events.once($t("pairing_ping",u),({error:d})=>{d?w(d):y()}),await f()}},this.updateExpiry=async({topic:n,expiry:a})=>{this.isInitialized(),await this.pairings.update(n,{expiry:a})},this.updateMetadata=async({topic:n,metadata:a})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:a})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:a}=n;this.pairings.keys.includes(a)&&(await this.sendRequest(a,"wc_pairingDelete",tr("USER_DISCONNECTED")),await this.deletePairing(a))},this.sendRequest=async(n,a,u)=>{const f=Kn(a,u),y=await this.core.crypto.encode(n,f),w=Ln[a].req;return this.core.history.set(n,f),this.core.relayer.publish(n,y,w),f.id},this.sendResult=async(n,a,u)=>{const f=Cc(n,u),y=await this.core.crypto.encode(a,f),w=await this.core.history.get(a,n),d=Ln[w.request.method].res;await this.core.relayer.publish(a,y,d),await this.core.history.resolve(f)},this.sendError=async(n,a,u)=>{const f=Sc(n,u),y=await this.core.crypto.encode(a,f),w=await this.core.history.get(a,n),d=Ln[w.request.method]?Ln[w.request.method].res:Ln.unregistered_method.res;await this.core.relayer.publish(a,y,d),await this.core.history.resolve(f)},this.deletePairing=async(n,a)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,tr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),a?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(a=>wi(a.expiry));await Promise.all(n.map(a=>this.deletePairing(a.topic)))},this.onRelayEventRequest=n=>{const{topic:a,payload:u}=n;switch(u.method){case"wc_pairingPing":return this.onPairingPingRequest(a,u);case"wc_pairingDelete":return this.onPairingDeleteRequest(a,u);default:return this.onUnknownRpcMethodRequest(a,u)}},this.onRelayEventResponse=async n=>{const{topic:a,payload:u}=n,f=(await this.core.history.get(a,u.id)).request.method;switch(f){case"wc_pairingPing":return this.onPairingPingResponse(a,u);default:return this.onUnknownRpcMethodResponse(f)}},this.onPairingPingRequest=async(n,a)=>{const{id:u}=a;try{this.isValidPing({topic:n}),await this.sendResult(u,n,!0),this.events.emit(Hn.ping,{id:u,topic:n})}catch(f){await this.sendError(u,n,f),this.logger.error(f)}},this.onPairingPingResponse=(n,a)=>{const{id:u}=a;setTimeout(()=>{mi(a)?this.events.emit($t("pairing_ping",u),{}):ni(a)&&this.events.emit($t("pairing_ping",u),{error:a.error})},500)},this.onPairingDeleteRequest=async(n,a)=>{const{id:u}=a;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(Hn.delete,{id:u,topic:n})}catch(f){await this.sendError(u,n,f),this.logger.error(f)}},this.onUnknownRpcMethodRequest=async(n,a)=>{const{id:u,method:f}=a;try{if(this.registeredMethods.includes(f))return;const y=tr("WC_METHOD_UNSUPPORTED",f);await this.sendError(u,n,y),this.logger.error(y)}catch(y){await this.sendError(u,n,y),this.logger.error(y)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(tr("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!hr(n)){const{message:a}=X("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(a)}if(!vm(n.uri)){const{message:a}=X("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(a)}},this.isValidPing=async n=>{if(!hr(n)){const{message:u}=X("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(u)}const{topic:a}=n;await this.isValidPairingTopic(a)},this.isValidDisconnect=async n=>{if(!hr(n)){const{message:u}=X("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(u)}const{topic:a}=n;await this.isValidPairingTopic(a)},this.isValidPairingTopic=async n=>{if(!ln(n,!1)){const{message:a}=X("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(a)}if(!this.pairings.keys.includes(n)){const{message:a}=X("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(a)}if(wi(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:a}=X("EXPIRED",`pairing topic: ${n}`);throw new Error(a)}},this.core=i,this.logger=Ce.generateChildLogger(t,this.name),this.pairings=new wa(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Ce.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:i}=X("NOT_INITIALIZED",this.name);throw new Error(i)}}registerRelayerEvents(){this.core.relayer.on(Gt.message,async i=>{const{topic:t,message:n}=i;if(!this.pairings.keys.includes(t)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const a=await this.core.crypto.decode(t,n);try{Pc(a)?(this.core.history.set(t,a),this.onRelayEventRequest({topic:t,payload:a})):Oc(a)&&(await this.core.history.resolve(a),await this.onRelayEventResponse({topic:t,payload:a}),this.core.history.delete(t,a.id))}catch(u){this.logger.error(u)}})}registerExpirerEvents(){this.core.expirer.on(Pr.expired,async i=>{const{topic:t}=jl(i.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(Hn.expire,{topic:t}))})}}class fE extends mw{constructor(i,t){super(i,t),this.core=i,this.logger=t,this.records=new Map,this.events=new kr.EventEmitter,this.name=Hb,this.version=kb,this.cached=[],this.initialized=!1,this.storagePrefix=bi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,a,u)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:a,chainId:u}),this.records.has(a.id))return;const f={id:a.id,topic:n,request:{method:a.method,params:a.params||null},chainId:u,expiry:Fr(ie.THIRTY_DAYS)};this.records.set(f.id,f),this.events.emit(Hr.created,f)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const a=await this.getRecord(n.id);typeof a.response>"u"&&(a.response=ni(n)?{error:n.error}:{result:n.result},this.records.set(a.id,a),this.events.emit(Hr.updated,a))},this.get=async(n,a)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:a}),await this.getRecord(a)),this.delete=(n,a)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:a}),this.values.forEach(u=>{if(u.topic===n){if(typeof a<"u"&&u.id!==a)return;this.records.delete(u.id),this.events.emit(Hr.deleted,u)}})},this.exists=async(n,a)=>(this.isInitialized(),this.records.has(a)?(await this.getRecord(a)).topic===n:!1),this.on=(n,a)=>{this.events.on(n,a)},this.once=(n,a)=>{this.events.once(n,a)},this.off=(n,a)=>{this.events.off(n,a)},this.removeListener=(n,a)=>{this.events.removeListener(n,a)},this.logger=Ce.generateChildLogger(t,this.name)}get context(){return Ce.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const i=[];return this.values.forEach(t=>{if(typeof t.response<"u")return;const n={topic:t.topic,request:Kn(t.request.method,t.request.params,t.id),chainId:t.chainId};return i.push(n)}),i}async setJsonRpcRecords(i){await this.core.storage.setItem(this.storageKey,i)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(i){this.isInitialized();const t=this.records.get(i);if(!t){const{message:n}=X("NO_MATCHING_KEY",`${this.name}: ${i}`);throw new Error(n)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Hr.sync)}async restore(){try{const i=await this.getJsonRpcRecords();if(typeof i>"u"||!i.length)return;if(this.records.size){const{message:t}=X("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=i,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(i){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(i)}}registerEventListeners(){this.events.on(Hr.created,i=>{const t=Hr.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:i}),this.persist()}),this.events.on(Hr.updated,i=>{const t=Hr.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:i}),this.persist()}),this.events.on(Hr.deleted,i=>{const t=Hr.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:i}),this.persist()}),this.core.heartbeat.on(dn.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(i=>{ie.toMiliseconds(i.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${i.id}`),this.delete(i.topic,i.id))})}catch(i){this.logger.warn(i)}}isInitialized(){if(!this.initialized){const{message:i}=X("NOT_INITIALIZED",this.name);throw new Error(i)}}}class pE extends xw{constructor(i,t){super(i,t),this.core=i,this.logger=t,this.expirations=new Map,this.events=new kr.EventEmitter,this.name=Kb,this.version=Bb,this.cached=[],this.initialized=!1,this.storagePrefix=bi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const a=this.formatTarget(n);return typeof this.getExpiration(a)<"u"}catch{return!1}},this.set=(n,a)=>{this.isInitialized();const u=this.formatTarget(n),f={target:u,expiry:a};this.expirations.set(u,f),this.checkExpiry(u,f),this.events.emit(Pr.created,{target:u,expiration:f})},this.get=n=>{this.isInitialized();const a=this.formatTarget(n);return this.getExpiration(a)},this.del=n=>{if(this.isInitialized(),this.has(n)){const a=this.formatTarget(n),u=this.getExpiration(a);this.expirations.delete(a),this.events.emit(Pr.deleted,{target:a,expiration:u})}},this.on=(n,a)=>{this.events.on(n,a)},this.once=(n,a)=>{this.events.once(n,a)},this.off=(n,a)=>{this.events.off(n,a)},this.removeListener=(n,a)=>{this.events.removeListener(n,a)},this.logger=Ce.generateChildLogger(t,this.name)}get context(){return Ce.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(i){if(typeof i=="string")return mm(i);if(typeof i=="number")return wm(i);const{message:t}=X("UNKNOWN_TYPE",`Target type: ${typeof i}`);throw new Error(t)}async setExpirations(i){await this.core.storage.setItem(this.storageKey,i)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Pr.sync)}async restore(){try{const i=await this.getExpirations();if(typeof i>"u"||!i.length)return;if(this.expirations.size){const{message:t}=X("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=i,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(i){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(i)}}getExpiration(i){const t=this.expirations.get(i);if(!t){const{message:n}=X("NO_MATCHING_KEY",`${this.name}: ${i}`);throw this.logger.error(n),new Error(n)}return t}checkExpiry(i,t){const{expiry:n}=t;ie.toMiliseconds(n)-Date.now()<=0&&this.expire(i,t)}expire(i,t){this.expirations.delete(i),this.events.emit(Pr.expired,{target:i,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((i,t)=>this.checkExpiry(t,i))}registerEventListeners(){this.core.heartbeat.on(dn.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Pr.created,i=>{const t=Pr.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:i}),this.persist()}),this.events.on(Pr.expired,i=>{const t=Pr.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:i}),this.persist()}),this.events.on(Pr.deleted,i=>{const t=Pr.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:i}),this.persist()})}isInitialized(){if(!this.initialized){const{message:i}=X("NOT_INITIALIZED",this.name);throw new Error(i)}}}class dE extends Sw{constructor(i,t){super(i,t),this.projectId=i,this.logger=t,this.name=ec,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async()=>{if(this.verifyDisabled||_m()||!zl())return;const n=la;this.verifyUrl!==n&&this.removeIframe(),this.verifyUrl=n;try{await this.createIframe()}catch(a){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(a)}if(!this.initialized){this.removeIframe(),this.verifyUrl=ll;try{await this.createIframe()}catch(a){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(a),this.verifyDisabled=!0}}},this.register=async n=>{this.initialized?this.sendPost(n.attestationId):(this.addToQueue(n.attestationId),await this.init())},this.resolve=async n=>{if(this.isDevEnv)return"";const a=(n==null?void 0:n.verifyUrl)||la;let u;try{u=await this.fetchAttestation(n.attestationId,a)}catch(f){this.logger.info(`failed to resolve attestation: ${n.attestationId} from url: ${a}`),this.logger.info(f),u=await this.fetchAttestation(n.attestationId,ll)}return u},this.fetchAttestation=async(n,a)=>{this.logger.info(`resolving attestation: ${n} from url: ${a}`);const u=this.startAbortTimer(ie.ONE_SECOND*2),f=await fetch(`${a}/attestation/${n}`,{signal:this.abortController.signal});return clearTimeout(u),f.status===200?await f.json():void 0},this.addToQueue=n=>{this.queue.push(n)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(n=>this.sendPost(n)),this.queue=[])},this.sendPost=n=>{var a;try{if(!this.iframe)return;(a=this.iframe.contentWindow)==null||a.postMessage(n,"*"),this.logger.info(`postMessage sent: ${n} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let n;const a=u=>{u.data==="verify_ready"&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",a),n())};await Promise.race([new Promise(u=>{if(document.getElementById(ec))return u();window.addEventListener("message",a);const f=document.createElement("iframe");f.id=ec,f.src=`${this.verifyUrl}/${this.projectId}`,f.style.display="none",document.body.append(f),this.iframe=f,n=u}),new Promise((u,f)=>setTimeout(()=>{window.removeEventListener("message",a),f("verify iframe load timeout")},ie.toMiliseconds(ie.FIVE_SECONDS)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.logger=Ce.generateChildLogger(t,this.name),this.verifyUrl=la,this.abortController=new AbortController,this.isDevEnv=bm()&&{}.IS_VITEST}get context(){return Ce.getLoggerContext(this.logger)}startAbortTimer(i){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),ie.toMiliseconds(i))}}var gE=Object.defineProperty,wl=Object.getOwnPropertySymbols,yE=Object.prototype.hasOwnProperty,vE=Object.prototype.propertyIsEnumerable,_l=(o,i,t)=>i in o?gE(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,bl=(o,i)=>{for(var t in i||(i={}))yE.call(i,t)&&_l(o,t,i[t]);if(wl)for(var t of wl(i))vE.call(i,t)&&_l(o,t,i[t]);return o};class Rc extends vw{constructor(i){super(i),this.protocol=ff,this.version=mb,this.name=Tc,this.events=new kr.EventEmitter,this.initialized=!1,this.on=(n,a)=>this.events.on(n,a),this.once=(n,a)=>this.events.once(n,a),this.off=(n,a)=>this.events.off(n,a),this.removeListener=(n,a)=>this.events.removeListener(n,a),this.projectId=i==null?void 0:i.projectId,this.relayUrl=(i==null?void 0:i.relayUrl)||df,this.customStoragePrefix=i!=null&&i.customStoragePrefix?`:${i.customStoragePrefix}`:"";const t=typeof(i==null?void 0:i.logger)<"u"&&typeof(i==null?void 0:i.logger)!="string"?i.logger:Ce.pino(Ce.getDefaultLoggerOptions({level:(i==null?void 0:i.logger)||wb.logger}));this.logger=Ce.generateChildLogger(t,this.name),this.heartbeat=new dn.HeartBeat,this.crypto=new Gb(this,this.logger,i==null?void 0:i.keychain),this.history=new fE(this,this.logger),this.expirer=new pE(this,this.logger),this.storage=i!=null&&i.storage?i.storage:new b1(bl(bl({},_b),i==null?void 0:i.storageOptions)),this.relayer=new oE({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new lE(this,this.logger),this.verify=new dE(this.projectId||"",this.logger)}static async init(i){const t=new Rc(i);await t.initialize();const n=await t.crypto.getClientId();return await t.storage.setItem(Lb,n),t}get context(){return Ce.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(i){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,i),this.logger.error(i.message),i}}}const mE=Rc,gf="wc",yf=2,vf="client",Nc=`${gf}@${yf}:${vf}:`,rc={name:vf,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},El="WALLETCONNECT_DEEPLINK_CHOICE",wE="proposal",mf="Proposal expired",_E="session",na=ie.SEVEN_DAYS,bE="engine",jn={wc_sessionPropose:{req:{ttl:ie.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ie.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:ie.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ie.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ie.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ie.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ie.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ie.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ie.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ie.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ie.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ie.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ie.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ie.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ie.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:ie.THIRTY_SECONDS,prompt:!1,tag:1115}}},ic={min:ie.FIVE_MINUTES,max:ie.SEVEN_DAYS},ii={idle:"IDLE",active:"ACTIVE"},EE="request",IE=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var xE=Object.defineProperty,SE=Object.defineProperties,PE=Object.getOwnPropertyDescriptors,Il=Object.getOwnPropertySymbols,OE=Object.prototype.hasOwnProperty,CE=Object.prototype.propertyIsEnumerable,xl=(o,i,t)=>i in o?xE(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,cr=(o,i)=>{for(var t in i||(i={}))OE.call(i,t)&&xl(o,t,i[t]);if(Il)for(var t of Il(i))CE.call(i,t)&&xl(o,t,i[t]);return o},zn=(o,i)=>SE(o,PE(i));class AE extends Ow{constructor(i){super(i),this.name=bE,this.events=new xc,this.initialized=!1,this.ignoredPayloadTypes=[ql],this.requestQueue={state:ii.idle,queue:[]},this.sessionRequestQueue={state:ii.idle,queue:[]},this.requestQueueDelay=ie.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(jn)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},ie.toMiliseconds(this.requestQueueDelay)))},this.connect=async t=>{await this.isInitialized();const n=zn(cr({},t),{requiredNamespaces:t.requiredNamespaces||{},optionalNamespaces:t.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:a,requiredNamespaces:u,optionalNamespaces:f,sessionProperties:y,relays:w}=n;let d=a,_,O=!1;if(d&&(O=this.client.core.pairing.pairings.get(d).active),!d||!O){const{topic:he,uri:fe}=await this.client.core.pairing.create();d=he,_=fe}const P=await this.client.core.crypto.generateKeyPair(),L=cr({requiredNamespaces:u,optionalNamespaces:f,relays:w??[{protocol:pf}],proposer:{publicKey:P,metadata:this.client.metadata}},y&&{sessionProperties:y}),{reject:N,resolve:K,done:re}=hn(ie.FIVE_MINUTES,mf);if(this.events.once($t("session_connect"),async({error:he,session:fe})=>{if(he)N(he);else if(fe){fe.self.publicKey=P;const pe=zn(cr({},fe),{requiredNamespaces:fe.requiredNamespaces,optionalNamespaces:fe.optionalNamespaces});await this.client.session.set(fe.topic,pe),await this.setExpiry(fe.topic,fe.expiry),d&&await this.client.core.pairing.updateMetadata({topic:d,metadata:fe.peer.metadata}),K(pe)}}),!d){const{message:he}=X("NO_MATCHING_KEY",`connect() pairing topic: ${d}`);throw new Error(he)}const ce=await this.sendRequest({topic:d,method:"wc_sessionPropose",params:L}),ue=Fr(ie.FIVE_MINUTES);return await this.setProposal(ce,cr({id:ce,expiry:ue},L)),{uri:_,approval:re}},this.pair=async t=>(await this.isInitialized(),await this.client.core.pairing.pair(t)),this.approve=async t=>{await this.isInitialized(),await this.isValidApprove(t);const{id:n,relayProtocol:a,namespaces:u,sessionProperties:f}=t,y=this.client.proposal.get(n);let{pairingTopic:w,proposer:d,requiredNamespaces:_,optionalNamespaces:O}=y;w=w||"",ca(_)||(_=Im(u,"approve()"));const P=await this.client.core.crypto.generateKeyPair(),L=d.publicKey,N=await this.client.core.crypto.generateSharedKey(P,L);w&&n&&(await this.client.core.pairing.updateMetadata({topic:w,metadata:d.metadata}),await this.sendResult({id:n,topic:w,result:{relay:{protocol:a??"irn"},responderPublicKey:P}}),await this.client.proposal.delete(n,tr("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:w}));const K=cr({relay:{protocol:a??"irn"},namespaces:u,requiredNamespaces:_,optionalNamespaces:O,pairingTopic:w,controller:{publicKey:P,metadata:this.client.metadata},expiry:Fr(na)},f&&{sessionProperties:f});await this.client.core.relayer.subscribe(N),await this.sendRequest({topic:N,method:"wc_sessionSettle",params:K,throwOnFailedPublish:!0});const re=zn(cr({},K),{topic:N,pairingTopic:w,acknowledged:!1,self:K.controller,peer:{publicKey:d.publicKey,metadata:d.metadata},controller:P});return await this.client.session.set(N,re),await this.setExpiry(N,Fr(na)),{topic:N,acknowledged:()=>new Promise(ce=>setTimeout(()=>ce(this.client.session.get(N)),500))}},this.reject=async t=>{await this.isInitialized(),await this.isValidReject(t);const{id:n,reason:a}=t,{pairingTopic:u}=this.client.proposal.get(n);u&&(await this.sendError(n,u,a),await this.client.proposal.delete(n,tr("USER_DISCONNECTED")))},this.update=async t=>{await this.isInitialized(),await this.isValidUpdate(t);const{topic:n,namespaces:a}=t,u=await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:a}}),{done:f,resolve:y,reject:w}=hn();return this.events.once($t("session_update",u),({error:d})=>{d?w(d):y()}),await this.client.session.update(n,{namespaces:a}),{acknowledged:f}},this.extend=async t=>{await this.isInitialized(),await this.isValidExtend(t);const{topic:n}=t,a=await this.sendRequest({topic:n,method:"wc_sessionExtend",params:{}}),{done:u,resolve:f,reject:y}=hn();return this.events.once($t("session_extend",a),({error:w})=>{w?y(w):f()}),await this.setExpiry(n,Fr(na)),{acknowledged:u}},this.request=async t=>{await this.isInitialized(),await this.isValidRequest(t);const{chainId:n,request:a,topic:u,expiry:f}=t,y=Bm(),{done:w,resolve:d,reject:_}=hn(f,"Request expired. Please try again.");return this.events.once($t("session_request",y),({error:O,result:P})=>{O?_(O):d(P)}),await Promise.all([new Promise(async O=>{await this.sendRequest({clientRpcId:y,topic:u,method:"wc_sessionRequest",params:{request:a,chainId:n},expiry:f,throwOnFailedPublish:!0}).catch(P=>_(P)),this.client.events.emit("session_request_sent",{topic:u,request:a,chainId:n,id:y}),O()}),new Promise(async O=>{const P=await this.client.core.storage.getItem(El);xm({id:y,topic:u,wcDeepLink:P}),O()}),w()]).then(O=>O[2])},this.respond=async t=>{await this.isInitialized(),await this.isValidRespond(t);const{topic:n,response:a}=t,{id:u}=a;mi(a)?await this.sendResult({id:u,topic:n,result:a.result,throwOnFailedPublish:!0}):ni(a)&&await this.sendError(u,n,a.error),this.cleanupAfterResponse(t)},this.ping=async t=>{await this.isInitialized(),await this.isValidPing(t);const{topic:n}=t;if(this.client.session.keys.includes(n)){const a=await this.sendRequest({topic:n,method:"wc_sessionPing",params:{}}),{done:u,resolve:f,reject:y}=hn();this.events.once($t("session_ping",a),({error:w})=>{w?y(w):f()}),await u()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async t=>{await this.isInitialized(),await this.isValidEmit(t);const{topic:n,event:a,chainId:u}=t;await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:a,chainId:u}})},this.disconnect=async t=>{await this.isInitialized(),await this.isValidDisconnect(t);const{topic:n}=t;this.client.session.keys.includes(n)?(await this.sendRequest({topic:n,method:"wc_sessionDelete",params:tr("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=t=>(this.isInitialized(),this.client.session.getAll().filter(n=>Sm(n,t))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async t=>{if(t.pairingTopic)try{const n=this.client.core.pairing.pairings.get(t.pairingTopic),a=this.client.core.pairing.pairings.getAll().filter(u=>{var f,y;return((f=u.peerMetadata)==null?void 0:f.url)&&((y=u.peerMetadata)==null?void 0:y.url)===t.peer.metadata.url&&u.topic&&u.topic!==n.topic});if(a.length===0)return;this.client.logger.info(`Cleaning up ${a.length} duplicate pairing(s)`),await Promise.all(a.map(u=>this.client.core.pairing.disconnect({topic:u.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async(t,n)=>{const{self:a}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),this.client.session.delete(t,tr("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(a.publicKey)&&await this.client.core.crypto.deleteKeyPair(a.publicKey),this.client.core.crypto.keychain.has(t)&&await this.client.core.crypto.deleteSymKey(t),n||this.client.core.expirer.del(t),this.client.core.storage.removeItem(El).catch(u=>this.client.logger.warn(u))},this.deleteProposal=async(t,n)=>{await Promise.all([this.client.proposal.delete(t,tr("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(t)])},this.deletePendingSessionRequest=async(t,n,a=!1)=>{await Promise.all([this.client.pendingRequest.delete(t,n),a?Promise.resolve():this.client.core.expirer.del(t)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(u=>u.id!==t),a&&(this.sessionRequestQueue.state=ii.idle)},this.setExpiry=async(t,n)=>{this.client.session.keys.includes(t)&&await this.client.session.update(t,{expiry:n}),this.client.core.expirer.set(t,n)},this.setProposal=async(t,n)=>{await this.client.proposal.set(t,n),this.client.core.expirer.set(t,n.expiry)},this.setPendingSessionRequest=async t=>{const n=jn.wc_sessionRequest.req.ttl,{id:a,topic:u,params:f,verifyContext:y}=t;await this.client.pendingRequest.set(a,{id:a,topic:u,params:f,verifyContext:y}),n&&this.client.core.expirer.set(a,Fr(n))},this.sendRequest=async t=>{const{topic:n,method:a,params:u,expiry:f,relayRpcId:y,clientRpcId:w,throwOnFailedPublish:d}=t,_=Kn(a,u,w);if(zl()&&IE.includes(a)){const L=fn(JSON.stringify(_));this.client.core.verify.register({attestationId:L})}const O=await this.client.core.crypto.encode(n,_),P=jn[a].req;return f&&(P.ttl=f),y&&(P.id=y),this.client.core.history.set(n,_),d?(P.internal=zn(cr({},P.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,O,P)):this.client.core.relayer.publish(n,O,P).catch(L=>this.client.logger.error(L)),_.id},this.sendResult=async t=>{const{id:n,topic:a,result:u,throwOnFailedPublish:f}=t,y=Cc(n,u),w=await this.client.core.crypto.encode(a,y),d=await this.client.core.history.get(a,n),_=jn[d.request.method].res;f?(_.internal=zn(cr({},_.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(a,w,_)):this.client.core.relayer.publish(a,w,_).catch(O=>this.client.logger.error(O)),await this.client.core.history.resolve(y)},this.sendError=async(t,n,a)=>{const u=Sc(t,a),f=await this.client.core.crypto.encode(n,u),y=await this.client.core.history.get(n,t),w=jn[y.request.method].res;this.client.core.relayer.publish(n,f,w),await this.client.core.history.resolve(u)},this.cleanup=async()=>{const t=[],n=[];this.client.session.getAll().forEach(a=>{wi(a.expiry)&&t.push(a.topic)}),this.client.proposal.getAll().forEach(a=>{wi(a.expiry)&&n.push(a.id)}),await Promise.all([...t.map(a=>this.deleteSession(a)),...n.map(a=>this.deleteProposal(a))])},this.onRelayEventRequest=async t=>{this.requestQueue.queue.push(t),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===ii.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=ii.active;const t=this.requestQueue.queue.shift();if(t)try{this.processRequest(t),await new Promise(n=>setTimeout(n,300))}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=ii.idle},this.processRequest=t=>{const{topic:n,payload:a}=t,u=a.method;switch(u){case"wc_sessionPropose":return this.onSessionProposeRequest(n,a);case"wc_sessionSettle":return this.onSessionSettleRequest(n,a);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,a);case"wc_sessionExtend":return this.onSessionExtendRequest(n,a);case"wc_sessionPing":return this.onSessionPingRequest(n,a);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,a);case"wc_sessionRequest":return this.onSessionRequest(n,a);case"wc_sessionEvent":return this.onSessionEventRequest(n,a);default:return this.client.logger.info(`Unsupported request method ${u}`)}},this.onRelayEventResponse=async t=>{const{topic:n,payload:a}=t,u=(await this.client.core.history.get(n,a.id)).request.method;switch(u){case"wc_sessionPropose":return this.onSessionProposeResponse(n,a);case"wc_sessionSettle":return this.onSessionSettleResponse(n,a);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,a);case"wc_sessionExtend":return this.onSessionExtendResponse(n,a);case"wc_sessionPing":return this.onSessionPingResponse(n,a);case"wc_sessionRequest":return this.onSessionRequestResponse(n,a);default:return this.client.logger.info(`Unsupported response method ${u}`)}},this.onRelayEventUnknownPayload=t=>{const{topic:n}=t,{message:a}=X("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(a)},this.onSessionProposeRequest=async(t,n)=>{const{params:a,id:u}=n;try{this.isValidConnect(cr({},n.params));const f=Fr(ie.FIVE_MINUTES),y=cr({id:u,pairingTopic:t,expiry:f},a);await this.setProposal(u,y);const w=fn(JSON.stringify(n)),d=await this.getVerifyContext(w,y.proposer.metadata);this.client.events.emit("session_proposal",{id:u,params:y,verifyContext:d})}catch(f){await this.sendError(u,t,f),this.client.logger.error(f)}},this.onSessionProposeResponse=async(t,n)=>{const{id:a}=n;if(mi(n)){const{result:u}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:u});const f=this.client.proposal.get(a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:f});const y=f.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:y});const w=u.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:w});const d=await this.client.core.crypto.generateSharedKey(y,w);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:d});const _=await this.client.core.relayer.subscribe(d);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:_}),await this.client.core.pairing.activate({topic:t})}else ni(n)&&(await this.client.proposal.delete(a,tr("USER_DISCONNECTED")),this.events.emit($t("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(t,n)=>{const{id:a,params:u}=n;try{this.isValidSessionSettleRequest(u);const{relay:f,controller:y,expiry:w,namespaces:d,requiredNamespaces:_,optionalNamespaces:O,sessionProperties:P,pairingTopic:L}=n.params,N=cr({topic:t,relay:f,expiry:w,namespaces:d,acknowledged:!0,pairingTopic:L,requiredNamespaces:_,optionalNamespaces:O,controller:y.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:y.publicKey,metadata:y.metadata}},P&&{sessionProperties:P});await this.sendResult({id:n.id,topic:t,result:!0}),this.events.emit($t("session_connect"),{session:N}),this.cleanupDuplicatePairings(N)}catch(f){await this.sendError(a,t,f),this.client.logger.error(f)}},this.onSessionSettleResponse=async(t,n)=>{const{id:a}=n;mi(n)?(await this.client.session.update(t,{acknowledged:!0}),this.events.emit($t("session_approve",a),{})):ni(n)&&(await this.client.session.delete(t,tr("USER_DISCONNECTED")),this.events.emit($t("session_approve",a),{error:n.error}))},this.onSessionUpdateRequest=async(t,n)=>{const{params:a,id:u}=n;try{const f=`${t}_session_update`,y=ta.get(f);if(y&&this.isRequestOutOfSync(y,u)){this.client.logger.info(`Discarding out of sync request - ${u}`);return}this.isValidUpdate(cr({topic:t},a)),await this.client.session.update(t,{namespaces:a.namespaces}),await this.sendResult({id:u,topic:t,result:!0}),this.client.events.emit("session_update",{id:u,topic:t,params:a}),ta.set(f,u)}catch(f){await this.sendError(u,t,f),this.client.logger.error(f)}},this.isRequestOutOfSync=(t,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(t.toString().slice(0,-3)),this.onSessionUpdateResponse=(t,n)=>{const{id:a}=n;mi(n)?this.events.emit($t("session_update",a),{}):ni(n)&&this.events.emit($t("session_update",a),{error:n.error})},this.onSessionExtendRequest=async(t,n)=>{const{id:a}=n;try{this.isValidExtend({topic:t}),await this.setExpiry(t,Fr(na)),await this.sendResult({id:a,topic:t,result:!0}),this.client.events.emit("session_extend",{id:a,topic:t})}catch(u){await this.sendError(a,t,u),this.client.logger.error(u)}},this.onSessionExtendResponse=(t,n)=>{const{id:a}=n;mi(n)?this.events.emit($t("session_extend",a),{}):ni(n)&&this.events.emit($t("session_extend",a),{error:n.error})},this.onSessionPingRequest=async(t,n)=>{const{id:a}=n;try{this.isValidPing({topic:t}),await this.sendResult({id:a,topic:t,result:!0}),this.client.events.emit("session_ping",{id:a,topic:t})}catch(u){await this.sendError(a,t,u),this.client.logger.error(u)}},this.onSessionPingResponse=(t,n)=>{const{id:a}=n;setTimeout(()=>{mi(n)?this.events.emit($t("session_ping",a),{}):ni(n)&&this.events.emit($t("session_ping",a),{error:n.error})},500)},this.onSessionDeleteRequest=async(t,n)=>{const{id:a}=n;try{this.isValidDisconnect({topic:t,reason:n.params}),await Promise.all([new Promise(u=>{this.client.core.relayer.once(Gt.publish,async()=>{u(await this.deleteSession(t))})}),this.sendResult({id:a,topic:t,result:!0})]),this.client.events.emit("session_delete",{id:a,topic:t})}catch(u){this.client.logger.error(u)}},this.onSessionRequest=async(t,n)=>{const{id:a,params:u}=n;try{this.isValidRequest(cr({topic:t},u));const f=fn(JSON.stringify(Kn("wc_sessionRequest",u,a))),y=this.client.session.get(t),w=await this.getVerifyContext(f,y.peer.metadata),d={id:a,topic:t,params:u,verifyContext:w};await this.setPendingSessionRequest(d),this.addSessionRequestToSessionRequestQueue(d),this.processSessionRequestQueue()}catch(f){await this.sendError(a,t,f),this.client.logger.error(f)}},this.onSessionRequestResponse=(t,n)=>{const{id:a}=n;mi(n)?this.events.emit($t("session_request",a),{result:n.result}):ni(n)&&this.events.emit($t("session_request",a),{error:n.error})},this.onSessionEventRequest=async(t,n)=>{const{id:a,params:u}=n;try{const f=`${t}_session_event_${u.event.name}`,y=ta.get(f);if(y&&this.isRequestOutOfSync(y,a)){this.client.logger.info(`Discarding out of sync request - ${a}`);return}this.isValidEmit(cr({topic:t},u)),this.client.events.emit("session_event",{id:a,topic:t,params:u}),ta.set(f,a)}catch(f){await this.sendError(a,t,f),this.client.logger.error(f)}},this.addSessionRequestToSessionRequestQueue=t=>{this.sessionRequestQueue.queue.push(t)},this.cleanupAfterResponse=t=>{this.deletePendingSessionRequest(t.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=ii.idle,this.processSessionRequestQueue()},ie.toMiliseconds(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===ii.active){this.client.logger.info("session request queue is already active.");return}const t=this.sessionRequestQueue.queue[0];if(!t){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=ii.active,this.client.events.emit("session_request",t)}catch(n){this.client.logger.error(n)}},this.onPairingCreated=t=>{if(t.active)return;const n=this.client.proposal.getAll().find(a=>a.pairingTopic===t.topic);n&&this.onSessionProposeRequest(t.topic,Kn("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer},n.id))},this.isValidConnect=async t=>{if(!hr(t)){const{message:w}=X("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(t)}`);throw new Error(w)}const{pairingTopic:n,requiredNamespaces:a,optionalNamespaces:u,sessionProperties:f,relays:y}=t;if(_i(n)||await this.isValidPairingTopic(n),!Pm(y,!0)){const{message:w}=X("MISSING_OR_INVALID",`connect() relays: ${y}`);throw new Error(w)}!_i(a)&&ca(a)!==0&&this.validateNamespaces(a,"requiredNamespaces"),!_i(u)&&ca(u)!==0&&this.validateNamespaces(u,"optionalNamespaces"),_i(f)||this.validateSessionProps(f,"sessionProperties")},this.validateNamespaces=(t,n)=>{const a=Om(t,"connect()",n);if(a)throw new Error(a.message)},this.isValidApprove=async t=>{if(!hr(t))throw new Error(X("MISSING_OR_INVALID",`approve() params: ${t}`).message);const{id:n,namespaces:a,relayProtocol:u,sessionProperties:f}=t;await this.isValidProposalId(n);const y=this.client.proposal.get(n),w=Bo(a,"approve()");if(w)throw new Error(w.message);const d=qh(y.requiredNamespaces,a,"approve()");if(d)throw new Error(d.message);if(!ln(u,!0)){const{message:_}=X("MISSING_OR_INVALID",`approve() relayProtocol: ${u}`);throw new Error(_)}_i(f)||this.validateSessionProps(f,"sessionProperties")},this.isValidReject=async t=>{if(!hr(t)){const{message:u}=X("MISSING_OR_INVALID",`reject() params: ${t}`);throw new Error(u)}const{id:n,reason:a}=t;if(await this.isValidProposalId(n),!Cm(a)){const{message:u}=X("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(a)}`);throw new Error(u)}},this.isValidSessionSettleRequest=t=>{if(!hr(t)){const{message:d}=X("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${t}`);throw new Error(d)}const{relay:n,controller:a,namespaces:u,expiry:f}=t;if(!Am(n)){const{message:d}=X("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(d)}const y=Tm(a,"onSessionSettleRequest()");if(y)throw new Error(y.message);const w=Bo(u,"onSessionSettleRequest()");if(w)throw new Error(w.message);if(wi(f)){const{message:d}=X("EXPIRED","onSessionSettleRequest()");throw new Error(d)}},this.isValidUpdate=async t=>{if(!hr(t)){const{message:w}=X("MISSING_OR_INVALID",`update() params: ${t}`);throw new Error(w)}const{topic:n,namespaces:a}=t;await this.isValidSessionTopic(n);const u=this.client.session.get(n),f=Bo(a,"update()");if(f)throw new Error(f.message);const y=qh(u.requiredNamespaces,a,"update()");if(y)throw new Error(y.message)},this.isValidExtend=async t=>{if(!hr(t)){const{message:a}=X("MISSING_OR_INVALID",`extend() params: ${t}`);throw new Error(a)}const{topic:n}=t;await this.isValidSessionTopic(n)},this.isValidRequest=async t=>{if(!hr(t)){const{message:w}=X("MISSING_OR_INVALID",`request() params: ${t}`);throw new Error(w)}const{topic:n,request:a,chainId:u,expiry:f}=t;await this.isValidSessionTopic(n);const{namespaces:y}=this.client.session.get(n);if(!jh(y,u)){const{message:w}=X("MISSING_OR_INVALID",`request() chainId: ${u}`);throw new Error(w)}if(!Rm(a)){const{message:w}=X("MISSING_OR_INVALID",`request() ${JSON.stringify(a)}`);throw new Error(w)}if(!Nm(y,u,a.method)){const{message:w}=X("MISSING_OR_INVALID",`request() method: ${a.method}`);throw new Error(w)}if(f&&!$m(f,ic)){const{message:w}=X("MISSING_OR_INVALID",`request() expiry: ${f}. Expiry must be a number (in seconds) between ${ic.min} and ${ic.max}`);throw new Error(w)}},this.isValidRespond=async t=>{if(!hr(t)){const{message:u}=X("MISSING_OR_INVALID",`respond() params: ${t}`);throw new Error(u)}const{topic:n,response:a}=t;if(await this.isValidSessionTopic(n),!Fm(a)){const{message:u}=X("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(a)}`);throw new Error(u)}},this.isValidPing=async t=>{if(!hr(t)){const{message:a}=X("MISSING_OR_INVALID",`ping() params: ${t}`);throw new Error(a)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async t=>{if(!hr(t)){const{message:y}=X("MISSING_OR_INVALID",`emit() params: ${t}`);throw new Error(y)}const{topic:n,event:a,chainId:u}=t;await this.isValidSessionTopic(n);const{namespaces:f}=this.client.session.get(n);if(!jh(f,u)){const{message:y}=X("MISSING_OR_INVALID",`emit() chainId: ${u}`);throw new Error(y)}if(!Dm(a)){const{message:y}=X("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(a)}`);throw new Error(y)}if(!Lm(f,u,a.name)){const{message:y}=X("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(a)}`);throw new Error(y)}},this.isValidDisconnect=async t=>{if(!hr(t)){const{message:a}=X("MISSING_OR_INVALID",`disconnect() params: ${t}`);throw new Error(a)}const{topic:n}=t;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(t,n)=>{const a={verified:{verifyUrl:n.verifyUrl||la,validation:"UNKNOWN",origin:n.url||""}};try{const u=await this.client.core.verify.resolve({attestationId:t,verifyUrl:n.verifyUrl});u&&(a.verified.origin=u.origin,a.verified.isScam=u.isScam,a.verified.validation=u.origin===new URL(n.url).origin?"VALID":"INVALID")}catch(u){this.client.logger.info(u)}return this.client.logger.info(`Verify context: ${JSON.stringify(a)}`),a},this.validateSessionProps=(t,n)=>{Object.values(t).forEach(a=>{if(!ln(a,!1)){const{message:u}=X("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(a)}`);throw new Error(u)}})}}async isInitialized(){if(!this.initialized){const{message:i}=X("NOT_INITIALIZED",this.name);throw new Error(i)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Gt.message,async i=>{const{topic:t,message:n}=i;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const a=await this.client.core.crypto.decode(t,n);try{Pc(a)?(this.client.core.history.set(t,a),this.onRelayEventRequest({topic:t,payload:a})):Oc(a)?(await this.client.core.history.resolve(a),await this.onRelayEventResponse({topic:t,payload:a}),this.client.core.history.delete(t,a.id)):this.onRelayEventUnknownPayload({topic:t,payload:a})}catch(u){this.client.logger.error(u)}})}registerExpirerEvents(){this.client.core.expirer.on(Pr.expired,async i=>{const{topic:t,id:n}=jl(i.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,X("EXPIRED"),!0);t?this.client.session.keys.includes(t)&&(await this.deleteSession(t,!0),this.client.events.emit("session_expire",{topic:t})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(Hn.create,i=>this.onPairingCreated(i))}isValidPairingTopic(i){if(!ln(i,!1)){const{message:t}=X("MISSING_OR_INVALID",`pairing topic should be a string: ${i}`);throw new Error(t)}if(!this.client.core.pairing.pairings.keys.includes(i)){const{message:t}=X("NO_MATCHING_KEY",`pairing topic doesn't exist: ${i}`);throw new Error(t)}if(wi(this.client.core.pairing.pairings.get(i).expiry)){const{message:t}=X("EXPIRED",`pairing topic: ${i}`);throw new Error(t)}}async isValidSessionTopic(i){if(!ln(i,!1)){const{message:t}=X("MISSING_OR_INVALID",`session topic should be a string: ${i}`);throw new Error(t)}if(!this.client.session.keys.includes(i)){const{message:t}=X("NO_MATCHING_KEY",`session topic doesn't exist: ${i}`);throw new Error(t)}if(wi(this.client.session.get(i).expiry)){await this.deleteSession(i);const{message:t}=X("EXPIRED",`session topic: ${i}`);throw new Error(t)}}async isValidSessionOrPairingTopic(i){if(this.client.session.keys.includes(i))await this.isValidSessionTopic(i);else if(this.client.core.pairing.pairings.keys.includes(i))this.isValidPairingTopic(i);else if(ln(i,!1)){const{message:t}=X("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${i}`);throw new Error(t)}else{const{message:t}=X("MISSING_OR_INVALID",`session or pairing topic should be a string: ${i}`);throw new Error(t)}}async isValidProposalId(i){if(!qm(i)){const{message:t}=X("MISSING_OR_INVALID",`proposal id should be a number: ${i}`);throw new Error(t)}if(!this.client.proposal.keys.includes(i)){const{message:t}=X("NO_MATCHING_KEY",`proposal id doesn't exist: ${i}`);throw new Error(t)}if(wi(this.client.proposal.get(i).expiry)){await this.deleteProposal(i);const{message:t}=X("EXPIRED",`proposal id: ${i}`);throw new Error(t)}}}class TE extends wa{constructor(i,t){super(i,t,wE,Nc),this.core=i,this.logger=t}}class RE extends wa{constructor(i,t){super(i,t,_E,Nc),this.core=i,this.logger=t}}class NE extends wa{constructor(i,t){super(i,t,EE,Nc,n=>n.id),this.core=i,this.logger=t}}let $E=class wf extends Pw{constructor(i){super(i),this.protocol=gf,this.version=yf,this.name=rc.name,this.events=new kr.EventEmitter,this.on=(n,a)=>this.events.on(n,a),this.once=(n,a)=>this.events.once(n,a),this.off=(n,a)=>this.events.off(n,a),this.removeListener=(n,a)=>this.events.removeListener(n,a),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(a){throw this.logger.error(a.message),a}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(a){throw this.logger.error(a.message),a}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(a){throw this.logger.error(a.message),a}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(a){throw this.logger.error(a.message),a}},this.update=async n=>{try{return await this.engine.update(n)}catch(a){throw this.logger.error(a.message),a}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(a){throw this.logger.error(a.message),a}},this.request=async n=>{try{return await this.engine.request(n)}catch(a){throw this.logger.error(a.message),a}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(a){throw this.logger.error(a.message),a}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(a){throw this.logger.error(a.message),a}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(a){throw this.logger.error(a.message),a}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(a){throw this.logger.error(a.message),a}},this.find=n=>{try{return this.engine.find(n)}catch(a){throw this.logger.error(a.message),a}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(i==null?void 0:i.name)||rc.name,this.metadata=(i==null?void 0:i.metadata)||Em();const t=typeof(i==null?void 0:i.logger)<"u"&&typeof(i==null?void 0:i.logger)!="string"?i.logger:Ce.pino(Ce.getDefaultLoggerOptions({level:(i==null?void 0:i.logger)||rc.logger}));this.core=(i==null?void 0:i.core)||new mE(i),this.logger=Ce.generateChildLogger(t,this.name),this.session=new RE(this.core,this.logger),this.proposal=new TE(this.core,this.logger),this.pendingRequest=new NE(this.core,this.logger),this.engine=new AE(this)}static async init(i){const t=new wf(i);return await t.initialize(),t}get context(){return Ce.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(i){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(i.message),i}}};const Sl="error",FE="wss://relay.walletconnect.com",DE="wc",LE="universal_provider",Pl=`${DE}@2:${LE}:`,qE="https://rpc.walletconnect.com/v1/",ai={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Mn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},wc={exports:{}};/** +* @license +* Lodash +* Copyright OpenJS Foundation and other contributors +* Released under MIT license +* Based on Underscore.js 1.8.3 +* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +*/(function(o,i){(function(){var t,n="4.17.21",a=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",f="Expected a function",y="Invalid `variable` option passed into `_.template`",w="__lodash_hash_undefined__",d=500,_="__lodash_placeholder__",O=1,P=2,L=4,N=1,K=2,re=1,ce=2,ue=4,he=8,fe=16,pe=32,F=64,H=128,W=256,ye=512,te=30,Ee="...",Ae=800,et=16,T=1,z=2,ze=3,Te=1/0,J=9007199254740991,B=17976931348623157e292,k=0/0,V=4294967295,ut=V-1,He=V>>>1,Dr=[["ary",H],["bind",re],["bindKey",ce],["curry",he],["curryRight",fe],["flip",ye],["partial",pe],["partialRight",F],["rearg",W]],_e="[object Arguments]",It="[object Array]",$="[object AsyncFunction]",R="[object Boolean]",C="[object Date]",h="[object DOMException]",E="[object Error]",Z="[object Function]",oe="[object GeneratorFunction]",me="[object Map]",Re="[object Number]",$e="[object Null]",xe="[object Object]",xt="[object Promise]",mt="[object Proxy]",st="[object RegExp]",De="[object Set]",Je="[object String]",Qe="[object Symbol]",at="[object Undefined]",Me="[object WeakMap]",Ye="[object WeakSet]",Ne="[object ArrayBuffer]",ke="[object DataView]",ht="[object Float32Array]",qe="[object Float64Array]",St="[object Int8Array]",Ft="[object Int16Array]",Ut="[object Int32Array]",Ht="[object Uint8Array]",qt="[object Uint8ClampedArray]",Wt="[object Uint16Array]",rr="[object Uint32Array]",Lr=/\b__p \+= '';/g,Jt=/\b(__p \+=) '' \+/g,Kr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,oi=/&(?:amp|lt|gt|quot|#39);/g,xi=/[&<>"']/g,lt=RegExp(oi.source),tt=RegExp(xi.source),ft=/<%-([\s\S]+?)%>/g,pt=/<%([\s\S]+?)%>/g,ot=/<%=([\s\S]+?)%>/g,rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pt=/^\w*$/,Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dt=/[\\^$.*+?()[\]{}|]/g,Ct=RegExp(dt.source),gt=/^\s+/,wt=/\s/,yt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,We=/\{\n\/\* \[wrapped with (.+)\] \*/,At=/,? & /,Tt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_a=/[()=,{}\[\]\/\s]/,ba=/\\(\\)?/g,Ea=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vr=/\w*$/,Ia=/^[-+]0x[0-9a-f]+$/i,xa=/^0b[01]+$/i,Sa=/^\[object .+?Constructor\]$/,Pa=/^0o[0-7]+$/i,Oa=/^(?:0|[1-9]\d*)$/,Br=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ki=/($^)/,Ca=/['\n\r\u2028\u2029\\]/g,Ki="\\ud800-\\udfff",Aa="\\u0300-\\u036f",Ta="\\ufe20-\\ufe2f",Bi="\\u20d0-\\u20ff",Yn=Aa+Ta+Bi,Xn="\\u2700-\\u27bf",Or="a-z\\xdf-\\xf6\\xf8-\\xff",Ra="\\xac\\xb1\\xd7\\xf7",Na="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",$a="\\u2000-\\u206f",Fa=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Zn="A-Z\\xc0-\\xd6\\xd8-\\xde",es="\\ufe0e\\ufe0f",Si=Ra+Na+$a+Fa,gn="['’]",Pi="["+Ki+"]",yn="["+Si+"]",Oi="["+Yn+"]",ts="\\d+",Da="["+Xn+"]",rs="["+Or+"]",is="[^"+Ki+Si+ts+Xn+Or+Zn+"]",Vi="\\ud83c[\\udffb-\\udfff]",La="(?:"+Oi+"|"+Vi+")",ns="[^"+Ki+"]",Gi="(?:\\ud83c[\\udde6-\\uddff]){2}",ci="[\\ud800-\\udbff][\\udc00-\\udfff]",lr="["+Zn+"]",ss="\\u200d",as="(?:"+rs+"|"+is+")",qr="(?:"+lr+"|"+is+")",os="(?:"+gn+"(?:d|ll|m|re|s|t|ve))?",cs="(?:"+gn+"(?:D|LL|M|RE|S|T|VE))?",us=La+"?",hs="["+es+"]?",qa="(?:"+ss+"(?:"+[ns,Gi,ci].join("|")+")"+hs+us+")*",Vr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ls="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",fs=hs+us+qa,Wi="(?:"+[Da,Gi,ci].join("|")+")"+fs,ja="(?:"+[ns+Oi+"?",Oi,Gi,ci,Pi].join("|")+")",vn=RegExp(gn,"g"),za=RegExp(Oi,"g"),Ji=RegExp(Vi+"(?="+Vi+")|"+ja+fs,"g"),ps=RegExp([lr+"?"+rs+"+"+os+"(?="+[yn,lr,"$"].join("|")+")",qr+"+"+cs+"(?="+[yn,lr+as,"$"].join("|")+")",lr+"?"+as+"+"+os,lr+"+"+cs,ls,Vr,ts,Wi].join("|"),"g"),ds=RegExp("["+ss+Ki+Yn+es+"]"),Ci=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gs=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ma=-1,Ke={};Ke[ht]=Ke[qe]=Ke[St]=Ke[Ft]=Ke[Ut]=Ke[Ht]=Ke[qt]=Ke[Wt]=Ke[rr]=!0,Ke[_e]=Ke[It]=Ke[Ne]=Ke[R]=Ke[ke]=Ke[C]=Ke[E]=Ke[Z]=Ke[me]=Ke[Re]=Ke[xe]=Ke[st]=Ke[De]=Ke[Je]=Ke[Me]=!1;var Ue={};Ue[_e]=Ue[It]=Ue[Ne]=Ue[ke]=Ue[R]=Ue[C]=Ue[ht]=Ue[qe]=Ue[St]=Ue[Ft]=Ue[Ut]=Ue[me]=Ue[Re]=Ue[xe]=Ue[st]=Ue[De]=Ue[Je]=Ue[Qe]=Ue[Ht]=Ue[qt]=Ue[Wt]=Ue[rr]=!0,Ue[E]=Ue[Z]=Ue[Me]=!1;var v={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},I={"&":"&","<":"<",">":">",'"':""","'":"'"},M={"&":"&","<":"<",">":">",""":'"',"'":"'"},Q={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,de=parseInt,Xe=typeof Mn=="object"&&Mn&&Mn.Object===Object&&Mn,Rt=typeof self=="object"&&self&&self.Object===Object&&self,Pe=Xe||Rt||Function("return this")(),Ve=i&&!i.nodeType&&i,_t=Ve&&!0&&o&&!o.nodeType&&o,ir=_t&&_t.exports===Ve,Nt=ir&&Xe.process,Ze=function(){try{var x=_t&&_t.require&&_t.require("util").types;return x||Nt&&Nt.binding&&Nt.binding("util")}catch{}}(),Qt=Ze&&Ze.isArrayBuffer,Cr=Ze&&Ze.isDate,mr=Ze&&Ze.isMap,jr=Ze&&Ze.isRegExp,mn=Ze&&Ze.isSet,Ai=Ze&&Ze.isTypedArray;function jt(x,D,A){switch(A.length){case 0:return x.call(D);case 1:return x.call(D,A[0]);case 2:return x.call(D,A[0],A[1]);case 3:return x.call(D,A[0],A[1],A[2])}return x.apply(D,A)}function Ef(x,D,A,Y){for(var le=-1,Fe=x==null?0:x.length;++le-1}function Ua(x,D,A){for(var Y=-1,le=x==null?0:x.length;++Y-1;);return A}function Hc(x,D){for(var A=x.length;A--&&Qi(D,x[A],0)>-1;);return A}function Rf(x,D){for(var A=x.length,Y=0;A--;)x[A]===D&&++Y;return Y}var Nf=Ba(v),$f=Ba(I);function Ff(x){return"\\"+Q[x]}function Df(x,D){return x==null?t:x[D]}function Yi(x){return ds.test(x)}function Lf(x){return Ci.test(x)}function qf(x){for(var D,A=[];!(D=x.next()).done;)A.push(D.value);return A}function Ja(x){var D=-1,A=Array(x.size);return x.forEach(function(Y,le){A[++D]=[le,Y]}),A}function kc(x,D){return function(A){return x(D(A))}}function li(x,D){for(var A=-1,Y=x.length,le=0,Fe=[];++A-1}function xp(e,r){var s=this.__data__,c=$s(s,e);return c<0?(++this.size,s.push([e,r])):s[c][1]=r,this}Gr.prototype.clear=_p,Gr.prototype.delete=bp,Gr.prototype.get=Ep,Gr.prototype.has=Ip,Gr.prototype.set=xp;function Wr(e){var r=-1,s=e==null?0:e.length;for(this.clear();++r=r?e:r)),e}function Er(e,r,s,c,l,g){var m,b=r&O,S=r&P,q=r&L;if(s&&(m=l?s(e,c,l,g):s(e)),m!==t)return m;if(!ct(e))return e;var j=ge(e);if(j){if(m=Cd(e),!b)return nr(e,m)}else{var U=Vt(e),G=U==Z||U==oe;if(vi(e))return Su(e,b);if(U==xe||U==_e||G&&!l){if(m=S||G?{}:Ku(e),!b)return S?vd(e,Mp(m,e)):yd(e,tu(m,e))}else{if(!Ue[U])return l?e:{};m=Ad(e,U,b)}}g||(g=new Tr);var ee=g.get(e);if(ee)return ee;g.set(e,m),wh(e)?e.forEach(function(ae){m.add(Er(ae,r,s,ae,e,g))}):vh(e)&&e.forEach(function(ae,Ie){m.set(Ie,Er(ae,r,s,Ie,e,g))});var se=q?S?Eo:bo:S?ar:zt,we=j?t:se(e);return wr(we||e,function(ae,Ie){we&&(Ie=ae,ae=e[Ie]),Sn(m,Ie,Er(ae,r,s,Ie,e,g))}),m}function Up(e){var r=zt(e);return function(s){return ru(s,e,r)}}function ru(e,r,s){var c=s.length;if(e==null)return!c;for(e=Ge(e);c--;){var l=s[c],g=r[l],m=e[l];if(m===t&&!(l in e)||!g(m))return!1}return!0}function iu(e,r,s){if(typeof e!="function")throw new _r(f);return Nn(function(){e.apply(t,s)},r)}function Pn(e,r,s,c){var l=-1,g=ys,m=!0,b=e.length,S=[],q=r.length;if(!b)return S;s&&(r=it(r,fr(s))),c?(g=Ua,m=!1):r.length>=a&&(g=wn,m=!1,r=new Ni(r));e:for(;++ll?0:l+s),c=c===t||c>l?l:ve(c),c<0&&(c+=l),c=s>c?0:bh(c);s0&&s(b)?r>1?kt(b,r-1,s,c,l):hi(l,b):c||(l[l.length]=b)}return l}var ro=Ru(),au=Ru(!0);function zr(e,r){return e&&ro(e,r,zt)}function io(e,r){return e&&au(e,r,zt)}function Ds(e,r){return ui(r,function(s){return Zr(e[s])})}function Fi(e,r){r=gi(r,e);for(var s=0,c=r.length;e!=null&&sr}function Kp(e,r){return e!=null&&je.call(e,r)}function Bp(e,r){return e!=null&&r in Ge(e)}function Vp(e,r,s){return e>=Bt(r,s)&&e=120&&j.length>=120)?new Ni(m&&j):t}j=e[0];var U=-1,G=b[0];e:for(;++U-1;)b!==e&&Ps.call(b,S,1),Ps.call(e,S,1);return e}function vu(e,r){for(var s=e?r.length:0,c=s-1;s--;){var l=r[s];if(s==c||l!==g){var g=l;Xr(l)?Ps.call(e,l,1):po(e,l)}}return e}function ho(e,r){return e+As(Yc()*(r-e+1))}function sd(e,r,s,c){for(var l=-1,g=Lt(Cs((r-e)/(s||1)),0),m=A(g);g--;)m[c?g:++l]=e,e+=s;return m}function lo(e,r){var s="";if(!e||r<1||r>J)return s;do r%2&&(s+=e),r=As(r/2),r&&(e+=e);while(r);return s}function be(e,r){return Ao(Gu(e,r,or),e+"")}function ad(e){return eu(un(e))}function od(e,r){var s=un(e);return Vs(s,$i(r,0,s.length))}function An(e,r,s,c){if(!ct(e))return e;r=gi(r,e);for(var l=-1,g=r.length,m=g-1,b=e;b!=null&&++ll?0:l+r),s=s>l?l:s,s<0&&(s+=l),l=r>s?0:s-r>>>0,r>>>=0;for(var g=A(l);++c>>1,m=e[g];m!==null&&!dr(m)&&(s?m<=r:m=a){var q=r?null:bd(e);if(q)return ms(q);m=!1,l=wn,S=new Ni}else S=r?[]:b;e:for(;++c=c?e:Ir(e,r,s)}var xu=Xf||function(e){return Pe.clearTimeout(e)};function Su(e,r){if(r)return e.slice();var s=e.length,c=Vc?Vc(s):new e.constructor(s);return e.copy(c),c}function mo(e){var r=new e.constructor(e.byteLength);return new xs(r).set(new xs(e)),r}function fd(e,r){var s=r?mo(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function pd(e){var r=new e.constructor(e.source,vr.exec(e));return r.lastIndex=e.lastIndex,r}function dd(e){return xn?Ge(xn.call(e)):{}}function Pu(e,r){var s=r?mo(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function Ou(e,r){if(e!==r){var s=e!==t,c=e===null,l=e===e,g=dr(e),m=r!==t,b=r===null,S=r===r,q=dr(r);if(!b&&!q&&!g&&e>r||g&&m&&S&&!b&&!q||c&&m&&S||!s&&S||!l)return 1;if(!c&&!g&&!q&&e=b)return S;var q=s[c];return S*(q=="desc"?-1:1)}}return e.index-r.index}function Cu(e,r,s,c){for(var l=-1,g=e.length,m=s.length,b=-1,S=r.length,q=Lt(g-m,0),j=A(S+q),U=!c;++b1?s[l-1]:t,m=l>2?s[2]:t;for(g=e.length>3&&typeof g=="function"?(l--,g):t,m&&Xt(s[0],s[1],m)&&(g=l<3?t:g,l=1),r=Ge(r);++c-1?l[g?r[m]:m]:t}}function Fu(e){return Yr(function(r){var s=r.length,c=s,l=br.prototype.thru;for(e&&r.reverse();c--;){var g=r[c];if(typeof g!="function")throw new _r(f);if(l&&!m&&Ks(g)=="wrapper")var m=new br([],!0)}for(c=m?c:s;++c1&&Oe.reverse(),j&&Sb))return!1;var q=g.get(e),j=g.get(r);if(q&&j)return q==r&&j==e;var U=-1,G=!0,ee=s&K?new Ni:t;for(g.set(e,r),g.set(r,e);++U1?"& ":"")+r[c],r=r.join(s>2?", ":" "),e.replace(yt,`{ +/* [wrapped with `+r+`] */ +`)}function Rd(e){return ge(e)||qi(e)||!!(Jc&&e&&e[Jc])}function Xr(e,r){var s=typeof e;return r=r??J,!!r&&(s=="number"||s!="symbol"&&Oa.test(e))&&e>-1&&e%1==0&&e0){if(++r>=Ae)return arguments[0]}else r=0;return e.apply(t,arguments)}}function Vs(e,r){var s=-1,c=e.length,l=c-1;for(r=r===t?c:r;++s1?e[r-1]:t;return s=typeof s=="function"?(e.pop(),s):t,sh(e,s)});function ah(e){var r=p(e);return r.__chain__=!0,r}function Hg(e,r){return r(e),e}function Gs(e,r){return r(e)}var kg=Yr(function(e){var r=e.length,s=r?e[0]:0,c=this.__wrapped__,l=function(g){return to(g,e)};return r>1||this.__actions__.length||!(c instanceof Se)||!Xr(s)?this.thru(l):(c=c.slice(s,+s+(r?1:0)),c.__actions__.push({func:Gs,args:[l],thisArg:t}),new br(c,this.__chain__).thru(function(g){return r&&!g.length&&g.push(t),g}))});function Kg(){return ah(this)}function Bg(){return new br(this.value(),this.__chain__)}function Vg(){this.__values__===t&&(this.__values__=_h(this.value()));var e=this.__index__>=this.__values__.length,r=e?t:this.__values__[this.__index__++];return{done:e,value:r}}function Gg(){return this}function Wg(e){for(var r,s=this;s instanceof Ns;){var c=Zu(s);c.__index__=0,c.__values__=t,r?l.__wrapped__=c:r=c;var l=c;s=s.__wrapped__}return l.__wrapped__=e,r}function Jg(){var e=this.__wrapped__;if(e instanceof Se){var r=e;return this.__actions__.length&&(r=new Se(this)),r=r.reverse(),r.__actions__.push({func:Gs,args:[To],thisArg:t}),new br(r,this.__chain__)}return this.thru(To)}function Qg(){return Eu(this.__wrapped__,this.__actions__)}var Yg=zs(function(e,r,s){je.call(e,s)?++e[s]:Jr(e,s,1)});function Xg(e,r,s){var c=ge(e)?Dc:Hp;return s&&Xt(e,r,s)&&(r=t),c(e,ne(r,3))}function Zg(e,r){var s=ge(e)?ui:su;return s(e,ne(r,3))}var ey=$u(eh),ty=$u(th);function ry(e,r){return kt(Ws(e,r),1)}function iy(e,r){return kt(Ws(e,r),Te)}function ny(e,r,s){return s=s===t?1:ve(s),kt(Ws(e,r),s)}function oh(e,r){var s=ge(e)?wr:pi;return s(e,ne(r,3))}function ch(e,r){var s=ge(e)?If:nu;return s(e,ne(r,3))}var sy=zs(function(e,r,s){je.call(e,s)?e[s].push(r):Jr(e,s,[r])});function ay(e,r,s,c){e=sr(e)?e:un(e),s=s&&!c?ve(s):0;var l=e.length;return s<0&&(s=Lt(l+s,0)),Zs(e)?s<=l&&e.indexOf(r,s)>-1:!!l&&Qi(e,r,s)>-1}var oy=be(function(e,r,s){var c=-1,l=typeof r=="function",g=sr(e)?A(e.length):[];return pi(e,function(m){g[++c]=l?jt(r,m,s):On(m,r,s)}),g}),cy=zs(function(e,r,s){Jr(e,s,r)});function Ws(e,r){var s=ge(e)?it:lu;return s(e,ne(r,3))}function uy(e,r,s,c){return e==null?[]:(ge(r)||(r=r==null?[]:[r]),s=c?t:s,ge(s)||(s=s==null?[]:[s]),gu(e,r,s))}var hy=zs(function(e,r,s){e[s?0:1].push(r)},function(){return[[],[]]});function ly(e,r,s){var c=ge(e)?Ha:zc,l=arguments.length<3;return c(e,ne(r,4),s,l,pi)}function fy(e,r,s){var c=ge(e)?xf:zc,l=arguments.length<3;return c(e,ne(r,4),s,l,nu)}function py(e,r){var s=ge(e)?ui:su;return s(e,Ys(ne(r,3)))}function dy(e){var r=ge(e)?eu:ad;return r(e)}function gy(e,r,s){(s?Xt(e,r,s):r===t)?r=1:r=ve(r);var c=ge(e)?qp:od;return c(e,r)}function yy(e){var r=ge(e)?jp:ud;return r(e)}function vy(e){if(e==null)return 0;if(sr(e))return Zs(e)?Xi(e):e.length;var r=Vt(e);return r==me||r==De?e.size:oo(e).length}function my(e,r,s){var c=ge(e)?ka:hd;return s&&Xt(e,r,s)&&(r=t),c(e,ne(r,3))}var wy=be(function(e,r){if(e==null)return[];var s=r.length;return s>1&&Xt(e,r[0],r[1])?r=[]:s>2&&Xt(r[0],r[1],r[2])&&(r=[r[0]]),gu(e,kt(r,1),[])}),Js=Zf||function(){return Pe.Date.now()};function _y(e,r){if(typeof r!="function")throw new _r(f);return e=ve(e),function(){if(--e<1)return r.apply(this,arguments)}}function uh(e,r,s){return r=s?t:r,r=e&&r==null?e.length:r,Qr(e,H,t,t,t,t,r)}function hh(e,r){var s;if(typeof r!="function")throw new _r(f);return e=ve(e),function(){return--e>0&&(s=r.apply(this,arguments)),e<=1&&(r=t),s}}var No=be(function(e,r,s){var c=re;if(s.length){var l=li(s,on(No));c|=pe}return Qr(e,c,r,s,l)}),lh=be(function(e,r,s){var c=re|ce;if(s.length){var l=li(s,on(lh));c|=pe}return Qr(r,c,e,s,l)});function fh(e,r,s){r=s?t:r;var c=Qr(e,he,t,t,t,t,t,r);return c.placeholder=fh.placeholder,c}function ph(e,r,s){r=s?t:r;var c=Qr(e,fe,t,t,t,t,t,r);return c.placeholder=ph.placeholder,c}function dh(e,r,s){var c,l,g,m,b,S,q=0,j=!1,U=!1,G=!0;if(typeof e!="function")throw new _r(f);r=Sr(r)||0,ct(s)&&(j=!!s.leading,U="maxWait"in s,g=U?Lt(Sr(s.maxWait)||0,r):g,G="trailing"in s?!!s.trailing:G);function ee(Et){var Nr=c,ti=l;return c=l=t,q=Et,m=e.apply(ti,Nr),m}function se(Et){return q=Et,b=Nn(Ie,r),j?ee(Et):m}function we(Et){var Nr=Et-S,ti=Et-q,$h=r-Nr;return U?Bt($h,g-ti):$h}function ae(Et){var Nr=Et-S,ti=Et-q;return S===t||Nr>=r||Nr<0||U&&ti>=g}function Ie(){var Et=Js();if(ae(Et))return Oe(Et);b=Nn(Ie,we(Et))}function Oe(Et){return b=t,G&&c?ee(Et):(c=l=t,m)}function gr(){b!==t&&xu(b),q=0,c=S=l=b=t}function Zt(){return b===t?m:Oe(Js())}function yr(){var Et=Js(),Nr=ae(Et);if(c=arguments,l=this,S=Et,Nr){if(b===t)return se(S);if(U)return xu(b),b=Nn(Ie,r),ee(S)}return b===t&&(b=Nn(Ie,r)),m}return yr.cancel=gr,yr.flush=Zt,yr}var by=be(function(e,r){return iu(e,1,r)}),Ey=be(function(e,r,s){return iu(e,Sr(r)||0,s)});function Iy(e){return Qr(e,ye)}function Qs(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new _r(f);var s=function(){var c=arguments,l=r?r.apply(this,c):c[0],g=s.cache;if(g.has(l))return g.get(l);var m=e.apply(this,c);return s.cache=g.set(l,m)||g,m};return s.cache=new(Qs.Cache||Wr),s}Qs.Cache=Wr;function Ys(e){if(typeof e!="function")throw new _r(f);return function(){var r=arguments;switch(r.length){case 0:return!e.call(this);case 1:return!e.call(this,r[0]);case 2:return!e.call(this,r[0],r[1]);case 3:return!e.call(this,r[0],r[1],r[2])}return!e.apply(this,r)}}function xy(e){return hh(2,e)}var Sy=ld(function(e,r){r=r.length==1&&ge(r[0])?it(r[0],fr(ne())):it(kt(r,1),fr(ne()));var s=r.length;return be(function(c){for(var l=-1,g=Bt(c.length,s);++l=r}),qi=cu(function(){return arguments}())?cu:function(e){return vt(e)&&je.call(e,"callee")&&!Wc.call(e,"callee")},ge=A.isArray,My=Qt?fr(Qt):Wp;function sr(e){return e!=null&&Xs(e.length)&&!Zr(e)}function bt(e){return vt(e)&&sr(e)}function Uy(e){return e===!0||e===!1||vt(e)&&Yt(e)==R}var vi=tp||Ko,Hy=Cr?fr(Cr):Jp;function ky(e){return vt(e)&&e.nodeType===1&&!$n(e)}function Ky(e){if(e==null)return!0;if(sr(e)&&(ge(e)||typeof e=="string"||typeof e.splice=="function"||vi(e)||cn(e)||qi(e)))return!e.length;var r=Vt(e);if(r==me||r==De)return!e.size;if(Rn(e))return!oo(e).length;for(var s in e)if(je.call(e,s))return!1;return!0}function By(e,r){return Cn(e,r)}function Vy(e,r,s){s=typeof s=="function"?s:t;var c=s?s(e,r):t;return c===t?Cn(e,r,t,s):!!c}function Fo(e){if(!vt(e))return!1;var r=Yt(e);return r==E||r==h||typeof e.message=="string"&&typeof e.name=="string"&&!$n(e)}function Gy(e){return typeof e=="number"&&Qc(e)}function Zr(e){if(!ct(e))return!1;var r=Yt(e);return r==Z||r==oe||r==$||r==mt}function yh(e){return typeof e=="number"&&e==ve(e)}function Xs(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=J}function ct(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function vt(e){return e!=null&&typeof e=="object"}var vh=mr?fr(mr):Yp;function Wy(e,r){return e===r||ao(e,r,xo(r))}function Jy(e,r,s){return s=typeof s=="function"?s:t,ao(e,r,xo(r),s)}function Qy(e){return mh(e)&&e!=+e}function Yy(e){if(Fd(e))throw new le(u);return uu(e)}function Xy(e){return e===null}function Zy(e){return e==null}function mh(e){return typeof e=="number"||vt(e)&&Yt(e)==Re}function $n(e){if(!vt(e)||Yt(e)!=xe)return!1;var r=Ss(e);if(r===null)return!0;var s=je.call(r,"constructor")&&r.constructor;return typeof s=="function"&&s instanceof s&&bs.call(s)==Jf}var Do=jr?fr(jr):Xp;function e0(e){return yh(e)&&e>=-J&&e<=J}var wh=mn?fr(mn):Zp;function Zs(e){return typeof e=="string"||!ge(e)&&vt(e)&&Yt(e)==Je}function dr(e){return typeof e=="symbol"||vt(e)&&Yt(e)==Qe}var cn=Ai?fr(Ai):ed;function t0(e){return e===t}function r0(e){return vt(e)&&Vt(e)==Me}function i0(e){return vt(e)&&Yt(e)==Ye}var n0=ks(co),s0=ks(function(e,r){return e<=r});function _h(e){if(!e)return[];if(sr(e))return Zs(e)?Ar(e):nr(e);if(_n&&e[_n])return qf(e[_n]());var r=Vt(e),s=r==me?Ja:r==De?ms:un;return s(e)}function ei(e){if(!e)return e===0?e:0;if(e=Sr(e),e===Te||e===-Te){var r=e<0?-1:1;return r*B}return e===e?e:0}function ve(e){var r=ei(e),s=r%1;return r===r?s?r-s:r:0}function bh(e){return e?$i(ve(e),0,V):0}function Sr(e){if(typeof e=="number")return e;if(dr(e))return k;if(ct(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=ct(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=Mc(e);var s=xa.test(e);return s||Pa.test(e)?de(e.slice(2),s?2:8):Ia.test(e)?k:+e}function Eh(e){return Mr(e,ar(e))}function a0(e){return e?$i(ve(e),-J,J):e===0?e:0}function Le(e){return e==null?"":pr(e)}var o0=sn(function(e,r){if(Rn(r)||sr(r)){Mr(r,zt(r),e);return}for(var s in r)je.call(r,s)&&Sn(e,s,r[s])}),Ih=sn(function(e,r){Mr(r,ar(r),e)}),ea=sn(function(e,r,s,c){Mr(r,ar(r),e,c)}),c0=sn(function(e,r,s,c){Mr(r,zt(r),e,c)}),u0=Yr(to);function h0(e,r){var s=nn(e);return r==null?s:tu(s,r)}var l0=be(function(e,r){e=Ge(e);var s=-1,c=r.length,l=c>2?r[2]:t;for(l&&Xt(r[0],r[1],l)&&(c=1);++s1),g}),Mr(e,Eo(e),s),c&&(s=Er(s,O|P|L,Ed));for(var l=r.length;l--;)po(s,r[l]);return s});function A0(e,r){return Sh(e,Ys(ne(r)))}var T0=Yr(function(e,r){return e==null?{}:id(e,r)});function Sh(e,r){if(e==null)return{};var s=it(Eo(e),function(c){return[c]});return r=ne(r),yu(e,s,function(c,l){return r(c,l[0])})}function R0(e,r,s){r=gi(r,e);var c=-1,l=r.length;for(l||(l=1,e=t);++cr){var c=e;e=r,r=c}if(s||e%1||r%1){var l=Yc();return Bt(e+l*(r-e+Be("1e-"+((l+"").length-1))),r)}return ho(e,r)}var H0=an(function(e,r,s){return r=r.toLowerCase(),e+(s?Ch(r):r)});function Ch(e){return jo(Le(e).toLowerCase())}function Ah(e){return e=Le(e),e&&e.replace(Br,Nf).replace(za,"")}function k0(e,r,s){e=Le(e),r=pr(r);var c=e.length;s=s===t?c:$i(ve(s),0,c);var l=s;return s-=r.length,s>=0&&e.slice(s,l)==r}function K0(e){return e=Le(e),e&&tt.test(e)?e.replace(xi,$f):e}function B0(e){return e=Le(e),e&&Ct.test(e)?e.replace(dt,"\\$&"):e}var V0=an(function(e,r,s){return e+(s?"-":"")+r.toLowerCase()}),G0=an(function(e,r,s){return e+(s?" ":"")+r.toLowerCase()}),W0=Nu("toLowerCase");function J0(e,r,s){e=Le(e),r=ve(r);var c=r?Xi(e):0;if(!r||c>=r)return e;var l=(r-c)/2;return Hs(As(l),s)+e+Hs(Cs(l),s)}function Q0(e,r,s){e=Le(e),r=ve(r);var c=r?Xi(e):0;return r&&c>>0,s?(e=Le(e),e&&(typeof r=="string"||r!=null&&!Do(r))&&(r=pr(r),!r&&Yi(e))?yi(Ar(e),0,s):e.split(r,s)):[]}var iv=an(function(e,r,s){return e+(s?" ":"")+jo(r)});function nv(e,r,s){return e=Le(e),s=s==null?0:$i(ve(s),0,e.length),r=pr(r),e.slice(s,s+r.length)==r}function sv(e,r,s){var c=p.templateSettings;s&&Xt(e,r,s)&&(r=t),e=Le(e),r=ea({},r,c,zu);var l=ea({},r.imports,c.imports,zu),g=zt(l),m=Wa(l,g),b,S,q=0,j=r.interpolate||ki,U="__p += '",G=Qa((r.escape||ki).source+"|"+j.source+"|"+(j===ot?Ea:ki).source+"|"+(r.evaluate||ki).source+"|$","g"),ee="//# sourceURL="+(je.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ma+"]")+` +`;e.replace(G,function(ae,Ie,Oe,gr,Zt,yr){return Oe||(Oe=gr),U+=e.slice(q,yr).replace(Ca,Ff),Ie&&(b=!0,U+=`' + +__e(`+Ie+`) + +'`),Zt&&(S=!0,U+=`'; +`+Zt+`; +__p += '`),Oe&&(U+=`' + +((__t = (`+Oe+`)) == null ? '' : __t) + +'`),q=yr+ae.length,ae}),U+=`'; +`;var se=je.call(r,"variable")&&r.variable;if(!se)U=`with (obj) { +`+U+` +} +`;else if(_a.test(se))throw new le(y);U=(S?U.replace(Lr,""):U).replace(Jt,"$1").replace(Kr,"$1;"),U="function("+(se||"obj")+`) { +`+(se?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(b?", __e = _.escape":"")+(S?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+U+`return __p +}`;var we=Rh(function(){return Fe(g,ee+"return "+U).apply(t,m)});if(we.source=U,Fo(we))throw we;return we}function av(e){return Le(e).toLowerCase()}function ov(e){return Le(e).toUpperCase()}function cv(e,r,s){if(e=Le(e),e&&(s||r===t))return Mc(e);if(!e||!(r=pr(r)))return e;var c=Ar(e),l=Ar(r),g=Uc(c,l),m=Hc(c,l)+1;return yi(c,g,m).join("")}function uv(e,r,s){if(e=Le(e),e&&(s||r===t))return e.slice(0,Kc(e)+1);if(!e||!(r=pr(r)))return e;var c=Ar(e),l=Hc(c,Ar(r))+1;return yi(c,0,l).join("")}function hv(e,r,s){if(e=Le(e),e&&(s||r===t))return e.replace(gt,"");if(!e||!(r=pr(r)))return e;var c=Ar(e),l=Uc(c,Ar(r));return yi(c,l).join("")}function lv(e,r){var s=te,c=Ee;if(ct(r)){var l="separator"in r?r.separator:l;s="length"in r?ve(r.length):s,c="omission"in r?pr(r.omission):c}e=Le(e);var g=e.length;if(Yi(e)){var m=Ar(e);g=m.length}if(s>=g)return e;var b=s-Xi(c);if(b<1)return c;var S=m?yi(m,0,b).join(""):e.slice(0,b);if(l===t)return S+c;if(m&&(b+=S.length-b),Do(l)){if(e.slice(b).search(l)){var q,j=S;for(l.global||(l=Qa(l.source,Le(vr.exec(l))+"g")),l.lastIndex=0;q=l.exec(j);)var U=q.index;S=S.slice(0,U===t?b:U)}}else if(e.indexOf(pr(l),b)!=b){var G=S.lastIndexOf(l);G>-1&&(S=S.slice(0,G))}return S+c}function fv(e){return e=Le(e),e&<.test(e)?e.replace(oi,Uf):e}var pv=an(function(e,r,s){return e+(s?" ":"")+r.toUpperCase()}),jo=Nu("toUpperCase");function Th(e,r,s){return e=Le(e),r=s?t:r,r===t?Lf(e)?Kf(e):Of(e):e.match(r)||[]}var Rh=be(function(e,r){try{return jt(e,t,r)}catch(s){return Fo(s)?s:new le(s)}}),dv=Yr(function(e,r){return wr(r,function(s){s=Ur(s),Jr(e,s,No(e[s],e))}),e});function gv(e){var r=e==null?0:e.length,s=ne();return e=r?it(e,function(c){if(typeof c[1]!="function")throw new _r(f);return[s(c[0]),c[1]]}):[],be(function(c){for(var l=-1;++lJ)return[];var s=V,c=Bt(e,V);r=ne(r),e-=V;for(var l=Ga(c,r);++s0||r<0)?new Se(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),r!==t&&(r=ve(r),s=r<0?s.dropRight(-r):s.take(r-e)),s)},Se.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Se.prototype.toArray=function(){return this.take(V)},zr(Se.prototype,function(e,r){var s=/^(?:filter|find|map|reject)|While$/.test(r),c=/^(?:head|last)$/.test(r),l=p[c?"take"+(r=="last"?"Right":""):r],g=c||/^find/.test(r);l&&(p.prototype[r]=function(){var m=this.__wrapped__,b=c?[1]:arguments,S=m instanceof Se,q=b[0],j=S||ge(m),U=function(Ie){var Oe=l.apply(p,hi([Ie],b));return c&&G?Oe[0]:Oe};j&&s&&typeof q=="function"&&q.length!=1&&(S=j=!1);var G=this.__chain__,ee=!!this.__actions__.length,se=g&&!G,we=S&&!ee;if(!g&&j){m=we?m:new Se(this);var ae=e.apply(m,b);return ae.__actions__.push({func:Gs,args:[U],thisArg:t}),new br(ae,G)}return se&&we?e.apply(this,b):(ae=this.thru(U),se?c?ae.value()[0]:ae.value():ae)})}),wr(["pop","push","shift","sort","splice","unshift"],function(e){var r=ws[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);p.prototype[e]=function(){var l=arguments;if(c&&!this.__chain__){var g=this.value();return r.apply(ge(g)?g:[],l)}return this[s](function(m){return r.apply(ge(m)?m:[],l)})}}),zr(Se.prototype,function(e,r){var s=p[r];if(s){var c=s.name+"";je.call(rn,c)||(rn[c]=[]),rn[c].push({name:r,func:s})}}),rn[Ms(t,ce).name]=[{name:"wrapper",func:t}],Se.prototype.clone=fp,Se.prototype.reverse=pp,Se.prototype.value=dp,p.prototype.at=kg,p.prototype.chain=Kg,p.prototype.commit=Bg,p.prototype.next=Vg,p.prototype.plant=Wg,p.prototype.reverse=Jg,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Qg,p.prototype.first=p.prototype.head,_n&&(p.prototype[_n]=Gg),p},Zi=Bf();_t?((_t.exports=Zi)._=Zi,Ve._=Zi):Pe._=Zi}).call(Mn)})(wc,wc.exports);var jE=Object.defineProperty,zE=Object.defineProperties,ME=Object.getOwnPropertyDescriptors,Ol=Object.getOwnPropertySymbols,UE=Object.prototype.hasOwnProperty,HE=Object.prototype.propertyIsEnumerable,Cl=(o,i,t)=>i in o?jE(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,sa=(o,i)=>{for(var t in i||(i={}))UE.call(i,t)&&Cl(o,t,i[t]);if(Ol)for(var t of Ol(i))HE.call(i,t)&&Cl(o,t,i[t]);return o},kE=(o,i)=>zE(o,ME(i));function Ei(o,i,t){var n;const a=jm(o);return((n=i.rpcMap)==null?void 0:n[a.reference])||`${qE}?chainId=${a.namespace}:${a.reference}&projectId=${t}`}function Hi(o){return o.includes(":")?o.split(":")[1]:o}function _f(o){return o.map(i=>`${i.split(":")[0]}:${i.split(":")[1]}`)}function KE(o,i){const t=Object.keys(i.namespaces).filter(a=>a.includes(o));if(!t.length)return[];const n=[];return t.forEach(a=>{const u=i.namespaces[a].accounts;n.push(...u)}),n}function BE(o={},i={}){const t=Al(o),n=Al(i);return wc.exports.merge(t,n)}function Al(o){var i,t,n,a;const u={};if(!ca(o))return u;for(const[f,y]of Object.entries(o)){const w=Hl(f)?[f]:y.chains,d=y.methods||[],_=y.events||[],O=y.rpcMap||{},P=Un(f);u[P]=kE(sa(sa({},u[P]),y),{chains:Vo(w,(i=u[P])==null?void 0:i.chains),methods:Vo(d,(t=u[P])==null?void 0:t.methods),events:Vo(_,(n=u[P])==null?void 0:n.events),rpcMap:sa(sa({},O),(a=u[P])==null?void 0:a.rpcMap)})}return u}function VE(o){return o.includes(":")?o.split(":")[2]:o}function GE(o){const i={};for(const[t,n]of Object.entries(o)){const a=n.methods||[],u=n.events||[],f=n.accounts||[],y=Hl(t)?[t]:n.chains?n.chains:_f(n.accounts);i[t]={chains:y,methods:a,events:u,accounts:f}}return i}function nc(o){return typeof o=="number"?o:o.includes("0x")?parseInt(o,16):o.includes(":")?Number(o.split(":")[1]):Number(o)}const bf={},nt=o=>bf[o],sc=(o,i)=>{bf[o]=i};class WE{constructor(i){this.name="polkadot",this.namespace=i.namespace,this.events=nt("events"),this.client=nt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(i){this.namespace=Object.assign(this.namespace,i)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const i=this.namespace.chains[0];if(!i)throw new Error("ChainId not found");return i.split(":")[1]}request(i){return this.namespace.methods.includes(i.request.method)?this.client.request(i):this.getHttpProvider().request(i.request)}setDefaultChain(i,t){this.httpProviders[i]||this.setHttpProvider(i,t),this.chainId=i,this.events.emit(ai.DEFAULT_CHAIN_CHANGED,`${this.name}:${i}`)}getAccounts(){const i=this.namespace.accounts;return i?i.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const i={};return this.namespace.chains.forEach(t=>{var n;const a=Hi(t);i[a]=this.createHttpProvider(a,(n=this.namespace.rpcMap)==null?void 0:n[t])}),i}getHttpProvider(){const i=`${this.name}:${this.chainId}`,t=this.httpProviders[i];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${i} not found`);return t}setHttpProvider(i,t){const n=this.createHttpProvider(i,t);n&&(this.httpProviders[i]=n)}createHttpProvider(i,t){const n=t||Ei(i,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${i}`);return new si(new Ii(n,nt("disableProviderPing")))}}class JE{constructor(i){this.name="eip155",this.namespace=i.namespace,this.events=nt("events"),this.client=nt("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(i){switch(i.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(i);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(i.request.method)?await this.client.request(i):this.getHttpProvider().request(i.request)}updateNamespace(i){this.namespace=Object.assign(this.namespace,i)}setDefaultChain(i,t){this.httpProviders[i]||this.setHttpProvider(parseInt(i),t),this.chainId=parseInt(i),this.events.emit(ai.DEFAULT_CHAIN_CHANGED,`${this.name}:${i}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const i=this.namespace.chains[0];if(!i)throw new Error("ChainId not found");return i.split(":")[1]}createHttpProvider(i,t){const n=t||Ei(`${this.name}:${i}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${i}`);return new si(new Ii(n,nt("disableProviderPing")))}setHttpProvider(i,t){const n=this.createHttpProvider(i,t);n&&(this.httpProviders[i]=n)}createHttpProviders(){const i={};return this.namespace.chains.forEach(t=>{var n;const a=parseInt(Hi(t));i[a]=this.createHttpProvider(a,(n=this.namespace.rpcMap)==null?void 0:n[t])}),i}getAccounts(){const i=this.namespace.accounts;return i?[...new Set(i.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const i=this.chainId,t=this.httpProviders[i];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${i} not found`);return t}async handleSwitchChain(i){var t,n;let a=i.request.params?(t=i.request.params[0])==null?void 0:t.chainId:"0x0";a=a.startsWith("0x")?a:`0x${a}`;const u=parseInt(a,16);if(this.isChainApproved(u))this.setDefaultChain(`${u}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:i.topic,request:{method:i.request.method,params:[{chainId:a}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${u}`);else throw new Error(`Failed to switch to chain 'eip155:${u}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(i){return this.namespace.chains.includes(`${this.name}:${i}`)}}class QE{constructor(i){this.name="solana",this.namespace=i.namespace,this.events=nt("events"),this.client=nt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(i){this.namespace=Object.assign(this.namespace,i)}requestAccounts(){return this.getAccounts()}request(i){return this.namespace.methods.includes(i.request.method)?this.client.request(i):this.getHttpProvider().request(i.request)}setDefaultChain(i,t){this.httpProviders[i]||this.setHttpProvider(i,t),this.chainId=i,this.events.emit(ai.DEFAULT_CHAIN_CHANGED,`${this.name}:${i}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const i=this.namespace.chains[0];if(!i)throw new Error("ChainId not found");return i.split(":")[1]}getAccounts(){const i=this.namespace.accounts;return i?[...new Set(i.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const i={};return this.namespace.chains.forEach(t=>{var n;const a=Hi(t);i[a]=this.createHttpProvider(a,(n=this.namespace.rpcMap)==null?void 0:n[t])}),i}getHttpProvider(){const i=`${this.name}:${this.chainId}`,t=this.httpProviders[i];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${i} not found`);return t}setHttpProvider(i,t){const n=this.createHttpProvider(i,t);n&&(this.httpProviders[i]=n)}createHttpProvider(i,t){const n=t||Ei(i,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${i}`);return new si(new Ii(n,nt("disableProviderPing")))}}class YE{constructor(i){this.name="cosmos",this.namespace=i.namespace,this.events=nt("events"),this.client=nt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(i){this.namespace=Object.assign(this.namespace,i)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const i=this.namespace.chains[0];if(!i)throw new Error("ChainId not found");return i.split(":")[1]}request(i){return this.namespace.methods.includes(i.request.method)?this.client.request(i):this.getHttpProvider().request(i.request)}setDefaultChain(i,t){this.httpProviders[i]||this.setHttpProvider(i,t),this.chainId=i,this.events.emit(ai.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const i=this.namespace.accounts;return i?[...new Set(i.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const i={};return this.namespace.chains.forEach(t=>{var n;const a=Hi(t);i[a]=this.createHttpProvider(a,(n=this.namespace.rpcMap)==null?void 0:n[t])}),i}getHttpProvider(){const i=`${this.name}:${this.chainId}`,t=this.httpProviders[i];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${i} not found`);return t}setHttpProvider(i,t){const n=this.createHttpProvider(i,t);n&&(this.httpProviders[i]=n)}createHttpProvider(i,t){const n=t||Ei(i,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${i}`);return new si(new Ii(n,nt("disableProviderPing")))}}class XE{constructor(i){this.name="cip34",this.namespace=i.namespace,this.events=nt("events"),this.client=nt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(i){this.namespace=Object.assign(this.namespace,i)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const i=this.namespace.chains[0];if(!i)throw new Error("ChainId not found");return i.split(":")[1]}request(i){return this.namespace.methods.includes(i.request.method)?this.client.request(i):this.getHttpProvider().request(i.request)}setDefaultChain(i,t){this.httpProviders[i]||this.setHttpProvider(i,t),this.chainId=i,this.events.emit(ai.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const i=this.namespace.accounts;return i?[...new Set(i.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const i={};return this.namespace.chains.forEach(t=>{const n=this.getCardanoRPCUrl(t),a=Hi(t);i[a]=this.createHttpProvider(a,n)}),i}getHttpProvider(){const i=`${this.name}:${this.chainId}`,t=this.httpProviders[i];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${i} not found`);return t}getCardanoRPCUrl(i){const t=this.namespace.rpcMap;if(t)return t[i]}setHttpProvider(i,t){const n=this.createHttpProvider(i,t);n&&(this.httpProviders[i]=n)}createHttpProvider(i,t){const n=t||this.getCardanoRPCUrl(i);if(!n)throw new Error(`No RPC url provided for chainId: ${i}`);return new si(new Ii(n,nt("disableProviderPing")))}}class ZE{constructor(i){this.name="elrond",this.namespace=i.namespace,this.events=nt("events"),this.client=nt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(i){this.namespace=Object.assign(this.namespace,i)}requestAccounts(){return this.getAccounts()}request(i){return this.namespace.methods.includes(i.request.method)?this.client.request(i):this.getHttpProvider().request(i.request)}setDefaultChain(i,t){this.httpProviders[i]||this.setHttpProvider(i,t),this.chainId=i,this.events.emit(ai.DEFAULT_CHAIN_CHANGED,`${this.name}:${i}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const i=this.namespace.chains[0];if(!i)throw new Error("ChainId not found");return i.split(":")[1]}getAccounts(){const i=this.namespace.accounts;return i?[...new Set(i.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const i={};return this.namespace.chains.forEach(t=>{var n;const a=Hi(t);i[a]=this.createHttpProvider(a,(n=this.namespace.rpcMap)==null?void 0:n[t])}),i}getHttpProvider(){const i=`${this.name}:${this.chainId}`,t=this.httpProviders[i];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${i} not found`);return t}setHttpProvider(i,t){const n=this.createHttpProvider(i,t);n&&(this.httpProviders[i]=n)}createHttpProvider(i,t){const n=t||Ei(i,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${i}`);return new si(new Ii(n,nt("disableProviderPing")))}}class eI{constructor(i){this.name="multiversx",this.namespace=i.namespace,this.events=nt("events"),this.client=nt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(i){this.namespace=Object.assign(this.namespace,i)}requestAccounts(){return this.getAccounts()}request(i){return this.namespace.methods.includes(i.request.method)?this.client.request(i):this.getHttpProvider().request(i.request)}setDefaultChain(i,t){this.httpProviders[i]||this.setHttpProvider(i,t),this.chainId=i,this.events.emit(ai.DEFAULT_CHAIN_CHANGED,`${this.name}:${i}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const i=this.namespace.chains[0];if(!i)throw new Error("ChainId not found");return i.split(":")[1]}getAccounts(){const i=this.namespace.accounts;return i?[...new Set(i.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const i={};return this.namespace.chains.forEach(t=>{var n;const a=Hi(t);i[a]=this.createHttpProvider(a,(n=this.namespace.rpcMap)==null?void 0:n[t])}),i}getHttpProvider(){const i=`${this.name}:${this.chainId}`,t=this.httpProviders[i];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${i} not found`);return t}setHttpProvider(i,t){const n=this.createHttpProvider(i,t);n&&(this.httpProviders[i]=n)}createHttpProvider(i,t){const n=t||Ei(i,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${i}`);return new si(new Ii(n,nt("disableProviderPing")))}}class tI{constructor(i){this.name="near",this.namespace=i.namespace,this.events=nt("events"),this.client=nt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(i){this.namespace=Object.assign(this.namespace,i)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const i=this.namespace.chains[0];if(!i)throw new Error("ChainId not found");return i.split(":")[1]}request(i){return this.namespace.methods.includes(i.request.method)?this.client.request(i):this.getHttpProvider().request(i.request)}setDefaultChain(i,t){if(this.chainId=i,!this.httpProviders[i]){const n=t||Ei(`${this.name}:${i}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${i}`);this.setHttpProvider(i,n)}this.events.emit(ai.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const i=this.namespace.accounts;return i?i.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const i={};return this.namespace.chains.forEach(t=>{var n;i[t]=this.createHttpProvider(t,(n=this.namespace.rpcMap)==null?void 0:n[t])}),i}getHttpProvider(){const i=`${this.name}:${this.chainId}`,t=this.httpProviders[i];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${i} not found`);return t}setHttpProvider(i,t){const n=this.createHttpProvider(i,t);n&&(this.httpProviders[i]=n)}createHttpProvider(i,t){const n=t||Ei(i,this.namespace);return typeof n>"u"?void 0:new si(new Ii(n,nt("disableProviderPing")))}}var rI=Object.defineProperty,iI=Object.defineProperties,nI=Object.getOwnPropertyDescriptors,Tl=Object.getOwnPropertySymbols,sI=Object.prototype.hasOwnProperty,aI=Object.prototype.propertyIsEnumerable,Rl=(o,i,t)=>i in o?rI(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,aa=(o,i)=>{for(var t in i||(i={}))sI.call(i,t)&&Rl(o,t,i[t]);if(Tl)for(var t of Tl(i))aI.call(i,t)&&Rl(o,t,i[t]);return o},ac=(o,i)=>iI(o,nI(i));class $c{constructor(i){this.events=new xc,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=i,this.logger=typeof(i==null?void 0:i.logger)<"u"&&typeof(i==null?void 0:i.logger)!="string"?i.logger:Ce.pino(Ce.getDefaultLoggerOptions({level:(i==null?void 0:i.logger)||Sl})),this.disableProviderPing=(i==null?void 0:i.disableProviderPing)||!1}static async init(i){const t=new $c(i);return await t.initialize(),t}async request(i,t){const[n,a]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:aa({},i),chainId:`${n}:${a}`,topic:this.session.topic})}sendAsync(i,t,n){this.request(i,n).then(a=>t(null,a)).catch(a=>t(a,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var i;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(i=this.session)==null?void 0:i.topic,reason:tr("USER_DISCONNECTED")}),await this.cleanup()}async connect(i){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(i),await this.cleanupPendingPairings(),!i.skipPairing)return await this.pair(i.pairingTopic)}on(i,t){this.events.on(i,t)}once(i,t){this.events.once(i,t)}removeListener(i,t){this.events.removeListener(i,t)}off(i,t){this.events.off(i,t)}get isWalletConnect(){return!0}async pair(i){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:a}=await this.client.connect({pairingTopic:i,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await a().then(u=>{this.session=u,this.namespaces||(this.namespaces=GE(u.namespaces),this.persist("namespaces",this.namespaces))}).catch(u=>{if(u.message!==mf)throw u;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(i,t){try{if(!this.session)return;const[n,a]=this.validateChain(i);this.getProvider(n).setDefaultChain(a,t)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(i={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(pn(t)){for(const n of t)i.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const i=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[i]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await $E.init({logger:this.providerOpts.logger||Sl,relayUrl:this.providerOpts.relayUrl||FE,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const i=[...new Set(Object.keys(this.session.namespaces).map(t=>Un(t)))];sc("client",this.client),sc("events",this.events),sc("disableProviderPing",this.disableProviderPing),i.forEach(t=>{if(!this.session)return;const n=KE(t,this.session),a=_f(n),u=BE(this.namespaces,this.optionalNamespaces),f=ac(aa({},u[t]),{accounts:n,chains:a});switch(t){case"eip155":this.rpcProviders[t]=new JE({namespace:f});break;case"solana":this.rpcProviders[t]=new QE({namespace:f});break;case"cosmos":this.rpcProviders[t]=new YE({namespace:f});break;case"polkadot":this.rpcProviders[t]=new WE({namespace:f});break;case"cip34":this.rpcProviders[t]=new XE({namespace:f});break;case"elrond":this.rpcProviders[t]=new ZE({namespace:f});break;case"multiversx":this.rpcProviders[t]=new eI({namespace:f});break;case"near":this.rpcProviders[t]=new tI({namespace:f});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",i=>{this.events.emit("session_ping",i)}),this.client.on("session_event",i=>{const{params:t}=i,{event:n}=t;if(n.name==="accountsChanged"){const a=n.data;a&&pn(a)&&this.events.emit("accountsChanged",a.map(VE))}else if(n.name==="chainChanged"){const a=t.chainId,u=t.event.data,f=Un(a),y=nc(a)!==nc(u)?`${f}:${nc(u)}`:a;this.onChainChanged(y)}else this.events.emit(n.name,n.data);this.events.emit("session_event",i)}),this.client.on("session_update",({topic:i,params:t})=>{var n;const{namespaces:a}=t,u=(n=this.client)==null?void 0:n.session.get(i);this.session=ac(aa({},u),{namespaces:a}),this.onSessionUpdate(),this.events.emit("session_update",{topic:i,params:t})}),this.client.on("session_delete",async i=>{await this.cleanup(),this.events.emit("session_delete",i),this.events.emit("disconnect",ac(aa({},tr("USER_DISCONNECTED")),{data:i.topic}))}),this.on(ai.DEFAULT_CHAIN_CHANGED,i=>{this.onChainChanged(i,!0)})}getProvider(i){if(!this.rpcProviders[i])throw new Error(`Provider not found: ${i}`);return this.rpcProviders[i]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(i=>{var t;this.getProvider(i).updateNamespace((t=this.session)==null?void 0:t.namespaces[i])})}setNamespaces(i){const{namespaces:t,optionalNamespaces:n,sessionProperties:a}=i;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=a,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(i){const[t,n]=(i==null?void 0:i.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map(f=>Un(f)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const a=Un(Object.keys(this.namespaces)[0]),u=this.rpcProviders[a].getDefaultChain();return[a,u]}async requestAccounts(){const[i]=this.validateChain();return await this.getProvider(i).requestAccounts()}onChainChanged(i,t=!1){var n;if(!this.namespaces)return;const[a,u]=this.validateChain(i);t||this.getProvider(a).setDefaultChain(u),((n=this.namespaces[a])!=null?n:this.namespaces[`${a}:${u}`]).defaultChain=u,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",u)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(i,t){this.client.core.storage.setItem(`${Pl}/${i}`,t)}async getFromStore(i){return await this.client.core.storage.getItem(`${Pl}/${i}`)}}const oI=$c,cI="wc",uI="ethereum_provider",hI=`${cI}@2:${uI}:`,lI="https://rpc.walletconnect.com/v1/",_c=["eth_sendTransaction","personal_sign"],fI=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],bc=["chainChanged","accountsChanged"],pI=["chainChanged","accountsChanged","message","disconnect","connect"];var dI=Object.defineProperty,gI=Object.defineProperties,yI=Object.getOwnPropertyDescriptors,Nl=Object.getOwnPropertySymbols,vI=Object.prototype.hasOwnProperty,mI=Object.prototype.propertyIsEnumerable,$l=(o,i,t)=>i in o?dI(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,kn=(o,i)=>{for(var t in i||(i={}))vI.call(i,t)&&$l(o,t,i[t]);if(Nl)for(var t of Nl(i))mI.call(i,t)&&$l(o,t,i[t]);return o},Fl=(o,i)=>gI(o,yI(i));function da(o){return Number(o[0].split(":")[1])}function oc(o){return`0x${o.toString(16)}`}function wI(o){const{chains:i,optionalChains:t,methods:n,optionalMethods:a,events:u,optionalEvents:f,rpcMap:y}=o;if(!pn(i))throw new Error("Invalid chains");const w={chains:i,methods:n||_c,events:u||bc,rpcMap:kn({},i.length?{[da(i)]:y[da(i)]}:{})},d=u==null?void 0:u.filter(L=>!bc.includes(L)),_=n==null?void 0:n.filter(L=>!_c.includes(L));if(!t&&!f&&!a&&!(d!=null&&d.length)&&!(_!=null&&_.length))return{required:i.length?w:void 0};const O=(d==null?void 0:d.length)&&(_==null?void 0:_.length)||!t,P={chains:[...new Set(O?w.chains.concat(t||[]):t)],methods:[...new Set(w.methods.concat(a!=null&&a.length?a:fI))],events:[...new Set(w.events.concat(f!=null&&f.length?f:pI))],rpcMap:y};return{required:i.length?w:void 0,optional:t.length?P:void 0}}class Fc{constructor(){this.events=new kr.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=hI,this.on=(i,t)=>(this.events.on(i,t),this),this.once=(i,t)=>(this.events.once(i,t),this),this.removeListener=(i,t)=>(this.events.removeListener(i,t),this),this.off=(i,t)=>(this.events.off(i,t),this),this.parseAccount=i=>this.isCompatibleChainId(i)?this.parseAccountId(i).address:i,this.signer={},this.rpc={}}static async init(i){const t=new Fc;return await t.initialize(i),t}async request(i){return await this.signer.request(i,this.formatChainId(this.chainId))}sendAsync(i,t){this.signer.sendAsync(i,t,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(i){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(i);const{required:t,optional:n}=wI(this.rpc);try{const a=await new Promise(async(f,y)=>{var w;this.rpc.showQrModal&&((w=this.modal)==null||w.subscribeModal(d=>{!d.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),y(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Fl(kn({namespaces:kn({},t&&{[this.namespace]:t})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:i==null?void 0:i.pairingTopic})).then(d=>{f(d)}).catch(d=>{y(new Error(d.message))})});if(!a)return;const u=zm(a.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:u),this.setAccounts(u),this.events.emit("connect",{chainId:oc(this.chainId)})}catch(a){throw this.signer.logger.error(a),a}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",i=>{const{params:t}=i,{event:n}=t;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",i)}),this.signer.on("chainChanged",i=>{const t=parseInt(i);this.chainId=t,this.events.emit("chainChanged",oc(this.chainId)),this.persist()}),this.signer.on("session_update",i=>{this.events.emit("session_update",i)}),this.signer.on("session_delete",i=>{this.reset(),this.events.emit("session_delete",i),this.events.emit("disconnect",Fl(kn({},tr("USER_DISCONNECTED")),{data:i.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",i=>{var t,n;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(n=this.modal)==null||n.openModal({uri:i})),this.events.emit("display_uri",i)})}switchEthereumChain(i){this.request({method:"wallet_switchEthereumChain",params:[{chainId:i.toString(16)}]})}isCompatibleChainId(i){return typeof i=="string"?i.startsWith(`${this.namespace}:`):!1}formatChainId(i){return`${this.namespace}:${i}`}parseChainId(i){return Number(i.split(":")[1])}setChainIds(i){const t=i.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",oc(this.chainId)),this.persist())}setChainId(i){if(this.isCompatibleChainId(i)){const t=this.parseChainId(i);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(i){const[t,n,a]=i.split(":");return{chainId:`${t}:${n}`,address:a}}setAccounts(i){this.accounts=i.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(i){var t,n;const a=(t=i==null?void 0:i.chains)!=null?t:[],u=(n=i==null?void 0:i.optionalChains)!=null?n:[],f=a.concat(u);if(!f.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const y=a.length?(i==null?void 0:i.methods)||_c:[],w=a.length?(i==null?void 0:i.events)||bc:[],d=(i==null?void 0:i.optionalMethods)||[],_=(i==null?void 0:i.optionalEvents)||[],O=(i==null?void 0:i.rpcMap)||this.buildRpcMap(f,i.projectId),P=(i==null?void 0:i.qrModalOptions)||void 0;return{chains:a==null?void 0:a.map(L=>this.formatChainId(L)),optionalChains:u.map(L=>this.formatChainId(L)),methods:y,events:w,optionalMethods:d,optionalEvents:_,rpcMap:O,showQrModal:!!(i!=null&&i.showQrModal),qrModalOptions:P,projectId:i.projectId,metadata:i.metadata}}buildRpcMap(i,t){const n={};return i.forEach(a=>{n[a]=this.getRpcUrl(a,t)}),n}async initialize(i){if(this.rpc=this.getRpcConfig(i),this.chainId=this.rpc.chains.length?da(this.rpc.chains):da(this.rpc.optionalChains),this.signer=await oI.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:i.disableProviderPing,relayUrl:i.relayUrl,storageOptions:i.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:n}=await Mm(()=>import("./index-17433c46.js").then(a=>a.i),["assets/index-17433c46.js","assets/index-5c4ca410.js","assets/index-882a2daf.css"]);t=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(kn({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(i){if(!i)return;const{chains:t,optionalChains:n,rpcMap:a}=i;t&&pn(t)&&(this.rpc.chains=t.map(u=>this.formatChainId(u)),t.forEach(u=>{this.rpc.rpcMap[u]=(a==null?void 0:a[u])||this.getRpcUrl(u)})),n&&pn(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(u=>this.formatChainId(u)),n.forEach(u=>{this.rpc.rpcMap[u]=(a==null?void 0:a[u])||this.getRpcUrl(u)}))}getRpcUrl(i,t){var n;return((n=this.rpc.rpcMap)==null?void 0:n[i])||`${lI}?chainId=eip155:${i}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const i=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${i}`]?this.session.namespaces[`${this.namespace}:${i}`]:this.session.namespaces[this.namespace];this.setChainIds(i?[this.formatChainId(i)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(i){return typeof i=="string"||i instanceof String?[this.parseAccount(i)]:i.map(t=>this.parseAccount(t))}}const DI=Fc;export{DI as EthereumProvider,pI as OPTIONAL_EVENTS,fI as OPTIONAL_METHODS,bc as REQUIRED_EVENTS,_c as REQUIRED_METHODS,Fc as default}; diff --git a/examples/vite/package.json b/examples/vite/package.json index 2dc8a06e4e..ca999212a5 100644 --- a/examples/vite/package.json +++ b/examples/vite/package.json @@ -29,7 +29,7 @@ "@evmts/bundler": "workspace:^", "@evmts/config": "workspace:^", "@evmts/contracts": "^0.0.1", - "@evmts/core": "workspace:^1.0.0-next.0", + "@evmts/core": "workspace:^1.0.0-next.2", "@evmts/ethers": "workspace:^", "@rainbow-me/rainbowkit": "^1.1.4", "@tanstack/react-query": "^5.4.3", diff --git a/experimental/solc/CHANGELOG.md b/experimental/solc/CHANGELOG.md index 3bd3cb953e..48f3b504b4 100644 --- a/experimental/solc/CHANGELOG.md +++ b/experimental/solc/CHANGELOG.md @@ -1,5 +1,12 @@ # @evmts/core +## 1.0.0-next.2 + +### Patch Changes + +- Updated dependencies [[`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785)]: + - @evmts/core@1.0.0-next.2 + ## 1.0.0-next.0 ### Patch Changes diff --git a/experimental/solc/package.json b/experimental/solc/package.json index 549ce2b96b..72ebd80afb 100644 --- a/experimental/solc/package.json +++ b/experimental/solc/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/experimental-solc", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "Experimental wrapper around solc", "keywords": [ diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index b890450efe..e85aba051b 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @evmts/core +## 1.0.0-next.2 + +### Minor Changes + +- [#668](https://github.com/evmts/evmts-monorepo/pull/668) [`31ed39a5`](https://github.com/evmts/evmts-monorepo/commit/31ed39a58665ac555a2f18f5fcf5bc800b135785) Thanks [@roninjin10](https://github.com/roninjin10)! - Added back bytecode to EVMts bundler. When the compiler encounters a file ending in .s.sol it will compile the bytecode in addition to the abi + ## 1.0.0-next.0 ### Major Changes diff --git a/packages/core/package.json b/packages/core/package.json index 48277194cd..4d7822e201 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@evmts/core", - "version": "1.0.0-next.0", + "version": "1.0.0-next.2", "private": false, "description": "A typesafe library for writing forge scripts in typescript", "keywords": [