@dcl/account-site 6.4.2 → 6.4.3-23021761892.commit-95cb21d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/CoinbaseSDKConnection-0Z70hEdE.js +1 -0
- package/assets/{ConstantsUtil-C65qLg9H.js → ConstantsUtil-IfUBwsBT.js} +1 -1
- package/assets/{ExchangeController-4bTbfXop.js → ExchangeController-DePb1GFL.js} +1 -1
- package/assets/{HelpersUtil-CMuaKvr0.js → HelpersUtil-C84DgUhp.js} +1 -1
- package/assets/InAppWalletConnectUI-DUi7oMdq.js +1 -0
- package/assets/{NetworkUtil-D77Jgx6s.js → NetworkUtil-Bgt2ITuu.js} +1 -1
- package/assets/QRCodeRenderer-dTVEF8IB.js +1 -0
- package/assets/{SwapController-B-cT0HaV.js → SwapController-UYZQN7tl.js} +1 -1
- package/assets/ThirdwebWalletManager-Dz4m7qO_.js +326 -0
- package/assets/biconomy-C4KjX8zf.js +1 -0
- package/assets/{biconomy-C13HiZKh.js → biconomy-LixggspG.js} +1 -1
- package/assets/br-B9BLCi07.js +1 -0
- package/assets/br-Bh5kquYi.js +1 -0
- package/assets/br-Bzf0kdCg.js +1 -0
- package/assets/br-OOdQ3ULT.js +1 -0
- package/assets/{ccip-BUGHDwrn.js → ccip-BM_vcm7R.js} +1 -1
- package/assets/ccip-CPEo6pFI.js +1 -0
- package/assets/{ccip-DXvrQeZe.js → ccip-Dar4BgqF.js} +1 -1
- package/assets/{chains-CewUlEiN.js → chains-BDyPLjuo.js} +1 -1
- package/assets/{common-DEDzDfZK.js → common-CqAIBo6K.js} +1 -1
- package/assets/common-Q4hcJSiz.js +1 -0
- package/assets/concat-hex-lIlH2McC.js +1 -0
- package/assets/controller-CcgJ61Ea.js +2 -0
- package/assets/controller-Czxst7w9.js +2 -0
- package/assets/{data-capture-DI_V8eEB.js → data-capture-BuKEn85Z.js} +1 -1
- package/assets/de-BIWVAXLP.js +1 -0
- package/assets/de-CGYpD2SG.js +1 -0
- package/assets/de-DxwDt0Si.js +1 -0
- package/assets/de-HLnDQwsk.js +1 -0
- package/assets/{decimals-BvtkSwrR.js → decimals-CVPnxmh7.js} +1 -1
- package/assets/decimals-zuJ3wlEU.js +1 -0
- package/assets/{detectExtension-B8HFcF7g.js → detectExtension-DXdFDVgv.js} +1 -1
- package/assets/detectExtension-Dz1kVH7_.js +1 -0
- package/assets/{email-4msbmfxW.js → email-DURckrbq.js} +1 -1
- package/assets/{embedded-wallet-DO1o5bel.js → embedded-wallet-BIUcDVNf.js} +1 -1
- package/assets/en-C9j038gl.js +1 -0
- package/assets/en-lXclJmNl.js +1 -0
- package/assets/en-wiTKdR4T.js +1 -0
- package/assets/{engine-BvEVVPO2.js → engine-DHtQmgio.js} +1 -1
- package/assets/engine-DpU8cZCi.js +1 -0
- package/assets/es-BoeWNXZK.js +1 -0
- package/assets/es-D1JvwHmW.js +1 -0
- package/assets/es-Dar-xg4p.js +1 -0
- package/assets/es-VJyYb90S.js +1 -0
- package/assets/{estimate-l1-fee-DYkQJOay.js → estimate-l1-fee-BkW_txp7.js} +1 -1
- package/assets/estimate-l1-fee-CU3YnFil.js +2 -0
- package/assets/eth_estimateGas-G_xcfVsZ.js +1 -0
- package/assets/eth_estimateGas-m2_--02H.js +1 -0
- package/assets/{eth_getStorageAt-GEFAClkO.js → eth_getStorageAt-VsQtq0Uz.js} +1 -1
- package/assets/eth_getTransactionCount-CEP3s4C1.js +1 -0
- package/assets/{eth_getTransactionCount-C3JnIYXb.js → eth_getTransactionCount-PcXWvj1j.js} +1 -1
- package/assets/eth_sendRawTransaction-DPdnXbFR.js +1 -0
- package/assets/{ethereum-C_Cy8XKf.js → ethereum-dihBYRnT.js} +1 -1
- package/assets/{extractIPFS-ClmYMTcl.js → extractIPFS-DklwHe-O.js} +1 -1
- package/assets/extractIPFS-JN46N2o7.js +1 -0
- package/assets/{features-D8Pi0wtw.js → features-_wzOnFY-.js} +1 -1
- package/assets/fetchTokenMetadata-B9BbNcLj.js +2 -0
- package/assets/{fetchTokenMetadata-QxcG1_Db.js → fetchTokenMetadata-C2LpxJUF.js} +2 -2
- package/assets/{fortmatic-CKI3vz2q.js → fortmatic-DBwa9kBS.js} +1 -1
- package/assets/fr-Biip2F0B.js +1 -0
- package/assets/fr-Cl9YKZtN.js +1 -0
- package/assets/fr-DQrXBak2.js +1 -0
- package/assets/fr-Dw9xCc6Y.js +1 -0
- package/assets/get-ecosystem-wallet-info-B4GMaUQL.js +1 -0
- package/assets/get-ecosystem-wallet-info-Dw7REpCN.js +1 -0
- package/assets/{getBalance-DnUZbXB_.js → getBalance-JHGD-cET.js} +2 -2
- package/assets/getBalance-cs-XLy8M.js +1 -0
- package/assets/getCurrencyMetadata-xziMh2zt.js +2 -0
- package/assets/{getInstalledModules-D9jzoYzG.js → getInstalledModules-BflLi-Ze.js} +1 -1
- package/assets/getInstalledModules-DQg0aCv5.js +1 -0
- package/assets/getNFT-BHbjbl1M.js +2 -0
- package/assets/{getNFT-DZtuF0Qb.js → getNFT-BOH0M19a.js} +1 -1
- package/assets/{getNFT-BWlrX7BO.js → getNFT-DetmgL-D.js} +2 -2
- package/assets/getNFT-buPGFTfQ.js +1 -0
- package/assets/{hashTypedData-DBp5vFy4.js → hashTypedData-DE5BevgH.js} +1 -1
- package/assets/hooks.module-BNtNDAZY.js +1 -0
- package/assets/{if-defined-DxgE-evn.js → if-defined-C9rr67g8.js} +1 -1
- package/assets/image--B48iF6N.js +1 -0
- package/assets/image-0QbZculn.js +1 -0
- package/assets/image-0Rb-Alqp.js +1 -0
- package/assets/image-0WA94JvO.js +1 -0
- package/assets/image-1PFF0msR.js +1 -0
- package/assets/image-1Q7meMlv.js +1 -0
- package/assets/image-1uQAVoCP.js +1 -0
- package/assets/image-2TZb5wm0.js +1 -0
- package/assets/image-2_1YP_wN.js +1 -0
- package/assets/image-2gXaVQKJ.js +1 -0
- package/assets/image-5AG089cB.js +1 -0
- package/assets/image-5Sau-rLk.js +1 -0
- package/assets/image-6D1EQPfl.js +1 -0
- package/assets/image-72qBnfEq.js +1 -0
- package/assets/image-7gNoXkuv.js +1 -0
- package/assets/image-7ve6a-pZ.js +1 -0
- package/assets/image-982I_LqG.js +1 -0
- package/assets/image-9P9l0zV_.js +1 -0
- package/assets/image-9QI9sTH5.js +1 -0
- package/assets/image-9mjTTt3Y.js +1 -0
- package/assets/image-A5Pisxzq.js +1 -0
- package/assets/image-AC1H6ZPE.js +1 -0
- package/assets/image-AK02cNa4.js +1 -0
- package/assets/image-AMwbpknG.js +1 -0
- package/assets/image-ATPgDDWr.js +1 -0
- package/assets/image-AWdU8VV0.js +1 -0
- package/assets/image-AczLW1TP.js +1 -0
- package/assets/image-AnfmMqaq.js +1 -0
- package/assets/image-B-Cy6KkY.js +1 -0
- package/assets/image-B-Dq4f8l.js +1 -0
- package/assets/image-B-j6X2ua.js +1 -0
- package/assets/image-B0gwpZUx.js +1 -0
- package/assets/image-B0xghz9F.js +1 -0
- package/assets/image-B264ar_O.js +1 -0
- package/assets/image-B29oqZFQ.js +1 -0
- package/assets/image-B2nNrUDP.js +1 -0
- package/assets/image-B32QPavX.js +1 -0
- package/assets/image-B33xp9CQ.js +1 -0
- package/assets/image-B3Rrn7dP.js +1 -0
- package/assets/image-B3gcDEsF.js +1 -0
- package/assets/image-B3qkm1hD.js +1 -0
- package/assets/image-B3vFiCTL.js +1 -0
- package/assets/image-B5zGMb7x.js +1 -0
- package/assets/image-B6eNElEj.js +1 -0
- package/assets/image-B79qVkMd.js +1 -0
- package/assets/image-B7f6OOFe.js +1 -0
- package/assets/image-B7qmT8Ca.js +1 -0
- package/assets/image-B9-WC9qz.js +1 -0
- package/assets/image-B94WiSPl.js +1 -0
- package/assets/image-B9EV7DkB.js +1 -0
- package/assets/image-B9i2YHdN.js +1 -0
- package/assets/image-B9xCKEQ5.js +1 -0
- package/assets/image-B9zDzj_n.js +1 -0
- package/assets/image-BB74R1v0.js +1 -0
- package/assets/image-BC-ISwXb.js +1 -0
- package/assets/image-BC0xyU5O.js +1 -0
- package/assets/image-BCZn_efw.js +1 -0
- package/assets/image-BC_7FxFG.js +1 -0
- package/assets/image-BDK4RXKk.js +1 -0
- package/assets/image-BEDiadVJ.js +1 -0
- package/assets/image-BEeNARTM.js +1 -0
- package/assets/image-BFZzUxQN.js +1 -0
- package/assets/image-BGGL-U5y.js +1 -0
- package/assets/image-BHWhxIRJ.js +1 -0
- package/assets/image-BHsLcCY-.js +1 -0
- package/assets/image-BI56qXQ0.js +1 -0
- package/assets/image-BIXNfpi0.js +1 -0
- package/assets/image-BJ7E9wJj.js +1 -0
- package/assets/image-BJTIIH0l.js +1 -0
- package/assets/image-BJZxT49R.js +1 -0
- package/assets/image-BKRBGzRA.js +1 -0
- package/assets/image-BKzTjD_x.js +1 -0
- package/assets/image-BLwps_AU.js +1 -0
- package/assets/image-BN9yS9ct.js +1 -0
- package/assets/image-BNMU4MrK.js +1 -0
- package/assets/image-BO752L4A.js +1 -0
- package/assets/image-BO9Hp1NS.js +1 -0
- package/assets/image-BOYYXbZD.js +1 -0
- package/assets/image-BOnGX8Q5.js +1 -0
- package/assets/image-BOsaNxhb.js +1 -0
- package/assets/image-BPSy6QXe.js +1 -0
- package/assets/image-BPo0OIev.js +1 -0
- package/assets/image-BPwT6MdF.js +1 -0
- package/assets/image-BQnyjyHr.js +1 -0
- package/assets/image-BR5h2SHU.js +1 -0
- package/assets/image-BS7uclVJ.js +1 -0
- package/assets/image-BSsXAyde.js +1 -0
- package/assets/image-BV0ZeCAx.js +1 -0
- package/assets/image-BVxPoHQF.js +1 -0
- package/assets/image-BW8rKOXQ.js +1 -0
- package/assets/image-BW_e3-dJ.js +1 -0
- package/assets/image-BX0R5Ldt.js +1 -0
- package/assets/image-BXDrqmSz.js +1 -0
- package/assets/image-BYiwuy-U.js +1 -0
- package/assets/image-BZAeII_Q.js +1 -0
- package/assets/image-BZaRgIwq.js +1 -0
- package/assets/image-BZqe_XdR.js +1 -0
- package/assets/image-B_3kPYuE.js +1 -0
- package/assets/image-B_6frjN-.js +1 -0
- package/assets/image-BaHqSwQx.js +1 -0
- package/assets/image-Balnt-Cz.js +1 -0
- package/assets/image-BbMnRQvP.js +1 -0
- package/assets/image-BbZlFk1s.js +1 -0
- package/assets/image-BbnwlM1P.js +1 -0
- package/assets/image-BcFBvVbI.js +1 -0
- package/assets/image-BcwKGbKI.js +1 -0
- package/assets/image-Bd0hgt6c.js +1 -0
- package/assets/image-BdlxKsqN.js +1 -0
- package/assets/image-BebTTEqp.js +1 -0
- package/assets/image-BenqI60j.js +1 -0
- package/assets/image-BfqQ3_FM.js +1 -0
- package/assets/image-Bg-Ezchh.js +1 -0
- package/assets/image-Bg5cmMOq.js +1 -0
- package/assets/image-BgTI1Mr2.js +1 -0
- package/assets/image-Bgjg8hNQ.js +1 -0
- package/assets/image-Bgyn7Edx.js +1 -0
- package/assets/image-Bh9RaAFE.js +1 -0
- package/assets/image-Bh9Vac4W.js +1 -0
- package/assets/image-BhyLUXmC.js +1 -0
- package/assets/image-Bj3Vau0H.js +1 -0
- package/assets/image-BjNYHzYo.js +1 -0
- package/assets/image-BkQn-eFE.js +1 -0
- package/assets/image-BkXrnCqT.js +1 -0
- package/assets/image-BlhMSU_w.js +1 -0
- package/assets/image-BlxEEUgA.js +1 -0
- package/assets/image-BmT8QXyE.js +1 -0
- package/assets/image-Bmkur-sE.js +1 -0
- package/assets/image-Bn-Yp1MK.js +1 -0
- package/assets/image-BnILE5Nd.js +1 -0
- package/assets/image-BnnBPaYj.js +1 -0
- package/assets/image-Bnt5C7zC.js +1 -0
- package/assets/image-BoPDznhr.js +1 -0
- package/assets/image-BoYSclA6.js +1 -0
- package/assets/image-Bq5dNCvj.js +1 -0
- package/assets/image-BqmoDhq4.js +1 -0
- package/assets/image-BrBkAmMh.js +1 -0
- package/assets/image-Brf-M6Eo.js +1 -0
- package/assets/image-BriecT_A.js +1 -0
- package/assets/image-Bs-ggdFz.js +1 -0
- package/assets/image-BsBvd3sv.js +1 -0
- package/assets/image-BsZmggWw.js +1 -0
- package/assets/image-Bt0VMJN5.js +1 -0
- package/assets/image-Bt794qKF.js +1 -0
- package/assets/image-BtCfBTZq.js +1 -0
- package/assets/image-BtDMB-2P.js +1 -0
- package/assets/image-BtTEqc7_.js +1 -0
- package/assets/image-Bt_TYk3Z.js +1 -0
- package/assets/image-Bu5z-R3j.js +1 -0
- package/assets/image-BuK74v8C.js +1 -0
- package/assets/image-Bve_kItK.js +1 -0
- package/assets/image-BvknIf7o.js +1 -0
- package/assets/image-Bvz63dRa.js +1 -0
- package/assets/image-Bw4AoMkM.js +1 -0
- package/assets/image-Bwc5B3nF.js +1 -0
- package/assets/image-Bx8CuGbg.js +1 -0
- package/assets/image-BxZLlxGO.js +1 -0
- package/assets/image-BxnxblQ1.js +1 -0
- package/assets/image-ByILNqlH.js +1 -0
- package/assets/image-BylgX2RN.js +1 -0
- package/assets/image-Bz7vfc72.js +1 -0
- package/assets/image-BzMshtv_.js +1 -0
- package/assets/image-BzcRZ3z_.js +1 -0
- package/assets/image-C-1BYDS8.js +1 -0
- package/assets/image-C-F3MXbl.js +1 -0
- package/assets/image-C-_OpeOv.js +1 -0
- package/assets/image-C-h7t_1F.js +1 -0
- package/assets/image-C-jy5_uw.js +1 -0
- package/assets/image-C-l2o06T.js +1 -0
- package/assets/image-C19BC9_z.js +1 -0
- package/assets/image-C1H-7cB7.js +1 -0
- package/assets/image-C3CekdMS.js +1 -0
- package/assets/image-C3CgzYTf.js +1 -0
- package/assets/image-C4G5noc2.js +1 -0
- package/assets/image-C4MrlFC9.js +1 -0
- package/assets/image-C4YFvx9h.js +1 -0
- package/assets/image-C4kRcwMC.js +1 -0
- package/assets/image-C5BUR1H0.js +1 -0
- package/assets/image-C5K8o_QO.js +1 -0
- package/assets/image-C6JZ7WuV.js +1 -0
- package/assets/image-C6_rXHSy.js +1 -0
- package/assets/image-C6e4H5Qk.js +1 -0
- package/assets/image-C7KIwDbC.js +1 -0
- package/assets/image-C8W_4ZM6.js +1 -0
- package/assets/image-CAFLdE57.js +1 -0
- package/assets/image-CAO8bP71.js +1 -0
- package/assets/image-CAb3G_S1.js +1 -0
- package/assets/image-CAiqBiB7.js +1 -0
- package/assets/image-CAyyni45.js +1 -0
- package/assets/image-CBEV_Ymj.js +1 -0
- package/assets/image-CBk1BMR-.js +1 -0
- package/assets/image-CBv_A54z.js +1 -0
- package/assets/image-CCpZhmeV.js +1 -0
- package/assets/image-CD-9cKzY.js +1 -0
- package/assets/image-CDQQ8H3a.js +1 -0
- package/assets/image-CDZQNGIA.js +1 -0
- package/assets/image-CE5zhWMG.js +1 -0
- package/assets/image-CF0jVIb9.js +1 -0
- package/assets/image-CFT4k-B4.js +1 -0
- package/assets/image-CFVYHfGR.js +1 -0
- package/assets/image-CG2L-E9e.js +1 -0
- package/assets/image-CGMwpiJi.js +1 -0
- package/assets/image-CGjM8vV0.js +1 -0
- package/assets/image-CGnQwBYH.js +1 -0
- package/assets/image-CHHWDf3g.js +1 -0
- package/assets/image-CI9-uvbv.js +1 -0
- package/assets/image-CIV6mRvx.js +1 -0
- package/assets/image-CJ_LMWeW.js +1 -0
- package/assets/image-CJcZQ4qy.js +1 -0
- package/assets/image-CJoENcT7.js +1 -0
- package/assets/image-CKVXVlPY.js +1 -0
- package/assets/image-CKgTbGoy.js +1 -0
- package/assets/image-CLYJx-Lt.js +1 -0
- package/assets/image-CLkcT8o9.js +1 -0
- package/assets/image-CMMSxKCI.js +1 -0
- package/assets/image-CMq0qq2T.js +1 -0
- package/assets/image-COolNucr.js +1 -0
- package/assets/image-CPTr6dkg.js +1 -0
- package/assets/image-CQQCUqCR.js +1 -0
- package/assets/image-CQvGfQex.js +1 -0
- package/assets/image-CR0aTzS0.js +1 -0
- package/assets/image-CR2oRmyx.js +1 -0
- package/assets/image-CSqTAqqQ.js +1 -0
- package/assets/image-CTIN0s1B.js +1 -0
- package/assets/image-CTIpcfmx.js +1 -0
- package/assets/image-CTjG3MUk.js +1 -0
- package/assets/image-CUg3Cnww.js +1 -0
- package/assets/image-CVhRaM7j.js +1 -0
- package/assets/image-CViScAsQ.js +1 -0
- package/assets/image-CVijw__b.js +1 -0
- package/assets/image-CWHyXFR4.js +1 -0
- package/assets/image-CW_1GHb7.js +1 -0
- package/assets/image-CX5Rh8VB.js +1 -0
- package/assets/image-CXCMuT4A.js +1 -0
- package/assets/image-CXmskFGu.js +1 -0
- package/assets/image-CXq-Cxbd.js +1 -0
- package/assets/image-CYPCjBfV.js +1 -0
- package/assets/image-CZoAF_IO.js +1 -0
- package/assets/image-C_araf9B.js +1 -0
- package/assets/image-C_d1pRRI.js +1 -0
- package/assets/image-Cacm9krt.js +1 -0
- package/assets/image-CbgyrC3w.js +1 -0
- package/assets/image-CcKLaZOY.js +1 -0
- package/assets/image-CdPK8hWD.js +1 -0
- package/assets/image-Ce4eMMpY.js +1 -0
- package/assets/image-CeeH5SSM.js +1 -0
- package/assets/image-Ceksqz1-.js +1 -0
- package/assets/image-CfdpAcNJ.js +1 -0
- package/assets/image-CfkILL-h.js +1 -0
- package/assets/image-CggT8fcC.js +1 -0
- package/assets/image-Ch_ktfcX.js +1 -0
- package/assets/image-Cj-WnBuG.js +1 -0
- package/assets/image-Cj5FK2LF.js +1 -0
- package/assets/image-Ck3Eh6O7.js +1 -0
- package/assets/image-Ck4D7BzK.js +1 -0
- package/assets/image-CkIE5GW_.js +1 -0
- package/assets/image-Cki_h5H8.js +1 -0
- package/assets/image-CkzfH2rK.js +1 -0
- package/assets/image-Cl79QoOA.js +1 -0
- package/assets/image-ClMsEpOA.js +1 -0
- package/assets/image-ClaYyDQX.js +1 -0
- package/assets/image-ClfNqwc4.js +1 -0
- package/assets/image-CmemWtNq.js +1 -0
- package/assets/image-CnHP8wCa.js +1 -0
- package/assets/image-CoVfVQ2N.js +1 -0
- package/assets/image-Co_-a15C.js +1 -0
- package/assets/image-Cq9CxI0T.js +1 -0
- package/assets/image-CqMUpFKn.js +1 -0
- package/assets/image-CqVlNOfi.js +1 -0
- package/assets/image-CqvokakT.js +1 -0
- package/assets/image-CqwlZgVk.js +1 -0
- package/assets/image-CrDo15dd.js +1 -0
- package/assets/image-CrwfI0sg.js +1 -0
- package/assets/image-CsDGOmEX.js +1 -0
- package/assets/image-CsXZJdXn.js +1 -0
- package/assets/image-Csi8zv8i.js +1 -0
- package/assets/image-CtPX3k8b.js +1 -0
- package/assets/image-CtzrXm6T.js +1 -0
- package/assets/image-CuH_nXcV.js +1 -0
- package/assets/image-CurSdKvd.js +1 -0
- package/assets/image-CwCfHO2C.js +1 -0
- package/assets/image-CwFxLfDc.js +1 -0
- package/assets/image-CyB_F_3i.js +1 -0
- package/assets/image-CyT4cot7.js +1 -0
- package/assets/image-CzDMlkmp.js +1 -0
- package/assets/image-D-N6lJzn.js +1 -0
- package/assets/image-D-l0_TY5.js +1 -0
- package/assets/image-D-u8N4-J.js +1 -0
- package/assets/image-D0EvVh0U.js +1 -0
- package/assets/image-D0XkC_cA.js +1 -0
- package/assets/image-D1DsrpO_.js +1 -0
- package/assets/image-D1LhuZVG.js +1 -0
- package/assets/image-D2OcPCwL.js +1 -0
- package/assets/image-D2pp6L6Y.js +1 -0
- package/assets/image-D3W98SRi.js +1 -0
- package/assets/image-D3yhzjwN.js +1 -0
- package/assets/image-D4996xLS.js +1 -0
- package/assets/image-D4n4fDBI.js +1 -0
- package/assets/image-D5eIt9w3.js +1 -0
- package/assets/image-D6CcyX2K.js +1 -0
- package/assets/image-D72C3rOt.js +1 -0
- package/assets/image-D7UG6IdA.js +1 -0
- package/assets/image-D7e0j8-5.js +1 -0
- package/assets/image-D7kLqgEy.js +1 -0
- package/assets/image-D84iATu3.js +1 -0
- package/assets/image-D89rnuSD.js +1 -0
- package/assets/image-D8LYDHPh.js +1 -0
- package/assets/image-D8u0coXq.js +1 -0
- package/assets/image-D9BJV0RO.js +1 -0
- package/assets/image-D9EUqNLw.js +1 -0
- package/assets/image-D9kD-3RI.js +1 -0
- package/assets/image-DBRyH_Rh.js +1 -0
- package/assets/image-DBTtOr0A.js +1 -0
- package/assets/image-DBVezoYp.js +1 -0
- package/assets/image-DBfe_vfK.js +1 -0
- package/assets/image-DCd2Ym7s.js +1 -0
- package/assets/image-DCe7pzXg.js +1 -0
- package/assets/image-DCu5LmP3.js +1 -0
- package/assets/image-DD3TEXBm.js +1 -0
- package/assets/image-DDvpwoJM.js +1 -0
- package/assets/image-DEWYzY44.js +1 -0
- package/assets/image-DFJ9V7d6.js +1 -0
- package/assets/image-DG2A0pp3.js +1 -0
- package/assets/image-DGb_hLx6.js +1 -0
- package/assets/image-DGt7Rmz0.js +1 -0
- package/assets/image-DIOD3I9G.js +1 -0
- package/assets/image-DJWswcCh.js +1 -0
- package/assets/image-DK9H4-Ad.js +1 -0
- package/assets/image-DKASljuV.js +1 -0
- package/assets/image-DKGPCmzR.js +1 -0
- package/assets/image-DKIjfVu7.js +1 -0
- package/assets/image-DKzTIzax.js +1 -0
- package/assets/image-DLNyVKh7.js +1 -0
- package/assets/image-DMShxJ4p.js +1 -0
- package/assets/image-DNK-Wi5D.js +1 -0
- package/assets/image-DNqAGFzc.js +1 -0
- package/assets/image-DO0rKwK5.js +1 -0
- package/assets/image-DO9smEJD.js +1 -0
- package/assets/image-DOl7zD0B.js +1 -0
- package/assets/image-DP3-AKgU.js +1 -0
- package/assets/image-DRIx4y_P.js +1 -0
- package/assets/image-DRTCa3VU.js +1 -0
- package/assets/image-DR_z7tXV.js +1 -0
- package/assets/image-DRkgy69L.js +1 -0
- package/assets/image-DS02lLXY.js +1 -0
- package/assets/image-DSJKsPTa.js +1 -0
- package/assets/image-DTBDlZkw.js +1 -0
- package/assets/image-DTI3p9-Y.js +1 -0
- package/assets/image-DTjGzWem.js +1 -0
- package/assets/image-DTvFXF0X.js +1 -0
- package/assets/image-DU11lzrk.js +1 -0
- package/assets/image-DU5rwGF4.js +1 -0
- package/assets/image-DU8NyouV.js +1 -0
- package/assets/image-DUF566Oh.js +1 -0
- package/assets/image-DW-QsWzn.js +1 -0
- package/assets/image-DW2MUS3y.js +1 -0
- package/assets/image-DXXDq1SV.js +1 -0
- package/assets/image-DY9y4Zuj.js +1 -0
- package/assets/image-DYjHGArM.js +1 -0
- package/assets/image-DYpL4EaL.js +1 -0
- package/assets/image-DZnDK-Xj.js +1 -0
- package/assets/image-D_F9G8qf.js +1 -0
- package/assets/image-DapXhx3l.js +1 -0
- package/assets/image-DarW8a9S.js +1 -0
- package/assets/image-Db2mz7AE.js +1 -0
- package/assets/image-Dbjepryy.js +1 -0
- package/assets/image-Dblzndv0.js +1 -0
- package/assets/image-DbxthKzd.js +1 -0
- package/assets/image-Dc4UaoeV.js +1 -0
- package/assets/image-DcDvrdXW.js +1 -0
- package/assets/image-DcHAlJFf.js +1 -0
- package/assets/image-DdG87PRE.js +1 -0
- package/assets/image-DdS639hK.js +1 -0
- package/assets/image-DdhciWs2.js +1 -0
- package/assets/image-Ded2cDkb.js +1 -0
- package/assets/image-Dg0N1g6c.js +1 -0
- package/assets/image-DhEatMPL.js +1 -0
- package/assets/image-DhRoVn_A.js +1 -0
- package/assets/image-DhkFzAlB.js +1 -0
- package/assets/image-Di_xLdyX.js +1 -0
- package/assets/image-DigckmBu.js +1 -0
- package/assets/image-Diy5ggOd.js +1 -0
- package/assets/image-DjUJV6x7.js +1 -0
- package/assets/image-Dm6aqzLa.js +1 -0
- package/assets/image-DmF82yDT.js +1 -0
- package/assets/image-DmNtyNJi.js +1 -0
- package/assets/image-DmVdrg9x.js +1 -0
- package/assets/image-DnOc4PLu.js +1 -0
- package/assets/image-DnR4Lmm2.js +1 -0
- package/assets/image-DnrDonCs.js +1 -0
- package/assets/image-Dnxw18r0.js +1 -0
- package/assets/image-DpEXid6P.js +1 -0
- package/assets/image-DpuchfOi.js +1 -0
- package/assets/image-Dq2YJAiu.js +1 -0
- package/assets/image-DqECxs5-.js +1 -0
- package/assets/image-DqZNaegF.js +1 -0
- package/assets/image-DrSeWkD2.js +1 -0
- package/assets/image-DrYWWKEd.js +1 -0
- package/assets/image-DraNAXbA.js +1 -0
- package/assets/image-Dts-dWM_.js +1 -0
- package/assets/image-Dubw5heQ.js +1 -0
- package/assets/image-DueZWGGJ.js +1 -0
- package/assets/image-Dv-zloMU.js +1 -0
- package/assets/image-DwT8NU8o.js +1 -0
- package/assets/image-Dx3svzxu.js +1 -0
- package/assets/image-DyAVMMp6.js +1 -0
- package/assets/image-DzEk34N9.js +1 -0
- package/assets/image-EV0HMtku.js +1 -0
- package/assets/image-Eet5vkQN.js +1 -0
- package/assets/image-Eq0Swt8O.js +1 -0
- package/assets/image-F1X0Jqxn.js +1 -0
- package/assets/image-F3HgBsB-.js +1 -0
- package/assets/image-FsYj6Ipw.js +1 -0
- package/assets/image-GC2hQOZY.js +1 -0
- package/assets/image-GJh-xUBh.js +1 -0
- package/assets/image-H2IFlJwk.js +1 -0
- package/assets/image-HX_Cc3WE.js +1 -0
- package/assets/image-IE8YXerr.js +1 -0
- package/assets/image-IV7Ly6tc.js +1 -0
- package/assets/image-JETMQh4S.js +1 -0
- package/assets/image-KuSQ9Dwa.js +1 -0
- package/assets/image-LKLppsLU.js +1 -0
- package/assets/image-Ljm9Bz3n.js +1 -0
- package/assets/image-Ln3_5Zss.js +1 -0
- package/assets/image-LrnAZqig.js +1 -0
- package/assets/image-N5WHiU5_.js +1 -0
- package/assets/image-OB6MEQB3.js +1 -0
- package/assets/image-OZ1AOwbT.js +1 -0
- package/assets/image-Obx6ILaM.js +1 -0
- package/assets/image-PE3NuFOk.js +1 -0
- package/assets/image-PmH-IhRa.js +1 -0
- package/assets/image-Pyla20aw.js +1 -0
- package/assets/image-Q84BS-gC.js +1 -0
- package/assets/image-QiSwBpPD.js +1 -0
- package/assets/image-QsHphgJe.js +1 -0
- package/assets/image-R9RXoc8s.js +1 -0
- package/assets/image-RaAvmTda.js +1 -0
- package/assets/image-Rvq3ddXP.js +1 -0
- package/assets/image-S1B0Gp4I.js +1 -0
- package/assets/image-S9984bPS.js +1 -0
- package/assets/image-SecrmBNd.js +1 -0
- package/assets/image-T5Lr0jNA.js +1 -0
- package/assets/image-TCU-3JIq.js +1 -0
- package/assets/image-TDSuOHNU.js +1 -0
- package/assets/image-TqYEE834.js +1 -0
- package/assets/image-Ua30yTgk.js +1 -0
- package/assets/image-UedJVRUu.js +1 -0
- package/assets/image-Uvntzjzd.js +1 -0
- package/assets/image-VMDTb4vT.js +1 -0
- package/assets/image-VRkR1FSv.js +1 -0
- package/assets/image-VX9kj-L4.js +1 -0
- package/assets/image-W4tnKhU5.js +1 -0
- package/assets/image-WE5WO1oI.js +1 -0
- package/assets/image-WVTBQdo8.js +1 -0
- package/assets/image-WgGILhOH.js +1 -0
- package/assets/image-Y1vaco4M.js +1 -0
- package/assets/image-YrUQjQfX.js +1 -0
- package/assets/image-ZX9AyZf9.js +1 -0
- package/assets/image-ZwVZp8I-.js +1 -0
- package/assets/image-_ytDCtdN.js +1 -0
- package/assets/image-a7JzCm8c.js +1 -0
- package/assets/image-aLir34M2.js +1 -0
- package/assets/image-ac_iWcfz.js +1 -0
- package/assets/image-bGkpV8Yz.js +1 -0
- package/assets/image-bx7t2tFM.js +1 -0
- package/assets/image-cLgiWKUl.js +1 -0
- package/assets/image-ds_DS45D.js +1 -0
- package/assets/image-eNFpMOAS.js +1 -0
- package/assets/image-eXgCeXYC.js +1 -0
- package/assets/image-egfxQb8o.js +1 -0
- package/assets/image-g8OkL-iB.js +1 -0
- package/assets/image-gPjUdZvh.js +1 -0
- package/assets/image-gTlOw189.js +1 -0
- package/assets/image-gZn57b3d.js +1 -0
- package/assets/image-ioijj4TO.js +1 -0
- package/assets/image-jU3weE_L.js +1 -0
- package/assets/image-keSuKx3L.js +1 -0
- package/assets/image-lj2MXbSM.js +1 -0
- package/assets/image-mUn2Nmwd.js +1 -0
- package/assets/image-mo-MZ3QJ.js +1 -0
- package/assets/image-mtAAp4l3.js +1 -0
- package/assets/image-nGg2NUr5.js +1 -0
- package/assets/image-nnLbNJXY.js +1 -0
- package/assets/image-nuAuj_Jk.js +1 -0
- package/assets/image-o13bTCjN.js +1 -0
- package/assets/image-ocD-m7Q3.js +1 -0
- package/assets/image-pWd800uA.js +1 -0
- package/assets/image-ponfuhgz.js +1 -0
- package/assets/image-qL02cf1Y.js +1 -0
- package/assets/image-qbZML0jD.js +1 -0
- package/assets/image-sEmhdTY-.js +1 -0
- package/assets/image-tsyLyK5O.js +1 -0
- package/assets/image-u8DQucgw.js +1 -0
- package/assets/image-ubhPU-df.js +1 -0
- package/assets/image-ubiaz4Ce.js +1 -0
- package/assets/image-v60dFJ72.js +1 -0
- package/assets/image-vBCicR5m.js +1 -0
- package/assets/image-wCxGp5DI.js +1 -0
- package/assets/image-wxMjTeKK.js +1 -0
- package/assets/image-xqIoPugN.js +1 -0
- package/assets/image-y8DPTS4d.js +1 -0
- package/assets/image-yTAVsfm3.js +1 -0
- package/assets/in-app-wallet-calls-Dhx0WdY-.js +1 -0
- package/assets/in-app-wallet-calls-hmGpEqXh.js +1 -0
- package/assets/index--Gdut-6F.js +1 -0
- package/assets/index--a3iuiww.js +1 -0
- package/assets/index-01H7hL5P.js +1 -0
- package/assets/{index-DcRvDVZ1.js → index-0nTzO_qt.js} +1 -1
- package/assets/index-1dvjnqEQ.js +16 -0
- package/assets/index-1j0V944m.js +1 -0
- package/assets/index-3AGQkopq.js +1 -0
- package/assets/index-3Cvg-OXh.js +1 -0
- package/assets/index-3Hrik3MN.js +1 -0
- package/assets/index-3b4FPnNt.js +1 -0
- package/assets/index-3mfJd8aA.js +1 -0
- package/assets/index-4Gkxn9a_.js +1 -0
- package/assets/index-4l3b14FK.js +1 -0
- package/assets/index-5DvAcfYw.js +1 -0
- package/assets/index-5MfyGNXX.js +1 -0
- package/assets/index-5MqcAe3C.js +1 -0
- package/assets/index-60aSyGqb.js +1 -0
- package/assets/index-6xhBK11g.js +1 -0
- package/assets/index-7HfmIPvC.js +1 -0
- package/assets/{index-B_eiQKAu.js → index-7RWfUOm9.js} +1 -1
- package/assets/index-7YYggeeW.js +1 -0
- package/assets/index-9urBw4jN.js +1 -0
- package/assets/index-B-g1VAOO.js +1 -0
- package/assets/index-B01hsCSm.js +1 -0
- package/assets/index-B0wYo_zG.js +1 -0
- package/assets/index-B18M8pMG.js +1 -0
- package/assets/index-B1EcH1c7.js +1 -0
- package/assets/index-B1UaaLNv.js +1 -0
- package/assets/index-B1lRIgux.js +1 -0
- package/assets/index-B3ylAWHD.js +1 -0
- package/assets/index-B4NjVdaz.js +1 -0
- package/assets/index-B5YMdPlv.js +1 -0
- package/assets/index-B5dYTApw.js +3 -0
- package/assets/index-B5mnNH8U.js +1 -0
- package/assets/index-B5oClu2g.js +1 -0
- package/assets/index-B5qFvytG.js +1 -0
- package/assets/index-B6he1NFn.js +1 -0
- package/assets/index-B79hT9zU.js +1 -0
- package/assets/index-B7f-7qNF.js +1 -0
- package/assets/index-B7x0EPkI.js +1 -0
- package/assets/index-B7yCMw6f.js +1 -0
- package/assets/index-B82mCN3i.js +1 -0
- package/assets/index-B8F2-SGp.js +1 -0
- package/assets/index-B8FJWq2b.js +1 -0
- package/assets/index-B8M5fchQ.js +1 -0
- package/assets/{index-BlQHD0NB.js → index-B8W1B15Q.js} +1 -1
- package/assets/{index-DtWapT_q.js → index-B9RtPRFB.js} +1 -1
- package/assets/index-B9VmLLfu.js +1 -0
- package/assets/index-BAFdi-Xy.js +1 -0
- package/assets/index-BAmym71D.js +1 -0
- package/assets/{index-goUhewij.js → index-BBEYFb0K.js} +1 -1
- package/assets/index-BBSqe2Yu.js +1 -0
- package/assets/index-BBZBr17n.js +1 -0
- package/assets/index-BBhuy_-9.js +1 -0
- package/assets/index-BBjyHWpu.js +2 -0
- package/assets/index-BCgIOWHy.js +1 -0
- package/assets/index-BCjMsn_g.js +1 -0
- package/assets/index-BCmub21b.js +1 -0
- package/assets/index-BDZlq0qh.js +1 -0
- package/assets/index-BDxaD6BF.js +1 -0
- package/assets/index-BEvs-KDU.js +1 -0
- package/assets/index-BF0upGcQ.js +1 -0
- package/assets/index-BFO7EK1h.js +1 -0
- package/assets/index-BFmXTuTI.js +1 -0
- package/assets/index-BG7XICd4.js +1 -0
- package/assets/index-BGXhyrjQ.js +1 -0
- package/assets/index-BGdrC_Sh.js +1 -0
- package/assets/index-BGmtW5WT.js +1 -0
- package/assets/{index-HAFKHNrB.js → index-BHHvUivu.js} +1 -1
- package/assets/index-BHpZ5apY.js +1 -0
- package/assets/{index-Bp7JvHeI.js → index-BJB6bQRp.js} +1 -1
- package/assets/index-BK3hD_Aq.js +1 -0
- package/assets/index-BKOOtGSa.js +1 -0
- package/assets/{index-DvygrAbU.js → index-BKQlQfxz.js} +1 -1
- package/assets/index-BKc1f5vZ.js +1 -0
- package/assets/index-BKhtDnEy.js +1 -0
- package/assets/index-BLJlEky2.js +1 -0
- package/assets/index-BLXzYE6a.js +1 -0
- package/assets/index-BLslmGSA.js +1 -0
- package/assets/index-BNb0BNpv.js +1 -0
- package/assets/index-BNcgD_Jo.js +1 -0
- package/assets/index-BNxqavL8.js +1 -0
- package/assets/index-BNz6smeL.js +1 -0
- package/assets/index-BOGFyBZY.js +1 -0
- package/assets/index-BPIHBKg2.js +1 -0
- package/assets/index-BQfRnOEk.js +1 -0
- package/assets/{index-BPFffsgB.js → index-BS0_vd44.js} +1 -1
- package/assets/index-BSQg7iBu.js +1 -0
- package/assets/index-BSsQ8WTt.js +1 -0
- package/assets/{index-CODceU7b.css → index-BTGGjpkN.css} +3 -3
- package/assets/index-BUFTsMrI.js +1 -0
- package/assets/index-BUPzw_YU.js +1 -0
- package/assets/index-BV6FLPiR.js +1 -0
- package/assets/index-BVz0emY4.js +1 -0
- package/assets/index-BW67UrrV.js +1 -0
- package/assets/index-BWc71RqF.js +1 -0
- package/assets/index-BXLtaWeF.js +1 -0
- package/assets/index-BXMj9soJ.js +1 -0
- package/assets/index-BYdDyzxC.js +1 -0
- package/assets/index-BYkyq-Fh.js +1 -0
- package/assets/{index-Cx-bBVtG.js → index-BZRwFbHL.js} +1 -1
- package/assets/index-BZcoU6Z0.js +1 -0
- package/assets/index-BZprotv2.js +1 -0
- package/assets/index-B_5Z_DKz.js +1 -0
- package/assets/index-B_uKoT3A.js +1 -0
- package/assets/index-BbFO227e.js +1 -0
- package/assets/index-BbT33_dP.js +1 -0
- package/assets/index-BbblI1cW.js +1 -0
- package/assets/{index-DdEEbDq0.js → index-Bc4mvSuq.js} +1 -1
- package/assets/index-Bd679tWT.js +1 -0
- package/assets/index-BeSxOizm.js +1 -0
- package/assets/index-BemdfzPz.js +1 -0
- package/assets/index-Beysbmyx.js +2 -0
- package/assets/index-Bf6aVU23.js +1 -0
- package/assets/index-Bg6yFg1o.js +1 -0
- package/assets/index-BgNRU-e0.js +1 -0
- package/assets/index-BhCLT0ad.js +1 -0
- package/assets/index-Bh_-A7Ja.js +1 -0
- package/assets/index-BhkOXeUI.js +1 -0
- package/assets/index-Bi3gSOdz.js +1 -0
- package/assets/index-BiQYxH3k.js +1 -0
- package/assets/index-Bj2cV2cj.js +1 -0
- package/assets/index-Bjaz41sN.js +1 -0
- package/assets/index-BjuDWcc8.js +1 -0
- package/assets/index-Bk78_cgg.js +1 -0
- package/assets/index-Bk7uX5j_.js +1 -0
- package/assets/index-BkT_Phju.js +1 -0
- package/assets/index-Bl90M3Oh.js +1 -0
- package/assets/index-BlKJ-JBj.js +1 -0
- package/assets/index-Blhav013.js +1 -0
- package/assets/index-BmyNUPMf.js +1 -0
- package/assets/index-BnZ9yt85.js +1 -0
- package/assets/index-BoWyXM61.js +1 -0
- package/assets/index-BomxN3NM.js +1 -0
- package/assets/index-Bp51oEV0.js +1 -0
- package/assets/index-BpHRNVJq.js +1 -0
- package/assets/index-BqfTsh6E.js +1 -0
- package/assets/index-Br2X_aBY.js +1 -0
- package/assets/index-BrmfNCsT.js +1 -0
- package/assets/index-BsPtMfti.js +1 -0
- package/assets/index-BsYaYokr.js +1 -0
- package/assets/index-BtXf6MK9.js +1 -0
- package/assets/index-BuRC3xsC.js +1 -0
- package/assets/index-Bw9O70Te.js +1 -0
- package/assets/index-BwPT1xVX.js +1 -0
- package/assets/index-BwWQILXK.js +1 -0
- package/assets/index-Bx-6M_VN.js +1 -0
- package/assets/index-BxdOFUPP.js +1 -0
- package/assets/index-BxoamgAt.js +1 -0
- package/assets/index-ByCnomey.js +1 -0
- package/assets/index-Byv2UG3B.js +1 -0
- package/assets/index-Byy_fx6M.js +1 -0
- package/assets/{index-BrSxWtTK.js → index-BzArFYlw.js} +1 -1
- package/assets/index-BzHMIBCY.js +1 -0
- package/assets/index-Bzae-fTw.js +1 -0
- package/assets/index-C-C8iqy7.js +1 -0
- package/assets/{index-iAuyHihw.js → index-C-_SQA8J.js} +1 -1
- package/assets/index-C01qJiwG.js +1 -0
- package/assets/index-C0S3Jw0J.js +1 -0
- package/assets/index-C15ioynp.js +1 -0
- package/assets/index-C1HmbNh1.js +1 -0
- package/assets/{index-C_6SxrOL.js → index-C1VvoXRq.js} +1 -1
- package/assets/index-C21V-qUV.js +1 -0
- package/assets/index-C28bWeia.js +1 -0
- package/assets/index-C3TfYb1F.js +1 -0
- package/assets/index-C3Ud76aq.js +1 -0
- package/assets/index-C3gWBSK8.js +1 -0
- package/assets/index-C4kxCSEw.js +1 -0
- package/assets/index-C5LJPbHN.js +1 -0
- package/assets/index-C5pmmrHC.js +1 -0
- package/assets/{index-BciRn1i6.js → index-C6lO61o8.js} +1 -1
- package/assets/index-C7MfWFoK.js +1 -0
- package/assets/index-C7Y-Vt-H.js +1 -0
- package/assets/index-C9KeS2NO.js +1 -0
- package/assets/index-C9QluAH0.js +1 -0
- package/assets/index-C9s7a0Ez.js +1 -0
- package/assets/index-CAbUuCad.js +1 -0
- package/assets/index-CBEChUnX.js +1 -0
- package/assets/index-CBtcz4_T.js +1 -0
- package/assets/index-CCH4Lm0k.js +1 -0
- package/assets/index-CCHSY1Ig.js +1 -0
- package/assets/index-CCMe_tjP.js +1 -0
- package/assets/index-CCYs1NTS.js +1 -0
- package/assets/index-CCcCf_zM.js +1 -0
- package/assets/index-CCmQEc5F.js +1 -0
- package/assets/index-CCoUqMcq.js +1 -0
- package/assets/index-CD-c0Pwx.js +1 -0
- package/assets/index-CDBO4Wxt.js +1 -0
- package/assets/index-CDSsehUH.js +1 -0
- package/assets/index-CEQTfzyW.js +1 -0
- package/assets/index-CEiupjfk.js +1 -0
- package/assets/index-CFS3GV0-.js +1 -0
- package/assets/index-CHGmRGs1.js +1 -0
- package/assets/index-CHj5uoB4.js +1 -0
- package/assets/index-CHtlbymW.js +1 -0
- package/assets/index-CI0o0_5P.js +1 -0
- package/assets/index-CIEKStke.js +1 -0
- package/assets/index-CIJwg7x2.js +1 -0
- package/assets/index-CIXsaBn0.js +1 -0
- package/assets/index-CIqB4GcC.js +1 -0
- package/assets/index-CJLOVPEY.js +1 -0
- package/assets/index-CJOIpO0D.js +1 -0
- package/assets/index-CJUw-x2B.js +1 -0
- package/assets/index-CJWMUHO2.js +1 -0
- package/assets/index-CJjptfiA.js +1 -0
- package/assets/index-CKbNEeVv.js +1 -0
- package/assets/index-CLDRRTfd.js +1 -0
- package/assets/index-CLmRyFMq.js +1 -0
- package/assets/index-CLuOEfyi.js +1 -0
- package/assets/index-CM1LA8OI.js +1 -0
- package/assets/index-CMLf1O57.js +1 -0
- package/assets/index-CMXgyf5r.js +1 -0
- package/assets/index-CMZLDlaA.js +1 -0
- package/assets/index-CMs5X7O_.js +1 -0
- package/assets/index-CMwU9_9b.js +1 -0
- package/assets/index-CN5jCnO7.js +1 -0
- package/assets/index-CNMUmwOO.js +1 -0
- package/assets/index-CNUn3cep.js +1 -0
- package/assets/index-CNa4H4iF.js +1 -0
- package/assets/index-CNtQA9K3.js +1 -0
- package/assets/index-CO5X7F-R.js +1 -0
- package/assets/index-COjO7y4b.js +1 -0
- package/assets/index-COyOD9UG.js +1 -0
- package/assets/index-CPsQ8NHN.js +1 -0
- package/assets/index-CQYWT8jy.js +1 -0
- package/assets/index-CQcA9NQy.js +1 -0
- package/assets/{index-BZcpG6tT.js → index-CR8uPp6r.js} +1 -1
- package/assets/index-CRpuavSs.js +1 -0
- package/assets/{index-DjKx0U6o.js → index-CSLYlLzb.js} +1 -1
- package/assets/index-CSM6DsXg.js +1 -0
- package/assets/index-CS_r9DbU.js +1 -0
- package/assets/index-CT7qvsrD.js +1 -0
- package/assets/{index-Uuvg_32q.js → index-CTMN1OiK.js} +1 -1
- package/assets/index-CUrSGAWv.js +1 -0
- package/assets/index-CUruswiz.js +1 -0
- package/assets/index-CVbWxVgo.js +1 -0
- package/assets/index-CVzxUbsV.js +1 -0
- package/assets/index-CWJEGR1b.js +1 -0
- package/assets/index-CWLh9ort.js +1 -0
- package/assets/index-CWMJI89u.js +1 -0
- package/assets/index-CWP7CAYR.js +1 -0
- package/assets/index-CWRHM42y.js +1 -0
- package/assets/index-CWcfCu8_.js +1 -0
- package/assets/index-CXMLwLSL.js +1 -0
- package/assets/index-CY9mq6Ws.js +1 -0
- package/assets/index-CYFQ1qjY.js +1 -0
- package/assets/index-CYWQaahL.js +1 -0
- package/assets/index-CZ1QIkWn.js +1 -0
- package/assets/index-CZ_a5e1G.js +1 -0
- package/assets/index-C_0gheI4.js +1 -0
- package/assets/index-C_QhTFPr.js +1 -0
- package/assets/index-C_xRuElA.js +1 -0
- package/assets/index-Cb3GRnFH.js +1 -0
- package/assets/index-CcMwGV5f.js +1 -0
- package/assets/index-Cca-XDRc.js +1 -0
- package/assets/index-Ccilo5se.js +1 -0
- package/assets/{index-BLW01gt5.js → index-CdxpK6eg.js} +1 -1
- package/assets/index-CeIV1F82.js +1 -0
- package/assets/index-CeRPZA_a.js +1 -0
- package/assets/index-CeX49D2O.js +1 -0
- package/assets/index-CeoeXAWS.js +1 -0
- package/assets/index-CfvJYRh3.js +1 -0
- package/assets/index-CgAK97ik.js +1 -0
- package/assets/{index-lQAVUcJ_.js → index-CiiICg0u.js} +1 -1
- package/assets/index-CjviSBad.js +1 -0
- package/assets/index-Ck1HFtJO.js +1 -0
- package/assets/index-CkUX-IzZ.js +1 -0
- package/assets/index-ClREn2mR.js +1 -0
- package/assets/index-CmL6gP_y.js +1 -0
- package/assets/{index-DztUGues.js → index-CmahChMJ.js} +1 -1
- package/assets/index-CnESNHyu.js +1 -0
- package/assets/index-CnPAMI6s.js +1 -0
- package/assets/index-Cnl_JyCd.js +1 -0
- package/assets/{index-XZrkqNWI.js → index-CoFTFukW.js} +1 -1
- package/assets/index-CocmFQPB.js +1 -0
- package/assets/index-CpizqJi3.js +1 -0
- package/assets/index-CqG7x8Pr.js +1 -0
- package/assets/index-CqsWR9GD.js +1 -0
- package/assets/index-Cr_bAMhu.js +1 -0
- package/assets/index-CrhmmIqA.js +1 -0
- package/assets/index-CsOh37JV.js +1 -0
- package/assets/index-CsrGDi9G.js +1 -0
- package/assets/index-CtkUWqve.js +1 -0
- package/assets/index-CtrwXvyj.js +1 -0
- package/assets/index-Cu7IM6b-.js +1 -0
- package/assets/index-CufUEtrW.js +1 -0
- package/assets/index-CupY10KR.js +1 -0
- package/assets/index-CvmJGI4m.js +1 -0
- package/assets/index-Cw_4ZjJn.js +1 -0
- package/assets/index-Cw_t_6u-.js +1 -0
- package/assets/index-CxAdVXlx.js +1 -0
- package/assets/index-CxpTZ-IG.js +1 -0
- package/assets/index-Cyniq_vs.js +1 -0
- package/assets/{index-BpYijg-9.js → index-Cz8fLqSm.js} +1 -1
- package/assets/index-CzCBPhT0.js +1 -0
- package/assets/index-D-0oKenN.js +1 -0
- package/assets/index-D-YZvb-d.js +1 -0
- package/assets/index-D-cUTPXD.js +1 -0
- package/assets/index-D06yDGlI.js +1 -0
- package/assets/index-D09tH-_p.js +1 -0
- package/assets/index-D3-ragvp.js +1 -0
- package/assets/index-D3CZdDyo.js +1 -0
- package/assets/index-D3V2-WKd.js +1 -0
- package/assets/index-D3xs2XN5.js +1 -0
- package/assets/index-D4kRIh3X.js +1 -0
- package/assets/index-D4qmgJzl.js +1 -0
- package/assets/index-D5HkZlJ0.js +1 -0
- package/assets/index-D5OfgCAv.js +1 -0
- package/assets/index-D5XbboPy.js +1 -0
- package/assets/index-D5zmTuuZ.js +1 -0
- package/assets/index-D7-VEloj.js +1 -0
- package/assets/{index-BklFrcZw.js → index-D7Vm1lDs.js} +1 -1
- package/assets/index-D7fJW09r.js +1 -0
- package/assets/index-D98A1qt-.js +1 -0
- package/assets/index-D9LT89OI.js +1 -0
- package/assets/index-D9OjbU6W.js +1 -0
- package/assets/index-DA-8j4Lu.js +1 -0
- package/assets/index-DA2atyII.js +1 -0
- package/assets/index-DA5yAy1K.js +1 -0
- package/assets/index-DAvwKHX9.js +1 -0
- package/assets/{index-BFDVyHZp.js → index-DAxajamR.js} +1 -1
- package/assets/index-DBBjFUrh.js +1 -0
- package/assets/index-DBjSfZvB.js +1 -0
- package/assets/index-DC6eto0o.js +1 -0
- package/assets/index-DCCkUyPX.js +1 -0
- package/assets/index-DDOKzdz4.js +1 -0
- package/assets/index-DDY5PRF0.js +1 -0
- package/assets/index-DEKXKw0a.js +1 -0
- package/assets/index-DF3I6ohZ.js +1 -0
- package/assets/index-DFMDLTUW.js +1 -0
- package/assets/index-DFgt2jBx.js +1 -0
- package/assets/index-DGIafVOM.js +1 -0
- package/assets/index-DGJr_A1x.js +1 -0
- package/assets/index-DG_CsZ_L.js +1 -0
- package/assets/index-DGbXzX8-.js +1 -0
- package/assets/index-DGzea1yQ.js +1 -0
- package/assets/index-DH7rY4T1.js +1 -0
- package/assets/index-DHDeZN7S.js +1 -0
- package/assets/index-DHjyikOS.js +1 -0
- package/assets/index-DIQXVD2E.js +1 -0
- package/assets/index-DJ38lxUa.js +1 -0
- package/assets/index-DJaj65I0.js +1 -0
- package/assets/index-DJowGey-.js +1 -0
- package/assets/index-DK3fb1zE.js +1 -0
- package/assets/index-DKILMXwW.js +1 -0
- package/assets/index-DKe_tqaK.js +1 -0
- package/assets/index-DLIbM3lV.js +1 -0
- package/assets/index-DM2yaKtc.js +1 -0
- package/assets/index-DMB3d6tz.js +1 -0
- package/assets/index-DMVhtS8w.js +1 -0
- package/assets/index-DMa3aE-k.js +1 -0
- package/assets/index-DNfPkY9K.js +1 -0
- package/assets/index-DNwbsPLB.js +1 -0
- package/assets/{index-CsxIMu1J.js → index-DO1z5D8-.js} +1 -1
- package/assets/{index-DtMyNBRR.js → index-DOL0GnIq.js} +1 -1
- package/assets/index-DOvMMOii.js +1 -0
- package/assets/index-DP05FHXN.js +1 -0
- package/assets/index-DPDDihVu.js +1 -0
- package/assets/{index-C3_Vdp-K.js → index-DPowawyA.js} +1 -1
- package/assets/index-DQErdPlT.js +1 -0
- package/assets/index-DQX7gmmD.js +1 -0
- package/assets/index-DQgBEjQv.js +1 -0
- package/assets/index-DQv3qKxR.js +1 -0
- package/assets/index-DQzq_sef.js +1 -0
- package/assets/index-DRKmorNl.js +1 -0
- package/assets/index-DRMQsmmg.js +1 -0
- package/assets/index-DSfHTVO4.js +1 -0
- package/assets/index-DSj56DPA.js +1 -0
- package/assets/index-DTTPaYVe.js +1 -0
- package/assets/index-DVU2i8-9.js +1 -0
- package/assets/index-DW3P0esM.js +1 -0
- package/assets/{index-raWj9ugs.js → index-DWCZRA7n.js} +1 -1
- package/assets/index-DWEPmLGL.js +1 -0
- package/assets/{index-DdoNSnPZ.js → index-DWNmSOig.js} +18 -18
- package/assets/index-DWUn3xTJ.js +1 -0
- package/assets/index-DX2vH8ZR.js +1 -0
- package/assets/{index-C-6kSUz0.js → index-DXVbOK22.js} +1 -1
- package/assets/index-DXWCd209.js +1 -0
- package/assets/index-DXyPnzZX.js +1 -0
- package/assets/index-DYjaueYq.js +1 -0
- package/assets/index-DYoxAMAI.js +1 -0
- package/assets/index-DZ9mCxwq.js +1 -0
- package/assets/index-DaqgY28G.js +1 -0
- package/assets/index-DatBJWXi.js +1 -0
- package/assets/index-DatayTYV.js +1 -0
- package/assets/index-DbF84wMV.js +1 -0
- package/assets/index-DbOEUjNQ.js +1 -0
- package/assets/index-DbhRZmkB.js +1 -0
- package/assets/index-DcfiRGq8.js +1 -0
- package/assets/index-DcqBR87a.js +1 -0
- package/assets/index-DdQ2QlTJ.js +1 -0
- package/assets/index-DdpNYj5B.js +1 -0
- package/assets/index-DePwUFvF.js +1 -0
- package/assets/{index-CJSrkfvs.js → index-DfA8vzD1.js} +1 -1
- package/assets/index-DfOp93tH.js +1 -0
- package/assets/index-DgG_G6mi.js +1 -0
- package/assets/index-Dhf5ESfd.js +1 -0
- package/assets/index-DhgLjA_l.js +1 -0
- package/assets/index-DhglES_R.js +1 -0
- package/assets/index-DhlU5IqG.js +1 -0
- package/assets/index-DhvSUS0J.js +1 -0
- package/assets/index-DiP3XxxX.js +1 -0
- package/assets/index-DiYqUBGF.js +1 -0
- package/assets/index-DiywNzXF.js +1 -0
- package/assets/index-Dj4HncvX.js +1 -0
- package/assets/index-DjBbIJjj.js +1 -0
- package/assets/index-DjdLeYmK.js +1 -0
- package/assets/index-DjjVwGb1.js +1 -0
- package/assets/index-DkHeUbcp.js +1 -0
- package/assets/index-DkSjxVHF.js +1 -0
- package/assets/index-Dkkrt5IR.js +1 -0
- package/assets/index-DmZNtM-R.js +1 -0
- package/assets/index-DntehBUo.js +1 -0
- package/assets/index-Do5UpbR4.js +1 -0
- package/assets/index-DoDmQ6s0.js +1 -0
- package/assets/index-DoEa8sok.js +1 -0
- package/assets/index-DoLyLIiv.js +1 -0
- package/assets/index-DovxLsNV.js +1 -0
- package/assets/index-DphUbohB.js +1 -0
- package/assets/index-DpmgAexj.js +1 -0
- package/assets/index-Dq3AkWuf.js +1 -0
- package/assets/{index-3_gX-aBQ.js → index-DqDeelBC.js} +1 -1
- package/assets/index-DrVtwvSv.js +1 -0
- package/assets/{index-BZhrEz4k.js → index-DrWK5GwZ.js} +2 -2
- package/assets/index-DreOZR2Q.js +1 -0
- package/assets/index-DrxHpbC_.js +1 -0
- package/assets/index-Ds8RjPXm.js +1 -0
- package/assets/index-DsAnwcI8.js +1 -0
- package/assets/index-DsKtpcc2.js +1 -0
- package/assets/index-DsKyOM-e.js +1 -0
- package/assets/index-DuYSq0vM.js +1 -0
- package/assets/index-Dvtv553D.js +1 -0
- package/assets/{index-ChsPLSWT.js → index-DvxHgpeA.js} +1 -1
- package/assets/index-DwI6Aho1.js +1 -0
- package/assets/index-DwgGCnoU.js +1 -0
- package/assets/index-DwvFwGye.js +1 -0
- package/assets/index-DxaY4K6c.js +1 -0
- package/assets/index-Dy08-O43.js +1 -0
- package/assets/index-DyIhQvc9.js +1 -0
- package/assets/index-DyKMC2z8.js +1 -0
- package/assets/index-DyMe2909.js +1 -0
- package/assets/index-Dyr2ZfAb.js +1 -0
- package/assets/index-DzZiRHPP.js +1 -0
- package/assets/index-Dzz3Ux1P.js +1 -0
- package/assets/index-E_TvYm_u.js +1 -0
- package/assets/index-FAz89-B7.js +1 -0
- package/assets/index-Fk0P5t9a.js +1 -0
- package/assets/index-GazkMlKm.js +1 -0
- package/assets/index-H3IjI5-5.js +1 -0
- package/assets/index-HkGLvX7o.js +1 -0
- package/assets/index-I0tHaeSb.js +1 -0
- package/assets/index-I2Tu6nVy.js +1 -0
- package/assets/index-IVGt0iH4.js +1 -0
- package/assets/index-JKQyAdFy.js +1 -0
- package/assets/{index-CawoDqBV.js → index-JfBdHn0q.js} +4 -4
- package/assets/index-Jtyxv-aY.js +1 -0
- package/assets/index-K9_ezyO0.js +1 -0
- package/assets/index-KBxYL2Hq.js +1 -0
- package/assets/{index-GkDjeW87.js → index-KHR-k9OK.js} +1 -1
- package/assets/index-KcbqAAb7.js +1 -0
- package/assets/index-Kpt7iZg5.js +1 -0
- package/assets/index-KxQNzhUS.js +1 -0
- package/assets/index-L98tcAPA.js +1 -0
- package/assets/index-LNb19jou.js +1 -0
- package/assets/index-Lowl7Qx7.js +1 -0
- package/assets/index-LtZ_xWcO.js +1 -0
- package/assets/index-LzRKH3D3.js +1 -0
- package/assets/index-Mc-mIuS3.js +1 -0
- package/assets/index-N8lMWapZ.js +1 -0
- package/assets/index-N_5htzMA.js +1 -0
- package/assets/index-OUxzqq8e.js +1 -0
- package/assets/index-OrvSEOrD.js +1 -0
- package/assets/index-OxTQHzjd.js +1 -0
- package/assets/index-Q0EiqGJA.js +1 -0
- package/assets/index-QNOqUF4K.js +1 -0
- package/assets/index-QgklQrvI.js +1 -0
- package/assets/index-R6JShJLJ.js +1 -0
- package/assets/index-RFNw1zDI.js +1 -0
- package/assets/{index-CTY8gJAp.js → index-RNtaCqcC.js} +1 -1
- package/assets/index-RftHbEJr.js +1 -0
- package/assets/index-RjHECb4a.js +1 -0
- package/assets/index-RoCEXaRu.js +1 -0
- package/assets/index-TVPnfEz9.js +1 -0
- package/assets/index-Tn6RRkjq.js +1 -0
- package/assets/index-USdA4g97.js +1 -0
- package/assets/index-UbUXcYI1.js +1 -0
- package/assets/index-Uztr5Jgj.js +1 -0
- package/assets/index-VhOPKpLQ.js +1 -0
- package/assets/index-VoB5PA0C.js +1 -0
- package/assets/index-Wki7z4v7.js +1 -0
- package/assets/index-X6Icwh-t.js +1 -0
- package/assets/index-XPcis1Hk.js +1 -0
- package/assets/index-Y-7zWyQJ.js +1 -0
- package/assets/index-Y-iqvqQm.js +1 -0
- package/assets/index-YIjtC3K-.js +1 -0
- package/assets/index-Yhb_AR5X.js +1 -0
- package/assets/{index-CQ65bXVv.js → index-Z67jmPfi.js} +1 -1
- package/assets/index-ZMR3O7_V.js +1 -0
- package/assets/index-ZvCZJ82x.js +1 -0
- package/assets/index-_4gOTVBT.js +1 -0
- package/assets/index-_NpfTDRk.js +1 -0
- package/assets/index-_j8eviyU.js +1 -0
- package/assets/index-bXsRal1P.js +1 -0
- package/assets/index-bb2W2i3i.js +1 -0
- package/assets/index-bnomx8Dl.js +1 -0
- package/assets/index-bwODdJd_.js +1 -0
- package/assets/index-cT-bgULX.js +1 -0
- package/assets/index-cXlHoOhe.js +1 -0
- package/assets/index-d1Bi4Y3G.js +1 -0
- package/assets/index-ecg_2Bkp.js +1 -0
- package/assets/index-f3TfD4S5.js +1 -0
- package/assets/index-fLuuaL2F.js +1 -0
- package/assets/index-hEFZFzVq.js +1 -0
- package/assets/index-hkKPuWG8.js +1 -0
- package/assets/index-i5HAwWW2.js +1 -0
- package/assets/index-iIYRP3A2.js +1 -0
- package/assets/index-iN0t9HsN.js +1 -0
- package/assets/index-ivmWWMeT.js +1 -0
- package/assets/index-jAmOB9mf.js +1 -0
- package/assets/index-kvEY65i6.js +1 -0
- package/assets/index-m2MsoiHM.js +1 -0
- package/assets/index-mDTTSKTd.js +1 -0
- package/assets/index-mW9xQNOt.js +1 -0
- package/assets/index-n485xKg2.js +1 -0
- package/assets/{index-CfcNhWEg.js → index-nsb2Kk7z.js} +1 -1
- package/assets/index-qJF1Ni0x.js +1 -0
- package/assets/index-qfQgSHHm.js +1 -0
- package/assets/index-qjmsKc9v.js +1 -0
- package/assets/index-qqhEcO_P.js +1 -0
- package/assets/index-raYbXl7C.js +1 -0
- package/assets/index-rm_ORFAd.js +1 -0
- package/assets/index-rngE6ltw.js +1 -0
- package/assets/index-sMQpixIY.js +1 -0
- package/assets/index-skREueKQ.js +1 -0
- package/assets/index-u12pzcuy.js +1 -0
- package/assets/index-uBBwnPjF.js +1 -0
- package/assets/index-usaXkbHq.js +1 -0
- package/assets/index-vIU3bmo3.js +1 -0
- package/assets/index-vLEo3QS7.js +2 -0
- package/assets/index-wECDJ3NE.js +1 -0
- package/assets/index-weHMZi5B.js +1 -0
- package/assets/index-whsFZACg.js +1 -0
- package/assets/index-y-fv5WSz.js +1 -0
- package/assets/index-y1BukHtY.js +1 -0
- package/assets/{index-DAR-5YLY.js → index-yosKnFoR.js} +1 -1
- package/assets/index-zY1FByDs.js +1 -0
- package/assets/index-zbt41C9e.js +1 -0
- package/assets/index-zdYI4P64.js +1 -0
- package/assets/index-zfxUsesj.js +1 -0
- package/assets/{index.es-CZG_xqg1.js → index.es-CJCjj4D5.js} +1 -1
- package/assets/index.es-CcfXudt8.js +1 -0
- package/assets/{index.es-CZb_6NO4.js → index.es-DjT_e1lJ.js} +1 -1
- package/assets/index.es-s8EqqLvH.js +1 -0
- package/assets/ja-B_14a7-i.js +1 -0
- package/assets/ja-DI56VDCk.js +1 -0
- package/assets/ja-DJMSrON6.js +1 -0
- package/assets/ja-qsQcCBfK.js +1 -0
- package/assets/kr-5lmSzexK.js +1 -0
- package/assets/kr-BP_x8d-4.js +1 -0
- package/assets/kr-C28WMrvF.js +1 -0
- package/assets/kr-CBFJeZbH.js +1 -0
- package/assets/{native-DZFSJ4i3.js → native-B2Hyw1I8.js} +1 -1
- package/assets/{networks-0i4bnC2P.js → networks-BJaWSBT-.js} +1 -1
- package/assets/{onramp-vM5KdI1r.js → onramp-DtPBVTAX.js} +1 -1
- package/assets/openzeppelin-2loxNe8p.js +1 -0
- package/assets/{openzeppelin-B8QUtuwi.js → openzeppelin-DinUnglE.js} +1 -1
- package/assets/{ownerOf-DAy84guz.js → ownerOf-C_iy29-Y.js} +1 -1
- package/assets/ownerOf-ZgPNH7fU.js +1 -0
- package/assets/{parseNft-BmhktdtS.js → parseNft-Bx8LYMQi.js} +2 -2
- package/assets/parseSignature-Bj6kIf2F.js +24 -0
- package/assets/{parseSignature-pe5xOrUo.js → parseSignature-BuNt5p3s.js} +3 -3
- package/assets/passkeys-SEFvaSvR.js +1 -0
- package/assets/{pay-with-exchange-VEz5NF62.js → pay-with-exchange-Bnt8addE.js} +1 -1
- package/assets/{qr-overlay-BjpCgPqe.js → qr-overlay-CmPeXbUF.js} +1 -1
- package/assets/qr-overlay-DXzL7fWi.js +76 -0
- package/assets/{receive-7ceseJMP.js → receive-bimmaEqx.js} +1 -1
- package/assets/{ref-C54w4b0j.js → ref-BqQZiIC6.js} +1 -1
- package/assets/resolveImplementation-GIw27GK7.js +1 -0
- package/assets/{resolveImplementation-DUlZ-rCt.js → resolveImplementation-I40X9wTp.js} +1 -1
- package/assets/{rpc-BGBe81Ju.js → rpc-BG0Pk4UR.js} +1 -1
- package/assets/rpc-D0EopFXw.js +3 -0
- package/assets/ru-BDcqn2vv.js +1 -0
- package/assets/ru-BiwauFaO.js +1 -0
- package/assets/ru-CRpUAoj9.js +1 -0
- package/assets/ru-ov3iIk3P.js +1 -0
- package/assets/secp256k1-MOORasZn.js +1 -0
- package/assets/secp256k1-r5tEV53R.js +1 -0
- package/assets/{send--yEjr9IG.js → send-bIYI4awX.js} +1 -1
- package/assets/send-batch-transaction-C1RDZpKq.js +1 -0
- package/assets/{send-batch-transaction-BHCPQqMU.js → send-batch-transaction-n-ui8-LI.js} +1 -1
- package/assets/send-eip712-transaction-D88fU9U2.js +2 -0
- package/assets/{send-eip712-transaction-BZPqvG7o.js → send-eip712-transaction-DRu8yo6d.js} +2 -2
- package/assets/send-gasless-transaction-BCU2Zrfm.js +2 -0
- package/assets/{send-gasless-transaction-qd4_Tx37.js → send-gasless-transaction-DULqTN5p.js} +2 -2
- package/assets/session-proposal-CgSgZiFG.js +1 -0
- package/assets/session-proposal-DpLYOZnc.js +1 -0
- package/assets/session-request-BOw5DN3t.js +2 -0
- package/assets/session-request-D9OBe44U.js +2 -0
- package/assets/{sha256-DgLKZ9Bx.js → sha256-7fBhmRUn.js} +1 -1
- package/assets/sha256-BDhUJM1b.js +1 -0
- package/assets/sign-login-payload-BKykauFw.js +8 -0
- package/assets/{signing-WcNp-1pu.js → signing-BTssaCk0.js} +6 -6
- package/assets/signing-D2rOFgrP.js +2 -0
- package/assets/{socials-OZ-9Vq_T.js → socials-BB9j0tMw.js} +1 -1
- package/assets/store-CraP4F4Y.js +1 -0
- package/assets/{swaps-CxXfFAWo.js → swaps-B1HFXP9m.js} +1 -1
- package/assets/switch-chain-1RJMEuL3.js +1 -0
- package/assets/{thirdweb-BQL6aWra.js → thirdweb-CsQBcecB.js} +3 -3
- package/assets/tl-CRo3FF6E.js +1 -0
- package/assets/tl-DNpoqKxi.js +1 -0
- package/assets/tl-DgU76fWy.js +1 -0
- package/assets/tl-LjGyFSL6.js +1 -0
- package/assets/{totalSupply-Bc4pGc4c.js → totalSupply-BDJ-8q2H.js} +1 -1
- package/assets/totalSupply-DTUooqpt.js +1 -0
- package/assets/{transactionReceipt-Ufygp-9B.js → transactionReceipt-HPWYUddy.js} +1 -1
- package/assets/{transactions-ClBg7e6V.js → transactions-CDY0CpFM.js} +1 -1
- package/assets/{utils-3XaFMbFH.js → utils-Dvpw9MD5.js} +1 -1
- package/assets/{verifyHash-DWUT00B8.js → verifyHash-DD9wdoLy.js} +3 -3
- package/assets/vi-BmXdTnDJ.js +1 -0
- package/assets/vi-CeeFZUD3.js +1 -0
- package/assets/vi-UZskHqr3.js +1 -0
- package/assets/vi-rl4iq8bS.js +1 -0
- package/assets/{w3m-modal-BAoOk02r.js → w3m-modal-CnW3Paz2.js} +1 -1
- package/assets/{wait-for-tx-receipt-BD1QxGfa.js → wait-for-tx-receipt-ByEwSjsF.js} +1 -1
- package/assets/wallets-C6uJfx_m.js +15 -0
- package/assets/web-connector-BVPZhMLu.js +9 -0
- package/assets/web-connector-DDEmzUHA.js +2 -0
- package/assets/webauthn.min-CGpVStYZ.js +1 -0
- package/assets/zh-8Oiy2Jay.js +1 -0
- package/assets/zh-DNrmKyYe.js +1 -0
- package/assets/zh-DrVkc5qI.js +1 -0
- package/assets/zh-uWVXxi-t.js +1 -0
- package/assets/{zora-sepolia-B3X_ihxr.js → zora-sepolia-Bl3ucROa.js} +1 -1
- package/index.html +2 -2
- package/package.json +3 -3
- package/assets/controller-DNPxyM0w.js +0 -2
- package/assets/decimals-2D-Y9cW-.js +0 -1
- package/assets/eth_estimateGas-D2ryZZPl.js +0 -1
- package/assets/get-ecosystem-wallet-info-DZaItz06.js +0 -1
- package/assets/in-app-wallet-calls-C3_9LLpN.js +0 -1
- package/assets/index-C_KXbDr5.js +0 -2
- package/assets/index.es-ccu72RLB.js +0 -1
- package/assets/passkeys-C1wTOzLk.js +0 -1
- package/assets/secp256k1-CBOPmL7c.js +0 -1
- package/assets/session-proposal-0wiDsNgD.js +0 -1
- package/assets/session-request-CZavuRgD.js +0 -2
- package/assets/wallets-BHgcP8rz.js +0 -15
- package/assets/web-connector-DZYEnUXN.js +0 -9
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/get-ecosystem-wallet-info-Dw7REpCN.js","assets/signing-BTssaCk0.js","assets/utils-Dvpw9MD5.js","assets/index-DWNmSOig.js","assets/index-BTGGjpkN.css","assets/store-CraP4F4Y.js","assets/hashTypedData-DE5BevgH.js","assets/index.es-CJCjj4D5.js","assets/ethereum-dihBYRnT.js","assets/index-CR8uPp6r.js","assets/hooks.module-MHgUT2ti.js","assets/index-CiiICg0u.js","assets/transactionReceipt-HPWYUddy.js","assets/sha256-7fBhmRUn.js","assets/parseSignature-BuNt5p3s.js","assets/rpc-BG0Pk4UR.js","assets/sha256-Daj5l6sK.js","assets/hmac-Bk4Z90TB.js","assets/index-DO1z5D8-.js","assets/web-connector-BVPZhMLu.js","assets/sleep-mAKpSMLY.js","assets/index-vLEo3QS7.js","assets/send-eip712-transaction-DRu8yo6d.js","assets/controller-CcgJ61Ea.js","assets/qr-overlay-CmPeXbUF.js","assets/getBalance-JHGD-cET.js","assets/decimals-CVPnxmh7.js","assets/secp256k1-r5tEV53R.js","assets/session-proposal-DpLYOZnc.js","assets/session-request-BOw5DN3t.js","assets/in-app-wallet-calls-Dhx0WdY-.js","assets/wait-for-tx-receipt-ByEwSjsF.js","assets/send-batch-transaction-n-ui8-LI.js","assets/eth_getTransactionCount-PcXWvj1j.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{u as Zr,cg as Ku,ch as Wu,ci as Hu,cj as fc,ck as Gu,g as Z,cl as Ju,cm as nr,cn as mc,a as nn,h as De,x as _o,w as Zu,n as Le,o as Nr,j as ye,co as yc,cp as wc,cq as gc,k as Ps,l as Os,ai as Yu,b as Rs,ae as Qu,C as Xu,cr as Ec,aN as ed,cs as td,am as nd,an as rd,ct as id,m as Yr,aA as sd,aX as Bi,v as vc,cu as Ls,cv as bc,aL as od,V as Ds,cw as Ic,aW as po,cx as ad,W as cd,aC as fo,aQ as ld,aa as ud,cy as mo,ax as Ac,az as dd,E as hd,cz as Wt,ab as _d,t as pd,H as fd,cA as md,aU as yd,b9 as wd}from"./signing-BTssaCk0.js";import{f as gd,k as Tc,l as an,a as we,j as Vs,w as Pc,e as Qr,m as Ed,n as vd,o as bd,d as Id,c as _r,p as Ad}from"./utils-Dvpw9MD5.js";import{b as Bt,_ as a,g as Td,a as F,B as te,e as cn,k as Oc}from"./index-DWNmSOig.js";import{c as Pd}from"./store-CraP4F4Y.js";import{g as Od,v as Rd,s as Ld,w as Dd,p as Vd}from"./hashTypedData-DE5BevgH.js";import{q as Sd,s as ji,I as Pn,g as xd,d as Qe,t as Be,e as U,h as bn,C as Cd,j as Rc,k as $d,l as kd,m as Jn,n as zi,r as pr,u as Nd,v as Ud,w as qd,x as Md,y as Bd,z as jd,a as $t,A as On,o as zd,B as Fd,D as Ss,E as xs,f as Ur,P as yo,Q as Kd,F as Wd,b as wo,G as Zt,c as Lc,H as Et,J as dt,K as Ot}from"./index.es-CJCjj4D5.js";import{e as Hd}from"./ethereum-dihBYRnT.js";function Gd(n=32){return Zr(Jd(n))}function Jd(n=32){return globalThis.crypto.getRandomValues(new Uint8Array(n))}function Zd(n){const t=Wu(n);return Hu("0x19",fc(`Ethereum Signed Message:
|
|
3
|
+
`+Gu(t)),t)}function Yd(n){return Ku(Zd(n))}const eI="0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c",Qd="0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00",Xd="0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb",Xr="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",eh="0x0000000071727De22E5E9d8BAf0edAc6f37da032",th=50000n,nh=n=>rh(n||Xr)==="v0.7"?Xd:Qd,Dc=n=>{const t=gd().bundler;return t.startsWith("localhost:")?`http://${t}/v2?chain=${n.id}`:`https://${n.id}.${t}/v2`},rh=n=>{const t=Z(n);if(t===Xr)return"v0.6";if(t===eh)return"v0.7";throw new Error("Unknown paymaster version")};async function qe(n){const{client:t,ecosystem:e,walletType:r,walletAddress:i,chainId:s}=n;return Ju({client:t,data:{action:"connect",chainId:s,source:"connectWallet",walletAddress:i,walletType:r},ecosystem:e})}function Cs(n){const t=n.domain;return(t==null?void 0:t.chainId)!==void 0&&nr(t.chainId)&&(n.domain={...n.domain,chainId:mc(n.domain.chainId)}),n}const ih={"0x0":"reverted","0x1":"success"};function $s(n){var r;const[t,e]=(()=>{const i=n.status;return i>=100&&i<200?["pending",i]:i>=200&&i<300?["success",i]:i>=300&&i<700?["failure",i]:i==="CONFIRMED"?["success",200]:i==="PENDING"?["pending",100]:[void 0,i]})();return{...n,atomic:n.atomic,chainId:n.chainId?nn(n.chainId):void 0,receipts:((r=n.receipts)==null?void 0:r.map(i=>({...i,blockNumber:De(i.blockNumber),gasUsed:De(i.gasUsed),status:ih[i.status]})))??[],status:t,statusCode:e,version:n.version}}function ks(n,t){const e={};for(const[r,i]of Object.entries(n)){e[Number(r)]={};const s={};for(const[o,c]of Object.entries(i))s[o]=c;e[Number(r)]=s}return typeof t=="number"?{[t]:e[t]}:e}async function Ns(n,t){const e=n.calls[0];if(!e)throw new Error("No calls to send");const{calls:r,capabilities:i,version:s="2.0.0",chain:o=e.chain}=n,c=await Promise.all(r.map(async d=>{const{to:u,value:h}=d;if(u===void 0&&d.data===void 0)throw new Error("Cannot send call, `to` or `data` must be provided.");const[_,p,f]=await Promise.all([_o(u),Zu(d),_o(h)]);return _?{data:p,to:Z(_),value:typeof f=="bigint"||typeof f=="number"?Le(f):void 0}:{data:p,to:void 0,value:void 0}}));return{callParams:[{atomicRequired:n.atomicRequired??!1,calls:c,capabilities:i,chainId:Le(o.id),from:Z(t.address),version:s}],chain:o}}function Us(n){return sh(n).map(t=>{try{const e=new URL(t);return e.hostname.endsWith(".thirdweb.com")&&(e.pathname="",e.search=""),e.toString()}catch{return t}})}function sh(n,t,e="http"){const r=[];for(const i of n.rpc)e==="http"&&!i.startsWith("http")||e==="ws"&&!i.startsWith("ws")||(i.includes("${THIRDWEB_API_KEY}")?r.push(i.replace("${THIRDWEB_API_KEY}","")):i.includes("${")||r.push(i));if(r.length===0)throw new Error(`No RPC available for chainId "${n.chainId}" with mode ${e}`);return r}function ot(n){return typeof n=="number"?n:Nr(n)?nn(n):typeof n=="bigint"?Number(n):Number.parseInt(n,10)}function oh(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}function ah(){return typeof Bt<"u"&&typeof Bt.versions<"u"&&typeof Bt.versions.node<"u"}function Vc(){return!oh()&&!ah()}const ht="com.coinbase.wallet",At="org.base.account",Sc="io.metamask",ch="me.rainbow",lh="io.zerion.wallet",qr={async getItem(n){try{if(typeof window<"u"&&window.localStorage)return localStorage.getItem(n)}catch{}return null},async removeItem(n){typeof window<"u"&&window.localStorage&&localStorage.removeItem(n)},async setItem(n,t){try{typeof window<"u"&&window.localStorage&&localStorage.setItem(n,t)}catch{}}};function qs(n){return n.startsWith("http://")||n.startsWith("https://")}function xc(n,t){if(!qs(n))return Cc(n,t);let e=n;e.endsWith("/")||(e=`${e}/`);const r=encodeURIComponent(t);return{href:e,redirect:`${e}wc?uri=${r}`}}function Cc(n,t){if(qs(n))return xc(n,t);let e=n;e.includes("://")||(e=n.replaceAll("/","").replaceAll(":",""),e=`${e}://`),e.endsWith("/")||(e=`${e}/`);const r=encodeURIComponent(t);return{href:e,redirect:`${e}wc?uri=${r}`}}function uh(n,t){return qs(n)?xc(n,t):Cc(n,t)}function dh(){if(typeof navigator>"u")return!1;const n=Tc(navigator.userAgent);return n?n.toLowerCase().includes("android"):!1}function hh(){if(typeof navigator>"u")return!1;const n=Tc(navigator.userAgent);return n?n.toLowerCase().includes("ios")||n.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function _h(){return typeof window>"u"||typeof navigator>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function ph(){return typeof window>"u"?!1:"orientation"in window||"onorientationchange"in window}function go(){return!!(dh()||hh()||_h()&&ph()||typeof window<"u"&&window.innerWidth<640)}function _i(n){if(window!==window.top)window.open(n);else if(n.startsWith("http")){const e=document.createElement("a");e.href=n,e.target="_blank",e.rel="noreferrer noopener",e.click()}else window.location.href=n}function Rn(n){return typeof n=="string"?n.startsWith("ecosystem."):n.id.startsWith("ecosystem.")}async function $c(n,t){if(Rn(n)){const{getEcosystemWalletInfo:e}=await a(async()=>{const{getEcosystemWalletInfo:r}=await import("./get-ecosystem-wallet-info-Dw7REpCN.js");return{getEcosystemWalletInfo:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]));return t?e(n).then(r=>r.image_id):e(n)}switch(n){case"smart":return t?a(()=>import("./image-BnYtBA0B.js"),[]).then(e=>e.default):a(()=>import("./index-BuSavAVK.js"),[]).then(e=>e.wallet);case"inApp":return t?a(()=>import("./image-YhquT9-B.js"),[]).then(e=>e.default):a(()=>import("./index-B6yqoFuC.js"),[]).then(e=>e.wallet);case"walletConnect":return t?a(()=>import("./image-B3sWXgWp.js"),[]).then(e=>e.default):a(()=>import("./index-B21BIk0D.js"),[]).then(e=>e.wallet);case"embedded":return t?a(()=>import("./image-CE6B5igp.js"),[]).then(e=>e.default):a(()=>import("./index-CZfaBXw3.js"),[]).then(e=>e.wallet);case"adapter":return t?a(()=>import("./image-CaoCxndE.js"),[]).then(e=>e.default):a(()=>import("./index-DkPRLpmE.js"),[]).then(e=>e.wallet);case"io.1inch.wallet":return t?a(()=>import("./image-DcM8byf5.js"),[]).then(e=>e.default):a(()=>import("./index-B8SH8PS4.js"),[]).then(e=>e.wallet);case"com.binance.wallet":return t?a(()=>import("./image-B6woX8-F.js"),[]).then(e=>e.default):a(()=>import("./index-D1Wt1Kx7.js"),[]).then(e=>e.wallet);case"com.ledger":return t?a(()=>import("./image-CGobRsqC.js"),[]).then(e=>e.default):a(()=>import("./index-C63hJ0G0.js"),[]).then(e=>e.wallet);case"com.bitpay":return t?a(()=>import("./image-oGFA7lCe.js"),[]).then(e=>e.default):a(()=>import("./index-Bl6ScMn3.js"),[]).then(e=>e.wallet);case"com.bestwallet":return t?a(()=>import("./image-YzdSnFCd.js"),[]).then(e=>e.default):a(()=>import("./index-C_fnrq8t.js"),[]).then(e=>e.wallet);case"io.metamask":return t?a(()=>import("./image-rAE1A9js.js"),[]).then(e=>e.default):a(()=>import("./index-DaZnaClT.js"),[]).then(e=>e.wallet);case"com.trustwallet.app":return t?a(()=>import("./image-DhOOZChF.js"),[]).then(e=>e.default):a(()=>import("./index-9552Tb-C.js"),[]).then(e=>e.wallet);case"com.fireblocks":return t?a(()=>import("./image-C_rXI8lY.js"),[]).then(e=>e.default):a(()=>import("./index-fm1oF4Rd.js"),[]).then(e=>e.wallet);case"com.bitget.web3":return t?a(()=>import("./image-Cyu_SKNX.js"),[]).then(e=>e.default):a(()=>import("./index-7Xw6Dozy.js"),[]).then(e=>e.wallet);case"pro.tokenpocket":return t?a(()=>import("./image--EMjkbyZ.js"),[]).then(e=>e.default):a(()=>import("./index-C6d9DLRH.js"),[]).then(e=>e.wallet);case"com.safepal":return t?a(()=>import("./image-CPrfOTN2.js"),[]).then(e=>e.default):a(()=>import("./index-BKoDPf_i.js"),[]).then(e=>e.wallet);case"org.uniswap":return t?a(()=>import("./image-DzLDqqsm.js"),[]).then(e=>e.default):a(()=>import("./index-j8mIFeCA.js"),[]).then(e=>e.wallet);case"io.zerion.wallet":return t?a(()=>import("./image-CXpsLPxr.js"),[]).then(e=>e.default):a(()=>import("./index-CAYpPiIA.js"),[]).then(e=>e.wallet);case"com.elrond.maiar.wallet":return t?a(()=>import("./image-Zh059TUR.js"),[]).then(e=>e.default):a(()=>import("./index-CN99OAiz.js"),[]).then(e=>e.wallet);case"com.crypto.wallet":return t?a(()=>import("./image-BbeMBRJP.js"),[]).then(e=>e.default):a(()=>import("./index-DoeeKGAI.js"),[]).then(e=>e.wallet);case"com.bitcoin":return t?a(()=>import("./image-CIhcwJo_.js"),[]).then(e=>e.default):a(()=>import("./index-COFjg0BY.js"),[]).then(e=>e.wallet);case"com.bifrostwallet":return t?a(()=>import("./image-BJbq9ykO.js"),[]).then(e=>e.default):a(()=>import("./index-Cw9NGSPc.js"),[]).then(e=>e.wallet);case"jp.co.rakuten-wallet":return t?a(()=>import("./image-CkSdZpFq.js"),[]).then(e=>e.default):a(()=>import("./index-CU6dgzkA.js"),[]).then(e=>e.wallet);case"com.bybit":return t?a(()=>import("./image-CVPmP4Bl.js"),[]).then(e=>e.default):a(()=>import("./index-m0YDsCpu.js"),[]).then(e=>e.wallet);case"com.blockchain.login":return t?a(()=>import("./image-BvEJhPGs.js"),[]).then(e=>e.default):a(()=>import("./index-C8VMxu1Z.js"),[]).then(e=>e.wallet);case"io.trezor":return t?a(()=>import("./image-BQXnGJhx.js"),[]).then(e=>e.default):a(()=>import("./index-CDqfDzT6.js"),[]).then(e=>e.wallet);case"im.token":return t?a(()=>import("./image-ChDeiuh7.js"),[]).then(e=>e.default):a(()=>import("./index-iJWzlNVI.js"),[]).then(e=>e.wallet);case"global.safe":return t?a(()=>import("./image-B6ncW7rJ.js"),[]).then(e=>e.default):a(()=>import("./index-HPp1Id1p.js"),[]).then(e=>e.wallet);case"xyz.ctrl":return t?a(()=>import("./image-DsOpF0U0.js"),[]).then(e=>e.default):a(()=>import("./index-CW6lKp1A.js"),[]).then(e=>e.wallet);case"co.arculus":return t?a(()=>import("./image-CYFfk7g3.js"),[]).then(e=>e.default):a(()=>import("./index-s6ugJH3L.js"),[]).then(e=>e.wallet);case"com.roninchain.wallet":return t?a(()=>import("./image-BMgLTkFN.js"),[]).then(e=>e.default):a(()=>import("./index-caEr82M6.js"),[]).then(e=>e.wallet);case"com.okex.wallet":return t?a(()=>import("./image-Ck2fht2U.js"),[]).then(e=>e.default):a(()=>import("./index-CbEIEIEo.js"),[]).then(e=>e.wallet);case"com.wemixplay":return t?a(()=>import("./image-Dfhapk7_.js"),[]).then(e=>e.default):a(()=>import("./index-C8AQSvJD.js"),[]).then(e=>e.wallet);case"com.tangem":return t?a(()=>import("./image-xMsS8TDb.js"),[]).then(e=>e.default):a(()=>import("./index-CKXDw-uc.js"),[]).then(e=>e.wallet);case"com.exodus":return t?a(()=>import("./image-BULUy74S.js"),[]).then(e=>e.default):a(()=>import("./index-DszThTMl.js"),[]).then(e=>e.wallet);case"com.hashpack.wallet":return t?a(()=>import("./image-BFzDP99B.js"),[]).then(e=>e.default):a(()=>import("./index-wBbkQCZY.js"),[]).then(e=>e.wallet);case"id.co.pintu":return t?a(()=>import("./image-CsH_NRy-.js"),[]).then(e=>e.default):a(()=>import("./index-DHDm_YtM.js"),[]).then(e=>e.wallet);case"network.blackfort":return t?a(()=>import("./image-CTLwieHz.js"),[]).then(e=>e.default):a(()=>import("./index-DZRVQyzq.js"),[]).then(e=>e.wallet);case"com.wigwam.wallet":return t?a(()=>import("./image-xaEWk6k8.js"),[]).then(e=>e.default):a(()=>import("./index-BA0Hn6eE.js"),[]).then(e=>e.wallet);case"app.backpack":return t?a(()=>import("./image-YbQrvLSP.js"),[]).then(e=>e.default):a(()=>import("./index-B8BWAl26.js"),[]).then(e=>e.wallet);case"app.subwallet":return t?a(()=>import("./image-BdqmMP8T.js"),[]).then(e=>e.default):a(()=>import("./index-7C_yDnI4.js"),[]).then(e=>e.wallet);case"cc.avacus":return t?a(()=>import("./image-uGs9mRWl.js"),[]).then(e=>e.default):a(()=>import("./index-BFZxo6Jc.js"),[]).then(e=>e.wallet);case"me.rainbow":return t?a(()=>import("./image-DSGxNIm1.js"),[]).then(e=>e.default):a(()=>import("./index-3d3uK5Ax.js"),[]).then(e=>e.wallet);case"so.onekey.app.wallet":return t?a(()=>import("./image-CwaGmiHI.js"),[]).then(e=>e.default):a(()=>import("./index-CUEmD5dS.js"),[]).then(e=>e.wallet);case"me.haha":return t?a(()=>import("./image-Npe5Xkhl.js"),[]).then(e=>e.default):a(()=>import("./index-B7GQyWAF.js"),[]).then(e=>e.wallet);case"com.bee":return t?a(()=>import("./image-Sy6X7CtO.js"),[]).then(e=>e.default):a(()=>import("./index-CQ3aQg5G.js"),[]).then(e=>e.wallet);case"ag.jup":return t?a(()=>import("./image-BuqgjEJD.js"),[]).then(e=>e.default):a(()=>import("./index-D30RfPa1.js"),[]).then(e=>e.wallet);case"app.keplr":return t?a(()=>import("./image-DpeCw-px.js"),[]).then(e=>e.default):a(()=>import("./index-BnsE1W-S.js"),[]).then(e=>e.wallet);case"org.hot-labs":return t?a(()=>import("./image-DFf3lDA_.js"),[]).then(e=>e.default):a(()=>import("./index-DDwu-IMz.js"),[]).then(e=>e.wallet);case"com.dcentwallet":return t?a(()=>import("./image-CUPOo6zK.js"),[]).then(e=>e.default):a(()=>import("./index-Bm92iZMY.js"),[]).then(e=>e.wallet);case"com.kraken":return t?a(()=>import("./image-BP17CoHz.js"),[]).then(e=>e.default):a(()=>import("./index-BFGXqrJS.js"),[]).then(e=>e.wallet);case"com.kucoin":return t?a(()=>import("./image-JIl7mHMQ.js"),[]).then(e=>e.default):a(()=>import("./index-DRVDpxj6.js"),[]).then(e=>e.wallet);case"io.magiceden.wallet":return t?a(()=>import("./image-B7QIFAir.js"),[]).then(e=>e.default):a(()=>import("./index-DMTU8hfu.js"),[]).then(e=>e.wallet);case"com.tomi":return t?a(()=>import("./image-COwCE3RO.js"),[]).then(e=>e.default):a(()=>import("./index-C7njqxXR.js"),[]).then(e=>e.wallet);case"io.ibvm":return t?a(()=>import("./image-CVBI4BwD.js"),[]).then(e=>e.default):a(()=>import("./index-HzSvsrak.js"),[]).then(e=>e.wallet);case"com.mewwallet":return t?a(()=>import("./image-Dx4ya6_y.js"),[]).then(e=>e.default):a(()=>import("./index-DEzKWTBJ.js"),[]).then(e=>e.wallet);case"com.socios.app":return t?a(()=>import("./image-COKP1J8V.js"),[]).then(e=>e.default):a(()=>import("./index-D06ftJGd.js"),[]).then(e=>e.wallet);case"xyz.argent":return t?a(()=>import("./image-5mReG_-1.js"),[]).then(e=>e.default):a(()=>import("./index-CQPZVLgk.js"),[]).then(e=>e.wallet);case"org.thorwallet":return t?a(()=>import("./image-Dmp2jTO0.js"),[]).then(e=>e.default):a(()=>import("./index-NO3dCFlG.js"),[]).then(e=>e.wallet);case"io.internetmoney":return t?a(()=>import("./image-D4PYvYqY.js"),[]).then(e=>e.default):a(()=>import("./index-BZwq4W5O.js"),[]).then(e=>e.wallet);case"org.mathwallet":return t?a(()=>import("./image-mMy4SSmg.js"),[]).then(e=>e.default):a(()=>import("./index-lGNYNhMi.js"),[]).then(e=>e.wallet);case"io.cypherhq":return t?a(()=>import("./image-B14TCFf5.js"),[]).then(e=>e.default):a(()=>import("./index-yURkkC3L.js"),[]).then(e=>e.wallet);case"io.novawallet":return t?a(()=>import("./image-DDso8kuB.js"),[]).then(e=>e.default):a(()=>import("./index-C91aPf2g.js"),[]).then(e=>e.wallet);case"io.yowallet":return t?a(()=>import("./image-Bx8buncY.js"),[]).then(e=>e.default):a(()=>import("./index-B062fuzr.js"),[]).then(e=>e.wallet);case"com.flowfoundation.wallet":return t?a(()=>import("./image-Da2xkAVi.js"),[]).then(e=>e.default):a(()=>import("./index-CBVJzm96.js"),[]).then(e=>e.wallet);case"app.kabila":return t?a(()=>import("./image-B-l20wIO.js"),[]).then(e=>e.default):a(()=>import("./index-cTRIo3rN.js"),[]).then(e=>e.wallet);case"com.opera":return t?a(()=>import("./image-sDrIF89f.js"),[]).then(e=>e.default):a(()=>import("./index-lIOVfT2m.js"),[]).then(e=>e.wallet);case"com.valoraapp":return t?a(()=>import("./image-5QXPaavh.js"),[]).then(e=>e.default):a(()=>import("./index-C6baQHax.js"),[]).then(e=>e.wallet);case"com.robinhood.wallet":return t?a(()=>import("./image-DBehogZh.js"),[]).then(e=>e.default):a(()=>import("./index-bzH6W7xo.js"),[]).then(e=>e.wallet);case"com.chain":return t?a(()=>import("./image-qsAyF5Oj.js"),[]).then(e=>e.default):a(()=>import("./index-npRlG_V2.js"),[]).then(e=>e.wallet);case"io.huddln":return t?a(()=>import("./image-CQm90J-d.js"),[]).then(e=>e.default):a(()=>import("./index-DILut-jL.js"),[]).then(e=>e.wallet);case"app.core.extension":return t?a(()=>import("./image-De2xpum1.js"),[]).then(e=>e.default):a(()=>import("./index-BtfbjCVr.js"),[]).then(e=>e.wallet);case"world.freedom":return t?a(()=>import("./image-COnY36UD.js"),[]).then(e=>e.default):a(()=>import("./index-BZUSQkq9.js"),[]).then(e=>e.wallet);case"money.unstoppable":return t?a(()=>import("./image-Bvw8wNRu.js"),[]).then(e=>e.default):a(()=>import("./index-CW8D5Pv5.js"),[]).then(e=>e.wallet);case"pk.modular":return t?a(()=>import("./image-CaHdVXd1.js"),[]).then(e=>e.default):a(()=>import("./index-1CA6ps09.js"),[]).then(e=>e.wallet);case"app.wombat":return t?a(()=>import("./image-ExeF69qZ.js"),[]).then(e=>e.default):a(()=>import("./index-D9Jrno_D.js"),[]).then(e=>e.wallet);case"com.klipwallet":return t?a(()=>import("./image-8vXf4Xjy.js"),[]).then(e=>e.default):a(()=>import("./index-CcNQ53IV.js"),[]).then(e=>e.wallet);case"com.gemwallet":return t?a(()=>import("./image-M7TV7WaH.js"),[]).then(e=>e.default):a(()=>import("./index-BtZsXMJj.js"),[]).then(e=>e.wallet);case"com.sabay.wallet":return t?a(()=>import("./image-CsNgSbbt.js"),[]).then(e=>e.default):a(()=>import("./index-BVAmxcaa.js"),[]).then(e=>e.wallet);case"com.zengo":return t?a(()=>import("./image-DNtaIeSw.js"),[]).then(e=>e.default):a(()=>import("./index-DDk7D3eE.js"),[]).then(e=>e.wallet);case"xyz.joeywallet":return t?a(()=>import("./image-CTsHGgDx.js"),[]).then(e=>e.default):a(()=>import("./index-Im6F3t68.js"),[]).then(e=>e.wallet);case"io.tokoin":return t?a(()=>import("./image-DQzzFCs2.js"),[]).then(e=>e.default):a(()=>import("./index-Bwjy4Jw7.js"),[]).then(e=>e.wallet);case"io.alpha-u.wallet.web":return t?a(()=>import("./image-DLiMUWBI.js"),[]).then(e=>e.default):a(()=>import("./index-DFt1vT8N.js"),[]).then(e=>e.wallet);case"network.cvl":return t?a(()=>import("./image-CtZg2vKX.js"),[]).then(e=>e.default):a(()=>import("./index-D2vPh3Mc.js"),[]).then(e=>e.wallet);case"io.leapwallet":return t?a(()=>import("./image-DHnnMCFG.js"),[]).then(e=>e.default):a(()=>import("./index-BdkJrfxl.js"),[]).then(e=>e.wallet);case"io.xenea":return t?a(()=>import("./image-B5ZxW0VG.js"),[]).then(e=>e.default):a(()=>import("./index-C8mAROh2.js"),[]).then(e=>e.wallet);case"com.oasys-wallet":return t?a(()=>import("./image-W7SfqKZe.js"),[]).then(e=>e.default):a(()=>import("./index-gQ8zpnGO.js"),[]).then(e=>e.wallet);case"com.bitso":return t?a(()=>import("./image-LfonVSeq.js"),[]).then(e=>e.default):a(()=>import("./index-YcqLCtWD.js"),[]).then(e=>e.wallet);case"io.enjin":return t?a(()=>import("./image-BnXzDKuV.js"),[]).then(e=>e.default):a(()=>import("./index-Jmrm9oUu.js"),[]).then(e=>e.wallet);case"com.coldwallet":return t?a(()=>import("./image-CVrpZdwi.js"),[]).then(e=>e.default):a(()=>import("./index-CkqupmC6.js"),[]).then(e=>e.wallet);case"org.creditcoin.app":return t?a(()=>import("./image-CzL8n4ZU.js"),[]).then(e=>e.default):a(()=>import("./index-B94SpzOt.js"),[]).then(e=>e.wallet);case"app.everspace":return t?a(()=>import("./image-ripXpF5P.js"),[]).then(e=>e.default):a(()=>import("./index-COlGaDkw.js"),[]).then(e=>e.wallet);case"app.zeal":return t?a(()=>import("./image-hO8Jv2oh.js"),[]).then(e=>e.default):a(()=>import("./index-B6n-vVE0.js"),[]).then(e=>e.wallet);case"app.whitewallet":return t?a(()=>import("./image-D7wXb0Un.js"),[]).then(e=>e.default):a(()=>import("./index-SCBLsVUL.js"),[]).then(e=>e.wallet);case"ai.purewallet":return t?a(()=>import("./image-K1HoU8Qi.js"),[]).then(e=>e.default):a(()=>import("./index-DZ2hd5eC.js"),[]).then(e=>e.wallet);case"com.fastex.wallet":return t?a(()=>import("./image-lBIlUHFP.js"),[]).then(e=>e.default):a(()=>import("./index-CMzQk3O6.js"),[]).then(e=>e.wallet);case"io.kriptomat":return t?a(()=>import("./image-6ouyxZRt.js"),[]).then(e=>e.default):a(()=>import("./index-wk2CJ7i5.js"),[]).then(e=>e.wallet);case"com.ullapay":return t?a(()=>import("./image-Bn2sAgXJ.js"),[]).then(e=>e.default):a(()=>import("./index-D_d6gemZ.js"),[]).then(e=>e.wallet);case"io.atomicwallet":return t?a(()=>import("./image-D55LvXjp.js"),[]).then(e=>e.default):a(()=>import("./index-DEV4egrN.js"),[]).then(e=>e.wallet);case"com.pionewallet":return t?a(()=>import("./image-B_0Cqkss.js"),[]).then(e=>e.default):a(()=>import("./index-BogX5ITG.js"),[]).then(e=>e.wallet);case"io.oxalus":return t?a(()=>import("./image-DTa4RXUa.js"),[]).then(e=>e.default):a(()=>import("./index-CuQBw1y6.js"),[]).then(e=>e.wallet);case"xyz.uniultra.wallet":return t?a(()=>import("./image-BSLjXnNe.js"),[]).then(e=>e.default):a(()=>import("./index-CJYo3Znz.js"),[]).then(e=>e.wallet);case"xyz.frontier.wallet":return t?a(()=>import("./image-Bdtwdp85.js"),[]).then(e=>e.default):a(()=>import("./index--YTVamH2.js"),[]).then(e=>e.wallet);case"com.coolbitx.cwsapp":return t?a(()=>import("./image-DWR067hG.js"),[]).then(e=>e.default):a(()=>import("./index-tkvX3w1X.js"),[]).then(e=>e.wallet);case"org.gooddollar":return t?a(()=>import("./image-y3eCNAT6.js"),[]).then(e=>e.default):a(()=>import("./index-C7N44kNF.js"),[]).then(e=>e.wallet);case"com.cakewallet":return t?a(()=>import("./image-BqQffU2u.js"),[]).then(e=>e.default):a(()=>import("./index-DPCPDLBT.js"),[]).then(e=>e.wallet);case"com.ellipal":return t?a(()=>import("./image-vuuCn07N.js"),[]).then(e=>e.default):a(()=>import("./index-jTpsrMvb.js"),[]).then(e=>e.wallet);case"app.krystal":return t?a(()=>import("./image-C2QANSRr.js"),[]).then(e=>e.default):a(()=>import("./index-B7dAHFam.js"),[]).then(e=>e.wallet);case"com.monarchwallet":return t?a(()=>import("./image-BNA4BP9T.js"),[]).then(e=>e.default):a(()=>import("./index-C7WD5W_Z.js"),[]).then(e=>e.wallet);case"com.burritowallet":return t?a(()=>import("./image-BI-5Z38o.js"),[]).then(e=>e.default):a(()=>import("./index-DpRqa1iX.js"),[]).then(e=>e.wallet);case"co.family.wallet":return t?a(()=>import("./image-CECsJh3H.js"),[]).then(e=>e.default):a(()=>import("./index-DrzmRQ9S.js"),[]).then(e=>e.wallet);case"com.mtpelerin":return t?a(()=>import("./image-BDOqiI6p.js"),[]).then(e=>e.default):a(()=>import("./index-bQArImNA.js"),[]).then(e=>e.wallet);case"app.keyring":return t?a(()=>import("./image-BH6pi8gb.js"),[]).then(e=>e.default):a(()=>import("./index-DLGneTkB.js"),[]).then(e=>e.wallet);case"cc.localtrade.lab":return t?a(()=>import("./image-DRqNpoe6.js"),[]).then(e=>e.default):a(()=>import("./index-D-qw7id5.js"),[]).then(e=>e.wallet);case"tech.okto":return t?a(()=>import("./image-uk4MysVY.js"),[]).then(e=>e.default):a(()=>import("./index-C5ZfEOey.js"),[]).then(e=>e.wallet);case"com.xcapit":return t?a(()=>import("./image-BjFjHCOg.js"),[]).then(e=>e.default):a(()=>import("./index-DbAxetvE.js"),[]).then(e=>e.wallet);case"com.gayawallet":return t?a(()=>import("./image-DC9Wj56E.js"),[]).then(e=>e.default):a(()=>import("./index-D4VnhuTS.js"),[]).then(e=>e.wallet);case"app.nightly":return t?a(()=>import("./image-Bv8VGwx8.js"),[]).then(e=>e.default):a(()=>import("./index-uM5GtqSd.js"),[]).then(e=>e.wallet);case"com.coin98":return t?a(()=>import("./image-Co9P7WAh.js"),[]).then(e=>e.default):a(()=>import("./index-CxBkKx5Q.js"),[]).then(e=>e.wallet);case"xyz.coca":return t?a(()=>import("./image-DaxrbegS.js"),[]).then(e=>e.default):a(()=>import("./index-CAfHv9Ye.js"),[]).then(e=>e.wallet);case"app.linen":return t?a(()=>import("./image-CljvD_on.js"),[]).then(e=>e.default):a(()=>import("./index-DTPO88lj.js"),[]).then(e=>e.wallet);case"dev.auroracloud":return t?a(()=>import("./image-BbwfB3J_.js"),[]).then(e=>e.default):a(()=>import("./index-DqYjD_64.js"),[]).then(e=>e.wallet);case"com.coinomi":return t?a(()=>import("./image-CyezMyAx.js"),[]).then(e=>e.default):a(()=>import("./index-B-oXIR8J.js"),[]).then(e=>e.wallet);case"my.mone":return t?a(()=>import("./image-B7h27Vsd.js"),[]).then(e=>e.default):a(()=>import("./index-3jJtZlGN.js"),[]).then(e=>e.wallet);case"org.alephium":return t?a(()=>import("./image-DDUR5y02.js"),[]).then(e=>e.default):a(()=>import("./index-CRTSSeuy.js"),[]).then(e=>e.wallet);case"com.alicebob":return t?a(()=>import("./image-BKjOwOZU.js"),[]).then(e=>e.default):a(()=>import("./index-DYiL0IsZ.js"),[]).then(e=>e.wallet);case"io.koalawallet":return t?a(()=>import("./image-CTAbQz5j.js"),[]).then(e=>e.default):a(()=>import("./index-DPXkoJXK.js"),[]).then(e=>e.wallet);case"com.veworld":return t?a(()=>import("./image-DKBlkqWK.js"),[]).then(e=>e.default):a(()=>import("./index-DV2Q2KhC.js"),[]).then(e=>e.wallet);case"com.withpaper":return t?a(()=>import("./image-DbBiNCFK.js"),[]).then(e=>e.default):a(()=>import("./index-CExunyqd.js"),[]).then(e=>e.wallet);case"io.noone":return t?a(()=>import("./image-CwDXHpUj.js"),[]).then(e=>e.default):a(()=>import("./index-BEFk-36A.js"),[]).then(e=>e.wallet);case"network.haqq":return t?a(()=>import("./image-BaRuJqy0.js"),[]).then(e=>e.default):a(()=>import("./index--t3K2suC.js"),[]).then(e=>e.wallet);case"io.ricewallet":return t?a(()=>import("./image-CmVMIVLM.js"),[]).then(e=>e.default):a(()=>import("./index-C_j7AjFr.js"),[]).then(e=>e.wallet);case"me.iopay":return t?a(()=>import("./image-CMJsc-Ir.js"),[]).then(e=>e.default):a(()=>import("./index-bsKYZmcs.js"),[]).then(e=>e.wallet);case"app.walletnow":return t?a(()=>import("./image-CmkiYZaU.js"),[]).then(e=>e.default):a(()=>import("./index-C_C9JdoE.js"),[]).then(e=>e.wallet);case"io.okse":return t?a(()=>import("./image-CZ9z1ucT.js"),[]).then(e=>e.default):a(()=>import("./index-_a8zNWKv.js"),[]).then(e=>e.wallet);case"network.over":return t?a(()=>import("./image-Cq54pcgl.js"),[]).then(e=>e.default):a(()=>import("./index-BDifUsn3.js"),[]).then(e=>e.wallet);case"com.aktionariat":return t?a(()=>import("./image-Cc6jyxLi.js"),[]).then(e=>e.default):a(()=>import("./index-Pw2thZ4h.js"),[]).then(e=>e.wallet);case"com.paybolt":return t?a(()=>import("./image-cwzgrAkh.js"),[]).then(e=>e.default):a(()=>import("./index-BxqRct_I.js"),[]).then(e=>e.wallet);case"com.plasma-wallet":return t?a(()=>import("./image-BVO9IT_6.js"),[]).then(e=>e.default):a(()=>import("./index-fiGpKN6W.js"),[]).then(e=>e.wallet);case"org.bytebank":return t?a(()=>import("./image-BP2Ox9Qn.js"),[]).then(e=>e.default):a(()=>import("./index-S5s6rAc3.js"),[]).then(e=>e.wallet);case"io.ethermail":return t?a(()=>import("./image-Duck5tqn.js"),[]).then(e=>e.default):a(()=>import("./index-BoCHG1VO.js"),[]).then(e=>e.wallet);case"com.optowallet":return t?a(()=>import("./image-W-Y_Nm-s.js"),[]).then(e=>e.default):a(()=>import("./index-BP-yDgcx.js"),[]).then(e=>e.wallet);case"finance.openwallet":return t?a(()=>import("./image-M_AWRaKs.js"),[]).then(e=>e.default):a(()=>import("./index-Cv59xn6_.js"),[]).then(e=>e.wallet);case"xyz.sequence":return t?a(()=>import("./image-o3pjQDbu.js"),[]).then(e=>e.default):a(()=>import("./index-D7Gl-ZGb.js"),[]).then(e=>e.wallet);case"com.foxwallet":return t?a(()=>import("./image-DcX8AUYd.js"),[]).then(e=>e.default):a(()=>import("./index-BARF52iT.js"),[]).then(e=>e.wallet);case"app.hbwallet":return t?a(()=>import("./image-BlogSp8o.js"),[]).then(e=>e.default):a(()=>import("./index-CW58bOV7.js"),[]).then(e=>e.wallet);case"it.airgap":return t?a(()=>import("./image-5CGX_QL3.js"),[]).then(e=>e.default):a(()=>import("./index-YDG1R00C.js"),[]).then(e=>e.wallet);case"com.holdstation":return t?a(()=>import("./image-BcNLqzB4.js"),[]).then(e=>e.default):a(()=>import("./index-9Ml23qSY.js"),[]).then(e=>e.wallet);case"io.universaleverything":return t?a(()=>import("./image-D3z3GjMO.js"),[]).then(e=>e.default):a(()=>import("./index-qmNRbp6W.js"),[]).then(e=>e.wallet);case"com.abra":return t?a(()=>import("./image-CCgX-pcz.js"),[]).then(e=>e.default):a(()=>import("./index-_36_A-pH.js"),[]).then(e=>e.wallet);case"org.thepulsewallet":return t?a(()=>import("./image-BxfO9qDl.js"),[]).then(e=>e.default):a(()=>import("./index-DgNvhZ_M.js"),[]).then(e=>e.wallet);case"com.premanft":return t?a(()=>import("./image-pKZ5ApxC.js"),[]).then(e=>e.default):a(()=>import("./index-CbGJyo5C.js"),[]).then(e=>e.wallet);case"xyz.timelesswallet":return t?a(()=>import("./image-DUs_WIFe.js"),[]).then(e=>e.default):a(()=>import("./index-WXvxLSve.js"),[]).then(e=>e.wallet);case"org.bitizen":return t?a(()=>import("./image-TQ3Nh_VF.js"),[]).then(e=>e.default):a(()=>import("./index-Db_DlPJs.js"),[]).then(e=>e.wallet);case"app.ultimate":return t?a(()=>import("./image-ClyvBbEv.js"),[]).then(e=>e.default):a(()=>import("./index-D2Z8_AUU.js"),[]).then(e=>e.wallet);case"io.compasswallet":return t?a(()=>import("./image-D6x5dtDG.js"),[]).then(e=>e.default):a(()=>import("./index-2qmxPQhP.js"),[]).then(e=>e.wallet);case"app.fizzwallet":return t?a(()=>import("./image-E3PT44xu.js"),[]).then(e=>e.default):a(()=>import("./index-DAYuEFQ-.js"),[]).then(e=>e.wallet);case"com.xovawallet":return t?a(()=>import("./image-B02ECgsY.js"),[]).then(e=>e.default):a(()=>import("./index-Bap5Lkty.js"),[]).then(e=>e.wallet);case"app.nicegram":return t?a(()=>import("./image-DH5ootHk.js"),[]).then(e=>e.default):a(()=>import("./index-BEXV42kp.js"),[]).then(e=>e.wallet);case"io.zelcore":return t?a(()=>import("./image-CLUlwzEU.js"),[]).then(e=>e.default):a(()=>import("./index-BLO6pY9b.js"),[]).then(e=>e.wallet);case"app.freighter":return t?a(()=>import("./image-BanazMP9.js"),[]).then(e=>e.default):a(()=>import("./index-CcdGs50g.js"),[]).then(e=>e.wallet);case"app.stickey":return t?a(()=>import("./image-_t2-K1ZP.js"),[]).then(e=>e.default):a(()=>import("./index-Cu2rQjR7.js"),[]).then(e=>e.wallet);case"app.coinstats":return t?a(()=>import("./image-BlZLdRma.js"),[]).then(e=>e.default):a(()=>import("./index-j8xu_BhO.js"),[]).then(e=>e.wallet);case"io.harti":return t?a(()=>import("./image-Xfz-LkLu.js"),[]).then(e=>e.default):a(()=>import("./index-DPhI9JUn.js"),[]).then(e=>e.wallet);case"io.dttd":return t?a(()=>import("./image-pEGSGt6h.js"),[]).then(e=>e.default):a(()=>import("./index-CXYI0OjH.js"),[]).then(e=>e.wallet);case"com.tellaw":return t?a(()=>import("./image-sm-_D7TO.js"),[]).then(e=>e.default):a(()=>import("./index-Ddqy22qU.js"),[]).then(e=>e.wallet);case"io.klever":return t?a(()=>import("./image-BBFbQZtc.js"),[]).then(e=>e.default):a(()=>import("./index-BJAcAgB9.js"),[]).then(e=>e.wallet);case"com.unstoppabledomains":return t?a(()=>import("./image-EUVXQieb.js"),[]).then(e=>e.default):a(()=>import("./index-B1XrJIPH.js"),[]).then(e=>e.wallet);case"is.callback":return t?a(()=>import("./image-Mf3UQvEC.js"),[]).then(e=>e.default):a(()=>import("./index-DTtDhdi2.js"),[]).then(e=>e.wallet);case"ai.pundi":return t?a(()=>import("./image-9BTuaiXb.js"),[]).then(e=>e.default):a(()=>import("./index-Ca7jbqnT.js"),[]).then(e=>e.wallet);case"io.summonersarena":return t?a(()=>import("./image-3-p5LJAk.js"),[]).then(e=>e.default):a(()=>import("./index-ovz39Egy.js"),[]).then(e=>e.wallet);case"io.fizen":return t?a(()=>import("./image-CZLdphQJ.js"),[]).then(e=>e.default):a(()=>import("./index-WwjGYjHa.js"),[]).then(e=>e.wallet);case"fi.pillar":return t?a(()=>import("./image-CVAbhfmI.js"),[]).then(e=>e.default):a(()=>import("./index-BFJUkm8C.js"),[]).then(e=>e.wallet);case"world.ixo":return t?a(()=>import("./image-CsTNl20e.js"),[]).then(e=>e.default):a(()=>import("./index-C-A1j44m.js"),[]).then(e=>e.wallet);case"org.thetatoken":return t?a(()=>import("./image-BstOz2Sd.js"),[]).then(e=>e.default):a(()=>import("./index-BlU4B6pe.js"),[]).then(e=>e.wallet);case"net.gateweb3":return t?a(()=>import("./image-CypdirPa.js"),[]).then(e=>e.default):a(()=>import("./index-BkM7PWkU.js"),[]).then(e=>e.wallet);case"app.ammer":return t?a(()=>import("./image-BfGkQCHU.js"),[]).then(e=>e.default):a(()=>import("./index-C0HCn7GN.js"),[]).then(e=>e.wallet);case"us.binance":return t?a(()=>import("./image-DgkgLcDL.js"),[]).then(e=>e.default):a(()=>import("./index-BuhGQjsZ.js"),[]).then(e=>e.wallet);case"io.yusetoken":return t?a(()=>import("./image-CSAN5rKt.js"),[]).then(e=>e.default):a(()=>import("./index-DQ8_v09O.js"),[]).then(e=>e.wallet);case"co.muza":return t?a(()=>import("./image-CRsMfPT0.js"),[]).then(e=>e.default):a(()=>import("./index-5IpGHzAv.js"),[]).then(e=>e.wallet);case"io.hyperpay":return t?a(()=>import("./image-D8scG8aP.js"),[]).then(e=>e.default):a(()=>import("./index-BXZiXU-9.js"),[]).then(e=>e.wallet);case"io.cosmostation":return t?a(()=>import("./image-BYUgGshq.js"),[]).then(e=>e.default):a(()=>import("./index-RiIluuCN.js"),[]).then(e=>e.wallet);case"app.ryipay":return t?a(()=>import("./image-oKct0i27.js"),[]).then(e=>e.default):a(()=>import("./index-CdvxolxE.js"),[]).then(e=>e.wallet);case"io.wallet3":return t?a(()=>import("./image-DJLc6AlW.js"),[]).then(e=>e.default):a(()=>import("./index-C_5dy4gh.js"),[]).then(e=>e.wallet);case"org.dota168":return t?a(()=>import("./image-D3VAu6BC.js"),[]).then(e=>e.default):a(()=>import("./index-BP76iXI2.js"),[]).then(e=>e.wallet);case"com.bitpie":return t?a(()=>import("./image-BUsH-M52.js"),[]).then(e=>e.default):a(()=>import("./index-BKN05ia6.js"),[]).then(e=>e.wallet);case"com.coininn":return t?a(()=>import("./image-B_AAvjJY.js"),[]).then(e=>e.default):a(()=>import("./index-l2eJJ7mG.js"),[]).then(e=>e.wallet);case"me.easy":return t?a(()=>import("./image-BjKXKIhU.js"),[]).then(e=>e.default):a(()=>import("./index-4WvPsM5O.js"),[]).then(e=>e.wallet);case"io.shido":return t?a(()=>import("./image-BGZ2pFmO.js"),[]).then(e=>e.default):a(()=>import("./index-SaOy8OjI.js"),[]).then(e=>e.wallet);case"com.neonwallet":return t?a(()=>import("./image-D2051qUc.js"),[]).then(e=>e.default):a(()=>import("./index-CUJUgO36.js"),[]).then(e=>e.wallet);case"com.secuxtech":return t?a(()=>import("./image-DHHZDLK-.js"),[]).then(e=>e.default):a(()=>import("./index-D1G_5OyD.js"),[]).then(e=>e.wallet);case"com.unitywallet":return t?a(()=>import("./image-BqmT5urK.js"),[]).then(e=>e.default):a(()=>import("./index-BqxSKkSq.js"),[]).then(e=>e.wallet);case"io.miraiapp":return t?a(()=>import("./image-Bi1elmSL.js"),[]).then(e=>e.default):a(()=>import("./index-D0rQT1_1.js"),[]).then(e=>e.wallet);case"com.beexo":return t?a(()=>import("./image-MGwelZJS.js"),[]).then(e=>e.default):a(()=>import("./index-Bbv-4GNB.js"),[]).then(e=>e.wallet);case"social.halo":return t?a(()=>import("./image-CbnSXqJS.js"),[]).then(e=>e.default):a(()=>import("./index-KpPak-wu.js"),[]).then(e=>e.wallet);case"com.gemspocket":return t?a(()=>import("./image-DpGIEKrK.js"),[]).then(e=>e.default):a(()=>import("./index-RpXAvNRL.js"),[]).then(e=>e.wallet);case"app.status":return t?a(()=>import("./image-9509MPsE.js"),[]).then(e=>e.default):a(()=>import("./index-DLMSD3H_.js"),[]).then(e=>e.wallet);case"com.midoin":return t?a(()=>import("./image-BocNs9ze.js"),[]).then(e=>e.default):a(()=>import("./index-CrBWjlui.js"),[]).then(e=>e.wallet);case"id.competence":return t?a(()=>import("./image-CaqftHzf.js"),[]).then(e=>e.default):a(()=>import("./index-CGMXxK_x.js"),[]).then(e=>e.wallet);case"com.safemoon":return t?a(()=>import("./image-BcfiUDv-.js"),[]).then(e=>e.default):a(()=>import("./index-BgECKCj8.js"),[]).then(e=>e.wallet);case"llc.besc":return t?a(()=>import("./image-DLwHWQ4l.js"),[]).then(e=>e.default):a(()=>import("./index-CbMeskkV.js"),[]).then(e=>e.wallet);case"baby.smart":return t?a(()=>import("./image-VxDqDj0T.js"),[]).then(e=>e.default):a(()=>import("./index-BmKJ1abQ.js"),[]).then(e=>e.wallet);case"app.onto":return t?a(()=>import("./image-BCXqBewH.js"),[]).then(e=>e.default):a(()=>import("./index-BPFXH4g9.js"),[]).then(e=>e.wallet);case"com.ivirse":return t?a(()=>import("./image-8DkN4eFx.js"),[]).then(e=>e.default):a(()=>import("./index-CqWFxNbG.js"),[]).then(e=>e.wallet);case"one.mixin.messenger":return t?a(()=>import("./image-DecSbpNG.js"),[]).then(e=>e.default):a(()=>import("./index-PjYIiHEb.js"),[]).then(e=>e.wallet);case"cash.abpay":return t?a(()=>import("./image-Bb4ZLG-2.js"),[]).then(e=>e.default):a(()=>import("./index-BrvgJVgh.js"),[]).then(e=>e.wallet);case"ch.dssecurity":return t?a(()=>import("./image-ddsU9gPS.js"),[]).then(e=>e.default):a(()=>import("./index-DDdoZFD-.js"),[]).then(e=>e.wallet);case"com.concordium.wallet":return t?a(()=>import("./image-W5rUOVDT.js"),[]).then(e=>e.default):a(()=>import("./index-B5BAsv-B.js"),[]).then(e=>e.wallet);case"io.zkape":return t?a(()=>import("./image-Bm-o9RF3.js"),[]).then(e=>e.default):a(()=>import("./index-yLatYZZK.js"),[]).then(e=>e.wallet);case"com.paliwallet":return t?a(()=>import("./image-DqH_Lyo9.js"),[]).then(e=>e.default):a(()=>import("./index-C93NlSEw.js"),[]).then(e=>e.wallet);case"io.pitaka":return t?a(()=>import("./image-Bo8CHmCG.js"),[]).then(e=>e.default):a(()=>import("./index-DeQey0SH.js"),[]).then(e=>e.wallet);case"com.saitamatoken":return t?a(()=>import("./image-AlOoIjkb.js"),[]).then(e=>e.default):a(()=>import("./index-CNkg8_tm.js"),[]).then(e=>e.wallet);case"org.mugambo":return t?a(()=>import("./image-vXNBwFvw.js"),[]).then(e=>e.default):a(()=>import("./index-CqJjpCD5.js"),[]).then(e=>e.wallet);case"fi.stablez":return t?a(()=>import("./image-CruMo9Ar.js"),[]).then(e=>e.default):a(()=>import("./index-Wz7obrZB.js"),[]).then(e=>e.wallet);case"io.legacynetwork":return t?a(()=>import("./image-Dgb3Vdrr.js"),[]).then(e=>e.default):a(()=>import("./index-DLHjxUiX.js"),[]).then(e=>e.wallet);case"com.meld.app":return t?a(()=>import("./image-DrobCWF2.js"),[]).then(e=>e.default):a(()=>import("./index-BqLb859N.js"),[]).then(e=>e.wallet);case"io.bladewallet":return t?a(()=>import("./image-nqueMEws.js"),[]).then(e=>e.default):a(()=>import("./index-C0I75rp3.js"),[]).then(e=>e.wallet);case"com.authentrend":return t?a(()=>import("./image-CmzmxiTz.js"),[]).then(e=>e.default):a(()=>import("./index-0qRtNAQn.js"),[]).then(e=>e.wallet);case"com.webauth":return t?a(()=>import("./image-EyKsXf_1.js"),[]).then(e=>e.default):a(()=>import("./index-BXnDDK-y.js"),[]).then(e=>e.wallet);case"xyz.tucop":return t?a(()=>import("./image-8r04P3UP.js"),[]).then(e=>e.default):a(()=>import("./index-Bbznecif.js"),[]).then(e=>e.wallet);case"pro.fintoken":return t?a(()=>import("./image-BBez6ov1.js"),[]).then(e=>e.default):a(()=>import("./index-CP3DQPwx.js"),[]).then(e=>e.wallet);case"io.nash":return t?a(()=>import("./image--fcqsYch.js"),[]).then(e=>e.default):a(()=>import("./index-Bx9srovK.js"),[]).then(e=>e.wallet);case"vc.uincubator.api":return t?a(()=>import("./image-CyLv-qKv.js"),[]).then(e=>e.default):a(()=>import("./index-B5AZ3O3C.js"),[]).then(e=>e.wallet);case"io.unagi.unawallet":return t?a(()=>import("./image-C6ewnpHo.js"),[]).then(e=>e.default):a(()=>import("./index-CD7cY8HX.js"),[]).then(e=>e.wallet);case"io.nonbank":return t?a(()=>import("./image-TA_PkYBz.js"),[]).then(e=>e.default):a(()=>import("./index-DSWhMtMn.js"),[]).then(e=>e.wallet);case"io.armana.portal":return t?a(()=>import("./image-CI3i53ES.js"),[]).then(e=>e.default):a(()=>import("./index-DuTQzi4Z.js"),[]).then(e=>e.wallet);case"com.x9wallet":return t?a(()=>import("./image-BnT6IaIq.js"),[]).then(e=>e.default):a(()=>import("./index-K7y9yqJI.js"),[]).then(e=>e.wallet);case"io.kigo":return t?a(()=>import("./image-D9i7y0RW.js"),[]).then(e=>e.default):a(()=>import("./index-BIFgx20V.js"),[]).then(e=>e.wallet);case"com.alphawallet":return t?a(()=>import("./image-xJO47ptb.js"),[]).then(e=>e.default):a(()=>import("./index-B78E3fcT.js"),[]).then(e=>e.wallet);case"com.getcogni":return t?a(()=>import("./image-CwsKp0mM.js"),[]).then(e=>e.default):a(()=>import("./index-BNlDhEDg.js"),[]).then(e=>e.wallet);case"app.sinum":return t?a(()=>import("./image-DTy0DgOV.js"),[]).then(e=>e.default):a(()=>import("./index-D5GVUjIM.js"),[]).then(e=>e.wallet);case"finance.soulswap.app":return t?a(()=>import("./image-BI8lK7Gl.js"),[]).then(e=>e.default):a(()=>import("./index-CB_NguTF.js"),[]).then(e=>e.wallet);case"io.loopring.wallet":return t?a(()=>import("./image-BdLvgjKp.js"),[]).then(e=>e.default):a(()=>import("./index-DpoJvg5R.js"),[]).then(e=>e.wallet);case"com.shapeshift":return t?a(()=>import("./image-T2oAotCg.js"),[]).then(e=>e.default):a(()=>import("./index-CdMxme0L.js"),[]).then(e=>e.wallet);case"io.trinity-tech":return t?a(()=>import("./image-bHVCC2t9.js"),[]).then(e=>e.default):a(()=>import("./index-JNZoio_2.js"),[]).then(e=>e.wallet);case"money.keychain":return t?a(()=>import("./image-CHotlokX.js"),[]).then(e=>e.default):a(()=>import("./index-C2CZkwuV.js"),[]).then(e=>e.wallet);case"com.superhero.cordova":return t?a(()=>import("./image-CsmwtAjX.js"),[]).then(e=>e.default):a(()=>import("./index-C5X26G0P.js"),[]).then(e=>e.wallet);case"com.bettatrade":return t?a(()=>import("./image-B4MULACL.js"),[]).then(e=>e.default):a(()=>import("./index-qNIXx6_B.js"),[]).then(e=>e.wallet);case"online.puzzle":return t?a(()=>import("./image-C4hEqt6v.js"),[]).then(e=>e.default):a(()=>import("./index-D2-ySoTs.js"),[]).then(e=>e.wallet);case"gg.indi":return t?a(()=>import("./image-DdicXBNF.js"),[]).then(e=>e.default):a(()=>import("./index-BTkNDmCP.js"),[]).then(e=>e.wallet);case"io.tradestrike":return t?a(()=>import("./image-Bsv1aEQB.js"),[]).then(e=>e.default):a(()=>import("./index-CLtv9-lU.js"),[]).then(e=>e.wallet);case"xyz.echooo":return t?a(()=>import("./image-C7H4CQ65.js"),[]).then(e=>e.default):a(()=>import("./index-B-UTLjBc.js"),[]).then(e=>e.wallet);case"com.kryptogo":return t?a(()=>import("./image-D3ALeCj7.js"),[]).then(e=>e.default):a(()=>import("./index-BtBx3hi1.js"),[]).then(e=>e.wallet);case"io.trustasset":return t?a(()=>import("./image-BfmBx3-B.js"),[]).then(e=>e.default):a(()=>import("./index-MECmwSvw.js"),[]).then(e=>e.wallet);case"app.utorg":return t?a(()=>import("./image-CyF2UJbG.js"),[]).then(e=>e.default):a(()=>import("./index-DK-e_E51.js"),[]).then(e=>e.wallet);case"app.dfinnwallet":return t?a(()=>import("./image-DGLcwgsS.js"),[]).then(e=>e.default):a(()=>import("./index-DR-ujXcj.js"),[]).then(e=>e.wallet);case"org.rezor":return t?a(()=>import("./image-D_0i3ZH4.js"),[]).then(e=>e.default):a(()=>import("./index-DlKNOIdN.js"),[]).then(e=>e.wallet);case"io.legionnetwork":return t?a(()=>import("./image-BszqTwo7.js"),[]).then(e=>e.default):a(()=>import("./index-DMyHg26L.js"),[]).then(e=>e.wallet);case"cc.maxwallet":return t?a(()=>import("./image-CxvWjDXv.js"),[]).then(e=>e.default):a(()=>import("./index-Dy45c3qF.js"),[]).then(e=>e.wallet);case"com.ripio":return t?a(()=>import("./image-DZpGtN5l.js"),[]).then(e=>e.default):a(()=>import("./index-BoC-cn90.js"),[]).then(e=>e.wallet);case"com.fxwallet":return t?a(()=>import("./image-Bkj-ZRbS.js"),[]).then(e=>e.default):a(()=>import("./index-D8dYcFAn.js"),[]).then(e=>e.wallet);case"inc.tomo":return t?a(()=>import("./image-rw28GAIu.js"),[]).then(e=>e.default):a(()=>import("./index-Bh8eOJMM.js"),[]).then(e=>e.wallet);case"me.komet.app":return t?a(()=>import("./image-29vwsAfI.js"),[]).then(e=>e.default):a(()=>import("./index-CapnWgEl.js"),[]).then(e=>e.wallet);case"io.guardiianwallet":return t?a(()=>import("./image-DIDeRhKH.js"),[]).then(e=>e.default):a(()=>import("./index-CWTqaiN6.js"),[]).then(e=>e.wallet);case"io.hacken.hai":return t?a(()=>import("./image-Fq457JJn.js"),[]).then(e=>e.default):a(()=>import("./index-BH1-nK1j.js"),[]).then(e=>e.wallet);case"com.zypto":return t?a(()=>import("./image-D9OC6Qfy.js"),[]).then(e=>e.default):a(()=>import("./index-5U2ZJeh5.js"),[]).then(e=>e.wallet);case"io.nabox":return t?a(()=>import("./image-CJb0NNxX.js"),[]).then(e=>e.default):a(()=>import("./index-Cl87iGjg.js"),[]).then(e=>e.wallet);case"com.tastycrypto":return t?a(()=>import("./image-IpgDqPq2.js"),[]).then(e=>e.default):a(()=>import("./index-CXgqt45P.js"),[]).then(e=>e.wallet);case"com.ballet":return t?a(()=>import("./image-DNyYhMNV.js"),[]).then(e=>e.default):a(()=>import("./index-DhFHq_nZ.js"),[]).then(e=>e.wallet);case"io.talken":return t?a(()=>import("./image-DjXN5hvv.js"),[]).then(e=>e.default):a(()=>import("./index-CuJtvtqs.js"),[]).then(e=>e.wallet);case"io.wallacy":return t?a(()=>import("./image-CdGvq_lV.js"),[]).then(e=>e.default):a(()=>import("./index-DcUozftP.js"),[]).then(e=>e.wallet);case"network.mrhb":return t?a(()=>import("./image-CaBQfcNB.js"),[]).then(e=>e.default):a(()=>import("./index-BpspMk9l.js"),[]).then(e=>e.wallet);case"io.pockie":return t?a(()=>import("./image-D13kcv8b.js"),[]).then(e=>e.default):a(()=>import("./index-Bd7BhrCK.js"),[]).then(e=>e.wallet);case"me.astrox":return t?a(()=>import("./image-BGSprUxs.js"),[]).then(e=>e.default):a(()=>import("./index-BM9GzZ_o.js"),[]).then(e=>e.wallet);case"com.thirdweb":return t?a(()=>import("./image--O11VYbP.js"),[]).then(e=>e.default):a(()=>import("./index-VZmM-6RJ.js"),[]).then(e=>e.wallet);case"com.poolsmobility.wallet":return t?a(()=>import("./image-CUFBkGzy.js"),[]).then(e=>e.default):a(()=>import("./index-DMyDV-OH.js"),[]).then(e=>e.wallet);case"xyz.roam.wallet":return t?a(()=>import("./image-BBk5bBxJ.js"),[]).then(e=>e.default):a(()=>import("./index-DACt8hFb.js"),[]).then(e=>e.wallet);case"app.gamic":return t?a(()=>import("./image-CbmAI5Wi.js"),[]).then(e=>e.default):a(()=>import("./index-D09WfuKj.js"),[]).then(e=>e.wallet);case"app.m1nty":return t?a(()=>import("./image-8Zz6I0OH.js"),[]).then(e=>e.default):a(()=>import("./index-CU6cpe0O.js"),[]).then(e=>e.wallet);case"network.trustkeys":return t?a(()=>import("./image-BJAlBW3-.js"),[]).then(e=>e.default):a(()=>import("./index-BSA2BPZ9.js"),[]).then(e=>e.wallet);case"com.caesiumlab":return t?a(()=>import("./image-DLtkWmCC.js"),[]).then(e=>e.default):a(()=>import("./index-CZNdz8B6.js"),[]).then(e=>e.wallet);case"app.catecoin":return t?a(()=>import("./image-BIIaxSfC.js"),[]).then(e=>e.default):a(()=>import("./index-DNynPGua.js"),[]).then(e=>e.wallet);case"com.hootark":return t?a(()=>import("./image-BQTKy54v.js"),[]).then(e=>e.default):a(()=>import("./index-DhlaSoR4.js"),[]).then(e=>e.wallet);case"com.crossmint":return t?a(()=>import("./image-DrH3Wn2w.js"),[]).then(e=>e.default):a(()=>import("./index-Czf-i91G.js"),[]).then(e=>e.wallet);case"com.coincircle":return t?a(()=>import("./image-DOcz3CQ4.js"),[]).then(e=>e.default):a(()=>import("./index-Crs9jVrm.js"),[]).then(e=>e.wallet);case"io.bharatbox":return t?a(()=>import("./image-D1eN-vq9.js"),[]).then(e=>e.default):a(()=>import("./index-CdYRC4Ux.js"),[]).then(e=>e.wallet);case"nl.greenhood.wallet":return t?a(()=>import("./image-Cyy1KupU.js"),[]).then(e=>e.default):a(()=>import("./index-BPgl8Hhp.js"),[]).then(e=>e.wallet);case"co.swopme":return t?a(()=>import("./image-B6SAWLjq.js"),[]).then(e=>e.default):a(()=>import("./index-DMAP8qTI.js"),[]).then(e=>e.wallet);case"com.kresus":return t?a(()=>import("./image-DesBMjvP.js"),[]).then(e=>e.default):a(()=>import("./index-oEcArN4B.js"),[]).then(e=>e.wallet);case"com.dolletwallet":return t?a(()=>import("./image-fjbgiffe.js"),[]).then(e=>e.default):a(()=>import("./index-CCIAeA2T.js"),[]).then(e=>e.wallet);case"net.shinobi-wallet":return t?a(()=>import("./image-WbOd8jAJ.js"),[]).then(e=>e.default):a(()=>import("./index-CZmLnawh.js"),[]).then(e=>e.wallet);case"com.azcoiner":return t?a(()=>import("./image-BQcTbEVl.js"),[]).then(e=>e.default):a(()=>import("./index-t6B_NULY.js"),[]).then(e=>e.wallet);case"com.passwallet.app":return t?a(()=>import("./image-DJYKaoNi.js"),[]).then(e=>e.default):a(()=>import("./index-Ct6AYfZ-.js"),[]).then(e=>e.wallet);case"app.qubic.wallet":return t?a(()=>import("./image-BBZFtk5k.js"),[]).then(e=>e.default):a(()=>import("./index-DoKwRUhz.js"),[]).then(e=>e.wallet);case"com.coinex.wallet":return t?a(()=>import("./image-CfglWSsQ.js"),[]).then(e=>e.default):a(()=>import("./index-DMEV07wA.js"),[]).then(e=>e.wallet);case"app.xverse":return t?a(()=>import("./image-DETlLb_v.js"),[]).then(e=>e.default):a(()=>import("./index-DAlw00ee.js"),[]).then(e=>e.wallet);case"com.flash-wallet":return t?a(()=>import("./image-BzGwleUn.js"),[]).then(e=>e.default):a(()=>import("./index-7BdGIDy3.js"),[]).then(e=>e.wallet);case"com.vgxfoundation":return t?a(()=>import("./image-C6NJnfCW.js"),[]).then(e=>e.default):a(()=>import("./index-CsAX4sL-.js"),[]).then(e=>e.wallet);case"org.arianee":return t?a(()=>import("./image-B6VmDbM6.js"),[]).then(e=>e.default):a(()=>import("./index-Cx8lAzRu.js"),[]).then(e=>e.wallet);case"io.myabcwallet":return t?a(()=>import("./image-jv6wUF7a.js"),[]).then(e=>e.default):a(()=>import("./index-3an-fsOm.js"),[]).then(e=>e.wallet);case"io.owallet":return t?a(()=>import("./image-DGhNZ1rS.js"),[]).then(e=>e.default):a(()=>import("./index-D2_d10WC.js"),[]).then(e=>e.wallet);case"io.zelus":return t?a(()=>import("./image-1epPqHV4.js"),[]).then(e=>e.default):a(()=>import("./index-hUldZ-v8.js"),[]).then(e=>e.wallet);case"net.myrenegade":return t?a(()=>import("./image-SJHuomz2.js"),[]).then(e=>e.default):a(()=>import("./index-C5gBqe1B.js"),[]).then(e=>e.wallet);case"io.clingon":return t?a(()=>import("./image-2s8lIjLJ.js"),[]).then(e=>e.default):a(()=>import("./index-Dk8LF9Yk.js"),[]).then(e=>e.wallet);case"com.icewal":return t?a(()=>import("./image-rdvu9IOp.js"),[]).then(e=>e.default):a(()=>import("./index-Cd5Dye5X.js"),[]).then(e=>e.wallet);case"io.streakk":return t?a(()=>import("./image-CcPbeTXv.js"),[]).then(e=>e.default):a(()=>import("./index-CrGDBMbK.js"),[]).then(e=>e.wallet);case"com.dokwallet":return t?a(()=>import("./image-BRPzDWpX.js"),[]).then(e=>e.default):a(()=>import("./index-xEbiF_Me.js"),[]).then(e=>e.wallet);case"finance.porta":return t?a(()=>import("./image-BNvlqRxs.js"),[]).then(e=>e.default):a(()=>import("./index-DSL1LhIu.js"),[]).then(e=>e.wallet);case"io.prettygood.x":return t?a(()=>import("./image-BhmKXBqm.js"),[]).then(e=>e.default):a(()=>import("./index-DfafaK4Q.js"),[]).then(e=>e.wallet);case"io.earthwallet":return t?a(()=>import("./image-BOJcifnx.js"),[]).then(e=>e.default):a(()=>import("./index-BmwlJTQ-.js"),[]).then(e=>e.wallet);case"net.spatium.wallet":return t?a(()=>import("./image-CmrOpLf4.js"),[]).then(e=>e.default):a(()=>import("./index-Fd858RJQ.js"),[]).then(e=>e.wallet);case"live.superex":return t?a(()=>import("./image-ByHnaba8.js"),[]).then(e=>e.default):a(()=>import("./index-DqVvpGRi.js"),[]).then(e=>e.wallet);case"com.adftechnology":return t?a(()=>import("./image-C6LRjQzh.js"),[]).then(e=>e.default):a(()=>import("./index-C-b1qpM9.js"),[]).then(e=>e.wallet);case"com.bscecowallet":return t?a(()=>import("./image-8u03hBEl.js"),[]).then(e=>e.default):a(()=>import("./index-Dn2svNQz.js"),[]).then(e=>e.wallet);case"io.wallypto":return t?a(()=>import("./image-CRU88082.js"),[]).then(e=>e.default):a(()=>import("./index-j06jujv2.js"),[]).then(e=>e.wallet);case"com.reown":return t?a(()=>import("./image-D3tLM-DF.js"),[]).then(e=>e.default):a(()=>import("./index-DibwKtF2.js"),[]).then(e=>e.wallet);case"finance.voltage":return t?a(()=>import("./image-ZVoqlWXW.js"),[]).then(e=>e.default):a(()=>import("./index-XRQW1mUN.js"),[]).then(e=>e.wallet);case"com.walletconnect":return t?a(()=>import("./image-BAS5CqSz.js"),[]).then(e=>e.default):a(()=>import("./index-B-BftUxa.js"),[]).then(e=>e.wallet);case"io.passpay":return t?a(()=>import("./image-Ci0UFTFy.js"),[]).then(e=>e.default):a(()=>import("./index-CP_9UNXA.js"),[]).then(e=>e.wallet);case"technology.obvious":return t?a(()=>import("./image-ZLtraAGN.js"),[]).then(e=>e.default):a(()=>import("./index-BzNpkHfI.js"),[]).then(e=>e.wallet);case"io.plutope":return t?a(()=>import("./image-Bz03or90.js"),[]).then(e=>e.default):a(()=>import("./index-CszQa87W.js"),[]).then(e=>e.wallet);case"io.buzz-up":return t?a(()=>import("./image-BsQYdoXP.js"),[]).then(e=>e.default):a(()=>import("./index-BoJGVmma.js"),[]).then(e=>e.wallet);case"co.xellar":return t?a(()=>import("./image-D2QL-j27.js"),[]).then(e=>e.default):a(()=>import("./index-cdlur5jM.js"),[]).then(e=>e.wallet);case"com.kaxaa":return t?a(()=>import("./image-DPzEe6a_.js"),[]).then(e=>e.default):a(()=>import("./index-DFSGuScS.js"),[]).then(e=>e.wallet);case"org.shefi":return t?a(()=>import("./image-DwUGDFj5.js"),[]).then(e=>e.default):a(()=>import("./index-Dtavj5eK.js"),[]).then(e=>e.wallet);case"xyz.orion":return t?a(()=>import("./image-CCDmsN6r.js"),[]).then(e=>e.default):a(()=>import("./index-Ba2OoCBH.js"),[]).then(e=>e.wallet);case"world.dosi.vault":return t?a(()=>import("./image-Cy0vmJls.js"),[]).then(e=>e.default):a(()=>import("./index-eujSyrnd.js"),[]).then(e=>e.wallet);case"network.gridlock":return t?a(()=>import("./image-CxyHP7w7.js"),[]).then(e=>e.default):a(()=>import("./index-Ce98wt2N.js"),[]).then(e=>e.wallet);case"finance.plena":return t?a(()=>import("./image-Cwg1QVuh.js"),[]).then(e=>e.default):a(()=>import("./index-BG1ZQeCA.js"),[]).then(e=>e.wallet);case"cc.dropp":return t?a(()=>import("./image-CAIffJi4.js"),[]).then(e=>e.default):a(()=>import("./index-HFnaQWCU.js"),[]).then(e=>e.wallet);case"io.scramberry":return t?a(()=>import("./image-D8ARN-Gu.js"),[]).then(e=>e.default):a(()=>import("./index-BIcsFldg.js"),[]).then(e=>e.wallet);case"xyz.bonuz":return t?a(()=>import("./image-HcidEyjv.js"),[]).then(e=>e.default):a(()=>import("./index-BZhX-e71.js"),[]).then(e=>e.wallet);case"com.bmawallet":return t?a(()=>import("./image-kZBIIBVa.js"),[]).then(e=>e.default):a(()=>import("./index-BM8c6qO-.js"),[]).then(e=>e.wallet);case"co.lifedefi":return t?a(()=>import("./image-DRpXk5be.js"),[]).then(e=>e.default):a(()=>import("./index-otRo5H2H.js"),[]).then(e=>e.wallet);case"com.get-verso":return t?a(()=>import("./image-CgzMLfDa.js"),[]).then(e=>e.default):a(()=>import("./index-DAEFTu29.js"),[]).then(e=>e.wallet);case"io.blocto":return t?a(()=>import("./image-FnAIuX7S.js"),[]).then(e=>e.default):a(()=>import("./index-ZITrt5Fi.js"),[]).then(e=>e.wallet);case"com.pandoshi":return t?a(()=>import("./image-PWpnYSKI.js"),[]).then(e=>e.default):a(()=>import("./index-BmXd0pys.js"),[]).then(e=>e.wallet);case"io.getclave":return t?a(()=>import("./image-rvsWf8U_.js"),[]).then(e=>e.default):a(()=>import("./index--rITGawC.js"),[]).then(e=>e.wallet);case"technology.jambo":return t?a(()=>import("./image-Bx8ULApC.js"),[]).then(e=>e.default):a(()=>import("./index-C2KnoZm4.js"),[]).then(e=>e.wallet);case"app.edge":return t?a(()=>import("./image-1-dOu4Yt.js"),[]).then(e=>e.default):a(()=>import("./index-stFagoJS.js"),[]).then(e=>e.wallet);case"io.banksocial":return t?a(()=>import("./image-OrIz0o8m.js"),[]).then(e=>e.default):a(()=>import("./index-Ia3LffGn.js"),[]).then(e=>e.wallet);case"io.konio":return t?a(()=>import("./image-C2Wl7RAy.js"),[]).then(e=>e.default):a(()=>import("./index-B-kI7R4f.js"),[]).then(e=>e.wallet);case"com.qubetics":return t?a(()=>import("./image-DLvMDcgw.js"),[]).then(e=>e.default):a(()=>import("./index-C_j5E1ow.js"),[]).then(e=>e.wallet);case"app.imem":return t?a(()=>import("./image-Atwyf6cQ.js"),[]).then(e=>e.default):a(()=>import("./index-KXLAu1y1.js"),[]).then(e=>e.wallet);case"com.purechain":return t?a(()=>import("./image-DgU8tR58.js"),[]).then(e=>e.default):a(()=>import("./index-G-h-xM0C.js"),[]).then(e=>e.wallet);case"io.ethos":return t?a(()=>import("./image-DmNOl1OW.js"),[]).then(e=>e.default):a(()=>import("./index-DmLPMpkA.js"),[]).then(e=>e.wallet);case"io.didwallet":return t?a(()=>import("./image-CzKmxeZp.js"),[]).then(e=>e.default):a(()=>import("./index-QGSP4PI8.js"),[]).then(e=>e.wallet);case"com.dextrade":return t?a(()=>import("./image-B_ozWfd0.js"),[]).then(e=>e.default):a(()=>import("./index-CdOxXIip.js"),[]).then(e=>e.wallet);case"org.kelp":return t?a(()=>import("./image-CcKS-8-S.js"),[]).then(e=>e.default):a(()=>import("./index-DUBZIaC-.js"),[]).then(e=>e.wallet);case"xyz.nestwallet":return t?a(()=>import("./image-Bq1UxveY.js"),[]).then(e=>e.default):a(()=>import("./index-uKvrIGe-.js"),[]).then(e=>e.wallet);case"com.cryptnox":return t?a(()=>import("./image-UFnS_pK0.js"),[]).then(e=>e.default):a(()=>import("./index-ComRbnem.js"),[]).then(e=>e.wallet);case"land.liker":return t?a(()=>import("./image-C_JPqQZj.js"),[]).then(e=>e.default):a(()=>import("./index-CId5PD0X.js"),[]).then(e=>e.wallet);case"io.hippowallet":return t?a(()=>import("./image-BdJA4XzW.js"),[]).then(e=>e.default):a(()=>import("./index-BTzbgIH6.js"),[]).then(e=>e.wallet);case"io.certhis":return t?a(()=>import("./image-bSOL4gQb.js"),[]).then(e=>e.default):a(()=>import("./index-BxtNhRvf.js"),[]).then(e=>e.wallet);case"io.safecryptowallet":return t?a(()=>import("./image-DFF2Z6Pk.js"),[]).then(e=>e.default):a(()=>import("./index-CWdL5XwO.js"),[]).then(e=>e.wallet);case"com.saify":return t?a(()=>import("./image-DOwBqPVS.js"),[]).then(e=>e.default):a(()=>import("./index-De1eZyIJ.js"),[]).then(e=>e.wallet);case"com.tiduswallet":return t?a(()=>import("./image-DzJAqGfB.js"),[]).then(e=>e.default):a(()=>import("./index-BMPGw_D6.js"),[]).then(e=>e.wallet);case"io.uptn.dapp-web":return t?a(()=>import("./image-C4ELurjg.js"),[]).then(e=>e.default):a(()=>import("./index-jsmqr-24.js"),[]).then(e=>e.wallet);case"com.it.onewallet":return t?a(()=>import("./image-CWCOKSln.js"),[]).then(e=>e.default):a(()=>import("./index-DHNwai-Z.js"),[]).then(e=>e.wallet);case"com.rktechworks":return t?a(()=>import("./image-BhECDi_9.js"),[]).then(e=>e.default):a(()=>import("./index-D6xvjdG0.js"),[]).then(e=>e.wallet);case"com.revelator.wallet":return t?a(()=>import("./image-nW5JvdXC.js"),[]).then(e=>e.default):a(()=>import("./index-CNl69Nv0.js"),[]).then(e=>e.wallet);case"com.sinohope":return t?a(()=>import("./image-D7P0qSfx.js"),[]).then(e=>e.default):a(()=>import("./index-DKzyJcIY.js"),[]).then(e=>e.wallet);case"network.dgg":return t?a(()=>import("./image-DrraBYJZ.js"),[]).then(e=>e.default):a(()=>import("./index-DnUUaSfF.js"),[]).then(e=>e.wallet);case"io.up":return t?a(()=>import("./image-DbpOM2LD.js"),[]).then(e=>e.default):a(()=>import("./index-BuWGQyCe.js"),[]).then(e=>e.wallet);case"com.lif3":return t?a(()=>import("./image-DC2DOoz2.js"),[]).then(e=>e.default):a(()=>import("./index-BKkJhanY.js"),[]).then(e=>e.wallet);case"io.bimwallet":return t?a(()=>import("./image-BKSQyIc5.js"),[]).then(e=>e.default):a(()=>import("./index-3DerMn1X.js"),[]).then(e=>e.wallet);case"pub.dg":return t?a(()=>import("./image-C4KoLZ1v.js"),[]).then(e=>e.default):a(()=>import("./index-D6d2Y6jv.js"),[]).then(e=>e.wallet);case"com.wemix":return t?a(()=>import("./image-CawBnBIo.js"),[]).then(e=>e.default):a(()=>import("./index-18L0wZ74.js"),[]).then(e=>e.wallet);case"com.pierwallet":return t?a(()=>import("./image-DA8Sg5HZ.js"),[]).then(e=>e.default):a(()=>import("./index-mJTgSazQ.js"),[]).then(e=>e.wallet);case"net.stasis":return t?a(()=>import("./image-CyE6Mi3e.js"),[]).then(e=>e.default):a(()=>import("./index-CJ8I9s4o.js"),[]).then(e=>e.wallet);case"com.peakdefi":return t?a(()=>import("./image-DUcJQ0b3.js"),[]).then(e=>e.default):a(()=>import("./index-DEMIRENu.js"),[]).then(e=>e.wallet);case"com.3swallet":return t?a(()=>import("./image-CD3he1Tj.js"),[]).then(e=>e.default):a(()=>import("./index-DVGcX2HE.js"),[]).then(e=>e.wallet);case"com.example.subdomain":return t?a(()=>import("./image-Cs2bevZt.js"),[]).then(e=>e.default):a(()=>import("./index-CJt068xh.js"),[]).then(e=>e.wallet);case"com.reown.appkit-lab":return t?a(()=>import("./image-CnDG0aor.js"),[]).then(e=>e.default):a(()=>import("./index-BzfyCotn.js"),[]).then(e=>e.wallet);case"com.opz":return t?a(()=>import("./image-D1qvgd7h.js"),[]).then(e=>e.default):a(()=>import("./index-CMGByxdA.js"),[]).then(e=>e.wallet);case"ai.spotonchain.platform":return t?a(()=>import("./image-C6QSWUy4.js"),[]).then(e=>e.default):a(()=>import("./index-Ba7PpD6d.js"),[]).then(e=>e.wallet);case"org.dailychain.wallet":return t?a(()=>import("./image-BJ_lqI1X.js"),[]).then(e=>e.default):a(()=>import("./index-DQa9pNJd.js"),[]).then(e=>e.wallet);case"app.omni":return t?a(()=>import("./image-CqLwuE__.js"),[]).then(e=>e.default):a(()=>import("./index-D_7wDcMK.js"),[]).then(e=>e.wallet);case"id.plumaa":return t?a(()=>import("./image-BvJKCSpY.js"),[]).then(e=>e.default):a(()=>import("./index-D45a0k-1.js"),[]).then(e=>e.wallet);case"io.ttmwallet":return t?a(()=>import("./image-Chg2WzE1.js"),[]).then(e=>e.default):a(()=>import("./index-CLikIjn_.js"),[]).then(e=>e.wallet);case"io.kgen":return t?a(()=>import("./image-DFYGQEwh.js"),[]).then(e=>e.default):a(()=>import("./index-BQWXi0by.js"),[]).then(e=>e.wallet);case"com.nufinetes":return t?a(()=>import("./image-CpFHTO_m.js"),[]).then(e=>e.default):a(()=>import("./index-B8De2hoC.js"),[]).then(e=>e.wallet);case"com.squirrelwallet":return t?a(()=>import("./image-bHJO6btW.js"),[]).then(e=>e.default):a(()=>import("./index-DyaPXLoO.js"),[]).then(e=>e.wallet);case"eu.trusteeglobal":return t?a(()=>import("./image-cDoShVvl.js"),[]).then(e=>e.default):a(()=>import("./index-B51294pb.js"),[]).then(e=>e.wallet);case"com.daffione":return t?a(()=>import("./image-Dtc98pdf.js"),[]).then(e=>e.default):a(()=>import("./index-BIXqJF5y.js"),[]).then(e=>e.wallet);case"com.saakuru.app":return t?a(()=>import("./image-TQLBEOIW.js"),[]).then(e=>e.default):a(()=>import("./index-CjVYDT09.js"),[]).then(e=>e.wallet);case"io.r0ar":return t?a(()=>import("./image-4bx5chOJ.js"),[]).then(e=>e.default):a(()=>import("./index-CfCXSq_b.js"),[]).then(e=>e.wallet);case"com.nodle":return t?a(()=>import("./image-tiHbZ1Vk.js"),[]).then(e=>e.default):a(()=>import("./index-BwL47YsA.js"),[]).then(e=>e.wallet);case"app.tofee":return t?a(()=>import("./image-DpHbdMp9.js"),[]).then(e=>e.default):a(()=>import("./index-Bk-uZV0j.js"),[]).then(e=>e.wallet);case"io.pltwallet":return t?a(()=>import("./image-BIDqxk8w.js"),[]).then(e=>e.default):a(()=>import("./index-eiEAIzdd.js"),[]).then(e=>e.wallet);case"org.talkapp":return t?a(()=>import("./image-BkKo9DtA.js"),[]).then(e=>e.default):a(()=>import("./index-BGGk2Hck.js"),[]).then(e=>e.wallet);case"io.ready":return t?a(()=>import("./image-BwjeUYie.js"),[]).then(e=>e.default):a(()=>import("./index-BQwDdmmS.js"),[]).then(e=>e.wallet);case"app.w3wallet":return t?a(()=>import("./image-Covp72ND.js"),[]).then(e=>e.default):a(()=>import("./index-Cb41eDDJ.js"),[]).then(e=>e.wallet);case"pro.ds.app":return t?a(()=>import("./image-Bktw-NJ-.js"),[]).then(e=>e.default):a(()=>import("./index-b5ABnFKj.js"),[]).then(e=>e.wallet);case"com.reown.docs":return t?a(()=>import("./image-V4qYiUxw.js"),[]).then(e=>e.default):a(()=>import("./index-DsgD7D-8.js"),[]).then(e=>e.wallet);case"com.apollox":return t?a(()=>import("./image-ss2LFlQu.js"),[]).then(e=>e.default):a(()=>import("./index-BLMjeGJ-.js"),[]).then(e=>e.wallet);case"com.ipmb":return t?a(()=>import("./image-CirJIT7l.js"),[]).then(e=>e.default):a(()=>import("./index-DP0utIbV.js"),[]).then(e=>e.wallet);case"com.payperless":return t?a(()=>import("./image-q4XfUN6v.js"),[]).then(e=>e.default):a(()=>import("./index-szNElS1a.js"),[]).then(e=>e.wallet);case"com.obliowallet":return t?a(()=>import("./image-BGxqJH7c.js"),[]).then(e=>e.default):a(()=>import("./index-JuvDLDuk.js"),[]).then(e=>e.wallet);case"app.keeper-wallet":return t?a(()=>import("./image-Dpgf4dcg.js"),[]).then(e=>e.default):a(()=>import("./index-DlfGjmz4.js"),[]).then(e=>e.wallet);case"io.paraswap":return t?a(()=>import("./image-CQKjvlto.js"),[]).then(e=>e.default):a(()=>import("./index-DjLE3t9q.js"),[]).then(e=>e.wallet);case"org.ecoinwallet":return t?a(()=>import("./image-C3Va51zP.js"),[]).then(e=>e.default):a(()=>import("./index-DFZNHq44.js"),[]).then(e=>e.wallet);case"fi.dropmate":return t?a(()=>import("./image-5xiz28Wo.js"),[]).then(e=>e.default):a(()=>import("./index-p0ATWoVh.js"),[]).then(e=>e.wallet);case"com.cryptokara":return t?a(()=>import("./image-Dqbrewdt.js"),[]).then(e=>e.default):a(()=>import("./index-Cfzzcvgo.js"),[]).then(e=>e.wallet);case"co.cyber.wallet":return t?a(()=>import("./image-BvkSxpXq.js"),[]).then(e=>e.default):a(()=>import("./index-e_qeQmc1.js"),[]).then(e=>e.wallet);case"com.kriptonio":return t?a(()=>import("./image-D_cIj1db.js"),[]).then(e=>e.default):a(()=>import("./index-Dxm6Y7eO.js"),[]).then(e=>e.wallet);case"digital.minerva":return t?a(()=>import("./image-D5wxf47e.js"),[]).then(e=>e.default):a(()=>import("./index-HnCuhDYJ.js"),[]).then(e=>e.wallet);case"com.mpcvault.broswerplugin":return t?a(()=>import("./image-BN4ovMrn.js"),[]).then(e=>e.default):a(()=>import("./index-BXY5tnuK.js"),[]).then(e=>e.wallet);case"com.liberawallet":return t?a(()=>import("./image-DyrMImIL.js"),[]).then(e=>e.default):a(()=>import("./index-Dqyfi4dm.js"),[]).then(e=>e.wallet);case"io.helixid":return t?a(()=>import("./image-Dkp4M1ik.js"),[]).then(e=>e.default):a(()=>import("./index-RJhc6LnM.js"),[]).then(e=>e.wallet);case"com.broearn":return t?a(()=>import("./image-JyGUnQ_N.js"),[]).then(e=>e.default):a(()=>import("./index-WsH2ZGfO.js"),[]).then(e=>e.wallet);case"io.altme":return t?a(()=>import("./image-MQbcgW7z.js"),[]).then(e=>e.default):a(()=>import("./index-CpMkh5pZ.js"),[]).then(e=>e.wallet);case"app.herewallet":return t?a(()=>import("./image-gnC_p3Da.js"),[]).then(e=>e.default):a(()=>import("./index-CecEswCv.js"),[]).then(e=>e.wallet);case"com.coinsdo":return t?a(()=>import("./image-DrHhCSDD.js"),[]).then(e=>e.default):a(()=>import("./index-DJYG2Vtc.js"),[]).then(e=>e.wallet);case"trade.flooz.wallet":return t?a(()=>import("./image-DaaIjpQJ.js"),[]).then(e=>e.default):a(()=>import("./index-C6EDKfcJ.js"),[]).then(e=>e.wallet);case"com.tapwallet":return t?a(()=>import("./image-BxeDPEwg.js"),[]).then(e=>e.default):a(()=>import("./index-BwCUvEoQ.js"),[]).then(e=>e.wallet);case"fun.tobi":return t?a(()=>import("./image-DmhgJWq-.js"),[]).then(e=>e.default):a(()=>import("./index-C1adBKyv.js"),[]).then(e=>e.wallet);case"com.bitnovo":return t?a(()=>import("./image-BTZyVpoA.js"),[]).then(e=>e.default):a(()=>import("./index-CaZIFXyW.js"),[]).then(e=>e.wallet);case"io.xucre":return t?a(()=>import("./image-DZ-B-aVa.js"),[]).then(e=>e.default):a(()=>import("./index-BBDAdmKp.js"),[]).then(e=>e.wallet);case"app.girin":return t?a(()=>import("./image-CkQb0YUH.js"),[]).then(e=>e.default):a(()=>import("./index-CpJZxSfI.js"),[]).then(e=>e.wallet);case"finance.panaroma":return t?a(()=>import("./image-Z9k3mhsb.js"),[]).then(e=>e.default):a(()=>import("./index-BIeLm-x3.js"),[]).then(e=>e.wallet);case"app.clot":return t?a(()=>import("./image-DZplWZyD.js"),[]).then(e=>e.default):a(()=>import("./index-BVQeUBdj.js"),[]).then(e=>e.wallet);case"io.transi":return t?a(()=>import("./image-Dc5zhKf6.js"),[]).then(e=>e.default):a(()=>import("./index-DDggnqr4.js"),[]).then(e=>e.wallet);case"world.qoin":return t?a(()=>import("./image-BPAkEl8k.js"),[]).then(e=>e.default):a(()=>import("./index-C9taR4Do.js"),[]).then(e=>e.wallet);case"com.greengloryglobal":return t?a(()=>import("./image-lOdcUtWG.js"),[]).then(e=>e.default):a(()=>import("./index-C-OT0KJG.js"),[]).then(e=>e.wallet);case"com.amazewallet":return t?a(()=>import("./image-2wmDBIB6.js"),[]).then(e=>e.default):a(()=>import("./index-DvXpQOkv.js"),[]).then(e=>e.wallet);case"zone.bitverse":return t?a(()=>import("./image-C6aZzydG.js"),[]).then(e=>e.default):a(()=>import("./index-CN6XdMAo.js"),[]).then(e=>e.wallet);case"social.gm2":return t?a(()=>import("./image-BqtrMo-7.js"),[]).then(e=>e.default):a(()=>import("./index-Coq7--sH.js"),[]).then(e=>e.wallet);case"io.ozonewallet":return t?a(()=>import("./image-BtnrRGhZ.js"),[]).then(e=>e.default):a(()=>import("./index-DFc7lZHb.js"),[]).then(e=>e.wallet);case"io.ukiss":return t?a(()=>import("./image-DFYwzuHA.js"),[]).then(e=>e.default):a(()=>import("./index-CE9n_StB.js"),[]).then(e=>e.wallet);case"finance.islamicoin":return t?a(()=>import("./image-CWG4tRzZ.js"),[]).then(e=>e.default):a(()=>import("./index-pcLdliEp.js"),[]).then(e=>e.wallet);case"io.copiosa":return t?a(()=>import("./image-DuQoo_kR.js"),[]).then(e=>e.default):a(()=>import("./index-CWmGdvBR.js"),[]).then(e=>e.wallet);case"world.fncy":return t?a(()=>import("./image-B5M2ftPa.js"),[]).then(e=>e.default):a(()=>import("./index-Ba45jQBJ.js"),[]).then(e=>e.wallet);case"io.moonstake":return t?a(()=>import("./image-zsArRLIF.js"),[]).then(e=>e.default):a(()=>import("./index-C7HuhgLE.js"),[]).then(e=>e.wallet);case"com.trusteeglobal":return t?a(()=>import("./image-iR_slvRo.js"),[]).then(e=>e.default):a(()=>import("./index-CNLH4wrU.js"),[]).then(e=>e.wallet);case"net.spatium":return t?a(()=>import("./image-DBFrM6tr.js"),[]).then(e=>e.default):a(()=>import("./index-BJBC3bLU.js"),[]).then(e=>e.wallet);case"co.filwallet":return t?a(()=>import("./image-Do8rO3zE.js"),[]).then(e=>e.default):a(()=>import("./index-D7FslwZl.js"),[]).then(e=>e.wallet);case"money.snowball":return t?a(()=>import("./image-3Q7PfsJG.js"),[]).then(e=>e.default):a(()=>import("./index-yOwMLl2f.js"),[]).then(e=>e.wallet);case"com.ennowallet":return t?a(()=>import("./image-Ccx8wDSE.js"),[]).then(e=>e.default):a(()=>import("./index-BRIQuVzg.js"),[]).then(e=>e.wallet);case"io.safematrix":return t?a(()=>import("./image-BX4sAPzh.js"),[]).then(e=>e.default):a(()=>import("./index-Yk_iQY25.js"),[]).then(e=>e.wallet);case"pro.assure":return t?a(()=>import("./image-DMTT8AeN.js"),[]).then(e=>e.default):a(()=>import("./index-BfYVYwh5.js"),[]).then(e=>e.wallet);case"com.neftipedia":return t?a(()=>import("./image-vrSaD0K9.js"),[]).then(e=>e.default):a(()=>import("./index-BHZDuU0I.js"),[]).then(e=>e.wallet);case"io.goldbit":return t?a(()=>import("./image-CtiFcEL8.js"),[]).then(e=>e.default):a(()=>import("./index-DFrKYv4g.js"),[]).then(e=>e.wallet);case"com.coingrig":return t?a(()=>import("./image-NsVKBwxZ.js"),[]).then(e=>e.default):a(()=>import("./index-DcyXtFTG.js"),[]).then(e=>e.wallet);case"io.xfun":return t?a(()=>import("./image-CPMDxql6.js"),[]).then(e=>e.default):a(()=>import("./index-B05algAv.js"),[]).then(e=>e.wallet);case"com.antiersolutions":return t?a(()=>import("./image-BMh4HSr7.js"),[]).then(e=>e.default):a(()=>import("./index-DufOfQ90.js"),[]).then(e=>e.wallet);case"com.itoken":return t?a(()=>import("./image-BwBO8BTi.js"),[]).then(e=>e.default):a(()=>import("./index-BftqI1FU.js"),[]).then(e=>e.wallet);case"com.cardstack":return t?a(()=>import("./image-D7Sd6W8U.js"),[]).then(e=>e.default):a(()=>import("./index-BiHhxeDt.js"),[]).then(e=>e.wallet);case"io.slavi":return t?a(()=>import("./image-BQUnnXTb.js"),[]).then(e=>e.default):a(()=>import("./index-Kt6GlPCW.js"),[]).then(e=>e.wallet);case"tech.defiantapp":return t?a(()=>import("./image-D4-YMi52.js"),[]).then(e=>e.default):a(()=>import("./index-DPic1oJg.js"),[]).then(e=>e.wallet);case"com.dexari":return t?a(()=>import("./image-BoANtDMS.js"),[]).then(e=>e.default):a(()=>import("./index-DPFoWmV6.js"),[]).then(e=>e.wallet);case"io.cfcx":return t?a(()=>import("./image-139plIjh.js"),[]).then(e=>e.default):a(()=>import("./index-Cws1zSAX.js"),[]).then(e=>e.wallet);case"com.socjsc":return t?a(()=>import("./image-Crp2YP47.js"),[]).then(e=>e.default):a(()=>import("./index-C_XOoDbk.js"),[]).then(e=>e.wallet);case"com.tokenb":return t?a(()=>import("./image-8LnJ1bNt.js"),[]).then(e=>e.default):a(()=>import("./index-DcwbqEHj.js"),[]).then(e=>e.wallet);case"org.onyx":return t?a(()=>import("./image-DKcWaLtu.js"),[]).then(e=>e.default):a(()=>import("./index-C5NL4PoV.js"),[]).then(e=>e.wallet);case"io.gk8":return t?a(()=>import("./image-ZwibGfzR.js"),[]).then(e=>e.default):a(()=>import("./index-CLxj2t1J.js"),[]).then(e=>e.wallet);case"com.anchorage":return t?a(()=>import("./image-OT0Fb2Nb.js"),[]).then(e=>e.default):a(()=>import("./index-aoLVKFG1.js"),[]).then(e=>e.wallet);case"com.hashport.wallet":return t?a(()=>import("./image-DooF_Vfs.js"),[]).then(e=>e.default):a(()=>import("./index-DICTy0sa.js"),[]).then(e=>e.wallet);case"io.billionwallet":return t?a(()=>import("./image-DDBzbPSl.js"),[]).then(e=>e.default):a(()=>import("./index-CmCRou09.js"),[]).then(e=>e.wallet);case"com.dlicom":return t?a(()=>import("./image-lXBTHYnD.js"),[]).then(e=>e.default):a(()=>import("./index-l8DhIVZW.js"),[]).then(e=>e.wallet);case"com.tychiwallet":return t?a(()=>import("./image-pcyfaNhf.js"),[]).then(e=>e.default):a(()=>import("./index-B3vR_dtk.js"),[]).then(e=>e.wallet);case"at.swe":return t?a(()=>import("./image-C8_9fy1e.js"),[]).then(e=>e.default):a(()=>import("./index-ficai7Ce.js"),[]).then(e=>e.wallet);case"network.wali":return t?a(()=>import("./image-CSyxcTwp.js"),[]).then(e=>e.default):a(()=>import("./index-Dzkop1Gk.js"),[]).then(e=>e.wallet);case"io.diamante":return t?a(()=>import("./image-Dh9w9A8z.js"),[]).then(e=>e.default):a(()=>import("./index-C1a5oPtZ.js"),[]).then(e=>e.wallet);case"ai.interlinklabs":return t?a(()=>import("./image-Dz82Zyfj.js"),[]).then(e=>e.default):a(()=>import("./index-BTqXeJHf.js"),[]).then(e=>e.wallet);case"com.walllet":return t?a(()=>import("./image-VFWT6oS6.js"),[]).then(e=>e.default):a(()=>import("./index-DPgWRg9-.js"),[]).then(e=>e.wallet);case"org.lunascape":return t?a(()=>import("./image-D4nkyGrg.js"),[]).then(e=>e.default):a(()=>import("./index-4Nmn8ium.js"),[]).then(e=>e.wallet);case"com.nvxowallet":return t?a(()=>import("./image-BoS2kgXC.js"),[]).then(e=>e.default):a(()=>import("./index-CRRdY0XA.js"),[]).then(e=>e.wallet);case"today.paywithcrypto.wallet":return t?a(()=>import("./image-CsUCYFyx.js"),[]).then(e=>e.default):a(()=>import("./index-CFUSXkKo.js"),[]).then(e=>e.wallet);case"ai.iluminary":return t?a(()=>import("./image-CEuSmI3b.js"),[]).then(e=>e.default):a(()=>import("./index-D1j-SvoJ.js"),[]).then(e=>e.wallet);case"io.reactwallet":return t?a(()=>import("./image-B3lDLhwe.js"),[]).then(e=>e.default):a(()=>import("./index-CTs1t6rA.js"),[]).then(e=>e.wallet);case"com.rewardywallet":return t?a(()=>import("./image-DVyDRAAO.js"),[]).then(e=>e.default):a(()=>import("./index-cF_6KJvb.js"),[]).then(e=>e.wallet);case"io.walletv":return t?a(()=>import("./image-CTBdimeM.js"),[]).then(e=>e.default):a(()=>import("./index-He5kaR9n.js"),[]).then(e=>e.wallet);case"app.outlawgames":return t?a(()=>import("./image-BPqXYngz.js"),[]).then(e=>e.default):a(()=>import("./index-D2hPph8l.js"),[]).then(e=>e.wallet);case"io.ironwallet":return t?a(()=>import("./image-BKNtkg6s.js"),[]).then(e=>e.default):a(()=>import("./index-B1-qcL-p.js"),[]).then(e=>e.wallet);case"com.mecowallet":return t?a(()=>import("./image-m7IlStdm.js"),[]).then(e=>e.default):a(()=>import("./index-BdgyG9Qa.js"),[]).then(e=>e.wallet);case"com.onlybulls":return t?a(()=>import("./image-qLUwfjzV.js"),[]).then(e=>e.default):a(()=>import("./index-DPPIbXj8.js"),[]).then(e=>e.wallet);case"me.qiewallet":return t?a(()=>import("./image-BHJFFIIN.js"),[]).then(e=>e.default):a(()=>import("./index-D6zAueb_.js"),[]).then(e=>e.wallet);case"fund.lflabs":return t?a(()=>import("./image-dO78_uyn.js"),[]).then(e=>e.default):a(()=>import("./index-BBkeSt5m.js"),[]).then(e=>e.wallet);case"io.walletverse":return t?a(()=>import("./image-DUk3AUBd.js"),[]).then(e=>e.default):a(()=>import("./index-CfO_m3oL.js"),[]).then(e=>e.wallet);case"com.berasig":return t?a(()=>import("./image-CisWvLpc.js"),[]).then(e=>e.default):a(()=>import("./index-Cg1E5HxJ.js"),[]).then(e=>e.wallet);case"app.phantom":return t?a(()=>import("./image-6levnvAC.js"),[]).then(e=>e.default):a(()=>import("./index-IBUgXgOa.js"),[]).then(e=>e.wallet);case"com.coinbase.wallet":return t?a(()=>import("./image-C6EsuPXB.js"),[]).then(e=>e.default):a(()=>import("./index-BILUwmJ9.js"),[]).then(e=>e.wallet);case"io.rabby":return t?a(()=>import("./image-CZ2qSHpt.js"),[]).then(e=>e.default):a(()=>import("./index-Bprjmfje.js"),[]).then(e=>e.wallet);case"com.brave.wallet":return t?a(()=>import("./image-9Jtg22X3.js"),[]).then(e=>e.default):a(()=>import("./index-DKbx-y78.js"),[]).then(e=>e.wallet);case"fi.nu":return t?a(()=>import("./image-BAl5qyeX.js"),[]).then(e=>e.default):a(()=>import("./index-BXi61TZ5.js"),[]).then(e=>e.wallet);case"pro.hinkal.walletconnect":return t?a(()=>import("./image-d8n8A6si.js"),[]).then(e=>e.default):a(()=>import("./index-CujrNB-Q.js"),[]).then(e=>e.wallet);case"com.moongate.one":return t?a(()=>import("./image-DZc2BYzk.js"),[]).then(e=>e.default):a(()=>import("./index-B2WV7sR7.js"),[]).then(e=>e.wallet);case"tech.levain":return t?a(()=>import("./image-DcIu3U38.js"),[]).then(e=>e.default):a(()=>import("./index-CEpc_g8h.js"),[]).then(e=>e.wallet);case"com.enkrypt":return t?a(()=>import("./image-DvpdMMzF.js"),[]).then(e=>e.default):a(()=>import("./index-Cc4uopde.js"),[]).then(e=>e.wallet);case"com.scramble":return t?a(()=>import("./image-DT5Fvf2s.js"),[]).then(e=>e.default):a(()=>import("./index-D4Sgj1mL.js"),[]).then(e=>e.wallet);case"io.finoa":return t?a(()=>import("./image-D_i0o0Nv.js"),[]).then(e=>e.default):a(()=>import("./index-DFghxfjK.js"),[]).then(e=>e.wallet);case"com.blazpay.wallet":return t?a(()=>import("./image-CgHABHdL.js"),[]).then(e=>e.default):a(()=>import("./index-B_OXuBhF.js"),[]).then(e=>e.wallet);case"io.getjoin.prd":return t?a(()=>import("./image-CmWdSXJI.js"),[]).then(e=>e.default):a(()=>import("./index-QvBzJwgv.js"),[]).then(e=>e.wallet);case"xyz.talisman":return t?a(()=>import("./image-VlTaWJmy.js"),[]).then(e=>e.default):a(()=>import("./index-BgbYZOnC.js"),[]).then(e=>e.wallet);case"eu.flashsoft.clear-wallet":return t?a(()=>import("./image-gxCVLutB.js"),[]).then(e=>e.default):a(()=>import("./index-BBiL2lyk.js"),[]).then(e=>e.wallet);case"app.berasig":return t?a(()=>import("./image-BjTMD2k8.js"),[]).then(e=>e.default):a(()=>import("./index-DkcP2fCc.js"),[]).then(e=>e.wallet);case"com.wallet.reown":return t?a(()=>import("./image-CC2_AL18.js"),[]).then(e=>e.default):a(()=>import("./index-BEx6ckei.js"),[]).then(e=>e.wallet);case"io.runonflux.sspwallet":return t?a(()=>import("./image-DfzpWAED.js"),[]).then(e=>e.default):a(()=>import("./index-CrUcAJK0.js"),[]).then(e=>e.wallet);case"com.blanqlabs.wallet":return t?a(()=>import("./image-wR942Jk6.js"),[]).then(e=>e.default):a(()=>import("./index-DBst6Hla.js"),[]).then(e=>e.wallet);case"io.hero.wallet":return t?a(()=>import("./image-BbH7e9pw.js"),[]).then(e=>e.default):a(()=>import("./index-BBANTdk4.js"),[]).then(e=>e.wallet);case"network.verified.custody":return t?a(()=>import("./image-DpjDzWCs.js"),[]).then(e=>e.default):a(()=>import("./index-CyhgnW_d.js"),[]).then(e=>e.wallet);case"console.utila.io":return t?a(()=>import("./image-C7tHBnQp.js"),[]).then(e=>e.default):a(()=>import("./index-BrOCsLbf.js"),[]).then(e=>e.wallet);case"com.micet.wallet":return t?a(()=>import("./image-On2ij4Ix.js"),[]).then(e=>e.default):a(()=>import("./index-JAAqCLcG.js"),[]).then(e=>e.wallet);case"world.dolphinode.chain":return t?a(()=>import("./image-BXzPnbc4.js"),[]).then(e=>e.default):a(()=>import("./index-CiwBOkla.js"),[]).then(e=>e.wallet);case"com.lootrush":return t?a(()=>import("./image-t4jvKgpV.js"),[]).then(e=>e.default):a(()=>import("./index-BLsnOBhg.js"),[]).then(e=>e.wallet);case"xyz.dawnwallet":return t?a(()=>import("./image-bpacFMFT.js"),[]).then(e=>e.default):a(()=>import("./index-BqK7Phb6.js"),[]).then(e=>e.wallet);case"xyz.abs":return t?a(()=>import("./image-DFo7XMVJ.js"),[]).then(e=>e.default):a(()=>import("./index-8Ff6vDUD.js"),[]).then(e=>e.wallet);case"sh.frame":return t?a(()=>import("./image-C1w2WpL5.js"),[]).then(e=>e.default):a(()=>import("./index-cAvSYrmF.js"),[]).then(e=>e.wallet);case"io.useglyph":return t?a(()=>import("./image-C46yxCl4.js"),[]).then(e=>e.default):a(()=>import("./index-DE_8irSD.js"),[]).then(e=>e.wallet);case"org.base.account":return t?a(()=>import("./image-Ds78yECl.js"),[]).then(e=>e.default):a(()=>import("./index-kNZGxYSe.js"),[]).then(e=>e.wallet);default:throw new Error(`Wallet with id ${n} not found`)}}function fh(){const n=new Map;return{emit(t,e){const r=n.get(t);if(r)for(const i of r)i(e)},subscribe(t,e){var r;return n.has(t)?(r=n.get(t))==null||r.add(e):n.set(t,new Set([e])),()=>{const i=n.get(t);i&&i.delete(e)}}}}function ln(){return fh()}function mh(n){const{createOptions:t}=n,e=ln();let r,i;function s(){r=void 0,i=void 0}let o=async()=>{},c=async u=>{i=u};const l=e.subscribe("chainChanged",u=>{i=u}),d=e.subscribe("disconnect",()=>{s(),l(),d()});return e.subscribe("accountChanged",u=>{r=u}),{autoConnect:async u=>{const{autoConnectBaseAccountSDK:h}=await a(async()=>{const{autoConnectBaseAccountSDK:E}=await Promise.resolve().then(()=>vo);return{autoConnectBaseAccountSDK:E}},void 0),_=await n.providerFactory(),[p,f,m,y]=await h(u,e,_);return r=p,i=f,o=m,c=y,qe({chainId:i.id,client:u.client,walletAddress:r.address,walletType:At}),r},connect:async u=>{const{connectBaseAccountSDK:h}=await a(async()=>{const{connectBaseAccountSDK:E}=await Promise.resolve().then(()=>vo);return{connectBaseAccountSDK:E}},void 0),_=await n.providerFactory(),[p,f,m,y]=await h(u,e,_);return r=p,i=f,o=m,c=y,qe({chainId:i.id,client:u.client,walletAddress:r.address,walletType:At}),r},disconnect:async()=>{s(),await o()},getAccount:()=>r,getChain(){if(i)return i=an(i.id)||i,i},getConfig:()=>t,id:At,subscribe:e.subscribe,switchChain:async u=>{await c(u)}}}function Mr(){if(!Vc())return{description:"thirdweb powered dApp",logoUrl:"https://thirdweb.com/favicon.ico",name:"thirdweb powered dApp",url:"https://thirdweb.com"};const{protocol:n,hostname:t,port:e}=window.location;let r=`${n}//${t}`;e&&e!=="80"&&e!=="443"&&(r+=`:${e}`);const i=`${r}/favicon.ico`;return{description:window.document.title||"thirdweb powered dApp",logoUrl:i,name:window.document.title||"thirdweb powered dApp",url:r}}let pi,vr;async function kc(n){var s,o,c,l,d,u,h;if(pi){if(n&&vr){const _=((s=vr.chains)==null?void 0:s.map(y=>y.id))||[],p=((o=n.chains)==null?void 0:o.map(y=>y.id))||[],f=_.length===p.length&&_.every((y,E)=>y===p[E]),m=((c=n.appMetadata)==null?void 0:c.name)===((l=vr.appMetadata)==null?void 0:l.name);(!f||!m)&&console.warn("[Base Account SDK] Provider already initialized with different options. The Base Account SDK uses a singleton provider - subsequent configurations are ignored. Create only one Base Account wallet instance per application.")}return pi}const{createBaseAccountSDK:t}=await a(async()=>{const{createBaseAccountSDK:_}=await import("./index-CR8uPp6r.js");return{createBaseAccountSDK:_}},__vite__mapDeps([9,10,3,4,11,1,2,12,13,14,15,6,7,16,17])),e=Mr(),i=t({appName:((d=n==null?void 0:n.appMetadata)==null?void 0:d.name)||e.name||"thirdweb powered dApp",appLogoUrl:((u=n==null?void 0:n.appMetadata)==null?void 0:u.logoUrl)||e.logoUrl||null,appChainIds:((h=n==null?void 0:n.chains)==null?void 0:h.map(_=>_.id))||[]}).getProvider();return pi=i,vr=n,i}function Nc(n){return n.id===At}function Eo({provider:n,address:t,client:e}){const r={address:Z(t),async sendTransaction(i){const s=await n.request({method:"eth_sendTransaction",params:[{accessList:i.accessList,data:i.data,from:Z(t),gas:i.gas?Le(i.gas):void 0,to:i.to,value:i.value?Le(i.value):void 0}]});return Os({chainId:i.chainId,client:e,contractAddress:i.to??void 0,gasPrice:i.gasPrice,transactionHash:s,walletAddress:Z(t),walletType:At}),{transactionHash:s}},async signMessage({message:i}){if(!r.address)throw new Error("Provider not setup");const s=typeof i=="string"?Ps(i):i.raw instanceof Uint8Array?Zr(i.raw):i.raw,o=await n.request({method:"personal_sign",params:[s,r.address]});if(!nr(o))throw new Error("Invalid signature returned");return o},async signTypedData(i){if(!r.address)throw new Error("Provider not setup");const{domain:s,message:o,primaryType:c}=Cs(i),l={EIP712Domain:yc(s),...i.types};wc({domain:s,message:o,primaryType:c,types:l});const d=gc({domain:s??{},message:o,primaryType:c,types:l}),u=await n.request({method:"eth_signTypedData_v4",params:[r.address,d]});if(!nr(u))throw new Error("Invalid signed payload returned");return u},sendCalls:async i=>{try{const{callParams:s,chain:o}=await Ns(i,r),c=await n.request({method:"wallet_sendCalls",params:s});return c&&typeof c=="object"&&"id"in c?{chain:o,client:e,id:c.id}:{chain:o,client:e,id:c}}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${At} errored calling wallet_sendCalls, with error: ${s instanceof Error?s.message:ye(s)}`):s}},async getCallsStatus(i){try{const s=await n.request({method:"wallet_getCallsStatus",params:[i.id]});return $s(s)}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${At} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCapabilities(i){const s=i.chainId;try{const o=await n.request({method:"wallet_getCapabilities",params:[Z(r.address)]});return ks(o,s)}catch(o){if(/unsupport|not support|not available/i.test(o.message))return{message:`${At} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw o}}};return r}function Uc(n,t,e,r,i){const s=Eo({address:n,client:i,provider:e});async function o(){e.off("accountsChanged",l),e.off("chainChanged",d),e.off("disconnect",c),await e.disconnect()}async function c(){o(),r.emit("disconnect",void 0)}function l(u){if(u[0]){const h=Eo({address:Z(u[0]),client:i,provider:e});r.emit("accountChanged",h),r.emit("accountsChanged",u)}else c()}function d(u){const h=we(ot(u));r.emit("chainChanged",h)}return e.on("accountsChanged",l),e.on("chainChanged",d),e.on("disconnect",c),[s,t,c,u=>qc(e,u)]}async function yh(n,t,e){const r=await e.request({method:"eth_requestAccounts"});if(!r[0])throw new Error("No accounts found");const i=Z(r[0]),s=await e.request({method:"eth_chainId"}),o=ot(s);let c=n.chain&&n.chain.id===o?n.chain:we(o);return o&&(n!=null&&n.chain)&&o!==(n==null?void 0:n.chain.id)&&(await qc(e,n.chain),c=n.chain),Uc(i,c,e,t,n.client)}async function wh(n,t,e){const i=(await e.request({method:"eth_accounts"}))[0];if(!i)throw new Error("No accounts found");const s=await e.request({method:"eth_chainId"}),o=ot(s),c=n.chain&&n.chain.id===o?n.chain:we(o);return Uc(i,c,e,t,n.client)}async function qc(n,t){var s;const e=await n.request({method:"eth_chainId"}),r=we(ot(e));if((r==null?void 0:r.id)===t.id)return;const i=Le(t.id);try{await n.request({method:"wallet_switchEthereumChain",params:[{chainId:i}]})}catch(o){const c=await Vs(t);(o==null?void 0:o.code)===4902&&await n.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:((s=c.explorers)==null?void 0:s.map(l=>l.url))||[],chainId:i,chainName:c.name,nativeCurrency:c.nativeCurrency,rpcUrls:Us(c)}]})}}const vo=Object.freeze(Object.defineProperty({__proto__:null,autoConnectBaseAccountSDK:wh,connectBaseAccountSDK:yh,getBaseAccountWebProvider:kc,isBaseAccountSDKWallet:Nc},Symbol.toStringTag,{value:"Module"}));function gh(n){const{createOptions:t}=n,e=ln();let r,i;function s(){r=void 0,i=void 0}let o=async()=>{},c=async u=>{i=u};const l=e.subscribe("chainChanged",u=>{i=u}),d=e.subscribe("disconnect",()=>{s(),l(),d()});return e.subscribe("accountChanged",u=>{r=u}),{autoConnect:async u=>{const{autoConnectCoinbaseWalletSDK:h}=await a(async()=>{const{autoConnectCoinbaseWalletSDK:E}=await Promise.resolve().then(()=>Io);return{autoConnectCoinbaseWalletSDK:E}},void 0),_=await n.providerFactory(),[p,f,m,y]=await h(u,e,_);return r=p,i=f,o=m,c=y,qe({chainId:i.id,client:u.client,walletAddress:r.address,walletType:ht}),r},connect:async u=>{const{connectCoinbaseWalletSDK:h}=await a(async()=>{const{connectCoinbaseWalletSDK:E}=await Promise.resolve().then(()=>Io);return{connectCoinbaseWalletSDK:E}},void 0),_=await n.providerFactory(),[p,f,m,y]=await h(u,e,_);return r=p,i=f,o=m,c=y,qe({chainId:i.id,client:u.client,walletAddress:r.address,walletType:ht}),r},disconnect:async()=>{s(),await o()},getAccount:()=>r,getChain(){if(i)return i=an(i.id)||i,i},getConfig:()=>t,id:ht,onConnectRequested:async()=>{var u;if(n.onConnectRequested){const h=await n.providerFactory();return(u=n.onConnectRequested)==null?void 0:u.call(n,h)}},subscribe:e.subscribe,switchChain:async u=>{await c(u)}}}async function Mc(n){var t,e;await((e=(t=n==null?void 0:n.communicator)==null?void 0:t.waitForPopupLoaded)==null?void 0:e.call(t))}const Eh=Object.freeze(Object.defineProperty({__proto__:null,showCoinbasePopup:Mc},Symbol.toStringTag,{value:"Module"}));let fi;async function Bc(n){var t,e;if(!fi){let r=(await a(()=>import("./index-DO1z5D8-.js"),__vite__mapDeps([18,3,4,1,2,10,11]))).default;typeof r!="function"&&typeof r.default=="function"&&(r=r.default);const s=new r({appChainIds:n!=null&&n.chains?n.chains.map(o=>o.id):void 0,appLogoUrl:((t=n==null?void 0:n.appMetadata)==null?void 0:t.logoUrl)||Mr().logoUrl,appName:((e=n==null?void 0:n.appMetadata)==null?void 0:e.name)||Mr().name}).makeWeb3Provider(n==null?void 0:n.walletConfig);return fi=s,s}return fi}function bo({provider:n,address:t,client:e}){const r={address:Z(t),onTransactionRequested:async()=>{window.localStorage&&window.localStorage.getItem("-CBWSDK:SignerConfigurator:SignerType")==="scw"&&await Mc(n)},async sendTransaction(i){const s=await n.request({method:"eth_sendTransaction",params:[{accessList:i.accessList,data:i.data,from:Z(t),gas:i.gas?Le(i.gas):void 0,to:i.to,value:i.value?Le(i.value):void 0}]});return Os({chainId:i.chainId,client:e,contractAddress:i.to??void 0,gasPrice:i.gasPrice,transactionHash:s,walletAddress:Z(t),walletType:ht}),{transactionHash:s}},async signMessage({message:i}){if(!r.address)throw new Error("Provider not setup");const s=typeof i=="string"?Ps(i):i.raw instanceof Uint8Array?Zr(i.raw):i.raw,o=await n.request({method:"personal_sign",params:[s,r.address]});if(!nr(o))throw new Error("Invalid signature returned");return o},async signTypedData(i){if(!r.address)throw new Error("Provider not setup");const{domain:s,message:o,primaryType:c}=Cs(i),l={EIP712Domain:yc(s),...i.types};wc({domain:s,message:o,primaryType:c,types:l});const d=gc({domain:s??{},message:o,primaryType:c,types:l}),u=await n.request({method:"eth_signTypedData_v4",params:[r.address,d]});if(!nr(u))throw new Error("Invalid signed payload returned");return u},sendCalls:async i=>{try{const{callParams:s,chain:o}=await Ns(i,r),c=await n.request({method:"wallet_sendCalls",params:s});return c&&typeof c=="object"&&"id"in c?{chain:o,client:e,id:c.id}:{chain:o,client:e,id:c}}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${ht} errored calling wallet_sendCalls, with error: ${s instanceof Error?s.message:ye(s)}`):s}},async getCallsStatus(i){try{const s=await n.request({method:"wallet_getCallsStatus",params:[i.id]});return $s(s)}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${ht} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCallsStatusRaw(i){try{return await n.request({method:"wallet_getCallsStatus",params:[i.id]})}catch(s){throw/unsupport|not support/i.test(s.message)?new Error(`${ht} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):s}},async getCapabilities(i){const s=i.chainId;try{const o=await n.request({method:"wallet_getCapabilities",params:[Z(r.address)]});return ks(o,s)}catch(o){if(/unsupport|not support|not available/i.test(o.message))return{message:`${ht} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw o}}};return r}function jc(n,t,e,r,i){const s=bo({address:n,client:i,provider:e});async function o(){e.removeListener("accountsChanged",l),e.removeListener("chainChanged",d),e.removeListener("disconnect",c),await e.disconnect()}async function c(){o(),r.emit("disconnect",void 0)}function l(u){if(u[0]){const h=bo({address:Z(u[0]),client:i,provider:e});r.emit("accountChanged",h),r.emit("accountsChanged",u)}else c()}function d(u){const h=we(ot(u));r.emit("chainChanged",h)}return e.on("accountsChanged",l),e.on("chainChanged",d),e.on("disconnect",c),[s,t,c,u=>zc(e,u)]}async function vh(n,t,e){const r=await e.request({method:"eth_requestAccounts"});if(!r[0])throw new Error("No accounts found");const i=Z(r[0]),s=await e.request({method:"eth_chainId"}),o=ot(s);let c=n.chain&&n.chain.id===o?n.chain:we(o);return o&&(n!=null&&n.chain)&&o!==(n==null?void 0:n.chain.id)&&(await zc(e,n.chain),c=n.chain),jc(i,c,e,t,n.client)}async function bh(n,t,e){const i=(await e.request({method:"eth_accounts"}))[0];if(!i)throw new Error("No accounts found");const s=await e.request({method:"eth_chainId"}),o=ot(s),c=n.chain&&n.chain.id===o?n.chain:we(o);return jc(i,c,e,t,n.client)}async function zc(n,t){var s;const e=await n.request({method:"eth_chainId"}),r=we(ot(e));if((r==null?void 0:r.id)===t.id)return;const i=Le(t.id);try{await n.request({method:"wallet_switchEthereumChain",params:[{chainId:i}]})}catch(o){const c=await Vs(t);(o==null?void 0:o.code)===4902&&await n.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:((s=c.explorers)==null?void 0:s.map(l=>l.url))||[],chainId:i,chainName:c.name,nativeCurrency:c.nativeCurrency,rpcUrls:Us(c)}]})}}const Io=Object.freeze(Object.defineProperty({__proto__:null,autoConnectCoinbaseWalletSDK:bh,connectCoinbaseWalletSDK:vh,getCoinbaseWebProvider:Bc},Symbol.toStringTag,{value:"Module"}));async function Ih(n){return Pc(async()=>{var r;const e=await(await fetch(`${Qr("inAppWallet")}/api/2024-05-05/ecosystem-wallet`,{headers:{"x-ecosystem-id":n}})).json();if(!e||e.code==="UNAUTHORIZED")throw new Error(e.message||`Could not find ecosystem wallet with id ${n}, please check your ecosystem wallet configuration.`);return(r=e.authOptions)!=null&&r.includes("siwe")&&(e.authOptions=e.authOptions.filter(i=>i!=="siwe"),e.authOptions.push("wallet")),e},{cacheKey:`ecosystem-wallet-options-${n}`,cacheTime:1e3*60*5})}const mi=new Map;async function Kn(n,t,e){var s;const r=ye({clientId:n.clientId,ecosystem:e,partialSecretKey:(s=n.secretKey)==null?void 0:s.slice(0,5)});if(mi.has(r))return mi.get(r);const i=await t(n);return mi.set(r,i),i}function Fc(n){const{createOptions:t,connectorFactory:e,ecosystem:r}=n,i=r?r.id:"inApp",s=ln();let o=t,c,l,d,u,h=null;const _=async p=>{if(r){const f=await Ih(r.id),m=f==null?void 0:f.smartAccountOptions;if(m)if(f.smartAccountOptions.executionMode==="EIP7702")o={...o,executionMode:{mode:"EIP7702",sponsorGas:m.sponsorGas}};else{const{defaultChainId:E}=f.smartAccountOptions,P=(p==null?void 0:p.chain)??(E?we(E):void 0);if(!P)throw new Error("A chain must be provided either via 'chain' in connect options or 'defaultChainId' in ecosystem configuration. Please pass it via connect() or update the ecosystem configuration.");o={...o,smartAccount:{chain:P,factoryAddress:m.accountFactoryAddress,sponsorGas:m.sponsorGas}}}}};return{autoConnect:async p=>{const{autoConnectInAppWallet:f}=await a(async()=>{const{autoConnectInAppWallet:g}=await Promise.resolve().then(()=>qi);return{autoConnectInAppWallet:g}},void 0),m=await Kn(p.client,e,r);await _();const{account:y,chain:E,adminAccount:P}=await f(p,o,m);u=p.client,c=y,l=P,d=E;try{h=await m.storage.getAuthCookie()}catch(g){console.error("Failed to retrieve auth token:",g),h=null}return qe({chainId:d.id,client:p.client,ecosystem:r,walletAddress:c.address,walletType:i}),c},connect:async p=>{const{connectInAppWallet:f}=await a(async()=>{const{connectInAppWallet:g}=await Promise.resolve().then(()=>qi);return{connectInAppWallet:g}},void 0),m=await Kn(p.client,e,r);await _();const{account:y,chain:E,adminAccount:P}=await f(p,o,m);u=p.client,c=y,l=P,d=E;try{h=await m.storage.getAuthCookie()}catch(g){console.error("Failed to retrieve auth token:",g),h=null}return qe({chainId:d.id,client:p.client,ecosystem:r,walletAddress:c.address,walletType:i}),c},disconnect:async()=>{if(u&&!(await(await Kn(u,e,r)).logout()).success)throw new Error("Failed to logout");c=void 0,l=void 0,d=void 0,h=null,s.emit("disconnect",void 0)},getAccount:()=>c,getAdminAccount:()=>l,getAuthToken:()=>h,getChain(){if(d)return d=an(d.id)||d,d},getConfig:()=>o,id:i,subscribe:s.subscribe,switchChain:async p=>{var f;if((o!=null&&o.smartAccount||((f=o==null?void 0:o.executionMode)==null?void 0:f.mode)==="EIP4337")&&u&&c){const{autoConnectInAppWallet:m}=await a(async()=>{const{autoConnectInAppWallet:b}=await Promise.resolve().then(()=>qi);return{autoConnectInAppWallet:b}},void 0),y=await Kn(u,e,r);await _({chain:p});const{account:E,chain:P,adminAccount:g}=await m({chain:p,client:u},o,y);l=g,c=E,d=P}else d=p;s.emit("chainChanged",p)}}}function Kc(...n){const[t,e]=n,r={id:t,partnerId:e==null?void 0:e.partnerId};return Fc({connectorFactory:async i=>{const{InAppWebConnector:s}=await a(async()=>{const{InAppWebConnector:o}=await import("./web-connector-BVPZhMLu.js");return{InAppWebConnector:o}},__vite__mapDeps([19,3,4,2,1,20,5,6,7,8]));return new s({client:i,ecosystem:r,storage:e==null?void 0:e.storage})},createOptions:{auth:{...e==null?void 0:e.auth,options:[]},partnerId:r.partnerId},ecosystem:r})}function Fi(n){return Fc({connectorFactory:async t=>{var r;const{InAppWebConnector:e}=await a(async()=>{const{InAppWebConnector:i}=await import("./web-connector-BVPZhMLu.js");return{InAppWebConnector:i}},__vite__mapDeps([19,3,4,2,1,20,5,6,7,8]));return new e({client:t,passkeyDomain:(r=n==null?void 0:n.auth)==null?void 0:r.passkeyDomain,storage:n==null?void 0:n.storage})},createOptions:n})}function Ms(n){const t=ln();let e,r,i,s;return{autoConnect:async o=>{const{connectSmartAccount:c}=await a(async()=>{const{connectSmartAccount:u}=await import("./index-vLEo3QS7.js");return{connectSmartAccount:u}},__vite__mapDeps([21,3,4,1,2,22,13,5,6,7,8])),[l,d]=await c(o,n);return s=o,e=l,i=d,qe({chainId:i.id,client:o.client,walletAddress:e.address,walletType:"smart"}),e},connect:async o=>{const{connectSmartAccount:c}=await a(async()=>{const{connectSmartAccount:u}=await import("./index-vLEo3QS7.js");return{connectSmartAccount:u}},__vite__mapDeps([21,3,4,1,2,22,13,5,6,7,8])),[l,d]=await c(o,n);return r=o.personalAccount,s=o,e=l,i=d,qe({chainId:i.id,client:o.client,walletAddress:e.address,walletType:"smart"}),t.emit("accountChanged",e),e},disconnect:async()=>{if(e){const{disconnectSmartAccount:o}=await a(async()=>{const{disconnectSmartAccount:c}=await import("./index-vLEo3QS7.js");return{disconnectSmartAccount:c}},__vite__mapDeps([21,3,4,1,2,22,13,5,6,7,8]));await o(e)}e=void 0,r=void 0,i=void 0,t.emit("disconnect",void 0)},getAccount:()=>e,getAdminAccount:()=>r,getChain(){if(i)return i=an(i.id)||i,i},getConfig:()=>n,id:"smart",subscribe:t.subscribe,switchChain:async o=>{var h;if(!s)throw new Error("Cannot switch chain without a previous connection");if(!await Yu(o)){const _=Rs({address:n.factoryAddress||nh((h=n.overrides)==null?void 0:h.entrypointAddress),chain:o,client:s.client});if(!await Qu(_))throw new Error(`Factory contract not deployed on chain: ${o.id}`)}const{connectSmartAccount:l}=await a(async()=>{const{connectSmartAccount:_}=await import("./index-vLEo3QS7.js");return{connectSmartAccount:_}},__vite__mapDeps([21,3,4,1,2,22,13,5,6,7,8])),[d,u]=await l({...s,chain:o},{...n,chain:o});e=d,i=u,t.emit("accountChanged",d),t.emit("chainChanged",u)}}}function it(...n){const[t,e]=n;switch(!0){case t==="smart":return Ms(e);case(t==="embedded"||t==="inApp"):return Fi(e);case Rn(t):return Kc(...n);case t===ht:{const r=e;return gh({createOptions:r,onConnectRequested:async i=>{const{showCoinbasePopup:s}=await a(async()=>{const{showCoinbasePopup:o}=await Promise.resolve().then(()=>Eh);return{showCoinbasePopup:o}},void 0);return s(i)},providerFactory:()=>Bc(r)})}case t===At:{const r=e;return mh({createOptions:r,providerFactory:()=>kc(r)})}default:{let c=function(){i=void 0,s=void 0};const r=ln();let i,s,o,l=async()=>{};const d=r.subscribe("disconnect",()=>{c(),o==null||o(),d()});r.subscribe("accountChanged",p=>{i=p});let u=async()=>{throw new Error("Not implemented yet")};const h=go()?p=>_i(p):void 0,_={autoConnect:async p=>{const{injectedProvider:f}=await a(async()=>{const{injectedProvider:m}=await Promise.resolve().then(()=>To);return{injectedProvider:m}},void 0);if(t!=="walletConnect"&&f(t)){const{autoConnectEip1193Wallet:m}=await a(async()=>{const{autoConnectEip1193Wallet:b}=await Promise.resolve().then(()=>Oo);return{autoConnectEip1193Wallet:b}},void 0),[y,E,P,g]=await m({chain:p.chain,client:p.client,emitter:r,id:t,provider:Ki(t)});return i=y,s=E,l=P,u=g,o=r.subscribe("chainChanged",b=>{s=b}),qe({chainId:s.id,client:p.client,walletAddress:i.address,walletType:t}),i}if(p&&"client"in p){const{autoConnectWC:m}=await a(async()=>{const{autoConnectWC:b}=await import("./controller-CcgJ61Ea.js");return{autoConnectWC:b}},__vite__mapDeps([23,3,4,1,2,15,6,5,7,8])),[y,E,P,g]=await m(p,r,_.id,qr,h);return i=y,s=E,l=P,u=g,qe({chainId:s.id,client:p.client,walletAddress:i.address,walletType:t}),i}throw new Error("Failed to auto connect")},connect:async p=>{async function f(E){var b;const{connectWC:P}=await a(async()=>{const{connectWC:I}=await import("./controller-CcgJ61Ea.js");return{connectWC:I}},__vite__mapDeps([23,3,4,1,2,15,6,5,7,8]));let g;try{const[I,L,N,x]=await P({...E,walletConnect:{...E.walletConnect,onDisplayUri:((b=E.walletConnect)==null?void 0:b.onDisplayUri)||(async w=>{var v,A;if(typeof window<"u"&&typeof document<"u")if(go()){const T=await $c(t),O=T.mobile.native||T.mobile.universal;_i(O?uh(O,w).redirect:w);return}else try{const{createQROverlay:T}=await a(async()=>{const{createQROverlay:O}=await import("./qr-overlay-CmPeXbUF.js");return{createQROverlay:O}},__vite__mapDeps([24,3,4]));g&&g.destroy(),g=T(w,{theme:((A=(v=E.walletConnect)==null?void 0:v.qrModalOptions)==null?void 0:A.themeMode)??"dark",qrSize:280,showCloseButton:!0,onCancel:()=>{var O,V;(V=(O=E.walletConnect)==null?void 0:O.onCancel)==null||V.call(O)}})}catch(T){console.error("Failed to create QR overlay:",T)}})}},r,_.id,qr,h);return g&&(g.destroy(),g=void 0),i=I,s=L,l=N,u=x,qe({chainId:s.id,client:E.client,walletAddress:i.address,walletType:t}),i}catch(I){throw g&&(g.destroy(),g=void 0),I}}if(t==="walletConnect"){const{client:E,chain:P,...g}=p;return f({chain:P,client:E,walletConnect:{...g}})}const m=p&&"walletConnect"in p,{injectedProvider:y}=await a(async()=>{const{injectedProvider:E}=await Promise.resolve().then(()=>To);return{injectedProvider:E}},void 0);if(y(t)&&!m){const{connectEip1193Wallet:E}=await a(async()=>{const{connectEip1193Wallet:L}=await Promise.resolve().then(()=>Oo);return{connectEip1193Wallet:L}},void 0),[P,g,b,I]=await E({chain:p.chain,client:p.client,emitter:r,id:t,provider:Ki(t)});return i=P,s=g,l=b,u=I,o=r.subscribe("chainChanged",L=>{s=L}),qe({chainId:s.id,client:p.client,walletAddress:i.address,walletType:t}),i}if(p&&"client"in p)return f(p);throw new Error("Failed to connect")},disconnect:async()=>{c(),await l()},getAccount:()=>i,getChain(){if(s)return s=an(s.id)||s,s},getConfig:()=>n[1],id:t,subscribe:r.subscribe,switchChain:async p=>{try{await u(p),s=p}catch(f){console.error("Error switching chain",f)}}};return _}}}function Ah(){return it("walletConnect")}const Ao=Vc()?Pd():void 0;function Bs(n){const t=js().find(e=>e.info.rdns===n);return t==null?void 0:t.provider}function Wc(){return js().map(e=>e.info.rdns).map(e=>it(e))}function Th(){if(Ao)return Ao}function js(){var t;const n=((t=Th())==null?void 0:t.getProviders())||[];for(const e of n)if(e.info.rdns==="io.metamask.mobile"){e.info.rdns=Sc;break}return n}const To=Object.freeze(Object.defineProperty({__proto__:null,getInstalledWalletProviders:js,getInstalledWallets:Wc,injectedProvider:Bs},Symbol.toStringTag,{value:"Module"}));function Ki(n){const t=Bs(n);if(!t)throw new Error(`No injected provider found for wallet: "${n}"`);return t}async function Hc({id:n,provider:t,emitter:e,client:r,chain:i}){var _,p;let s,c=0;for(;!(s!=null&&s[0])&&c<3;){try{s=await t.request({method:"eth_requestAccounts"})}catch(f){if(console.error(f),(p=(_=Ph(f))==null?void 0:_.toLowerCase())!=null&&p.includes("rejected"))throw f;await new Promise(m=>setTimeout(m,500))}c++}const l=s==null?void 0:s[0];if(!l)throw new Error("Failed to connect to wallet, no accounts available");const d=Z(l),u=await t.request({method:"eth_chainId"}).then(ot).catch(f=>{throw new Error("Error reading chainId from provider",f)});let h=i&&i.id===u?i:we(u);try{i&&typeof i.id<"u"&&i.id!==u&&(await Zc(t,i),h=i)}catch{console.warn(`Error switching to chain ${i==null?void 0:i.id} - defaulting to wallet chain (${u})`)}return Jc({address:d,chain:h,client:r,emitter:e,id:n,provider:t})}async function Gc({id:n,provider:t,emitter:e,client:r,chain:i}){const o=(await t.request({method:"eth_accounts"}))[0];if(!o)throw new Error("Failed to connect to wallet, no accounts available");const c=Z(o),l=await t.request({method:"eth_chainId"}).then(ot),d=i&&i.id===l?i:we(l);return Jc({address:c,chain:d,client:r,emitter:e,id:n,provider:t})}function Po({provider:n,address:t,client:e,id:r}){const i={address:Z(t),async sendTransaction(s){const c=[{...s.gasPrice?{gasPrice:Le(s.gasPrice)}:{maxFeePerGas:s.maxFeePerGas?Le(s.maxFeePerGas):void 0,maxPriorityFeePerGas:s.maxPriorityFeePerGas?Le(s.maxPriorityFeePerGas):void 0},from:this.address,gas:s.gas?Le(s.gas):void 0,nonce:s.nonce?Le(s.nonce):void 0,to:s.to?Z(s.to):void 0,data:s.data,value:s.value?Le(s.value):void 0,authorizationList:s.authorizationList?td(s.authorizationList):void 0,accessList:s.accessList,...s.eip712}];try{const l=await n.request({method:"eth_sendTransaction",params:c});return Os({chainId:s.chainId,client:e,contractAddress:s.to??void 0,gasPrice:s.gasPrice,transactionHash:l,walletAddress:Z(t),walletType:r}),{transactionHash:l}}catch(l){throw nd(l)&&rd({chainId:s.chainId,client:e,contractAddress:s.to||void 0,error:l,transactionValue:s.value,walletAddress:Z(t)}),l}},async signMessage({message:s}){if(!i.address)throw new Error("Provider not setup");const o=typeof s=="string"?Ps(s):s.raw instanceof Uint8Array?Zr(s.raw):s.raw;return await n.request({method:"personal_sign",params:[o,Z(i.address)]})},async signAuthorization(s){const o=Ec(s);let c;try{c=await n.request({method:"eth_sign",params:[Z(i.address),o]})}catch{c=await n.request({method:"secp256k1_sign",params:[o]})}if(!c)throw new Error("Failed to sign authorization");const l=ed(c);return{...s,...l}},async signTypedData(s){if(!n||!i.address)throw new Error("Provider not setup");const o=Cs(s),{domain:c,message:l,primaryType:d}=o,u={EIP712Domain:Od({domain:c}),...o.types};Rd({domain:c,message:l,primaryType:d,types:u});const h=Ld({domain:c??{},message:l,primaryType:d,types:u});return await n.request({method:"eth_signTypedData_v4",params:[Z(i.address),h]})},async watchAsset(s){return await n.request({method:"wallet_watchAsset",params:s},{retryCount:0})},async sendCalls(s){try{const{callParams:o,chain:c}=await Ns(s,i),l=await n.request({method:"wallet_sendCalls",params:o});return l&&typeof l=="object"&&"id"in l?{chain:c,client:e,id:l.id}:{chain:c,client:e,id:l}}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${r} errored calling wallet_sendCalls, with error: ${o instanceof Error?o.message:Xu(o)}`):o}},async getCallsStatus(s){try{const o=await n.request({method:"wallet_getCallsStatus",params:[s.id]});return $s(o)}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${r} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):o}},async getCallsStatusRaw(s){try{return await n.request({method:"wallet_getCallsStatus",params:[s.id]})}catch(o){throw/unsupport|not support/i.test(o.message)?new Error(`${r} does not support wallet_getCallsStatus, reach out to them directly to request EIP-5792 support.`):o}},async getCapabilities(s){const o=s.chainId;try{const c=await n.request({method:"wallet_getCapabilities",params:[Z(i.address),o?[Le(o)]:void 0]});return ks(c,o)}catch(c){if(/unsupport|not support|not available/i.test(c.message))return{message:`${r} does not support wallet_getCapabilities, reach out to them directly to request EIP-5792 support.`};throw c}}};return i}async function Jc({provider:n,address:t,chain:e,emitter:r,client:i,id:s}){const o=Po({address:t,client:i,id:s,provider:n});async function c(){n.removeListener("accountsChanged",d),n.removeListener("chainChanged",u),n.removeListener("disconnect",l);try{await Dd(()=>n.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}}async function l(){c(),r.emit("disconnect",void 0)}function d(h){if(h[0]){const _=Po({address:Z(h[0]),client:i,id:s,provider:n});r.emit("accountChanged",_),r.emit("accountsChanged",h)}else l()}function u(h){const _=we(ot(h));r.emit("chainChanged",_)}return n.on&&(n.on("accountsChanged",d),n.on("chainChanged",u),n.on("disconnect",l)),[o,e,l,h=>Zc(n,h)]}async function Zc(n,t){var r;const e=Le(t.id);try{await n.request({method:"wallet_switchEthereumChain",params:[{chainId:e}]})}catch{const i=await Vs(t);await n.request({method:"wallet_addEthereumChain",params:[{blockExplorerUrls:(r=i.explorers)==null?void 0:r.map(s=>s.url),chainId:e,chainName:i.name,nativeCurrency:i.nativeCurrency,rpcUrls:Us(i)}]})}}function Ph(n){return n instanceof Error?n.message:typeof n=="string"?n:typeof n=="object"&&n!==null?JSON.stringify(n):String(n)}const Oo=Object.freeze(Object.defineProperty({__proto__:null,autoConnectEip1193Wallet:Gc,connectEip1193Wallet:Hc,getInjectedProvider:Ki},Symbol.toStringTag,{value:"Module"}));function Oh(n){const t=n.walletId??"adapter",e=ln();let r,i,s;const o=async _=>(s=typeof n.provider=="function"?await n.provider(_):n.provider,s),c=e.subscribe("chainChanged",_=>{i=_});function l(){r=void 0,i=void 0}let d=async()=>{};const u=e.subscribe("disconnect",()=>{l(),c(),u()});e.subscribe("accountChanged",_=>{r=_});let h=async _=>{await(s==null?void 0:s.request({method:"wallet_switchEthereumChain",params:[{chainId:id(_.id)}]}))};return{autoConnect:async _=>{var E;const[p,f,m,y]=await Gc({chain:_.chain,client:_.client,emitter:e,id:t,provider:await o({chainId:(E=_.chain)==null?void 0:E.id})});return r=p,i=f,d=m,h=y,e.emit("onConnect",_),qe({client:_.client,walletAddress:r.address,walletType:t}),r},connect:async _=>{var E;const[p,f,m,y]=await Hc({chain:_.chain,client:_.client,emitter:e,id:t,provider:await o({chainId:(E=_.chain)==null?void 0:E.id})});return r=p,i=f,d=m,h=y,e.emit("onConnect",_),qe({client:_.client,walletAddress:r.address,walletType:t}),r},disconnect:async()=>{l(),await d(),e.emit("disconnect",void 0)},getAccount:()=>r,getChain(){if(i)return i=an(i.id)||i,i},getConfig:()=>{},id:t,subscribe:e.subscribe,switchChain:async _=>{await h(_),e.emit("chainChanged",_)}}}function Rh(n){const{chain:t,client:e,wallet:r,connectOverride:i}=n,s=Yr({chain:t,client:e});return{on:r.subscribe,removeListener:()=>{},request:async o=>{switch(o.method){case"eth_sendTransaction":{const c=r.getAccount();if(!c)throw new Error("Account not connected");return(await vc({account:c,transaction:Bi({...o.params[0],chain:t,client:e})})).transactionHash}case"eth_estimateGas":{const c=r.getAccount();if(!c)throw new Error("Account not connected");return sd({account:c,transaction:Bi({...o.params[0],chain:t,client:e})})}case"personal_sign":{const c=r.getAccount();if(!c)throw new Error("Account not connected");return c.signMessage({message:{raw:o.params[0]}})}case"eth_signTypedData_v4":{const c=r.getAccount();if(!c)throw new Error("Account not connected");const l=JSON.parse(o.params[1]);return c.signTypedData(l)}case"eth_accounts":{const c=r.getAccount();return c?[c.address]:[]}case"eth_requestAccounts":{const c=r.getAccount();if(c)return[c.address];const l=i?await i(r):await r.connect({client:e}).catch(d=>(console.error("Error connecting wallet",d),null));if(!l)throw new Error("Unable to connect wallet - try passing a connectOverride function");return[l.address]}case"wallet_switchEthereumChain":case"wallet_addEthereumChain":{const l=o.params[0].chainId;if(!l)throw new Error("Chain ID is required");const d=Nr(l)?nn(l):l,u=we(d);return r.switchChain(u)}case"wallet_getCapabilities":{const c=r.getAccount();if(!c)throw new Error("Account not connected");if(!c.getCapabilities)throw new Error("Wallet does not support EIP-5792");const l=o.params[1];if(l&&Array.isArray(l)){const d=l[0],u=Nr(d)?nn(d):Number(d);return c.getCapabilities(u?{chainId:u}:{})}return c.getCapabilities({})}case"wallet_sendCalls":{const c=r.getAccount();if(!c)throw new Error("Account not connected");if(!c.sendCalls)throw new Error("Wallet does not support EIP-5792");return c.sendCalls({...o.params[0],chain:t})}case"wallet_getCallsStatus":{const c=r.getAccount();if(!c)throw new Error("Account not connected");if(!c.getCallsStatusRaw)throw new Error("Wallet does not support EIP-5792");return await c.getCallsStatusRaw({id:o.params[0],chain:t,client:e})}default:return s(o)}}}}const Lh=Object.freeze(Object.defineProperty({__proto__:null,fromProvider:Oh,toProvider:Rh},Symbol.toStringTag,{value:"Module"}));function Dh(n){const t=ln();let e=n.chain;return{autoConnect:async()=>(t.emit("onConnect",n),n.adaptedAccount),connect:async()=>(t.emit("onConnect",n),n.adaptedAccount),disconnect:async()=>{await n.onDisconnect(),t.emit("disconnect",void 0)},getAccount(){return n.adaptedAccount},getChain(){return e=an(e.id)||e,e},getConfig(){return n},id:"adapter",subscribe:t.subscribe,switchChain:async r=>{await n.switchChain(r),e=r,t.emit("chainChanged",r)}}}async function Vh(){return(await a(async()=>{const{default:n}=await import("./wallet-infos-BHI_w6r-.js");return{default:n}},[])).default}async function un(n,t){return Kn(n,async e=>{const{InAppWebConnector:r}=await a(async()=>{const{InAppWebConnector:i}=await import("./web-connector-BVPZhMLu.js");return{InAppWebConnector:i}},__vite__mapDeps([19,3,4,2,1,20,5,6,7,8]));return new r({client:e,ecosystem:t})},t)}async function Yc(n){const{client:t,ecosystem:e}=n,i=await(await un(t,e)).getUser();switch(i.status){case"Logged In, Wallet Initialized":return i}}async function Sh(n){const t=await Yc(n);if(t&&"email"in t.authDetails)return t.authDetails.email}async function xh(n){const t=await Yc(n);if(t&&"phoneNumber"in t.authDetails)return t.authDetails.phoneNumber}async function Ch(n){return(await un(n.client,n.ecosystem)).preAuthenticate(n)}async function $h(n){return(await un(n.client,n.ecosystem)).authenticate(n)}async function kh(n){const t=await un(n.client,n.ecosystem);if(!t.authenticateWithRedirect)throw new Error("authenticateWithRedirect is not supported on this platform");return t.authenticateWithRedirect(n.strategy,n.mode,n.redirectUrl)}async function Nh(n){return await(await un(n.client,n.ecosystem)).linkProfile(n)}async function Uh(n){return await(await un(n.client,n.ecosystem)).unlinkProfile(n.profileToUnlink,n.allowAccountDeletion)}async function qh(n){return(await un(n.client,n.ecosystem)).getProfiles()}function Mh(n){if("privateKey"in n){const t=Yd(typeof n.message=="object"?n.message.raw:fc(n.message)),e=Ls({payload:t,privateKey:n.privateKey});return bc(e)}if("account"in n){const{message:t,account:e}=n;return e.signMessage({message:t})}throw new Error("Either privateKey or account is required")}function Bh(n){var s;const{privateKey:t,...e}=n;typeof((s=e.domain)==null?void 0:s.chainId)=="string"&&(e.domain.chainId=mc(e.domain.chainId));const r=od(e),i=Ls({payload:r,privateKey:t});return bc(i)}function Wi(n){const{client:t}=n,e=`0x${n.privateKey.replace(/^0x/,"")}`,r=Ds(Ic.getPublicKey(e.slice(2),!1)),i=Vd(r);return{address:Z(i),sendTransaction:async o=>{const c=Yr({chain:we(o.chainId),client:t}),l=po({privateKey:e,transaction:o});return{transactionHash:await cd(c,l)}},signAuthorization:async o=>{const c=Ls({payload:Ec(o),privateKey:e});return ad(o,{signature:c})},signMessage:async({message:o})=>Mh({message:o,privateKey:e}),signTransaction:async o=>po({privateKey:e,transaction:o}),signTypedData:async o=>Bh({...o,privateKey:e})}}async function jh(n){const t=Ds(Ic.utils.randomPrivateKey());return Wi({client:n.client,privateKey:t})}async function zh(n){const{address:t,client:e,chain:r}=n,i=n.tokenAddress||(r.id===42429?"0x20c0000000000000000000000000000000000000":void 0);if(i&&Z(i)!==Z(fo)){const{getBalance:u}=await a(async()=>{const{getBalance:h}=await import("./getBalance-JHGD-cET.js");return{getBalance:h}},__vite__mapDeps([25,1,2,3,4,26]));return u({address:t,contract:Rs({address:i,chain:r,client:e})})}const s=Yr({chain:r,client:e}),[o,c,l,d]=await Promise.all([Ed(r),vd(r),bd(r),ld(s,{address:t})]);return{chainId:r.id,decimals:c,displayValue:ud(d,c),name:l,symbol:o,tokenAddress:i??fo,value:d}}const Ro=Sd;var En=pt;const rr=Xh().console||{},Fh={mapHttpRequest:br,mapHttpResponse:br,wrapRequestSerializer:yi,wrapResponseSerializer:yi,wrapErrorSerializer:yi,req:br,res:br,err:Jh};function Kh(n,t){return Array.isArray(n)?n.filter(function(r){return r!=="!stdSerializers.err"}):n===!0?Object.keys(t):!1}function pt(n){n=n||{},n.browser=n.browser||{};const t=n.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");const e=n.browser.write||rr;n.browser.write&&(n.browser.asObject=!0);const r=n.serializers||{},i=Kh(n.browser.serialize,r);let s=n.browser.serialize;Array.isArray(n.browser.serialize)&&n.browser.serialize.indexOf("!stdSerializers.err")>-1&&(s=!1);const o=["error","fatal","warn","info","debug","trace"];typeof e=="function"&&(e.error=e.fatal=e.warn=e.info=e.debug=e.trace=e),n.enabled===!1&&(n.level="silent");const c=n.level||"info",l=Object.create(e);l.log||(l.log=ir),Object.defineProperty(l,"levelVal",{get:u}),Object.defineProperty(l,"level",{get:h,set:_});const d={transmit:t,serialize:i,asObject:n.browser.asObject,levels:o,timestamp:Zh(n)};l.levels=pt.levels,l.level=c,l.setMaxListeners=l.getMaxListeners=l.emit=l.addListener=l.on=l.prependListener=l.once=l.prependOnceListener=l.removeListener=l.removeAllListeners=l.listeners=l.listenerCount=l.eventNames=l.write=l.flush=ir,l.serializers=r,l._serialize=i,l._stdErrSerialize=s,l.child=p,t&&(l._logEvent=Hi());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function h(){return this._level}function _(f){if(f!=="silent"&&!this.levels.values[f])throw Error("unknown level "+f);this._level=f,hn(d,l,"error","log"),hn(d,l,"fatal","error"),hn(d,l,"warn","error"),hn(d,l,"info","log"),hn(d,l,"debug","log"),hn(d,l,"trace","log")}function p(f,m){if(!f)throw new Error("missing bindings for child Pino");m=m||{},i&&f.serializers&&(m.serializers=f.serializers);const y=m.serializers;if(i&&y){var E=Object.assign({},r,y),P=n.browser.serialize===!0?Object.keys(E):i;delete f.serializers,ei([f],P,E,this._stdErrSerialize)}function g(b){this._childLevel=(b._childLevel|0)+1,this.error=_n(b,f,"error"),this.fatal=_n(b,f,"fatal"),this.warn=_n(b,f,"warn"),this.info=_n(b,f,"info"),this.debug=_n(b,f,"debug"),this.trace=_n(b,f,"trace"),E&&(this.serializers=E,this._serialize=P),t&&(this._logEvent=Hi([].concat(b._logEvent.bindings,f)))}return g.prototype=this,new g(this)}return l}pt.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"}};pt.stdSerializers=Fh;pt.stdTimeFunctions=Object.assign({},{nullTime:Qc,epochTime:Xc,unixTime:Yh,isoTime:Qh});function hn(n,t,e,r){const i=Object.getPrototypeOf(t);t[e]=t.levelVal>t.levels.values[e]?ir:i[e]?i[e]:rr[e]||rr[r]||ir,Wh(n,t,e)}function Wh(n,t,e){!n.transmit&&t[e]===ir||(t[e]=function(r){return function(){const s=n.timestamp(),o=new Array(arguments.length),c=Object.getPrototypeOf&&Object.getPrototypeOf(this)===rr?rr:this;for(var l=0;l<o.length;l++)o[l]=arguments[l];if(n.serialize&&!n.asObject&&ei(o,this._serialize,this.serializers,this._stdErrSerialize),n.asObject?r.call(c,Hh(this,e,o,s)):r.apply(c,o),n.transmit){const d=n.transmit.level||t.level,u=pt.levels.values[d],h=pt.levels.values[e];if(h<u)return;Gh(this,{ts:s,methodLevel:e,methodValue:h,transmitValue:pt.levels.values[n.transmit.level||t.level],send:n.transmit.send,val:t.levelVal},o)}}}(t[e]))}function Hh(n,t,e,r){n._serialize&&ei(e,n._serialize,n.serializers,n._stdErrSerialize);const i=e.slice();let s=i[0];const o={};r&&(o.time=r),o.level=pt.levels.values[t];let c=(n._childLevel|0)+1;if(c<1&&(c=1),s!==null&&typeof s=="object"){for(;c--&&typeof i[0]=="object";)Object.assign(o,i.shift());s=i.length?Ro(i.shift(),i):void 0}else typeof s=="string"&&(s=Ro(i.shift(),i));return s!==void 0&&(o.msg=s),o}function ei(n,t,e,r){for(const i in n)if(r&&n[i]instanceof Error)n[i]=pt.stdSerializers.err(n[i]);else if(typeof n[i]=="object"&&!Array.isArray(n[i]))for(const s in n[i])t&&t.indexOf(s)>-1&&s in e&&(n[i][s]=e[s](n[i][s]))}function _n(n,t,e){return function(){const r=new Array(1+arguments.length);r[0]=t;for(var i=1;i<r.length;i++)r[i]=arguments[i-1];return n[e].apply(this,r)}}function Gh(n,t,e){const r=t.send,i=t.ts,s=t.methodLevel,o=t.methodValue,c=t.val,l=n._logEvent.bindings;ei(e,n._serialize||Object.keys(n.serializers),n.serializers,n._stdErrSerialize===void 0?!0:n._stdErrSerialize),n._logEvent.ts=i,n._logEvent.messages=e.filter(function(d){return l.indexOf(d)===-1}),n._logEvent.level.label=s,n._logEvent.level.value=o,r(s,n._logEvent,c),n._logEvent=Hi(l)}function Hi(n){return{ts:0,messages:[],bindings:n||[],level:{label:"",value:0}}}function Jh(n){const t={type:n.constructor.name,msg:n.message,stack:n.stack};for(const e in n)t[e]===void 0&&(t[e]=n[e]);return t}function Zh(n){return typeof n.timestamp=="function"?n.timestamp:n.timestamp===!1?Qc:Xc}function br(){return{}}function yi(n){return n}function ir(){}function Qc(){return!1}function Xc(){return Date.now()}function Yh(){return Math.round(Date.now()/1e3)}function Qh(){return new Date(Date.now()).toISOString()}function Xh(){function n(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return n(self)||n(window)||n(this)||{}}}const ti=Td(En),e_={level:"info"},fr="custom_context",zs=1e3*1024;let t_=class{constructor(t){this.nodeValue=t,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}},Lo=class{constructor(t){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=t,this.sizeInBytes=0}append(t){const e=new t_(t);if(e.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${t} with size ${e.size}`);for(;this.size+e.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=e),this.tail=e):(this.head=e,this.tail=e),this.lengthInNodes++,this.sizeInBytes+=e.size}shift(){if(!this.head)return;const t=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=t.size}toArray(){const t=[];let e=this.head;for(;e!==null;)t.push(e.value),e=e.next;return t}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let t=this.head;return{next:()=>{if(!t)return{done:!0,value:null};const e=t.value;return t=t.next,{done:!1,value:e}}}}};class el{constructor(t,e=zs){this.level=t??"error",this.levelValue=En.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=e,this.logs=new Lo(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(t,e){e===En.levels.values.error?console.error(t):e===En.levels.values.warn?console.warn(t):e===En.levels.values.debug?console.debug(t):e===En.levels.values.trace?console.trace(t):console.log(t)}appendToLogs(t){this.logs.append(ji({timestamp:new Date().toISOString(),log:t}));const e=typeof t=="string"?JSON.parse(t).level:t.level;e>=this.levelValue&&this.forwardToConsole(t,e)}getLogs(){return this.logs}clearLogs(){this.logs=new Lo(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(t){const e=this.getLogArray();return e.push(ji({extraMetadata:t})),new Blob(e,{type:"application/json"})}}let n_=class{constructor(t,e=zs){this.baseChunkLogger=new el(t,e)}write(t){this.baseChunkLogger.appendToLogs(t)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(t){return this.baseChunkLogger.logsToBlob(t)}downloadLogsBlobInBrowser(t){const e=URL.createObjectURL(this.logsToBlob(t)),r=document.createElement("a");r.href=e,r.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(e)}},r_=class{constructor(t,e=zs){this.baseChunkLogger=new el(t,e)}write(t){this.baseChunkLogger.appendToLogs(t)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(t){return this.baseChunkLogger.logsToBlob(t)}};var i_=Object.defineProperty,s_=Object.defineProperties,o_=Object.getOwnPropertyDescriptors,Do=Object.getOwnPropertySymbols,a_=Object.prototype.hasOwnProperty,c_=Object.prototype.propertyIsEnumerable,Vo=(n,t,e)=>t in n?i_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Br=(n,t)=>{for(var e in t||(t={}))a_.call(t,e)&&Vo(n,e,t[e]);if(Do)for(var e of Do(t))c_.call(t,e)&&Vo(n,e,t[e]);return n},jr=(n,t)=>s_(n,o_(t));function Fs(n){return jr(Br({},n),{level:(n==null?void 0:n.level)||e_.level})}function l_(n,t=fr){return n[t]||""}function u_(n,t,e=fr){return n[e]=t,n}function je(n,t=fr){let e="";return typeof n.bindings>"u"?e=l_(n,t):e=n.bindings().context||"",e}function d_(n,t,e=fr){const r=je(n,e);return r.trim()?`${r}/${t}`:t}function xe(n,t,e=fr){const r=d_(n,t,e),i=n.child({context:r});return u_(i,r,e)}function h_(n){var t,e;const r=new n_((t=n.opts)==null?void 0:t.level,n.maxSizeInBytes);return{logger:ti(jr(Br({},n.opts),{level:"trace",browser:jr(Br({},(e=n.opts)==null?void 0:e.browser),{write:i=>r.write(i)})})),chunkLoggerController:r}}function __(n){var t;const e=new r_((t=n.opts)==null?void 0:t.level,n.maxSizeInBytes);return{logger:ti(jr(Br({},n.opts),{level:"trace"}),e),chunkLoggerController:e}}function p_(n){return typeof n.loggerOverride<"u"&&typeof n.loggerOverride!="string"?{logger:n.loggerOverride,chunkLoggerController:null}:typeof window<"u"?h_(n):__(n)}var f_=Object.defineProperty,m_=(n,t,e)=>t in n?f_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,So=(n,t,e)=>m_(n,typeof t!="symbol"?t+"":t,e);class y_ extends Pn{constructor(t){super(),this.opts=t,So(this,"protocol","wc"),So(this,"version",2)}}var w_=Object.defineProperty,g_=(n,t,e)=>t in n?w_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,E_=(n,t,e)=>g_(n,t+"",e);class v_ extends Pn{constructor(t,e){super(),this.core=t,this.logger=e,E_(this,"records",new Map)}}class b_{constructor(t,e){this.logger=t,this.core=e}}class I_ extends Pn{constructor(t,e){super(),this.relayer=t,this.logger=e}}let A_=class extends Pn{constructor(t){super()}},T_=class{constructor(t,e,r,i){this.core=t,this.logger=e,this.name=r}},P_=class extends Pn{constructor(t,e){super(),this.relayer=t,this.logger=e}};class O_ extends Pn{constructor(t,e){super(),this.core=t,this.logger=e}}let R_=class{constructor(t,e,r){this.core=t,this.logger=e,this.store=r}},L_=class{constructor(t,e){this.projectId=t,this.logger=e}},D_=class{constructor(t,e,r){this.core=t,this.logger=e,this.telemetryEnabled=r}};var V_=Object.defineProperty,S_=(n,t,e)=>t in n?V_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,xo=(n,t,e)=>S_(n,typeof t!="symbol"?t+"":t,e);let x_=class{constructor(t){this.opts=t,xo(this,"protocol","wc"),xo(this,"version",2)}},C_=class{constructor(t){this.client=t}};function sr(n,{strict:t=!0}={}){return!n||typeof n!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(n):n.startsWith("0x")}function Gi(n){return sr(n,{strict:!1})?Math.ceil((n.length-2)/2):n.length}const tl="2.31.0";let $n={getDocsUrl:({docsBaseUrl:n,docsPath:t="",docsSlug:e})=>t?`${n??"https://viem.sh"}${t}${e?`#${e}`:""}`:void 0,version:`viem@${tl}`};class rn extends Error{constructor(t,e={}){var c;const r=(()=>{var l;return e.cause instanceof rn?e.cause.details:(l=e.cause)!=null&&l.message?e.cause.message:e.details})(),i=e.cause instanceof rn&&e.cause.docsPath||e.docsPath,s=(c=$n.getDocsUrl)==null?void 0:c.call($n,{...e,docsPath:i}),o=[t||"An error occurred.","",...e.metaMessages?[...e.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...r?[`Details: ${r}`]:[],...$n.version?[`Version: ${$n.version}`]:[]].join(`
|
|
4
|
+
`);super(o,e.cause?{cause:e.cause}:void 0),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,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=i,this.metaMessages=e.metaMessages,this.name=e.name??this.name,this.shortMessage=t,this.version=tl}walk(t){return nl(this,t)}}function nl(n,t){return t!=null&&t(n)?n:n&&typeof n=="object"&&"cause"in n&&n.cause!==void 0?nl(n.cause,t):t?null:n}class rl extends rn{constructor({size:t,targetSize:e,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${e}).`,{name:"SizeExceedsPaddingSizeError"})}}function Ln(n,{dir:t,size:e=32}={}){return typeof n=="string"?$_(n,{dir:t,size:e}):k_(n,{dir:t,size:e})}function $_(n,{dir:t,size:e=32}={}){if(e===null)return n;const r=n.replace("0x","");if(r.length>e*2)throw new rl({size:Math.ceil(r.length/2),targetSize:e,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](e*2,"0")}`}function k_(n,{dir:t,size:e=32}={}){if(e===null)return n;if(n.length>e)throw new rl({size:n.length,targetSize:e,type:"bytes"});const r=new Uint8Array(e);for(let i=0;i<e;i++){const s=t==="right";r[s?i:e-i-1]=n[s?i:n.length-i-1]}return r}class N_ extends rn{constructor({max:t,min:e,signed:r,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${e} to ${t})`:`(above ${e})`}`,{name:"IntegerOutOfRangeError"})}}class U_ extends rn{constructor({givenSize:t,maxSize:e}){super(`Size cannot exceed ${e} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function Dn(n,{size:t}){if(Gi(n)>t)throw new U_({givenSize:Gi(n),maxSize:t})}function Ji(n,t={}){const{signed:e}=t;t.size&&Dn(n,{size:t.size});const r=BigInt(n);if(!e)return r;const i=(n.length-2)/2,s=(1n<<BigInt(i)*8n-1n)-1n;return r<=s?r:r-BigInt(`0x${"f".padStart(i*2,"f")}`)-1n}function q_(n,t={}){return Number(Ji(n,t))}const M_=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"));function Zi(n,t={}){return typeof n=="number"||typeof n=="bigint"?sl(n,t):typeof n=="string"?z_(n,t):typeof n=="boolean"?B_(n,t):il(n,t)}function B_(n,t={}){const e=`0x${Number(n)}`;return typeof t.size=="number"?(Dn(e,{size:t.size}),Ln(e,{size:t.size})):e}function il(n,t={}){let e="";for(let i=0;i<n.length;i++)e+=M_[n[i]];const r=`0x${e}`;return typeof t.size=="number"?(Dn(r,{size:t.size}),Ln(r,{dir:"right",size:t.size})):r}function sl(n,t={}){const{signed:e,size:r}=t,i=BigInt(n);let s;r?e?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof n=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&e?-s-1n:0;if(s&&i>s||i<o){const l=typeof n=="bigint"?"n":"";throw new N_({max:s?`${s}${l}`:void 0,min:`${o}${l}`,signed:e,size:r,value:`${n}${l}`})}const c=`0x${(e&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?Ln(c,{size:r}):c}const j_=new TextEncoder;function z_(n,t={}){const e=j_.encode(n);return il(e,t)}const F_=new TextEncoder;function K_(n,t={}){return typeof n=="number"||typeof n=="bigint"?H_(n,t):typeof n=="boolean"?W_(n,t):sr(n)?ol(n,t):al(n,t)}function W_(n,t={}){const e=new Uint8Array(1);return e[0]=Number(n),typeof t.size=="number"?(Dn(e,{size:t.size}),Ln(e,{size:t.size})):e}const wt={zero:48,nine:57,A:65,F:70,a:97,f:102};function Co(n){if(n>=wt.zero&&n<=wt.nine)return n-wt.zero;if(n>=wt.A&&n<=wt.F)return n-(wt.A-10);if(n>=wt.a&&n<=wt.f)return n-(wt.a-10)}function ol(n,t={}){let e=n;t.size&&(Dn(e,{size:t.size}),e=Ln(e,{dir:"right",size:t.size}));let r=e.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,s=new Uint8Array(i);for(let o=0,c=0;o<i;o++){const l=Co(r.charCodeAt(c++)),d=Co(r.charCodeAt(c++));if(l===void 0||d===void 0)throw new rn(`Invalid byte sequence ("${r[c-2]}${r[c-1]}" in "${r}").`);s[o]=l*16+d}return s}function H_(n,t){const e=sl(n,t);return ol(e)}function al(n,t={}){const e=F_.encode(n);return typeof t.size=="number"?(Dn(e,{size:t.size}),Ln(e,{dir:"right",size:t.size})):e}const Ir=BigInt(2**32-1),$o=BigInt(32);function G_(n,t=!1){return t?{h:Number(n&Ir),l:Number(n>>$o&Ir)}:{h:Number(n>>$o&Ir)|0,l:Number(n&Ir)|0}}function J_(n,t=!1){const e=n.length;let r=new Uint32Array(e),i=new Uint32Array(e);for(let s=0;s<e;s++){const{h:o,l:c}=G_(n[s],t);[r[s],i[s]]=[o,c]}return[r,i]}const Z_=(n,t,e)=>n<<e|t>>>32-e,Y_=(n,t,e)=>t<<e|n>>>32-e,Q_=(n,t,e)=>t<<e-32|n>>>64-e,X_=(n,t,e)=>n<<e-32|t>>>64-e,pn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ep(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function zr(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function or(n,...t){if(!ep(n))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(n.length))throw new Error("Uint8Array expected of length "+t+", got length="+n.length)}function _I(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");zr(n.outputLen),zr(n.blockLen)}function ko(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function tp(n,t){or(n);const e=t.outputLen;if(n.length<e)throw new Error("digestInto() expects output buffer of length at least "+e)}function np(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function cl(...n){for(let t=0;t<n.length;t++)n[t].fill(0)}function pI(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function fI(n,t){return n<<32-t|n>>>t}const rp=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ip(n){return n<<24&4278190080|n<<8&16711680|n>>>8&65280|n>>>24&255}function sp(n){for(let t=0;t<n.length;t++)n[t]=ip(n[t]);return n}const No=rp?n=>n:sp;function op(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}function ll(n){return typeof n=="string"&&(n=op(n)),or(n),n}function mI(...n){let t=0;for(let r=0;r<n.length;r++){const i=n[r];or(i),t+=i.length}const e=new Uint8Array(t);for(let r=0,i=0;r<n.length;r++){const s=n[r];e.set(s,i),i+=s.length}return e}class ap{}function cp(n){const t=r=>n().update(ll(r)).digest(),e=n();return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=()=>n(),t}function yI(n=32){if(pn&&typeof pn.getRandomValues=="function")return pn.getRandomValues(new Uint8Array(n));if(pn&&typeof pn.randomBytes=="function")return Uint8Array.from(pn.randomBytes(n));throw new Error("crypto.getRandomValues must be defined")}const lp=BigInt(0),kn=BigInt(1),up=BigInt(2),dp=BigInt(7),hp=BigInt(256),_p=BigInt(113),ul=[],dl=[],hl=[];for(let n=0,t=kn,e=1,r=0;n<24;n++){[e,r]=[r,(2*e+3*r)%5],ul.push(2*(5*r+e)),dl.push((n+1)*(n+2)/2%64);let i=lp;for(let s=0;s<7;s++)t=(t<<kn^(t>>dp)*_p)%hp,t&up&&(i^=kn<<(kn<<BigInt(s))-kn);hl.push(i)}const _l=J_(hl,!0),pp=_l[0],fp=_l[1],Uo=(n,t,e)=>e>32?Q_(n,t,e):Z_(n,t,e),qo=(n,t,e)=>e>32?X_(n,t,e):Y_(n,t,e);function mp(n,t=24){const e=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let o=0;o<10;o++)e[o]=n[o]^n[o+10]^n[o+20]^n[o+30]^n[o+40];for(let o=0;o<10;o+=2){const c=(o+8)%10,l=(o+2)%10,d=e[l],u=e[l+1],h=Uo(d,u,1)^e[c],_=qo(d,u,1)^e[c+1];for(let p=0;p<50;p+=10)n[o+p]^=h,n[o+p+1]^=_}let i=n[2],s=n[3];for(let o=0;o<24;o++){const c=dl[o],l=Uo(i,s,c),d=qo(i,s,c),u=ul[o];i=n[u],s=n[u+1],n[u]=l,n[u+1]=d}for(let o=0;o<50;o+=10){for(let c=0;c<10;c++)e[c]=n[o+c];for(let c=0;c<10;c++)n[o+c]^=~e[(c+2)%10]&e[(c+4)%10]}n[0]^=pp[r],n[1]^=fp[r]}cl(e)}class Ks extends ap{constructor(t,e,r,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=s,zr(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=np(this.state)}clone(){return this._cloneInto()}keccak(){No(this.state32),mp(this.state32,this.rounds),No(this.state32),this.posOut=0,this.pos=0}update(t){ko(this),t=ll(t),or(t);const{blockLen:e,state:r}=this,i=t.length;for(let s=0;s<i;){const o=Math.min(e-this.pos,i-s);for(let c=0;c<o;c++)r[this.pos++]^=t[s++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:i}=this;t[r]^=e,e&128&&r===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){ko(this,!1),or(t),this.finish();const e=this.state,{blockLen:r}=this;for(let i=0,s=t.length;i<s;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,s-i);t.set(e.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return zr(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(tp(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,cl(this.state)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:i,rounds:s,enableXOF:o}=this;return t||(t=new Ks(e,r,i,o,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}}const yp=(n,t,e)=>cp(()=>new Ks(t,n,e)),wp=yp(1,136,256/8);function pl(n,t){const e=t||"hex",r=wp(sr(n,{strict:!1})?K_(n):n);return e==="bytes"?r:Zi(r)}class gp extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const e=super.get(t);return super.has(t)&&e!==void 0&&(this.delete(t),super.set(t,e)),e}set(t,e){if(super.set(t,e),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const wi=new gp(8192);function Ep(n,t){if(wi.has(`${n}.${t}`))return wi.get(`${n}.${t}`);const e=n.substring(2).toLowerCase(),r=pl(al(e),"bytes"),i=e.split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(r[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());const s=`0x${i.join("")}`;return wi.set(`${n}.${t}`,s),s}function vp(n){const t=pl(`0x${n.substring(4)}`).substring(26);return Ep(`0x${t}`)}async function bp({hash:n,signature:t}){const e=sr(n)?n:Zi(n),{secp256k1:r}=await a(async()=>{const{secp256k1:o}=await import("./secp256k1-r5tEV53R.js");return{secp256k1:o}},__vite__mapDeps([27,1,2,3,4,5,6,7,8]));return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:d,s:u,v:h,yParity:_}=t,p=Number(_??h),f=Mo(p);return new r.Signature(Ji(d),Ji(u)).addRecoveryBit(f)}const o=sr(t)?t:Zi(t);if(Gi(o)!==65)throw new Error("invalid signature length");const c=q_(`0x${o.slice(130)}`),l=Mo(c);return r.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(l)})().recoverPublicKey(e.substring(2)).toHex(!1)}`}function Mo(n){if(n===0||n===1)return n;if(n===27)return 0;if(n===28)return 1;throw new Error("Invalid yParityOrV value")}async function Ip({hash:n,signature:t}){return vp(await bp({hash:n,signature:t}))}var Ap={};const Tp=":";function Vr(n){const[t,e]=n.split(Tp);return{namespace:t,reference:e}}function fl(n,t){return n.includes(":")?[n]:t.chains||[]}var Pp=Object.defineProperty,Op=Object.defineProperties,Rp=Object.getOwnPropertyDescriptors,Bo=Object.getOwnPropertySymbols,Lp=Object.prototype.hasOwnProperty,Dp=Object.prototype.propertyIsEnumerable,Yi=(n,t,e)=>t in n?Pp(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,jo=(n,t)=>{for(var e in t||(t={}))Lp.call(t,e)&&Yi(n,e,t[e]);if(Bo)for(var e of Bo(t))Dp.call(t,e)&&Yi(n,e,t[e]);return n},Vp=(n,t)=>Op(n,Rp(t)),zo=(n,t,e)=>Yi(n,typeof t!="symbol"?t+"":t,e);const Sp="ReactNative",Ke={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},xp="js";function Fr(){return typeof Bt<"u"&&typeof Bt.versions<"u"&&typeof Bt.versions.node<"u"}function Ft(){return!bn()&&!!Rc()&&navigator.product===Sp}function Cp(){return Ft()&&typeof F<"u"&&typeof(F==null?void 0:F.Platform)<"u"&&(F==null?void 0:F.Platform.OS)==="android"}function $p(){return Ft()&&typeof F<"u"&&typeof(F==null?void 0:F.Platform)<"u"&&(F==null?void 0:F.Platform.OS)==="ios"}function Vn(){return!Fr()&&!!Rc()&&!!bn()}function mr(){return Ft()?Ke.reactNative:Fr()?Ke.node:Vn()?Ke.browser:Ke.unknown}function Fo(){var n;try{return Ft()&&typeof F<"u"&&typeof(F==null?void 0:F.Application)<"u"?(n=F.Application)==null?void 0:n.applicationId:void 0}catch{return}}function kp(n,t){const e=new URLSearchParams(n);for(const r of Object.keys(t).sort())if(t.hasOwnProperty(r)){const i=t[r];i!==void 0&&e.set(r,i)}return e.toString()}function Np(n){var t,e;const r=ml();try{return n!=null&&n.url&&r.url&&new URL(n.url).host!==new URL(r.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${n.url} differs from the actual page url:${r.url}. This is probably unintended and can lead to issues.`),n.url=r.url),(t=n==null?void 0:n.icons)!=null&&t.length&&n.icons.length>0&&(n.icons=n.icons.filter(i=>i!=="")),Vp(jo(jo({},r),n),{url:(n==null?void 0:n.url)||r.url,name:(n==null?void 0:n.name)||r.name,description:(n==null?void 0:n.description)||r.description,icons:(e=n==null?void 0:n.icons)!=null&&e.length&&n.icons.length>0?n.icons:r.icons})}catch(i){return console.warn("Error populating app metadata",i),n||r}}function ml(){return xd()||{name:"",description:"",url:"",icons:[""]}}function Up(){if(mr()===Ke.reactNative&&typeof F<"u"&&typeof(F==null?void 0:F.Platform)<"u"){const{OS:e,Version:r}=F.Platform;return[e,r].join("-")}const n=$d();if(n===null)return"unknown";const t=n.os?n.os.replace(" ","").toLowerCase():"unknown";return n.type==="browser"?[t,n.name,n.version].join("-"):[t,n.version].join("-")}function qp(){var n;const t=mr();return t===Ke.browser?[t,((n=kd())==null?void 0:n.host)||"unknown"].join(":"):t}function yl(n,t,e){const r=Up(),i=qp();return[[n,t].join("-"),[xp,e].join("-"),r,i].join("/")}function Mp({protocol:n,version:t,relayUrl:e,sdkVersion:r,auth:i,projectId:s,useOnCloseEvent:o,bundleId:c,packageName:l}){const d=e.split("?"),u=yl(n,t,r),h={auth:i,ua:u,projectId:s,useOnCloseEvent:o,packageName:l||void 0,bundleId:c||void 0},_=kp(d[1]||"",h);return d[0]+"?"+_}function Yt(n,t){return n.filter(e=>t.includes(e)).length===n.length}function Qi(n){return Object.fromEntries(n.entries())}function Xi(n){return new Map(Object.entries(n))}function Gt(n=U.FIVE_MINUTES,t){const e=U.toMiliseconds(n||U.FIVE_MINUTES);let r,i,s,o;return{resolve:c=>{s&&r&&(clearTimeout(s),r(c),o=Promise.resolve(c))},reject:c=>{s&&i&&(clearTimeout(s),i(c))},done:()=>new Promise((c,l)=>{if(o)return c(o);s=setTimeout(()=>{const d=new Error(t);o=Promise.reject(d),l(d)},e),r=c,i=l})}}function _t(n,t,e){return new Promise(async(r,i)=>{const s=setTimeout(()=>i(new Error(e)),t);try{const o=await n;r(o)}catch(o){i(o)}clearTimeout(s)})}function wl(n,t){if(typeof t=="string"&&t.startsWith(`${n}:`))return t;if(n.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(n.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${n}`)}function Bp(n){return wl("topic",n)}function jp(n){return wl("id",n)}function gl(n){const[t,e]=n.split(":"),r={id:void 0,topic:void 0};if(t==="topic"&&typeof e=="string")r.topic=e;else if(t==="id"&&Number.isInteger(Number(e)))r.id=Number(e);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${e}`);return r}function pe(n,t){return U.fromMiliseconds(Date.now()+U.toMiliseconds(n))}function kt(n){return Date.now()>=U.toMiliseconds(n)}function X(n,t){return`${n}${t?`:${t}`:""}`}function tn(n=[],t=[]){return[...new Set([...n,...t])]}async function zp({id:n,topic:t,wcDeepLink:e}){var r;try{if(!e)return;const i=typeof e=="string"?JSON.parse(e):e,s=i==null?void 0:i.href;if(typeof s!="string")return;const o=Fp(s,n,t),c=mr();if(c===Ke.browser){if(!((r=bn())!=null&&r.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}Kp(o)}else c===Ke.reactNative&&typeof(F==null?void 0:F.Linking)<"u"&&await F.Linking.openURL(o)}catch(i){console.error(i)}}function Fp(n,t,e){const r=`requestId=${t}&sessionTopic=${e}`;n.endsWith("/")&&(n=n.slice(0,-1));let i=`${n}`;if(n.startsWith("https://t.me")){const s=n.includes("?")?"&startapp=":"?startapp=";i=`${i}${s}${Jp(r,!0)}`}else i=`${i}/wc?${r}`;return i}function Kp(n){let t="_self";Gp()?t="_top":(Hp()||n.startsWith("https://")||n.startsWith("http://"))&&(t="_blank"),window.open(n,t,"noreferrer noopener")}async function Wp(n,t){let e="";try{if(Vn()&&(e=localStorage.getItem(t),e))return e;e=await n.getItem(t)}catch(r){console.error(r)}return e}function Ko(n,t){if(!n.includes(t))return null;const e=n.split(/([&,?,=])/),r=e.indexOf(t);return e[r+2]}function Wo(){return typeof crypto<"u"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,n=>{const t=Math.random()*16|0;return(n==="x"?t:t&3|8).toString(16)})}function Ws(){return typeof Bt<"u"&&Ap.IS_VITEST==="true"}function Hp(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function Gp(){try{return window.self!==window.top}catch{return!1}}function Jp(n,t=!1){const e=te.from(n).toString("base64");return t?e.replace(/[=]/g,""):e}function El(n){return te.from(n,"base64").toString("utf-8")}function Zp(n){return new Promise(t=>setTimeout(t,n))}let Yp=class{constructor({limit:t}){zo(this,"limit"),zo(this,"set"),this.limit=t,this.set=new Set}add(t){if(!this.set.has(t)){if(this.set.size>=this.limit){const e=this.set.values().next().value;e&&this.set.delete(e)}this.set.add(t)}}has(t){return this.set.has(t)}};const Ar=BigInt(2**32-1),Ho=BigInt(32);function vl(n,t=!1){return t?{h:Number(n&Ar),l:Number(n>>Ho&Ar)}:{h:Number(n>>Ho&Ar)|0,l:Number(n&Ar)|0}}function bl(n,t=!1){const e=n.length;let r=new Uint32Array(e),i=new Uint32Array(e);for(let s=0;s<e;s++){const{h:o,l:c}=vl(n[s],t);[r[s],i[s]]=[o,c]}return[r,i]}const Go=(n,t,e)=>n>>>e,Jo=(n,t,e)=>n<<32-e|t>>>e,Nt=(n,t,e)=>n>>>e|t<<32-e,Ut=(n,t,e)=>n<<32-e|t>>>e,Wn=(n,t,e)=>n<<64-e|t>>>e-32,Hn=(n,t,e)=>n>>>e-32|t<<64-e,Qp=(n,t)=>t,Xp=(n,t)=>n,ef=(n,t,e)=>n<<e|t>>>32-e,tf=(n,t,e)=>t<<e|n>>>32-e,nf=(n,t,e)=>t<<e-32|n>>>64-e,rf=(n,t,e)=>n<<e-32|t>>>64-e;function rt(n,t,e,r){const i=(t>>>0)+(r>>>0);return{h:n+e+(i/2**32|0)|0,l:i|0}}const Hs=(n,t,e)=>(n>>>0)+(t>>>0)+(e>>>0),Gs=(n,t,e,r)=>t+e+r+(n/2**32|0)|0,sf=(n,t,e,r)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0),of=(n,t,e,r,i)=>t+e+r+i+(n/2**32|0)|0,af=(n,t,e,r,i)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0)+(i>>>0),cf=(n,t,e,r,i,s)=>t+e+r+i+s+(n/2**32|0)|0,fn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Js(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function Pt(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function Xe(n,...t){if(!Js(n))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(n.length))throw new Error("Uint8Array expected of length "+t+", got length="+n.length)}function Zs(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Pt(n.outputLen),Pt(n.blockLen)}function zt(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function Ys(n,t){Xe(n);const e=t.outputLen;if(n.length<e)throw new Error("digestInto() expects output buffer of length at least "+e)}function ar(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function et(...n){for(let t=0;t<n.length;t++)n[t].fill(0)}function gi(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}function at(n,t){return n<<32-t|n>>>t}const Il=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Al(n){return n<<24&4278190080|n<<8&16711680|n>>>8&65280|n>>>24&255}const vt=Il?n=>n:n=>Al(n);function lf(n){for(let t=0;t<n.length;t++)n[t]=Al(n[t]);return n}const qt=Il?n=>n:lf,Tl=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",uf=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"));function cr(n){if(Xe(n),Tl)return n.toHex();let t="";for(let e=0;e<n.length;e++)t+=uf[n[e]];return t}const gt={_0:48,_9:57,A:65,F:70,a:97,f:102};function Zo(n){if(n>=gt._0&&n<=gt._9)return n-gt._0;if(n>=gt.A&&n<=gt.F)return n-(gt.A-10);if(n>=gt.a&&n<=gt.f)return n-(gt.a-10)}function Qs(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);if(Tl)return Uint8Array.fromHex(n);const t=n.length,e=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(e);for(let i=0,s=0;i<e;i++,s+=2){const o=Zo(n.charCodeAt(s)),c=Zo(n.charCodeAt(s+1));if(o===void 0||c===void 0){const l=n[s]+n[s+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+s)}r[i]=o*16+c}return r}function df(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}function st(n){return typeof n=="string"&&(n=df(n)),Xe(n),n}function Qt(...n){let t=0;for(let r=0;r<n.length;r++){const i=n[r];Xe(i),t+=i.length}const e=new Uint8Array(t);for(let r=0,i=0;r<n.length;r++){const s=n[r];e.set(s,i),i+=s.length}return e}class ni{}function yr(n){const t=r=>n().update(st(r)).digest(),e=n();return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=()=>n(),t}function hf(n){const t=(r,i)=>n(i).update(st(r)).digest(),e=n({});return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=r=>n(r),t}function Sn(n=32){if(fn&&typeof fn.getRandomValues=="function")return fn.getRandomValues(new Uint8Array(n));if(fn&&typeof fn.randomBytes=="function")return Uint8Array.from(fn.randomBytes(n));throw new Error("crypto.getRandomValues must be defined")}const _f=BigInt(0),Nn=BigInt(1),pf=BigInt(2),ff=BigInt(7),mf=BigInt(256),yf=BigInt(113),Pl=[],Ol=[],Rl=[];for(let n=0,t=Nn,e=1,r=0;n<24;n++){[e,r]=[r,(2*e+3*r)%5],Pl.push(2*(5*r+e)),Ol.push((n+1)*(n+2)/2%64);let i=_f;for(let s=0;s<7;s++)t=(t<<Nn^(t>>ff)*yf)%mf,t&pf&&(i^=Nn<<(Nn<<BigInt(s))-Nn);Rl.push(i)}const Ll=bl(Rl,!0),wf=Ll[0],gf=Ll[1],Yo=(n,t,e)=>e>32?nf(n,t,e):ef(n,t,e),Qo=(n,t,e)=>e>32?rf(n,t,e):tf(n,t,e);function Ef(n,t=24){const e=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let o=0;o<10;o++)e[o]=n[o]^n[o+10]^n[o+20]^n[o+30]^n[o+40];for(let o=0;o<10;o+=2){const c=(o+8)%10,l=(o+2)%10,d=e[l],u=e[l+1],h=Yo(d,u,1)^e[c],_=Qo(d,u,1)^e[c+1];for(let p=0;p<50;p+=10)n[o+p]^=h,n[o+p+1]^=_}let i=n[2],s=n[3];for(let o=0;o<24;o++){const c=Ol[o],l=Yo(i,s,c),d=Qo(i,s,c),u=Pl[o];i=n[u],s=n[u+1],n[u]=l,n[u+1]=d}for(let o=0;o<50;o+=10){for(let c=0;c<10;c++)e[c]=n[o+c];for(let c=0;c<10;c++)n[o+c]^=~e[(c+2)%10]&e[(c+4)%10]}n[0]^=wf[r],n[1]^=gf[r]}et(e)}let vf=class Dl extends ni{constructor(t,e,r,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=s,Pt(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=ar(this.state)}clone(){return this._cloneInto()}keccak(){qt(this.state32),Ef(this.state32,this.rounds),qt(this.state32),this.posOut=0,this.pos=0}update(t){zt(this),t=st(t),Xe(t);const{blockLen:e,state:r}=this,i=t.length;for(let s=0;s<i;){const o=Math.min(e-this.pos,i-s);for(let c=0;c<o;c++)r[this.pos++]^=t[s++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:i}=this;t[r]^=e,e&128&&r===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){zt(this,!1),Xe(t),this.finish();const e=this.state,{blockLen:r}=this;for(let i=0,s=t.length;i<s;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,s-i);t.set(e.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Pt(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Ys(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,et(this.state)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:i,rounds:s,enableXOF:o}=this;return t||(t=new Dl(e,r,i,o,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}};const bf=(n,t,e)=>yr(()=>new vf(t,n,e)),If=bf(1,136,256/8);function Af(n,t,e,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,e,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(e>>i&s),c=Number(e&s),l=r?4:0,d=r?0:4;n.setUint32(t+l,o,r),n.setUint32(t+d,c,r)}function Tf(n,t,e){return n&t^~n&e}function Pf(n,t,e){return n&t^n&e^t&e}let Vl=class extends ni{constructor(t,e,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(t),this.view=gi(this.buffer)}update(t){zt(this),t=st(t),Xe(t);const{view:e,buffer:r,blockLen:i}=this,s=t.length;for(let o=0;o<s;){const c=Math.min(i-this.pos,s-o);if(c===i){const l=gi(t);for(;i<=s-o;o+=i)this.process(l,o);continue}r.set(t.subarray(o,o+c),this.pos),this.pos+=c,o+=c,this.pos===i&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){zt(this),Ys(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:i,isLE:s}=this;let{pos:o}=this;e[o++]=128,et(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(r,0),o=0);for(let h=o;h<i;h++)e[h]=0;Af(r,i-8,BigInt(this.length*8),s),this.process(r,0);const c=gi(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=l/4,u=this.get();if(d>u.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<d;h++)c.setUint32(4*h,u[h],s)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:i,finished:s,destroyed:o,pos:c}=this;return t.destroyed=o,t.finished=s,t.length=i,t.pos=c,i%e&&t.buffer.set(r),t}clone(){return this._cloneInto()}};const Rt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ae=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Te=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Of=Uint32Array.from([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]),Lt=new Uint32Array(64);let Rf=class extends Vl{constructor(t=32){super(64,t,8,!1),this.A=Rt[0]|0,this.B=Rt[1]|0,this.C=Rt[2]|0,this.D=Rt[3]|0,this.E=Rt[4]|0,this.F=Rt[5]|0,this.G=Rt[6]|0,this.H=Rt[7]|0}get(){const{A:t,B:e,C:r,D:i,E:s,F:o,G:c,H:l}=this;return[t,e,r,i,s,o,c,l]}set(t,e,r,i,s,o,c,l){this.A=t|0,this.B=e|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=c|0,this.H=l|0}process(t,e){for(let h=0;h<16;h++,e+=4)Lt[h]=t.getUint32(e,!1);for(let h=16;h<64;h++){const _=Lt[h-15],p=Lt[h-2],f=at(_,7)^at(_,18)^_>>>3,m=at(p,17)^at(p,19)^p>>>10;Lt[h]=m+Lt[h-7]+f+Lt[h-16]|0}let{A:r,B:i,C:s,D:o,E:c,F:l,G:d,H:u}=this;for(let h=0;h<64;h++){const _=at(c,6)^at(c,11)^at(c,25),p=u+_+Tf(c,l,d)+Of[h]+Lt[h]|0,f=(at(r,2)^at(r,13)^at(r,22))+Pf(r,i,s)|0;u=d,d=l,l=c,c=o+p|0,o=s,s=i,i=r,r=p+f|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,c=c+this.E|0,l=l+this.F|0,d=d+this.G|0,u=u+this.H|0,this.set(r,i,s,o,c,l,d,u)}roundClean(){et(Lt)}destroy(){this.set(0,0,0,0,0,0,0,0),et(this.buffer)}};const Sl=bl(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(n=>BigInt(n))),Lf=Sl[0],Df=Sl[1],Dt=new Uint32Array(80),Vt=new Uint32Array(80);let Xs=class extends Vl{constructor(t=64){super(128,t,16,!1),this.Ah=Te[0]|0,this.Al=Te[1]|0,this.Bh=Te[2]|0,this.Bl=Te[3]|0,this.Ch=Te[4]|0,this.Cl=Te[5]|0,this.Dh=Te[6]|0,this.Dl=Te[7]|0,this.Eh=Te[8]|0,this.El=Te[9]|0,this.Fh=Te[10]|0,this.Fl=Te[11]|0,this.Gh=Te[12]|0,this.Gl=Te[13]|0,this.Hh=Te[14]|0,this.Hl=Te[15]|0}get(){const{Ah:t,Al:e,Bh:r,Bl:i,Ch:s,Cl:o,Dh:c,Dl:l,Eh:d,El:u,Fh:h,Fl:_,Gh:p,Gl:f,Hh:m,Hl:y}=this;return[t,e,r,i,s,o,c,l,d,u,h,_,p,f,m,y]}set(t,e,r,i,s,o,c,l,d,u,h,_,p,f,m,y){this.Ah=t|0,this.Al=e|0,this.Bh=r|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=c|0,this.Dl=l|0,this.Eh=d|0,this.El=u|0,this.Fh=h|0,this.Fl=_|0,this.Gh=p|0,this.Gl=f|0,this.Hh=m|0,this.Hl=y|0}process(t,e){for(let g=0;g<16;g++,e+=4)Dt[g]=t.getUint32(e),Vt[g]=t.getUint32(e+=4);for(let g=16;g<80;g++){const b=Dt[g-15]|0,I=Vt[g-15]|0,L=Nt(b,I,1)^Nt(b,I,8)^Go(b,I,7),N=Ut(b,I,1)^Ut(b,I,8)^Jo(b,I,7),x=Dt[g-2]|0,w=Vt[g-2]|0,v=Nt(x,w,19)^Wn(x,w,61)^Go(x,w,6),A=Ut(x,w,19)^Hn(x,w,61)^Jo(x,w,6),T=sf(N,A,Vt[g-7],Vt[g-16]),O=of(T,L,v,Dt[g-7],Dt[g-16]);Dt[g]=O|0,Vt[g]=T|0}let{Ah:r,Al:i,Bh:s,Bl:o,Ch:c,Cl:l,Dh:d,Dl:u,Eh:h,El:_,Fh:p,Fl:f,Gh:m,Gl:y,Hh:E,Hl:P}=this;for(let g=0;g<80;g++){const b=Nt(h,_,14)^Nt(h,_,18)^Wn(h,_,41),I=Ut(h,_,14)^Ut(h,_,18)^Hn(h,_,41),L=h&p^~h&m,N=_&f^~_&y,x=af(P,I,N,Df[g],Vt[g]),w=cf(x,E,b,L,Lf[g],Dt[g]),v=x|0,A=Nt(r,i,28)^Wn(r,i,34)^Wn(r,i,39),T=Ut(r,i,28)^Hn(r,i,34)^Hn(r,i,39),O=r&s^r&c^s&c,V=i&o^i&l^o&l;E=m|0,P=y|0,m=p|0,y=f|0,p=h|0,f=_|0,{h,l:_}=rt(d|0,u|0,w|0,v|0),d=c|0,u=l|0,c=s|0,l=o|0,s=r|0,o=i|0;const S=Hs(v,T,V);r=Gs(S,w,A,O),i=S|0}({h:r,l:i}=rt(this.Ah|0,this.Al|0,r|0,i|0)),{h:s,l:o}=rt(this.Bh|0,this.Bl|0,s|0,o|0),{h:c,l}=rt(this.Ch|0,this.Cl|0,c|0,l|0),{h:d,l:u}=rt(this.Dh|0,this.Dl|0,d|0,u|0),{h,l:_}=rt(this.Eh|0,this.El|0,h|0,_|0),{h:p,l:f}=rt(this.Fh|0,this.Fl|0,p|0,f|0),{h:m,l:y}=rt(this.Gh|0,this.Gl|0,m|0,y|0),{h:E,l:P}=rt(this.Hh|0,this.Hl|0,E|0,P|0),this.set(r,i,s,o,c,l,d,u,h,_,p,f,m,y,E,P)}roundClean(){et(Dt,Vt)}destroy(){et(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},Vf=class extends Xs{constructor(){super(48),this.Ah=Ae[0]|0,this.Al=Ae[1]|0,this.Bh=Ae[2]|0,this.Bl=Ae[3]|0,this.Ch=Ae[4]|0,this.Cl=Ae[5]|0,this.Dh=Ae[6]|0,this.Dl=Ae[7]|0,this.Eh=Ae[8]|0,this.El=Ae[9]|0,this.Fh=Ae[10]|0,this.Fl=Ae[11]|0,this.Gh=Ae[12]|0,this.Gl=Ae[13]|0,this.Hh=Ae[14]|0,this.Hl=Ae[15]|0}};const Pe=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class Sf extends Xs{constructor(){super(32),this.Ah=Pe[0]|0,this.Al=Pe[1]|0,this.Bh=Pe[2]|0,this.Bl=Pe[3]|0,this.Ch=Pe[4]|0,this.Cl=Pe[5]|0,this.Dh=Pe[6]|0,this.Dl=Pe[7]|0,this.Eh=Pe[8]|0,this.El=Pe[9]|0,this.Fh=Pe[10]|0,this.Fl=Pe[11]|0,this.Gh=Pe[12]|0,this.Gl=Pe[13]|0,this.Hh=Pe[14]|0,this.Hl=Pe[15]|0}}const ri=yr(()=>new Rf),xf=yr(()=>new Xs),Cf=yr(()=>new Vf),$f=yr(()=>new Sf),kf=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),_e=Uint32Array.from([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),q=new Uint32Array(32);function St(n,t,e,r,i,s){const o=i[s],c=i[s+1];let l=q[2*n],d=q[2*n+1],u=q[2*t],h=q[2*t+1],_=q[2*e],p=q[2*e+1],f=q[2*r],m=q[2*r+1],y=Hs(l,u,o);d=Gs(y,d,h,c),l=y|0,{Dh:m,Dl:f}={Dh:m^d,Dl:f^l},{Dh:m,Dl:f}={Dh:Qp(m,f),Dl:Xp(m)},{h:p,l:_}=rt(p,_,m,f),{Bh:h,Bl:u}={Bh:h^p,Bl:u^_},{Bh:h,Bl:u}={Bh:Nt(h,u,24),Bl:Ut(h,u,24)},q[2*n]=l,q[2*n+1]=d,q[2*t]=u,q[2*t+1]=h,q[2*e]=_,q[2*e+1]=p,q[2*r]=f,q[2*r+1]=m}function xt(n,t,e,r,i,s){const o=i[s],c=i[s+1];let l=q[2*n],d=q[2*n+1],u=q[2*t],h=q[2*t+1],_=q[2*e],p=q[2*e+1],f=q[2*r],m=q[2*r+1],y=Hs(l,u,o);d=Gs(y,d,h,c),l=y|0,{Dh:m,Dl:f}={Dh:m^d,Dl:f^l},{Dh:m,Dl:f}={Dh:Nt(m,f,16),Dl:Ut(m,f,16)},{h:p,l:_}=rt(p,_,m,f),{Bh:h,Bl:u}={Bh:h^p,Bl:u^_},{Bh:h,Bl:u}={Bh:Wn(h,u,63),Bl:Hn(h,u,63)},q[2*n]=l,q[2*n+1]=d,q[2*t]=u,q[2*t+1]=h,q[2*e]=_,q[2*e+1]=p,q[2*r]=f,q[2*r+1]=m}function Nf(n,t={},e,r,i){if(Pt(e),n<0||n>e)throw new Error("outputLen bigger than keyLen");const{key:s,salt:o,personalization:c}=t;if(s!==void 0&&(s.length<1||s.length>e))throw new Error("key length must be undefined or 1.."+e);if(o!==void 0&&o.length!==r)throw new Error("salt must be undefined or "+r);if(c!==void 0&&c.length!==i)throw new Error("personalization must be undefined or "+i)}class Uf extends ni{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,Pt(t),Pt(e),this.blockLen=t,this.outputLen=e,this.buffer=new Uint8Array(t),this.buffer32=ar(this.buffer)}update(t){zt(this),t=st(t),Xe(t);const{blockLen:e,buffer:r,buffer32:i}=this,s=t.length,o=t.byteOffset,c=t.buffer;for(let l=0;l<s;){this.pos===e&&(qt(i),this.compress(i,0,!1),qt(i),this.pos=0);const d=Math.min(e-this.pos,s-l),u=o+l;if(d===e&&!(u%4)&&l+d<s){const h=new Uint32Array(c,u,Math.floor((s-l)/4));qt(h);for(let _=0;l+e<s;_+=i.length,l+=e)this.length+=e,this.compress(h,_,!1);qt(h);continue}r.set(t.subarray(l,l+d),this.pos),this.pos+=d,this.length+=d,l+=d}return this}digestInto(t){zt(this),Ys(t,this);const{pos:e,buffer32:r}=this;this.finished=!0,et(this.buffer.subarray(e)),qt(r),this.compress(r,0,!0),qt(r);const i=ar(t);this.get().forEach((s,o)=>i[o]=vt(s))}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){const{buffer:e,length:r,finished:i,destroyed:s,outputLen:o,pos:c}=this;return t||(t=new this.constructor({dkLen:o})),t.set(...this.get()),t.buffer.set(e),t.destroyed=s,t.finished=i,t.length=r,t.pos=c,t.outputLen=o,t}clone(){return this._cloneInto()}}class qf extends Uf{constructor(t={}){const e=t.dkLen===void 0?64:t.dkLen;super(128,e),this.v0l=_e[0]|0,this.v0h=_e[1]|0,this.v1l=_e[2]|0,this.v1h=_e[3]|0,this.v2l=_e[4]|0,this.v2h=_e[5]|0,this.v3l=_e[6]|0,this.v3h=_e[7]|0,this.v4l=_e[8]|0,this.v4h=_e[9]|0,this.v5l=_e[10]|0,this.v5h=_e[11]|0,this.v6l=_e[12]|0,this.v6h=_e[13]|0,this.v7l=_e[14]|0,this.v7h=_e[15]|0,Nf(e,t,64,16,16);let{key:r,personalization:i,salt:s}=t,o=0;if(r!==void 0&&(r=st(r),o=r.length),this.v0l^=this.outputLen|o<<8|65536|1<<24,s!==void 0){s=st(s);const c=ar(s);this.v4l^=vt(c[0]),this.v4h^=vt(c[1]),this.v5l^=vt(c[2]),this.v5h^=vt(c[3])}if(i!==void 0){i=st(i);const c=ar(i);this.v6l^=vt(c[0]),this.v6h^=vt(c[1]),this.v7l^=vt(c[2]),this.v7h^=vt(c[3])}if(r!==void 0){const c=new Uint8Array(this.blockLen);c.set(r),this.update(c)}}get(){let{v0l:t,v0h:e,v1l:r,v1h:i,v2l:s,v2h:o,v3l:c,v3h:l,v4l:d,v4h:u,v5l:h,v5h:_,v6l:p,v6h:f,v7l:m,v7h:y}=this;return[t,e,r,i,s,o,c,l,d,u,h,_,p,f,m,y]}set(t,e,r,i,s,o,c,l,d,u,h,_,p,f,m,y){this.v0l=t|0,this.v0h=e|0,this.v1l=r|0,this.v1h=i|0,this.v2l=s|0,this.v2h=o|0,this.v3l=c|0,this.v3h=l|0,this.v4l=d|0,this.v4h=u|0,this.v5l=h|0,this.v5h=_|0,this.v6l=p|0,this.v6h=f|0,this.v7l=m|0,this.v7h=y|0}compress(t,e,r){this.get().forEach((l,d)=>q[d]=l),q.set(_e,16);let{h:i,l:s}=vl(BigInt(this.length));q[24]=_e[8]^s,q[25]=_e[9]^i,r&&(q[28]=~q[28],q[29]=~q[29]);let o=0;const c=kf;for(let l=0;l<12;l++)St(0,4,8,12,t,e+2*c[o++]),xt(0,4,8,12,t,e+2*c[o++]),St(1,5,9,13,t,e+2*c[o++]),xt(1,5,9,13,t,e+2*c[o++]),St(2,6,10,14,t,e+2*c[o++]),xt(2,6,10,14,t,e+2*c[o++]),St(3,7,11,15,t,e+2*c[o++]),xt(3,7,11,15,t,e+2*c[o++]),St(0,5,10,15,t,e+2*c[o++]),xt(0,5,10,15,t,e+2*c[o++]),St(1,6,11,12,t,e+2*c[o++]),xt(1,6,11,12,t,e+2*c[o++]),St(2,7,8,13,t,e+2*c[o++]),xt(2,7,8,13,t,e+2*c[o++]),St(3,4,9,14,t,e+2*c[o++]),xt(3,4,9,14,t,e+2*c[o++]);this.v0l^=q[0]^q[16],this.v0h^=q[1]^q[17],this.v1l^=q[2]^q[18],this.v1h^=q[3]^q[19],this.v2l^=q[4]^q[20],this.v2h^=q[5]^q[21],this.v3l^=q[6]^q[22],this.v3h^=q[7]^q[23],this.v4l^=q[8]^q[24],this.v4h^=q[9]^q[25],this.v5l^=q[10]^q[26],this.v5h^=q[11]^q[27],this.v6l^=q[12]^q[28],this.v6h^=q[13]^q[29],this.v7l^=q[14]^q[30],this.v7h^=q[15]^q[31],et(q)}destroy(){this.destroyed=!0,et(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Mf=hf(n=>new qf(n)),Bf="https://rpc.walletconnect.org/v1";function xl(n){const t=`Ethereum Signed Message:
|
|
5
|
+
${n.length}`,e=new TextEncoder().encode(t+n);return"0x"+te.from(If(e)).toString("hex")}async function jf(n,t,e,r,i,s){switch(e.t){case"eip191":return await zf(n,t,e.s);case"eip1271":return await Ff(n,t,e.s,r,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${e.t}`)}}async function zf(n,t,e){return(await Ip({hash:xl(t),signature:e})).toLowerCase()===n.toLowerCase()}async function Ff(n,t,e,r,i,s){const o=Vr(r);if(!o.namespace||!o.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${r}`);try{const c="0x1626ba7e",l="0000000000000000000000000000000000000000000000000000000000000040",d=e.substring(2),u=(d.length/2).toString(16).padStart(64,"0"),h=(t.startsWith("0x")?t:xl(t)).substring(2),_=c+h+l+u+d,p=await fetch(`${s||Bf}/?chainId=${r}&projectId=${i}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:Kf(),jsonrpc:"2.0",method:"eth_call",params:[{to:n,data:_},"latest"]})}),{result:f}=await p.json();return f?f.slice(0,c.length).toLowerCase()===c.toLowerCase():!1}catch(c){return console.error("isValidEip1271Signature: ",c),!1}}function Kf(){return Date.now()+Math.floor(Math.random()*1e3)}function Wf(n){const t=atob(n),e=new Uint8Array(t.length);for(let o=0;o<t.length;o++)e[o]=t.charCodeAt(o);const r=e[0];if(r===0)throw new Error("No signatures found");const i=1+r*64;if(e.length<i)throw new Error("Transaction data too short for claimed signature count");if(e.length<100)throw new Error("Transaction too short");const s=te.from(n,"base64").slice(1,65);return pr.encode(s)}function Hf(n){const t=new Uint8Array(te.from(n,"base64")),e=Array.from("TransactionData::").map(s=>s.charCodeAt(0)),r=new Uint8Array(e.length+t.length);r.set(e),r.set(t,e.length);const i=Mf(r,{dkLen:32});return pr.encode(i)}function Xo(n){const t=new Uint8Array(ri(Gf(n)));return pr.encode(t)}function Gf(n){if(n instanceof Uint8Array)return n;if(Array.isArray(n))return new Uint8Array(n);if(typeof n=="object"&&n!=null&&n.data)return new Uint8Array(Object.values(n.data));if(typeof n=="object"&&n)return new Uint8Array(Object.values(n));throw new Error("getNearUint8ArrayFromBytes: Unexpected result type from bytes array")}function ea(n){const t=te.from(n,"base64"),e=Nd(t).txn;if(!e)throw new Error("Invalid signed transaction: missing 'txn' field");const r=Ud(e),i=te.from("TX"),s=te.concat([i,te.from(r)]),o=$f(s);return qd.encode(o).replace(/=+$/,"")}function Ei(n){const t=[];let e=BigInt(n);for(;e>=BigInt(128);)t.push(Number(e&BigInt(127)|BigInt(128))),e>>=BigInt(7);return t.push(Number(e)),te.from(t)}function Jf(n){const t=te.from(n.signed.bodyBytes,"base64"),e=te.from(n.signed.authInfoBytes,"base64"),r=te.from(n.signature.signature,"base64"),i=[];i.push(te.from([10])),i.push(Ei(t.length)),i.push(t),i.push(te.from([18])),i.push(Ei(e.length)),i.push(e),i.push(te.from([26])),i.push(Ei(r.length)),i.push(r);const s=te.concat(i),o=ri(s);return te.from(o).toString("hex").toUpperCase()}var Zf=Object.defineProperty,Yf=Object.defineProperties,Qf=Object.getOwnPropertyDescriptors,ta=Object.getOwnPropertySymbols,Xf=Object.prototype.hasOwnProperty,em=Object.prototype.propertyIsEnumerable,na=(n,t,e)=>t in n?Zf(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,tm=(n,t)=>{for(var e in t||(t={}))Xf.call(t,e)&&na(n,e,t[e]);if(ta)for(var e of ta(t))em.call(t,e)&&na(n,e,t[e]);return n},nm=(n,t)=>Yf(n,Qf(t));const rm="did:pkh:",eo=n=>n==null?void 0:n.split(":"),im=n=>{const t=n&&eo(n);if(t)return n.includes(rm)?t[3]:t[1]},es=n=>{const t=n&&eo(n);if(t)return t[2]+":"+t[3]},Kr=n=>{const t=n&&eo(n);if(t)return t.pop()};async function ra(n){const{cacao:t,projectId:e}=n,{s:r,p:i}=t,s=Cl(i,i.iss),o=Kr(i.iss);return await jf(o,s,r,es(i.iss),e)}const Cl=(n,t)=>{const e=`${n.domain} wants you to sign in with your Ethereum account:`,r=Kr(t);if(!n.aud&&!n.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=n.statement||void 0;const s=`URI: ${n.aud||n.uri}`,o=`Version: ${n.version}`,c=`Chain ID: ${im(t)}`,l=`Nonce: ${n.nonce}`,d=`Issued At: ${n.iat}`,u=n.exp?`Expiration Time: ${n.exp}`:void 0,h=n.nbf?`Not Before: ${n.nbf}`:void 0,_=n.requestId?`Request ID: ${n.requestId}`:void 0,p=n.resources?`Resources:${n.resources.map(m=>`
|
|
6
|
+
- ${m}`).join("")}`:void 0,f=Sr(n.resources);if(f){const m=lr(f);i=_m(i,m)}return[e,r,"",i,"",s,o,c,l,d,u,h,_,p].filter(m=>m!=null).join(`
|
|
7
|
+
`)};function sm(n){return te.from(JSON.stringify(n)).toString("base64")}function om(n){return JSON.parse(te.from(n,"base64").toString("utf-8"))}function sn(n){if(!n)throw new Error("No recap provided, value is undefined");if(!n.att)throw new Error("No `att` property found");const t=Object.keys(n.att);if(!(t!=null&&t.length))throw new Error("No resources found in `att` property");t.forEach(e=>{const r=n.att[e];if(Array.isArray(r))throw new Error(`Resource must be an object: ${e}`);if(typeof r!="object")throw new Error(`Resource must be an object: ${e}`);if(!Object.keys(r).length)throw new Error(`Resource object is empty: ${e}`);Object.keys(r).forEach(i=>{const s=r[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${o}`)})})})}function am(n,t,e,r={}){return e==null||e.sort((i,s)=>i.localeCompare(s)),{att:{[n]:cm(t,e,r)}}}function cm(n,t,e={}){t=t==null?void 0:t.sort((i,s)=>i.localeCompare(s));const r=t.map(i=>({[`${n}/${i}`]:[e]}));return Object.assign({},...r)}function $l(n){return sn(n),`urn:recap:${sm(n).replace(/=/g,"")}`}function lr(n){const t=om(n.replace("urn:recap:",""));return sn(t),t}function lm(n,t,e){const r=am(n,t,e);return $l(r)}function um(n){return n&&n.includes("urn:recap:")}function dm(n,t){const e=lr(n),r=lr(t),i=hm(e,r);return $l(i)}function hm(n,t){sn(n),sn(t);const e=Object.keys(n.att).concat(Object.keys(t.att)).sort((i,s)=>i.localeCompare(s)),r={att:{}};return e.forEach(i=>{var s,o;Object.keys(((s=n.att)==null?void 0:s[i])||{}).concat(Object.keys(((o=t.att)==null?void 0:o[i])||{})).sort((c,l)=>c.localeCompare(l)).forEach(c=>{var l,d;r.att[i]=nm(tm({},r.att[i]),{[c]:((l=n.att[i])==null?void 0:l[c])||((d=t.att[i])==null?void 0:d[c])})})}),r}function _m(n="",t){sn(t);const e="I further authorize the stated URI to perform the following actions on my behalf: ";if(n.includes(e))return n;const r=[];let i=0;Object.keys(t.att).forEach(c=>{const l=Object.keys(t.att[c]).map(h=>({ability:h.split("/")[0],action:h.split("/")[1]}));l.sort((h,_)=>h.action.localeCompare(_.action));const d={};l.forEach(h=>{d[h.ability]||(d[h.ability]=[]),d[h.ability].push(h.action)});const u=Object.keys(d).map(h=>(i++,`(${i}) '${h}': '${d[h].join("', '")}' for '${c}'.`));r.push(u.join(", ").replace(".,","."))});const s=r.join(" "),o=`${e}${s}`;return`${n?n+" ":""}${o}`}function ia(n){var t;const e=lr(n);sn(e);const r=(t=e.att)==null?void 0:t.eip155;return r?Object.keys(r).map(i=>i.split("/")[1]):[]}function sa(n){const t=lr(n);sn(t);const e=[];return Object.values(t.att).forEach(r=>{Object.values(r).forEach(i=>{var s;(s=i==null?void 0:i[0])!=null&&s.chains&&e.push(i[0].chains)})}),[...new Set(e.flat())]}function Sr(n){if(!n)return;const t=n==null?void 0:n[n.length-1];return um(t)?t:void 0}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function kl(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function ts(n){if(typeof n!="boolean")throw new Error(`boolean expected, not ${n}`)}function vi(n){if(!Number.isSafeInteger(n)||n<0)throw new Error("positive integer expected, got "+n)}function Ne(n,...t){if(!kl(n))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(n.length))throw new Error("Uint8Array expected of length "+t+", got length="+n.length)}function oa(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function pm(n,t){Ne(n);const e=t.outputLen;if(n.length<e)throw new Error("digestInto() expects output buffer of length at least "+e)}function jt(n){return new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4))}function In(...n){for(let t=0;t<n.length;t++)n[t].fill(0)}function fm(n){return new DataView(n.buffer,n.byteOffset,n.byteLength)}const mm=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ym(n){if(typeof n!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(n))}function ns(n){if(typeof n=="string")n=ym(n);else if(kl(n))n=rs(n);else throw new Error("Uint8Array expected, got "+typeof n);return n}function wm(n,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(n,t)}function gm(n,t){if(n.length!==t.length)return!1;let e=0;for(let r=0;r<n.length;r++)e|=n[r]^t[r];return e===0}const Em=(n,t)=>{function e(r,...i){if(Ne(r),!mm)throw new Error("Non little-endian hardware is not yet supported");if(n.nonceLength!==void 0){const d=i[0];if(!d)throw new Error("nonce / iv required");n.varSizeNonce?Ne(d):Ne(d,n.nonceLength)}const s=n.tagLength;s&&i[1]!==void 0&&Ne(i[1]);const o=t(r,...i),c=(d,u)=>{if(u!==void 0){if(d!==2)throw new Error("cipher output not supported");Ne(u)}};let l=!1;return{encrypt(d,u){if(l)throw new Error("cannot encrypt() twice with same key + nonce");return l=!0,Ne(d),c(o.encrypt.length,u),o.encrypt(d,u)},decrypt(d,u){if(Ne(d),s&&d.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return c(o.decrypt.length,u),o.decrypt(d,u)}}}return Object.assign(e,n),e};function aa(n,t,e=!0){if(t===void 0)return new Uint8Array(n);if(t.length!==n)throw new Error("invalid output length, expected "+n+", got: "+t.length);if(e&&!bm(t))throw new Error("invalid output, must be aligned");return t}function ca(n,t,e,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,e,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(e>>i&s),c=Number(e&s);n.setUint32(t+4,o,r),n.setUint32(t+0,c,r)}function vm(n,t,e){ts(e);const r=new Uint8Array(16),i=fm(r);return ca(i,0,BigInt(t),e),ca(i,8,BigInt(n),e),r}function bm(n){return n.byteOffset%4===0}function rs(n){return Uint8Array.from(n)}const Nl=n=>Uint8Array.from(n.split("").map(t=>t.charCodeAt(0))),Im=Nl("expand 16-byte k"),Am=Nl("expand 32-byte k"),Tm=jt(Im),Pm=jt(Am);function Y(n,t){return n<<t|n>>>32-t}function is(n){return n.byteOffset%4===0}const Tr=64,Om=16,Ul=2**32-1,la=new Uint32Array;function Rm(n,t,e,r,i,s,o,c){const l=i.length,d=new Uint8Array(Tr),u=jt(d),h=is(i)&&is(s),_=h?jt(i):la,p=h?jt(s):la;for(let f=0;f<l;o++){if(n(t,e,r,u,o,c),o>=Ul)throw new Error("arx: counter overflow");const m=Math.min(Tr,l-f);if(h&&m===Tr){const y=f/4;if(f%4!==0)throw new Error("arx: invalid block position");for(let E=0,P;E<Om;E++)P=y+E,p[P]=_[P]^u[E];f+=Tr;continue}for(let y=0,E;y<m;y++)E=f+y,s[E]=i[E]^d[y];f+=m}}function Lm(n,t){const{allowShortKeys:e,extendNonceFn:r,counterLength:i,counterRight:s,rounds:o}=wm({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof n!="function")throw new Error("core must be a function");return vi(i),vi(o),ts(s),ts(e),(c,l,d,u,h=0)=>{Ne(c),Ne(l),Ne(d);const _=d.length;if(u===void 0&&(u=new Uint8Array(_)),Ne(u),vi(h),h<0||h>=Ul)throw new Error("arx: counter overflow");if(u.length<_)throw new Error(`arx: output (${u.length}) is shorter than data (${_})`);const p=[];let f=c.length,m,y;if(f===32)p.push(m=rs(c)),y=Pm;else if(f===16&&e)m=new Uint8Array(32),m.set(c),m.set(c,16),y=Tm,p.push(m);else throw new Error(`arx: invalid 32-byte key, got length=${f}`);is(l)||p.push(l=rs(l));const E=jt(m);if(r){if(l.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(y,E,jt(l.subarray(0,16)),E),l=l.subarray(16)}const P=16-i;if(P!==l.length)throw new Error(`arx: nonce must be ${P} or 16 bytes`);if(P!==12){const b=new Uint8Array(12);b.set(l,s?0:12-l.length),l=b,p.push(l)}const g=jt(l);return Rm(n,y,E,g,d,u,h,o),In(...p),u}}const ge=(n,t)=>n[t++]&255|(n[t++]&255)<<8;class Dm{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=ns(t),Ne(t,32);const e=ge(t,0),r=ge(t,2),i=ge(t,4),s=ge(t,6),o=ge(t,8),c=ge(t,10),l=ge(t,12),d=ge(t,14);this.r[0]=e&8191,this.r[1]=(e>>>13|r<<3)&8191,this.r[2]=(r>>>10|i<<6)&7939,this.r[3]=(i>>>7|s<<9)&8191,this.r[4]=(s>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|c<<2)&8191,this.r[7]=(c>>>11|l<<5)&8065,this.r[8]=(l>>>8|d<<8)&8191,this.r[9]=d>>>5&127;for(let u=0;u<8;u++)this.pad[u]=ge(t,16+2*u)}process(t,e,r=!1){const i=r?0:2048,{h:s,r:o}=this,c=o[0],l=o[1],d=o[2],u=o[3],h=o[4],_=o[5],p=o[6],f=o[7],m=o[8],y=o[9],E=ge(t,e+0),P=ge(t,e+2),g=ge(t,e+4),b=ge(t,e+6),I=ge(t,e+8),L=ge(t,e+10),N=ge(t,e+12),x=ge(t,e+14);let w=s[0]+(E&8191),v=s[1]+((E>>>13|P<<3)&8191),A=s[2]+((P>>>10|g<<6)&8191),T=s[3]+((g>>>7|b<<9)&8191),O=s[4]+((b>>>4|I<<12)&8191),V=s[5]+(I>>>1&8191),S=s[6]+((I>>>14|L<<2)&8191),C=s[7]+((L>>>11|N<<5)&8191),$=s[8]+((N>>>8|x<<8)&8191),M=s[9]+(x>>>5|i),D=0,j=D+w*c+v*(5*y)+A*(5*m)+T*(5*f)+O*(5*p);D=j>>>13,j&=8191,j+=V*(5*_)+S*(5*h)+C*(5*u)+$*(5*d)+M*(5*l),D+=j>>>13,j&=8191;let B=D+w*l+v*c+A*(5*y)+T*(5*m)+O*(5*f);D=B>>>13,B&=8191,B+=V*(5*p)+S*(5*_)+C*(5*h)+$*(5*u)+M*(5*d),D+=B>>>13,B&=8191;let z=D+w*d+v*l+A*c+T*(5*y)+O*(5*m);D=z>>>13,z&=8191,z+=V*(5*f)+S*(5*p)+C*(5*_)+$*(5*h)+M*(5*u),D+=z>>>13,z&=8191;let W=D+w*u+v*d+A*l+T*c+O*(5*y);D=W>>>13,W&=8191,W+=V*(5*m)+S*(5*f)+C*(5*p)+$*(5*_)+M*(5*h),D+=W>>>13,W&=8191;let K=D+w*h+v*u+A*d+T*l+O*c;D=K>>>13,K&=8191,K+=V*(5*y)+S*(5*m)+C*(5*f)+$*(5*p)+M*(5*_),D+=K>>>13,K&=8191;let H=D+w*_+v*h+A*u+T*d+O*l;D=H>>>13,H&=8191,H+=V*c+S*(5*y)+C*(5*m)+$*(5*f)+M*(5*p),D+=H>>>13,H&=8191;let ne=D+w*p+v*_+A*h+T*u+O*d;D=ne>>>13,ne&=8191,ne+=V*l+S*c+C*(5*y)+$*(5*m)+M*(5*f),D+=ne>>>13,ne&=8191;let ue=D+w*f+v*p+A*_+T*h+O*u;D=ue>>>13,ue&=8191,ue+=V*d+S*l+C*c+$*(5*y)+M*(5*m),D+=ue>>>13,ue&=8191;let ce=D+w*m+v*f+A*p+T*_+O*h;D=ce>>>13,ce&=8191,ce+=V*u+S*d+C*l+$*c+M*(5*y),D+=ce>>>13,ce&=8191;let oe=D+w*y+v*m+A*f+T*p+O*_;D=oe>>>13,oe&=8191,oe+=V*h+S*u+C*d+$*l+M*c,D+=oe>>>13,oe&=8191,D=(D<<2)+D|0,D=D+j|0,j=D&8191,D=D>>>13,B+=D,s[0]=j,s[1]=B,s[2]=z,s[3]=W,s[4]=K,s[5]=H,s[6]=ne,s[7]=ue,s[8]=ce,s[9]=oe}finalize(){const{h:t,pad:e}=this,r=new Uint16Array(10);let i=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=i,i=t[c]>>>13,t[c]&=8191;t[0]+=i*5,i=t[0]>>>13,t[0]&=8191,t[1]+=i,i=t[1]>>>13,t[1]&=8191,t[2]+=i,r[0]=t[0]+5,i=r[0]>>>13,r[0]&=8191;for(let c=1;c<10;c++)r[c]=t[c]+i,i=r[c]>>>13,r[c]&=8191;r[9]-=8192;let s=(i^1)-1;for(let c=0;c<10;c++)r[c]&=s;s=~s;for(let c=0;c<10;c++)t[c]=t[c]&s|r[c];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let o=t[0]+e[0];t[0]=o&65535;for(let c=1;c<8;c++)o=(t[c]+e[c]|0)+(o>>>16)|0,t[c]=o&65535;In(r)}update(t){oa(this),t=ns(t),Ne(t);const{buffer:e,blockLen:r}=this,i=t.length;for(let s=0;s<i;){const o=Math.min(r-this.pos,i-s);if(o===r){for(;r<=i-s;s+=r)this.process(t,s);continue}e.set(t.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===r&&(this.process(e,0,!1),this.pos=0)}return this}destroy(){In(this.h,this.r,this.buffer,this.pad)}digestInto(t){oa(this),pm(t,this),this.finished=!0;const{buffer:e,h:r}=this;let{pos:i}=this;if(i){for(e[i++]=1;i<16;i++)e[i]=0;this.process(e,0,!0)}this.finalize();let s=0;for(let o=0;o<8;o++)t[s++]=r[o]>>>0,t[s++]=r[o]>>>8;return t}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}}function Vm(n){const t=(r,i)=>n(i).update(ns(r)).digest(),e=n(new Uint8Array(32));return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=r=>n(r),t}const Sm=Vm(n=>new Dm(n));function xm(n,t,e,r,i,s=20){let o=n[0],c=n[1],l=n[2],d=n[3],u=t[0],h=t[1],_=t[2],p=t[3],f=t[4],m=t[5],y=t[6],E=t[7],P=i,g=e[0],b=e[1],I=e[2],L=o,N=c,x=l,w=d,v=u,A=h,T=_,O=p,V=f,S=m,C=y,$=E,M=P,D=g,j=b,B=I;for(let W=0;W<s;W+=2)L=L+v|0,M=Y(M^L,16),V=V+M|0,v=Y(v^V,12),L=L+v|0,M=Y(M^L,8),V=V+M|0,v=Y(v^V,7),N=N+A|0,D=Y(D^N,16),S=S+D|0,A=Y(A^S,12),N=N+A|0,D=Y(D^N,8),S=S+D|0,A=Y(A^S,7),x=x+T|0,j=Y(j^x,16),C=C+j|0,T=Y(T^C,12),x=x+T|0,j=Y(j^x,8),C=C+j|0,T=Y(T^C,7),w=w+O|0,B=Y(B^w,16),$=$+B|0,O=Y(O^$,12),w=w+O|0,B=Y(B^w,8),$=$+B|0,O=Y(O^$,7),L=L+A|0,B=Y(B^L,16),C=C+B|0,A=Y(A^C,12),L=L+A|0,B=Y(B^L,8),C=C+B|0,A=Y(A^C,7),N=N+T|0,M=Y(M^N,16),$=$+M|0,T=Y(T^$,12),N=N+T|0,M=Y(M^N,8),$=$+M|0,T=Y(T^$,7),x=x+O|0,D=Y(D^x,16),V=V+D|0,O=Y(O^V,12),x=x+O|0,D=Y(D^x,8),V=V+D|0,O=Y(O^V,7),w=w+v|0,j=Y(j^w,16),S=S+j|0,v=Y(v^S,12),w=w+v|0,j=Y(j^w,8),S=S+j|0,v=Y(v^S,7);let z=0;r[z++]=o+L|0,r[z++]=c+N|0,r[z++]=l+x|0,r[z++]=d+w|0,r[z++]=u+v|0,r[z++]=h+A|0,r[z++]=_+T|0,r[z++]=p+O|0,r[z++]=f+V|0,r[z++]=m+S|0,r[z++]=y+C|0,r[z++]=E+$|0,r[z++]=P+M|0,r[z++]=g+D|0,r[z++]=b+j|0,r[z++]=I+B|0}const Cm=Lm(xm,{counterRight:!1,counterLength:4,allowShortKeys:!1}),$m=new Uint8Array(16),ua=(n,t)=>{n.update(t);const e=t.length%16;e&&n.update($m.subarray(e))},km=new Uint8Array(32);function da(n,t,e,r,i){const s=n(t,e,km),o=Sm.create(s);i&&ua(o,i),ua(o,r);const c=vm(r.length,i?i.length:0,!0);o.update(c);const l=o.digest();return In(s,c),l}const Nm=n=>(t,e,r)=>({encrypt(i,s){const o=i.length;s=aa(o+16,s,!1),s.set(i);const c=s.subarray(0,-16);n(t,e,c,c,1);const l=da(n,t,e,c,r);return s.set(l,o),In(l),s},decrypt(i,s){s=aa(i.length-16,s,!1);const o=i.subarray(0,-16),c=i.subarray(-16),l=da(n,t,e,o,r);if(!gm(c,l))throw new Error("invalid tag");return s.set(i.subarray(0,-16)),n(t,e,s,s,1),In(l),s}}),ql=Em({blockSize:64,nonceLength:12,tagLength:16},Nm(Cm));let Ml=class extends ni{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,Zs(t);const r=st(e);if(this.iHash=t.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 i=this.blockLen,s=new Uint8Array(i);s.set(r.length>i?t.create().update(r).digest():r);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=t.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),et(s)}update(t){return zt(this),this.iHash.update(t),this}digestInto(t){zt(this),Xe(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:i,destroyed:s,blockLen:o,outputLen:c}=this;return t=t,t.finished=i,t.destroyed=s,t.blockLen=o,t.outputLen=c,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const ii=(n,t,e)=>new Ml(n,t).update(e).digest();ii.create=(n,t)=>new Ml(n,t);function Um(n,t,e){return Zs(n),e===void 0&&(e=new Uint8Array(n.outputLen)),ii(n,st(e),st(t))}const bi=Uint8Array.from([0]),ha=Uint8Array.of();function qm(n,t,e,r=32){Zs(n),Pt(r);const i=n.outputLen;if(r>255*i)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(r/i);e===void 0&&(e=ha);const o=new Uint8Array(s*i),c=ii.create(n,t),l=c._cloneInto(),d=new Uint8Array(c.outputLen);for(let u=0;u<s;u++)bi[0]=u+1,l.update(u===0?ha:d).update(e).update(bi).digestInto(d),o.set(d,i*u),c._cloneInto(l);return c.destroy(),l.destroy(),et(d,bi),o.slice(0,r)}const Mm=(n,t,e,r,i)=>qm(n,Um(n,t,e),r,i),si=ri,to=BigInt(0),ss=BigInt(1);function Wr(n,t){if(typeof t!="boolean")throw new Error(n+" boolean expected, got "+t)}function Pr(n){const t=n.toString(16);return t.length&1?"0"+t:t}function Bl(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);return n===""?to:BigInt("0x"+n)}function oi(n){return Bl(cr(n))}function Hr(n){return Xe(n),Bl(cr(Uint8Array.from(n).reverse()))}function no(n,t){return Qs(n.toString(16).padStart(t*2,"0"))}function ro(n,t){return no(n,t).reverse()}function ke(n,t,e){let r;if(typeof t=="string")try{r=Qs(t)}catch(s){throw new Error(n+" must be hex string or Uint8Array, cause: "+s)}else if(Js(t))r=Uint8Array.from(t);else throw new Error(n+" must be hex string or Uint8Array");const i=r.length;if(typeof e=="number"&&i!==e)throw new Error(n+" of length "+e+" expected, got "+i);return r}const Ii=n=>typeof n=="bigint"&&to<=n;function Bm(n,t,e){return Ii(n)&&Ii(t)&&Ii(e)&&t<=n&&n<e}function os(n,t,e,r){if(!Bm(t,e,r))throw new Error("expected valid "+n+": "+e+" <= n < "+r+", got "+t)}function jm(n){let t;for(t=0;n>to;n>>=ss,t+=1);return t}const ai=n=>(ss<<BigInt(n))-ss;function zm(n,t,e){if(typeof n!="number"||n<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");const r=_=>new Uint8Array(_),i=_=>Uint8Array.of(_);let s=r(n),o=r(n),c=0;const l=()=>{s.fill(1),o.fill(0),c=0},d=(..._)=>e(o,s,..._),u=(_=r(0))=>{o=d(i(0),_),s=d(),_.length!==0&&(o=d(i(1),_),s=d())},h=()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let _=0;const p=[];for(;_<t;){s=d();const f=s.slice();p.push(f),_+=s.length}return Qt(...p)};return(_,p)=>{l(),u(_);let f;for(;!(f=p(h()));)u();return l(),f}}function ci(n,t,e={}){if(!n||typeof n!="object")throw new Error("expected valid options object");function r(i,s,o){const c=n[i];if(o&&c===void 0)return;const l=typeof c;if(l!==s||c===null)throw new Error(`param "${i}" is invalid: expected ${s}, got ${l}`)}Object.entries(t).forEach(([i,s])=>r(i,s,!1)),Object.entries(e).forEach(([i,s])=>r(i,s,!0))}function _a(n){const t=new WeakMap;return(e,...r)=>{const i=t.get(e);if(i!==void 0)return i;const s=n(e,...r);return t.set(e,s),s}}const Me=BigInt(0),Ve=BigInt(1),Xt=BigInt(2),Fm=BigInt(3),jl=BigInt(4),zl=BigInt(5),Fl=BigInt(8);function Ye(n,t){const e=n%t;return e>=Me?e:t+e}function nt(n,t,e){let r=n;for(;t-- >Me;)r*=r,r%=e;return r}function pa(n,t){if(n===Me)throw new Error("invert: expected non-zero number");if(t<=Me)throw new Error("invert: expected positive modulus, got "+t);let e=Ye(n,t),r=t,i=Me,s=Ve;for(;e!==Me;){const o=r/e,c=r%e,l=i-s*o;r=e,e=c,i=s,s=l}if(r!==Ve)throw new Error("invert: does not exist");return Ye(i,t)}function Kl(n,t){const e=(n.ORDER+Ve)/jl,r=n.pow(t,e);if(!n.eql(n.sqr(r),t))throw new Error("Cannot find square root");return r}function Km(n,t){const e=(n.ORDER-zl)/Fl,r=n.mul(t,Xt),i=n.pow(r,e),s=n.mul(t,i),o=n.mul(n.mul(s,Xt),i),c=n.mul(s,n.sub(o,n.ONE));if(!n.eql(n.sqr(c),t))throw new Error("Cannot find square root");return c}function Wm(n){if(n<BigInt(3))throw new Error("sqrt is not defined for small field");let t=n-Ve,e=0;for(;t%Xt===Me;)t/=Xt,e++;let r=Xt;const i=xn(n);for(;fa(i,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(e===1)return Kl;let s=i.pow(r,t);const o=(t+Ve)/Xt;return function(c,l){if(c.is0(l))return l;if(fa(c,l)!==1)throw new Error("Cannot find square root");let d=e,u=c.mul(c.ONE,s),h=c.pow(l,t),_=c.pow(l,o);for(;!c.eql(h,c.ONE);){if(c.is0(h))return c.ZERO;let p=1,f=c.sqr(h);for(;!c.eql(f,c.ONE);)if(p++,f=c.sqr(f),p===d)throw new Error("Cannot find square root");const m=Ve<<BigInt(d-p-1),y=c.pow(u,m);d=p,u=c.sqr(y),h=c.mul(h,u),_=c.mul(_,y)}return _}}function Hm(n){return n%jl===Fm?Kl:n%Fl===zl?Km:Wm(n)}const Gm=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Jm(n){const t={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},e=Gm.reduce((r,i)=>(r[i]="function",r),t);return ci(n,e),n}function Zm(n,t,e){if(e<Me)throw new Error("invalid exponent, negatives unsupported");if(e===Me)return n.ONE;if(e===Ve)return t;let r=n.ONE,i=t;for(;e>Me;)e&Ve&&(r=n.mul(r,i)),i=n.sqr(i),e>>=Ve;return r}function Wl(n,t,e=!1){const r=new Array(t.length).fill(e?n.ZERO:void 0),i=t.reduce((o,c,l)=>n.is0(c)?o:(r[l]=o,n.mul(o,c)),n.ONE),s=n.inv(i);return t.reduceRight((o,c,l)=>n.is0(c)?o:(r[l]=n.mul(o,r[l]),n.mul(o,c)),s),r}function fa(n,t){const e=(n.ORDER-Ve)/Xt,r=n.pow(t,e),i=n.eql(r,n.ONE),s=n.eql(r,n.ZERO),o=n.eql(r,n.neg(n.ONE));if(!i&&!s&&!o)throw new Error("invalid Legendre symbol result");return i?1:s?0:-1}function Ym(n,t){t!==void 0&&Pt(t);const e=t!==void 0?t:n.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}function xn(n,t,e=!1,r={}){if(n<=Me)throw new Error("invalid field: expected ORDER > 0, got "+n);let i,s;if(typeof t=="object"&&t!=null){if(r.sqrt||e)throw new Error("cannot specify opts in two arguments");const u=t;u.BITS&&(i=u.BITS),u.sqrt&&(s=u.sqrt),typeof u.isLE=="boolean"&&(e=u.isLE)}else typeof t=="number"&&(i=t),r.sqrt&&(s=r.sqrt);const{nBitLength:o,nByteLength:c}=Ym(n,i);if(c>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const d=Object.freeze({ORDER:n,isLE:e,BITS:o,BYTES:c,MASK:ai(o),ZERO:Me,ONE:Ve,create:u=>Ye(u,n),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return Me<=u&&u<n},is0:u=>u===Me,isValidNot0:u=>!d.is0(u)&&d.isValid(u),isOdd:u=>(u&Ve)===Ve,neg:u=>Ye(-u,n),eql:(u,h)=>u===h,sqr:u=>Ye(u*u,n),add:(u,h)=>Ye(u+h,n),sub:(u,h)=>Ye(u-h,n),mul:(u,h)=>Ye(u*h,n),pow:(u,h)=>Zm(d,u,h),div:(u,h)=>Ye(u*pa(h,n),n),sqrN:u=>u*u,addN:(u,h)=>u+h,subN:(u,h)=>u-h,mulN:(u,h)=>u*h,inv:u=>pa(u,n),sqrt:s||(u=>(l||(l=Hm(n)),l(d,u))),toBytes:u=>e?ro(u,c):no(u,c),fromBytes:u=>{if(u.length!==c)throw new Error("Field.fromBytes: expected "+c+" bytes, got "+u.length);return e?Hr(u):oi(u)},invertBatch:u=>Wl(d,u),cmov:(u,h,_)=>_?h:u});return Object.freeze(d)}function Hl(n){if(typeof n!="bigint")throw new Error("field order must be bigint");const t=n.toString(2).length;return Math.ceil(t/8)}function Gl(n){const t=Hl(n);return t+Math.ceil(t/2)}function Qm(n,t,e=!1){const r=n.length,i=Hl(t),s=Gl(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const o=e?Hr(n):oi(n),c=Ye(o,t-Ve)+Ve;return e?ro(c,i):no(c,i)}const An=BigInt(0),en=BigInt(1);function Zn(n,t){const e=t.negate();return n?e:t}function Xm(n,t,e){const r=s=>s.pz,i=Wl(n.Fp,e.map(r));return e.map((s,o)=>s.toAffine(i[o])).map(n.fromAffine)}function Jl(n,t){if(!Number.isSafeInteger(n)||n<=0||n>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+n)}function Ai(n,t){Jl(n,t);const e=Math.ceil(t/n)+1,r=2**(n-1),i=2**n,s=ai(n),o=BigInt(n);return{windows:e,windowSize:r,mask:s,maxNumber:i,shiftBy:o}}function ma(n,t,e){const{windowSize:r,mask:i,maxNumber:s,shiftBy:o}=e;let c=Number(n&i),l=n>>o;c>r&&(c-=s,l+=en);const d=t*r,u=d+Math.abs(c)-1,h=c===0,_=c<0,p=t%2!==0;return{nextN:l,offset:u,isZero:h,isNeg:_,isNegF:p,offsetF:d}}function ey(n,t){if(!Array.isArray(n))throw new Error("array expected");n.forEach((e,r)=>{if(!(e instanceof t))throw new Error("invalid point at index "+r)})}function ty(n,t){if(!Array.isArray(n))throw new Error("array of scalars expected");n.forEach((e,r)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+r)})}const Ti=new WeakMap,Zl=new WeakMap;function Pi(n){return Zl.get(n)||1}function ya(n){if(n!==An)throw new Error("invalid wNAF")}function ny(n,t){return{constTimeNegate:Zn,hasPrecomputes(e){return Pi(e)!==1},unsafeLadder(e,r,i=n.ZERO){let s=e;for(;r>An;)r&en&&(i=i.add(s)),s=s.double(),r>>=en;return i},precomputeWindow(e,r){const{windows:i,windowSize:s}=Ai(r,t),o=[];let c=e,l=c;for(let d=0;d<i;d++){l=c,o.push(l);for(let u=1;u<s;u++)l=l.add(c),o.push(l);c=l.double()}return o},wNAF(e,r,i){let s=n.ZERO,o=n.BASE;const c=Ai(e,t);for(let l=0;l<c.windows;l++){const{nextN:d,offset:u,isZero:h,isNeg:_,isNegF:p,offsetF:f}=ma(i,l,c);i=d,h?o=o.add(Zn(p,r[f])):s=s.add(Zn(_,r[u]))}return ya(i),{p:s,f:o}},wNAFUnsafe(e,r,i,s=n.ZERO){const o=Ai(e,t);for(let c=0;c<o.windows&&i!==An;c++){const{nextN:l,offset:d,isZero:u,isNeg:h}=ma(i,c,o);if(i=l,!u){const _=r[d];s=s.add(h?_.negate():_)}}return ya(i),s},getPrecomputes(e,r,i){let s=Ti.get(r);return s||(s=this.precomputeWindow(r,e),e!==1&&(typeof i=="function"&&(s=i(s)),Ti.set(r,s))),s},wNAFCached(e,r,i){const s=Pi(e);return this.wNAF(s,this.getPrecomputes(s,e,i),r)},wNAFCachedUnsafe(e,r,i,s){const o=Pi(e);return o===1?this.unsafeLadder(e,r,s):this.wNAFUnsafe(o,this.getPrecomputes(o,e,i),r,s)},setWindowSize(e,r){Jl(r,t),Zl.set(e,r),Ti.delete(e)}}}function ry(n,t,e,r){let i=t,s=n.ZERO,o=n.ZERO;for(;e>An||r>An;)e&en&&(s=s.add(i)),r&en&&(o=o.add(i)),i=i.double(),e>>=en,r>>=en;return{p1:s,p2:o}}function iy(n,t,e,r){ey(e,n),ty(r,t);const i=e.length,s=r.length;if(i!==s)throw new Error("arrays of points and scalars must have equal length");const o=n.ZERO,c=jm(BigInt(i));let l=1;c>12?l=c-3:c>4?l=c-2:c>0&&(l=2);const d=ai(l),u=new Array(Number(d)+1).fill(o),h=Math.floor((t.BITS-1)/l)*l;let _=o;for(let p=h;p>=0;p-=l){u.fill(o);for(let m=0;m<s;m++){const y=r[m],E=Number(y>>BigInt(p)&d);u[E]=u[E].add(e[m])}let f=o;for(let m=u.length-1,y=o;m>0;m--)y=y.add(u[m]),f=f.add(y);if(_=_.add(f),p!==0)for(let m=0;m<l;m++)_=_.double()}return _}function wa(n,t){if(t){if(t.ORDER!==n)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Jm(t),t}else return xn(n)}function sy(n,t,e={}){if(!t||typeof t!="object")throw new Error(`expected valid ${n} CURVE object`);for(const o of["p","n","h"]){const c=t[o];if(!(typeof c=="bigint"&&c>An))throw new Error(`CURVE.${o} must be positive bigint`)}const r=wa(t.p,e.Fp),i=wa(t.n,e.Fn),s=["Gx","Gy","a","b"];for(const o of s)if(!r.isValid(t[o]))throw new Error(`CURVE.${o} must be valid field element of CURVE.Fp`);return{Fp:r,Fn:i}}BigInt(0),BigInt(1),BigInt(2),BigInt(8);const Un=BigInt(0),mn=BigInt(1),Or=BigInt(2);function oy(n){return ci(n,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...n})}function ay(n){const t=oy(n),{P:e,type:r,adjustScalarBytes:i,powPminus2:s,randomBytes:o}=t,c=r==="x25519";if(!c&&r!=="x448")throw new Error("invalid type");const l=o||Sn,d=c?255:448,u=c?32:56,h=BigInt(c?9:5),_=BigInt(c?121665:39081),p=c?Or**BigInt(254):Or**BigInt(447),f=c?BigInt(8)*Or**BigInt(251)-mn:BigInt(4)*Or**BigInt(445)-mn,m=p+f+mn,y=w=>Ye(w,e),E=P(h);function P(w){return ro(y(w),u)}function g(w){const v=ke("u coordinate",w,u);return c&&(v[31]&=127),y(Hr(v))}function b(w){return Hr(i(ke("scalar",w,u)))}function I(w,v){const A=x(g(v),b(w));if(A===Un)throw new Error("invalid private or public key received");return P(A)}function L(w){return I(w,E)}function N(w,v,A){const T=y(w*(v-A));return v=y(v-T),A=y(A+T),{x_2:v,x_3:A}}function x(w,v){os("u",w,Un,e),os("scalar",v,p,m);const A=v,T=w;let O=mn,V=Un,S=w,C=mn,$=Un;for(let D=BigInt(d-1);D>=Un;D--){const j=A>>D&mn;$^=j,{x_2:O,x_3:S}=N($,O,S),{x_2:V,x_3:C}=N($,V,C),$=j;const B=O+V,z=y(B*B),W=O-V,K=y(W*W),H=z-K,ne=S+C,ue=S-C,ce=y(ue*B),oe=y(ne*W),We=ce+oe,yt=ce-oe;S=y(We*We),C=y(T*y(yt*yt)),O=y(z*K),V=y(H*(z+y(_*H)))}({x_2:O,x_3:S}=N($,O,S)),{x_2:V,x_3:C}=N($,V,C);const M=s(V);return y(O*M)}return{scalarMult:I,scalarMultBase:L,getSharedSecret:(w,v)=>I(w,v),getPublicKey:w=>L(w),utils:{randomPrivateKey:()=>l(u)},GuBytes:E.slice()}}BigInt(0);const cy=BigInt(1),ga=BigInt(2),ly=BigInt(3),uy=BigInt(5);BigInt(8);const Yl={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function dy(n){const t=BigInt(10),e=BigInt(20),r=BigInt(40),i=BigInt(80),s=Yl.p,o=n*n%s*n%s,c=nt(o,ga,s)*o%s,l=nt(c,cy,s)*n%s,d=nt(l,uy,s)*l%s,u=nt(d,t,s)*d%s,h=nt(u,e,s)*u%s,_=nt(h,r,s)*h%s,p=nt(_,i,s)*_%s,f=nt(p,i,s)*_%s,m=nt(f,t,s)*d%s;return{pow_p_5_8:nt(m,ga,s)*n%s,b2:o}}function hy(n){return n[0]&=248,n[31]&=127,n[31]|=64,n}const as=(()=>{const n=Yl.p;return ay({P:n,type:"x25519",powPminus2:t=>{const{pow_p_5_8:e,b2:r}=dy(t);return Ye(nt(e,ly,n)*r,n)},adjustScalarBytes:hy})})();function Ea(n){n.lowS!==void 0&&Wr("lowS",n.lowS),n.prehash!==void 0&&Wr("prehash",n.prehash)}class _y extends Error{constructor(t=""){super(t)}}const It={Err:_y,_tlv:{encode:(n,t)=>{const{Err:e}=It;if(n<0||n>256)throw new e("tlv.encode: wrong tag");if(t.length&1)throw new e("tlv.encode: unpadded data");const r=t.length/2,i=Pr(r);if(i.length/2&128)throw new e("tlv.encode: long form length too big");const s=r>127?Pr(i.length/2|128):"";return Pr(n)+s+i+t},decode(n,t){const{Err:e}=It;let r=0;if(n<0||n>256)throw new e("tlv.encode: wrong tag");if(t.length<2||t[r++]!==n)throw new e("tlv.decode: wrong tlv");const i=t[r++],s=!!(i&128);let o=0;if(!s)o=i;else{const l=i&127;if(!l)throw new e("tlv.decode(long): indefinite length not supported");if(l>4)throw new e("tlv.decode(long): byte length is too big");const d=t.subarray(r,r+l);if(d.length!==l)throw new e("tlv.decode: length bytes not complete");if(d[0]===0)throw new e("tlv.decode(long): zero leftmost byte");for(const u of d)o=o<<8|u;if(r+=l,o<128)throw new e("tlv.decode(long): not minimal encoding")}const c=t.subarray(r,r+o);if(c.length!==o)throw new e("tlv.decode: wrong value length");return{v:c,l:t.subarray(r+o)}}},_int:{encode(n){const{Err:t}=It;if(n<Yn)throw new t("integer: negative integers are not allowed");let e=Pr(n);if(Number.parseInt(e[0],16)&8&&(e="00"+e),e.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return e},decode(n){const{Err:t}=It;if(n[0]&128)throw new t("invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return oi(n)}},toSig(n){const{Err:t,_int:e,_tlv:r}=It,i=ke("signature",n),{v:s,l:o}=r.decode(48,i);if(o.length)throw new t("invalid signature: left bytes after parsing");const{v:c,l}=r.decode(2,s),{v:d,l:u}=r.decode(2,l);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:e.decode(c),s:e.decode(d)}},hexFromSig(n){const{_tlv:t,_int:e}=It,r=t.encode(2,e.encode(n.r)),i=t.encode(2,e.encode(n.s)),s=r+i;return t.encode(48,s)}},Yn=BigInt(0),Qn=BigInt(1),py=BigInt(2),Rr=BigInt(3),fy=BigInt(4);function my(n,t,e){function r(i){const s=n.sqr(i),o=n.mul(s,i);return n.add(n.add(o,n.mul(i,t)),e)}return r}function Ql(n,t,e){const{BYTES:r}=n;function i(s){let o;if(typeof s=="bigint")o=s;else{let c=ke("private key",s);if(t){if(!t.includes(c.length*2))throw new Error("invalid private key");const l=new Uint8Array(r);l.set(c,l.length-c.length),c=l}try{o=n.fromBytes(c)}catch{throw new Error(`invalid private key: expected ui8a of size ${r}, got ${typeof s}`)}}if(e&&(o=n.create(o)),!n.isValidNot0(o))throw new Error("invalid private key: out of range [1..N-1]");return o}return i}function yy(n,t={}){const{Fp:e,Fn:r}=sy("weierstrass",n,t),{h:i,n:s}=n;ci(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:o}=t;if(o&&(!e.is0(n.a)||typeof o.beta!="bigint"||typeof o.splitScalar!="function"))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function c(){if(!e.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function l(x,w,v){const{x:A,y:T}=w.toAffine(),O=e.toBytes(A);if(Wr("isCompressed",v),v){c();const V=!e.isOdd(T);return Qt(Xl(V),O)}else return Qt(Uint8Array.of(4),O,e.toBytes(T))}function d(x){Xe(x);const w=e.BYTES,v=w+1,A=2*w+1,T=x.length,O=x[0],V=x.subarray(1);if(T===v&&(O===2||O===3)){const S=e.fromBytes(V);if(!e.isValid(S))throw new Error("bad point: is not on curve, wrong x");const C=_(S);let $;try{$=e.sqrt(C)}catch(D){const j=D instanceof Error?": "+D.message:"";throw new Error("bad point: is not on curve, sqrt error"+j)}c();const M=e.isOdd($);return(O&1)===1!==M&&($=e.neg($)),{x:S,y:$}}else if(T===A&&O===4){const S=e.fromBytes(V.subarray(w*0,w*1)),C=e.fromBytes(V.subarray(w*1,w*2));if(!p(S,C))throw new Error("bad point: is not on curve");return{x:S,y:C}}else throw new Error(`bad point: got length ${T}, expected compressed=${v} or uncompressed=${A}`)}const u=t.toBytes||l,h=t.fromBytes||d,_=my(e,n.a,n.b);function p(x,w){const v=e.sqr(w),A=_(x);return e.eql(v,A)}if(!p(n.Gx,n.Gy))throw new Error("bad curve params: generator point");const f=e.mul(e.pow(n.a,Rr),fy),m=e.mul(e.sqr(n.b),BigInt(27));if(e.is0(e.add(f,m)))throw new Error("bad curve params: a or b");function y(x,w,v=!1){if(!e.isValid(w)||v&&e.is0(w))throw new Error(`bad point coordinate ${x}`);return w}function E(x){if(!(x instanceof I))throw new Error("ProjectivePoint expected")}const P=_a((x,w)=>{const{px:v,py:A,pz:T}=x;if(e.eql(T,e.ONE))return{x:v,y:A};const O=x.is0();w==null&&(w=O?e.ONE:e.inv(T));const V=e.mul(v,w),S=e.mul(A,w),C=e.mul(T,w);if(O)return{x:e.ZERO,y:e.ZERO};if(!e.eql(C,e.ONE))throw new Error("invZ was invalid");return{x:V,y:S}}),g=_a(x=>{if(x.is0()){if(t.allowInfinityPoint&&!e.is0(x.py))return;throw new Error("bad point: ZERO")}const{x:w,y:v}=x.toAffine();if(!e.isValid(w)||!e.isValid(v))throw new Error("bad point: x or y not field elements");if(!p(w,v))throw new Error("bad point: equation left != right");if(!x.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function b(x,w,v,A,T){return v=new I(e.mul(v.px,x),v.py,v.pz),w=Zn(A,w),v=Zn(T,v),w.add(v)}class I{constructor(w,v,A){this.px=y("x",w),this.py=y("y",v,!0),this.pz=y("z",A),Object.freeze(this)}static fromAffine(w){const{x:v,y:A}=w||{};if(!w||!e.isValid(v)||!e.isValid(A))throw new Error("invalid affine point");if(w instanceof I)throw new Error("projective point not allowed");return e.is0(v)&&e.is0(A)?I.ZERO:new I(v,A,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(w){return Xm(I,"pz",w)}static fromBytes(w){return Xe(w),I.fromHex(w)}static fromHex(w){const v=I.fromAffine(h(ke("pointHex",w)));return v.assertValidity(),v}static fromPrivateKey(w){const v=Ql(r,t.allowedPrivateKeyLengths,t.wrapPrivateKey);return I.BASE.multiply(v(w))}static msm(w,v){return iy(I,r,w,v)}precompute(w=8,v=!0){return N.setWindowSize(this,w),v||this.multiply(Rr),this}_setWindowSize(w){this.precompute(w)}assertValidity(){g(this)}hasEvenY(){const{y:w}=this.toAffine();if(!e.isOdd)throw new Error("Field doesn't support isOdd");return!e.isOdd(w)}equals(w){E(w);const{px:v,py:A,pz:T}=this,{px:O,py:V,pz:S}=w,C=e.eql(e.mul(v,S),e.mul(O,T)),$=e.eql(e.mul(A,S),e.mul(V,T));return C&&$}negate(){return new I(this.px,e.neg(this.py),this.pz)}double(){const{a:w,b:v}=n,A=e.mul(v,Rr),{px:T,py:O,pz:V}=this;let S=e.ZERO,C=e.ZERO,$=e.ZERO,M=e.mul(T,T),D=e.mul(O,O),j=e.mul(V,V),B=e.mul(T,O);return B=e.add(B,B),$=e.mul(T,V),$=e.add($,$),S=e.mul(w,$),C=e.mul(A,j),C=e.add(S,C),S=e.sub(D,C),C=e.add(D,C),C=e.mul(S,C),S=e.mul(B,S),$=e.mul(A,$),j=e.mul(w,j),B=e.sub(M,j),B=e.mul(w,B),B=e.add(B,$),$=e.add(M,M),M=e.add($,M),M=e.add(M,j),M=e.mul(M,B),C=e.add(C,M),j=e.mul(O,V),j=e.add(j,j),M=e.mul(j,B),S=e.sub(S,M),$=e.mul(j,D),$=e.add($,$),$=e.add($,$),new I(S,C,$)}add(w){E(w);const{px:v,py:A,pz:T}=this,{px:O,py:V,pz:S}=w;let C=e.ZERO,$=e.ZERO,M=e.ZERO;const D=n.a,j=e.mul(n.b,Rr);let B=e.mul(v,O),z=e.mul(A,V),W=e.mul(T,S),K=e.add(v,A),H=e.add(O,V);K=e.mul(K,H),H=e.add(B,z),K=e.sub(K,H),H=e.add(v,T);let ne=e.add(O,S);return H=e.mul(H,ne),ne=e.add(B,W),H=e.sub(H,ne),ne=e.add(A,T),C=e.add(V,S),ne=e.mul(ne,C),C=e.add(z,W),ne=e.sub(ne,C),M=e.mul(D,H),C=e.mul(j,W),M=e.add(C,M),C=e.sub(z,M),M=e.add(z,M),$=e.mul(C,M),z=e.add(B,B),z=e.add(z,B),W=e.mul(D,W),H=e.mul(j,H),z=e.add(z,W),W=e.sub(B,W),W=e.mul(D,W),H=e.add(H,W),B=e.mul(z,H),$=e.add($,B),B=e.mul(ne,H),C=e.mul(K,C),C=e.sub(C,B),B=e.mul(K,z),M=e.mul(ne,M),M=e.add(M,B),new I(C,$,M)}subtract(w){return this.add(w.negate())}is0(){return this.equals(I.ZERO)}multiply(w){const{endo:v}=t;if(!r.isValidNot0(w))throw new Error("invalid scalar: out of range");let A,T;const O=V=>N.wNAFCached(this,V,I.normalizeZ);if(v){const{k1neg:V,k1:S,k2neg:C,k2:$}=v.splitScalar(w),{p:M,f:D}=O(S),{p:j,f:B}=O($);T=D.add(B),A=b(v.beta,M,j,V,C)}else{const{p:V,f:S}=O(w);A=V,T=S}return I.normalizeZ([A,T])[0]}multiplyUnsafe(w){const{endo:v}=t,A=this;if(!r.isValid(w))throw new Error("invalid scalar: out of range");if(w===Yn||A.is0())return I.ZERO;if(w===Qn)return A;if(N.hasPrecomputes(this))return this.multiply(w);if(v){const{k1neg:T,k1:O,k2neg:V,k2:S}=v.splitScalar(w),{p1:C,p2:$}=ry(I,A,O,S);return b(v.beta,C,$,T,V)}else return N.wNAFCachedUnsafe(A,w)}multiplyAndAddUnsafe(w,v,A){const T=this.multiplyUnsafe(v).add(w.multiplyUnsafe(A));return T.is0()?void 0:T}toAffine(w){return P(this,w)}isTorsionFree(){const{isTorsionFree:w}=t;return i===Qn?!0:w?w(I,this):N.wNAFCachedUnsafe(this,s).is0()}clearCofactor(){const{clearCofactor:w}=t;return i===Qn?this:w?w(I,this):this.multiplyUnsafe(i)}toBytes(w=!0){return Wr("isCompressed",w),this.assertValidity(),u(I,this,w)}toRawBytes(w=!0){return this.toBytes(w)}toHex(w=!0){return cr(this.toBytes(w))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}I.BASE=new I(n.Gx,n.Gy,e.ONE),I.ZERO=new I(e.ZERO,e.ONE,e.ZERO),I.Fp=e,I.Fn=r;const L=r.BITS,N=ny(I,t.endo?Math.ceil(L/2):L);return I}function Xl(n){return Uint8Array.of(n?2:3)}function wy(n,t,e={}){ci(t,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=t.randomBytes||Sn,i=t.hmac||((A,...T)=>ii(t.hash,A,Qt(...T))),{Fp:s,Fn:o}=n,{ORDER:c,BITS:l}=o;function d(A){const T=c>>Qn;return A>T}function u(A){return d(A)?o.neg(A):A}function h(A,T){if(!o.isValidNot0(T))throw new Error(`invalid signature ${A}: out of range 1..CURVE.n`)}class _{constructor(T,O,V){h("r",T),h("s",O),this.r=T,this.s=O,V!=null&&(this.recovery=V),Object.freeze(this)}static fromCompact(T){const O=o.BYTES,V=ke("compactSignature",T,O*2);return new _(o.fromBytes(V.subarray(0,O)),o.fromBytes(V.subarray(O,O*2)))}static fromDER(T){const{r:O,s:V}=It.toSig(ke("DER",T));return new _(O,V)}assertValidity(){}addRecoveryBit(T){return new _(this.r,this.s,T)}recoverPublicKey(T){const O=s.ORDER,{r:V,s:S,recovery:C}=this;if(C==null||![0,1,2,3].includes(C))throw new Error("recovery id invalid");if(c*py<O&&C>1)throw new Error("recovery id is ambiguous for h>1 curve");const $=C===2||C===3?V+c:V;if(!s.isValid($))throw new Error("recovery id 2 or 3 invalid");const M=s.toBytes($),D=n.fromHex(Qt(Xl((C&1)===0),M)),j=o.inv($),B=g(ke("msgHash",T)),z=o.create(-B*j),W=o.create(S*j),K=n.BASE.multiplyUnsafe(z).add(D.multiplyUnsafe(W));if(K.is0())throw new Error("point at infinify");return K.assertValidity(),K}hasHighS(){return d(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,o.neg(this.s),this.recovery):this}toBytes(T){if(T==="compact")return Qt(o.toBytes(this.r),o.toBytes(this.s));if(T==="der")return Qs(It.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return cr(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return cr(this.toBytes("compact"))}}const p=Ql(o,e.allowedPrivateKeyLengths,e.wrapPrivateKey),f={isValidPrivateKey(A){try{return p(A),!0}catch{return!1}},normPrivateKeyToScalar:p,randomPrivateKey:()=>{const A=c;return Qm(r(Gl(A)),A)},precompute(A=8,T=n.BASE){return T.precompute(A,!1)}};function m(A,T=!0){return n.fromPrivateKey(A).toBytes(T)}function y(A){if(typeof A=="bigint")return!1;if(A instanceof n)return!0;const T=ke("key",A).length,O=s.BYTES,V=O+1,S=2*O+1;if(!(e.allowedPrivateKeyLengths||o.BYTES===V))return T===V||T===S}function E(A,T,O=!0){if(y(A)===!0)throw new Error("first arg must be private key");if(y(T)===!1)throw new Error("second arg must be public key");return n.fromHex(T).multiply(p(A)).toBytes(O)}const P=t.bits2int||function(A){if(A.length>8192)throw new Error("input is too large");const T=oi(A),O=A.length*8-l;return O>0?T>>BigInt(O):T},g=t.bits2int_modN||function(A){return o.create(P(A))},b=ai(l);function I(A){return os("num < 2^"+l,A,Yn,b),o.toBytes(A)}function L(A,T,O=N){if(["recovered","canonical"].some(K=>K in O))throw new Error("sign() legacy options not supported");const{hash:V}=t;let{lowS:S,prehash:C,extraEntropy:$}=O;S==null&&(S=!0),A=ke("msgHash",A),Ea(O),C&&(A=ke("prehashed msgHash",V(A)));const M=g(A),D=p(T),j=[I(D),I(M)];if($!=null&&$!==!1){const K=$===!0?r(s.BYTES):$;j.push(ke("extraEntropy",K))}const B=Qt(...j),z=M;function W(K){const H=P(K);if(!o.isValidNot0(H))return;const ne=o.inv(H),ue=n.BASE.multiply(H).toAffine(),ce=o.create(ue.x);if(ce===Yn)return;const oe=o.create(ne*o.create(z+ce*D));if(oe===Yn)return;let We=(ue.x===ce?0:2)|Number(ue.y&Qn),yt=oe;return S&&d(oe)&&(yt=u(oe),We^=1),new _(ce,yt,We)}return{seed:B,k2sig:W}}const N={lowS:t.lowS,prehash:!1},x={lowS:t.lowS,prehash:!1};function w(A,T,O=N){const{seed:V,k2sig:S}=L(A,T,O);return zm(t.hash.outputLen,o.BYTES,i)(V,S)}n.BASE.precompute(8);function v(A,T,O,V=x){const S=A;T=ke("msgHash",T),O=ke("publicKey",O),Ea(V);const{lowS:C,prehash:$,format:M}=V;if("strict"in V)throw new Error("options.strict was renamed to lowS");if(M!==void 0&&!["compact","der","js"].includes(M))throw new Error('format must be "compact", "der" or "js"');const D=typeof S=="string"||Js(S),j=!D&&!M&&typeof S=="object"&&S!==null&&typeof S.r=="bigint"&&typeof S.s=="bigint";if(!D&&!j)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let B,z;try{if(j)if(M===void 0||M==="js")B=new _(S.r,S.s);else throw new Error("invalid format");if(D){try{M!=="compact"&&(B=_.fromDER(S))}catch(We){if(!(We instanceof It.Err))throw We}!B&&M!=="der"&&(B=_.fromCompact(S))}z=n.fromHex(O)}catch{return!1}if(!B||C&&B.hasHighS())return!1;$&&(T=t.hash(T));const{r:W,s:K}=B,H=g(T),ne=o.inv(K),ue=o.create(H*ne),ce=o.create(W*ne),oe=n.BASE.multiplyUnsafe(ue).add(z.multiplyUnsafe(ce));return oe.is0()?!1:o.create(oe.x)===W}return Object.freeze({getPublicKey:m,getSharedSecret:E,sign:w,verify:v,utils:f,Point:n,Signature:_})}function gy(n){const t={a:n.a,b:n.b,p:n.Fp.ORDER,n:n.n,h:n.h,Gx:n.Gx,Gy:n.Gy},e=n.Fp,r=xn(t.n,n.nBitLength),i={Fp:e,Fn:r,allowedPrivateKeyLengths:n.allowedPrivateKeyLengths,allowInfinityPoint:n.allowInfinityPoint,endo:n.endo,wrapPrivateKey:n.wrapPrivateKey,isTorsionFree:n.isTorsionFree,clearCofactor:n.clearCofactor,fromBytes:n.fromBytes,toBytes:n.toBytes};return{CURVE:t,curveOpts:i}}function Ey(n){const{CURVE:t,curveOpts:e}=gy(n),r={hash:n.hash,hmac:n.hmac,randomBytes:n.randomBytes,lowS:n.lowS,bits2int:n.bits2int,bits2int_modN:n.bits2int_modN};return{CURVE:t,curveOpts:e,ecdsaOpts:r}}function vy(n,t){return Object.assign({},t,{ProjectivePoint:t.Point,CURVE:n})}function by(n){const{CURVE:t,curveOpts:e,ecdsaOpts:r}=Ey(n),i=yy(t,e),s=wy(i,r,e);return vy(n,s)}function cs(n,t){const e=r=>by({...n,hash:r});return{...e(t),create:e}}const eu={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},tu={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},nu={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},Iy=xn(eu.p),Ay=xn(tu.p),Ty=xn(nu.p),Py=cs({...eu,Fp:Iy,lowS:!1},ri);cs({...tu,Fp:Ay,lowS:!1},Cf),cs({...nu,Fp:Ty,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},xf);const Oy=Py,ru="base10",Se="base16",Ue="base64pad",Mt="base64url",wr="utf8",iu=0,Tt=1,gr=2,Ry=0,va=1,Xn=12,io=32;function Ly(){const n=as.utils.randomPrivateKey(),t=as.getPublicKey(n);return{privateKey:Be(n,Se),publicKey:Be(t,Se)}}function ls(){const n=Sn(io);return Be(n,Se)}function Dy(n,t){const e=as.getSharedSecret(Qe(n,Se),Qe(t,Se)),r=Mm(si,e,void 0,void 0,io);return Be(r,Se)}function xr(n){const t=si(Qe(n,Se));return Be(t,Se)}function Ze(n){const t=si(Qe(n,wr));return Be(t,Se)}function su(n){return Qe(`${n}`,ru)}function on(n){return Number(Be(n,ru))}function ou(n){return n.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function au(n){const t=n.replace(/-/g,"+").replace(/_/g,"/"),e=(4-t.length%4)%4;return t+"=".repeat(e)}function Vy(n){const t=su(typeof n.type<"u"?n.type:iu);if(on(t)===Tt&&typeof n.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const e=typeof n.senderPublicKey<"u"?Qe(n.senderPublicKey,Se):void 0,r=typeof n.iv<"u"?Qe(n.iv,Se):Sn(Xn),i=Qe(n.symKey,Se),s=ql(i,r).encrypt(Qe(n.message,wr)),o=cu({type:t,sealed:s,iv:r,senderPublicKey:e});return n.encoding===Mt?ou(o):o}function Sy(n){const t=Qe(n.symKey,Se),{sealed:e,iv:r}=ur({encoded:n.encoded,encoding:n.encoding}),i=ql(t,r).decrypt(e);if(i===null)throw new Error("Failed to decrypt");return Be(i,wr)}function xy(n,t){const e=su(gr),r=Sn(Xn),i=Qe(n,wr),s=cu({type:e,sealed:i,iv:r});return t===Mt?ou(s):s}function Cy(n,t){const{sealed:e}=ur({encoded:n,encoding:t});return Be(e,wr)}function cu(n){if(on(n.type)===gr)return Be(Jn([n.type,n.sealed]),Ue);if(on(n.type)===Tt){if(typeof n.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Be(Jn([n.type,n.senderPublicKey,n.iv,n.sealed]),Ue)}return Be(Jn([n.type,n.iv,n.sealed]),Ue)}function ur(n){const t=(n.encoding||Ue)===Mt?au(n.encoded):n.encoded,e=Qe(t,Ue),r=e.slice(Ry,va),i=va;if(on(r)===Tt){const l=i+io,d=l+Xn,u=e.slice(i,l),h=e.slice(l,d),_=e.slice(d);return{type:r,sealed:_,iv:h,senderPublicKey:u}}if(on(r)===gr){const l=e.slice(i),d=Sn(Xn);return{type:r,sealed:l,iv:d}}const s=i+Xn,o=e.slice(i,s),c=e.slice(s);return{type:r,sealed:c,iv:o}}function $y(n,t){const e=ur({encoded:n,encoding:t==null?void 0:t.encoding});return lu({type:on(e.type),senderPublicKey:typeof e.senderPublicKey<"u"?Be(e.senderPublicKey,Se):void 0,receiverPublicKey:t==null?void 0:t.receiverPublicKey})}function lu(n){const t=(n==null?void 0:n.type)||iu;if(t===Tt){if(typeof(n==null?void 0:n.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(n==null?void 0:n.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:n==null?void 0:n.senderPublicKey,receiverPublicKey:n==null?void 0:n.receiverPublicKey}}function ba(n){return n.type===Tt&&typeof n.senderPublicKey=="string"&&typeof n.receiverPublicKey=="string"}function Ia(n){return n.type===gr}function ky(n){const t=te.from(n.x,"base64"),e=te.from(n.y,"base64");return Jn([new Uint8Array([4]),t,e])}function Ny(n,t){const[e,r,i]=n.split("."),s=te.from(au(i),"base64");if(s.length!==64)throw new Error("Invalid signature length");const o=s.slice(0,32),c=s.slice(32,64),l=`${e}.${r}`,d=si(l),u=ky(t);if(!Oy.verify(Jn([o,c]),d,u))throw new Error("Invalid signature");return zi(n).payload}const Uy="irn";function Gr(n){return(n==null?void 0:n.relay)||{protocol:Uy}}function vn(n){const t=Cd[n];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${n}`);return t}function qy(n,t="-"){const e={},r="relay"+t;return Object.keys(n).forEach(i=>{if(i.startsWith(r)){const s=i.replace(r,""),o=n[i];e[s]=o}}),e}function Aa(n){if(!n.includes("wc:")){const d=El(n);d!=null&&d.includes("wc:")&&(n=d)}n=n.includes("wc://")?n.replace("wc://",""):n,n=n.includes("wc:")?n.replace("wc:",""):n;const t=n.indexOf(":"),e=n.indexOf("?")!==-1?n.indexOf("?"):void 0,r=n.substring(0,t),i=n.substring(t+1,e).split("@"),s=typeof e<"u"?n.substring(e):"",o=new URLSearchParams(s),c={};o.forEach((d,u)=>{c[u]=d});const l=typeof c.methods=="string"?c.methods.split(","):void 0;return{protocol:r,topic:My(i[0]),version:parseInt(i[1],10),symKey:c.symKey,relay:qy(c),methods:l,expiryTimestamp:c.expiryTimestamp?parseInt(c.expiryTimestamp,10):void 0}}function My(n){return n.startsWith("//")?n.substring(2):n}function By(n,t="-"){const e="relay",r={};return Object.keys(n).forEach(i=>{const s=i,o=e+t+s;n[s]&&(r[o]=n[s])}),r}function Ta(n){const t=new URLSearchParams,e=By(n.relay);Object.keys(e).sort().forEach(i=>{t.set(i,e[i])}),t.set("symKey",n.symKey),n.expiryTimestamp&&t.set("expiryTimestamp",n.expiryTimestamp.toString()),n.methods&&t.set("methods",n.methods.join(","));const r=t.toString();return`${n.protocol}:${n.topic}@${n.version}?${r}`}function Lr(n,t,e){return`${n}?wc_ev=${e}&topic=${t}`}var jy=Object.defineProperty,zy=Object.defineProperties,Fy=Object.getOwnPropertyDescriptors,Pa=Object.getOwnPropertySymbols,Ky=Object.prototype.hasOwnProperty,Wy=Object.prototype.propertyIsEnumerable,Oa=(n,t,e)=>t in n?jy(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Hy=(n,t)=>{for(var e in t||(t={}))Ky.call(t,e)&&Oa(n,e,t[e]);if(Pa)for(var e of Pa(t))Wy.call(t,e)&&Oa(n,e,t[e]);return n},Gy=(n,t)=>zy(n,Fy(t));function Cn(n){const t=[];return n.forEach(e=>{const[r,i]=e.split(":");t.push(`${r}:${i}`)}),t}function Jy(n){const t=[];return Object.values(n).forEach(e=>{t.push(...Cn(e.accounts))}),t}function Zy(n,t){const e=[];return Object.values(n).forEach(r=>{Cn(r.accounts).includes(t)&&e.push(...r.methods)}),e}function Yy(n,t){const e=[];return Object.values(n).forEach(r=>{Cn(r.accounts).includes(t)&&e.push(...r.events)}),e}function uu(n){return n.includes(":")}function Qy(n){return uu(n)?n.split(":")[0]:n}function Ra(n){var t,e,r;const i={};if(!dr(n))return i;for(const[s,o]of Object.entries(n)){const c=uu(s)?[s]:o.chains,l=o.methods||[],d=o.events||[],u=Qy(s);i[u]=Gy(Hy({},i[u]),{chains:tn(c,(t=i[u])==null?void 0:t.chains),methods:tn(l,(e=i[u])==null?void 0:e.methods),events:tn(d,(r=i[u])==null?void 0:r.events)})}return i}function Xy(n){const t={};return n==null||n.forEach(e=>{var r;const[i,s]=e.split(":");t[i]||(t[i]={accounts:[],chains:[],events:[],methods:[]}),t[i].accounts.push(e),(r=t[i].chains)==null||r.push(`${i}:${s}`)}),t}function La(n,t){t=t.map(r=>r.replace("did:pkh:",""));const e=Xy(t);for(const[r,i]of Object.entries(e))i.methods?i.methods=tn(i.methods,n):i.methods=n,i.events=["chainChanged","accountsChanged"];return e}function ew(n,t){var e,r,i,s,o,c;const l=Ra(n),d=Ra(t),u={},h=Object.keys(l).concat(Object.keys(d));for(const _ of h)u[_]={chains:tn((e=l[_])==null?void 0:e.chains,(r=d[_])==null?void 0:r.chains),methods:tn((i=l[_])==null?void 0:i.methods,(s=d[_])==null?void 0:s.methods),events:tn((o=l[_])==null?void 0:o.events,(c=d[_])==null?void 0:c.events)};return u}const tw={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}},nw={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 k(n,t){const{message:e,code:r}=nw[n];return{message:t?`${e} ${t}`:e,code:r}}function ae(n,t){const{message:e,code:r}=tw[n];return{message:t?`${e} ${t}`:e,code:r}}function Tn(n,t){return Array.isArray(n)?typeof t<"u"&&n.length?n.every(t):!0:!1}function dr(n){return Object.getPrototypeOf(n)===Object.prototype&&Object.keys(n).length}function fe(n){return typeof n>"u"}function he(n,t){return t&&fe(n)?!0:typeof n=="string"&&!!n.trim().length}function so(n,t){return t&&fe(n)?!0:typeof n=="number"&&!isNaN(n)}function rw(n,t){const{requiredNamespaces:e}=t,r=Object.keys(n.namespaces),i=Object.keys(e);let s=!0;return Yt(i,r)?(r.forEach(o=>{const{accounts:c,methods:l,events:d}=n.namespaces[o],u=Cn(c),h=e[o];(!Yt(fl(o,h),u)||!Yt(h.methods,l)||!Yt(h.events,d))&&(s=!1)}),s):!1}function Jr(n){return he(n,!1)&&n.includes(":")?n.split(":").length===2:!1}function iw(n){if(he(n,!1)&&n.includes(":")){const t=n.split(":");if(t.length===3){const e=t[0]+":"+t[1];return!!t[2]&&Jr(e)}}return!1}function sw(n){function t(e){try{return typeof new URL(e)<"u"}catch{return!1}}try{if(he(n,!1)){if(t(n))return!0;const e=El(n);return t(e)}}catch{}return!1}function ow(n){var t;return(t=n==null?void 0:n.proposer)==null?void 0:t.publicKey}function aw(n){return n==null?void 0:n.topic}function cw(n,t){let e=null;return he(n==null?void 0:n.publicKey,!1)||(e=k("MISSING_OR_INVALID",`${t} controller public key should be a string`)),e}function Da(n){let t=!0;return Tn(n)?n.length&&(t=n.every(e=>he(e,!1))):t=!1,t}function lw(n,t,e){let r=null;return Tn(t)&&t.length?t.forEach(i=>{r||Jr(i)||(r=ae("UNSUPPORTED_CHAINS",`${e}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):Jr(n)||(r=ae("UNSUPPORTED_CHAINS",`${e}, 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"] }`)),r}function uw(n,t,e){let r=null;return Object.entries(n).forEach(([i,s])=>{if(r)return;const o=lw(i,fl(i,s),`${t} ${e}`);o&&(r=o)}),r}function dw(n,t){let e=null;return Tn(n)?n.forEach(r=>{e||iw(r)||(e=ae("UNSUPPORTED_ACCOUNTS",`${t}, account ${r} should be a string and conform to "namespace:chainId:address" format`))}):e=ae("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),e}function hw(n,t){let e=null;return Object.values(n).forEach(r=>{if(e)return;const i=dw(r==null?void 0:r.accounts,`${t} namespace`);i&&(e=i)}),e}function _w(n,t){let e=null;return Da(n==null?void 0:n.methods)?Da(n==null?void 0:n.events)||(e=ae("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):e=ae("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),e}function du(n,t){let e=null;return Object.values(n).forEach(r=>{if(e)return;const i=_w(r,`${t}, namespace`);i&&(e=i)}),e}function pw(n,t,e){let r=null;if(n&&dr(n)){const i=du(n,t);i&&(r=i);const s=uw(n,t,e);s&&(r=s)}else r=k("MISSING_OR_INVALID",`${t}, ${e} should be an object with data`);return r}function Oi(n,t){let e=null;if(n&&dr(n)){const r=du(n,t);r&&(e=r);const i=hw(n,t);i&&(e=i)}else e=k("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return e}function hu(n){return he(n.protocol,!0)}function fw(n,t){let e=!1;return n?n&&Tn(n)&&n.length&&n.forEach(r=>{e=hu(r)}):e=!0,e}function mw(n){return typeof n=="number"}function $e(n){return typeof n<"u"&&typeof n!==null}function yw(n){return!(!n||typeof n!="object"||!n.code||!so(n.code,!1)||!n.message||!he(n.message,!1))}function ww(n){return!(fe(n)||!he(n.method,!1))}function gw(n){return!(fe(n)||fe(n.result)&&fe(n.error)||!so(n.id,!1)||!he(n.jsonrpc,!1))}function Ew(n){return!(fe(n)||!he(n.name,!1))}function Va(n,t){return!(!Jr(t)||!Jy(n).includes(t))}function vw(n,t,e){return he(e,!1)?Zy(n,t).includes(e):!1}function bw(n,t,e){return he(e,!1)?Yy(n,t).includes(e):!1}function Sa(n,t,e){let r=null;const i=Iw(n),s=Aw(t),o=Object.keys(i),c=Object.keys(s),l=xa(Object.keys(n)),d=xa(Object.keys(t)),u=l.filter(h=>!d.includes(h));return u.length&&(r=k("NON_CONFORMING_NAMESPACES",`${e} namespaces keys don't satisfy requiredNamespaces.
|
|
8
|
+
Required: ${u.toString()}
|
|
9
|
+
Received: ${Object.keys(t).toString()}`)),Yt(o,c)||(r=k("NON_CONFORMING_NAMESPACES",`${e} namespaces chains don't satisfy required namespaces.
|
|
10
|
+
Required: ${o.toString()}
|
|
11
|
+
Approved: ${c.toString()}`)),Object.keys(t).forEach(h=>{if(!h.includes(":")||r)return;const _=Cn(t[h].accounts);_.includes(h)||(r=k("NON_CONFORMING_NAMESPACES",`${e} namespaces accounts don't satisfy namespace accounts for ${h}
|
|
12
|
+
Required: ${h}
|
|
13
|
+
Approved: ${_.toString()}`))}),o.forEach(h=>{r||(Yt(i[h].methods,s[h].methods)?Yt(i[h].events,s[h].events)||(r=k("NON_CONFORMING_NAMESPACES",`${e} namespaces events don't satisfy namespace events for ${h}`)):r=k("NON_CONFORMING_NAMESPACES",`${e} namespaces methods don't satisfy namespace methods for ${h}`))}),r}function Iw(n){const t={};return Object.keys(n).forEach(e=>{var r;e.includes(":")?t[e]=n[e]:(r=n[e].chains)==null||r.forEach(i=>{t[i]={methods:n[e].methods,events:n[e].events}})}),t}function xa(n){return[...new Set(n.map(t=>t.includes(":")?t.split(":")[0]:t))]}function Aw(n){const t={};return Object.keys(n).forEach(e=>{if(e.includes(":"))t[e]=n[e];else{const r=Cn(n[e].accounts);r==null||r.forEach(i=>{t[i]={accounts:n[e].accounts.filter(s=>s.includes(`${i}:`)),methods:n[e].methods,events:n[e].events}})}}),t}function Tw(n,t){return so(n,!1)&&n<=t.max&&n>=t.min}function Ca(){const n=mr();return new Promise(t=>{switch(n){case Ke.browser:t(Pw());break;case Ke.reactNative:t(Ow());break;case Ke.node:t(Rw());break;default:t(!0)}})}function Pw(){return Vn()&&(navigator==null?void 0:navigator.onLine)}async function Ow(){if(Ft()&&typeof F<"u"&&F!=null&&F.NetInfo){const n=await(F==null?void 0:F.NetInfo.fetch());return n==null?void 0:n.isConnected}return!0}function Rw(){return!0}function Lw(n){switch(mr()){case Ke.browser:Dw(n);break;case Ke.reactNative:Vw(n);break}}function Dw(n){!Ft()&&Vn()&&(window.addEventListener("online",()=>n(!0)),window.addEventListener("offline",()=>n(!1)))}function Vw(n){var t;Ft()&&typeof F<"u"&&F!=null&&F.NetInfo&&((t=F)==null||t.NetInfo.addEventListener(e=>n(e==null?void 0:e.isConnected)))}function Sw(){var n;return Vn()&&bn()?((n=bn())==null?void 0:n.visibilityState)==="visible":!0}const Ri={};class qn{static get(t){return Ri[t]}static set(t,e){Ri[t]=e}static delete(t){delete Ri[t]}}function xw(n){const t=pr.decode(n);if(t.length<33)throw new Error("Too short to contain a public key");return t.slice(1,33)}function Cw({publicKey:n,signature:t,payload:e}){var r;const i=us(e.method),s=128|parseInt(((r=e.version)==null?void 0:r.toString())||"4"),o=Nw(e.address),c=e.era==="00"?new Uint8Array([0]):us(e.era);if(c.length!==1&&c.length!==2)throw new Error("Invalid era length");const l=parseInt(e.nonce,16),d=new Uint8Array([l&255,l>>8&255]),u=BigInt(`0x${kw(e.tip)}`),h=qw(u),_=new Uint8Array([0,...n,o,...t,...c,...d,...h,...i]),p=Uw(_.length+1);return new Uint8Array([...p,s,..._])}function $w(n){const t=us(n),e=Md.blake2b(t,void 0,32);return"0x"+te.from(e).toString("hex")}function us(n){return new Uint8Array(n.replace(/^0x/,"").match(/.{1,2}/g).map(t=>parseInt(t,16)))}function kw(n){return n.startsWith("0x")?n.slice(2):n}function Nw(n){const t=pr.decode(n)[0];return t===42?0:t===60?2:1}function Uw(n){if(n<64)return new Uint8Array([n<<2]);if(n<16384){const t=n<<2|1;return new Uint8Array([t&255,t>>8&255])}else if(n<1<<30){const t=n<<2|2;return new Uint8Array([t&255,t>>8&255,t>>16&255,t>>24&255])}else throw new Error("Compact encoding > 2^30 not supported")}function qw(n){if(n<BigInt(1)<<BigInt(6))return new Uint8Array([Number(n<<BigInt(2))]);if(n<BigInt(1)<<BigInt(14)){const t=n<<BigInt(2)|BigInt(1);return new Uint8Array([Number(t&BigInt(255)),Number(t>>BigInt(8)&BigInt(255))])}else if(n<BigInt(1)<<BigInt(30)){const t=n<<BigInt(2)|BigInt(2);return new Uint8Array([Number(t&BigInt(255)),Number(t>>BigInt(8)&BigInt(255)),Number(t>>BigInt(16)&BigInt(255)),Number(t>>BigInt(24)&BigInt(255))])}else throw new Error("BigInt compact encoding not supported > 2^30")}function Mw(n){const t=Uint8Array.from(te.from(n.signature,"hex")),e=xw(n.transaction.address),r=Cw({publicKey:e,signature:t,payload:n.transaction}),i=te.from(r).toString("hex");return $w(i)}var Bw={};const _u="wc",pu=2,ds="core",mt=`${_u}@2:${ds}:`,jw={logger:"error"},zw={database:":memory:"},Fw="crypto",$a="client_ed25519_seed",Kw=U.ONE_DAY,Ww="keychain",Hw="0.3",Gw="messages",Jw="0.3",Zw=U.SIX_HOURS,Yw="publisher",fu="irn",Qw="error",mu="wss://relay.walletconnect.org",Xw="relayer",le={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},eg="_subscription",He={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},tg=.1,hs="2.21.8",se={link_mode:"link_mode",relay:"relay"},Cr={inbound:"inbound",outbound:"outbound"},ng="0.3",rg="WALLETCONNECT_CLIENT_ID",ka="WALLETCONNECT_LINK_MODE_APPS",Fe={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},ig="subscription",sg="0.3",og="pairing",ag="0.3",Mn={wc_pairingDelete:{req:{ttl:U.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:U.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:U.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:U.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:U.ONE_DAY,prompt:!1,tag:0},res:{ttl:U.ONE_DAY,prompt:!1,tag:0}}},Jt={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},tt={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},cg="history",lg="0.3",ug="expirer",Je={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},dg="0.3",hg="verify-api",_g="https://verify.walletconnect.com",yu="https://verify.walletconnect.org",er=yu,pg=`${er}/v3`,fg=[_g,yu],mg="echo",yg="https://echo.walletconnect.com",ut={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal",subscribing_to_pairing_topic:"subscribing_to_pairing_topic"},bt={no_wss_connection:"no_wss_connection",no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_expired:"proposal_expired",proposal_listener_not_found:"proposal_listener_not_found"},Ct={session_approve_started:"session_approve_started",proposal_not_expired:"proposal_not_expired",session_namespaces_validation_success:"session_namespaces_validation_success",create_session_topic:"create_session_topic",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",publishing_session_approve:"publishing_session_approve",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",publishing_session_settle:"publishing_session_settle",session_settle_publish_success:"session_settle_publish_success"},Bn={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_publish_failure:"session_approve_publish_failure",session_settle_publish_failure:"session_settle_publish_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found"},Ht={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"},jn={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"},wg=.1,gg="event-client",Eg=86400,vg="https://pulse.walletconnect.org/batch";function bg(n,t){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<n.length;i++){var s=n.charAt(i),o=s.charCodeAt(0);if(e[o]!==255)throw new TypeError(s+" is ambiguous");e[o]=i}var c=n.length,l=n.charAt(0),d=Math.log(c)/Math.log(256),u=Math.log(256)/Math.log(c);function h(f){if(f instanceof Uint8Array||(ArrayBuffer.isView(f)?f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength):Array.isArray(f)&&(f=Uint8Array.from(f))),!(f instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length===0)return"";for(var m=0,y=0,E=0,P=f.length;E!==P&&f[E]===0;)E++,m++;for(var g=(P-E)*u+1>>>0,b=new Uint8Array(g);E!==P;){for(var I=f[E],L=0,N=g-1;(I!==0||L<y)&&N!==-1;N--,L++)I+=256*b[N]>>>0,b[N]=I%c>>>0,I=I/c>>>0;if(I!==0)throw new Error("Non-zero carry");y=L,E++}for(var x=g-y;x!==g&&b[x]===0;)x++;for(var w=l.repeat(m);x<g;++x)w+=n.charAt(b[x]);return w}function _(f){if(typeof f!="string")throw new TypeError("Expected String");if(f.length===0)return new Uint8Array;var m=0;if(f[m]!==" "){for(var y=0,E=0;f[m]===l;)y++,m++;for(var P=(f.length-m)*d+1>>>0,g=new Uint8Array(P);f[m];){var b=e[f.charCodeAt(m)];if(b===255)return;for(var I=0,L=P-1;(b!==0||I<E)&&L!==-1;L--,I++)b+=c*g[L]>>>0,g[L]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");E=I,m++}if(f[m]!==" "){for(var N=P-E;N!==P&&g[N]===0;)N++;for(var x=new Uint8Array(y+(P-N)),w=y;N!==P;)x[w++]=g[N++];return x}}}function p(f){var m=_(f);if(m)return m;throw new Error(`Non-${t} character`)}return{encode:h,decodeUnsafe:_,decode:p}}var Ig=bg,Ag=Ig;const wu=n=>{if(n instanceof Uint8Array&&n.constructor.name==="Uint8Array")return n;if(n instanceof ArrayBuffer)return new Uint8Array(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error("Unknown type, must be binary type")},Tg=n=>new TextEncoder().encode(n),Pg=n=>new TextDecoder().decode(n);class Og{constructor(t,e,r){this.name=t,this.prefix=e,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class Rg{constructor(t,e,r){if(this.name=t,this.prefix=e,e.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=e.codePointAt(0),this.baseDecode=r}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return gu(this,t)}}class Lg{constructor(t){this.decoders=t}or(t){return gu(this,t)}decode(t){const e=t[0],r=this.decoders[e];if(r)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const gu=(n,t)=>new Lg({...n.decoders||{[n.prefix]:n},...t.decoders||{[t.prefix]:t}});class Dg{constructor(t,e,r,i){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=i,this.encoder=new Og(t,e,r),this.decoder=new Rg(t,e,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const li=({name:n,prefix:t,encode:e,decode:r})=>new Dg(n,t,e,r),Er=({prefix:n,name:t,alphabet:e})=>{const{encode:r,decode:i}=Ag(e,t);return li({prefix:n,name:t,encode:r,decode:s=>wu(i(s))})},Vg=(n,t,e,r)=>{const i={};for(let u=0;u<t.length;++u)i[t[u]]=u;let s=n.length;for(;n[s-1]==="=";)--s;const o=new Uint8Array(s*e/8|0);let c=0,l=0,d=0;for(let u=0;u<s;++u){const h=i[n[u]];if(h===void 0)throw new SyntaxError(`Non-${r} character`);l=l<<e|h,c+=e,c>=8&&(c-=8,o[d++]=255&l>>c)}if(c>=e||255&l<<8-c)throw new SyntaxError("Unexpected end of data");return o},Sg=(n,t,e)=>{const r=t[t.length-1]==="=",i=(1<<e)-1;let s="",o=0,c=0;for(let l=0;l<n.length;++l)for(c=c<<8|n[l],o+=8;o>e;)o-=e,s+=t[i&c>>o];if(o&&(s+=t[i&c<<e-o]),r)for(;s.length*e&7;)s+="=";return s},Ie=({name:n,prefix:t,bitsPerChar:e,alphabet:r})=>li({prefix:t,name:n,encode(i){return Sg(i,r,e)},decode(i){return Vg(i,r,e,n)}}),xg=li({prefix:"\0",name:"identity",encode:n=>Pg(n),decode:n=>Tg(n)});var Cg=Object.freeze({__proto__:null,identity:xg});const $g=Ie({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var kg=Object.freeze({__proto__:null,base2:$g});const Ng=Ie({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Ug=Object.freeze({__proto__:null,base8:Ng});const qg=Er({prefix:"9",name:"base10",alphabet:"0123456789"});var Mg=Object.freeze({__proto__:null,base10:qg});const Bg=Ie({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),jg=Ie({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var zg=Object.freeze({__proto__:null,base16:Bg,base16upper:jg});const Fg=Ie({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Kg=Ie({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Wg=Ie({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Hg=Ie({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Gg=Ie({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Jg=Ie({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Zg=Ie({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Yg=Ie({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Qg=Ie({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Xg=Object.freeze({__proto__:null,base32:Fg,base32upper:Kg,base32pad:Wg,base32padupper:Hg,base32hex:Gg,base32hexupper:Jg,base32hexpad:Zg,base32hexpadupper:Yg,base32z:Qg});const eE=Er({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),tE=Er({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var nE=Object.freeze({__proto__:null,base36:eE,base36upper:tE});const rE=Er({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),iE=Er({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var sE=Object.freeze({__proto__:null,base58btc:rE,base58flickr:iE});const oE=Ie({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),aE=Ie({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),cE=Ie({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),lE=Ie({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var uE=Object.freeze({__proto__:null,base64:oE,base64pad:aE,base64url:cE,base64urlpad:lE});const Eu=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),dE=Eu.reduce((n,t,e)=>(n[e]=t,n),[]),hE=Eu.reduce((n,t,e)=>(n[t.codePointAt(0)]=e,n),[]);function _E(n){return n.reduce((t,e)=>(t+=dE[e],t),"")}function pE(n){const t=[];for(const e of n){const r=hE[e.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${e}`);t.push(r)}return new Uint8Array(t)}const fE=li({prefix:"🚀",name:"base256emoji",encode:_E,decode:pE});var mE=Object.freeze({__proto__:null,base256emoji:fE}),yE=vu,Na=128,wE=-128,gE=Math.pow(2,31);function vu(n,t,e){t=t||[],e=e||0;for(var r=e;n>=gE;)t[e++]=n&255|Na,n/=128;for(;n&wE;)t[e++]=n&255|Na,n>>>=7;return t[e]=n|0,vu.bytes=e-r+1,t}var EE=_s,vE=128,Ua=127;function _s(n,r){var e=0,r=r||0,i=0,s=r,o,c=n.length;do{if(s>=c)throw _s.bytes=0,new RangeError("Could not decode varint");o=n[s++],e+=i<28?(o&Ua)<<i:(o&Ua)*Math.pow(2,i),i+=7}while(o>=vE);return _s.bytes=s-r,e}var bE=Math.pow(2,7),IE=Math.pow(2,14),AE=Math.pow(2,21),TE=Math.pow(2,28),PE=Math.pow(2,35),OE=Math.pow(2,42),RE=Math.pow(2,49),LE=Math.pow(2,56),DE=Math.pow(2,63),VE=function(n){return n<bE?1:n<IE?2:n<AE?3:n<TE?4:n<PE?5:n<OE?6:n<RE?7:n<LE?8:n<DE?9:10},SE={encode:yE,decode:EE,encodingLength:VE},bu=SE;const qa=(n,t,e=0)=>(bu.encode(n,t,e),t),Ma=n=>bu.encodingLength(n),ps=(n,t)=>{const e=t.byteLength,r=Ma(n),i=r+Ma(e),s=new Uint8Array(i+e);return qa(n,s,0),qa(e,s,r),s.set(t,i),new xE(n,e,t,s)};class xE{constructor(t,e,r,i){this.code=t,this.size=e,this.digest=r,this.bytes=i}}const Iu=({name:n,code:t,encode:e})=>new CE(n,t,e);class CE{constructor(t,e,r){this.name=t,this.code=e,this.encode=r}digest(t){if(t instanceof Uint8Array){const e=this.encode(t);return e instanceof Uint8Array?ps(this.code,e):e.then(r=>ps(this.code,r))}else throw Error("Unknown type, must be binary type")}}const Au=n=>async t=>new Uint8Array(await crypto.subtle.digest(n,t)),$E=Iu({name:"sha2-256",code:18,encode:Au("SHA-256")}),kE=Iu({name:"sha2-512",code:19,encode:Au("SHA-512")});var NE=Object.freeze({__proto__:null,sha256:$E,sha512:kE});const Tu=0,UE="identity",Pu=wu,qE=n=>ps(Tu,Pu(n)),ME={code:Tu,name:UE,encode:Pu,digest:qE};var BE=Object.freeze({__proto__:null,identity:ME});new TextEncoder,new TextDecoder;const Ba={...Cg,...kg,...Ug,...Mg,...zg,...Xg,...nE,...sE,...uE,...mE};({...NE,...BE});function Ou(n){return globalThis.Buffer!=null?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n}function jE(n=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Ou(globalThis.Buffer.allocUnsafe(n)):new Uint8Array(n)}function Ru(n,t,e,r){return{name:n,prefix:t,encoder:{name:n,prefix:t,encode:e},decoder:{decode:r}}}const ja=Ru("utf8","u",n=>"u"+new TextDecoder("utf8").decode(n),n=>new TextEncoder().encode(n.substring(1))),Li=Ru("ascii","a",n=>{let t="a";for(let e=0;e<n.length;e++)t+=String.fromCharCode(n[e]);return t},n=>{n=n.substring(1);const t=jE(n.length);for(let e=0;e<n.length;e++)t[e]=n.charCodeAt(e);return t}),zE={utf8:ja,"utf-8":ja,hex:Ba.base16,latin1:Li,ascii:Li,binary:Li,...Ba};function FE(n,t="utf8"){const e=zE[t];if(!e)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Ou(globalThis.Buffer.from(n,"utf-8")):e.decoder.decode(`${e.prefix}${n}`)}var KE=Object.defineProperty,WE=(n,t,e)=>t in n?KE(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ct=(n,t,e)=>WE(n,typeof t!="symbol"?t+"":t,e);class HE{constructor(t,e){this.core=t,this.logger=e,ct(this,"keychain",new Map),ct(this,"name",Ww),ct(this,"version",Hw),ct(this,"initialized",!1),ct(this,"storagePrefix",mt),ct(this,"init",async()=>{if(!this.initialized){const r=await this.getKeyChain();typeof r<"u"&&(this.keychain=r),this.initialized=!0}}),ct(this,"has",r=>(this.isInitialized(),this.keychain.has(r))),ct(this,"set",async(r,i)=>{this.isInitialized(),this.keychain.set(r,i),await this.persist()}),ct(this,"get",r=>{this.isInitialized();const i=this.keychain.get(r);if(typeof i>"u"){const{message:s}=k("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(s)}return i}),ct(this,"del",async r=>{this.isInitialized(),this.keychain.delete(r),await this.persist()}),this.core=t,this.logger=xe(e,this.name)}get context(){return je(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(t){await this.core.storage.setItem(this.storageKey,Qi(t))}async getKeyChain(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?Xi(t):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:t}=k("NOT_INITIALIZED",this.name);throw new Error(t)}}}var GE=Object.defineProperty,JE=(n,t,e)=>t in n?GE(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ee=(n,t,e)=>JE(n,typeof t!="symbol"?t+"":t,e);class ZE{constructor(t,e,r){this.core=t,this.logger=e,Ee(this,"name",Fw),Ee(this,"keychain"),Ee(this,"randomSessionIdentifier",ls()),Ee(this,"initialized",!1),Ee(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),Ee(this,"hasKeys",i=>(this.isInitialized(),this.keychain.has(i))),Ee(this,"getClientId",async()=>{this.isInitialized();const i=await this.getClientSeed(),s=yo(i);return Kd(s.publicKey)}),Ee(this,"generateKeyPair",()=>{this.isInitialized();const i=Ly();return this.setPrivateKey(i.publicKey,i.privateKey)}),Ee(this,"signJWT",async i=>{this.isInitialized();const s=await this.getClientSeed(),o=yo(s),c=this.randomSessionIdentifier;return await Wd(c,i,Kw,o)}),Ee(this,"generateSharedKey",(i,s,o)=>{this.isInitialized();const c=this.getPrivateKey(i),l=Dy(c,s);return this.setSymKey(l,o)}),Ee(this,"setSymKey",async(i,s)=>{this.isInitialized();const o=s||xr(i);return await this.keychain.set(o,i),o}),Ee(this,"deleteKeyPair",async i=>{this.isInitialized(),await this.keychain.del(i)}),Ee(this,"deleteSymKey",async i=>{this.isInitialized(),await this.keychain.del(i)}),Ee(this,"encode",async(i,s,o)=>{this.isInitialized();const c=lu(o),l=ji(s);if(Ia(c))return xy(l,o==null?void 0:o.encoding);if(ba(c)){const _=c.senderPublicKey,p=c.receiverPublicKey;i=await this.generateSharedKey(_,p)}const d=this.getSymKey(i),{type:u,senderPublicKey:h}=c;return Vy({type:u,symKey:d,message:l,senderPublicKey:h,encoding:o==null?void 0:o.encoding})}),Ee(this,"decode",async(i,s,o)=>{this.isInitialized();const c=$y(s,o);if(Ia(c)){const l=Cy(s,o==null?void 0:o.encoding);return wo(l)}if(ba(c)){const l=c.receiverPublicKey,d=c.senderPublicKey;i=await this.generateSharedKey(l,d)}try{const l=this.getSymKey(i),d=Sy({symKey:l,encoded:s,encoding:o==null?void 0:o.encoding});return wo(d)}catch(l){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(l)}}),Ee(this,"getPayloadType",(i,s=Ue)=>{const o=ur({encoded:i,encoding:s});return on(o.type)}),Ee(this,"getPayloadSenderPublicKey",(i,s=Ue)=>{const o=ur({encoded:i,encoding:s});return o.senderPublicKey?Be(o.senderPublicKey,Se):void 0}),this.core=t,this.logger=xe(e,this.name),this.keychain=r||new HE(this.core,this.logger)}get context(){return je(this.logger)}async setPrivateKey(t,e){return await this.keychain.set(t,e),t}getPrivateKey(t){return this.keychain.get(t)}async getClientSeed(){let t="";try{t=this.keychain.get($a)}catch{t=ls(),await this.keychain.set($a,t)}return FE(t,"base16")}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){const{message:t}=k("NOT_INITIALIZED",this.name);throw new Error(t)}}}var YE=Object.defineProperty,QE=Object.defineProperties,XE=Object.getOwnPropertyDescriptors,za=Object.getOwnPropertySymbols,e0=Object.prototype.hasOwnProperty,t0=Object.prototype.propertyIsEnumerable,fs=(n,t,e)=>t in n?YE(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,n0=(n,t)=>{for(var e in t||(t={}))e0.call(t,e)&&fs(n,e,t[e]);if(za)for(var e of za(t))t0.call(t,e)&&fs(n,e,t[e]);return n},r0=(n,t)=>QE(n,XE(t)),ze=(n,t,e)=>fs(n,typeof t!="symbol"?t+"":t,e);class i0 extends b_{constructor(t,e){super(t,e),this.logger=t,this.core=e,ze(this,"messages",new Map),ze(this,"messagesWithoutClientAck",new Map),ze(this,"name",Gw),ze(this,"version",Jw),ze(this,"initialized",!1),ze(this,"storagePrefix",mt),ze(this,"init",async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const r=await this.getRelayerMessages();typeof r<"u"&&(this.messages=r);const i=await this.getRelayerMessagesWithoutClientAck();typeof i<"u"&&(this.messagesWithoutClientAck=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(r){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(r)}finally{this.initialized=!0}}}),ze(this,"set",async(r,i,s)=>{this.isInitialized();const o=Ze(i);let c=this.messages.get(r);if(typeof c>"u"&&(c={}),typeof c[o]<"u")return o;if(c[o]=i,this.messages.set(r,c),s===Cr.inbound){const l=this.messagesWithoutClientAck.get(r)||{};this.messagesWithoutClientAck.set(r,r0(n0({},l),{[o]:i}))}return await this.persist(),o}),ze(this,"get",r=>{this.isInitialized();let i=this.messages.get(r);return typeof i>"u"&&(i={}),i}),ze(this,"getWithoutAck",r=>{this.isInitialized();const i={};for(const s of r){const o=this.messagesWithoutClientAck.get(s)||{};i[s]=Object.values(o)}return i}),ze(this,"has",(r,i)=>{this.isInitialized();const s=this.get(r),o=Ze(i);return typeof s[o]<"u"}),ze(this,"ack",async(r,i)=>{this.isInitialized();const s=this.messagesWithoutClientAck.get(r);if(typeof s>"u")return;const o=Ze(i);delete s[o],Object.keys(s).length===0?this.messagesWithoutClientAck.delete(r):this.messagesWithoutClientAck.set(r,s),await this.persist()}),ze(this,"del",async r=>{this.isInitialized(),this.messages.delete(r),this.messagesWithoutClientAck.delete(r),await this.persist()}),this.logger=xe(t,this.name),this.core=e}get context(){return je(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(t){await this.core.storage.setItem(this.storageKey,Qi(t))}async setRelayerMessagesWithoutClientAck(t){await this.core.storage.setItem(this.storageKeyWithoutClientAck,Qi(t))}async getRelayerMessages(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?Xi(t):void 0}async getRelayerMessagesWithoutClientAck(){const t=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return typeof t<"u"?Xi(t):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){const{message:t}=k("NOT_INITIALIZED",this.name);throw new Error(t)}}}var s0=Object.defineProperty,o0=Object.defineProperties,a0=Object.getOwnPropertyDescriptors,Fa=Object.getOwnPropertySymbols,c0=Object.prototype.hasOwnProperty,l0=Object.prototype.propertyIsEnumerable,ms=(n,t,e)=>t in n?s0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,yn=(n,t)=>{for(var e in t||(t={}))c0.call(t,e)&&ms(n,e,t[e]);if(Fa)for(var e of Fa(t))l0.call(t,e)&&ms(n,e,t[e]);return n},Ka=(n,t)=>o0(n,a0(t)),Ge=(n,t,e)=>ms(n,typeof t!="symbol"?t+"":t,e);class u0 extends I_{constructor(t,e){super(t,e),this.relayer=t,this.logger=e,Ge(this,"events",new cn.EventEmitter),Ge(this,"name",Yw),Ge(this,"queue",new Map),Ge(this,"publishTimeout",U.toMiliseconds(U.ONE_MINUTE)),Ge(this,"initialPublishTimeout",U.toMiliseconds(U.ONE_SECOND*15)),Ge(this,"needsTransportRestart",!1),Ge(this,"publish",async(r,i,s)=>{var o,c,l,d,u;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:r,message:i,opts:s}});const h=(s==null?void 0:s.ttl)||Zw,_=(s==null?void 0:s.prompt)||!1,p=(s==null?void 0:s.tag)||0,f=(s==null?void 0:s.id)||Zt().toString(),m=vn(Gr().protocol),y={id:f,method:(s==null?void 0:s.publishMethod)||m.publish,params:yn({topic:r,message:i,ttl:h,prompt:_,tag:p,attestation:s==null?void 0:s.attestation},(s==null?void 0:s.tvf)&&{tvf:s.tvf})},E=`Failed to publish payload, please try again. id:${f} tag:${p}`;try{fe((o=y.params)==null?void 0:o.prompt)&&((c=y.params)==null||delete c.prompt),fe((l=y.params)==null?void 0:l.tag)&&((d=y.params)==null||delete d.tag);const P=new Promise(async g=>{const b=({id:L})=>{var N;((N=y.id)==null?void 0:N.toString())===L.toString()&&(this.removeRequestFromQueue(L),this.relayer.events.removeListener(le.publish,b),g())};this.relayer.events.on(le.publish,b);const I=_t(new Promise((L,N)=>{this.rpcPublish(y,s).then(L).catch(x=>{this.logger.warn(x,x==null?void 0:x.message),N(x)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${f} tag:${p}`);try{await I,this.events.removeListener(le.publish,b)}catch(L){this.queue.set(f,{request:y,opts:s,attempt:1}),this.logger.warn(L,L==null?void 0:L.message)}});this.logger.trace({type:"method",method:"publish",params:{id:f,topic:r,message:i,opts:s}}),await _t(P,this.publishTimeout,E)}catch(P){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(P),(u=s==null?void 0:s.internal)!=null&&u.throwOnFailedPublish)throw P}finally{this.queue.delete(f)}}),Ge(this,"publishCustom",async r=>{var i,s,o,c,l;this.logger.debug("Publishing custom payload"),this.logger.trace({type:"method",method:"publishCustom",params:r});const{payload:d,opts:u={}}=r,{attestation:h,tvf:_,publishMethod:p,prompt:f,tag:m,ttl:y=U.FIVE_MINUTES}=u,E=u.id||Zt().toString(),P=vn(Gr().protocol),g=p||P.publish,b={id:E,method:g,params:yn(Ka(yn({},d),{ttl:y,prompt:f,tag:m,attestation:h}),_)},I=`Failed to publish custom payload, please try again. id:${E} tag:${m}`;try{fe((i=b.params)==null?void 0:i.prompt)&&((s=b.params)==null||delete s.prompt),fe((o=b.params)==null?void 0:o.tag)&&((c=b.params)==null||delete c.tag);const L=new Promise(async N=>{const x=({id:v})=>{var A;((A=b.id)==null?void 0:A.toString())===v.toString()&&(this.removeRequestFromQueue(v),this.relayer.events.removeListener(le.publish,x),N())};this.relayer.events.on(le.publish,x);const w=_t(new Promise((v,A)=>{this.rpcPublish(b,u).then(v).catch(T=>{this.logger.warn(T,T==null?void 0:T.message),A(T)})}),this.initialPublishTimeout,`Failed initial custom payload publish, retrying.... method:${g} id:${E} tag:${m}`);try{await w,this.events.removeListener(le.publish,x)}catch(v){this.queue.set(E,{request:b,opts:u,attempt:1}),this.logger.warn(v,v==null?void 0:v.message)}});this.logger.trace({type:"method",method:"publish",params:{id:E,payload:d,opts:u}}),await _t(L,this.publishTimeout,I)}catch(L){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(L),(l=u==null?void 0:u.internal)!=null&&l.throwOnFailedPublish)throw L}finally{this.queue.delete(E)}}),Ge(this,"on",(r,i)=>{this.events.on(r,i)}),Ge(this,"once",(r,i)=>{this.events.once(r,i)}),Ge(this,"off",(r,i)=>{this.events.off(r,i)}),Ge(this,"removeListener",(r,i)=>{this.events.removeListener(r,i)}),this.relayer=t,this.logger=xe(e,this.name),this.registerEventListeners()}get context(){return je(this.logger)}async rpcPublish(t,e){this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:t});const r=await this.relayer.request(t);return this.relayer.events.emit(le.publish,yn(yn({},t),e)),this.logger.debug("Successfully Published Payload"),r}removeRequestFromQueue(t){this.queue.delete(t)}checkQueue(){this.queue.forEach(async(t,e)=>{var r;const i=t.attempt+1;this.queue.set(e,Ka(yn({},t),{attempt:i})),this.logger.warn({},`Publisher: queue->publishing: ${t.request.id}, tag: ${(r=t.request.params)==null?void 0:r.tag}, attempt: ${i}`),await this.rpcPublish(t.request,t.opts),this.logger.warn({},`Publisher: queue->published: ${t.request.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(On.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(le.connection_stalled);return}this.checkQueue()}),this.relayer.on(le.message_ack,t=>{this.removeRequestFromQueue(t.id.toString())})}}var d0=Object.defineProperty,h0=(n,t,e)=>t in n?d0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,wn=(n,t,e)=>h0(n,typeof t!="symbol"?t+"":t,e);class _0{constructor(){wn(this,"map",new Map),wn(this,"set",(t,e)=>{const r=this.get(t);this.exists(t,e)||this.map.set(t,[...r,e])}),wn(this,"get",t=>this.map.get(t)||[]),wn(this,"exists",(t,e)=>this.get(t).includes(e)),wn(this,"delete",(t,e)=>{if(typeof e>"u"){this.map.delete(t);return}if(!this.map.has(t))return;const r=this.get(t);if(!this.exists(t,e))return;const i=r.filter(s=>s!==e);if(!i.length){this.map.delete(t);return}this.map.set(t,i)}),wn(this,"clear",()=>{this.map.clear()})}get topics(){return Array.from(this.map.keys())}}var p0=Object.defineProperty,f0=Object.defineProperties,m0=Object.getOwnPropertyDescriptors,Wa=Object.getOwnPropertySymbols,y0=Object.prototype.hasOwnProperty,w0=Object.prototype.propertyIsEnumerable,ys=(n,t,e)=>t in n?p0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,zn=(n,t)=>{for(var e in t||(t={}))y0.call(t,e)&&ys(n,e,t[e]);if(Wa)for(var e of Wa(t))w0.call(t,e)&&ys(n,e,t[e]);return n},Di=(n,t)=>f0(n,m0(t)),re=(n,t,e)=>ys(n,typeof t!="symbol"?t+"":t,e);class g0 extends P_{constructor(t,e){super(t,e),this.relayer=t,this.logger=e,re(this,"subscriptions",new Map),re(this,"topicMap",new _0),re(this,"events",new cn.EventEmitter),re(this,"name",ig),re(this,"version",sg),re(this,"pending",new Map),re(this,"cached",[]),re(this,"initialized",!1),re(this,"storagePrefix",mt),re(this,"subscribeTimeout",U.toMiliseconds(U.ONE_MINUTE)),re(this,"initialSubscribeTimeout",U.toMiliseconds(U.ONE_SECOND*15)),re(this,"clientId"),re(this,"batchSubscribeTopicsLimit",500),re(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),re(this,"subscribe",async(r,i)=>{var s;this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}});try{const o=Gr(i),c={topic:r,relay:o,transportType:i==null?void 0:i.transportType};(s=i==null?void 0:i.internal)!=null&&s.skipSubscribe||this.pending.set(r,c);const l=await this.rpcSubscribe(r,o,i);return typeof l=="string"&&(this.onSubscribe(l,c),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}})),l}catch(o){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(o),o}}),re(this,"unsubscribe",async(r,i)=>{this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(r,i.id,i):await this.unsubscribeByTopic(r,i)}),re(this,"isSubscribed",r=>new Promise(i=>{i(this.topicMap.topics.includes(r))})),re(this,"isKnownTopic",r=>new Promise(i=>{i(this.topicMap.topics.includes(r)||this.pending.has(r)||this.cached.some(s=>s.topic===r))})),re(this,"on",(r,i)=>{this.events.on(r,i)}),re(this,"once",(r,i)=>{this.events.once(r,i)}),re(this,"off",(r,i)=>{this.events.off(r,i)}),re(this,"removeListener",(r,i)=>{this.events.removeListener(r,i)}),re(this,"start",async()=>{await this.onConnect()}),re(this,"stop",async()=>{await this.onDisconnect()}),re(this,"restart",async()=>{await this.restore(),await this.onRestart()}),re(this,"checkPending",async()=>{if(this.pending.size===0&&(!this.initialized||!this.relayer.connected))return;const r=[];this.pending.forEach(i=>{r.push(i)}),await this.batchSubscribe(r)}),re(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(On.pulse,async()=>{await this.checkPending()}),this.events.on(Fe.created,async r=>{const i=Fe.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()}),this.events.on(Fe.deleted,async r=>{const i=Fe.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()})}),this.relayer=t,this.logger=xe(e,this.name),this.clientId=""}get context(){return je(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}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(t,e){let r=!1;try{r=this.getSubscription(t).topic===e}catch{}return r}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(t,e){const r=this.topicMap.get(t);await Promise.all(r.map(async i=>await this.unsubscribeById(t,i,e)))}async unsubscribeById(t,e,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:e,opts:r}});try{const i=Gr(r);await this.restartToComplete({topic:t,id:e,relay:i}),await this.rpcUnsubscribe(t,e,i);const s=ae("USER_DISCONNECTED",`${this.name}, ${t}`);await this.onUnsubscribe(t,e,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:e,opts:r}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(t,e,r){var i,s;const o=await this.getSubscriptionId(t);if((i=r==null?void 0:r.internal)!=null&&i.skipSubscribe)return o;(!r||(r==null?void 0:r.transportType)===se.relay)&&await this.restartToComplete({topic:t,id:t,relay:e});const c={method:vn(e.protocol).subscribe,params:{topic:t}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:c});const l=(s=r==null?void 0:r.internal)==null?void 0:s.throwOnFailedPublish;try{if((r==null?void 0:r.transportType)===se.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(c).catch(h=>this.logger.warn(h))},U.toMiliseconds(U.ONE_SECOND)),o;const d=new Promise(async h=>{const _=p=>{p.topic===t&&(this.events.removeListener(Fe.created,_),h(p.id))};this.events.on(Fe.created,_);try{const p=await _t(new Promise((f,m)=>{this.relayer.request(c).catch(y=>{this.logger.warn(y,y==null?void 0:y.message),m(y)}).then(f)}),this.initialSubscribeTimeout,`Subscribing to ${t} failed, please try again`);this.events.removeListener(Fe.created,_),h(p)}catch{}}),u=await _t(d,this.subscribeTimeout,`Subscribing to ${t} failed, please try again`);if(!u&&l)throw new Error(`Subscribing to ${t} failed, please try again`);return u?o:null}catch(d){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(le.connection_stalled),l)throw d}return null}async rpcBatchSubscribe(t){if(!t.length)return;const e=t[0].relay,r={method:vn(e.protocol).batchSubscribe,params:{topics:t.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await _t(new Promise(i=>{this.relayer.request(r).catch(s=>this.logger.warn(s)).then(i)}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again")}catch{this.relayer.events.emit(le.connection_stalled)}}async rpcBatchFetchMessages(t){if(!t.length)return;const e=t[0].relay,r={method:vn(e.protocol).batchFetchMessages,params:{topics:t.map(s=>s.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});let i;try{i=await await _t(new Promise((s,o)=>{this.relayer.request(r).catch(c=>{this.logger.warn(c),o(c)}).then(s)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch{this.relayer.events.emit(le.connection_stalled)}return i}rpcUnsubscribe(t,e,r){const i={method:vn(r.protocol).unsubscribe,params:{topic:t,id:e}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(t,e){this.setSubscription(t,Di(zn({},e),{id:t})),this.pending.delete(e.topic)}onBatchSubscribe(t){t.length&&t.forEach(e=>{this.setSubscription(e.id,zn({},e)),this.pending.delete(e.topic)})}async onUnsubscribe(t,e,r){this.events.removeAllListeners(e),this.hasSubscription(e,t)&&this.deleteSubscription(e,r),await this.relayer.messages.del(t)}async setRelayerSubscriptions(t){await this.relayer.core.storage.setItem(this.storageKey,t)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(t,e){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:e}),this.addSubscription(t,e)}addSubscription(t,e){this.subscriptions.set(t,zn({},e)),this.topicMap.set(e.topic,t),this.events.emit(Fe.created,e)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});const e=this.subscriptions.get(t);if(!e){const{message:r}=k("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(r)}return e}deleteSubscription(t,e){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:e});const r=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(r.topic,t),this.events.emit(Fe.deleted,Di(zn({},r),{reason:e}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Fe.sync)}async onRestart(){if(this.cached.length){const t=[...this.cached],e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r<e;r++){const i=t.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(i)}}this.events.emit(Fe.resubscribed)}async restore(){try{const t=await this.getRelayerSubscriptions();if(typeof t>"u"||!t.length)return;if(this.subscriptions.size&&!t.every(e=>{var r;return e.topic===((r=this.subscriptions.get(e.id))==null?void 0:r.topic)})){const{message:e}=k("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(e)}this.cached=t,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(t){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(t)}}async batchSubscribe(t){t.length&&(await this.rpcBatchSubscribe(t),this.onBatchSubscribe(await Promise.all(t.map(async e=>Di(zn({},e),{id:await this.getSubscriptionId(e.topic)})))))}async batchFetchMessages(t){if(!t.length)return;this.logger.trace(`Fetching batch messages for ${t.length} subscriptions`);const e=await this.rpcBatchFetchMessages(t);e&&e.messages&&(await Zp(U.toMiliseconds(U.ONE_SECOND)),await this.relayer.handleBatchMessageEvents(e.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){const{message:t}=k("NOT_INITIALIZED",this.name);throw new Error(t)}}async restartToComplete(t){!this.relayer.connected&&!this.relayer.connecting&&(this.cached.push(t),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(t){return Ze(t+await this.getClientId())}}var E0=Object.defineProperty,Ha=Object.getOwnPropertySymbols,v0=Object.prototype.hasOwnProperty,b0=Object.prototype.propertyIsEnumerable,ws=(n,t,e)=>t in n?E0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ga=(n,t)=>{for(var e in t||(t={}))v0.call(t,e)&&ws(n,e,t[e]);if(Ha)for(var e of Ha(t))b0.call(t,e)&&ws(n,e,t[e]);return n},Q=(n,t,e)=>ws(n,typeof t!="symbol"?t+"":t,e);class I0 extends A_{constructor(t){super(t),Q(this,"protocol","wc"),Q(this,"version",2),Q(this,"core"),Q(this,"logger"),Q(this,"events",new cn.EventEmitter),Q(this,"provider"),Q(this,"messages"),Q(this,"subscriber"),Q(this,"publisher"),Q(this,"name",Xw),Q(this,"transportExplicitlyClosed",!1),Q(this,"initialized",!1),Q(this,"connectionAttemptInProgress",!1),Q(this,"relayUrl"),Q(this,"projectId"),Q(this,"packageName"),Q(this,"bundleId"),Q(this,"hasExperiencedNetworkDisruption",!1),Q(this,"pingTimeout"),Q(this,"heartBeatTimeout",U.toMiliseconds(U.THIRTY_SECONDS+U.FIVE_SECONDS)),Q(this,"reconnectTimeout"),Q(this,"connectPromise"),Q(this,"reconnectInProgress",!1),Q(this,"requestsInFlight",[]),Q(this,"connectTimeout",U.toMiliseconds(U.ONE_SECOND*15)),Q(this,"request",async e=>{var r,i;this.logger.debug("Publishing Request Payload");const s=e.id||Zt().toString();await this.toEstablishConnection();try{this.logger.trace({id:s,method:e.method,topic:(r=e.params)==null?void 0:r.topic},"relayer.request - publishing...");const o=`${s}:${((i=e.params)==null?void 0:i.tag)||""}`;this.requestsInFlight.push(o);const c=await this.provider.request(e);return this.requestsInFlight=this.requestsInFlight.filter(l=>l!==o),c}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}}),Q(this,"resetPingTimeout",()=>{Fr()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var e,r,i,s;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),(s=(i=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:i.terminate)==null||s.call(i)}catch(o){this.logger.warn(o,o==null?void 0:o.message)}},this.heartBeatTimeout))}),Q(this,"onPayloadHandler",e=>{this.onProviderPayload(e),this.resetPingTimeout()}),Q(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected 🛜"),this.startPingTimeout(),this.events.emit(le.connect)}),Q(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected 🛑"),this.requestsInFlight=[],this.onProviderDisconnect()}),Q(this,"onProviderErrorHandler",e=>{this.logger.fatal(`Fatal socket error: ${e.message}`),this.events.emit(le.error,e),this.logger.fatal("Fatal socket error received, closing transport"),this.transportClose()}),Q(this,"registerProviderListeners",()=>{this.provider.on(He.payload,this.onPayloadHandler),this.provider.on(He.connect,this.onConnectHandler),this.provider.on(He.disconnect,this.onDisconnectHandler),this.provider.on(He.error,this.onProviderErrorHandler)}),this.core=t.core,this.logger=typeof t.logger<"u"&&typeof t.logger!="string"?xe(t.logger,this.name):ti(Fs({level:t.logger||Qw})),this.messages=new i0(this.logger,t.core),this.subscriber=new g0(this,this.logger),this.publisher=new u0(this,this.logger),this.projectId=t==null?void 0:t.projectId,this.relayUrl=(t==null?void 0:t.relayUrl)||mu,Cp()?this.packageName=Fo():$p()&&(this.bundleId=Fo()),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.transportOpen().catch(t=>this.logger.warn(t,t==null?void 0:t.message))}get context(){return je(this.logger)}get connected(){var t,e,r;return((r=(e=(t=this.provider)==null?void 0:t.connection)==null?void 0:e.socket)==null?void 0:r.readyState)===1||!1}get connecting(){var t,e,r;return((r=(e=(t=this.provider)==null?void 0:t.connection)==null?void 0:e.socket)==null?void 0:r.readyState)===0||this.connectPromise!==void 0||!1}async publish(t,e,r){this.isInitialized(),await this.publisher.publish(t,e,r),await this.recordMessageEvent({topic:t,message:e,publishedAt:Date.now(),transportType:se.relay},Cr.outbound)}async publishCustom(t){this.isInitialized(),await this.publisher.publishCustom(t)}async subscribe(t,e){var r,i,s;this.isInitialized(),(!(e!=null&&e.transportType)||(e==null?void 0:e.transportType)==="relay")&&await this.toEstablishConnection();const o=typeof((r=e==null?void 0:e.internal)==null?void 0:r.throwOnFailedPublish)>"u"?!0:(i=e==null?void 0:e.internal)==null?void 0:i.throwOnFailedPublish;let c=((s=this.subscriber.topicMap.get(t))==null?void 0:s[0])||"",l;const d=u=>{u.topic===t&&(this.subscriber.off(Fe.created,d),l())};return await Promise.all([new Promise(u=>{l=u,this.subscriber.on(Fe.created,d)}),new Promise(async(u,h)=>{c=await this.subscriber.subscribe(t,Ga({internal:{throwOnFailedPublish:o}},e)).catch(_=>{o&&h(_)})||c,u()})]),c}async unsubscribe(t,e){this.isInitialized(),await this.subscriber.unsubscribe(t,e)}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await _t(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(t){if(!this.subscriber.hasAnyTopics){this.logger.info("Starting WS connection skipped because the client has no topics to work with.");return}if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(e,r)=>{await this.connect(t).then(e).catch(r).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(t){this.logger.debug({},"Restarting transport..."),!this.connectionAttemptInProgress&&(this.relayUrl=t||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await Ca())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(t){if((t==null?void 0:t.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const e=t.sort((r,i)=>r.publishedAt-i.publishedAt);this.logger.debug(`Batch of ${e.length} message events sorted`);for(const r of e)try{await this.onMessageEvent(r)}catch(i){this.logger.warn(i,"Error while processing batch message event: "+(i==null?void 0:i.message))}this.logger.trace(`Batch of ${e.length} message events processed`)}async onLinkMessageEvent(t,e){const{topic:r}=t;if(!e.sessionExists){const i=pe(U.FIVE_MINUTES),s={topic:r,expiry:i,relay:{protocol:"irn"},active:!1};await this.core.pairing.pairings.set(r,s)}this.events.emit(le.message,t),await this.recordMessageEvent(t,Cr.inbound)}async connect(t){await this.confirmOnlineStateOrThrow(),t&&t!==this.relayUrl&&(this.relayUrl=t,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let e=1;for(;e<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${e}...`),await this.createProvider(),await new Promise(async(r,i)=>{const s=()=>{i(new Error("Connection interrupted while trying to connect"))};this.provider.once(He.disconnect,s),await _t(new Promise((o,c)=>{this.provider.connect().then(o).catch(c)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>{i(o)}).finally(()=>{this.provider.off(He.disconnect,s),clearTimeout(this.reconnectTimeout)}),await new Promise(async(o,c)=>{const l=()=>{i(new Error("Connection interrupted while trying to subscribe"))};this.provider.once(He.disconnect,l),await this.subscriber.start().then(o).catch(c).finally(()=>{this.provider.off(He.disconnect,l)})}),this.hasExperiencedNetworkDisruption=!1,r()})}catch(r){await this.subscriber.stop();const i=r;this.logger.warn({},i.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${e}`);break}await new Promise(r=>setTimeout(r,U.toMiliseconds(e*1))),e++}}startPingTimeout(){var t,e,r,i,s;if(Fr())try{(e=(t=this.provider)==null?void 0:t.connection)!=null&&e.socket&&((s=(i=(r=this.provider)==null?void 0:r.connection)==null?void 0:i.socket)==null||s.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o,o==null?void 0:o.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const t=await this.core.crypto.signJWT(this.relayUrl);this.provider=new zd(new Fd(Mp({sdkVersion:hs,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:t,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(t,e){const{topic:r,message:i}=t;await this.messages.set(r,i,e)}async shouldIgnoreMessageEvent(t){const{topic:e,message:r}=t;if(!r||r.length===0)return this.logger.warn(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isKnownTopic(e))return this.logger.warn(`Ignoring message for unknown topic ${e}`),!0;const i=this.messages.has(e,r);return i&&this.logger.warn(`Ignoring duplicate message: ${r}`),i}async onProviderPayload(t){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:t}),Ss(t)){if(!t.method.endsWith(eg))return;const e=t.params,{topic:r,message:i,publishedAt:s,attestation:o}=e.data,c={topic:r,message:i,publishedAt:s,transportType:se.relay,attestation:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(Ga({type:"event",event:e.id},c)),this.events.emit(e.id,c),await this.acknowledgePayload(t),await this.onMessageEvent(c)}else xs(t)&&this.events.emit(le.message_ack,t)}async onMessageEvent(t){await this.shouldIgnoreMessageEvent(t)||(await this.recordMessageEvent(t,Cr.inbound),this.events.emit(le.message,t))}async acknowledgePayload(t){const e=Ur(t.id,!0);await this.provider.connection.send(e)}unregisterProviderListeners(){this.provider.off(He.payload,this.onPayloadHandler),this.provider.off(He.connect,this.onConnectHandler),this.provider.off(He.disconnect,this.onDisconnectHandler),this.provider.off(He.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let t=await Ca();Lw(async e=>{t!==e&&(t=e,e?await this.transportOpen().catch(r=>this.logger.error(r,r==null?void 0:r.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(On.pulse,async()=>{if(!this.transportExplicitlyClosed&&!this.connected&&Sw())try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(e){this.logger.warn(e,e==null?void 0:e.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(le.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(t=>this.logger.error(t,t==null?void 0:t.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},U.toMiliseconds(tg)))))}isInitialized(){if(!this.initialized){const{message:t}=k("NOT_INITIALIZED",this.name);throw new Error(t)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}}function A0(n,t){return n===t||Number.isNaN(n)&&Number.isNaN(t)}function Ja(n){return Object.getOwnPropertySymbols(n).filter(t=>Object.prototype.propertyIsEnumerable.call(n,t))}function Za(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const T0="[object RegExp]",P0="[object String]",O0="[object Number]",R0="[object Boolean]",Ya="[object Arguments]",L0="[object Symbol]",D0="[object Date]",V0="[object Map]",S0="[object Set]",x0="[object Array]",C0="[object Function]",$0="[object ArrayBuffer]",Vi="[object Object]",k0="[object Error]",N0="[object DataView]",U0="[object Uint8Array]",q0="[object Uint8ClampedArray]",M0="[object Uint16Array]",B0="[object Uint32Array]",j0="[object BigUint64Array]",z0="[object Int8Array]",F0="[object Int16Array]",K0="[object Int32Array]",W0="[object BigInt64Array]",H0="[object Float32Array]",G0="[object Float64Array]";function J0(){}function Qa(n){if(!n||typeof n!="object")return!1;const t=Object.getPrototypeOf(n);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(n)==="[object Object]":!1}function Z0(n,t,e){return Gn(n,t,void 0,void 0,void 0,void 0,e)}function Gn(n,t,e,r,i,s,o){const c=o(n,t,e,r,i,s);if(c!==void 0)return c;if(typeof n==typeof t)switch(typeof n){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return n===t;case"number":return n===t||Object.is(n,t);case"function":return n===t;case"object":return tr(n,t,s,o)}return tr(n,t,s,o)}function tr(n,t,e,r){if(Object.is(n,t))return!0;let i=Za(n),s=Za(t);if(i===Ya&&(i=Vi),s===Ya&&(s=Vi),i!==s)return!1;switch(i){case P0:return n.toString()===t.toString();case O0:{const l=n.valueOf(),d=t.valueOf();return A0(l,d)}case R0:case D0:case L0:return Object.is(n.valueOf(),t.valueOf());case T0:return n.source===t.source&&n.flags===t.flags;case C0:return n===t}e=e??new Map;const o=e.get(n),c=e.get(t);if(o!=null&&c!=null)return o===t;e.set(n,t),e.set(t,n);try{switch(i){case V0:{if(n.size!==t.size)return!1;for(const[l,d]of n.entries())if(!t.has(l)||!Gn(d,t.get(l),l,n,t,e,r))return!1;return!0}case S0:{if(n.size!==t.size)return!1;const l=Array.from(n.values()),d=Array.from(t.values());for(let u=0;u<l.length;u++){const h=l[u],_=d.findIndex(p=>Gn(h,p,void 0,n,t,e,r));if(_===-1)return!1;d.splice(_,1)}return!0}case x0:case U0:case q0:case M0:case B0:case j0:case z0:case F0:case K0:case W0:case H0:case G0:{if(typeof te<"u"&&te.isBuffer(n)!==te.isBuffer(t)||n.length!==t.length)return!1;for(let l=0;l<n.length;l++)if(!Gn(n[l],t[l],l,n,t,e,r))return!1;return!0}case $0:return n.byteLength!==t.byteLength?!1:tr(new Uint8Array(n),new Uint8Array(t),e,r);case N0:return n.byteLength!==t.byteLength||n.byteOffset!==t.byteOffset?!1:tr(new Uint8Array(n),new Uint8Array(t),e,r);case k0:return n.name===t.name&&n.message===t.message;case Vi:{if(!(tr(n.constructor,t.constructor,e,r)||Qa(n)&&Qa(t)))return!1;const l=[...Object.keys(n),...Ja(n)],d=[...Object.keys(t),...Ja(t)];if(l.length!==d.length)return!1;for(let u=0;u<l.length;u++){const h=l[u],_=n[h];if(!Object.hasOwn(t,h))return!1;const p=t[h];if(!Gn(_,p,h,n,t,e,r))return!1}return!0}default:return!1}}finally{e.delete(n),e.delete(t)}}function Y0(n,t){return Z0(n,t,J0)}var Q0=Object.defineProperty,Xa=Object.getOwnPropertySymbols,X0=Object.prototype.hasOwnProperty,ev=Object.prototype.propertyIsEnumerable,gs=(n,t,e)=>t in n?Q0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ec=(n,t)=>{for(var e in t||(t={}))X0.call(t,e)&&gs(n,e,t[e]);if(Xa)for(var e of Xa(t))ev.call(t,e)&&gs(n,e,t[e]);return n},Ce=(n,t,e)=>gs(n,typeof t!="symbol"?t+"":t,e);class dn extends T_{constructor(t,e,r,i=mt,s=void 0){super(t,e,r,i),this.core=t,this.logger=e,this.name=r,Ce(this,"map",new Map),Ce(this,"version",ng),Ce(this,"cached",[]),Ce(this,"initialized",!1),Ce(this,"getKey"),Ce(this,"storagePrefix",mt),Ce(this,"recentlyDeleted",[]),Ce(this,"recentlyDeletedLimit",200),Ce(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!fe(o)?this.map.set(this.getKey(o),o):ow(o)?this.map.set(o.id,o):aw(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)}),Ce(this,"set",async(o,c)=>{this.isInitialized(),this.map.has(o)?await this.update(o,c):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:c}),this.map.set(o,c),await this.persist())}),Ce(this,"get",o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o))),Ce(this,"getAll",o=>(this.isInitialized(),o?this.values.filter(c=>Object.keys(o).every(l=>Y0(c[l],o[l]))):this.values)),Ce(this,"update",async(o,c)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:c});const l=ec(ec({},this.getData(o)),c);this.map.set(o,l),await this.persist()}),Ce(this,"delete",async(o,c)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:c}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())}),this.logger=xe(e,this.name),this.storagePrefix=i,this.getKey=s}get context(){return je(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())}addToRecentlyDeleted(t){this.recentlyDeleted.push(t),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(t){await this.core.storage.setItem(this.storageKey,t)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(t){const e=this.map.get(t);if(!e){if(this.recentlyDeleted.includes(t)){const{message:i}=k("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${t}`);throw this.logger.error(i),new Error(i)}const{message:r}=k("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(r),new Error(r)}return e}async persist(){await this.setDataStore(this.values)}async restore(){try{const t=await this.getDataStore();if(typeof t>"u"||!t.length)return;if(this.map.size){const{message:e}=k("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=t,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(t){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(t)}}isInitialized(){if(!this.initialized){const{message:t}=k("NOT_INITIALIZED",this.name);throw new Error(t)}}}var tv=Object.defineProperty,nv=(n,t,e)=>t in n?tv(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,G=(n,t,e)=>nv(n,typeof t!="symbol"?t+"":t,e);class rv{constructor(t,e){this.core=t,this.logger=e,G(this,"name",og),G(this,"version",ag),G(this,"events",new Oc),G(this,"pairings"),G(this,"initialized",!1),G(this,"storagePrefix",mt),G(this,"ignoredPayloadTypes",[Tt]),G(this,"registeredMethods",[]),G(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),G(this,"register",({methods:r})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...r])]}),G(this,"create",async r=>{this.isInitialized();const i=ls(),s=await this.core.crypto.setSymKey(i),o=pe(U.FIVE_MINUTES),c={protocol:fu},l={topic:s,expiry:o,relay:c,active:!1,methods:r==null?void 0:r.methods},d=Ta({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:c,expiryTimestamp:o,methods:r==null?void 0:r.methods});return this.events.emit(Jt.create,l),this.core.expirer.set(s,o),await this.pairings.set(s,l),await this.core.relayer.subscribe(s,{transportType:r==null?void 0:r.transportType,internal:r==null?void 0:r.internal}),{topic:s,uri:d}}),G(this,"pair",async r=>{this.isInitialized();const i=this.core.eventClient.createEvent({properties:{topic:r==null?void 0:r.uri,trace:[ut.pairing_started]}});this.isValidPair(r,i);const{topic:s,symKey:o,relay:c,expiryTimestamp:l,methods:d}=Aa(r.uri);i.props.properties.topic=s,i.addTrace(ut.pairing_uri_validation_success),i.addTrace(ut.pairing_uri_not_expired);let u;if(this.pairings.keys.includes(s)){if(u=this.pairings.get(s),i.addTrace(ut.existing_pairing),u.active)throw i.setError(bt.active_pairing_already_exists),new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);i.addTrace(ut.pairing_not_expired)}const h=l||pe(U.FIVE_MINUTES),_={topic:s,relay:c,expiry:h,active:!1,methods:d};this.core.expirer.set(s,h),await this.pairings.set(s,_),i.addTrace(ut.store_new_pairing),r.activatePairing&&await this.activate({topic:s}),this.events.emit(Jt.create,_),i.addTrace(ut.emit_inactive_pairing),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(o,s),i.addTrace(ut.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{i.setError(bt.no_internet_connection)}try{await this.core.relayer.subscribe(s,{relay:c})}catch(p){throw i.setError(bt.subscribe_pairing_topic_failure),p}return i.addTrace(ut.subscribe_pairing_topic_success),_}),G(this,"activate",async({topic:r})=>{this.isInitialized();const i=pe(U.FIVE_MINUTES);this.core.expirer.set(r,i),await this.pairings.update(r,{active:!0,expiry:i})}),G(this,"ping",async r=>{this.isInitialized(),await this.isValidPing(r),this.logger.warn("ping() is deprecated and will be removed in the next major release.");const{topic:i}=r;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:c,reject:l}=Gt();this.events.once(X("pairing_ping",s),({error:d})=>{d?l(d):c()}),await o()}}),G(this,"updateExpiry",async({topic:r,expiry:i})=>{this.isInitialized(),await this.pairings.update(r,{expiry:i})}),G(this,"updateMetadata",async({topic:r,metadata:i})=>{this.isInitialized(),await this.pairings.update(r,{peerMetadata:i})}),G(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),G(this,"disconnect",async r=>{this.isInitialized(),await this.isValidDisconnect(r);const{topic:i}=r;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",ae("USER_DISCONNECTED")),await this.deletePairing(i))}),G(this,"formatUriFromPairing",r=>{this.isInitialized();const{topic:i,relay:s,expiry:o,methods:c}=r,l=this.core.crypto.keychain.get(i);return Ta({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:l,relay:s,expiryTimestamp:o,methods:c})}),G(this,"sendRequest",async(r,i,s)=>{const o=$t(i,s),c=await this.core.crypto.encode(r,o),l=Mn[i].req;return this.core.history.set(r,o),this.core.relayer.publish(r,c,l),o.id}),G(this,"sendResult",async(r,i,s)=>{const o=Ur(r,s),c=await this.core.crypto.encode(i,o),l=(await this.core.history.get(i,r)).request.method,d=Mn[l].res;await this.core.relayer.publish(i,c,d),await this.core.history.resolve(o)}),G(this,"sendError",async(r,i,s)=>{const o=Lc(r,s),c=await this.core.crypto.encode(i,o),l=(await this.core.history.get(i,r)).request.method,d=Mn[l]?Mn[l].res:Mn.unregistered_method.res;await this.core.relayer.publish(i,c,d),await this.core.history.resolve(o)}),G(this,"deletePairing",async(r,i)=>{await this.core.relayer.unsubscribe(r),await Promise.all([this.pairings.delete(r,ae("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(r),i?Promise.resolve():this.core.expirer.del(r)])}),G(this,"cleanup",async()=>{const r=this.pairings.getAll().filter(i=>kt(i.expiry));await Promise.all(r.map(i=>this.deletePairing(i.topic)))}),G(this,"onRelayEventRequest",async r=>{const{topic:i,payload:s}=r;switch(s.method){case"wc_pairingPing":return await this.onPairingPingRequest(i,s);case"wc_pairingDelete":return await this.onPairingDeleteRequest(i,s);default:return await this.onUnknownRpcMethodRequest(i,s)}}),G(this,"onRelayEventResponse",async r=>{const{topic:i,payload:s}=r,o=(await this.core.history.get(i,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(o)}}),G(this,"onPairingPingRequest",async(r,i)=>{const{id:s}=i;try{this.isValidPing({topic:r}),await this.sendResult(s,r,!0),this.events.emit(Jt.ping,{id:s,topic:r})}catch(o){await this.sendError(s,r,o),this.logger.error(o)}}),G(this,"onPairingPingResponse",(r,i)=>{const{id:s}=i;setTimeout(()=>{Et(i)?this.events.emit(X("pairing_ping",s),{}):dt(i)&&this.events.emit(X("pairing_ping",s),{error:i.error})},500)}),G(this,"onPairingDeleteRequest",async(r,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:r}),await this.deletePairing(r),this.events.emit(Jt.delete,{id:s,topic:r})}catch(o){await this.sendError(s,r,o),this.logger.error(o)}}),G(this,"onUnknownRpcMethodRequest",async(r,i)=>{const{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;const c=ae("WC_METHOD_UNSUPPORTED",o);await this.sendError(s,r,c),this.logger.error(c)}catch(c){await this.sendError(s,r,c),this.logger.error(c)}}),G(this,"onUnknownRpcMethodResponse",r=>{this.registeredMethods.includes(r)||this.logger.error(ae("WC_METHOD_UNSUPPORTED",r))}),G(this,"isValidPair",(r,i)=>{var s;if(!$e(r)){const{message:c}=k("MISSING_OR_INVALID",`pair() params: ${r}`);throw i.setError(bt.malformed_pairing_uri),new Error(c)}if(!sw(r.uri)){const{message:c}=k("MISSING_OR_INVALID",`pair() uri: ${r.uri}`);throw i.setError(bt.malformed_pairing_uri),new Error(c)}const o=Aa(r==null?void 0:r.uri);if(!((s=o==null?void 0:o.relay)!=null&&s.protocol)){const{message:c}=k("MISSING_OR_INVALID","pair() uri#relay-protocol");throw i.setError(bt.malformed_pairing_uri),new Error(c)}if(!(o!=null&&o.symKey)){const{message:c}=k("MISSING_OR_INVALID","pair() uri#symKey");throw i.setError(bt.malformed_pairing_uri),new Error(c)}if(o!=null&&o.expiryTimestamp&&U.toMiliseconds(o==null?void 0:o.expiryTimestamp)<Date.now()){i.setError(bt.pairing_expired);const{message:c}=k("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(c)}}),G(this,"isValidPing",async r=>{if(!$e(r)){const{message:s}=k("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(s)}const{topic:i}=r;await this.isValidPairingTopic(i)}),G(this,"isValidDisconnect",async r=>{if(!$e(r)){const{message:s}=k("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(s)}const{topic:i}=r;await this.isValidPairingTopic(i)}),G(this,"isValidPairingTopic",async r=>{if(!he(r,!1)){const{message:i}=k("MISSING_OR_INVALID",`pairing topic should be a string: ${r}`);throw new Error(i)}if(!this.pairings.keys.includes(r)){const{message:i}=k("NO_MATCHING_KEY",`pairing topic doesn't exist: ${r}`);throw new Error(i)}if(kt(this.pairings.get(r).expiry)){await this.deletePairing(r);const{message:i}=k("EXPIRED",`pairing topic: ${r}`);throw new Error(i)}}),this.core=t,this.logger=xe(e,this.name),this.pairings=new dn(this.core,this.logger,this.name,this.storagePrefix)}get context(){return je(this.logger)}isInitialized(){if(!this.initialized){const{message:t}=k("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.core.relayer.on(le.message,async t=>{const{topic:e,message:r,transportType:i}=t;if(this.pairings.keys.includes(e)&&i!==se.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))try{const s=await this.core.crypto.decode(e,r);Ss(s)?(this.core.history.set(e,s),await this.onRelayEventRequest({topic:e,payload:s})):xs(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:e,payload:s}),this.core.history.delete(e,s.id)),await this.core.relayer.messages.ack(e,r)}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(Je.expired,async t=>{const{topic:e}=gl(t.target);e&&this.pairings.keys.includes(e)&&(await this.deletePairing(e,!0),this.events.emit(Jt.expire,{topic:e}))})}}var iv=Object.defineProperty,sv=(n,t,e)=>t in n?iv(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ve=(n,t,e)=>sv(n,typeof t!="symbol"?t+"":t,e);class ov extends v_{constructor(t,e){super(t,e),this.core=t,this.logger=e,ve(this,"records",new Map),ve(this,"events",new cn.EventEmitter),ve(this,"name",cg),ve(this,"version",lg),ve(this,"cached",[]),ve(this,"initialized",!1),ve(this,"storagePrefix",mt),ve(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.records.set(r.id,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),ve(this,"set",(r,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:r,request:i,chainId:s}),this.records.has(i.id))return;const o={id:i.id,topic:r,request:{method:i.method,params:i.params||null},chainId:s,expiry:pe(U.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit(tt.created,o)}),ve(this,"resolve",async r=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:r}),!this.records.has(r.id))return;const i=await this.getRecord(r.id);typeof i.response>"u"&&(i.response=dt(r)?{error:r.error}:{result:r.result},this.records.set(i.id,i),this.persist(),this.events.emit(tt.updated,i))}),ve(this,"get",async(r,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:r,id:i}),await this.getRecord(i))),ve(this,"delete",(r,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===r){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(tt.deleted,s)}}),this.persist()}),ve(this,"exists",async(r,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===r:!1)),ve(this,"on",(r,i)=>{this.events.on(r,i)}),ve(this,"once",(r,i)=>{this.events.once(r,i)}),ve(this,"off",(r,i)=>{this.events.off(r,i)}),ve(this,"removeListener",(r,i)=>{this.events.removeListener(r,i)}),this.logger=xe(e,this.name)}get context(){return je(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 t=[];return this.values.forEach(e=>{if(typeof e.response<"u")return;const r={topic:e.topic,request:$t(e.request.method,e.request.params,e.id),chainId:e.chainId};return t.push(r)}),t}async setJsonRpcRecords(t){await this.core.storage.setItem(this.storageKey,t)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(t){this.isInitialized();const e=this.records.get(t);if(!e){const{message:r}=k("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(r)}return e}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(tt.sync)}async restore(){try{const t=await this.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(this.records.size){const{message:e}=k("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=t,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(t){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(t)}}registerEventListeners(){this.events.on(tt.created,t=>{const e=tt.created;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,record:t})}),this.events.on(tt.updated,t=>{const e=tt.updated;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,record:t})}),this.events.on(tt.deleted,t=>{const e=tt.deleted;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,record:t})}),this.core.heartbeat.on(On.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let t=!1;this.records.forEach(e=>{U.toMiliseconds(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.records.delete(e.id),this.events.emit(tt.deleted,e,!1),t=!0)}),t&&this.persist()}catch(t){this.logger.warn(t)}}isInitialized(){if(!this.initialized){const{message:t}=k("NOT_INITIALIZED",this.name);throw new Error(t)}}}var av=Object.defineProperty,cv=(n,t,e)=>t in n?av(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Oe=(n,t,e)=>cv(n,typeof t!="symbol"?t+"":t,e);class lv extends O_{constructor(t,e){super(t,e),this.core=t,this.logger=e,Oe(this,"expirations",new Map),Oe(this,"events",new cn.EventEmitter),Oe(this,"name",ug),Oe(this,"version",dg),Oe(this,"cached",[]),Oe(this,"initialized",!1),Oe(this,"storagePrefix",mt),Oe(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.expirations.set(r.target,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),Oe(this,"has",r=>{try{const i=this.formatTarget(r);return typeof this.getExpiration(i)<"u"}catch{return!1}}),Oe(this,"set",(r,i)=>{this.isInitialized();const s=this.formatTarget(r),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(Je.created,{target:s,expiration:o})}),Oe(this,"get",r=>{this.isInitialized();const i=this.formatTarget(r);return this.getExpiration(i)}),Oe(this,"del",r=>{if(this.isInitialized(),this.has(r)){const i=this.formatTarget(r),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(Je.deleted,{target:i,expiration:s})}}),Oe(this,"on",(r,i)=>{this.events.on(r,i)}),Oe(this,"once",(r,i)=>{this.events.once(r,i)}),Oe(this,"off",(r,i)=>{this.events.off(r,i)}),Oe(this,"removeListener",(r,i)=>{this.events.removeListener(r,i)}),this.logger=xe(e,this.name)}get context(){return je(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(t){if(typeof t=="string")return Bp(t);if(typeof t=="number")return jp(t);const{message:e}=k("UNKNOWN_TYPE",`Target type: ${typeof t}`);throw new Error(e)}async setExpirations(t){await this.core.storage.setItem(this.storageKey,t)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Je.sync)}async restore(){try{const t=await this.getExpirations();if(typeof t>"u"||!t.length)return;if(this.expirations.size){const{message:e}=k("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),new Error(e)}this.cached=t,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(t){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(t)}}getExpiration(t){const e=this.expirations.get(t);if(!e){const{message:r}=k("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.warn(r),new Error(r)}return e}checkExpiry(t,e){const{expiry:r}=e;U.toMiliseconds(r)-Date.now()<=0&&this.expire(t,e)}expire(t,e){this.expirations.delete(t),this.events.emit(Je.expired,{target:t,expiration:e})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((t,e)=>this.checkExpiry(e,t))}registerEventListeners(){this.core.heartbeat.on(On.pulse,()=>this.checkExpirations()),this.events.on(Je.created,t=>{const e=Je.created;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,data:t}),this.persist()}),this.events.on(Je.expired,t=>{const e=Je.expired;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,data:t}),this.persist()}),this.events.on(Je.deleted,t=>{const e=Je.deleted;this.logger.info(`Emitting ${e}`),this.logger.debug({type:"event",event:e,data:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=k("NOT_INITIALIZED",this.name);throw new Error(t)}}}var uv=Object.defineProperty,dv=(n,t,e)=>t in n?uv(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,de=(n,t,e)=>dv(n,typeof t!="symbol"?t+"":t,e);class hv extends R_{constructor(t,e,r){super(t,e,r),this.core=t,this.logger=e,this.store=r,de(this,"name",hg),de(this,"abortController"),de(this,"isDevEnv"),de(this,"verifyUrlV3",pg),de(this,"storagePrefix",mt),de(this,"version",pu),de(this,"publicKey"),de(this,"fetchPromise"),de(this,"init",async()=>{var i;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&U.toMiliseconds((i=this.publicKey)==null?void 0:i.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))}),de(this,"register",async i=>{if(!Vn()||this.isDevEnv)return;const s=window.location.origin,{id:o,decryptedId:c}=i,l=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${s}&id=${o}&decryptedId=${c}`;try{const d=bn(),u=this.startAbortTimer(U.ONE_SECOND*5),h=await new Promise((_,p)=>{const f=()=>{window.removeEventListener("message",y),d.body.removeChild(m),p("attestation aborted")};this.abortController.signal.addEventListener("abort",f);const m=d.createElement("iframe");m.src=l,m.style.display="none",m.addEventListener("error",f,{signal:this.abortController.signal});const y=E=>{if(E.data&&typeof E.data=="string")try{const P=JSON.parse(E.data);if(P.type==="verify_attestation"){if(zi(P.attestation).payload.id!==o)return;clearInterval(u),d.body.removeChild(m),this.abortController.signal.removeEventListener("abort",f),window.removeEventListener("message",y),_(P.attestation===null?"":P.attestation)}}catch(P){this.logger.warn(P)}};d.body.appendChild(m),window.addEventListener("message",y,{signal:this.abortController.signal})});return this.logger.debug("jwt attestation",h),h}catch(d){this.logger.warn(d)}return""}),de(this,"resolve",async i=>{if(this.isDevEnv)return"";const{attestationId:s,hash:o,encryptedId:c}=i;if(s===""){this.logger.debug("resolve: attestationId is empty, skipping");return}if(s){if(zi(s).payload.id!==c)return;const d=await this.isValidJwtAttestation(s);if(d){if(!d.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return d}}if(!o)return;const l=this.getVerifyUrl(i==null?void 0:i.verifyUrl);return this.fetchAttestation(o,l)}),de(this,"fetchAttestation",async(i,s)=>{this.logger.debug(`resolving attestation: ${i} from url: ${s}`);const o=this.startAbortTimer(U.ONE_SECOND*5),c=await fetch(`${s}/attestation/${i}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(o),c.status===200?await c.json():void 0}),de(this,"getVerifyUrl",i=>{let s=i||er;return fg.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${er}`),s=er),s}),de(this,"fetchPublicKey",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);const i=this.startAbortTimer(U.FIVE_SECONDS),s=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(i),await s.json()}catch(i){this.logger.warn(i)}}),de(this,"persistPublicKey",async i=>{this.logger.debug("persisting public key to local storage",i),await this.store.setItem(this.storeKey,i),this.publicKey=i}),de(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),de(this,"isValidJwtAttestation",async i=>{const s=await this.getPublicKey();try{if(s)return this.validateAttestation(i,s)}catch(c){this.logger.error(c),this.logger.warn("error validating attestation")}const o=await this.fetchAndPersistPublicKey();try{if(o)return this.validateAttestation(i,o)}catch(c){this.logger.error(c),this.logger.warn("error validating attestation")}}),de(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),de(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async s=>{const o=await this.fetchPublicKey();o&&(await this.persistPublicKey(o),s(o))});const i=await this.fetchPromise;return this.fetchPromise=void 0,i}),de(this,"validateAttestation",(i,s)=>{const o=Ny(i,s.publicKey),c={hasExpired:U.toMiliseconds(o.exp)<Date.now(),payload:o};if(c.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),new Error("JWT attestation expired");return{origin:c.payload.origin,isScam:c.payload.isScam,isVerified:c.payload.isVerified}}),this.logger=xe(e,this.name),this.abortController=new AbortController,this.isDevEnv=Ws(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return je(this.logger)}startAbortTimer(t){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),U.toMiliseconds(t))}}var _v=Object.defineProperty,pv=(n,t,e)=>t in n?_v(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,tc=(n,t,e)=>pv(n,typeof t!="symbol"?t+"":t,e);class fv extends L_{constructor(t,e){super(t,e),this.projectId=t,this.logger=e,tc(this,"context",mg),tc(this,"registerDeviceToken",async r=>{const{clientId:i,token:s,notificationType:o,enableEncrypted:c=!1}=r,l=`${yg}/${this.projectId}/clients`;await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:c})})}),this.logger=xe(e,this.context)}}var mv=Object.defineProperty,nc=Object.getOwnPropertySymbols,yv=Object.prototype.hasOwnProperty,wv=Object.prototype.propertyIsEnumerable,Es=(n,t,e)=>t in n?mv(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Fn=(n,t)=>{for(var e in t||(t={}))yv.call(t,e)&&Es(n,e,t[e]);if(nc)for(var e of nc(t))wv.call(t,e)&&Es(n,e,t[e]);return n},me=(n,t,e)=>Es(n,typeof t!="symbol"?t+"":t,e);class gv extends D_{constructor(t,e,r=!0){super(t,e,r),this.core=t,this.logger=e,me(this,"context",gg),me(this,"storagePrefix",mt),me(this,"storageVersion",wg),me(this,"events",new Map),me(this,"shouldPersist",!1),me(this,"init",async()=>{if(!Ws())try{const i={eventId:Wo(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:yl(this.core.relayer.protocol,this.core.relayer.version,hs)}}};await this.sendEvent([i])}catch(i){this.logger.warn(i)}}),me(this,"createEvent",i=>{const{event:s="ERROR",type:o="",properties:{topic:c,trace:l}}=i,d=Wo(),u=this.core.projectId||"",h=Date.now(),_=Fn({eventId:d,timestamp:h,props:{event:s,type:o,properties:{topic:c,trace:l}},bundleId:u,domain:this.getAppDomain()},this.setMethods(d));return this.telemetryEnabled&&(this.events.set(d,_),this.shouldPersist=!0),_}),me(this,"getEvent",i=>{const{eventId:s,topic:o}=i;if(s)return this.events.get(s);const c=Array.from(this.events.values()).find(l=>l.props.properties.topic===o);if(c)return Fn(Fn({},c),this.setMethods(c.eventId))}),me(this,"deleteEvent",i=>{const{eventId:s}=i;this.events.delete(s),this.shouldPersist=!0}),me(this,"setEventListeners",()=>{this.core.heartbeat.on(On.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(i=>{U.fromMiliseconds(Date.now())-U.fromMiliseconds(i.timestamp)>Eg&&(this.events.delete(i.eventId),this.shouldPersist=!0)})})}),me(this,"setMethods",i=>({addTrace:s=>this.addTrace(i,s),setError:s=>this.setError(i,s)})),me(this,"addTrace",(i,s)=>{const o=this.events.get(i);o&&(o.props.properties.trace.push(s),this.events.set(i,o),this.shouldPersist=!0)}),me(this,"setError",(i,s)=>{const o=this.events.get(i);o&&(o.props.type=s,o.timestamp=Date.now(),this.events.set(i,o),this.shouldPersist=!0)}),me(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),me(this,"restore",async()=>{try{const i=await this.core.storage.getItem(this.storageKey)||[];if(!i.length)return;i.forEach(s=>{this.events.set(s.eventId,Fn(Fn({},s),this.setMethods(s.eventId)))})}catch(i){this.logger.warn(i)}}),me(this,"submit",async()=>{if(!this.telemetryEnabled||this.events.size===0)return;const i=[];for(const[s,o]of this.events)o.props.type&&i.push(o);if(i.length!==0)try{if((await this.sendEvent(i)).ok)for(const s of i)this.events.delete(s.eventId),this.shouldPersist=!0}catch(s){this.logger.warn(s)}}),me(this,"sendEvent",async i=>{const s=this.getAppDomain()?"":"&sp=desktop";return await fetch(`${vg}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${hs}${s}`,{method:"POST",body:JSON.stringify(i)})}),me(this,"getAppDomain",()=>ml().url),this.logger=xe(e,this.context),this.telemetryEnabled=r,r?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}}var Ev=Object.defineProperty,rc=Object.getOwnPropertySymbols,vv=Object.prototype.hasOwnProperty,bv=Object.prototype.propertyIsEnumerable,vs=(n,t,e)=>t in n?Ev(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ic=(n,t)=>{for(var e in t||(t={}))vv.call(t,e)&&vs(n,e,t[e]);if(rc)for(var e of rc(t))bv.call(t,e)&&vs(n,e,t[e]);return n},ie=(n,t,e)=>vs(n,typeof t!="symbol"?t+"":t,e);class oo extends y_{constructor(t){var e;super(t),ie(this,"protocol",_u),ie(this,"version",pu),ie(this,"name",ds),ie(this,"relayUrl"),ie(this,"projectId"),ie(this,"customStoragePrefix"),ie(this,"events",new cn.EventEmitter),ie(this,"logger"),ie(this,"heartbeat"),ie(this,"relayer"),ie(this,"crypto"),ie(this,"storage"),ie(this,"history"),ie(this,"expirer"),ie(this,"pairing"),ie(this,"verify"),ie(this,"echoClient"),ie(this,"linkModeSupportedApps"),ie(this,"eventClient"),ie(this,"initialized",!1),ie(this,"logChunkController"),ie(this,"on",(c,l)=>this.events.on(c,l)),ie(this,"once",(c,l)=>this.events.once(c,l)),ie(this,"off",(c,l)=>this.events.off(c,l)),ie(this,"removeListener",(c,l)=>this.events.removeListener(c,l)),ie(this,"dispatchEnvelope",({topic:c,message:l,sessionExists:d})=>{if(!c||!l)return;const u={topic:c,message:l,publishedAt:Date.now(),transportType:se.link_mode};this.relayer.onLinkMessageEvent(u,{sessionExists:d})});const r=this.getGlobalCore(t==null?void 0:t.customStoragePrefix);if(r)try{return this.customStoragePrefix=r.customStoragePrefix,this.logger=r.logger,this.heartbeat=r.heartbeat,this.crypto=r.crypto,this.history=r.history,this.expirer=r.expirer,this.storage=r.storage,this.relayer=r.relayer,this.pairing=r.pairing,this.verify=r.verify,this.echoClient=r.echoClient,this.linkModeSupportedApps=r.linkModeSupportedApps,this.eventClient=r.eventClient,this.initialized=r.initialized,this.logChunkController=r.logChunkController,r}catch(c){console.warn("Failed to copy global core",c)}this.projectId=t==null?void 0:t.projectId,this.relayUrl=(t==null?void 0:t.relayUrl)||mu,this.customStoragePrefix=t!=null&&t.customStoragePrefix?`:${t.customStoragePrefix}`:"";const i=Fs({level:typeof(t==null?void 0:t.logger)=="string"&&t.logger?t.logger:jw.logger,name:ds}),{logger:s,chunkLoggerController:o}=p_({opts:i,maxSizeInBytes:t==null?void 0:t.maxLogBlobSizeInBytes,loggerOverride:t==null?void 0:t.logger});this.logChunkController=o,(e=this.logChunkController)!=null&&e.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var c,l;(c=this.logChunkController)!=null&&c.downloadLogsBlobInBrowser&&((l=this.logChunkController)==null||l.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=xe(s,this.name),this.heartbeat=new Bd,this.crypto=new ZE(this,this.logger,t==null?void 0:t.keychain),this.history=new ov(this,this.logger),this.expirer=new lv(this,this.logger),this.storage=t!=null&&t.storage?t.storage:new jd(ic(ic({},zw),t==null?void 0:t.storageOptions)),this.relayer=new I0({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new rv(this,this.logger),this.verify=new hv(this,this.logger,this.storage),this.echoClient=new fv(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new gv(this,this.logger,t==null?void 0:t.telemetryEnabled),this.setGlobalCore(this)}static async init(t){const e=new oo(t);await e.initialize();const r=await e.crypto.getClientId();return await e.storage.setItem(rg,r),e}get context(){return je(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var t;return(t=this.logChunkController)==null?void 0:t.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(t){this.linkModeSupportedApps.includes(t)||(this.linkModeSupportedApps.push(t),await this.storage.setItem(ka,this.linkModeSupportedApps))}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.linkModeSupportedApps=await this.storage.getItem(ka)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(t){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,t),this.logger.error(t.message),t}}getGlobalCore(t=""){try{if(this.isGlobalCoreDisabled())return;const e=`_walletConnectCore_${t}`,r=`${e}_count`;return globalThis[r]=(globalThis[r]||0)+1,globalThis[r]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[r]} times.`),globalThis[e]}catch(e){console.warn("Failed to get global WalletConnect core",e);return}}setGlobalCore(t){var e;try{if(this.isGlobalCoreDisabled())return;const r=`_walletConnectCore_${((e=t.opts)==null?void 0:e.customStoragePrefix)||""}`;globalThis[r]=t}catch(r){console.warn("Failed to set global WalletConnect core",r)}}isGlobalCoreDisabled(){try{return typeof Bt<"u"&&Bw.DISABLE_GLOBAL_CORE==="true"}catch{return!0}}}const Iv=oo,Lu="wc",Du=2,Vu="client",ao=`${Lu}@${Du}:${Vu}:`,Si={name:Vu,logger:"error"},sc="WALLETCONNECT_DEEPLINK_CHOICE",Av="proposal",oc="Proposal expired",Tv="session",gn=U.SEVEN_DAYS,Pv="engine",be={wc_sessionPropose:{req:{ttl:U.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:U.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:U.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:U.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:U.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:U.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:U.ONE_DAY,prompt:!1,tag:1104},res:{ttl:U.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:U.ONE_DAY,prompt:!1,tag:1106},res:{ttl:U.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:U.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:U.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:U.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:U.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:U.ONE_DAY,prompt:!1,tag:1112},res:{ttl:U.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:U.ONE_DAY,prompt:!1,tag:1114},res:{ttl:U.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:U.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:U.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:U.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:U.FIVE_MINUTES,prompt:!1,tag:1119}}},xi={min:U.FIVE_MINUTES,max:U.SEVEN_DAYS},lt={idle:"IDLE",active:"ACTIVE"},Ov={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"},sui_signAndExecuteTransaction:{key:"digest"},sui_signTransaction:{key:""},hedera_signAndExecuteTransaction:{key:"transactionId"},hedera_executeTransaction:{key:"transactionId"},near_signTransaction:{key:""},near_signTransactions:{key:""},tron_signTransaction:{key:"txID"},xrpl_signTransaction:{key:""},xrpl_signTransactionFor:{key:""},algo_signTxn:{key:""},sendTransfer:{key:"txid"},stacks_stxTransfer:{key:"txId"},polkadot_signTransaction:{key:""},cosmos_signDirect:{key:""}},Rv="request",Lv=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],Dv="wc",Vv="auth",Sv="authKeys",xv="pairingTopics",Cv="requests",ui=`${Dv}@${1.5}:${Vv}:`,$r=`${ui}:PUB_KEY`;var $v=Object.defineProperty,kv=Object.defineProperties,Nv=Object.getOwnPropertyDescriptors,ac=Object.getOwnPropertySymbols,Uv=Object.prototype.hasOwnProperty,qv=Object.prototype.propertyIsEnumerable,bs=(n,t,e)=>t in n?$v(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ee=(n,t)=>{for(var e in t||(t={}))Uv.call(t,e)&&bs(n,e,t[e]);if(ac)for(var e of ac(t))qv.call(t,e)&&bs(n,e,t[e]);return n},Re=(n,t)=>kv(n,Nv(t)),R=(n,t,e)=>bs(n,typeof t!="symbol"?t+"":t,e);class Mv extends C_{constructor(t){super(t),R(this,"name",Pv),R(this,"events",new Oc),R(this,"initialized",!1),R(this,"requestQueue",{state:lt.idle,queue:[]}),R(this,"sessionRequestQueue",{state:lt.idle,queue:[]}),R(this,"emittedSessionRequests",new Yp({limit:500})),R(this,"requestQueueDelay",U.ONE_SECOND),R(this,"expectedPairingMethodMap",new Map),R(this,"recentlyDeletedMap",new Map),R(this,"recentlyDeletedLimit",200),R(this,"relayMessageCache",[]),R(this,"pendingSessions",new Map),R(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(be)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},U.toMiliseconds(this.requestQueueDelay)))}),R(this,"connect",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();const r=Re(ee({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(r),r.optionalNamespaces=ew(r.requiredNamespaces,r.optionalNamespaces),r.requiredNamespaces={};const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:c,scopedProperties:l,relays:d}=r;let u=i,h,_=!1;try{if(u){const L=this.client.core.pairing.pairings.get(u);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),_=L.active}}catch(L){throw this.client.logger.error(`connect() -> pairing.get(${u}) failed`),L}if(!u||!_){const{topic:L,uri:N}=await this.client.core.pairing.create({internal:{skipSubscribe:!0}});u=L,h=N}if(!u){const{message:L}=k("NO_MATCHING_KEY",`connect() pairing topic: ${u}`);throw new Error(L)}const p=await this.client.core.crypto.generateKeyPair(),f=be.wc_sessionPropose.req.ttl||U.FIVE_MINUTES,m=pe(f),y=Re(ee(ee({requiredNamespaces:s,optionalNamespaces:o,relays:d??[{protocol:fu}],proposer:{publicKey:p,metadata:this.client.metadata},expiryTimestamp:m,pairingTopic:u},c&&{sessionProperties:c}),l&&{scopedProperties:l}),{id:Ot()}),E=X("session_connect",y.id),{reject:P,resolve:g,done:b}=Gt(f,oc),I=({id:L})=>{L===y.id&&(this.client.events.off("proposal_expire",I),this.pendingSessions.delete(y.id),this.events.emit(E,{error:{message:oc,code:0}}))};return this.client.events.on("proposal_expire",I),this.events.once(E,({error:L,session:N})=>{this.client.events.off("proposal_expire",I),L?P(L):N&&g(N)}),await this.sendProposeSession({proposal:y,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:y.id}}}),await this.setProposal(y.id,y),{uri:h,approval:b}}),R(this,"pair",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(e)}catch(r){throw this.client.logger.error("pair() failed"),r}}),R(this,"approve",async e=>{var r,i,s;const o=this.client.core.eventClient.createEvent({properties:{topic:(r=e==null?void 0:e.id)==null?void 0:r.toString(),trace:[Ct.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(w){throw o.setError(Bn.no_internet_connection),w}try{await this.isValidProposalId(e==null?void 0:e.id)}catch(w){throw this.client.logger.error(`approve() -> proposal.get(${e==null?void 0:e.id}) failed`),o.setError(Bn.proposal_not_found),w}try{await this.isValidApprove(e)}catch(w){throw this.client.logger.error("approve() -> isValidApprove() failed"),o.setError(Bn.session_approve_namespace_validation_failure),w}const{id:c,relayProtocol:l,namespaces:d,sessionProperties:u,scopedProperties:h,sessionConfig:_}=e,p=this.client.proposal.get(c);this.client.core.eventClient.deleteEvent({eventId:o.eventId});const{pairingTopic:f,proposer:m,requiredNamespaces:y,optionalNamespaces:E}=p;let P=(i=this.client.core.eventClient)==null?void 0:i.getEvent({topic:f});P||(P=(s=this.client.core.eventClient)==null?void 0:s.createEvent({type:Ct.session_approve_started,properties:{topic:f,trace:[Ct.session_approve_started,Ct.session_namespaces_validation_success]}}));const g=await this.client.core.crypto.generateKeyPair(),b=m.publicKey,I=await this.client.core.crypto.generateSharedKey(g,b),L=ee(ee(ee({relay:{protocol:l??"irn"},namespaces:d,controller:{publicKey:g,metadata:this.client.metadata},expiry:pe(gn)},u&&{sessionProperties:u}),h&&{scopedProperties:h}),_&&{sessionConfig:_}),N=se.relay;P.addTrace(Ct.subscribing_session_topic);try{await this.client.core.relayer.subscribe(I,{transportType:N,internal:{skipSubscribe:!0}})}catch(w){throw P.setError(Bn.subscribe_session_topic_failure),w}P.addTrace(Ct.subscribe_session_topic_success);const x=Re(ee({},L),{topic:I,requiredNamespaces:y,optionalNamespaces:E,pairingTopic:f,acknowledged:!1,self:L.controller,peer:{publicKey:m.publicKey,metadata:m.metadata},controller:g,transportType:se.relay});await this.client.session.set(I,x),P.addTrace(Ct.store_session);try{await this.sendApproveSession({sessionTopic:I,proposal:p,pairingProposalResponse:{relay:{protocol:l??"irn"},responderPublicKey:g},sessionSettleRequest:L,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:c}}}),P.addTrace(Ct.session_approve_publish_success)}catch(w){throw this.client.logger.error(w),this.client.session.delete(I,ae("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(I),w}return this.client.core.eventClient.deleteEvent({eventId:P.eventId}),await this.client.core.pairing.updateMetadata({topic:f,metadata:m.metadata}),await this.deleteProposal(c),await this.client.core.pairing.activate({topic:f}),await this.setExpiry(I,pe(gn)),{topic:I,acknowledged:()=>Promise.resolve(this.client.session.get(I))}}),R(this,"reject",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(e)}catch(o){throw this.client.logger.error("reject() -> isValidReject() failed"),o}const{id:r,reason:i}=e;let s;try{s=this.client.proposal.get(r).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${r}) failed`),o}s&&await this.sendError({id:r,topic:s,error:i,rpcOpts:be.wc_sessionPropose.reject}),await this.deleteProposal(r)}),R(this,"update",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(e)}catch(h){throw this.client.logger.error("update() -> isValidUpdate() failed"),h}const{topic:r,namespaces:i}=e,{done:s,resolve:o,reject:c}=Gt(),l=Ot(),d=Zt().toString(),u=this.client.session.get(r).namespaces;return this.events.once(X("session_update",l),({error:h})=>{h?c(h):o()}),await this.client.session.update(r,{namespaces:i}),await this.sendRequest({topic:r,method:"wc_sessionUpdate",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:l,relayRpcId:d}).catch(h=>{this.client.logger.error(h),this.client.session.update(r,{namespaces:u}),c(h)}),{acknowledged:s}}),R(this,"extend",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(e)}catch(l){throw this.client.logger.error("extend() -> isValidExtend() failed"),l}const{topic:r}=e,i=Ot(),{done:s,resolve:o,reject:c}=Gt();return this.events.once(X("session_extend",i),({error:l})=>{l?c(l):o()}),await this.setExpiry(r,pe(gn)),this.sendRequest({topic:r,method:"wc_sessionExtend",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(l=>{c(l)}),{acknowledged:s}}),R(this,"request",async e=>{this.isInitialized();try{await this.isValidRequest(e)}catch(y){throw this.client.logger.error("request() -> isValidRequest() failed"),y}const{chainId:r,request:i,topic:s,expiry:o=be.wc_sessionRequest.req.ttl}=e,c=this.client.session.get(s);(c==null?void 0:c.transportType)===se.relay&&await this.confirmOnlineStateOrThrow();const l=Ot(),d=Zt().toString(),{done:u,resolve:h,reject:_}=Gt(o,"Request expired. Please try again.");this.events.once(X("session_request",l),({error:y,result:E})=>{y?_(y):h(E)});const p="wc_sessionRequest",f=this.getAppLinkIfEnabled(c.peer.metadata,c.transportType);if(f)return await this.sendRequest({clientRpcId:l,relayRpcId:d,topic:s,method:p,params:{request:Re(ee({},i),{expiryTimestamp:pe(o)}),chainId:r},expiry:o,throwOnFailedPublish:!0,appLink:f}).catch(y=>_(y)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:r,id:l}),await u();const m={request:Re(ee({},i),{expiryTimestamp:pe(o)}),chainId:r};return await Promise.all([new Promise(async y=>{await this.sendRequest({clientRpcId:l,relayRpcId:d,topic:s,method:p,params:m,expiry:o,throwOnFailedPublish:!0,tvf:this.getTVFParams(l,m)}).catch(E=>_(E)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:r,id:l}),y()}),new Promise(async y=>{var E;if(!((E=c.sessionConfig)!=null&&E.disableDeepLink)){const P=await Wp(this.client.core.storage,sc);await zp({id:l,topic:s,wcDeepLink:P})}y()}),u()]).then(y=>y[2])}),R(this,"respond",async e=>{this.isInitialized(),await this.isValidRespond(e);const{topic:r,response:i}=e,{id:s}=i,o=this.client.session.get(r);o.transportType===se.relay&&await this.confirmOnlineStateOrThrow();const c=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);Et(i)?await this.sendResult({id:s,topic:r,result:i.result,throwOnFailedPublish:!0,appLink:c}):dt(i)&&await this.sendError({id:s,topic:r,error:i.error,appLink:c}),this.cleanupAfterResponse(e)}),R(this,"ping",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(e)}catch(i){throw this.client.logger.error("ping() -> isValidPing() failed"),i}const{topic:r}=e;if(this.client.session.keys.includes(r)){const i=Ot(),s=Zt().toString(),{done:o,resolve:c,reject:l}=Gt();this.events.once(X("session_ping",i),({error:d})=>{d?l(d):c()}),await Promise.all([this.sendRequest({topic:r,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(r)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:r}))}),R(this,"emit",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(e);const{topic:r,event:i,chainId:s}=e,o=Zt().toString(),c=Ot();await this.sendRequest({topic:r,method:"wc_sessionEvent",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:o,clientRpcId:c})}),R(this,"disconnect",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(e);const{topic:r}=e;if(this.client.session.keys.includes(r))await this.sendRequest({topic:r,method:"wc_sessionDelete",params:ae("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:r,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(r))await this.client.core.pairing.disconnect({topic:r});else{const{message:i}=k("MISMATCHED_TOPIC",`Session or pairing topic not found: ${r}`);throw new Error(i)}}),R(this,"find",e=>(this.isInitialized(),this.client.session.getAll().filter(r=>rw(r,e)))),R(this,"getPendingSessionRequests",()=>this.client.pendingRequest.getAll()),R(this,"authenticate",async(e,r)=>{var i;this.isInitialized(),this.isValidAuthenticate(e);const s=r&&this.client.core.linkModeSupportedApps.includes(r)&&((i=this.client.metadata.redirect)==null?void 0:i.linkMode),o=s?se.link_mode:se.relay;o===se.relay&&await this.confirmOnlineStateOrThrow();const{chains:c,statement:l="",uri:d,domain:u,nonce:h,type:_,exp:p,nbf:f,methods:m=[],expiry:y}=e,E=[...e.resources||[]],{topic:P,uri:g}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:o});this.client.logger.info({message:"Generated new pairing",pairing:{topic:P,uri:g}});const b=await this.client.core.crypto.generateKeyPair(),I=xr(b);if(await Promise.all([this.client.auth.authKeys.set($r,{responseTopic:I,publicKey:b}),this.client.auth.pairingTopics.set(I,{topic:I,pairingTopic:P})]),await this.client.core.relayer.subscribe(I,{transportType:o}),this.client.logger.info(`sending request to new pairing topic: ${P}`),m.length>0){const{namespace:D}=Vr(c[0]);let j=lm(D,"request",m);Sr(E)&&(j=dm(j,E.pop())),E.push(j)}const L=y&&y>be.wc_sessionAuthenticate.req.ttl?y:be.wc_sessionAuthenticate.req.ttl,N={authPayload:{type:_??"caip122",chains:c,statement:l,aud:d,domain:u,version:"1",nonce:h,iat:new Date().toISOString(),exp:p,nbf:f,resources:E},requester:{publicKey:b,metadata:this.client.metadata},expiryTimestamp:pe(L)},x={eip155:{chains:c,methods:[...new Set(["personal_sign",...m])],events:["chainChanged","accountsChanged"]}},w={requiredNamespaces:{},optionalNamespaces:x,relays:[{protocol:"irn"}],pairingTopic:P,proposer:{publicKey:b,metadata:this.client.metadata},expiryTimestamp:pe(be.wc_sessionPropose.req.ttl),id:Ot()},{done:v,resolve:A,reject:T}=Gt(L,"Request expired"),O=Ot(),V=X("session_connect",w.id),S=X("session_request",O),C=async({error:D,session:j})=>{this.events.off(S,$),D?T(D):j&&A({session:j})},$=async D=>{var j,B,z;if(await this.deletePendingAuthRequest(O,{message:"fulfilled",code:0}),D.error){const oe=ae("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return D.error.code===oe.code?void 0:(this.events.off(V,C),T(D.error.message))}await this.deleteProposal(w.id),this.events.off(V,C);const{cacaos:W,responder:K}=D.result,H=[],ne=[];for(const oe of W){await ra({cacao:oe,projectId:this.client.core.projectId})||(this.client.logger.error(oe,"Signature verification failed"),T(ae("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:We}=oe,yt=Sr(We.resources),ho=[es(We.iss)],zu=Kr(We.iss);if(yt){const hi=ia(yt),Fu=sa(yt);H.push(...hi),ho.push(...Fu)}for(const hi of ho)ne.push(`${hi}:${zu}`)}const ue=await this.client.core.crypto.generateSharedKey(b,K.publicKey);let ce;H.length>0&&(ce={topic:ue,acknowledged:!0,self:{publicKey:b,metadata:this.client.metadata},peer:K,controller:K.publicKey,expiry:pe(gn),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:P,namespaces:La([...new Set(H)],[...new Set(ne)]),transportType:o},await this.client.core.relayer.subscribe(ue,{transportType:o}),await this.client.session.set(ue,ce),P&&await this.client.core.pairing.updateMetadata({topic:P,metadata:K.metadata}),ce=this.client.session.get(ue)),(j=this.client.metadata.redirect)!=null&&j.linkMode&&(B=K.metadata.redirect)!=null&&B.linkMode&&(z=K.metadata.redirect)!=null&&z.universal&&r&&(this.client.core.addLinkModeSupportedApp(K.metadata.redirect.universal),this.client.session.update(ue,{transportType:se.link_mode})),A({auths:W,session:ce})};this.events.once(V,C),this.events.once(S,$);let M;try{if(s){const D=$t("wc_sessionAuthenticate",N,O);this.client.core.history.set(P,D);const j=await this.client.core.crypto.encode("",D,{type:gr,encoding:Mt});M=Lr(r,P,j)}else await Promise.all([this.sendRequest({topic:P,method:"wc_sessionAuthenticate",params:N,expiry:e.expiry,throwOnFailedPublish:!0,clientRpcId:O}),this.sendRequest({topic:P,method:"wc_sessionPropose",params:w,expiry:be.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:w.id})])}catch(D){throw this.events.off(V,C),this.events.off(S,$),D}return await this.setProposal(w.id,w),await this.setAuthRequest(O,{request:Re(ee({},N),{verifyContext:{}}),pairingTopic:P,transportType:o}),{uri:M??g,response:v}}),R(this,"approveSessionAuthenticate",async e=>{const{id:r,auths:i}=e,s=this.client.core.eventClient.createEvent({properties:{topic:r.toString(),trace:[Ht.authenticated_session_approve_started]}});try{this.isInitialized()}catch(y){throw s.setError(jn.no_internet_connection),y}const o=this.getPendingAuthRequest(r);if(!o)throw s.setError(jn.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${r}`);const c=o.transportType||se.relay;c===se.relay&&await this.confirmOnlineStateOrThrow();const l=o.requester.publicKey,d=await this.client.core.crypto.generateKeyPair(),u=xr(l),h={type:Tt,receiverPublicKey:l,senderPublicKey:d},_=[],p=[];for(const y of i){if(!await ra({cacao:y,projectId:this.client.core.projectId})){s.setError(jn.invalid_cacao);const I=ae("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:r,topic:u,error:I,encodeOpts:h}),new Error(I.message)}s.addTrace(Ht.cacaos_verified);const{p:E}=y,P=Sr(E.resources),g=[es(E.iss)],b=Kr(E.iss);if(P){const I=ia(P),L=sa(P);_.push(...I),g.push(...L)}for(const I of g)p.push(`${I}:${b}`)}const f=await this.client.core.crypto.generateSharedKey(d,l);s.addTrace(Ht.create_authenticated_session_topic);let m;if((_==null?void 0:_.length)>0){m={topic:f,acknowledged:!0,self:{publicKey:d,metadata:this.client.metadata},peer:{publicKey:l,metadata:o.requester.metadata},controller:l,expiry:pe(gn),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:o.pairingTopic,namespaces:La([...new Set(_)],[...new Set(p)]),transportType:c},s.addTrace(Ht.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(f,{transportType:c})}catch(y){throw s.setError(jn.subscribe_authenticated_session_topic_failure),y}s.addTrace(Ht.subscribe_authenticated_session_topic_success),await this.client.session.set(f,m),s.addTrace(Ht.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:o.pairingTopic,metadata:o.requester.metadata})}s.addTrace(Ht.publishing_authenticated_session_approve);try{await this.sendResult({topic:u,id:r,result:{cacaos:i,responder:{publicKey:d,metadata:this.client.metadata}},encodeOpts:h,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(o.requester.metadata,c)})}catch(y){throw s.setError(jn.authenticated_session_approve_publish_failure),y}return await this.client.auth.requests.delete(r,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:o.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:s.eventId}),{session:m}}),R(this,"rejectSessionAuthenticate",async e=>{this.isInitialized();const{id:r,reason:i}=e,s=this.getPendingAuthRequest(r);if(!s)throw new Error(`Could not find pending auth request with id ${r}`);s.transportType===se.relay&&await this.confirmOnlineStateOrThrow();const o=s.requester.publicKey,c=await this.client.core.crypto.generateKeyPair(),l=xr(o),d={type:Tt,receiverPublicKey:o,senderPublicKey:c};await this.sendError({id:r,topic:l,error:i,encodeOpts:d,rpcOpts:be.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(s.requester.metadata,s.transportType)}),await this.client.auth.requests.delete(r,{message:"rejected",code:0}),await this.deleteProposal(r)}),R(this,"formatAuthMessage",e=>{this.isInitialized();const{request:r,iss:i}=e;return Cl(r,i)}),R(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const e=this.relayMessageCache.shift();e&&await this.onRelayMessage(e)}catch(e){this.client.logger.error(e)}},50)}),R(this,"cleanupDuplicatePairings",async e=>{if(e.pairingTopic)try{const r=this.client.core.pairing.pairings.get(e.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,c;return((o=s.peerMetadata)==null?void 0:o.url)&&((c=s.peerMetadata)==null?void 0:c.url)===e.peer.metadata.url&&s.topic&&s.topic!==r.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(r){this.client.logger.error(r)}}),R(this,"deleteSession",async e=>{var r;const{topic:i,expirerHasDeleted:s=!1,emitEvent:o=!0,id:c=0}=e,{self:l}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,ae("USER_DISCONNECTED")),this.addToRecentlyDeleted(i,"session"),this.client.core.crypto.keychain.has(l.publicKey)&&await this.client.core.crypto.deleteKeyPair(l.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i),this.client.core.storage.removeItem(sc).catch(d=>this.client.logger.warn(d)),this.getPendingSessionRequests().forEach(d=>{d.topic===i&&this.deletePendingSessionRequest(d.id,ae("USER_DISCONNECTED"))}),i===((r=this.sessionRequestQueue.queue[0])==null?void 0:r.topic)&&(this.sessionRequestQueue.state=lt.idle),o&&this.client.events.emit("session_delete",{id:c,topic:i})}),R(this,"deleteProposal",async(e,r)=>{if(r)try{const i=this.client.proposal.get(e),s=this.client.core.eventClient.getEvent({topic:i.pairingTopic});s==null||s.setError(Bn.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(e,ae("USER_DISCONNECTED")),r?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"proposal")}),R(this,"deletePendingSessionRequest",async(e,r,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,r),i?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==e),i&&(this.sessionRequestQueue.state=lt.idle,this.client.events.emit("session_request_expire",{id:e}))}),R(this,"deletePendingAuthRequest",async(e,r,i=!1)=>{await Promise.all([this.client.auth.requests.delete(e,r),i?Promise.resolve():this.client.core.expirer.del(e)])}),R(this,"setExpiry",async(e,r)=>{this.client.session.keys.includes(e)&&(this.client.core.expirer.set(e,r),await this.client.session.update(e,{expiry:r}))}),R(this,"setProposal",async(e,r)=>{this.client.core.expirer.set(e,pe(be.wc_sessionPropose.req.ttl)),await this.client.proposal.set(e,r)}),R(this,"setAuthRequest",async(e,r)=>{const{request:i,pairingTopic:s,transportType:o=se.relay}=r;this.client.core.expirer.set(e,i.expiryTimestamp),await this.client.auth.requests.set(e,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:e,pairingTopic:s,verifyContext:i.verifyContext,transportType:o})}),R(this,"setPendingSessionRequest",async e=>{const{id:r,topic:i,params:s,verifyContext:o}=e,c=s.request.expiryTimestamp||pe(be.wc_sessionRequest.req.ttl);this.client.core.expirer.set(r,c),await this.client.pendingRequest.set(r,{id:r,topic:i,params:s,verifyContext:o})}),R(this,"sendRequest",async e=>{const{topic:r,method:i,params:s,expiry:o,relayRpcId:c,clientRpcId:l,throwOnFailedPublish:d,appLink:u,tvf:h,publishOpts:_={}}=e,p=$t(i,s,l);let f;const m=!!u;try{const P=m?Mt:Ue;f=await this.client.core.crypto.encode(r,p,{encoding:P})}catch(P){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${r} failed`),P}let y;if(Lv.includes(i)){const P=Ze(JSON.stringify(p)),g=Ze(f);y=await this.client.core.verify.register({id:g,decryptedId:P})}const E=ee(ee({},be[i].req),_);if(E.attestation=y,o&&(E.ttl=o),c&&(E.id=c),this.client.core.history.set(r,p),m){const P=Lr(u,r,f);await F.Linking.openURL(P,this.client.name)}else E.tvf=Re(ee({},h),{correlationId:p.id}),d?(E.internal=Re(ee({},E.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,f,E)):this.client.core.relayer.publish(r,f,E).catch(P=>this.client.logger.error(P));return p.id}),R(this,"sendProposeSession",async e=>{const{proposal:r,publishOpts:i}=e,s=$t("wc_sessionPropose",r,r.id);this.client.core.history.set(r.pairingTopic,s);const o=await this.client.core.crypto.encode(r.pairingTopic,s,{encoding:Ue}),c=Ze(JSON.stringify(s)),l=Ze(o),d=await this.client.core.verify.register({id:l,decryptedId:c});await this.client.core.relayer.publishCustom({payload:{pairingTopic:r.pairingTopic,sessionProposal:o},opts:Re(ee({},i),{publishMethod:"wc_proposeSession",attestation:d})})}),R(this,"sendApproveSession",async e=>{const{sessionTopic:r,pairingProposalResponse:i,proposal:s,sessionSettleRequest:o,publishOpts:c}=e,l=Ur(s.id,i),d=await this.client.core.crypto.encode(s.pairingTopic,l,{encoding:Ue}),u=$t("wc_sessionSettle",o,c==null?void 0:c.id),h=await this.client.core.crypto.encode(r,u,{encoding:Ue});this.client.core.history.set(r,u),await this.client.core.relayer.publishCustom({payload:{sessionTopic:r,pairingTopic:s.pairingTopic,sessionProposalResponse:d,sessionSettlementRequest:h},opts:Re(ee({},c),{publishMethod:"wc_approveSession"})})}),R(this,"sendResult",async e=>{const{id:r,topic:i,result:s,throwOnFailedPublish:o,encodeOpts:c,appLink:l}=e,d=Ur(r,s);let u;const h=l&&typeof(F==null?void 0:F.Linking)<"u";try{const f=h?Mt:Ue;u=await this.client.core.crypto.encode(i,d,Re(ee({},c||{}),{encoding:f}))}catch(f){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),f}let _,p;try{_=await this.client.core.history.get(i,r);const f=_.request;try{p=this.getTVFParams(r,f.params,s)}catch(m){this.client.logger.warn(`sendResult() -> getTVFParams() failed: ${m==null?void 0:m.message}`)}}catch(f){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${r}) failed`),f}if(h){const f=Lr(l,i,u);await F.Linking.openURL(f,this.client.name)}else{const f=_.request.method,m=be[f].res;m.tvf=Re(ee({},p),{correlationId:r}),o?(m.internal=Re(ee({},m.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,u,m)):this.client.core.relayer.publish(i,u,m).catch(y=>this.client.logger.error(y))}await this.client.core.history.resolve(d)}),R(this,"sendError",async e=>{const{id:r,topic:i,error:s,encodeOpts:o,rpcOpts:c,appLink:l}=e,d=Lc(r,s);let u;const h=l&&typeof(F==null?void 0:F.Linking)<"u";try{const p=h?Mt:Ue;u=await this.client.core.crypto.encode(i,d,Re(ee({},o||{}),{encoding:p}))}catch(p){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),p}let _;try{_=await this.client.core.history.get(i,r)}catch(p){throw this.client.logger.error(`sendError() -> history.get(${i}, ${r}) failed`),p}if(h){const p=Lr(l,i,u);await F.Linking.openURL(p,this.client.name)}else{const p=_.request.method,f=c||be[p].res;this.client.core.relayer.publish(i,u,f)}await this.client.core.history.resolve(d)}),R(this,"cleanup",async()=>{const e=[],r=[];this.client.session.getAll().forEach(i=>{let s=!1;kt(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&e.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{kt(i.expiryTimestamp)&&r.push(i.id)}),await Promise.all([...e.map(i=>this.deleteSession({topic:i})),...r.map(i=>this.deleteProposal(i))])}),R(this,"onProviderMessageEvent",async e=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(e):await this.onRelayMessage(e)}),R(this,"onRelayEventRequest",async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()}),R(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===lt.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=lt.active;const e=this.requestQueue.queue.shift();if(e)try{await this.processRequest(e)}catch(r){this.client.logger.warn(r)}}this.requestQueue.state=lt.idle}),R(this,"processRequest",async e=>{const{topic:r,payload:i,attestation:s,transportType:o,encryptedId:c}=e,l=i.method;if(!this.shouldIgnorePairingRequest({topic:r,requestMethod:l}))switch(l){case"wc_sessionPropose":return await this.onSessionProposeRequest({topic:r,payload:i,attestation:s,encryptedId:c});case"wc_sessionSettle":return await this.onSessionSettleRequest(r,i);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(r,i);case"wc_sessionExtend":return await this.onSessionExtendRequest(r,i);case"wc_sessionPing":return await this.onSessionPingRequest(r,i);case"wc_sessionDelete":return await this.onSessionDeleteRequest(r,i);case"wc_sessionRequest":return await this.onSessionRequest({topic:r,payload:i,attestation:s,encryptedId:c,transportType:o});case"wc_sessionEvent":return await this.onSessionEventRequest(r,i);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:r,payload:i,attestation:s,encryptedId:c,transportType:o});default:return this.client.logger.info(`Unsupported request method ${l}`)}}),R(this,"onRelayEventResponse",async e=>{const{topic:r,payload:i,transportType:s}=e,o=(await this.client.core.history.get(r,i.id)).request.method;switch(o){case"wc_sessionPropose":return this.onSessionProposeResponse(r,i,s);case"wc_sessionSettle":return this.onSessionSettleResponse(r,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(r,i);case"wc_sessionExtend":return this.onSessionExtendResponse(r,i);case"wc_sessionPing":return this.onSessionPingResponse(r,i);case"wc_sessionRequest":return this.onSessionRequestResponse(r,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(r,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}}),R(this,"onRelayEventUnknownPayload",e=>{const{topic:r}=e,{message:i}=k("MISSING_OR_INVALID",`Decoded payload on topic ${r} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)}),R(this,"shouldIgnorePairingRequest",e=>{const{topic:r,requestMethod:i}=e,s=this.expectedPairingMethodMap.get(r);return!s||s.includes(i)?!1:!!(s.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),R(this,"onSessionProposeRequest",async e=>{const{topic:r,payload:i,attestation:s,encryptedId:o}=e,{params:c,id:l}=i;try{const d=this.client.core.eventClient.getEvent({topic:r});this.client.events.listenerCount("session_proposal")===0&&(console.warn("No listener for session_proposal event"),d==null||d.setError(bt.proposal_listener_not_found)),this.isValidConnect(ee({},i.params));const u=c.expiryTimestamp||pe(be.wc_sessionPropose.req.ttl),h=ee({id:l,pairingTopic:r,expiryTimestamp:u,attestation:s,encryptedId:o},c);await this.setProposal(l,h);const _=await this.getVerifyContext({attestationId:s,hash:Ze(JSON.stringify(i)),encryptedId:o,metadata:h.proposer.metadata});d==null||d.addTrace(ut.emit_session_proposal),this.client.events.emit("session_proposal",{id:l,params:h,verifyContext:_})}catch(d){await this.sendError({id:l,topic:r,error:d,rpcOpts:be.wc_sessionPropose.autoReject}),this.client.logger.error(d)}}),R(this,"onSessionProposeResponse",async(e,r,i)=>{const{id:s}=r;if(Et(r)){const{result:o}=r;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:o});const c=this.client.proposal.get(s);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:c});const l=c.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:l});const d=o.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:d});const u=await this.client.core.crypto.generateSharedKey(l,d);this.pendingSessions.set(s,{sessionTopic:u,pairingTopic:e,proposalId:s,publicKey:l});const h=await this.client.core.relayer.subscribe(u,{transportType:i});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:h}),await this.client.core.pairing.activate({topic:e})}else if(dt(r)){await this.deleteProposal(s);const o=X("session_connect",s);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners, 954`);this.events.emit(o,{error:r.error})}}),R(this,"onSessionSettleRequest",async(e,r)=>{const{id:i,params:s}=r;try{this.isValidSessionSettleRequest(s);const{relay:o,controller:c,expiry:l,namespaces:d,sessionProperties:u,scopedProperties:h,sessionConfig:_}=r.params,p=[...this.pendingSessions.values()].find(y=>y.sessionTopic===e);if(!p)return this.client.logger.error(`Pending session not found for topic ${e}`);const f=this.client.proposal.get(p.proposalId),m=Re(ee(ee(ee({topic:e,relay:o,expiry:l,namespaces:d,acknowledged:!0,pairingTopic:p.pairingTopic,requiredNamespaces:f.requiredNamespaces,optionalNamespaces:f.optionalNamespaces,controller:c.publicKey,self:{publicKey:p.publicKey,metadata:this.client.metadata},peer:{publicKey:c.publicKey,metadata:c.metadata}},u&&{sessionProperties:u}),h&&{scopedProperties:h}),_&&{sessionConfig:_}),{transportType:se.relay});await this.client.session.set(m.topic,m),await this.setExpiry(m.topic,m.expiry),await this.client.core.pairing.updateMetadata({topic:p.pairingTopic,metadata:m.peer.metadata}),this.client.events.emit("session_connect",{session:m}),this.events.emit(X("session_connect",p.proposalId),{session:m}),this.pendingSessions.delete(p.proposalId),this.deleteProposal(p.proposalId,!1),this.cleanupDuplicatePairings(m),await this.sendResult({id:r.id,topic:e,result:!0})}catch(o){await this.sendError({id:i,topic:e,error:o}),this.client.logger.error(o)}}),R(this,"onSessionSettleResponse",async(e,r)=>{const{id:i}=r;Et(r)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(X("session_approve",i),{})):dt(r)&&(await this.client.session.delete(e,ae("USER_DISCONNECTED")),this.events.emit(X("session_approve",i),{error:r.error}))}),R(this,"onSessionUpdateRequest",async(e,r)=>{const{params:i,id:s}=r;try{const o=`${e}_session_update`,c=qn.get(o);if(c&&this.isRequestOutOfSync(c,s)){this.client.logger.warn(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:e,error:ae("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(ee({topic:e},i));try{qn.set(o,s),await this.client.session.update(e,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:e,result:!0})}catch(l){throw qn.delete(o),l}this.client.events.emit("session_update",{id:s,topic:e,params:i})}catch(o){await this.sendError({id:s,topic:e,error:o}),this.client.logger.error(o)}}),R(this,"isRequestOutOfSync",(e,r)=>r.toString().slice(0,-3)<e.toString().slice(0,-3)),R(this,"onSessionUpdateResponse",(e,r)=>{const{id:i}=r,s=X("session_update",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Et(r)?this.events.emit(X("session_update",i),{}):dt(r)&&this.events.emit(X("session_update",i),{error:r.error})}),R(this,"onSessionExtendRequest",async(e,r)=>{const{id:i}=r;try{this.isValidExtend({topic:e}),await this.setExpiry(e,pe(gn)),await this.sendResult({id:i,topic:e,result:!0}),this.client.events.emit("session_extend",{id:i,topic:e})}catch(s){await this.sendError({id:i,topic:e,error:s}),this.client.logger.error(s)}}),R(this,"onSessionExtendResponse",(e,r)=>{const{id:i}=r,s=X("session_extend",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Et(r)?this.events.emit(X("session_extend",i),{}):dt(r)&&this.events.emit(X("session_extend",i),{error:r.error})}),R(this,"onSessionPingRequest",async(e,r)=>{const{id:i}=r;try{this.isValidPing({topic:e}),await this.sendResult({id:i,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:i,topic:e})}catch(s){await this.sendError({id:i,topic:e,error:s}),this.client.logger.error(s)}}),R(this,"onSessionPingResponse",(e,r)=>{const{id:i}=r,s=X("session_ping",i);setTimeout(()=>{if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners 2176`);Et(r)?this.events.emit(X("session_ping",i),{}):dt(r)&&this.events.emit(X("session_ping",i),{error:r.error})},500)}),R(this,"onSessionDeleteRequest",async(e,r)=>{const{id:i}=r;try{this.isValidDisconnect({topic:e,reason:r.params}),await Promise.all([new Promise(s=>{this.client.core.relayer.once(le.publish,async()=>{s(await this.deleteSession({topic:e,id:i}))})}),this.sendResult({id:i,topic:e,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:e,error:ae("USER_DISCONNECTED")})]).catch(s=>this.client.logger.error(s))}catch(s){this.client.logger.error(s)}}),R(this,"onSessionRequest",async e=>{var r,i,s;const{topic:o,payload:c,attestation:l,encryptedId:d,transportType:u}=e,{id:h,params:_}=c;try{await this.isValidRequest(ee({topic:o},_));const p=this.client.session.get(o),f=await this.getVerifyContext({attestationId:l,hash:Ze(JSON.stringify($t("wc_sessionRequest",_,h))),encryptedId:d,metadata:p.peer.metadata,transportType:u}),m={id:h,topic:o,params:_,verifyContext:f};await this.setPendingSessionRequest(m),u===se.link_mode&&(r=p.peer.metadata.redirect)!=null&&r.universal&&this.client.core.addLinkModeSupportedApp((i=p.peer.metadata.redirect)==null?void 0:i.universal),(s=this.client.signConfig)!=null&&s.disableRequestQueue?this.emitSessionRequest(m):(this.addSessionRequestToSessionRequestQueue(m),this.processSessionRequestQueue())}catch(p){await this.sendError({id:h,topic:o,error:p}),this.client.logger.error(p)}}),R(this,"onSessionRequestResponse",(e,r)=>{const{id:i}=r,s=X("session_request",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Et(r)?this.events.emit(X("session_request",i),{result:r.result}):dt(r)&&this.events.emit(X("session_request",i),{error:r.error})}),R(this,"onSessionEventRequest",async(e,r)=>{const{id:i,params:s}=r;try{const o=`${e}_session_event_${s.event.name}`,c=qn.get(o);if(c&&this.isRequestOutOfSync(c,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(ee({topic:e},s)),this.client.events.emit("session_event",{id:i,topic:e,params:s}),qn.set(o,i)}catch(o){await this.sendError({id:i,topic:e,error:o}),this.client.logger.error(o)}}),R(this,"onSessionAuthenticateResponse",(e,r)=>{const{id:i}=r;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:e,payload:r}),Et(r)?this.events.emit(X("session_request",i),{result:r.result}):dt(r)&&this.events.emit(X("session_request",i),{error:r.error})}),R(this,"onSessionAuthenticateRequest",async e=>{var r;const{topic:i,payload:s,attestation:o,encryptedId:c,transportType:l}=e;try{const{requester:d,authPayload:u,expiryTimestamp:h}=s.params,_=await this.getVerifyContext({attestationId:o,hash:Ze(JSON.stringify(s)),encryptedId:c,metadata:d.metadata,transportType:l}),p={requester:d,pairingTopic:i,id:s.id,authPayload:u,verifyContext:_,expiryTimestamp:h};await this.setAuthRequest(s.id,{request:p,pairingTopic:i,transportType:l}),l===se.link_mode&&(r=d.metadata.redirect)!=null&&r.universal&&this.client.core.addLinkModeSupportedApp(d.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:i,params:s.params,id:s.id,verifyContext:_})}catch(d){this.client.logger.error(d);const u=s.params.requester.publicKey,h=await this.client.core.crypto.generateKeyPair(),_=this.getAppLinkIfEnabled(s.params.requester.metadata,l),p={type:Tt,receiverPublicKey:u,senderPublicKey:h};await this.sendError({id:s.id,topic:i,error:d,encodeOpts:p,rpcOpts:be.wc_sessionAuthenticate.autoReject,appLink:_})}}),R(this,"addSessionRequestToSessionRequestQueue",e=>{this.sessionRequestQueue.queue.push(e)}),R(this,"cleanupAfterResponse",e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=lt.idle,this.processSessionRequestQueue()},U.toMiliseconds(this.requestQueueDelay))}),R(this,"cleanupPendingSentRequestsForTopic",({topic:e,error:r})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===e&&s.request.method==="wc_sessionRequest").forEach(s=>{const o=s.request.id,c=X("session_request",o);if(this.events.listenerCount(c)===0)throw new Error(`emitting ${c} without any listeners`);this.events.emit(X("session_request",s.request.id),{error:r})})}),R(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===lt.active){this.client.logger.info("session request queue is already active.");return}const e=this.sessionRequestQueue.queue[0];if(!e){this.client.logger.info("session request queue is empty.");return}try{this.emitSessionRequest(e)}catch(r){this.client.logger.error(r)}}),R(this,"emitSessionRequest",e=>{if(this.emittedSessionRequests.has(e.id)){this.client.logger.warn({id:e.id},`Skipping emitting \`session_request\` event for duplicate request. id: ${e.id}`);return}this.sessionRequestQueue.state=lt.active,this.emittedSessionRequests.add(e.id),this.client.events.emit("session_request",e)}),R(this,"onPairingCreated",e=>{if(e.methods&&this.expectedPairingMethodMap.set(e.topic,e.methods),e.active)return;const r=this.client.proposal.getAll().find(i=>i.pairingTopic===e.topic);r&&this.onSessionProposeRequest({topic:e.topic,payload:$t("wc_sessionPropose",Re(ee({},r),{requiredNamespaces:r.requiredNamespaces,optionalNamespaces:r.optionalNamespaces,relays:r.relays,proposer:r.proposer,sessionProperties:r.sessionProperties,scopedProperties:r.scopedProperties}),r.id),attestation:r.attestation,encryptedId:r.encryptedId})}),R(this,"isValidConnect",async e=>{if(!$e(e)){const{message:d}=k("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw new Error(d)}const{pairingTopic:r,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,scopedProperties:c,relays:l}=e;if(fe(r)||await this.isValidPairingTopic(r),!fw(l)){const{message:d}=k("MISSING_OR_INVALID",`connect() relays: ${l}`);throw new Error(d)}if(!fe(i)&&dr(i)!==0){const d="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(d):this.client.logger.warn(d),this.validateNamespaces(i,"requiredNamespaces")}if(!fe(s)&&dr(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),fe(o)||this.validateSessionProps(o,"sessionProperties"),!fe(c)){this.validateSessionProps(c,"scopedProperties");const d=Object.keys(i||{}).concat(Object.keys(s||{}));if(!Object.keys(c).every(u=>d.includes(u.split(":")[0])))throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(c)}, required/optional namespaces: ${JSON.stringify(d)}`)}}),R(this,"validateNamespaces",(e,r)=>{const i=pw(e,"connect()",r);if(i)throw new Error(i.message)}),R(this,"isValidApprove",async e=>{if(!$e(e))throw new Error(k("MISSING_OR_INVALID",`approve() params: ${e}`).message);const{id:r,namespaces:i,relayProtocol:s,sessionProperties:o,scopedProperties:c}=e;this.checkRecentlyDeleted(r),await this.isValidProposalId(r);const l=this.client.proposal.get(r),d=Oi(i,"approve()");if(d)throw new Error(d.message);const u=Sa(l.requiredNamespaces,i,"approve()");if(u)throw new Error(u.message);if(!he(s,!0)){const{message:h}=k("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(h)}if(fe(o)||this.validateSessionProps(o,"sessionProperties"),!fe(c)){this.validateSessionProps(c,"scopedProperties");const h=new Set(Object.keys(i));if(!Object.keys(c).every(_=>h.has(_.split(":")[0])))throw new Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(c)}, approved namespaces: ${Array.from(h).join(", ")}`)}}),R(this,"isValidReject",async e=>{if(!$e(e)){const{message:s}=k("MISSING_OR_INVALID",`reject() params: ${e}`);throw new Error(s)}const{id:r,reason:i}=e;if(this.checkRecentlyDeleted(r),await this.isValidProposalId(r),!yw(i)){const{message:s}=k("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}}),R(this,"isValidSessionSettleRequest",e=>{if(!$e(e)){const{message:d}=k("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw new Error(d)}const{relay:r,controller:i,namespaces:s,expiry:o}=e;if(!hu(r)){const{message:d}=k("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(d)}const c=cw(i,"onSessionSettleRequest()");if(c)throw new Error(c.message);const l=Oi(s,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(kt(o)){const{message:d}=k("EXPIRED","onSessionSettleRequest()");throw new Error(d)}}),R(this,"isValidUpdate",async e=>{if(!$e(e)){const{message:l}=k("MISSING_OR_INVALID",`update() params: ${e}`);throw new Error(l)}const{topic:r,namespaces:i}=e;this.checkRecentlyDeleted(r),await this.isValidSessionTopic(r);const s=this.client.session.get(r),o=Oi(i,"update()");if(o)throw new Error(o.message);const c=Sa(s.requiredNamespaces,i,"update()");if(c)throw new Error(c.message)}),R(this,"isValidExtend",async e=>{if(!$e(e)){const{message:i}=k("MISSING_OR_INVALID",`extend() params: ${e}`);throw new Error(i)}const{topic:r}=e;this.checkRecentlyDeleted(r),await this.isValidSessionTopic(r)}),R(this,"isValidRequest",async e=>{if(!$e(e)){const{message:l}=k("MISSING_OR_INVALID",`request() params: ${e}`);throw new Error(l)}const{topic:r,request:i,chainId:s,expiry:o}=e;this.checkRecentlyDeleted(r),await this.isValidSessionTopic(r);const{namespaces:c}=this.client.session.get(r);if(!Va(c,s)){const{message:l}=k("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(l)}if(!ww(i)){const{message:l}=k("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(l)}if(!vw(c,s,i.method)){const{message:l}=k("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(l)}if(o&&!Tw(o,xi)){const{message:l}=k("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${xi.min} and ${xi.max}`);throw new Error(l)}}),R(this,"isValidRespond",async e=>{var r;if(!$e(e)){const{message:o}=k("MISSING_OR_INVALID",`respond() params: ${e}`);throw new Error(o)}const{topic:i,response:s}=e;try{await this.isValidSessionTopic(i)}catch(o){throw(r=e==null?void 0:e.response)!=null&&r.id&&this.cleanupAfterResponse(e),o}if(!gw(s)){const{message:o}=k("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}}),R(this,"isValidPing",async e=>{if(!$e(e)){const{message:i}=k("MISSING_OR_INVALID",`ping() params: ${e}`);throw new Error(i)}const{topic:r}=e;await this.isValidSessionOrPairingTopic(r)}),R(this,"isValidEmit",async e=>{if(!$e(e)){const{message:c}=k("MISSING_OR_INVALID",`emit() params: ${e}`);throw new Error(c)}const{topic:r,event:i,chainId:s}=e;await this.isValidSessionTopic(r);const{namespaces:o}=this.client.session.get(r);if(!Va(o,s)){const{message:c}=k("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(c)}if(!Ew(i)){const{message:c}=k("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(c)}if(!bw(o,s,i.name)){const{message:c}=k("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(c)}}),R(this,"isValidDisconnect",async e=>{if(!$e(e)){const{message:i}=k("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw new Error(i)}const{topic:r}=e;await this.isValidSessionOrPairingTopic(r)}),R(this,"isValidAuthenticate",e=>{const{chains:r,uri:i,domain:s,nonce:o}=e;if(!Array.isArray(r)||r.length===0)throw new Error("chains is required and must be a non-empty array");if(!he(i,!1))throw new Error("uri is required parameter");if(!he(s,!1))throw new Error("domain is required parameter");if(!he(o,!1))throw new Error("nonce is required parameter");if([...new Set(r.map(l=>Vr(l).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:c}=Vr(r[0]);if(c!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),R(this,"getVerifyContext",async e=>{const{attestationId:r,hash:i,encryptedId:s,metadata:o,transportType:c}=e,l={verified:{verifyUrl:o.verifyUrl||er,validation:"UNKNOWN",origin:o.url||""}};try{if(c===se.link_mode){const u=this.getAppLinkIfEnabled(o,c);return l.verified.validation=u&&new URL(u).origin===new URL(o.url).origin?"VALID":"INVALID",l}const d=await this.client.core.verify.resolve({attestationId:r,hash:i,encryptedId:s,verifyUrl:o.verifyUrl});d&&(l.verified.origin=d.origin,l.verified.isScam=d.isScam,l.verified.validation=d.origin===new URL(o.url).origin?"VALID":"INVALID")}catch(d){this.client.logger.warn(d)}return this.client.logger.debug(`Verify context: ${JSON.stringify(l)}`),l}),R(this,"validateSessionProps",(e,r)=>{Object.values(e).forEach((i,s)=>{if(i==null){const{message:o}=k("MISSING_OR_INVALID",`${r} must contain an existing value for each key. Received: ${i} for key ${Object.keys(e)[s]}`);throw new Error(o)}})}),R(this,"getPendingAuthRequest",e=>{const r=this.client.auth.requests.get(e);return typeof r=="object"?r:void 0}),R(this,"addToRecentlyDeleted",(e,r)=>{if(this.recentlyDeletedMap.set(e,r),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0;const s=this.recentlyDeletedLimit/2;for(const o of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(o)}}}),R(this,"checkRecentlyDeleted",e=>{const r=this.recentlyDeletedMap.get(e);if(r){const{message:i}=k("MISSING_OR_INVALID",`Record was recently deleted - ${r}: ${e}`);throw new Error(i)}}),R(this,"isLinkModeEnabled",(e,r)=>{var i,s,o,c,l,d,u,h,_;return!e||r!==se.link_mode?!1:((s=(i=this.client.metadata)==null?void 0:i.redirect)==null?void 0:s.linkMode)===!0&&((c=(o=this.client.metadata)==null?void 0:o.redirect)==null?void 0:c.universal)!==void 0&&((d=(l=this.client.metadata)==null?void 0:l.redirect)==null?void 0:d.universal)!==""&&((u=e==null?void 0:e.redirect)==null?void 0:u.universal)!==void 0&&((h=e==null?void 0:e.redirect)==null?void 0:h.universal)!==""&&((_=e==null?void 0:e.redirect)==null?void 0:_.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(e.redirect.universal)&&typeof(F==null?void 0:F.Linking)<"u"}),R(this,"getAppLinkIfEnabled",(e,r)=>{var i;return this.isLinkModeEnabled(e,r)?(i=e==null?void 0:e.redirect)==null?void 0:i.universal:void 0}),R(this,"handleLinkModeMessage",({url:e})=>{if(!e||!e.includes("wc_ev")||!e.includes("topic"))return;const r=Ko(e,"topic")||"",i=decodeURIComponent(Ko(e,"wc_ev")||""),s=this.client.session.keys.includes(r);s&&this.client.session.update(r,{transportType:se.link_mode}),this.client.core.dispatchEnvelope({topic:r,message:i,sessionExists:s})}),R(this,"registerLinkModeListeners",async()=>{var e;if(Ws()||Ft()&&(e=this.client.metadata.redirect)!=null&&e.linkMode){const r=F==null?void 0:F.Linking;if(typeof r<"u"){r.addEventListener("url",this.handleLinkModeMessage,this.client.name);const i=await r.getInitialURL();i&&setTimeout(()=>{this.handleLinkModeMessage({url:i})},50)}}}),R(this,"getTVFParams",(e,r,i)=>{var s,o,c;if(!((s=r.request)!=null&&s.method))return{};const l={correlationId:e,rpcMethods:[r.request.method],chainId:r.chainId};try{const d=this.extractTxHashesFromResult(r.request,i);l.txHashes=d,l.contractAddresses=this.isValidContractData(r.request.params)?[(c=(o=r.request.params)==null?void 0:o[0])==null?void 0:c.to]:[]}catch(d){this.client.logger.warn("Error getting TVF params",d)}return l}),R(this,"isValidContractData",e=>{var r;if(!e)return!1;try{const i=(e==null?void 0:e.data)||((r=e==null?void 0:e[0])==null?void 0:r.data);if(!i.startsWith("0x"))return!1;const s=i.slice(2);return/^[0-9a-fA-F]*$/.test(s)?s.length%2===0:!1}catch{}return!1}),R(this,"extractTxHashesFromResult",(e,r)=>{var i;try{if(!r)return[];const s=e.method,o=Ov[s];if(s==="sui_signTransaction")return[Hf(r.transactionBytes)];if(s==="near_signTransaction")return[Xo(r)];if(s==="near_signTransactions")return r.map(l=>Xo(l));if(s==="xrpl_signTransactionFor"||s==="xrpl_signTransaction")return[(i=r.tx_json)==null?void 0:i.hash];if(s==="polkadot_signTransaction")return[Mw({transaction:e.params.transactionPayload,signature:r.signature})];if(s==="algo_signTxn")return Tn(r)?r.map(l=>ea(l)):[ea(r)];if(s==="cosmos_signDirect")return[Jf(r)];if(typeof r=="string")return[r];const c=r[o.key];if(Tn(c))return s==="solana_signAllTransactions"?c.map(l=>Wf(l)):c;if(typeof c=="string")return[c]}catch(s){this.client.logger.warn("Error extracting tx hashes from result",s)}return[]})}async processPendingMessageEvents(){try{const t=this.client.session.keys,e=this.client.core.relayer.messages.getWithoutAck(t);for(const[r,i]of Object.entries(e))for(const s of i)try{await this.onProviderMessageEvent({topic:r,message:s,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${r}, message: ${s}`)}}catch(t){this.client.logger.warn("processPendingMessageEvents failed",t)}}isInitialized(){if(!this.initialized){const{message:t}=k("NOT_INITIALIZED",this.name);throw new Error(t)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(le.message,t=>{this.onProviderMessageEvent(t)})}async onRelayMessage(t){const{topic:e,message:r,attestation:i,transportType:s}=t,{publicKey:o}=this.client.auth.authKeys.keys.includes($r)?this.client.auth.authKeys.get($r):{publicKey:void 0};try{const c=await this.client.core.crypto.decode(e,r,{receiverPublicKey:o,encoding:s===se.link_mode?Mt:Ue});Ss(c)?(this.client.core.history.set(e,c),await this.onRelayEventRequest({topic:e,payload:c,attestation:i,transportType:s,encryptedId:Ze(r)})):xs(c)?(await this.client.core.history.resolve(c),await this.onRelayEventResponse({topic:e,payload:c,transportType:s}),this.client.core.history.delete(e,c.id)):await this.onRelayEventUnknownPayload({topic:e,payload:c,transportType:s}),await this.client.core.relayer.messages.ack(e,r)}catch(c){this.client.logger.error(c)}}registerExpirerEvents(){this.client.core.expirer.on(Je.expired,async t=>{const{topic:e,id:r}=gl(t.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,k("EXPIRED"),!0);if(r&&this.client.auth.requests.keys.includes(r))return await this.deletePendingAuthRequest(r,k("EXPIRED"),!0);e?this.client.session.keys.includes(e)&&(await this.deleteSession({topic:e,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:e})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))})}registerPairingEvents(){this.client.core.pairing.events.on(Jt.create,t=>this.onPairingCreated(t)),this.client.core.pairing.events.on(Jt.delete,t=>{this.addToRecentlyDeleted(t.topic,"pairing")})}isValidPairingTopic(t){if(!he(t,!1)){const{message:e}=k("MISSING_OR_INVALID",`pairing topic should be a string: ${t}`);throw new Error(e)}if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=k("NO_MATCHING_KEY",`pairing topic doesn't exist: ${t}`);throw new Error(e)}if(kt(this.client.core.pairing.pairings.get(t).expiry)){const{message:e}=k("EXPIRED",`pairing topic: ${t}`);throw new Error(e)}}async isValidSessionTopic(t){if(!he(t,!1)){const{message:e}=k("MISSING_OR_INVALID",`session topic should be a string: ${t}`);throw new Error(e)}if(this.checkRecentlyDeleted(t),!this.client.session.keys.includes(t)){const{message:e}=k("NO_MATCHING_KEY",`session topic doesn't exist: ${t}`);throw new Error(e)}if(kt(this.client.session.get(t).expiry)){await this.deleteSession({topic:t});const{message:e}=k("EXPIRED",`session topic: ${t}`);throw new Error(e)}if(!this.client.core.crypto.keychain.has(t)){const{message:e}=k("MISSING_OR_INVALID",`session topic does not exist in keychain: ${t}`);throw await this.deleteSession({topic:t}),new Error(e)}}async isValidSessionOrPairingTopic(t){if(this.checkRecentlyDeleted(t),this.client.session.keys.includes(t))await this.isValidSessionTopic(t);else if(this.client.core.pairing.pairings.keys.includes(t))this.isValidPairingTopic(t);else if(he(t,!1)){const{message:e}=k("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${t}`);throw new Error(e)}else{const{message:e}=k("MISSING_OR_INVALID",`session or pairing topic should be a string: ${t}`);throw new Error(e)}}async isValidProposalId(t){if(!mw(t)){const{message:e}=k("MISSING_OR_INVALID",`proposal id should be a number: ${t}`);throw new Error(e)}if(!this.client.proposal.keys.includes(t)){const{message:e}=k("NO_MATCHING_KEY",`proposal id doesn't exist: ${t}`);throw new Error(e)}if(kt(this.client.proposal.get(t).expiryTimestamp)){await this.deleteProposal(t);const{message:e}=k("EXPIRED",`proposal id: ${t}`);throw new Error(e)}}}class Bv extends dn{constructor(t,e){super(t,e,Av,ao),this.core=t,this.logger=e}}class jv extends dn{constructor(t,e){super(t,e,Tv,ao),this.core=t,this.logger=e}}class zv extends dn{constructor(t,e){super(t,e,Rv,ao,r=>r.id),this.core=t,this.logger=e}}class Fv extends dn{constructor(t,e){super(t,e,Sv,ui,()=>$r),this.core=t,this.logger=e}}class Kv extends dn{constructor(t,e){super(t,e,xv,ui),this.core=t,this.logger=e}}class Wv extends dn{constructor(t,e){super(t,e,Cv,ui,r=>r.id),this.core=t,this.logger=e}}var Hv=Object.defineProperty,Gv=(n,t,e)=>t in n?Hv(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ci=(n,t,e)=>Gv(n,typeof t!="symbol"?t+"":t,e);class Jv{constructor(t,e){this.core=t,this.logger=e,Ci(this,"authKeys"),Ci(this,"pairingTopics"),Ci(this,"requests"),this.authKeys=new Fv(this.core,this.logger),this.pairingTopics=new Kv(this.core,this.logger),this.requests=new Wv(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}var Zv=Object.defineProperty,Yv=(n,t,e)=>t in n?Zv(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,J=(n,t,e)=>Yv(n,typeof t!="symbol"?t+"":t,e);class co extends x_{constructor(t){super(t),J(this,"protocol",Lu),J(this,"version",Du),J(this,"name",Si.name),J(this,"metadata"),J(this,"core"),J(this,"logger"),J(this,"events",new cn.EventEmitter),J(this,"engine"),J(this,"session"),J(this,"proposal"),J(this,"pendingRequest"),J(this,"auth"),J(this,"signConfig"),J(this,"on",(r,i)=>this.events.on(r,i)),J(this,"once",(r,i)=>this.events.once(r,i)),J(this,"off",(r,i)=>this.events.off(r,i)),J(this,"removeListener",(r,i)=>this.events.removeListener(r,i)),J(this,"removeAllListeners",r=>this.events.removeAllListeners(r)),J(this,"connect",async r=>{try{return await this.engine.connect(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"pair",async r=>{try{return await this.engine.pair(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"approve",async r=>{try{return await this.engine.approve(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"reject",async r=>{try{return await this.engine.reject(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"update",async r=>{try{return await this.engine.update(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"extend",async r=>{try{return await this.engine.extend(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"request",async r=>{try{return await this.engine.request(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"respond",async r=>{try{return await this.engine.respond(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"ping",async r=>{try{return await this.engine.ping(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"emit",async r=>{try{return await this.engine.emit(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"disconnect",async r=>{try{return await this.engine.disconnect(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"find",r=>{try{return this.engine.find(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(r){throw this.logger.error(r.message),r}}),J(this,"authenticate",async(r,i)=>{try{return await this.engine.authenticate(r,i)}catch(s){throw this.logger.error(s.message),s}}),J(this,"formatAuthMessage",r=>{try{return this.engine.formatAuthMessage(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"approveSessionAuthenticate",async r=>{try{return await this.engine.approveSessionAuthenticate(r)}catch(i){throw this.logger.error(i.message),i}}),J(this,"rejectSessionAuthenticate",async r=>{try{return await this.engine.rejectSessionAuthenticate(r)}catch(i){throw this.logger.error(i.message),i}}),this.name=(t==null?void 0:t.name)||Si.name,this.metadata=Np(t==null?void 0:t.metadata),this.signConfig=t==null?void 0:t.signConfig;const e=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:ti(Fs({level:(t==null?void 0:t.logger)||Si.logger}));this.core=(t==null?void 0:t.core)||new Iv(t),this.logger=xe(e,this.name),this.session=new jv(this.core,this.logger),this.proposal=new Bv(this.core,this.logger),this.pendingRequest=new zv(this.core,this.logger),this.engine=new Mv(this),this.auth=new Jv(this.core,this.logger)}static async init(t){const e=new co(t);return await e.initialize(),e}get context(){return je(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.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(t){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(t.message),t}}}const Qv=co,Xv="08c4b07e3ad25f1a27c14a4e8cecb6f0",AI="eip155";async function eb(n){const{account:t,chainId:e,params:[r]}=n;if(!t.sendRawTransaction)throw new Error("The current account does not support sending raw transactions");return(await t.sendRawTransaction({chainId:e,rawTransaction:r})).transactionHash}function di(n,t){if(mo(n.address)!==mo(t))throw new Error(`Failed to validate account address (${n.address}), differs from ${t}`)}function TI(n){const t=n.split(":"),e=Number.parseInt(t[1]??"0");if(t.length!==2||t[0]!=="eip155"||e===0||!e)throw new Error(`Invalid chainId ${n}, should have the format 'eip155:1'`);return e}async function tb(n){const{account:t,chainId:e,thirdwebClient:r,params:[i]}=n;i.from!==void 0&&di(t,i.from);const s=Bi({chain:we(e),client:r,data:i.data,gas:i.gas?De(i.gas):void 0,gasPrice:i.gasPrice?De(i.gasPrice):void 0,to:i.to,value:i.value?De(i.value):void 0});return(await vc({account:t,transaction:s})).transactionHash}async function cc(n){const{account:t,params:e}=n;return di(t,e[1]),t.signMessage({message:{raw:e[0]}})}async function nb(n){const{account:t,params:[e]}=n;if(!t.signTransaction)throw new Error("The current account does not support signing transactions");return e.from!==void 0&&di(t,e.from),t.signTransaction({data:e.data,gas:e.gas?De(e.gas):void 0,gasPrice:e.gasPrice?De(e.gasPrice):void 0,nonce:e.nonce?nn(e.nonce):void 0,to:e.to,value:e.value?De(e.value):void 0})}async function lc(n){const{account:t,params:e}=n;return di(t,e[0]),t.signTypedData(typeof e[1]=="string"?JSON.parse(e[1]):e[1])}async function Su(n){var r;const{wallet:t,params:e}=n;return((r=t.getChain())==null?void 0:r.id)===nn(e[0].chainId)||await t.switchChain(Id(nn(e[0].chainId))),"0x1"}const PI=Object.freeze(Object.defineProperty({__proto__:null,handleSwitchChain:Su},Symbol.toStringTag,{value:"Module"})),OI="/sdk/2022-08-12/embedded-wallet",$i=n=>`thirdwebEwsWalletUserId-${n}`,rb="walletToken",ki=n=>`${rb}-${n}`,uc=n=>`passkey-credential-id-${n}`,ib="a",Ni=(n,t)=>`${ib}-${n}-${t}`,dc=n=>`walletConnectSessions-${n}`,hc=n=>`thirdweb_guest_session_id_${n}`,_c=new Map;class lo{constructor({storage:t,clientId:e,ecosystem:r}){Object.defineProperty(this,"key",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.storage=t,this.key=sb(e,r==null?void 0:r.id),this.ecosystem=r}async getItem(t){return this.storage?this.storage.getItem(t):_c.get(t)??null}async setItem(t,e){if(this.storage)return this.storage.setItem(t,e);_c.set(t,e)}async removeItem(t){const e=await this.getItem(t);return this.storage&&e?(this.storage.removeItem(t),!0):!1}async getWalletConnectSessions(){return this.getItem(dc(this.key))}async saveWalletConnectSessions(t){await this.setItem(dc(this.key),t)}async savePasskeyCredentialId(t){await this.setItem(uc(this.key),t)}async getPasskeyCredentialId(){return this.getItem(uc(this.key))}async saveAuthCookie(t){await this.setItem(ki(this.key),t)}async getAuthCookie(){return this.getItem(ki(this.key))}async removeAuthCookie(){return this.removeItem(ki(this.key))}async saveDeviceShare(t,e){await this.saveWalletUserId(e),await this.setItem(Ni(this.key,e),t)}async getDeviceShare(){const t=await this.getWalletUserId();return t?this.getItem(Ni(this.key,t)):null}async removeDeviceShare(){const t=await this.getWalletUserId();return t?this.removeItem(Ni(this.key,t)):!1}async getWalletUserId(){return this.getItem($i(this.key))}async saveWalletUserId(t){await this.setItem($i(this.key),t)}async removeWalletUserId(){return this.removeItem($i(this.key))}async getGuestSessionId(){return this.getItem(hc(this.key))}async saveGuestSessionId(t){await this.setItem(hc(this.key),t)}}const sb=(n,t)=>`${n}${t?`-${t}`:""}`;let ft;async function xu(){if(!ft)return[];const n=await ft.getWalletConnectSessions();return JSON.parse(n??"[]")}function ob(n){ft||(ft=new lo({clientId:n.clientId,storage:null}))}async function RI(n){if(!ft)return;const t=await ft.getWalletConnectSessions(),e=JSON.parse(t??"[]");e.push(n),await ft.saveWalletConnectSessions(ye(e))}async function ab(n){if(!ft)return;const t=await ft.getWalletConnectSessions(),r=JSON.parse(t??"[]").filter(i=>i.topic!==n.topic);await ft.saveWalletConnectSessions(ye(r))}let Ui=new WeakMap;const cb={eth_sendRawTransaction:eb,eth_sendTransaction:tb,eth_sign:cc,eth_signTransaction:nb,eth_signTypedData:lc,eth_signTypedData_v4:lc,personal_sign:cc,wallet_addEthereumChain:n=>{throw new Error("Unsupported request method: wallet_addEthereumChain")},wallet_switchEthereumChain:Su};async function lb(n){var u,h,_,p;const{wallet:t,requestHandlers:e,onConnect:r,onDisconnect:i,client:s}=n,o=n.chains&&n.chains.length>10?(console.warn("WalletConnect: Can specify no more than 10 chains, truncating to the first 10 provided chains..."),n.chains.slice(0,10)):n.chains;if(Ui.has(s))return Ui.get(s);ob({clientId:n.client.clientId});const c=Mr(),l=await Qv.init({metadata:{description:((u=n.appMetadata)==null?void 0:u.description)??c.description,icons:[((h=n.appMetadata)==null?void 0:h.logoUrl)??c.logoUrl],name:((_=n.appMetadata)==null?void 0:_.name)??c.name,url:((p=n.appMetadata)==null?void 0:p.url)??c.url},projectId:n.projectId??Xv});l.on("session_proposal",async f=>{const{onSessionProposal:m}=await a(async()=>{const{onSessionProposal:y}=await import("./session-proposal-DpLYOZnc.js");return{onSessionProposal:y}},__vite__mapDeps([28,1,2,3,4,5,6,7,8]));await m({chains:o,event:f,onConnect:r,wallet:t,walletConnectClient:l}).catch(y=>{if(n.onError)n.onError(y);else throw y})}),l.on("session_request",async f=>{const{fulfillRequest:m}=await a(async()=>{const{fulfillRequest:y}=await import("./session-request-BOw5DN3t.js");return{fulfillRequest:y}},__vite__mapDeps([29,3,4,1,2,5,6,7,8]));await m({event:f,handlers:e,thirdwebClient:s,wallet:t,walletConnectClient:l}).catch(y=>{if(n.onError)n.onError(y);else throw y})}),l.on("session_event",async f=>{}),l.on("session_ping",f=>{}),l.on("session_delete",async f=>{await Cu({session:{topic:f.topic},walletConnectClient:l}).catch(m=>{if(n.onError)n.onError(m);else throw m})});const d=l.disconnect;return l.disconnect=async f=>{const m=await d(f).catch(()=>{});return i&&hb({onDisconnect:i,topic:f.topic}),m},Ui.set(n.client,l),l}function ub(n){const{uri:t,walletConnectClient:e}=n;e.core.pairing.pair({uri:t})}async function db(){return xu()}async function Cu(n){ab(n.session);try{await n.walletConnectClient.disconnect({reason:{code:6e3,message:"Disconnected"},topic:n.session.topic})}catch{}}async function hb(n){const{topic:t,onDisconnect:e}=n,r=await xu();e(r.find(i=>i.topic===t)??{topic:t})}function _b(n){return[it("inApp",{executionMode:n==null?void 0:n.executionMode}),it(Sc),it(ht,{appMetadata:n==null?void 0:n.appMetadata,chains:n==null?void 0:n.chains}),it(ch),it("io.rabby"),it(lh),it("com.okex.wallet")]}function pb(n,t){const e=new Set;let r=n();const i=()=>{for(const o of e)o()},s=o=>{r=o,i()};for(const o of t)o.subscribe(()=>{s(n())});return{getValue(){return r},subscribe(o){return e.add(o),()=>{e.delete(o)}}}}function Dr(n,t,e=!0){e&&n();const r=t.map(i=>i.subscribe(()=>{n()}));return()=>{for(const i of r)i()}}const hr="tw:connected-wallet-params";async function LI(n,t,e){if(!mb(e))throw new Error("given params are not stringifiable");const r=await n.getItem(hr);let i;if(r){try{i=JSON.parse(r)}catch{i={}}i[t]=e}else i={[t]:e};n.setItem(hr,ye(i))}async function fb(n,t){const e=await n.getItem(hr);let r;if(e){try{r=JSON.parse(e)}catch{r={}}delete r[t],n.setItem(hr,ye(r))}}async function DI(n,t){const e=await n.getItem(hr);if(!e)return null;try{const r=JSON.parse(e);return r!=null&&r[t]?r[t]:null}catch{return null}}function mb(n){try{return ye(n),!0}catch{return!1}}function yb(n){let t;return()=>(t||(t=n()),t)}function wb(n={}){return Ac({filters:n,signature:"event UserOperationRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason)"})}function gb(n={}){return Ac({filters:n,signature:"event PostOpRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason)"})}function Eb(n){const{receipt:t}=n,e={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs,status:t.status,to:t.to?t.to:null,transactionHash:t.transactionHash,transactionIndex:t.transactionIndex,type:t.type};return t.blobGasPrice&&(e.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(e.blobGasUsed=BigInt(t.blobGasUsed)),{...n,actualGasCost:BigInt(n.actualGasCost),actualGasUsed:BigInt(n.actualGasUsed),nonce:BigInt(n.nonce),receipt:e,userOpHash:n.userOpHash}}const VI=()=>{const n=BigInt(Math.floor(Math.random()*4294967296)),t=BigInt(Math.floor(Math.random()*4294967296)),e=BigInt(Math.floor(Math.random()*4294967296)),r=BigInt(Math.floor(Math.random()*4294967296)),i=BigInt(Math.floor(Math.random()*4294967296)),s=BigInt(Math.floor(Math.random()*4294967296));return n<<BigInt(160)|t<<BigInt(128)|e<<BigInt(96)|r<<BigInt(64)|i<<BigInt(32)|s};function $u(n){return Object.fromEntries(Object.entries(n).map(([t,e])=>[t,e==null||Nr(e)?e:Ds(e)]))}async function SI(n){return Kt({...n,operation:"eth_sendUserOperation",params:[$u(n.userOp),n.options.entrypointAddress??Xr]})}async function xI(n,t){const e=await Kt({...n,operation:"eth_estimateUserOperationGas",params:[$u(n.userOp),n.options.entrypointAddress??Xr,t??{}]});return{callGasLimit:De(e.callGasLimit)+th,paymasterPostOpGasLimit:e.paymasterPostOpGasLimit!==void 0?De(e.paymasterPostOpGasLimit):void 0,paymasterVerificationGasLimit:e.paymasterVerificationGasLimit!==void 0?De(e.paymasterVerificationGasLimit):void 0,preVerificationGas:De(e.preVerificationGas),verificationGas:e.verificationGas!==void 0?De(e.verificationGas):void 0,verificationGasLimit:De(e.verificationGasLimit)}}async function CI(n){const t=await Kt({...n,operation:"thirdweb_getUserOperationGasPrice",params:[]});return{maxFeePerGas:De(t.maxFeePerGas),maxPriorityFeePerGas:De(t.maxPriorityFeePerGas)}}async function $I(n){var e,r;const t=await vb(n);if(t){if(t.success===!1){const s=(r=(e=dd({events:[wb(),gb()],logs:t.logs})[0])==null?void 0:e.args)==null?void 0:r.revertReason;if(!s)throw new Error(`UserOp failed at txHash: ${t.receipt.transactionHash}`);const o=hd({data:s});throw new Error(`UserOp failed with reason: '${o.args.join(",")}' at txHash: ${t.receipt.transactionHash}`)}return t.receipt}}async function vb(n){const t=await Kt({operation:"eth_getUserOperationReceipt",options:n,params:[n.userOpHash]});if(t)return Eb(t)}async function kI(n){const t=await Kt({operation:"zk_paymasterData",options:n.options,params:[n.transaction]});return{paymaster:t.paymaster,paymasterInput:t.paymasterInput}}async function bb(n){const t=await Kt({...n,operation:"tw_execute",params:[n.eoaAddress,n.wrappedCalls,n.signature,n.authorization]});if(!t.queueId)throw new Error(`Error executing 7702 transaction: ${ye(t)}`);return{transactionId:t.queueId}}async function Ib(n){return{transactionHash:(await Kt({...n,operation:"tw_getTransactionHash",params:[n.transactionId]})).transactionHash}}async function NI(n){return{transactionHash:(await Kt({operation:"zk_broadcastTransaction",options:n.options,params:[{...n.transaction,signedTransaction:n.signedTransaction}]})).transactionHash}}async function Kt(n){const{options:t,operation:e,params:r}=n,i=t.bundlerUrl??Dc(t.chain),o=await _r(t.client)(i,{useAuthToken:!0,body:ye({id:1,jsonrpc:"2.0",method:e,params:r}),headers:{"Content-Type":"application/json"},method:"POST"}),c=await o.json();if(!o.ok||c.error){let l=c.error||o.statusText;typeof l=="object"&&(l=ye(l));const d=c.code||"UNKNOWN";throw new Error(`${e} error: ${l}
|
|
14
|
+
Status: ${o.status}
|
|
15
|
+
Code: ${d}`)}return c.result}function Is(n){if(!n)return!1;if(n.id==="smart")return!0;if(n.id==="inApp"||Rn(n)){const t=n.getConfig();if(t&&"smartAccount"in t&&t.smartAccount)return!0;if(t!=null&&t.executionMode){const e=t.executionMode;return e.mode==="EIP4337"||e.mode==="EIP7702"}}return!1}const ku="thirdweb:connected-wallet-ids",kr="thirdweb:active-wallet-id",As="thirdweb:active-chain",pc="thirdweb:last-used-wallet-id";function Ab(n){const t=Wt(void 0),e=Wt(void 0),r=Wt(void 0),i=Wt("unknown"),s=Wt(new Map);Dr(()=>{Ad([...s.getValue().values()])},[s]),Dr(()=>{const g=r.getValue();if(!g)return;const b=s.getValue().get(g.id);!b||b===g||r.setValue(b)},[s,r]);const o=Wt(new Map),c=Wt(!1),l=pb(()=>Array.from(o.getValue().values()),[o]),d=g=>{const b=o.getValue();if(b.has(g.id))return;const I=new Map(b);I.set(g.id,g),o.setValue(I)},u=g=>{const b=o.getValue(),I=new Map(b);I.delete(g.id),o.setValue(I)},h=g=>{fb(n,g.id),u(g),t.getValue()===g&&(n.removeItem(kr),e.setValue(void 0),r.setValue(void 0),t.setValue(void 0),i.setValue("disconnected"))},_=g=>{h(g),g.disconnect()},p=async(g,b)=>{if(!g.getAccount())throw new Error("Cannot set a wallet without an account as active");const L=await(async()=>b!=null&&b.accountAbstraction&&!Is(g)?await Tb(g,b.client,b.accountAbstraction,h):g)();return await n.setItem(kr,g.id),await n.setItem(pc,g.id),d(g),(b==null?void 0:b.setWalletAsActive)!==!1&&m(L),g.subscribe("accountChanged",async()=>{var x;const N=await p(g,b);(x=b==null?void 0:b.onConnect)==null||x.call(b,N,l.getValue())}),L},f=async(g,b)=>{var L;const I=await p(g,b);return(L=b==null?void 0:b.onConnect)==null||L.call(b,I,l.getValue()),I},m=g=>{const b=g.getAccount();if(!b)throw new Error("Cannot set a wallet without an account as active");d(g),t.setValue(g),e.setValue(b),r.setValue(g.getChain()),i.setValue("connected");const I=v=>{e.setValue(v)},L=g.subscribe("accountChanged",I),N=g.subscribe("chainChanged",v=>r.setValue(v)),x=g.subscribe("disconnect",()=>{w()}),w=()=>{h(g),L(),N(),x()}},y=async g=>{m(g),g.id!=="smart"&&(await n.setItem(kr,g.id),await n.setItem(pc,g.id))};Dr(()=>{const g=r.getValue();g?n.setItem(As,ye(g)):n.removeItem(As)},[r],!1),Dr(async()=>{const b=l.getValue().map(I=>I==null?void 0:I.id).filter(I=>!!I);n.setItem(ku,ye(Array.from(new Set([...b]))))},[l],!1);const E=async g=>{const b=t.getValue();if(!b)throw new Error("No active wallet found");if(!b.switchChain)throw new Error("Wallet does not support switching chains");if(Is(b)){const I=await uo(n);if(I){const L=l.getValue().find(N=>N.id===I);if(L){await L.switchChain(g),await b.switchChain(g),m(b);return}}await b.switchChain(g),m(b)}else await b.switchChain(g);r.setValue(b.getChain())};function P(g){const b=s.getValue();if(g.every(N=>{const x=b.get(N.id);return ye(x)===ye(N)}))return;const L=new Map(b);for(const N of g)L.set(N.id,N);s.setValue(L)}return{activeAccountStore:e,activeWalletChainStore:r,activeWalletConnectionStatusStore:i,activeWalletStore:t,addConnectedWallet:d,connect:f,connectedWallets:l,defineChains:P,disconnectWallet:_,handleConnection:p,isAutoConnecting:c,removeConnectedWallet:u,setActiveWallet:y,switchActiveWalletChain:E}}async function Nu(n){try{const t=await n.getItem(ku);return t?JSON.parse(t):[]}catch{return[]}}async function uo(n){try{const t=await n.getItem(kr);if(t)return t}catch{}return null}async function Uu(n){try{const t=await n.getItem(As);if(t)return JSON.parse(t)}catch{}return null}const Tb=async(n,t,e,r)=>{const i=n.getAccount();if(!i)throw new Error("Cannot set a wallet without an account as active");const s=Ms(e);await s.connect({chain:e.chain,client:t,personalAccount:i});const o=n.subscribe("disconnect",()=>{c()}),c=()=>{o(),r(s)};return s};function qu(n,t){return new Promise((e,r)=>{const i=setTimeout(()=>{r(new Error(t.message))},t.ms);n.then(s=>{clearTimeout(i),e(s)},s=>{clearTimeout(i),r(s)})})}async function Pb({client:n,ecosystem:t,tokenToLink:e,storage:r}){const i=_r(n,t),s=Qr("inAppWallet"),o=await r.getAuthCookie();if(!o)throw new Error("Failed to link account, no user logged in");const c={Authorization:`Bearer iaw-auth-token:${o}`,"Content-Type":"application/json"},l=await i(`${s}/api/2024-05-05/account/connect`,{body:ye({accountAuthTokenToConnect:e}),headers:c,method:"POST"});if(!l.ok){const u=await l.json();throw new Error(u.message||"Failed to link account.")}const{linkedAccounts:d}=await l.json();return d??[]}async function UI({client:n,ecosystem:t,profileToUnlink:e,allowAccountDeletion:r=!1,storage:i}){const s=_r(n,t),o=Qr("inAppWallet"),c=await i.getAuthCookie();if(!c)throw new Error("Failed to unlink account, no user logged in");const l={Authorization:`Bearer iaw-auth-token:${c}`,"Content-Type":"application/json"},d=await s(`${o}/api/2024-05-05/account/disconnect`,{body:ye({allowAccountDeletion:r,details:e.details,type:e.type}),headers:l,method:"POST"});if(!d.ok){const h=await d.json();throw new Error(h.message||"Failed to unlink account.")}const{linkedAccounts:u}=await d.json();return u??[]}async function qI({client:n,ecosystem:t,storage:e}){const r=_r(n,t),i=Qr("inAppWallet"),s=await e.getAuthCookie();if(!s)throw new Error("Failed to get linked accounts, no user logged in");const o={Authorization:`Bearer iaw-auth-token:${s}`,"Content-Type":"application/json"},c=await r(`${i}/api/2024-05-05/accounts`,{headers:o,method:"GET"});if(!c.ok){const d=await c.json();throw new Error(d.message||"Failed to get linked accounts.")}const{linkedAccounts:l}=await c.json();return l??[]}const Mu=["google","apple","facebook","discord","line","x","tiktok","epic","coinbase","farcaster","telegram","github","twitch","steam"],MI=[...Mu,"guest","backend","email","phone","passkey","wallet"],Ob="0x3f707e6b",Rb=[{type:"tuple[]",name:"calls",components:[{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}]}],Lb=[];function Db(n){const t=yb(async()=>"asyncParams"in n?await n.asyncParams():n);return _d({contract:n.contract,method:[Ob,Rb,Lb],params:async()=>[(await t()).calls],value:async()=>{var e;return(e=(await t()).overrides)==null?void 0:e.value},accessList:async()=>{var e;return(e=(await t()).overrides)==null?void 0:e.accessList},gas:async()=>{var e;return(e=(await t()).overrides)==null?void 0:e.gas},gasPrice:async()=>{var e;return(e=(await t()).overrides)==null?void 0:e.gasPrice},maxFeePerGas:async()=>{var e;return(e=(await t()).overrides)==null?void 0:e.maxFeePerGas},maxPriorityFeePerGas:async()=>{var e;return(e=(await t()).overrides)==null?void 0:e.maxPriorityFeePerGas},nonce:async()=>{var e;return(e=(await t()).overrides)==null?void 0:e.nonce},extraGas:async()=>{var e;return(e=(await t()).overrides)==null?void 0:e.extraGas},erc20Value:async()=>{var e;return(e=(await t()).overrides)==null?void 0:e.erc20Value},authorizationList:async()=>{var e;return(e=(await t()).overrides)==null?void 0:e.authorizationList}})}async function Vb(n){const{client:t,chain:e,bundlerUrl:r}=n,i=r??Dc(e),s=`delegation-contract:${i}`;return Pc(async()=>{var d;const c=await _r(t)(i,{useAuthToken:!0,body:ye({id:1,jsonrpc:"2.0",method:"tw_getDelegationContract",params:[]}),headers:{"Content-Type":"application/json"},method:"POST"});if(!c.ok)throw new Error(`Failed to fetch delegation contract: ${c.status} ${c.statusText}`);const l=await c.json();if(l.error)throw new Error(`Delegation contract RPC error: ${JSON.stringify(l.error)}`);if(!((d=l.result)!=null&&d.delegationContract))throw new Error("Invalid response: missing delegationContract in result");return l.result.delegationContract},{cacheKey:s,cacheTime:24*60*60*1e3})}const Sb=n=>{const{client:t,adminAccount:e,sponsorGas:r}=n,i=async o=>{var f,m,y;const c=o[0];if(!c)throw new Error("No transactions provided");const l=we(c.chainId),d=Rs({address:e.address,chain:l,client:t,abi:kb});let u=(f=c.authorizationList)==null?void 0:f[0];const h=await Vb({client:t,chain:l});if(u&&((m=u.address)==null?void 0:m.toLowerCase())!==h.toLowerCase())throw new Error(`Authorization address does not match expected delegation contract address. Expected ${h} but got ${u.address}`);if(!u&&!await Cb(d,h)){let P=c.nonce?BigInt(c.nonce):BigInt(await xb({client:t,address:e.address,chain:l}));P+=r?0n:1n;const g=await((y=e.signAuthorization)==null?void 0:y.call(e,{address:Z(h),chainId:c.chainId,nonce:P}));if(!g)throw new Error("Failed to sign authorization");u=g}if(r){const E={calls:o.map(I=>({data:I.data??"0x",target:Z(I.to??""),value:I.value??0n})),uid:Gd()},P=await e.signTypedData({domain:{chainId:c.chainId,name:"MinimalAccount",verifyingContract:d.address,version:"1"},message:E,primaryType:"WrappedCalls",types:{Call:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],WrappedCalls:[{name:"calls",type:"Call[]"},{name:"uid",type:"bytes32"}]}}),g=await bb({authorization:u,eoaAddress:Z(e.address),options:{chain:we(c.chainId),client:t},signature:P,wrappedCalls:E});return{transactionHash:await $b({options:{chain:we(c.chainId),client:t},transactionId:g.transactionId})}}const _=Db({calls:o.map(E=>({data:E.data??"0x",target:Z(E.to??""),value:E.value??0n})),contract:d,overrides:{authorizationList:u?[u]:void 0,value:o.reduce((E,P)=>E+(P.value??0n),0n)}}),p=await pd({from:e.address,transaction:_});return e.sendTransaction(p)},s={address:e.address,sendBatchTransaction:async o=>i(o),sendTransaction:async o=>i([o]),signMessage:({message:o,originalMessage:c,chainId:l})=>e.signMessage({chainId:l,message:o,originalMessage:c}),signTypedData:o=>e.signTypedData(o),sendCalls:async o=>{const{inAppWalletSendCalls:c}=await a(async()=>{const{inAppWalletSendCalls:_}=await import("./in-app-wallet-calls-Dhx0WdY-.js");return{inAppWalletSendCalls:_}},__vite__mapDeps([30,31,12,1,2,3,4,20,32,5,6,7,8])),l=o.calls[0];if(!l)throw new Error("No calls to send");const d=l.client,u=l.chain||o.chain,h=await c({account:s,calls:o.calls,chain:u});return{chain:u,client:d,id:h}},getCallsStatus:async o=>{const{inAppWalletGetCallsStatus:c}=await a(async()=>{const{inAppWalletGetCallsStatus:l}=await import("./in-app-wallet-calls-Dhx0WdY-.js");return{inAppWalletGetCallsStatus:l}},__vite__mapDeps([30,31,12,1,2,3,4,20,32,5,6,7,8]));return c(o)},getCallsStatusRaw:async o=>{const{inAppWalletGetCallsStatusRaw:c}=await a(async()=>{const{inAppWalletGetCallsStatusRaw:l}=await import("./in-app-wallet-calls-Dhx0WdY-.js");return{inAppWalletGetCallsStatusRaw:l}},__vite__mapDeps([30,31,12,1,2,3,4,20,32,5,6,7,8]));return c(o)},getCapabilities:async o=>({[o.chainId??1]:{atomic:{status:"supported"},paymasterService:{supported:r??!1}}})};return s};async function xb(n){const{client:t,address:e,chain:r}=n,i=Yr({chain:r,client:t});return await a(async()=>{const{eth_getTransactionCount:o}=await import("./eth_getTransactionCount-PcXWvj1j.js");return{eth_getTransactionCount:o}},__vite__mapDeps([33,1,2,3,4])).then(({eth_getTransactionCount:o})=>o(i,{address:Z(e),blockTag:"pending"}))}async function Cb(n,t){const e=await fd(n),r=e.length>0&&e.startsWith("0xef0100"),i=`0x${e.slice(8,48)}`;return r&&i.toLowerCase()===t.toLowerCase()}async function $b(n){const t=n.timeoutMs||3e5,e=n.intervalMs||1e3,r=Date.now()+t;for(;Date.now()<r;){const i=await Ib({options:n.options,transactionId:n.transactionId});if(i.transactionHash)return i.transactionHash;await new Promise(s=>setTimeout(s,e))}throw new Error(`Timeout waiting for transaction to be mined on chain ${n.options.chain.id} with transactionId: ${n.transactionId}`)}const kb=[{type:"receive",stateMutability:"payable"},{type:"function",name:"createSessionWithSig",inputs:[{name:"sessionSpec",type:"tuple",internalType:"struct SessionLib.SessionSpec",components:[{name:"signer",type:"address",internalType:"address"},{name:"isWildcard",type:"bool",internalType:"bool"},{name:"expiresAt",type:"uint256",internalType:"uint256"},{name:"callPolicies",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]},{name:"transferPolicies",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"eip712Domain",inputs:[],outputs:[{name:"fields",type:"bytes1",internalType:"bytes1"},{name:"name",type:"string",internalType:"string"},{name:"version",type:"string",internalType:"string"},{name:"chainId",type:"uint256",internalType:"uint256"},{name:"verifyingContract",type:"address",internalType:"address"},{name:"salt",type:"bytes32",internalType:"bytes32"},{name:"extensions",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"view"},{type:"function",name:"execute",inputs:[{name:"calls",type:"tuple[]",internalType:"struct Call[]",components:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}]}],outputs:[],stateMutability:"payable"},{type:"function",name:"executeWithSig",inputs:[{name:"wrappedCalls",type:"tuple",internalType:"struct WrappedCalls",components:[{name:"calls",type:"tuple[]",internalType:"struct Call[]",components:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"payable"},{type:"function",name:"getCallPoliciesForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]}],stateMutability:"view"},{type:"function",name:"getSessionExpirationForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getSessionStateForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple",internalType:"struct SessionLib.SessionState",components:[{name:"transferValue",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]},{name:"callValue",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]},{name:"callParams",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]}]}],stateMutability:"view"},{type:"function",name:"getTransferPoliciesForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}],stateMutability:"view"},{type:"function",name:"isWildcardSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"onERC1155BatchReceived",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256[]",internalType:"uint256[]"},{name:"",type:"uint256[]",internalType:"uint256[]"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"onERC1155Received",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"onERC721Received",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"event",name:"Executed",inputs:[{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"},{name:"data",type:"bytes",indexed:!1,internalType:"bytes"}],anonymous:!1},{type:"event",name:"SessionCreated",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"sessionSpec",type:"tuple",indexed:!1,internalType:"struct SessionLib.SessionSpec",components:[{name:"signer",type:"address",internalType:"address"},{name:"isWildcard",type:"bool",internalType:"bool"},{name:"expiresAt",type:"uint256",internalType:"uint256"},{name:"callPolicies",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]},{name:"transferPolicies",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]}],anonymous:!1},{type:"event",name:"ValueReceived",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"error",name:"AllowanceExceeded",inputs:[{name:"allowanceUsage",type:"uint256",internalType:"uint256"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint64",internalType:"uint64"}]},{type:"error",name:"CallPolicyViolated",inputs:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"}]},{type:"error",name:"CallReverted",inputs:[]},{type:"error",name:"ConditionFailed",inputs:[{name:"param",type:"bytes32",internalType:"bytes32"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"condition",type:"uint8",internalType:"uint8"}]},{type:"error",name:"InvalidDataLength",inputs:[{name:"actualLength",type:"uint256",internalType:"uint256"},{name:"expectedLength",type:"uint256",internalType:"uint256"}]},{type:"error",name:"InvalidSignature",inputs:[{name:"msgSender",type:"address",internalType:"address"},{name:"thisAddress",type:"address",internalType:"address"}]},{type:"error",name:"LifetimeUsageExceeded",inputs:[{name:"lifetimeUsage",type:"uint256",internalType:"uint256"},{name:"limit",type:"uint256",internalType:"uint256"}]},{type:"error",name:"MaxValueExceeded",inputs:[{name:"value",type:"uint256",internalType:"uint256"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"}]},{type:"error",name:"NoCallsToExecute",inputs:[]},{type:"error",name:"SessionExpired",inputs:[]},{type:"error",name:"SessionExpiresTooSoon",inputs:[]},{type:"error",name:"SessionZeroSigner",inputs:[]},{type:"error",name:"TransferPolicyViolated",inputs:[{name:"target",type:"address",internalType:"address"}]},{type:"error",name:"UIDAlreadyProcessed",inputs:[]}];function Bu(n){return n.id==="inApp"||n.id==="embedded"}async function Nb(n,t,e){var s,o,c,l;if(((s=t==null?void 0:t.auth)==null?void 0:s.mode)!=="popup"&&((o=t==null?void 0:t.auth)==null?void 0:o.mode)!==void 0&&e.authenticateWithRedirect){const d=n.strategy;Mu.includes(d)&&await e.authenticateWithRedirect(d,(c=t==null?void 0:t.auth)==null?void 0:c.mode,(l=t==null?void 0:t.auth)==null?void 0:l.redirectUrl)}const i=(await e.connect(n)).user.account;return ju({authAccount:i,client:n.client,createOptions:t,desiredChain:n.chain})}async function Ub(n,t,e){n.authResult&&e.loginWithAuthToken&&await e.loginWithAuthToken(n.authResult);const r=await Mb(e);if(!r)throw new Error("Failed to authenticate user.");const i=r.account;return ju({authAccount:i,client:n.client,createOptions:t,desiredChain:n.chain})}async function qb(n){const{connectSmartAccount:t}=await a(async()=>{const{connectSmartAccount:e}=await import("./index-vLEo3QS7.js");return{connectSmartAccount:e}},__vite__mapDeps([21,3,4,1,2,22,13,5,6,7,8]));return t({chain:n.chain,client:n.client,personalAccount:n.authAccount},n.smartAccountOptions)}async function Mb(n){const t=await n.getUser();switch(t.status){case"Logged In, Wallet Initialized":return t}}async function ju(n){const{createOptions:t,authAccount:e,desiredChain:r,client:i}=n;let s,o;const c=t&&"executionMode"in t?t.executionMode:void 0;if(c&&(c.mode==="EIP4337"?s=c.smartAccount:c.mode==="EIP7702"&&(o=c)),t&&"smartAccount"in t&&(t!=null&&t.smartAccount)&&(s=t.smartAccount),s){const[l,d]=await qb({authAccount:e,chain:r,client:i,smartAccountOptions:s});return{account:l,adminAccount:e,chain:d}}if(o){const l=r;if(!l)throw new Error("Chain is required for EIP-7702 execution, pass a chain when connecting the inAppWallet.");return{account:Sb({adminAccount:e,client:i,sponsorGas:o.sponsorGas}),adminAccount:e,chain:l}}return{account:e,chain:r||Hd}}const qi=Object.freeze(Object.defineProperty({__proto__:null,autoConnectInAppWallet:Ub,connectInAppWallet:Nb,isInAppWallet:Bu},Symbol.toStringTag,{value:"Module"}));function Bb(n){const t=r=>Bu(r)||Rn(r),e=Is(n.wallet)&&n.connectedWallets.some(r=>{var i,s,o,c,l,d;return t(r)&&((s=(i=r.getAccount())==null?void 0:i.address)==null?void 0:s.toLowerCase())===((d=(l=(c=(o=n.wallet).getAdminAccount)==null?void 0:c.call(o))==null?void 0:l.address)==null?void 0:d.toLowerCase())});return t(n.wallet)||e}function jb(){if(typeof document>"u")return;const n=new URLSearchParams(window.location.search);let t;const e=window.location.hash||"";let r=e;const i=e.indexOf("?");i!==-1&&(t=new URLSearchParams(e.substring(i)),r=e.substring(0,i));const s=n.get("walletId")??(t==null?void 0:t.get("walletId"))??void 0,o=n.get("authResult")??(t==null?void 0:t.get("authResult"))??void 0,c=n.get("authProvider")??(t==null?void 0:t.get("authProvider"))??void 0,l=n.get("authCookie")??(t==null?void 0:t.get("authCookie"))??void 0,d=n.get("authFlow")??(t==null?void 0:t.get("authFlow"))??void 0;if((l||o)&&s){const u=(()=>{if(o)return n.delete("authResult"),t==null||t.delete("authResult"),JSON.parse(decodeURIComponent(o))})();n.delete("walletId"),n.delete("authProvider"),n.delete("authCookie"),n.delete("authFlow"),t==null||t.delete("walletId"),t==null||t.delete("authProvider"),t==null||t.delete("authCookie"),t==null||t.delete("authFlow");const h=n.toString(),_=h?`?${h}`:"";let p=r;if(t){const f=t.toString();f&&(p=`${r}?${f}`)}return window.history.pushState({},"",`${window.location.pathname}${_}${p}`),{authCookie:l,authFlow:d,authProvider:c,authResult:u,walletId:s}}}let Mi;const zb=async n=>{if(Mi&&!n.force&&await Mi)return!0;const t=Fb(n);return Mi=t,t},Fb=async({storage:n,props:t,createWalletFn:e,manager:r,connectOverride:i,setLastAuthProvider:s})=>{var I,L,N,x,w;const{wallets:o,onConnect:c}=t,l=t.timeout??15e3;let d=!1;r.isAutoConnecting.setValue(!0);let[u,h]=await Promise.all([Nu(n),uo(n)]);const _=jb();if((_==null?void 0:_.authFlow)==="link"&&_.authResult)return await Kb({client:t.client,connectOverride:i,createWalletFn:e,manager:r,onConnect:c,props:t,setLastAuthProvider:s,storage:n,timeout:l,urlToken:_,wallets:o});const p=o.find(v=>v.id===(_==null?void 0:_.walletId));if(_!=null&&_.authCookie&&p&&await new lo({clientId:t.client.clientId,ecosystem:Rn(p)?{id:p.id,partnerId:(I=p.getConfig())==null?void 0:I.partnerId}:void 0,storage:n}).saveAuthCookie(_.authCookie),_!=null&&_.walletId&&(h=_.walletId,u=u!=null&&u.includes(_.walletId)?u:[_.walletId,...u||[]]),_!=null&&_.authProvider&&await(s==null?void 0:s(_.authProvider,n)),!u)return d;const f=await Uu(n)||t.chain,m=u.map(v=>{const A=o.find(T=>T.id===v);return A||e(v)}),y=h&&(m.find(v=>v.id===h)||e(h));if(y){r.activeWalletConnectionStatusStore.setValue("connecting"),await qu(Ts({authResult:_==null?void 0:_.authResult,client:t.client,lastConnectedChain:f,wallet:y}),{message:`AutoConnect timeout: ${l}ms limit exceeded.`,ms:l}).catch(v=>{console.warn(v.message),t.onTimeout&&t.onTimeout()});try{await(i?i(y):r.connect(y,{accountAbstraction:t.accountAbstraction,client:t.client}))}catch(v){v instanceof Error&&console.warn("Error auto connecting wallet:",v.message),r.activeWalletConnectionStatusStore.setValue("disconnected")}}else r.activeWalletConnectionStatusStore.setValue("disconnected");const E=m.filter(v=>v.id!==h&&u.includes(v.id));for(const v of E)try{await Ts({authResult:_==null?void 0:_.authResult,client:t.client,lastConnectedChain:f,wallet:v}),r.addConnectedWallet(v)}catch{}y&&Bb({connectedWallets:y?[y,...E]:E,wallet:y})&&((L=t.siweAuth)!=null&&L.requiresAuth)&&!((N=t.siweAuth)!=null&&N.isLoggedIn)&&!((x=t.siweAuth)!=null&&x.isLoggingIn)&&await((w=t.siweAuth)==null?void 0:w.doLogin().catch(v=>{console.warn("Error signing in with SIWE:",v.message)})),r.isAutoConnecting.setValue(!1);const g=r.activeWalletStore.getValue(),b=r.connectedWallets.getValue();if(g){d=!0;try{c==null||c(g,b)}catch(v){console.error("Error calling onConnect callback:",v)}}else r.activeWalletConnectionStatusStore.setValue("disconnected");return d};async function Kb(n){var b;const{client:t,connectOverride:e,createWalletFn:r,manager:i,onConnect:s,props:o,setLastAuthProvider:c,storage:l,timeout:d,urlToken:u,wallets:h}=n,[_,p]=await Promise.all([Nu(l),uo(l)]),f=await Uu(l)||o.chain;if(!p||!_)return console.warn("No stored wallet found for linking flow"),i.isAutoConnecting.setValue(!1),!1;u.authProvider&&await(c==null?void 0:c(u.authProvider,l));const m=h.find(I=>I.id===p)||r(p);i.activeWalletConnectionStatusStore.setValue("connecting");try{await qu(Ts({authResult:void 0,client:t,lastConnectedChain:f,wallet:m}),{message:`AutoConnect timeout: ${d}ms limit exceeded.`,ms:d}),await(e?e(m):i.connect(m,{accountAbstraction:o.accountAbstraction,client:t}))}catch(I){return console.warn("Failed to auto-connect for linking:",I),i.activeWalletConnectionStatusStore.setValue("disconnected"),i.isAutoConnecting.setValue(!1),!1}const y=Rn(m)?{id:m.id,partnerId:(b=m.getConfig())==null?void 0:b.partnerId}:void 0,E=new lo({clientId:t.clientId,ecosystem:y,storage:l});try{await Pb({client:t,ecosystem:y,storage:E,tokenToLink:u.authResult.storedToken.cookieString})}catch(I){console.error("Failed to link profile after redirect:",I)}i.isAutoConnecting.setValue(!1);const P=i.activeWalletStore.getValue(),g=i.connectedWallets.getValue();if(P){try{s==null||s(P,g)}catch(I){console.error("Error calling onConnect callback:",I)}return!0}return!1}async function Ts(n){return n.wallet.autoConnect({authResult:n.authResult,chain:n.lastConnectedChain,client:n.client})}async function Wb(n){const t=n.wallets||_b(n),e=Ab(qr);return await zb({createWalletFn:it,manager:e,props:{...n,wallets:t},storage:qr})}const BI=Object.freeze(Object.defineProperty({__proto__:null,DefaultWalletConnectRequestHandlers:cb,EIP1193:Lh,authenticate:$h,authenticateWithRedirect:kh,autoConnect:Wb,createWallet:it,createWalletAdapter:Dh,createWalletConnectClient:lb,createWalletConnectSession:ub,deploySmartAccount:wd,disconnectWalletConnectSession:Cu,ecosystemWallet:Kc,embeddedWallet:Fi,generateAccount:jh,getActiveWalletConnectSessions:db,getAllWalletsList:Vh,getInstalledWallets:Wc,getProfiles:qh,getUser:yd,getUserEmail:Sh,getUserPhoneNumber:xh,getWalletBalance:zh,getWalletInfo:$c,inAppWallet:Fi,injectedProvider:Bs,isBaseAccountSDKWallet:Nc,linkProfile:Nh,preAuthenticate:Ch,privateKeyAccount:Wi,privateKeyToAccount:Wi,randomPrivateKey:md,smartWallet:Ms,unlinkProfile:Uh,walletConnect:Ah},Symbol.toStringTag,{value:"Module"}));export{xI as $,ll as A,ti as B,or as C,Xv as D,tp as E,Vr as F,cl as G,ap as H,cp as I,fI as J,ae as K,_I as L,zr as M,AI as N,yI as O,uu as P,mI as Q,yb as R,Dc as S,$u as T,Xr as U,dr as V,rh as W,$I as X,Qy as Y,CI as Z,VI as _,DI as a,eI as a0,eh as a1,nh as a2,kI as a3,NI as a4,SI as a5,Is as a6,MI as a7,lo as a8,qr as a9,OI as aa,Mu as ab,Pb as ac,UI as ad,qI as ae,PI as af,BI as ag,$c as b,Mr as c,RI as d,Cu as e,uh as f,Ih as g,xu as h,TI as i,eb as j,tb as k,nb as l,lc as m,ot as n,cc as o,Cs as p,Fs as q,Gd as r,LI as s,Tn as t,co as u,tn as v,kt as w,pe as x,pI as y,ko as z};
|