@dcl/explorer-website 2.6.1-25865517797.commit-b7a7cba → 2.6.1-25877826901.commit-3465800

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.
Files changed (140) hide show
  1. package/assets/{ConstantsUtil-ByjAYmvC.js → ConstantsUtil-C4lJZ9QJ.js} +1 -1
  2. package/assets/{ExchangeController-Bp8ztJrX.js → ExchangeController-BSoHrJkH.js} +1 -1
  3. package/assets/{HelpersUtil-Dp4e1zvd.js → HelpersUtil-COJM8Fma.js} +1 -1
  4. package/assets/{NetworkUtil-DqGcuBfF.js → NetworkUtil-XsBaDkTf.js} +1 -1
  5. package/assets/{SwapController-DUCq2f7d.js → SwapController-CykJEtRW.js} +1 -1
  6. package/assets/{W3MFrameProviderSingleton-9eitOT0j.js → W3MFrameProviderSingleton-eYQGtm7P.js} +3 -3
  7. package/assets/{basic-C7tUDecp.js → basic-OoSQYHEk.js} +1 -1
  8. package/assets/{biconomy-plHCR2Qq.js → biconomy-PKn4tIKl.js} +1 -1
  9. package/assets/{browser-VYI7gorG.js → browser-DoJWAFam.js} +1 -1
  10. package/assets/browser-ponyfill-CqiVi-O8.js +1 -0
  11. package/assets/{ccip-CrAifiNa.js → ccip-BvTmJITs.js} +1 -1
  12. package/assets/{ccip-Bldffu31.js → ccip-ByLIoOC6.js} +1 -1
  13. package/assets/{chains-DTVDhUwv.js → chains-icJ3HR5v.js} +1 -1
  14. package/assets/{common-BEf2T7Hi.js → common-DMnogLd5.js} +1 -1
  15. package/assets/{controller-B8Iy-6V9.js → controller-BXwg_bJl.js} +2 -2
  16. package/assets/{core-XFvzSI58.js → core-DOL3gnfb.js} +4 -4
  17. package/assets/{custom-cPmISGcH.js → custom-CZYipZz1.js} +1 -1
  18. package/assets/{data-capture-DnvAEYWK.js → data-capture-CRDSEIY_.js} +1 -1
  19. package/assets/{decimals-8g2-fBFa.js → decimals-DNQm_OiO.js} +1 -1
  20. package/assets/decimals-DnutWGXb.js +1 -0
  21. package/assets/{detectExtension-yvI5WWZb.js → detectExtension-BfmE7TOs.js} +1 -1
  22. package/assets/{email-C8DRQjTT.js → email-CvS0g63O.js} +1 -1
  23. package/assets/{embedded-wallet-BxgtT1uV.js → embedded-wallet-BH2dkm4W.js} +1 -1
  24. package/assets/{engine-BERe87yT.js → engine-Di9rAbBn.js} +1 -1
  25. package/assets/{estimate-l1-fee-BTeKvFv5.js → estimate-l1-fee-D5Yk5K_j.js} +1 -1
  26. package/assets/eth_estimateGas-BmOR31h-.js +1 -0
  27. package/assets/{eth_getStorageAt-SbVMAQY-.js → eth_getStorageAt-7xIaoYHZ.js} +1 -1
  28. package/assets/{eth_getTransactionCount-qv0oO1Md.js → eth_getTransactionCount-DrnF23O4.js} +1 -1
  29. package/assets/{ethereum-BP59xYBe.js → ethereum-2kM2S7dx.js} +1 -1
  30. package/assets/{extractIPFS-BOFlZk7U.js → extractIPFS-C9Vdpa9n.js} +1 -1
  31. package/assets/{features-DVWd8_kC.js → features-DRiKivpi.js} +1 -1
  32. package/assets/{fetchTokenMetadata-BaJXN6RH.js → fetchTokenMetadata-DZl1qOjc.js} +2 -2
  33. package/assets/{fortmatic-DARkeYTE.js → fortmatic-6-9Hxtzg.js} +1 -1
  34. package/assets/get-ecosystem-wallet-info-DQQrfAsE.js +1 -0
  35. package/assets/{getBalance-D6wpo61w.js → getBalance-BfwFhtAu.js} +2 -2
  36. package/assets/{getInstalledModules-Dkj379ys.js → getInstalledModules-Dlcyw_6V.js} +1 -1
  37. package/assets/{getNFT-HMkoXD7L.js → getNFT-CkUzlgLt.js} +2 -2
  38. package/assets/{getNFT-Drn4rxrk.js → getNFT-DIu1VS3y.js} +1 -1
  39. package/assets/{hashTypedData-B5shS-rs.js → hashTypedData-CM_9VEoH.js} +1 -1
  40. package/assets/{hashTypedData-CMDSWYgs.js → hashTypedData-DrZol7nF.js} +1 -1
  41. package/assets/{in-app-wallet-calls-l9-2W_Em.js → in-app-wallet-calls-BABhagi9.js} +1 -1
  42. package/assets/{index-CH0zI801.js → index--SuwY_Sr.js} +1 -1
  43. package/assets/{index-B9U0GcYk.js → index-3gZjXx6v.js} +1 -1
  44. package/assets/{index-BXAxcybX.js → index-3jhEomSV.js} +1 -1
  45. package/assets/{index-D0LvjNIX.js → index-8eDD30Uv.js} +1 -1
  46. package/assets/{index-DfWsAOhN.js → index-B26CWJm4.js} +3 -3
  47. package/assets/{index-8M7OkBFm.js → index-B3Bk-Bdi.js} +1 -1
  48. package/assets/{index-DPxCDCvr.js → index-B7_b_SxX.js} +1 -1
  49. package/assets/{index-DK-ZMNLh.js → index-BI0nsxQ1.js} +1 -1
  50. package/assets/{index-BKL7nv1p.js → index-BPxeLdJF.js} +1 -1
  51. package/assets/{index-CWnFK_-0.js → index-BQJscq8u.js} +1 -1
  52. package/assets/{index-B5ECjSS9.js → index-BSmpP1mK.js} +1 -1
  53. package/assets/{index-JfVynEph.js → index-BUjSLaXy.js} +1 -1
  54. package/assets/{index-aoxVkzFE.js → index-BVL3WVs3.js} +1 -1
  55. package/assets/{index-829Uxa3Y.css → index-BXaGpRRD.css} +1 -1
  56. package/assets/{index-TBthDmkl.js → index-BYwd36WC.js} +1 -1
  57. package/assets/{index-0ShVRzxt.js → index-BlANYCHN.js} +1 -1
  58. package/assets/{index-BaGjqMte.js → index-BxZwJKty.js} +2 -2
  59. package/assets/{index-DOnRCLNP.js → index-C68kxEIB.js} +2 -2
  60. package/assets/{index-okvlQSs2.js → index-CEE50lK9.js} +1 -1
  61. package/assets/{index-BxdNwV86.js → index-CFn3Q12F.js} +1 -1
  62. package/assets/{index-DP1DuCnR.js → index-CNR7tadx.js} +1 -1
  63. package/assets/{index-CWGeCZBJ.js → index-CNttLYqM.js} +1 -1
  64. package/assets/{index-B-vyBZw9.js → index-CPCCdjXg.js} +1 -1
  65. package/assets/{index-C8NSq3HK.js → index-CQx7Nvt8.js} +1 -1
  66. package/assets/{index-I68folnJ.js → index-CUqVNGI9.js} +1 -1
  67. package/assets/{index-wds8TuUm.js → index-CYGUludi.js} +1 -1
  68. package/assets/{index-DS2Lm9tG.js → index-CcHsPndE.js} +1 -1
  69. package/assets/{index-DFE6t65x.js → index-CdCaVlZ8.js} +1 -1
  70. package/assets/{index-r_1z0VI_.js → index-CpGStcFm.js} +1 -1
  71. package/assets/{index-i4VBSYqA.js → index-CzGhZ9cz.js} +1 -1
  72. package/assets/{index-kXKMGszW.js → index-D2eOGoyM.js} +1 -1
  73. package/assets/{index-DIlwNfpB.js → index-D4_P_6_0.js} +1 -1
  74. package/assets/{index-D2ZBQG8w.js → index-D4h65XPa.js} +1 -1
  75. package/assets/{index-CE5G6IEJ.js → index-D6EwKnFm.js} +1 -1
  76. package/assets/{index-BDgZ3gDE.js → index-DD7htze-.js} +1 -1
  77. package/assets/{index-CjiwjbqL.js → index-DErCc5s3.js} +1 -1
  78. package/assets/{index-DvJmANzU.js → index-DIZhmTRA.js} +1 -1
  79. package/assets/{index-Cp7mdTuR.js → index-DNf75mcI.js} +1 -1
  80. package/assets/{index-BIPd_vR5.js → index-DVWnrfKr.js} +1 -1
  81. package/assets/{index-C5ciuua_.js → index-DcSeumRb.js} +1 -1
  82. package/assets/{index-DWRq2SN_.js → index-Dh25pQLC.js} +1 -1
  83. package/assets/{index-mZa0UiRt.js → index-DhJ5PMMP.js} +1 -1
  84. package/assets/{index-C51HwlD0.js → index-DvBfOXXL.js} +1 -1
  85. package/assets/{index-C-uqursN.js → index-ZSDK0Ila.js} +1 -1
  86. package/assets/{index-Cu4ZjLNb.js → index-a-a2MqTK.js} +5 -5
  87. package/assets/{index-B7Jt3b4d.js → index-jd0SXoNg.js} +1 -1
  88. package/assets/{index-BlykZ8Gp.js → index-kYi3llt9.js} +1 -1
  89. package/assets/{index-DbAu4Peg.js → index-mUrlue57.js} +3 -3
  90. package/assets/{index-Cy1X3n_C.js → index-vqWCp_18.js} +1 -1
  91. package/assets/{index.es-cEGj7JU0.js → index.es-B6W15sA5.js} +4 -4
  92. package/assets/{index.es-YpI01v2I.js → index.es-BpysnXQX.js} +1 -1
  93. package/assets/{index.es-CkxUaFYS.js → index.es-CjcoN6we.js} +1 -1
  94. package/assets/{localBatchGatewayRequest-CNIOIq-Z.js → localBatchGatewayRequest-BH_HSMtg.js} +1 -1
  95. package/assets/{networks-DJ72puSk.js → networks-xuo_6MCS.js} +1 -1
  96. package/assets/{onramp--l5ZLxWE.js → onramp-CYabKBjQ.js} +1 -1
  97. package/assets/{openzeppelin-CqtRqxtF.js → openzeppelin-ChIJtXh7.js} +1 -1
  98. package/assets/{ownerOf-cWkgEtd8.js → ownerOf-CpA7K1ak.js} +1 -1
  99. package/assets/{parseEventLogs-D1xiFnCH.js → parseEventLogs-DTRl5YJ_.js} +3 -3
  100. package/assets/{parseNft-DH5KlHPI.js → parseNft-BmgScKdM.js} +2 -2
  101. package/assets/{parseSignature-BYhcrVdX.js → parseSignature-On3IHrnn.js} +1 -1
  102. package/assets/{parseSignature-HAlgOHnm.js → parseSignature-XxRbPHFh.js} +3 -3
  103. package/assets/{pay-with-exchange-CiXPJJ6-.js → pay-with-exchange-DehF3o8r.js} +1 -1
  104. package/assets/{qr-overlay-CmFgwJBd.js → qr-overlay-BEl3x4xw.js} +3 -3
  105. package/assets/{receive-t2TxUItI.js → receive-C_KTgg4c.js} +1 -1
  106. package/assets/{resolveImplementation-iG9WRRnW.js → resolveImplementation-LbazawSf.js} +1 -1
  107. package/assets/{rpc-sIdV4wiJ.js → rpc-BVFdxD_n.js} +1 -1
  108. package/assets/{secp256k1-Co_Jve4c.js → secp256k1-6WLSeO2i.js} +1 -1
  109. package/assets/{secp256k1-Rk5k9i7o.js → secp256k1-CUFDPHqP.js} +1 -1
  110. package/assets/{secp256k1-Bg2aUJRs.js → secp256k1-DjijwK4n.js} +1 -1
  111. package/assets/{send-ByB5fOtm.js → send-BvXhUAZg.js} +1 -1
  112. package/assets/{send-batch-transaction-D79MC_wr.js → send-batch-transaction-PvOdFKh_.js} +1 -1
  113. package/assets/{send-eip712-transaction-CB6qLgks.js → send-eip712-transaction-DW2Z39R_.js} +2 -2
  114. package/assets/{send-gasless-transaction-Dt1qtUR8.js → send-gasless-transaction-DZNXePZn.js} +2 -2
  115. package/assets/{session-proposal-CY0k9Jnm.js → session-proposal-BDKOEjOS.js} +1 -1
  116. package/assets/{session-request-B_2glC9e.js → session-request-C6gEdmiF.js} +2 -2
  117. package/assets/{sha256-Dy8KQE_5.js → sha256-DOODwtIM.js} +1 -1
  118. package/assets/{signing-gNn6SJWz.js → signing-lyeTiv6v.js} +5 -5
  119. package/assets/{socials-Dx84-PrV.js → socials-J163g-WS.js} +1 -1
  120. package/assets/{swaps-CK9Sfcew.js → swaps-DhRGH4D_.js} +1 -1
  121. package/assets/{thirdweb-Bx5V_C1s.js → thirdweb-Dqspr20y.js} +3 -3
  122. package/assets/{totalSupply-O-VFDoRO.js → totalSupply-C4K7aOAr.js} +1 -1
  123. package/assets/{transactionReceipt-BqEjx5q-.js → transactionReceipt-DIRSM0gr.js} +1 -1
  124. package/assets/{transactions-BLOC2qYE.js → transactions-CIkqFxc1.js} +1 -1
  125. package/assets/{utils-h8VUSGPW.js → utils-Cj9H0gW-.js} +1 -1
  126. package/assets/{verifyHash-CNJ6t8Wp.js → verifyHash-CoWeO2NB.js} +1 -1
  127. package/assets/{w3m-modal-CCQuGDus.js → w3m-modal-BkrZujFe.js} +1 -1
  128. package/assets/{w3m-modal-nzPxg0Fr.js → w3m-modal-Cam7s-1S.js} +1 -1
  129. package/assets/{wait-for-tx-receipt-5pSBMNe2.js → wait-for-tx-receipt-CN6uf72q.js} +1 -1
  130. package/assets/{wallets-Bz03-Btm.js → wallets-HiUhftO5.js} +6 -6
  131. package/assets/{web-connector-CAOe_uvv.js → web-connector-Dq2kV8N4.js} +3 -3
  132. package/assets/{writeContract-CCar3Ocq.js → writeContract-jh5z7q6H.js} +1 -1
  133. package/assets/{zora-sepolia-D6mjhB5j.js → zora-sepolia-CS_uSNQg.js} +1 -1
  134. package/assets/{zoraTestnet-WLSFziQl.js → zoraTestnet-CvoUlJGq.js} +1 -1
  135. package/index.html +4 -4
  136. package/package.json +3 -3
  137. package/assets/browser-ponyfill-BmgQyNz0.js +0 -1
  138. package/assets/decimals-DR6jraOc.js +0 -1
  139. package/assets/eth_estimateGas-DKKwG-Ue.js +0 -1
  140. package/assets/get-ecosystem-wallet-info-Cvjz8DFX.js +0 -1
@@ -1 +1 @@
1
- import{c as r}from"./parseSignature-BYhcrVdX.js";import{B as g,E as T,a as h,b,F as f,W as v,d as y,e as A,f as S,g as I,p as F,l as R,n as x,p as C,h as N,s as B,z as P}from"./parseSignature-BYhcrVdX.js";import{I as U,c as w,a as M,p as H,w as L}from"./custom-cPmISGcH.js";import{h as s}from"./W3MFrameProviderSingleton-9eitOT0j.js";import{U as z,c as q,f as V,s as O,w as G,a as j}from"./W3MFrameProviderSingleton-9eitOT0j.js";import{A as K,a as Z,B as J,b as Q,C as X,D as Y,E as _,F as $,c as aa,H as ra,I as oa,d as sa,e as ea,f as ta,g as ia,h as na,i as ca,j as da,k as Ea,l as ua,J as pa,L as la,M as ma,m as ga,N as Ta,n as ha,o as ba,P as fa,p as va,q as ya,R as Aa,r as Sa,s as Ia,t as Fa,S as Ra,u as xa,v as Ca,w as Na,T as Ba,x as Pa,y as Da,z as Ua,U as wa,G as Ma,K as Ha,O as La,Q as ka,V as za,W as qa,X as Va,Y as Oa,Z as Ga,_ as ja,$ as Wa,a0 as Ka,a1 as Za,a2 as Ja,a3 as Qa,a4 as Xa,a5 as Ya,a6 as _a,a7 as $a,a8 as ar,a9 as rr,aa as or,ab as sr,ac as er,ad as tr,ae as ir,af as nr,ag as cr,ah as dr,ai as Er,aj as ur,ak as pr,al as lr,am as mr,an as gr,ao as Tr,a0 as hr}from"./NetworkUtil-DqGcuBfF.js";import{A as fr,a as vr,b as yr,c as Ar,d as Sr,e as Ir,f as Fr,g as Rr,h as xr,i as Cr,j as Nr,k as Br,l as Pr,m as Dr,n as Ur,o as wr,p as Mr,B as Hr,q as Lr,r as kr,C as zr,s as qr,t as Vr,u as Or,v as Gr,w as jr,x as Wr,y as Kr,z as Zr,D as Jr,E as Qr,F as Xr,G as Yr,H as _r,I as $r,J as ao,K as ro,L as oo,M as so,N as eo,O as to,P as io,Q as no,R as co,S as Eo,T as uo,U as po,V as lo,W as mo,X as go,Y as To,Z as ho,_ as bo,$ as fo,a0 as vo,a1 as yo,a2 as Ao,a3 as So,a4 as Io,a5 as Fo,a6 as Ro,a7 as xo,a8 as Co,a9 as No,aa as Bo,ab as Po,ac as Do,ad as Uo,ae as wo,af as Mo,ag as Ho,ah as Lo,ai as ko,aj as zo,ak as qo,al as Vo,am as Oo,an as Go,ao as jo,ap as Wo,aq as Ko,ar as Zo,as as Jo,at as Qo,au as Xo,av as Yo,aw as _o,ax as $o,ay as as,az as rs,aA as os,aB as ss,aC as es,aD as ts,aE as is,aF as ns,aG as cs,aH as ds,aI as Es,aJ as us,aK as ps,aL as ls,aM as ms,aN as gs,aM as Ts,aO as hs,aP as bs,aQ as fs,aR as vs,aS as ys,aT as As,aU as Ss,aV as Is,aW as Fs,aX as Rs,aY as xs,aZ as Cs,a_ as Ns,a$ as Bs,b0 as Ps,b1 as Ds,b2 as Us,b3 as ws,b4 as Ms,aL as Hs,aM as Ls,b4 as ks,aN as zs,aM as qs,b5 as Vs,b6 as Os,aA as Gs}from"./parseEventLogs-D1xiFnCH.js";import{I as Ws,a as Ks,b as Zs,g as Js,h as Qs,c as Xs,d as Ys,e as _s,p as $s,t as ae,v as re}from"./hashTypedData-B5shS-rs.js";import{d as se,e as ee,a as te}from"./localBatchGatewayRequest-CNIOIq-Z.js";import{ccipRequest as ne,ccipRequest as ce,offchainLookup as de,offchainLookupAbiItem as Ee,offchainLookupSignature as ue}from"./ccip-Bldffu31.js";import{d as t}from"./verifyHash-CNJ6t8Wp.js";import{a as le,b as me,c as ge,e as Te,p as he,f as be,s as fe,g as ve,h as ye,g as Ae}from"./verifyHash-CNJ6t8Wp.js";import"./secp256k1-Bg2aUJRs.js";import"./sha2-D3ryOfi3.js";import"./hmac-BMnSt9Ou.js";import"./index-DS2Lm9tG.js";import"./index-Cu4ZjLNb.js";import"./browser-ponyfill-BmgQyNz0.js";import"./sha256-D33fGSQc.js";export{fr as AbiConstructorNotFoundError,vr as AbiConstructorParamsNotFoundError,yr as AbiDecodingDataSizeTooSmallError,Ar as AbiDecodingZeroDataError,Sr as AbiEncodingArrayLengthMismatchError,Ir as AbiEncodingBytesSizeMismatchError,Fr as AbiEncodingLengthMismatchError,Rr as AbiErrorInputsNotFoundError,xr as AbiErrorNotFoundError,Cr as AbiErrorSignatureNotFoundError,Nr as AbiEventNotFoundError,Br as AbiEventSignatureEmptyTopicsError,Pr as AbiEventSignatureNotFoundError,Dr as AbiFunctionNotFoundError,Ur as AbiFunctionOutputsNotFoundError,wr as AbiFunctionSignatureNotFoundError,Mr as AccountStateConflictError,K as AtomicReadyWalletRejectedUpgradeError,Z as AtomicityNotSupportedError,J as BaseError,Hr as BaseFeeScalarError,Lr as BlockNotFoundError,g as BundleFailedError,Q as BundleTooLargeError,kr as BytesSizeMismatchError,zr as CallExecutionError,X as ChainDisconnectedError,qr as ChainDoesNotSupportContract,Vr as ChainMismatchError,Or as ChainNotFoundError,Gr as CircularReferenceError,jr as ClientChainNotConfiguredError,Wr as ContractFunctionExecutionError,Kr as ContractFunctionRevertedError,Zr as ContractFunctionZeroDataError,Jr as CounterfactualDeploymentFailedError,Qr as DecodeLogDataMismatch,Xr as DecodeLogTopicsMismatch,Y as DuplicateIdError,Yr as Eip1559FeesNotSupportedError,T as EnsAvatarInvalidNftUriError,h as EnsAvatarUnsupportedNamespaceError,b as EnsAvatarUriResolutionError,_r as EstimateGasExecutionError,_ as ExecutionRevertedError,$ as FeeCapTooHighError,aa as FeeCapTooLowError,f as FilterTypeNotSupportedError,ra as HttpRequestError,oa as InsufficientFundsError,sa as IntegerOutOfRangeError,ea as InternalRpcError,ta as IntrinsicGasTooHighError,ia as IntrinsicGasTooLowError,$r as InvalidAbiDecodingTypeError,ao as InvalidAbiEncodingTypeError,ro as InvalidAbiItemError,oo as InvalidAbiParametersError,so as InvalidAbiTypeParameterError,eo as InvalidAddressError,to as InvalidArrayError,na as InvalidBytesBooleanError,io as InvalidChainIdError,U as InvalidDecimalNumberError,no as InvalidDefinitionTypeError,Ws as InvalidDomainError,co as InvalidFunctionModifierError,ca as InvalidHexBooleanError,da as InvalidInputRpcError,Eo as InvalidLegacyVError,uo as InvalidModifierError,po as InvalidParameterError,Ea as InvalidParamsRpcError,lo as InvalidParenthesisError,Ks as InvalidPrimaryTypeError,ua as InvalidRequestRpcError,mo as InvalidSerializableTransactionError,go as InvalidSignatureError,To as InvalidStorageKeySizeError,ho as InvalidStructSignatureError,Zs as InvalidStructTypeError,pa as JsonRpcVersionUnsupportedError,la as LimitExceededRpcError,bo as MaxFeePerGasTooLowError,ma as MethodNotFoundRpcError,ga as MethodNotSupportedRpcError,Ta as NonceMaxValueError,ha as NonceTooHighError,ba as NonceTooLowError,fa as ParseRpcError,va as ProviderDisconnectedError,ya as ProviderRpcError,fo as RawContractError,Aa as ResourceNotFoundRpcError,Sa as ResourceUnavailableRpcError,Ia as RpcError,Fa as RpcRequestError,Ra as SizeExceedsPaddingSizeError,xa as SizeOverflowError,Ca as SliceOffsetOutOfBoundsError,vo as SolidityProtectedKeywordError,yo as StateAssignmentConflictError,Na as SwitchChainError,Ba as TimeoutError,Pa as TipAboveFeeCapError,Ao as TransactionExecutionError,So as TransactionNotFoundError,Io as TransactionReceiptNotFoundError,Da as TransactionRejectedRpcError,Ua as TransactionTypeNotSupportedError,wa as UnauthorizedProviderError,Ma as UnknownBundleIdError,Ha as UnknownNodeError,La as UnknownRpcError,Fo as UnknownSignatureError,Ro as UnknownTypeError,ka as UnsupportedChainIdError,za as UnsupportedNonOptionalCapabilityError,xo as UnsupportedPackedAbiType,qa as UnsupportedProviderMethodError,z as UrlRequiredError,Va as UserRejectedRequestError,v as WaitForCallsStatusTimeoutError,Co as WaitForTransactionReceiptTimeoutError,No as assertCurrentChain,Bo as assertRequest,le as assertTransactionEIP1559,me as assertTransactionEIP2930,ge as assertTransactionLegacy,Po as blobsToCommitments,Do as blobsToProofs,Oa as boolToBytes,Ga as boolToHex,Uo as bytesToBigInt,wo as bytesToBool,ja as bytesToHex,Mo as bytesToNumber,Ho as bytesToString,ne as ccipFetch,ce as ccipRequest,Lo as checksumAddress,ko as commitmentToVersionedHash,zo as commitmentsToVersionedHashes,qo as concat,Vo as concatBytes,Oo as concatHex,w as createClient,y as createNonceManager,r as createPublicClient,q as createTransport,M as custom,Go as decodeAbiParameters,jo as decodeErrorResult,Wo as decodeEventLog,se as decodeFunctionData,Ko as decodeFunctionResult,Zo as defineBlock,t as defineChain,Jo as defineTransaction,Qo as defineTransactionReceipt,Xo as defineTransactionRequest,Yo as deploylessCallViaBytecodeBytecode,_o as deploylessCallViaFactoryBytecode,$o as encodeAbiParameters,as as encodeDeployData,ee as encodeErrorResult,A as encodeEventTopics,rs as encodeFunctionData,te as encodeFunctionResult,S as encodePacked,Wa as erc20Abi,Ka as erc6492SignatureValidatorAbi,os as erc6492SignatureValidatorByteCode,I as ethAddress,Za as etherUnits,Te as extendSchema,V as fallback,ss as formatBlock,es as formatEther,Ja as formatGwei,ts as formatLog,is as formatTransaction,ns as formatTransactionReceipt,cs as formatTransactionRequest,Qa as formatUnits,Xa as fromHex,ds as getAbiItem,Es as getAddress,us as getChainContractAddress,ps as getContractError,ls as getEventSelector,ms as getEventSignature,gs as getFunctionSelector,Ts as getFunctionSignature,hs as getTransactionType,Js as getTypesForEIP712Domain,Ya as gweiUnits,Qs as hashDomain,Xs as hashMessage,Ys as hashStruct,_s as hashTypedData,_a as hexToBigInt,$a as hexToBool,ar as hexToBytes,rr as hexToNumber,F as hexToSignature,or as hexToString,s as http,bs as isAddress,fs as isAddressEqual,sr as isHex,vs as keccak256,R as labelhash,ys as maxUint16,As as maxUint256,er as multicall3Abi,x as namehash,tr as numberToBytes,ir as numberToHex,de as offchainLookup,Ee as offchainLookupAbiItem,ue as offchainLookupSignature,nr as pad,cr as padBytes,dr as padHex,Ss as parseAbi,he as parseAbiItem,be as parseAbiParameters,Is as parseEventLogs,C as parseSignature,H as parseUnits,Fs as prepareEncodeFunctionData,$s as presignMessagePrefix,N as publicActions,Rs as recoverAddress,xs as recoverPublicKey,Cs as rpcTransactionType,fe as serializeAccessList,B as serializeErc6492Signature,ve as serializeSignature,ye as serializeTransaction,Ns as sha256,O as shouldThrow,Ae as signatureToHex,Er as size,Bs as slice,Ps as sliceBytes,Ds as sliceHex,ur as stringToBytes,pr as stringToHex,lr as stringify,Us as toBlobSidecars,ws as toBlobs,mr as toBytes,Ms as toEventHash,Hs as toEventSelector,Ls as toEventSignature,ks as toFunctionHash,zs as toFunctionSelector,qs as toFunctionSignature,gr as toHex,ae as toPrefixedMessage,Vs as toRlp,Os as transactionType,Tr as trim,hr as universalSignatureValidatorAbi,Gs as universalSignatureValidatorByteCode,re as validateTypedData,L as withCache,G as withRetry,j as withTimeout,P as zeroAddress};
1
+ import{c as r}from"./parseSignature-On3IHrnn.js";import{B as g,E as T,a as h,b,F as f,W as v,d as y,e as A,f as S,g as I,p as F,l as R,n as x,p as C,h as N,s as B,z as P}from"./parseSignature-On3IHrnn.js";import{I as U,c as w,a as M,p as H,w as L}from"./custom-CZYipZz1.js";import{h as s}from"./W3MFrameProviderSingleton-eYQGtm7P.js";import{U as z,c as q,f as V,s as O,w as G,a as j}from"./W3MFrameProviderSingleton-eYQGtm7P.js";import{A as K,a as Z,B as J,b as Q,C as X,D as Y,E as _,F as $,c as aa,H as ra,I as oa,d as sa,e as ea,f as ta,g as ia,h as na,i as ca,j as da,k as Ea,l as ua,J as pa,L as la,M as ma,m as ga,N as Ta,n as ha,o as ba,P as fa,p as va,q as ya,R as Aa,r as Sa,s as Ia,t as Fa,S as Ra,u as xa,v as Ca,w as Na,T as Ba,x as Pa,y as Da,z as Ua,U as wa,G as Ma,K as Ha,O as La,Q as ka,V as za,W as qa,X as Va,Y as Oa,Z as Ga,_ as ja,$ as Wa,a0 as Ka,a1 as Za,a2 as Ja,a3 as Qa,a4 as Xa,a5 as Ya,a6 as _a,a7 as $a,a8 as ar,a9 as rr,aa as or,ab as sr,ac as er,ad as tr,ae as ir,af as nr,ag as cr,ah as dr,ai as Er,aj as ur,ak as pr,al as lr,am as mr,an as gr,ao as Tr,a0 as hr}from"./NetworkUtil-XsBaDkTf.js";import{A as fr,a as vr,b as yr,c as Ar,d as Sr,e as Ir,f as Fr,g as Rr,h as xr,i as Cr,j as Nr,k as Br,l as Pr,m as Dr,n as Ur,o as wr,p as Mr,B as Hr,q as Lr,r as kr,C as zr,s as qr,t as Vr,u as Or,v as Gr,w as jr,x as Wr,y as Kr,z as Zr,D as Jr,E as Qr,F as Xr,G as Yr,H as _r,I as $r,J as ao,K as ro,L as oo,M as so,N as eo,O as to,P as io,Q as no,R as co,S as Eo,T as uo,U as po,V as lo,W as mo,X as go,Y as To,Z as ho,_ as bo,$ as fo,a0 as vo,a1 as yo,a2 as Ao,a3 as So,a4 as Io,a5 as Fo,a6 as Ro,a7 as xo,a8 as Co,a9 as No,aa as Bo,ab as Po,ac as Do,ad as Uo,ae as wo,af as Mo,ag as Ho,ah as Lo,ai as ko,aj as zo,ak as qo,al as Vo,am as Oo,an as Go,ao as jo,ap as Wo,aq as Ko,ar as Zo,as as Jo,at as Qo,au as Xo,av as Yo,aw as _o,ax as $o,ay as as,az as rs,aA as os,aB as ss,aC as es,aD as ts,aE as is,aF as ns,aG as cs,aH as ds,aI as Es,aJ as us,aK as ps,aL as ls,aM as ms,aN as gs,aM as Ts,aO as hs,aP as bs,aQ as fs,aR as vs,aS as ys,aT as As,aU as Ss,aV as Is,aW as Fs,aX as Rs,aY as xs,aZ as Cs,a_ as Ns,a$ as Bs,b0 as Ps,b1 as Ds,b2 as Us,b3 as ws,b4 as Ms,aL as Hs,aM as Ls,b4 as ks,aN as zs,aM as qs,b5 as Vs,b6 as Os,aA as Gs}from"./parseEventLogs-DTRl5YJ_.js";import{I as Ws,a as Ks,b as Zs,g as Js,h as Qs,c as Xs,d as Ys,e as _s,p as $s,t as ae,v as re}from"./hashTypedData-CM_9VEoH.js";import{d as se,e as ee,a as te}from"./localBatchGatewayRequest-BH_HSMtg.js";import{ccipRequest as ne,ccipRequest as ce,offchainLookup as de,offchainLookupAbiItem as Ee,offchainLookupSignature as ue}from"./ccip-ByLIoOC6.js";import{d as t}from"./verifyHash-CoWeO2NB.js";import{a as le,b as me,c as ge,e as Te,p as he,f as be,s as fe,g as ve,h as ye,g as Ae}from"./verifyHash-CoWeO2NB.js";import"./secp256k1-DjijwK4n.js";import"./sha2-D3ryOfi3.js";import"./hmac-BMnSt9Ou.js";import"./index-CcHsPndE.js";import"./index-a-a2MqTK.js";import"./browser-ponyfill-CqiVi-O8.js";import"./sha256-D33fGSQc.js";export{fr as AbiConstructorNotFoundError,vr as AbiConstructorParamsNotFoundError,yr as AbiDecodingDataSizeTooSmallError,Ar as AbiDecodingZeroDataError,Sr as AbiEncodingArrayLengthMismatchError,Ir as AbiEncodingBytesSizeMismatchError,Fr as AbiEncodingLengthMismatchError,Rr as AbiErrorInputsNotFoundError,xr as AbiErrorNotFoundError,Cr as AbiErrorSignatureNotFoundError,Nr as AbiEventNotFoundError,Br as AbiEventSignatureEmptyTopicsError,Pr as AbiEventSignatureNotFoundError,Dr as AbiFunctionNotFoundError,Ur as AbiFunctionOutputsNotFoundError,wr as AbiFunctionSignatureNotFoundError,Mr as AccountStateConflictError,K as AtomicReadyWalletRejectedUpgradeError,Z as AtomicityNotSupportedError,J as BaseError,Hr as BaseFeeScalarError,Lr as BlockNotFoundError,g as BundleFailedError,Q as BundleTooLargeError,kr as BytesSizeMismatchError,zr as CallExecutionError,X as ChainDisconnectedError,qr as ChainDoesNotSupportContract,Vr as ChainMismatchError,Or as ChainNotFoundError,Gr as CircularReferenceError,jr as ClientChainNotConfiguredError,Wr as ContractFunctionExecutionError,Kr as ContractFunctionRevertedError,Zr as ContractFunctionZeroDataError,Jr as CounterfactualDeploymentFailedError,Qr as DecodeLogDataMismatch,Xr as DecodeLogTopicsMismatch,Y as DuplicateIdError,Yr as Eip1559FeesNotSupportedError,T as EnsAvatarInvalidNftUriError,h as EnsAvatarUnsupportedNamespaceError,b as EnsAvatarUriResolutionError,_r as EstimateGasExecutionError,_ as ExecutionRevertedError,$ as FeeCapTooHighError,aa as FeeCapTooLowError,f as FilterTypeNotSupportedError,ra as HttpRequestError,oa as InsufficientFundsError,sa as IntegerOutOfRangeError,ea as InternalRpcError,ta as IntrinsicGasTooHighError,ia as IntrinsicGasTooLowError,$r as InvalidAbiDecodingTypeError,ao as InvalidAbiEncodingTypeError,ro as InvalidAbiItemError,oo as InvalidAbiParametersError,so as InvalidAbiTypeParameterError,eo as InvalidAddressError,to as InvalidArrayError,na as InvalidBytesBooleanError,io as InvalidChainIdError,U as InvalidDecimalNumberError,no as InvalidDefinitionTypeError,Ws as InvalidDomainError,co as InvalidFunctionModifierError,ca as InvalidHexBooleanError,da as InvalidInputRpcError,Eo as InvalidLegacyVError,uo as InvalidModifierError,po as InvalidParameterError,Ea as InvalidParamsRpcError,lo as InvalidParenthesisError,Ks as InvalidPrimaryTypeError,ua as InvalidRequestRpcError,mo as InvalidSerializableTransactionError,go as InvalidSignatureError,To as InvalidStorageKeySizeError,ho as InvalidStructSignatureError,Zs as InvalidStructTypeError,pa as JsonRpcVersionUnsupportedError,la as LimitExceededRpcError,bo as MaxFeePerGasTooLowError,ma as MethodNotFoundRpcError,ga as MethodNotSupportedRpcError,Ta as NonceMaxValueError,ha as NonceTooHighError,ba as NonceTooLowError,fa as ParseRpcError,va as ProviderDisconnectedError,ya as ProviderRpcError,fo as RawContractError,Aa as ResourceNotFoundRpcError,Sa as ResourceUnavailableRpcError,Ia as RpcError,Fa as RpcRequestError,Ra as SizeExceedsPaddingSizeError,xa as SizeOverflowError,Ca as SliceOffsetOutOfBoundsError,vo as SolidityProtectedKeywordError,yo as StateAssignmentConflictError,Na as SwitchChainError,Ba as TimeoutError,Pa as TipAboveFeeCapError,Ao as TransactionExecutionError,So as TransactionNotFoundError,Io as TransactionReceiptNotFoundError,Da as TransactionRejectedRpcError,Ua as TransactionTypeNotSupportedError,wa as UnauthorizedProviderError,Ma as UnknownBundleIdError,Ha as UnknownNodeError,La as UnknownRpcError,Fo as UnknownSignatureError,Ro as UnknownTypeError,ka as UnsupportedChainIdError,za as UnsupportedNonOptionalCapabilityError,xo as UnsupportedPackedAbiType,qa as UnsupportedProviderMethodError,z as UrlRequiredError,Va as UserRejectedRequestError,v as WaitForCallsStatusTimeoutError,Co as WaitForTransactionReceiptTimeoutError,No as assertCurrentChain,Bo as assertRequest,le as assertTransactionEIP1559,me as assertTransactionEIP2930,ge as assertTransactionLegacy,Po as blobsToCommitments,Do as blobsToProofs,Oa as boolToBytes,Ga as boolToHex,Uo as bytesToBigInt,wo as bytesToBool,ja as bytesToHex,Mo as bytesToNumber,Ho as bytesToString,ne as ccipFetch,ce as ccipRequest,Lo as checksumAddress,ko as commitmentToVersionedHash,zo as commitmentsToVersionedHashes,qo as concat,Vo as concatBytes,Oo as concatHex,w as createClient,y as createNonceManager,r as createPublicClient,q as createTransport,M as custom,Go as decodeAbiParameters,jo as decodeErrorResult,Wo as decodeEventLog,se as decodeFunctionData,Ko as decodeFunctionResult,Zo as defineBlock,t as defineChain,Jo as defineTransaction,Qo as defineTransactionReceipt,Xo as defineTransactionRequest,Yo as deploylessCallViaBytecodeBytecode,_o as deploylessCallViaFactoryBytecode,$o as encodeAbiParameters,as as encodeDeployData,ee as encodeErrorResult,A as encodeEventTopics,rs as encodeFunctionData,te as encodeFunctionResult,S as encodePacked,Wa as erc20Abi,Ka as erc6492SignatureValidatorAbi,os as erc6492SignatureValidatorByteCode,I as ethAddress,Za as etherUnits,Te as extendSchema,V as fallback,ss as formatBlock,es as formatEther,Ja as formatGwei,ts as formatLog,is as formatTransaction,ns as formatTransactionReceipt,cs as formatTransactionRequest,Qa as formatUnits,Xa as fromHex,ds as getAbiItem,Es as getAddress,us as getChainContractAddress,ps as getContractError,ls as getEventSelector,ms as getEventSignature,gs as getFunctionSelector,Ts as getFunctionSignature,hs as getTransactionType,Js as getTypesForEIP712Domain,Ya as gweiUnits,Qs as hashDomain,Xs as hashMessage,Ys as hashStruct,_s as hashTypedData,_a as hexToBigInt,$a as hexToBool,ar as hexToBytes,rr as hexToNumber,F as hexToSignature,or as hexToString,s as http,bs as isAddress,fs as isAddressEqual,sr as isHex,vs as keccak256,R as labelhash,ys as maxUint16,As as maxUint256,er as multicall3Abi,x as namehash,tr as numberToBytes,ir as numberToHex,de as offchainLookup,Ee as offchainLookupAbiItem,ue as offchainLookupSignature,nr as pad,cr as padBytes,dr as padHex,Ss as parseAbi,he as parseAbiItem,be as parseAbiParameters,Is as parseEventLogs,C as parseSignature,H as parseUnits,Fs as prepareEncodeFunctionData,$s as presignMessagePrefix,N as publicActions,Rs as recoverAddress,xs as recoverPublicKey,Cs as rpcTransactionType,fe as serializeAccessList,B as serializeErc6492Signature,ve as serializeSignature,ye as serializeTransaction,Ns as sha256,O as shouldThrow,Ae as signatureToHex,Er as size,Bs as slice,Ps as sliceBytes,Ds as sliceHex,ur as stringToBytes,pr as stringToHex,lr as stringify,Us as toBlobSidecars,ws as toBlobs,mr as toBytes,Ms as toEventHash,Hs as toEventSelector,Ls as toEventSignature,ks as toFunctionHash,zs as toFunctionSelector,qs as toFunctionSignature,gr as toHex,ae as toPrefixedMessage,Vs as toRlp,Os as transactionType,Tr as trim,hr as universalSignatureValidatorAbi,Gs as universalSignatureValidatorByteCode,re as validateTypedData,L as withCache,G as withRetry,j as withTimeout,P as zeroAddress};
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DOnRCLNP.js","assets/index-Cu4ZjLNb.js","assets/index-829Uxa3Y.css","assets/parseEventLogs-D1xiFnCH.js","assets/NetworkUtil-DqGcuBfF.js","assets/sha2-D3ryOfi3.js","assets/sha256-D33fGSQc.js","assets/W3MFrameProviderSingleton-9eitOT0j.js","assets/index-DS2Lm9tG.js","assets/browser-ponyfill-BmgQyNz0.js","assets/custom-cPmISGcH.js","assets/store-DOLZnwHk.js","assets/writeContract-CCar3Ocq.js"])))=>i.map(i=>d[i]);
2
- import{w as We,a as Le,l as ve,C as S,o as qe,a5 as ye,F as x,a6 as K,A as D,Z as De,t as F,O as $,a7 as $e,e as Fe,p as He,b as te,a8 as Be,a9 as J,aa as j,L as ze,a3 as X,ab as Q,Q as Ie,ac as Ve}from"./W3MFrameProviderSingleton-9eitOT0j.js";import{ak as Ge,an as Ke,aa as Je,w as B,ae as oe,X as _,r as ae,ap as E,ax as ge,a3 as Xe}from"./NetworkUtil-DqGcuBfF.js";import{bg as Te,aI as L,cg as Qe,bc as Ye,b7 as Ze,ah as et}from"./parseEventLogs-D1xiFnCH.js";import"./index-DS2Lm9tG.js";import{g as tt,_ as ke}from"./index-Cu4ZjLNb.js";import"./browser-ponyfill-BmgQyNz0.js";import{c as nt}from"./store-DOLZnwHk.js";import{c as Oe,a as it,g as rt,b as ot,d as st,e as ct,p as at}from"./custom-cPmISGcH.js";import{A as dt,s as ut,w as lt}from"./writeContract-CCar3Ocq.js";async function ht(o,{account:e=o.account,message:t}){if(!e)throw new dt({docsPath:"/docs/actions/wallet/signMessage"});const n=Te(e);if(n.signMessage)return n.signMessage({message:t});const i=typeof t=="string"?Ge(t):t.raw instanceof Uint8Array?Ke(t.raw):t.raw;return o.request({method:"personal_sign",params:[i,n.address]},{retryCount:0})}function R(o,e,t){const n=o[e.name];if(typeof n=="function")return n;const i=o[t];return typeof i=="function"?i:c=>e(o,c)}const ne="3.4.11",ft=()=>`@wagmi/core@${ne}`;var Re=function(o,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!n:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(o):n?n.value:e.get(o)},se,Ue;class O extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return ft()}constructor(e,t={}){super(),se.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const n=t.cause instanceof O?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof O&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(`
3
- `),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return Re(this,se,"m",Ue).call(this,this,e)}}se=new WeakSet,Ue=function o(e,t){return t?.(e)?e:e.cause?Re(this,se,"m",o).call(this,e.cause,t):e};class z extends O{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class gt extends O{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class mt extends O{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class Ct extends O{constructor({address:e,connector:t}){super(`Account "${e}" not found for connector "${t.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class pt extends O{constructor({connectionChainId:e,connectorChainId:t}){super(`The current chain of the connector (id: ${t}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class wt extends O{constructor({connector:e}){super(`Connector "${e.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}async function de(o,e){let t;if(typeof e.connector=="function"?t=o._internal.connectors.setup(e.connector):t=e.connector,t.uid===o.state.current)throw new gt;try{o.setState(u=>({...u,status:"connecting"})),t.emitter.emit("message",{type:"connecting"});const{connector:n,...i}=e,c=await t.connect(i);return t.emitter.off("connect",o._internal.events.connect),t.emitter.on("change",o._internal.events.change),t.emitter.on("disconnect",o._internal.events.disconnect),await o.storage?.setItem("recentConnectorId",t.id),o.setState(u=>({...u,connections:new Map(u.connections).set(t.uid,{accounts:i.withCapabilities?c.accounts.map(d=>typeof d=="object"?d.address:d):c.accounts,chainId:c.chainId,connector:t}),current:t.uid,status:"connected"})),{accounts:i.withCapabilities?c.accounts.map(u=>typeof u=="object"?u:{address:u,capabilities:{}}):c.accounts,chainId:c.chainId}}catch(n){throw o.setState(i=>({...i,status:i.current?"connected":"disconnected"})),n}}async function G(o,e={}){const{assertChainId:t=!0}=e;let n;if(e.connector){const{connector:s}=e;if(o.state.status==="reconnecting"&&!s.getAccounts&&!s.getChainId)throw new wt({connector:s});const[l,h]=await Promise.all([s.getAccounts().catch(f=>{if(e.account===null)return[];throw f}),s.getChainId()]);n={accounts:l,chainId:h,connector:s}}else n=o.state.connections.get(o.state.current);if(!n)throw new mt;const i=e.chainId??n.chainId,c=await n.connector.getChainId();if(t&&c!==i)throw new pt({connectionChainId:i,connectorChainId:c});const u=n.connector;if(u.getClient)return u.getClient({chainId:i});const d=Te(e.account??n.accounts[0]);if(d&&(d.address=L(d.address)),e.account&&!n.accounts.some(s=>s.toLowerCase()===d.address.toLowerCase()))throw new Ct({address:d.address,connector:u});const a=o.chains.find(s=>s.id===i),r=await n.connector.getProvider({chainId:i});return Oe({account:d,chain:a,name:"Connector Client",transport:s=>it(r)({...s,retryCount:0})})}async function be(o,e={}){let t;if(e.connector)t=e.connector;else{const{connections:i,current:c}=o.state;t=i.get(c)?.connector}const n=o.state.connections;t&&(await t.disconnect(),t.emitter.off("change",o._internal.events.change),t.emitter.off("disconnect",o._internal.events.disconnect),t.emitter.on("connect",o._internal.events.connect),n.delete(t.uid)),o.setState(i=>{if(n.size===0)return{...i,connections:new Map,current:null,status:"disconnected"};const c=n.values().next().value;return{...i,connections:new Map(n),current:c.connector.uid}});{const i=o.state.current;if(!i)return;const c=o.state.connections.get(i)?.connector;if(!c)return;await o.storage?.setItem("recentConnectorId",c.id)}}async function vt(o,e){const{chainId:t,connector:n,...i}=e;let c;e.account?c=e.account:c=(await G(o,{account:e.account,assertChainId:!1,chainId:t,connector:n})).account;const u=o.getClient({chainId:t});return R(u,Qe,"estimateGas")({...i,account:c})}async function yt(o,e){const{address:t,blockNumber:n,blockTag:i,chainId:c}=e,u=o.getClient({chainId:c}),a=await R(u,rt,"getBalance")(n?{address:t,blockNumber:n}:{address:t,blockTag:i}),r=o.chains.find(s=>s.id===c)??u.chain;return{decimals:r.nativeCurrency.decimals,symbol:r.nativeCurrency.symbol,value:a}}function V(o,e){if(o===e)return!0;if(o&&e&&typeof o=="object"&&typeof e=="object"){if(o.constructor!==e.constructor)return!1;let t,n;if(Array.isArray(o)&&Array.isArray(e)){if(t=o.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!V(o[n],e[n]))return!1;return!0}if(typeof o.valueOf=="function"&&o.valueOf!==Object.prototype.valueOf)return o.valueOf()===e.valueOf();if(typeof o.toString=="function"&&o.toString!==Object.prototype.toString)return o.toString()===e.toString();const i=Object.keys(o);if(t=i.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!Object.hasOwn(e,i[n]))return!1;for(n=t;n--!==0;){const c=i[n];if(c&&!V(o[c],e[c]))return!1}return!0}return o!==o&&e!==e}function ie(o){const e=o.state.current,t=o.state.connections.get(e),n=t?.accounts,i=n?.[0],c=o.chains.find(d=>d.id===t?.chainId),u=o.state.status;switch(u){case"connected":return{address:i,addresses:n,chain:c,chainId:t?.chainId,connector:t?.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:u};case"reconnecting":return{address:i,addresses:n,chain:c,chainId:t?.chainId,connector:t?.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:u};case"connecting":return{address:i,addresses:n,chain:c,chainId:t?.chainId,connector:t?.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:u};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:u}}}let Y=[];function M(o){const e=[...o.state.connections.values()];return o.state.status==="reconnecting"||V(Y,e)?Y:(Y=e,e)}async function It(o,e){const{account:t,chainId:n,...i}=e;let c;t?c=t:c=(await G(o,{account:t,assertChainId:!1,chainId:n})).account;const u=o.getClient({chainId:n});return R(u,Ye,"prepareTransactionRequest")({...i,...c?{account:c}:{}})}let ue=!1;async function le(o,e={}){if(ue)return[];ue=!0,o.setState(r=>({...r,status:r.current?"reconnecting":"connecting"}));const t=[];if(e.connectors?.length)for(const r of e.connectors){let s;typeof r=="function"?s=o._internal.connectors.setup(r):s=r,t.push(s)}else t.push(...o.connectors);let n;try{n=await o.storage?.getItem("recentConnectorId")}catch{}const i={};for(const[,r]of o.state.connections)i[r.connector.id]=1;n&&(i[n]=0);const c=Object.keys(i).length>0?[...t].sort((r,s)=>(i[r.id]??10)-(i[s.id]??10)):t;let u=!1;const d=[],a=[];for(const r of c){const s=await r.getProvider().catch(()=>{});if(!s||a.some(f=>f===s)||!await r.isAuthorized())continue;const h=await r.connect({isReconnecting:!0}).catch(()=>null);h&&(r.emitter.off("connect",o._internal.events.connect),r.emitter.on("change",o._internal.events.change),r.emitter.on("disconnect",o._internal.events.disconnect),o.setState(f=>{const p=new Map(u?f.connections:new Map).set(r.uid,{accounts:h.accounts,chainId:h.chainId,connector:r});return{...f,current:u?f.current:r.uid,connections:p}}),d.push({accounts:h.accounts,chainId:h.chainId,connector:r}),a.push(s),u=!0)}return(o.state.status==="reconnecting"||o.state.status==="connecting")&&(u?o.setState(r=>({...r,status:"connected"})):o.setState(r=>({...r,connections:new Map,current:null,status:"disconnected"}))),ue=!1,d}async function bt(o,e){const{account:t,chainId:n,connector:i,...c}=e;let u;typeof t=="object"&&t?.type==="local"?u=o.getClient({chainId:n}):u=await G(o,{account:t??void 0,assertChainId:!1,chainId:n,connector:i});const d=!n||u.chain?.id===n?u.chain:{id:n};return await R(u,ut,"sendTransaction")({...c,...t?{account:t}:{},assertChainId:!!n,chain:d,gas:c.gas??void 0})}async function Et(o,e){const{account:t,connector:n,...i}=e;let c;return typeof t=="object"&&t.type==="local"?c=o.getClient():c=await G(o,{account:t,connector:n}),R(c,ht,"signMessage")({...i,...t?{account:t}:{}})}class W extends O{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class At extends O{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function Ee(o,e){const{addEthereumChainParameter:t,chainId:n}=e,i=o.state.connections.get(e.connector?.uid??o.state.current);if(i){const u=i.connector;if(!u.switchChain)throw new At({connector:u});return await u.switchChain({addEthereumChainParameter:t,chainId:n})}const c=o.chains.find(u=>u.id===n);if(!c)throw new z;return o.setState(u=>({...u,chainId:n})),c}async function Nt(o,e){const{chainId:t,timeout:n=0,...i}=e,c=o.getClient({chainId:t}),d=await R(c,ot,"waitForTransactionReceipt")({...i,timeout:n});if(d.status==="reverted"){const a=R(c,st,"getTransaction"),{from:r,...s}=await a({hash:d.transactionHash}),h=await R(c,Ze,"call")({...s,account:r,data:s.input,gasPrice:s.type!=="eip1559"?s.gasPrice:void 0,maxFeePerGas:s.type==="eip1559"?s.maxFeePerGas:void 0,maxPriorityFeePerGas:s.type==="eip1559"?s.maxPriorityFeePerGas:void 0}),f=h?.data?Je(`0x${h.data.substring(138)}`):"unknown reason";throw new Error(f)}return{...d,chainId:c.chain.id}}function _t(o,e){const{onChange:t}=e;return o.subscribe(()=>ie(o),t,{equalityFn(n,i){const{connector:c,...u}=n,{connector:d,...a}=i;return V(u,a)&&c?.id===d?.id&&c?.uid===d?.uid}})}function St(o,e){const{onChange:t}=e;return o.subscribe(()=>M(o),t,{equalityFn:V})}function Pt(o,e){const{onChange:t}=e;return o._internal.connectors.subscribe((n,i)=>{t(Object.values(n),i)})}function Tt(o,e){const{syncConnectedChain:t=o._internal.syncConnectedChain,...n}=e;let i;const c=a=>{i&&i();const r=o.getClient({chainId:a});return i=R(r,ct,"watchPendingTransactions")(n),i},u=c(e.chainId);let d;return t&&!e.chainId&&(d=o.subscribe(({chainId:a})=>a,async a=>c(a))),()=>{u?.(),d?.()}}async function kt(o,e){const{account:t,chainId:n,connector:i,...c}=e;let u;typeof t=="object"&&t?.type==="local"?u=o.getClient({chainId:n}):u=await G(o,{account:t??void 0,assertChainId:!1,chainId:n,connector:i});const d=!n||u.chain?.id===n?u.chain:{id:n};return await R(u,lt,"writeContract")({...c,...t?{account:t}:{},assertChainId:!!n,chain:d})}function un(o){return o}ce.type="injected";function ce(o={}){const{shimDisconnect:e=!0,unstable_shimAsyncInject:t}=o;function n(){const a=o.target;if(typeof a=="function"){const r=a();if(r)return r}return typeof a=="object"?a:typeof a=="string"?{...Ot[a]??{id:a,name:`${a[0].toUpperCase()}${a.slice(1)}`,provider:`is${a[0].toUpperCase()}${a.slice(1)}`}}:{id:"injected",name:"Injected",provider(r){return r?.ethereum}}}let i,c,u,d;return a=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},type:ce.type,async setup(){const r=await this.getProvider();r?.on&&o.target&&(u||(u=this.onConnect.bind(this),r.on("connect",u)),i||(i=this.onAccountsChanged.bind(this),r.on("accountsChanged",i)))},async connect({chainId:r,isReconnecting:s,withCapabilities:l}={}){const h=await this.getProvider();if(!h)throw new W;let f=[];if(s)f=await this.getAccounts().catch(()=>[]);else if(e)try{f=(await h.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0]?.caveats?.[0]?.value?.map(C=>L(C)),f.length>0&&(f=await this.getAccounts())}catch(p){const C=p;if(C.code===_.code)throw new _(C);if(C.code===ae.code)throw C}try{!f?.length&&!s&&(f=(await h.request({method:"eth_requestAccounts"})).map(g=>L(g))),u&&(h.removeListener("connect",u),u=void 0),i||(i=this.onAccountsChanged.bind(this),h.on("accountsChanged",i)),c||(c=this.onChainChanged.bind(this),h.on("chainChanged",c)),d||(d=this.onDisconnect.bind(this),h.on("disconnect",d));let p=await this.getChainId();return r&&p!==r&&(p=(await this.switchChain({chainId:r}).catch(g=>{if(g.code===_.code)throw g;return{id:p}}))?.id??p),e&&await a.storage?.removeItem(`${this.id}.disconnected`),o.target||await a.storage?.setItem("injected.connected",!0),{accounts:l?f.map(C=>({address:C,capabilities:{}})):f,chainId:p}}catch(p){const C=p;throw C.code===_.code?new _(C):C.code===ae.code?new ae(C):C}},async disconnect(){const r=await this.getProvider();if(!r)throw new W;c&&(r.removeListener("chainChanged",c),c=void 0),d&&(r.removeListener("disconnect",d),d=void 0),u||(u=this.onConnect.bind(this),r.on("connect",u));try{await Le(()=>r.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}e&&await a.storage?.setItem(`${this.id}.disconnected`,!0),o.target||await a.storage?.removeItem("injected.connected")},async getAccounts(){const r=await this.getProvider();if(!r)throw new W;return(await r.request({method:"eth_accounts"})).map(l=>L(l))},async getChainId(){const r=await this.getProvider();if(!r)throw new W;const s=await r.request({method:"eth_chainId"});return Number(s)},async getProvider(){if(typeof window>"u")return;let r;const s=n();return typeof s.provider=="function"?r=s.provider(window):typeof s.provider=="string"?r=re(window,s.provider):r=s.provider,r&&!r.removeListener&&("off"in r&&typeof r.off=="function"?r.removeListener=r.off:r.removeListener=()=>{}),r},async isAuthorized(){try{if(e&&await a.storage?.getItem(`${this.id}.disconnected`)||!o.target&&!await a.storage?.getItem("injected.connected"))return!1;if(!await this.getProvider()){if(t!==void 0&&t!==!1){const h=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",h),!!await this.getProvider()),f=typeof t=="number"?t:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(C=>window.addEventListener("ethereum#initialized",()=>C(h()),{once:!0}))]:[],new Promise(C=>setTimeout(()=>C(h()),f))]))return!0}throw new W}return!!(await We(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:r,chainId:s}){const l=await this.getProvider();if(!l)throw new W;const h=a.chains.find(p=>p.id===s);if(!h)throw new B(new z);const f=new Promise(p=>{const C=(g=>{"chainId"in g&&g.chainId===s&&(a.emitter.off("change",C),p())});a.emitter.on("change",C)});try{return await Promise.all([l.request({method:"wallet_switchEthereumChain",params:[{chainId:oe(s)}]}).then(async()=>{await this.getChainId()===s&&a.emitter.emit("change",{chainId:s})}),f]),h}catch(p){const C=p;if(C.code===4902||C?.data?.originalError?.code===4902)try{const{default:g,...N}=h.blockExplorers??{};let b;r?.blockExplorerUrls?b=r.blockExplorerUrls:g&&(b=[g.url,...Object.values(N).map(m=>m.url)]);let y;r?.rpcUrls?.length?y=r.rpcUrls:y=[h.rpcUrls.default?.http[0]??""];const P={blockExplorerUrls:b,chainId:oe(s),chainName:r?.chainName??h.name,iconUrls:r?.iconUrls,nativeCurrency:r?.nativeCurrency??h.nativeCurrency,rpcUrls:y};return await Promise.all([l.request({method:"wallet_addEthereumChain",params:[P]}).then(async()=>{if(await this.getChainId()===s)a.emitter.emit("change",{chainId:s});else throw new _(new Error("User rejected switch after adding network."))}),f]),h}catch(g){throw new _(g)}throw C.code===_.code?new _(C):new B(C)}},async onAccountsChanged(r){if(r.length===0)this.onDisconnect();else if(a.emitter.listenerCount("connect")){const s=(await this.getChainId()).toString();this.onConnect({chainId:s}),e&&await a.storage?.removeItem(`${this.id}.disconnected`)}else a.emitter.emit("change",{accounts:r.map(s=>L(s))})},onChainChanged(r){const s=Number(r);a.emitter.emit("change",{chainId:s})},async onConnect(r){const s=await this.getAccounts();if(s.length===0)return;const l=Number(r.chainId);a.emitter.emit("connect",{accounts:s,chainId:l});const h=await this.getProvider();h&&(u&&(h.removeListener("connect",u),u=void 0),i||(i=this.onAccountsChanged.bind(this),h.on("accountsChanged",i)),c||(c=this.onChainChanged.bind(this),h.on("chainChanged",c)),d||(d=this.onDisconnect.bind(this),h.on("disconnect",d)))},async onDisconnect(r){const s=await this.getProvider();r&&r.code===1013&&s&&(await this.getAccounts()).length||(a.emitter.emit("disconnect"),s&&(c&&(s.removeListener("chainChanged",c),c=void 0),d&&(s.removeListener("disconnect",d),d=void 0),u||(u=this.onConnect.bind(this),s.on("connect",u))))}})}const Ot={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(o){return o?.coinbaseWalletExtension?o.coinbaseWalletExtension:re(o,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(o){return re(o,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;const t=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const n of t)if(e[n])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(o){return o?.phantom?.ethereum?o.phantom?.ethereum:re(o,"isPhantom")}}};function re(o,e){function t(i){return typeof e=="function"?e(i):typeof e=="string"?i[e]:!0}const n=o.ethereum;if(n?.providers)return n.providers.find(i=>t(i));if(n&&t(n))return n}const Rt=o=>(e,t,n)=>{const i=n.subscribe;return n.subscribe=(u,d,a)=>{let r=u;if(d){const s=a?.equalityFn||Object.is;let l=u(n.getState());r=h=>{const f=u(h);if(!s(l,f)){const p=l;d(l=f,p)}},a?.fireImmediately&&d(l,l)}return i(r)},o(e,t,n)},Ut=Rt;function jt(o,e){let t;try{t=o()}catch{return}return{getItem:i=>{var c;const u=a=>a===null?null:JSON.parse(a,void 0),d=(c=t.getItem(i))!=null?c:null;return d instanceof Promise?d.then(u):u(d)},setItem:(i,c)=>t.setItem(i,JSON.stringify(c,void 0)),removeItem:i=>t.removeItem(i)}}const me=o=>e=>{try{const t=o(e);return t instanceof Promise?t:{then(n){return me(n)(t)},catch(n){return this}}}catch(t){return{then(n){return this},catch(n){return me(n)(t)}}}},Mt=(o,e)=>(t,n,i)=>{let c={storage:jt(()=>localStorage),partialize:C=>C,version:0,merge:(C,g)=>({...g,...C}),...e},u=!1;const d=new Set,a=new Set;let r=c.storage;if(!r)return o((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),t(...C)},n,i);const s=()=>{const C=c.partialize({...n()});return r.setItem(c.name,{state:C,version:c.version})},l=i.setState;i.setState=(C,g)=>{l(C,g),s()};const h=o((...C)=>{t(...C),s()},n,i);i.getInitialState=()=>h;let f;const p=()=>{var C,g;if(!r)return;u=!1,d.forEach(b=>{var y;return b((y=n())!=null?y:h)});const N=((g=c.onRehydrateStorage)==null?void 0:g.call(c,(C=n())!=null?C:h))||void 0;return me(r.getItem.bind(r))(c.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==c.version){if(c.migrate)return[!0,c.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var y;const[P,m]=b;if(f=c.merge(m,(y=n())!=null?y:h),t(f,!0),P)return s()}).then(()=>{N?.(f,void 0),f=n(),u=!0,a.forEach(b=>b(f))}).catch(b=>{N?.(void 0,b)})};return i.persist={setOptions:C=>{c={...c,...C},C.storage&&(r=C.storage)},clearStorage:()=>{r?.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>p(),hasHydrated:()=>u,onHydrate:C=>(d.add(C),()=>{d.delete(C)}),onFinishHydration:C=>(a.add(C),()=>{a.delete(C)})},c.skipHydration||p(),f||h},xt=Mt,Ae=o=>{let e;const t=new Set,n=(r,s)=>{const l=typeof r=="function"?r(e):r;if(!Object.is(l,e)){const h=e;e=s??(typeof l!="object"||l===null)?l:Object.assign({},e,l),t.forEach(f=>f(e,h))}},i=()=>e,d={setState:n,getState:i,getInitialState:()=>a,subscribe:r=>(t.add(r),()=>t.delete(r))},a=e=o(n,i,d);return d},he=o=>o?Ae(o):Ae;var fe={exports:{}},Ne;function Wt(){return Ne||(Ne=1,(function(o){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function i(a,r,s){this.fn=a,this.context=r,this.once=s||!1}function c(a,r,s,l,h){if(typeof s!="function")throw new TypeError("The listener must be a function");var f=new i(s,l||a,h),p=t?t+r:r;return a._events[p]?a._events[p].fn?a._events[p]=[a._events[p],f]:a._events[p].push(f):(a._events[p]=f,a._eventsCount++),a}function u(a,r){--a._eventsCount===0?a._events=new n:delete a._events[r]}function d(){this._events=new n,this._eventsCount=0}d.prototype.eventNames=function(){var r=[],s,l;if(this._eventsCount===0)return r;for(l in s=this._events)e.call(s,l)&&r.push(t?l.slice(1):l);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(s)):r},d.prototype.listeners=function(r){var s=t?t+r:r,l=this._events[s];if(!l)return[];if(l.fn)return[l.fn];for(var h=0,f=l.length,p=new Array(f);h<f;h++)p[h]=l[h].fn;return p},d.prototype.listenerCount=function(r){var s=t?t+r:r,l=this._events[s];return l?l.fn?1:l.length:0},d.prototype.emit=function(r,s,l,h,f,p){var C=t?t+r:r;if(!this._events[C])return!1;var g=this._events[C],N=arguments.length,b,y;if(g.fn){switch(g.once&&this.removeListener(r,g.fn,void 0,!0),N){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,s),!0;case 3:return g.fn.call(g.context,s,l),!0;case 4:return g.fn.call(g.context,s,l,h),!0;case 5:return g.fn.call(g.context,s,l,h,f),!0;case 6:return g.fn.call(g.context,s,l,h,f,p),!0}for(y=1,b=new Array(N-1);y<N;y++)b[y-1]=arguments[y];g.fn.apply(g.context,b)}else{var P=g.length,m;for(y=0;y<P;y++)switch(g[y].once&&this.removeListener(r,g[y].fn,void 0,!0),N){case 1:g[y].fn.call(g[y].context);break;case 2:g[y].fn.call(g[y].context,s);break;case 3:g[y].fn.call(g[y].context,s,l);break;case 4:g[y].fn.call(g[y].context,s,l,h);break;default:if(!b)for(m=1,b=new Array(N-1);m<N;m++)b[m-1]=arguments[m];g[y].fn.apply(g[y].context,b)}}return!0},d.prototype.on=function(r,s,l){return c(this,r,s,l,!1)},d.prototype.once=function(r,s,l){return c(this,r,s,l,!0)},d.prototype.removeListener=function(r,s,l,h){var f=t?t+r:r;if(!this._events[f])return this;if(!s)return u(this,f),this;var p=this._events[f];if(p.fn)p.fn===s&&(!h||p.once)&&(!l||p.context===l)&&u(this,f);else{for(var C=0,g=[],N=p.length;C<N;C++)(p[C].fn!==s||h&&!p[C].once||l&&p[C].context!==l)&&g.push(p[C]);g.length?this._events[f]=g.length===1?g[0]:g:u(this,f)}return this},d.prototype.removeAllListeners=function(r){var s;return r?(s=t?t+r:r,this._events[s]&&u(this,s)):(this._events=new n,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=t,d.EventEmitter=d,o.exports=d})(fe)),fe.exports}var Lt=Wt();const qt=tt(Lt);class Dt{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new qt})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,...t){const n=t[0];this._emitter.emit(e,{uid:this.uid,...n})}listenerCount(e){return this._emitter.listenerCount(e)}}function $t(o){return new Dt(o)}function Ft(o,e){return JSON.parse(o,(t,n)=>{let i=n;return i?.__type==="bigint"&&(i=BigInt(i.value)),i?.__type==="Map"&&(i=new Map(i.value)),e?.(t,i)??i})}function _e(o,e){return o.slice(0,e).join(".")||"."}function Se(o,e){const{length:t}=o;for(let n=0;n<t;++n)if(o[n]===e)return n+1;return 0}function Ht(o,e){const t=typeof o=="function",n=typeof e=="function",i=[],c=[];return function(d,a){if(typeof a=="object")if(i.length){const r=Se(i,this);r===0?i[i.length]=this:(i.splice(r),c.splice(r)),c[c.length]=d;const s=Se(i,a);if(s!==0)return n?e.call(this,d,a,_e(c,s)):`[ref=${_e(c,s)}]`}else i[0]=a,c[0]=d;return t?o.call(this,d,a):a}}function Bt(o,e,t,n){return JSON.stringify(o,Ht((i,c)=>{let u=c;return typeof u=="bigint"&&(u={__type:"bigint",value:c.toString()}),u instanceof Map&&(u={__type:"Map",value:Array.from(c.entries())}),e?.(i,u)??u},n),t??void 0)}function zt(o){const{deserialize:e=Ft,key:t="wagmi",serialize:n=Bt,storage:i=je}=o;function c(u){return u instanceof Promise?u.then(d=>d).catch(()=>null):u}return{...i,key:t,async getItem(u,d){const a=i.getItem(`${t}.${u}`),r=await c(a);return r?e(r)??null:d??null},async setItem(u,d){const a=`${t}.${u}`;d===null?await c(i.removeItem(a)):await c(i.setItem(a,n(d)))},async removeItem(u){await c(i.removeItem(`${t}.${u}`))}}}const je={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function Vt(){const o=typeof window<"u"&&window.localStorage?window.localStorage:je;return{getItem(e){return o.getItem(e)},removeItem(e){o.removeItem(e)},setItem(e,t){try{o.setItem(e,t)}catch{}}}}const Ce=256;let Z=Ce,ee;function Gt(o=11){if(!ee||Z+o>Ce*2){ee="",Z=0;for(let e=0;e<Ce;e++)ee+=(256+Math.random()*256|0).toString(16).substring(1)}return ee.substring(Z,Z+++o)}function Kt(o){const{multiInjectedProviderDiscovery:e=!0,storage:t=zt({storage:Vt()}),syncConnectedChain:n=!0,ssr:i=!1,...c}=o,u=typeof window<"u"&&e?nt():void 0,d=he(()=>c.chains),a=he(()=>{const m=[],w=new Set;for(const v of c.connectors??[]){const A=r(v);if(m.push(A),!i&&A.rdns){const I=typeof A.rdns=="string"?[A.rdns]:A.rdns;for(const T of I)w.add(T)}}if(!i&&u){const v=u.getProviders();for(const A of v)w.has(A.info.rdns)||m.push(r(s(A)))}return m});function r(m){const w=$t(Gt()),v={...m({emitter:w,chains:d.getState(),storage:t,transports:c.transports}),emitter:w,uid:w.uid};return w.on("connect",y),v.setup?.(),v}function s(m){const{info:w}=m,v=m.provider;return ce({target:{...w,id:w.rdns,provider:v}})}const l=new Map;function h(m={}){const w=m.chainId??g.getState().chainId,v=d.getState().find(I=>I.id===w);if(m.chainId&&!v)throw new z;{const I=l.get(g.getState().chainId);if(I&&!v)return I;if(!v)throw new z}{const I=l.get(w);if(I)return I}let A;if(c.client)A=c.client({chain:v});else{const I=v.id,T=d.getState().map(k=>k.id),U={},we=Object.entries(c);for(const[k,q]of we)if(!(k==="chains"||k==="client"||k==="connectors"||k==="transports"))if(typeof q=="object")if(I in q)U[k]=q[I];else{if(T.some(xe=>xe in q))continue;U[k]=q}else U[k]=q;A=Oe({...U,chain:v,batch:U.batch??{multicall:!0},transport:k=>c.transports[I]({...k,connectors:a})})}return l.set(w,A),A}function f(){return{chainId:d.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let p;const C="0.0.0-canary-";ne.startsWith(C)?p=Number.parseInt(ne.replace(C,""),10):p=Number.parseInt(ne.split(".")[0]??"0",10);const g=he(Ut(t?xt(f,{migrate(m,w){if(w===p)return m;const v=f(),A=N(m,v.chainId);return{...v,chainId:A}},name:"store",partialize(m){return{connections:{__type:"Map",value:Array.from(m.connections.entries()).map(([w,v])=>{const{id:A,name:I,type:T,uid:U}=v.connector;return[w,{...v,connector:{id:A,name:I,type:T,uid:U}}]})},chainId:m.chainId,current:m.current}},merge(m,w){typeof m=="object"&&m&&"status"in m&&delete m.status;const v=N(m,w.chainId);return{...w,...m,chainId:v}},skipHydration:i,storage:t,version:p}):f));g.setState(f());function N(m,w){return m&&typeof m=="object"&&"chainId"in m&&typeof m.chainId=="number"&&d.getState().some(v=>v.id===m.chainId)?m.chainId:w}n&&g.subscribe(({connections:m,current:w})=>w?m.get(w)?.chainId:void 0,m=>{if(d.getState().some(v=>v.id===m))return g.setState(v=>({...v,chainId:m??v.chainId}))}),u?.subscribe(m=>{const w=new Set,v=new Set;for(const I of a.getState())if(w.add(I.id),I.rdns){const T=typeof I.rdns=="string"?[I.rdns]:I.rdns;for(const U of T)v.add(U)}const A=[];for(const I of m){if(v.has(I.info.rdns))continue;const T=r(s(I));w.has(T.id)||A.push(T)}t&&!g.persist.hasHydrated()||a.setState(I=>[...I,...A],!0)});function b(m){g.setState(w=>{const v=w.connections.get(m.uid);return v?{...w,connections:new Map(w.connections).set(m.uid,{accounts:m.accounts??v.accounts,chainId:m.chainId??v.chainId,connector:v.connector})}:w})}function y(m){g.getState().status==="connecting"||g.getState().status==="reconnecting"||g.setState(w=>{const v=a.getState().find(A=>A.uid===m.uid);return v?(v.emitter.listenerCount("connect")&&v.emitter.off("connect",b),v.emitter.listenerCount("change")||v.emitter.on("change",b),v.emitter.listenerCount("disconnect")||v.emitter.on("disconnect",P),{...w,connections:new Map(w.connections).set(m.uid,{accounts:m.accounts,chainId:m.chainId,connector:v}),current:m.uid,status:"connected"}):w})}function P(m){g.setState(w=>{const v=w.connections.get(m.uid);if(v){const I=v.connector;I.emitter.listenerCount("change")&&v.connector.emitter.off("change",b),I.emitter.listenerCount("disconnect")&&v.connector.emitter.off("disconnect",P),I.emitter.listenerCount("connect")||v.connector.emitter.on("connect",y)}if(w.connections.delete(m.uid),w.connections.size===0)return{...w,connections:new Map,current:null,status:"disconnected"};const A=w.connections.values().next().value;return{...w,connections:new Map(w.connections),current:A.connector.uid}})}return{get chains(){return d.getState()},get connectors(){return a.getState()},storage:t,getClient:h,get state(){return g.getState()},setState(m){let w;typeof m=="function"?w=m(g.getState()):w=m;const v=f();typeof w!="object"&&(w=v),Object.keys(v).some(I=>!(I in w))&&(w=v),g.setState(w,!0)},subscribe(m,w,v){return g.subscribe(m,w,v?{...v,fireImmediately:v.emitImmediately}:void 0)},_internal:{mipd:u,async revalidate(){const m=g.getState(),w=m.connections;let v=m.current;for(const[,A]of w){const I=A.connector;I.isAuthorized&&await I.isAuthorized()||(w.delete(I.uid),v===I.uid&&(v=null))}g.setState(A=>({...A,connections:w,current:v}))},store:g,ssr:!!i,syncConnectedChain:n,transports:c.transports,chains:{setState(m){const w=typeof m=="function"?m(d.getState()):m;if(w.length!==0)return d.setState(w,!0)},subscribe(m){return d.subscribe(m)}},connectors:{providerDetailToConnector:s,setup:r,setState(m){return a.setState(typeof m=="function"?m(a.getState()):m,!0)},subscribe(m){return a.subscribe(m)}},events:{change:b,connect:y,disconnect:P}}}}function Me(o){let e=[],t,n;function i(d){const a=S.getCaipNetworks(E.CHAIN.EVM);let r=Number(ge.parseEvmChainId(d));if(!a.some(s=>String(s.id)===String(d))){const s=S.getActiveCaipNetwork(E.CHAIN.EVM)?.id||a[0]?.id;s&&Number.isInteger(Number(s))&&(r=Number(s))}if(!r)throw new Error("ChainId not found in networks");return r}function c(){return t||(t=ye.getInstance({projectId:o.options.projectId,chainId:K()?.caipNetworkId,enableLogger:o.options.enableAuthLogger,onTimeout:d=>{d==="iframe_load_failed"?D.open(x.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):d==="iframe_request_timeout"?D.open(x.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):d==="unverified_domain"&&D.open(x.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},abortController:x.EmbeddedWalletAbortController,getActiveCaipNetwork:d=>K(d),getCaipNetworks:d=>S.getCaipNetworks(d)})),t}async function u(d={}){const a=c();let r=d.chainId;if(d.isReconnecting){const C=ge.parseEvmChainId(a.getLastUsedChainId()||""),g=o.chains?.[0].id;if(r=C||g,!r)throw new Error("ChainId not found in provider")}const s=ve("eip155"),{address:l,chainId:h,accounts:f}=await De.authConnectorAuthenticate({authConnector:a,chainId:r,preferredAccountType:s,socialUri:d.socialUri,chainNamespace:E.CHAIN.EVM});e=f?.map(C=>C.address)||[l];const p=i(h);return{accounts:e,account:l,chainId:p,chain:{id:p,unsupported:!1}}}return d=>({id:E.CONNECTOR_ID.AUTH,name:E.CONNECTOR_NAMES.AUTH,type:"AUTH",chain:E.CHAIN.EVM,async connect(a={}){if(n){const s=await n;return{accounts:a.withCapabilities?s.accounts.map(l=>({address:l,capabilities:{}})):s.accounts,chainId:s.chainId}}n||(n=new Promise(s=>{s(u(a))}));const r=await n;return n=void 0,{accounts:a.withCapabilities?r.accounts.map(s=>({address:s,capabilities:{}})):r.accounts,chainId:r.chainId}},async disconnect(){await(await this.getProvider()).disconnect()},getAccounts(){return e?.length?(d.emitter.emit("change",{accounts:e}),Promise.resolve(e)):Promise.resolve([])},async getProvider(){return this.provider||(this.provider=ye.getInstance({projectId:o.options.projectId,chainId:K()?.caipNetworkId,enableLogger:o.options.enableAuthLogger,abortController:x.EmbeddedWalletAbortController,onTimeout:a=>{a==="iframe_load_failed"?D.open(x.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):a==="iframe_request_timeout"?D.open(x.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):a==="unverified_domain"&&D.open(x.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},getActiveCaipNetwork:a=>K(a),getCaipNetworks:a=>S.getCaipNetworks(a)})),Promise.resolve(this.provider)},async getChainId(){const a=await this.getProvider(),{chainId:r}=await a.getChainId();return i(r)},async isAuthorized(){const r=S.state.activeChain===E.CHAIN.EVM;if(E.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(h=>qe.getConnectorId(h)===E.CONNECTOR_ID.AUTH)&&!r)return!1;const l=await this.getProvider();return Promise.resolve(l.getLoginEmailUsed())},async switchChain({chainId:a}){try{const r=d.chains.find(f=>f.id===a);if(!r)throw new B(new Error("chain not found on connector."));const s=await this.getProvider(),l=ve("eip155"),h=await s.connect({chainId:a,preferredAccountType:l});return e=h?.accounts?.map(f=>f.address)||[h.address],d.emitter.emit("change",{chainId:Number(a),accounts:e}),r}catch(r){throw r instanceof Error?new B(r):r}},onAccountsChanged(a){a.length===0?this.onDisconnect():d.emitter.emit("change",{accounts:a.map(L)})},onChainChanged(a){const r=Number(a);d.emitter.emit("change",{chainId:r})},async onDisconnect(a){await(await this.getProvider()).disconnect()}})}pe.type="walletConnect";function pe(o){const e=o.isNewChainsStale??!0;let t,n,i,c,u,d,a;return r=>({id:"walletConnect",name:"WalletConnect",type:pe.type,provider:o.universalProvider,async setup(){const s=await this.getProvider().catch(()=>null);s&&(c||(c=this.onConnect.bind(this),s.on("connect",c)),d||(d=this.onSessionDelete.bind(this),s.on("session_delete",d)))},async connect({...s}={}){try{const l=S.getCaipNetworks(),h=await this.getProvider();if(!h)throw new W;u||(u=this.onDisplayUri,h.on("display_uri",u));const f=await this.isChainsStale();h.session&&f&&await h.disconnect();const p=$.state.universalProviderConfigOverride;if(!h.session||f){const m=$e.createNamespaces(l,p);await h.connect({optionalNamespaces:m,..."pairingTopic"in s?{pairingTopic:s.pairingTopic}:{}}),this.setRequestedChainsIds(l.map(w=>Number(w.id)))}const C=await this.getAccounts(),g=await this.getChainId(),N=h.session?.namespaces?.eip155?.chains,b=N?.some(m=>Number(m.split(":")[1])===g);let y=1;b?y=g:N?.[0]&&(y=Number(N[0].split(":")[1])),u&&(h.removeListener("display_uri",u),u=void 0),c&&(h.removeListener("connect",c),c=void 0),n||(n=this.onAccountsChanged.bind(this),h.on("accountsChanged",n)),i||(i=this.onChainChanged.bind(this),h.on("chainChanged",i)),a||(a=this.onDisconnect.bind(this),h.on("disconnect",a)),d||(d=this.onSessionDelete.bind(this),h.on("session_delete",d));const P=p?.defaultChain;return h.setDefaultChain(P??`eip155:${y}`),{accounts:C,chainId:y}}catch(l){throw/(user rejected|connection request reset)/i.test(l?.message)?new _(l):l}},async disconnect(){const s=await this.getProvider();try{await s?.disconnect()}catch(l){if(!/No matching key/i.test(l.message))throw l}finally{i&&(s?.removeListener("chainChanged",i),i=void 0),a&&(s?.removeListener("disconnect",a),a=void 0),c||(c=this.onConnect.bind(this),s?.on("connect",c)),n&&(s?.removeListener("accountsChanged",n),n=void 0),d&&(s?.removeListener("session_delete",d),d=void 0),this.setRequestedChainsIds([])}},async getAccounts(){const s=await this.getProvider();if(!s?.session?.namespaces)return[];const h=s?.session?.namespaces[E.CHAIN.EVM]?.accounts?.map(C=>C.split(":")[2])??[],f=new Set;return h.filter(C=>{const g=C?.toLowerCase();return f.has(g)?!1:(f.add(g),!0)})},async getProvider({chainId:s}={}){t||(t=o.universalProvider,t?.events.setMaxListeners(Number.POSITIVE_INFINITY));const l=F.getActiveNamespace(),h=S.getActiveCaipNetwork()?.id;if(s&&h!==s&&l){const f=F.getStoredActiveCaipNetworkId(),C=(l?S.getCaipNetworks(l):[])?.find(g=>g.id===f);C&&C.chainNamespace===E.CHAIN.EVM&&await this.switchChain?.({chainId:Number(C.id)})}return t},async getChainId(){const s=S.getActiveCaipNetwork(E.CHAIN.EVM)?.id;if(s)return s;const h=(await this.getProvider()).session?.namespaces[E.CHAIN.EVM]?.chains?.[0];return S.getCaipNetworks().find(p=>p.id===h)?.id},async isAuthorized(){try{const[s,l]=await Promise.all([this.getAccounts(),this.getProvider()]);return s.length?await this.isChainsStale()&&l.session?(await l.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:s,chainId:l}){const h=await this.getProvider();if(!h)throw new W;const f=S.getCaipNetworks().find(p=>p.id===l);if(!f)throw new B(new z);try{await h.request({method:"wallet_switchEthereumChain",params:[{chainId:oe(l)}]}),f?.caipNetworkId&&h.setDefaultChain(f?.caipNetworkId),r.emitter.emit("change",{chainId:Number(l)});const p=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...p,l]),{...f,id:f.id}}catch(p){const C=p;if(/(?:user rejected)/iu.test(C.message))throw new _(C);try{let g;s?.blockExplorerUrls?g=s.blockExplorerUrls:g=f.blockExplorers?.default.url?[f.blockExplorers?.default.url]:[];const N=f.rpcUrls?.chainDefault?.http||[],b={blockExplorerUrls:g,chainId:oe(l),chainName:f.name,iconUrls:s?.iconUrls,nativeCurrency:f.nativeCurrency,rpcUrls:N};await h.request({method:"wallet_addEthereumChain",params:[b]});const y=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...y,l]),{...f,id:f.id}}catch(g){throw new _(g)}}},onAccountsChanged(s){s.length===0?this.onDisconnect():r.emitter.emit("change",{accounts:s.map(l=>L(l))})},onChainChanged(s){const l=Number(s);r.emitter.emit("change",{chainId:l})},onConnect(s){this.setRequestedChainsIds(S.getCaipNetworks().map(l=>Number(l.id)))},async onDisconnect(s){this.setRequestedChainsIds([]),r.emitter.emit("disconnect");const l=await this.getProvider();n&&(l.removeListener("accountsChanged",n),n=void 0),i&&(l.removeListener("chainChanged",i),i=void 0),a&&(l.removeListener("disconnect",a),a=void 0),d&&(l.removeListener("session_delete",d),d=void 0),c||(c=this.onConnect.bind(this),l.on("connect",c))},onDisplayUri(s){r.emitter.emit("message",{type:"display_uri",data:s})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){return t?.session?.namespaces?t?.session?.namespaces[E.CHAIN.EVM]?.accounts?.map(h=>Number.parseInt(h.split(":")[1]??""))??[]:[]},async getRequestedChainsIds(){const s=await r.storage?.getItem(this.requestedChainsStorageKey)??[];return[...new Set(s)]},async isChainsStale(){if(!e)return!1;const s=r.chains.map(f=>f.id),l=this.getNamespaceChainsIds();if(l.length&&!l.some(f=>s.includes(f)))return!1;const h=await this.getRequestedChainsIds();return!s.every(f=>h.includes(Number(f)))},async setRequestedChainsIds(s){await r.storage?.setItem(this.requestedChainsStorageKey,s)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}const H=He({pendingTransactions:0}),Pe={state:H,subscribeKey(o,e){return Fe(H,o,e)},increase(o){H[o]+=1},decrease(o){H[o]-=1},reset(o){H[o]=0}};async function Jt(o){if(te.isSafeApp()){const{safe:e}=await ke(async()=>{const{safe:t}=await import("./index-DOnRCLNP.js");return{safe:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]));if(e&&!o.some(t=>t.type==="safe"))return e()}return null}async function Xt(o){try{const{baseAccount:e}=await ke(async()=>{const{baseAccount:t}=await import("./index-DOnRCLNP.js");return{baseAccount:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]));if(e&&!o.some(t=>t.id==="baseAccount"))return e()}catch(e){console.error("Failed to import Coinbase Wallet SDK:",e)}return null}const Qt={enable:!1,pollingInterval:3e4};class Yt extends Be{constructor(e){const t=J.extendCaipNetworks(e.networks,{projectId:e.projectId,customNetworkImageUrls:{},customRpcUrls:e.customRpcUrls});super(),this.balancePromises={},this.namespace=E.CHAIN.EVM,this.adapterType=E.ADAPTER_TYPES.WAGMI,this.projectId=e.projectId,this.pendingTransactionsFilter={...Qt,...e.pendingTransactionsFilter??{}},this.createConfig({...e,networks:t}),this.checkChainId()}construct(e){this.checkChainId(),this.setupWatchers()}async getAccounts(e){const t=this.getWagmiConnector(e.id);if(!t)return{accounts:[]};if(t.id===E.CONNECTOR_ID.AUTH){const u=await t.getProvider();if(!u?.user)return{accounts:[]};const{address:d,accounts:a,chainId:r}=u.user;return Promise.resolve({accounts:(a||[{address:d,type:"eoa"}]).map(s=>te.createAccount({caipAddress:`eip155:${r}:${s.address}`,type:s.type}))})}const{addresses:n,address:i,chainId:c}=ie(this.wagmiConfig);return Promise.resolve({accounts:c?[...new Set(n||[i])].map(u=>te.createAccount({caipAddress:`eip155:${c}:${u||""}`,type:"eoa"})):[]})}checkChainId(){const{chainId:e}=ie(this.wagmiConfig);e&&this.emit("switchNetwork",{chainId:e})}getWagmiConnector(e){return this.wagmiConfig.connectors.find(t=>t.id===e)}createConfig(e){this.wagmiChains=e.networks.filter(i=>i.chainNamespace===E.CHAIN.EVM);const t={},n=[...e.connectors??[]];this.wagmiChains.forEach(i=>{const c=e.transports?.[i.id],u=J.getCaipNetworkId(i);c?t[i.id]=J.extendWagmiTransports(i,e.projectId,c):t[i.id]=J.getViemTransport(i,e.projectId,e.customRpcUrls?.[u])}),this.wagmiConfig=Kt({...e,chains:this.wagmiChains,connectors:n,transports:t})}setupWatchPendingTransactions(){if(!this.pendingTransactionsFilter.enable||this.unwatchPendingTransactions)return;this.unwatchPendingTransactions=Tt(this.wagmiConfig,{pollingInterval:this.pendingTransactionsFilter.pollingInterval,onError:()=>{},onTransactions:()=>{this.emit("pendingTransactions"),Pe.increase("pendingTransactions")}});const e=Pe.subscribeKey("pendingTransactions",t=>{t>=E.LIMITS.PENDING_TRANSACTIONS&&(this.unwatchPendingTransactions?.(),e())})}setupWatchers(){St(this.wagmiConfig,{onChange:e=>{this.clearConnections(),this.addConnection(...e.map(t=>{const n=this.getCaipNetworks().find(c=>c.id===t.chainId),i=t.connector.id===E.CONNECTOR_ID.AUTH;return{accounts:t.accounts.map(c=>({address:this.toChecksummedAddress(c)})),caipNetwork:n,connectorId:t.connector.id,auth:i?{name:F.getConnectedSocialProvider(),username:F.getConnectedSocialUsername()}:void 0}}))}}),_t(this.wagmiConfig,{onChange:(e,t)=>{if(e.status==="disconnected"&&t.address&&this.emit("disconnect"),e?.chainId&&e?.chainId!==t?.chainId&&this.emit("switchNetwork",{chainId:e.chainId}),e.status==="connected"){const n=e.address!==t?.address,i=e.connector.id!==t.connector?.id,c=t.status!=="connected";(n||i||c)&&(this.setupWatchPendingTransactions(),this.handleAccountChanged({address:e.address,chainId:e.chainId,connector:e.connector}))}}})}async addThirdPartyConnectors(){const e=[],{enableCoinbase:t}=$.state||{};if(t!==!1){const i=await Xt(this.wagmiConfig.connectors);i&&e.push(i)}const n=await Jt(this.wagmiConfig.connectors);n&&e.push(n),await Promise.all(e.map(i=>{const c=this.configureInternalConnector(i);return this.addWagmiConnector(c)}))}addWagmiConnectors(){const e=[];$.state.enableInjected!==!1&&e.push(ce({shimDisconnect:!0}));const{features:t,remoteFeatures:n,projectId:i,enableAuthLogger:c}=$.state,u=n?.email??t?.email??!0,d=n?.socials??t?.socials,a=Array.isArray(d)&&d?.length>0;(u||a)&&e.push(Me({chains:this.wagmiChains,options:{projectId:i,enableAuthLogger:c}})),e.forEach(r=>{this.configureInternalConnector(r)})}configureInternalConnector(e){const t=this.wagmiConfig._internal.connectors.setup(e);return this.wagmiConfig._internal.connectors.setState(n=>[...n,t]),t}async handleAccountChanged({address:e,chainId:t,connector:n}){if(!this.namespace)throw new Error("WagmiAdapter:handleAccountChanged - namespace is required");const i=await n.getProvider().catch(()=>{});this.emit("accountChanged",{address:this.toChecksummedAddress(e),chainId:t,connector:{id:n.id,name:j.ConnectorNamesMap[n.id]??n.name,imageId:j.ConnectorImageIds[n.id],type:j.ConnectorTypesMap[n.type]??"EXTERNAL",info:n.id===E.CONNECTOR_ID.INJECTED?void 0:{rdns:n.id},provider:i,chain:this.namespace,chains:[]}})}async writeSolanaTransaction(){return Promise.resolve({hash:""})}async signMessage(e){try{return{signature:await Et(this.wagmiConfig,{message:e.message,account:e.address})}}catch{throw new Error("WagmiAdapter:signMessage - Sign message failed")}}async sendTransaction(e){const{chainId:t,address:n}=ie(this.wagmiConfig),i=this.wagmiChains?.find(d=>d.id===t),c={account:n,to:e.to,value:Number.isNaN(Number(e.value))?BigInt(0):BigInt(e.value),gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,data:e.data,chain:i,type:"legacy",parameters:["nonce"]};await It(this.wagmiConfig,c);const u=await bt(this.wagmiConfig,c);return await Nt(this.wagmiConfig,{hash:u,timeout:25e3}),{hash:u}}async writeContract(e){const{caipNetwork:t,...n}=e,i=Number(ge.caipNetworkIdToNumber(t.caipNetworkId)),c=this.wagmiChains?.find(d=>d.id===i);return{hash:await kt(this.wagmiConfig,{chain:c,address:n.tokenAddress,account:n.fromAddress,abi:n.abi,functionName:n.method,args:n.args,__mode:"prepared"})}}async estimateGas(e){try{return{gas:await vt(this.wagmiConfig,{account:e.address,to:e.to,data:e.data,type:"legacy"})}}catch{throw new Error("WagmiAdapter:estimateGas - error estimating gas")}}parseUnits(e){return at(e.value,e.decimals)}formatUnits(e){return Xe(e.value,e.decimals)}async addWagmiConnector(e){if(!this.namespace)throw new Error("WagmiAdapter:addWagmiConnector - namespace is required");const{enableEIP6963:t}=$.state||{};if(e.type===E.CONNECTOR_ID.INJECTED&&t===!1||e.id===E.CONNECTOR_ID.AUTH||e.id===E.CONNECTOR_ID.WALLET_CONNECT)return;let n;e.id!==E.CONNECTOR_ID.BASE_ACCOUNT&&(n=await e.getProvider().catch(()=>{}));const i=ze.state.connectorImages;this.addConnector({id:e.id,explorerId:j.ConnectorExplorerIds[e.id]??j.ConnectorExplorerIds[e.name],imageUrl:i?.[e.id]??e.icon,name:j.ConnectorNamesMap[e.id]??e.name,imageId:j.ConnectorImageIds[e.id],type:j.ConnectorTypesMap[e.type]??"EXTERNAL",info:e.id===E.CONNECTOR_ID.INJECTED?void 0:{rdns:e.id},provider:n,chain:this.namespace,chains:[]})}async syncConnectors(){Pt(this.wagmiConfig,{onChange:e=>{e.forEach(t=>this.addWagmiConnector(t))}}),this.addWagmiConnectors(),await Promise.all(this.wagmiConfig.connectors.map(e=>this.addWagmiConnector(e))),await this.addThirdPartyConnectors()}async syncConnections(){const e=this.connectors.filter(t=>{const{hasDisconnected:n,hasConnected:i}=X.getConnectorStorageInfo(t.id,this.namespace);return!n&&i}).map(t=>this.getWagmiConnector(t.id)).filter(Boolean);await le(this.wagmiConfig,{connectors:e})}async syncConnection(e){const{id:t,chainId:n}=e,c=M(this.wagmiConfig).find(r=>r.connector.id===t),d=await this.getWagmiConnector(t)?.getProvider();if(te.isSafeApp()&&t===E.CONNECTOR_ID.SAFE&&!c?.accounts.length){const r=this.getWagmiConnector("safe");if(r){const s=await de(this.wagmiConfig,{connector:r,chainId:Number(n)}),l=await r.getProvider();return{chainId:Number(n),address:this.toChecksummedAddress(s.accounts[0]),provider:l,type:c?.connector.type?.toUpperCase(),id:c?.connector.id}}}return{chainId:Number(c?.chainId),address:this.toChecksummedAddress(c?.accounts[0]),provider:d,type:c?.connector.type?.toUpperCase(),id:c?.connector.id}}async connectWalletConnect(e){try{const t=this.getWalletConnectConnector();await t.authenticate();const n=this.getWagmiConnector("walletConnect");if(!n)throw new Error("UniversalAdapter:connectWalletConnect - connector not found");const i=await de(this.wagmiConfig,{connector:n,chainId:e?Number(e):void 0});return i.chainId!==Number(e)&&await Ee(this.wagmiConfig,{chainId:i.chainId}),{clientId:await t.provider.client.core.crypto.getClientId()}}catch(t){throw t instanceof _?new Q(t):Ie.isUserRejectedRequestError(t)?new Q(t):t}}async connect(e){try{const{id:t,address:n,provider:i,type:c,info:u,chainId:d,socialUri:a}=e,r=this.getWagmiConnector(t);if(!r)throw new Error("connectionControllerClient:connectExternal - connector is undefined");i&&u&&r.id===E.CONNECTOR_ID.EIP6963&&r.setEip6963Wallet?.({provider:i,info:u});const s=this.wagmiConfig.state?.connections?.get(r.uid);if(s){await this.wagmiConfig.storage?.setItem("recentConnectorId",r.id);const f=[...s.accounts].sort((p,C)=>X.isLowerCaseMatch(p,n)?-1:X.isLowerCaseMatch(C,n)?1:0);return this.wagmiConfig?.setState(p=>({...p,connections:new Map(p.connections).set(r.uid,{accounts:f,chainId:s.chainId,connector:s.connector}),current:r.uid,status:"connected"})),{address:this.toChecksummedAddress(f[0]),chainId:s.chainId,provider:i,type:c,id:t}}const l=await de(this.wagmiConfig,{connector:r,chainId:d?Number(d):void 0,socialUri:a}),h=i??await r.getProvider();return{address:this.toChecksummedAddress(l.accounts[0]),chainId:l.chainId,provider:h,type:c,id:t}}catch(t){throw t instanceof _?new Q(t):Ie.isUserRejectedRequestError(t)?new Q(t):t}}get connections(){return Array.from(this.wagmiConfig.state.connections.values()).map(e=>({accounts:e.accounts.map(t=>({address:this.toChecksummedAddress(t)})),connectorId:e.connector.id}))}async reconnect(e){const{id:t}=e,n=this.getWagmiConnector(t);if(!n)throw new Error("connectionControllerClient:connectExternal - connector is undefined");await le(this.wagmiConfig,{connectors:[n]})}async getBalance(e){const t=e.address,n=this.getCaipNetworks().find(i=>i.id===e.chainId);if(!t)return Promise.resolve({balance:"0.00",symbol:"ETH"});if(n&&this.wagmiConfig){const i=`${n.caipNetworkId}:${e.address}`,c=this.balancePromises[i];if(c)return c;const u=F.getNativeBalanceCacheForCaipAddress(i);return u?{balance:u.balance,symbol:u.symbol}:(this.balancePromises[i]=new Promise(async d=>{try{const a=Number(e.chainId),r=await yt(this.wagmiConfig,{address:e.address,chainId:a,token:e.tokens?.[n.caipNetworkId]?.address});F.updateNativeBalanceCache({caipAddress:i,balance:r.formatted,symbol:r.symbol,timestamp:Date.now()}),d({balance:r.formatted,symbol:r.symbol})}catch(a){console.warn("Appkit:WagmiAdapter:getBalance - Error getting balance",a),d({balance:"0.00",symbol:"ETH"})}}).finally(()=>{delete this.balancePromises[i]}),this.balancePromises[i]||{balance:"0.00",symbol:"ETH"})}return{balance:"",symbol:""}}getWalletConnectProvider(){return this.getWagmiConnector("walletConnect")?.provider}async disconnect(e){if(e.id){const t=this.getWagmiConnector(e.id),i=M(this.wagmiConfig).find(c=>X.isLowerCaseMatch(c.connector.id,e.id));return await be(this.wagmiConfig,{connector:t}),$.state.enableReconnect===!1&&this.deleteConnection(e.id),i?{connections:[{accounts:i.accounts.map(c=>({address:this.toChecksummedAddress(c)})),connectorId:i.connector.id}]}:{connections:[]}}return this.disconnectAll()}async disconnectAll(){const e=M(this.wagmiConfig),t=await Promise.allSettled(e.map(async n=>{const i=this.getWagmiConnector(n.connector.id);return i&&await be(this.wagmiConfig,{connector:i}),n}));return this.wagmiConfig.state.connections.clear(),{connections:t.filter(n=>n.status==="fulfilled").map(({value:n})=>({accounts:n.accounts.map(i=>({address:this.toChecksummedAddress(i)})),connectorId:n.connector.id}))}}async switchNetwork(e){const{caipNetwork:t}=e,n=this.wagmiConfig.chains.find(f=>f.id.toString()===t.id.toString());if(!n)throw new Error("connectionControllerClient:switchNetwork - wagmiChain is undefined");const{name:i,nativeCurrency:c,rpcUrls:u,blockExplorers:d,id:a}=n,r=t.rpcUrls?.chainDefault?.http?.[0]??u.default.http[0]??"",s=d?.default.url??t.blockExplorers?.default?.url??"",l=c??t.nativeCurrency,h=i??t.name;await Ee(this.wagmiConfig,{chainId:a,addEthereumChainParameter:{chainName:h,nativeCurrency:l,rpcUrls:[r],blockExplorerUrls:[s]}}),await super.switchNetwork(e)}async getCapabilities(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:getCapabilities - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],i=n?this.getWagmiConnector(n.connector.id):null;if(!i)throw new Error("connectionControllerClient:getCapabilities - connector is undefined");const c=await i.getProvider();if(!c)throw new Error("connectionControllerClient:getCapabilities - provider is undefined");return await c.request({method:"wallet_getCapabilities",params:[e]})}async grantPermissions(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:grantPermissions - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],i=n?this.getWagmiConnector(n.connector.id):null;if(!i)throw new Error("connectionControllerClient:grantPermissions - connector is undefined");const c=await i.getProvider();if(!c)throw new Error("connectionControllerClient:grantPermissions - provider is undefined");return c.request({method:"wallet_grantPermissions",params:e})}async revokePermissions(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:revokePermissions - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],i=n?this.getWagmiConnector(n.connector.id):null;if(!i)throw new Error("connectionControllerClient:revokePermissions - connector is undefined");const c=await i.getProvider();if(!c)throw new Error("connectionControllerClient:revokePermissions - provider is undefined");return c.request({method:"wallet_revokePermissions",params:e})}async walletGetAssets(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:walletGetAssets - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],i=n?this.getWagmiConnector(n.connector.id):null;if(!i)throw new Error("connectionControllerClient:walletGetAssets - connector is undefined");const c=await i.getProvider();if(!c)throw new Error("connectionControllerClient:walletGetAssets - provider is undefined");return c.request({method:"wallet_getAssets",params:[e]})}setAuthProvider(e){if(!this.namespace)throw new Error("WagmiAdapter:setAuthProvider - namespace is required");this.addConnector({id:E.CONNECTOR_ID.AUTH,type:"AUTH",name:E.CONNECTOR_NAMES.AUTH,provider:e,imageId:j.ConnectorImageIds[E.CONNECTOR_ID.AUTH],chain:this.namespace,chains:[]})}async setUniversalProvider(e){e.on("connect",()=>{const n=M(this.wagmiConfig),i=this.getWagmiConnector("walletConnect");if(i&&!n.find(c=>c.connector.id===i.id)){if(S.state.activeChain==="eip155")return;le(this.wagmiConfig,{connectors:[i]})}});const t=pe({universalProvider:e});return this.configureInternalConnector(t),this.addConnector(new Ve({provider:e,caipNetworks:this.getCaipNetworks(),namespace:"eip155"})),Promise.resolve()}toChecksummedAddress(e){return et(e.toLowerCase())}}const ln=Object.freeze(Object.defineProperty({__proto__:null,WagmiAdapter:Yt,authConnector:Me},Symbol.toStringTag,{value:"Module"}));export{z as C,W as P,mt as a,ln as b,un as c,ce as i};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C68kxEIB.js","assets/index-a-a2MqTK.js","assets/index-BXaGpRRD.css","assets/parseEventLogs-DTRl5YJ_.js","assets/NetworkUtil-XsBaDkTf.js","assets/sha2-D3ryOfi3.js","assets/sha256-D33fGSQc.js","assets/W3MFrameProviderSingleton-eYQGtm7P.js","assets/index-CcHsPndE.js","assets/browser-ponyfill-CqiVi-O8.js","assets/custom-CZYipZz1.js","assets/store-DOLZnwHk.js","assets/writeContract-jh5z7q6H.js"])))=>i.map(i=>d[i]);
2
+ import{w as We,a as Le,l as ve,C as S,o as qe,a5 as ye,F as x,a6 as K,A as D,Z as De,t as F,O as $,a7 as $e,e as Fe,p as He,b as te,a8 as Be,a9 as J,aa as j,L as ze,a3 as X,ab as Q,Q as Ie,ac as Ve}from"./W3MFrameProviderSingleton-eYQGtm7P.js";import{ak as Ge,an as Ke,aa as Je,w as B,ae as oe,X as _,r as ae,ap as E,ax as ge,a3 as Xe}from"./NetworkUtil-XsBaDkTf.js";import{bg as Te,aI as L,cg as Qe,bc as Ye,b7 as Ze,ah as et}from"./parseEventLogs-DTRl5YJ_.js";import"./index-CcHsPndE.js";import{g as tt,_ as ke}from"./index-a-a2MqTK.js";import"./browser-ponyfill-CqiVi-O8.js";import{c as nt}from"./store-DOLZnwHk.js";import{c as Oe,a as it,g as rt,b as ot,d as st,e as ct,p as at}from"./custom-CZYipZz1.js";import{A as dt,s as ut,w as lt}from"./writeContract-jh5z7q6H.js";async function ht(o,{account:e=o.account,message:t}){if(!e)throw new dt({docsPath:"/docs/actions/wallet/signMessage"});const n=Te(e);if(n.signMessage)return n.signMessage({message:t});const i=typeof t=="string"?Ge(t):t.raw instanceof Uint8Array?Ke(t.raw):t.raw;return o.request({method:"personal_sign",params:[i,n.address]},{retryCount:0})}function R(o,e,t){const n=o[e.name];if(typeof n=="function")return n;const i=o[t];return typeof i=="function"?i:c=>e(o,c)}const ne="3.4.11",ft=()=>`@wagmi/core@${ne}`;var Re=function(o,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!n:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(o):n?n.value:e.get(o)},se,Ue;class O extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return ft()}constructor(e,t={}){super(),se.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const n=t.cause instanceof O?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof O&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(`
3
+ `),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return Re(this,se,"m",Ue).call(this,this,e)}}se=new WeakSet,Ue=function o(e,t){return t?.(e)?e:e.cause?Re(this,se,"m",o).call(this,e.cause,t):e};class z extends O{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class gt extends O{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class mt extends O{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class Ct extends O{constructor({address:e,connector:t}){super(`Account "${e}" not found for connector "${t.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class pt extends O{constructor({connectionChainId:e,connectorChainId:t}){super(`The current chain of the connector (id: ${t}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class wt extends O{constructor({connector:e}){super(`Connector "${e.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}async function de(o,e){let t;if(typeof e.connector=="function"?t=o._internal.connectors.setup(e.connector):t=e.connector,t.uid===o.state.current)throw new gt;try{o.setState(u=>({...u,status:"connecting"})),t.emitter.emit("message",{type:"connecting"});const{connector:n,...i}=e,c=await t.connect(i);return t.emitter.off("connect",o._internal.events.connect),t.emitter.on("change",o._internal.events.change),t.emitter.on("disconnect",o._internal.events.disconnect),await o.storage?.setItem("recentConnectorId",t.id),o.setState(u=>({...u,connections:new Map(u.connections).set(t.uid,{accounts:i.withCapabilities?c.accounts.map(d=>typeof d=="object"?d.address:d):c.accounts,chainId:c.chainId,connector:t}),current:t.uid,status:"connected"})),{accounts:i.withCapabilities?c.accounts.map(u=>typeof u=="object"?u:{address:u,capabilities:{}}):c.accounts,chainId:c.chainId}}catch(n){throw o.setState(i=>({...i,status:i.current?"connected":"disconnected"})),n}}async function G(o,e={}){const{assertChainId:t=!0}=e;let n;if(e.connector){const{connector:s}=e;if(o.state.status==="reconnecting"&&!s.getAccounts&&!s.getChainId)throw new wt({connector:s});const[l,h]=await Promise.all([s.getAccounts().catch(f=>{if(e.account===null)return[];throw f}),s.getChainId()]);n={accounts:l,chainId:h,connector:s}}else n=o.state.connections.get(o.state.current);if(!n)throw new mt;const i=e.chainId??n.chainId,c=await n.connector.getChainId();if(t&&c!==i)throw new pt({connectionChainId:i,connectorChainId:c});const u=n.connector;if(u.getClient)return u.getClient({chainId:i});const d=Te(e.account??n.accounts[0]);if(d&&(d.address=L(d.address)),e.account&&!n.accounts.some(s=>s.toLowerCase()===d.address.toLowerCase()))throw new Ct({address:d.address,connector:u});const a=o.chains.find(s=>s.id===i),r=await n.connector.getProvider({chainId:i});return Oe({account:d,chain:a,name:"Connector Client",transport:s=>it(r)({...s,retryCount:0})})}async function be(o,e={}){let t;if(e.connector)t=e.connector;else{const{connections:i,current:c}=o.state;t=i.get(c)?.connector}const n=o.state.connections;t&&(await t.disconnect(),t.emitter.off("change",o._internal.events.change),t.emitter.off("disconnect",o._internal.events.disconnect),t.emitter.on("connect",o._internal.events.connect),n.delete(t.uid)),o.setState(i=>{if(n.size===0)return{...i,connections:new Map,current:null,status:"disconnected"};const c=n.values().next().value;return{...i,connections:new Map(n),current:c.connector.uid}});{const i=o.state.current;if(!i)return;const c=o.state.connections.get(i)?.connector;if(!c)return;await o.storage?.setItem("recentConnectorId",c.id)}}async function vt(o,e){const{chainId:t,connector:n,...i}=e;let c;e.account?c=e.account:c=(await G(o,{account:e.account,assertChainId:!1,chainId:t,connector:n})).account;const u=o.getClient({chainId:t});return R(u,Qe,"estimateGas")({...i,account:c})}async function yt(o,e){const{address:t,blockNumber:n,blockTag:i,chainId:c}=e,u=o.getClient({chainId:c}),a=await R(u,rt,"getBalance")(n?{address:t,blockNumber:n}:{address:t,blockTag:i}),r=o.chains.find(s=>s.id===c)??u.chain;return{decimals:r.nativeCurrency.decimals,symbol:r.nativeCurrency.symbol,value:a}}function V(o,e){if(o===e)return!0;if(o&&e&&typeof o=="object"&&typeof e=="object"){if(o.constructor!==e.constructor)return!1;let t,n;if(Array.isArray(o)&&Array.isArray(e)){if(t=o.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!V(o[n],e[n]))return!1;return!0}if(typeof o.valueOf=="function"&&o.valueOf!==Object.prototype.valueOf)return o.valueOf()===e.valueOf();if(typeof o.toString=="function"&&o.toString!==Object.prototype.toString)return o.toString()===e.toString();const i=Object.keys(o);if(t=i.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!Object.hasOwn(e,i[n]))return!1;for(n=t;n--!==0;){const c=i[n];if(c&&!V(o[c],e[c]))return!1}return!0}return o!==o&&e!==e}function ie(o){const e=o.state.current,t=o.state.connections.get(e),n=t?.accounts,i=n?.[0],c=o.chains.find(d=>d.id===t?.chainId),u=o.state.status;switch(u){case"connected":return{address:i,addresses:n,chain:c,chainId:t?.chainId,connector:t?.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:u};case"reconnecting":return{address:i,addresses:n,chain:c,chainId:t?.chainId,connector:t?.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:u};case"connecting":return{address:i,addresses:n,chain:c,chainId:t?.chainId,connector:t?.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:u};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:u}}}let Y=[];function M(o){const e=[...o.state.connections.values()];return o.state.status==="reconnecting"||V(Y,e)?Y:(Y=e,e)}async function It(o,e){const{account:t,chainId:n,...i}=e;let c;t?c=t:c=(await G(o,{account:t,assertChainId:!1,chainId:n})).account;const u=o.getClient({chainId:n});return R(u,Ye,"prepareTransactionRequest")({...i,...c?{account:c}:{}})}let ue=!1;async function le(o,e={}){if(ue)return[];ue=!0,o.setState(r=>({...r,status:r.current?"reconnecting":"connecting"}));const t=[];if(e.connectors?.length)for(const r of e.connectors){let s;typeof r=="function"?s=o._internal.connectors.setup(r):s=r,t.push(s)}else t.push(...o.connectors);let n;try{n=await o.storage?.getItem("recentConnectorId")}catch{}const i={};for(const[,r]of o.state.connections)i[r.connector.id]=1;n&&(i[n]=0);const c=Object.keys(i).length>0?[...t].sort((r,s)=>(i[r.id]??10)-(i[s.id]??10)):t;let u=!1;const d=[],a=[];for(const r of c){const s=await r.getProvider().catch(()=>{});if(!s||a.some(f=>f===s)||!await r.isAuthorized())continue;const h=await r.connect({isReconnecting:!0}).catch(()=>null);h&&(r.emitter.off("connect",o._internal.events.connect),r.emitter.on("change",o._internal.events.change),r.emitter.on("disconnect",o._internal.events.disconnect),o.setState(f=>{const p=new Map(u?f.connections:new Map).set(r.uid,{accounts:h.accounts,chainId:h.chainId,connector:r});return{...f,current:u?f.current:r.uid,connections:p}}),d.push({accounts:h.accounts,chainId:h.chainId,connector:r}),a.push(s),u=!0)}return(o.state.status==="reconnecting"||o.state.status==="connecting")&&(u?o.setState(r=>({...r,status:"connected"})):o.setState(r=>({...r,connections:new Map,current:null,status:"disconnected"}))),ue=!1,d}async function bt(o,e){const{account:t,chainId:n,connector:i,...c}=e;let u;typeof t=="object"&&t?.type==="local"?u=o.getClient({chainId:n}):u=await G(o,{account:t??void 0,assertChainId:!1,chainId:n,connector:i});const d=!n||u.chain?.id===n?u.chain:{id:n};return await R(u,ut,"sendTransaction")({...c,...t?{account:t}:{},assertChainId:!!n,chain:d,gas:c.gas??void 0})}async function Et(o,e){const{account:t,connector:n,...i}=e;let c;return typeof t=="object"&&t.type==="local"?c=o.getClient():c=await G(o,{account:t,connector:n}),R(c,ht,"signMessage")({...i,...t?{account:t}:{}})}class W extends O{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class At extends O{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function Ee(o,e){const{addEthereumChainParameter:t,chainId:n}=e,i=o.state.connections.get(e.connector?.uid??o.state.current);if(i){const u=i.connector;if(!u.switchChain)throw new At({connector:u});return await u.switchChain({addEthereumChainParameter:t,chainId:n})}const c=o.chains.find(u=>u.id===n);if(!c)throw new z;return o.setState(u=>({...u,chainId:n})),c}async function Nt(o,e){const{chainId:t,timeout:n=0,...i}=e,c=o.getClient({chainId:t}),d=await R(c,ot,"waitForTransactionReceipt")({...i,timeout:n});if(d.status==="reverted"){const a=R(c,st,"getTransaction"),{from:r,...s}=await a({hash:d.transactionHash}),h=await R(c,Ze,"call")({...s,account:r,data:s.input,gasPrice:s.type!=="eip1559"?s.gasPrice:void 0,maxFeePerGas:s.type==="eip1559"?s.maxFeePerGas:void 0,maxPriorityFeePerGas:s.type==="eip1559"?s.maxPriorityFeePerGas:void 0}),f=h?.data?Je(`0x${h.data.substring(138)}`):"unknown reason";throw new Error(f)}return{...d,chainId:c.chain.id}}function _t(o,e){const{onChange:t}=e;return o.subscribe(()=>ie(o),t,{equalityFn(n,i){const{connector:c,...u}=n,{connector:d,...a}=i;return V(u,a)&&c?.id===d?.id&&c?.uid===d?.uid}})}function St(o,e){const{onChange:t}=e;return o.subscribe(()=>M(o),t,{equalityFn:V})}function Pt(o,e){const{onChange:t}=e;return o._internal.connectors.subscribe((n,i)=>{t(Object.values(n),i)})}function Tt(o,e){const{syncConnectedChain:t=o._internal.syncConnectedChain,...n}=e;let i;const c=a=>{i&&i();const r=o.getClient({chainId:a});return i=R(r,ct,"watchPendingTransactions")(n),i},u=c(e.chainId);let d;return t&&!e.chainId&&(d=o.subscribe(({chainId:a})=>a,async a=>c(a))),()=>{u?.(),d?.()}}async function kt(o,e){const{account:t,chainId:n,connector:i,...c}=e;let u;typeof t=="object"&&t?.type==="local"?u=o.getClient({chainId:n}):u=await G(o,{account:t??void 0,assertChainId:!1,chainId:n,connector:i});const d=!n||u.chain?.id===n?u.chain:{id:n};return await R(u,lt,"writeContract")({...c,...t?{account:t}:{},assertChainId:!!n,chain:d})}function un(o){return o}ce.type="injected";function ce(o={}){const{shimDisconnect:e=!0,unstable_shimAsyncInject:t}=o;function n(){const a=o.target;if(typeof a=="function"){const r=a();if(r)return r}return typeof a=="object"?a:typeof a=="string"?{...Ot[a]??{id:a,name:`${a[0].toUpperCase()}${a.slice(1)}`,provider:`is${a[0].toUpperCase()}${a.slice(1)}`}}:{id:"injected",name:"Injected",provider(r){return r?.ethereum}}}let i,c,u,d;return a=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},type:ce.type,async setup(){const r=await this.getProvider();r?.on&&o.target&&(u||(u=this.onConnect.bind(this),r.on("connect",u)),i||(i=this.onAccountsChanged.bind(this),r.on("accountsChanged",i)))},async connect({chainId:r,isReconnecting:s,withCapabilities:l}={}){const h=await this.getProvider();if(!h)throw new W;let f=[];if(s)f=await this.getAccounts().catch(()=>[]);else if(e)try{f=(await h.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0]?.caveats?.[0]?.value?.map(C=>L(C)),f.length>0&&(f=await this.getAccounts())}catch(p){const C=p;if(C.code===_.code)throw new _(C);if(C.code===ae.code)throw C}try{!f?.length&&!s&&(f=(await h.request({method:"eth_requestAccounts"})).map(g=>L(g))),u&&(h.removeListener("connect",u),u=void 0),i||(i=this.onAccountsChanged.bind(this),h.on("accountsChanged",i)),c||(c=this.onChainChanged.bind(this),h.on("chainChanged",c)),d||(d=this.onDisconnect.bind(this),h.on("disconnect",d));let p=await this.getChainId();return r&&p!==r&&(p=(await this.switchChain({chainId:r}).catch(g=>{if(g.code===_.code)throw g;return{id:p}}))?.id??p),e&&await a.storage?.removeItem(`${this.id}.disconnected`),o.target||await a.storage?.setItem("injected.connected",!0),{accounts:l?f.map(C=>({address:C,capabilities:{}})):f,chainId:p}}catch(p){const C=p;throw C.code===_.code?new _(C):C.code===ae.code?new ae(C):C}},async disconnect(){const r=await this.getProvider();if(!r)throw new W;c&&(r.removeListener("chainChanged",c),c=void 0),d&&(r.removeListener("disconnect",d),d=void 0),u||(u=this.onConnect.bind(this),r.on("connect",u));try{await Le(()=>r.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}e&&await a.storage?.setItem(`${this.id}.disconnected`,!0),o.target||await a.storage?.removeItem("injected.connected")},async getAccounts(){const r=await this.getProvider();if(!r)throw new W;return(await r.request({method:"eth_accounts"})).map(l=>L(l))},async getChainId(){const r=await this.getProvider();if(!r)throw new W;const s=await r.request({method:"eth_chainId"});return Number(s)},async getProvider(){if(typeof window>"u")return;let r;const s=n();return typeof s.provider=="function"?r=s.provider(window):typeof s.provider=="string"?r=re(window,s.provider):r=s.provider,r&&!r.removeListener&&("off"in r&&typeof r.off=="function"?r.removeListener=r.off:r.removeListener=()=>{}),r},async isAuthorized(){try{if(e&&await a.storage?.getItem(`${this.id}.disconnected`)||!o.target&&!await a.storage?.getItem("injected.connected"))return!1;if(!await this.getProvider()){if(t!==void 0&&t!==!1){const h=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",h),!!await this.getProvider()),f=typeof t=="number"?t:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(C=>window.addEventListener("ethereum#initialized",()=>C(h()),{once:!0}))]:[],new Promise(C=>setTimeout(()=>C(h()),f))]))return!0}throw new W}return!!(await We(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:r,chainId:s}){const l=await this.getProvider();if(!l)throw new W;const h=a.chains.find(p=>p.id===s);if(!h)throw new B(new z);const f=new Promise(p=>{const C=(g=>{"chainId"in g&&g.chainId===s&&(a.emitter.off("change",C),p())});a.emitter.on("change",C)});try{return await Promise.all([l.request({method:"wallet_switchEthereumChain",params:[{chainId:oe(s)}]}).then(async()=>{await this.getChainId()===s&&a.emitter.emit("change",{chainId:s})}),f]),h}catch(p){const C=p;if(C.code===4902||C?.data?.originalError?.code===4902)try{const{default:g,...N}=h.blockExplorers??{};let b;r?.blockExplorerUrls?b=r.blockExplorerUrls:g&&(b=[g.url,...Object.values(N).map(m=>m.url)]);let y;r?.rpcUrls?.length?y=r.rpcUrls:y=[h.rpcUrls.default?.http[0]??""];const P={blockExplorerUrls:b,chainId:oe(s),chainName:r?.chainName??h.name,iconUrls:r?.iconUrls,nativeCurrency:r?.nativeCurrency??h.nativeCurrency,rpcUrls:y};return await Promise.all([l.request({method:"wallet_addEthereumChain",params:[P]}).then(async()=>{if(await this.getChainId()===s)a.emitter.emit("change",{chainId:s});else throw new _(new Error("User rejected switch after adding network."))}),f]),h}catch(g){throw new _(g)}throw C.code===_.code?new _(C):new B(C)}},async onAccountsChanged(r){if(r.length===0)this.onDisconnect();else if(a.emitter.listenerCount("connect")){const s=(await this.getChainId()).toString();this.onConnect({chainId:s}),e&&await a.storage?.removeItem(`${this.id}.disconnected`)}else a.emitter.emit("change",{accounts:r.map(s=>L(s))})},onChainChanged(r){const s=Number(r);a.emitter.emit("change",{chainId:s})},async onConnect(r){const s=await this.getAccounts();if(s.length===0)return;const l=Number(r.chainId);a.emitter.emit("connect",{accounts:s,chainId:l});const h=await this.getProvider();h&&(u&&(h.removeListener("connect",u),u=void 0),i||(i=this.onAccountsChanged.bind(this),h.on("accountsChanged",i)),c||(c=this.onChainChanged.bind(this),h.on("chainChanged",c)),d||(d=this.onDisconnect.bind(this),h.on("disconnect",d)))},async onDisconnect(r){const s=await this.getProvider();r&&r.code===1013&&s&&(await this.getAccounts()).length||(a.emitter.emit("disconnect"),s&&(c&&(s.removeListener("chainChanged",c),c=void 0),d&&(s.removeListener("disconnect",d),d=void 0),u||(u=this.onConnect.bind(this),s.on("connect",u))))}})}const Ot={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(o){return o?.coinbaseWalletExtension?o.coinbaseWalletExtension:re(o,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(o){return re(o,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;const t=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const n of t)if(e[n])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(o){return o?.phantom?.ethereum?o.phantom?.ethereum:re(o,"isPhantom")}}};function re(o,e){function t(i){return typeof e=="function"?e(i):typeof e=="string"?i[e]:!0}const n=o.ethereum;if(n?.providers)return n.providers.find(i=>t(i));if(n&&t(n))return n}const Rt=o=>(e,t,n)=>{const i=n.subscribe;return n.subscribe=(u,d,a)=>{let r=u;if(d){const s=a?.equalityFn||Object.is;let l=u(n.getState());r=h=>{const f=u(h);if(!s(l,f)){const p=l;d(l=f,p)}},a?.fireImmediately&&d(l,l)}return i(r)},o(e,t,n)},Ut=Rt;function jt(o,e){let t;try{t=o()}catch{return}return{getItem:i=>{var c;const u=a=>a===null?null:JSON.parse(a,void 0),d=(c=t.getItem(i))!=null?c:null;return d instanceof Promise?d.then(u):u(d)},setItem:(i,c)=>t.setItem(i,JSON.stringify(c,void 0)),removeItem:i=>t.removeItem(i)}}const me=o=>e=>{try{const t=o(e);return t instanceof Promise?t:{then(n){return me(n)(t)},catch(n){return this}}}catch(t){return{then(n){return this},catch(n){return me(n)(t)}}}},Mt=(o,e)=>(t,n,i)=>{let c={storage:jt(()=>localStorage),partialize:C=>C,version:0,merge:(C,g)=>({...g,...C}),...e},u=!1;const d=new Set,a=new Set;let r=c.storage;if(!r)return o((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),t(...C)},n,i);const s=()=>{const C=c.partialize({...n()});return r.setItem(c.name,{state:C,version:c.version})},l=i.setState;i.setState=(C,g)=>{l(C,g),s()};const h=o((...C)=>{t(...C),s()},n,i);i.getInitialState=()=>h;let f;const p=()=>{var C,g;if(!r)return;u=!1,d.forEach(b=>{var y;return b((y=n())!=null?y:h)});const N=((g=c.onRehydrateStorage)==null?void 0:g.call(c,(C=n())!=null?C:h))||void 0;return me(r.getItem.bind(r))(c.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==c.version){if(c.migrate)return[!0,c.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var y;const[P,m]=b;if(f=c.merge(m,(y=n())!=null?y:h),t(f,!0),P)return s()}).then(()=>{N?.(f,void 0),f=n(),u=!0,a.forEach(b=>b(f))}).catch(b=>{N?.(void 0,b)})};return i.persist={setOptions:C=>{c={...c,...C},C.storage&&(r=C.storage)},clearStorage:()=>{r?.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>p(),hasHydrated:()=>u,onHydrate:C=>(d.add(C),()=>{d.delete(C)}),onFinishHydration:C=>(a.add(C),()=>{a.delete(C)})},c.skipHydration||p(),f||h},xt=Mt,Ae=o=>{let e;const t=new Set,n=(r,s)=>{const l=typeof r=="function"?r(e):r;if(!Object.is(l,e)){const h=e;e=s??(typeof l!="object"||l===null)?l:Object.assign({},e,l),t.forEach(f=>f(e,h))}},i=()=>e,d={setState:n,getState:i,getInitialState:()=>a,subscribe:r=>(t.add(r),()=>t.delete(r))},a=e=o(n,i,d);return d},he=o=>o?Ae(o):Ae;var fe={exports:{}},Ne;function Wt(){return Ne||(Ne=1,(function(o){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function i(a,r,s){this.fn=a,this.context=r,this.once=s||!1}function c(a,r,s,l,h){if(typeof s!="function")throw new TypeError("The listener must be a function");var f=new i(s,l||a,h),p=t?t+r:r;return a._events[p]?a._events[p].fn?a._events[p]=[a._events[p],f]:a._events[p].push(f):(a._events[p]=f,a._eventsCount++),a}function u(a,r){--a._eventsCount===0?a._events=new n:delete a._events[r]}function d(){this._events=new n,this._eventsCount=0}d.prototype.eventNames=function(){var r=[],s,l;if(this._eventsCount===0)return r;for(l in s=this._events)e.call(s,l)&&r.push(t?l.slice(1):l);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(s)):r},d.prototype.listeners=function(r){var s=t?t+r:r,l=this._events[s];if(!l)return[];if(l.fn)return[l.fn];for(var h=0,f=l.length,p=new Array(f);h<f;h++)p[h]=l[h].fn;return p},d.prototype.listenerCount=function(r){var s=t?t+r:r,l=this._events[s];return l?l.fn?1:l.length:0},d.prototype.emit=function(r,s,l,h,f,p){var C=t?t+r:r;if(!this._events[C])return!1;var g=this._events[C],N=arguments.length,b,y;if(g.fn){switch(g.once&&this.removeListener(r,g.fn,void 0,!0),N){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,s),!0;case 3:return g.fn.call(g.context,s,l),!0;case 4:return g.fn.call(g.context,s,l,h),!0;case 5:return g.fn.call(g.context,s,l,h,f),!0;case 6:return g.fn.call(g.context,s,l,h,f,p),!0}for(y=1,b=new Array(N-1);y<N;y++)b[y-1]=arguments[y];g.fn.apply(g.context,b)}else{var P=g.length,m;for(y=0;y<P;y++)switch(g[y].once&&this.removeListener(r,g[y].fn,void 0,!0),N){case 1:g[y].fn.call(g[y].context);break;case 2:g[y].fn.call(g[y].context,s);break;case 3:g[y].fn.call(g[y].context,s,l);break;case 4:g[y].fn.call(g[y].context,s,l,h);break;default:if(!b)for(m=1,b=new Array(N-1);m<N;m++)b[m-1]=arguments[m];g[y].fn.apply(g[y].context,b)}}return!0},d.prototype.on=function(r,s,l){return c(this,r,s,l,!1)},d.prototype.once=function(r,s,l){return c(this,r,s,l,!0)},d.prototype.removeListener=function(r,s,l,h){var f=t?t+r:r;if(!this._events[f])return this;if(!s)return u(this,f),this;var p=this._events[f];if(p.fn)p.fn===s&&(!h||p.once)&&(!l||p.context===l)&&u(this,f);else{for(var C=0,g=[],N=p.length;C<N;C++)(p[C].fn!==s||h&&!p[C].once||l&&p[C].context!==l)&&g.push(p[C]);g.length?this._events[f]=g.length===1?g[0]:g:u(this,f)}return this},d.prototype.removeAllListeners=function(r){var s;return r?(s=t?t+r:r,this._events[s]&&u(this,s)):(this._events=new n,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=t,d.EventEmitter=d,o.exports=d})(fe)),fe.exports}var Lt=Wt();const qt=tt(Lt);class Dt{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new qt})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,...t){const n=t[0];this._emitter.emit(e,{uid:this.uid,...n})}listenerCount(e){return this._emitter.listenerCount(e)}}function $t(o){return new Dt(o)}function Ft(o,e){return JSON.parse(o,(t,n)=>{let i=n;return i?.__type==="bigint"&&(i=BigInt(i.value)),i?.__type==="Map"&&(i=new Map(i.value)),e?.(t,i)??i})}function _e(o,e){return o.slice(0,e).join(".")||"."}function Se(o,e){const{length:t}=o;for(let n=0;n<t;++n)if(o[n]===e)return n+1;return 0}function Ht(o,e){const t=typeof o=="function",n=typeof e=="function",i=[],c=[];return function(d,a){if(typeof a=="object")if(i.length){const r=Se(i,this);r===0?i[i.length]=this:(i.splice(r),c.splice(r)),c[c.length]=d;const s=Se(i,a);if(s!==0)return n?e.call(this,d,a,_e(c,s)):`[ref=${_e(c,s)}]`}else i[0]=a,c[0]=d;return t?o.call(this,d,a):a}}function Bt(o,e,t,n){return JSON.stringify(o,Ht((i,c)=>{let u=c;return typeof u=="bigint"&&(u={__type:"bigint",value:c.toString()}),u instanceof Map&&(u={__type:"Map",value:Array.from(c.entries())}),e?.(i,u)??u},n),t??void 0)}function zt(o){const{deserialize:e=Ft,key:t="wagmi",serialize:n=Bt,storage:i=je}=o;function c(u){return u instanceof Promise?u.then(d=>d).catch(()=>null):u}return{...i,key:t,async getItem(u,d){const a=i.getItem(`${t}.${u}`),r=await c(a);return r?e(r)??null:d??null},async setItem(u,d){const a=`${t}.${u}`;d===null?await c(i.removeItem(a)):await c(i.setItem(a,n(d)))},async removeItem(u){await c(i.removeItem(`${t}.${u}`))}}}const je={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function Vt(){const o=typeof window<"u"&&window.localStorage?window.localStorage:je;return{getItem(e){return o.getItem(e)},removeItem(e){o.removeItem(e)},setItem(e,t){try{o.setItem(e,t)}catch{}}}}const Ce=256;let Z=Ce,ee;function Gt(o=11){if(!ee||Z+o>Ce*2){ee="",Z=0;for(let e=0;e<Ce;e++)ee+=(256+Math.random()*256|0).toString(16).substring(1)}return ee.substring(Z,Z+++o)}function Kt(o){const{multiInjectedProviderDiscovery:e=!0,storage:t=zt({storage:Vt()}),syncConnectedChain:n=!0,ssr:i=!1,...c}=o,u=typeof window<"u"&&e?nt():void 0,d=he(()=>c.chains),a=he(()=>{const m=[],w=new Set;for(const v of c.connectors??[]){const A=r(v);if(m.push(A),!i&&A.rdns){const I=typeof A.rdns=="string"?[A.rdns]:A.rdns;for(const T of I)w.add(T)}}if(!i&&u){const v=u.getProviders();for(const A of v)w.has(A.info.rdns)||m.push(r(s(A)))}return m});function r(m){const w=$t(Gt()),v={...m({emitter:w,chains:d.getState(),storage:t,transports:c.transports}),emitter:w,uid:w.uid};return w.on("connect",y),v.setup?.(),v}function s(m){const{info:w}=m,v=m.provider;return ce({target:{...w,id:w.rdns,provider:v}})}const l=new Map;function h(m={}){const w=m.chainId??g.getState().chainId,v=d.getState().find(I=>I.id===w);if(m.chainId&&!v)throw new z;{const I=l.get(g.getState().chainId);if(I&&!v)return I;if(!v)throw new z}{const I=l.get(w);if(I)return I}let A;if(c.client)A=c.client({chain:v});else{const I=v.id,T=d.getState().map(k=>k.id),U={},we=Object.entries(c);for(const[k,q]of we)if(!(k==="chains"||k==="client"||k==="connectors"||k==="transports"))if(typeof q=="object")if(I in q)U[k]=q[I];else{if(T.some(xe=>xe in q))continue;U[k]=q}else U[k]=q;A=Oe({...U,chain:v,batch:U.batch??{multicall:!0},transport:k=>c.transports[I]({...k,connectors:a})})}return l.set(w,A),A}function f(){return{chainId:d.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let p;const C="0.0.0-canary-";ne.startsWith(C)?p=Number.parseInt(ne.replace(C,""),10):p=Number.parseInt(ne.split(".")[0]??"0",10);const g=he(Ut(t?xt(f,{migrate(m,w){if(w===p)return m;const v=f(),A=N(m,v.chainId);return{...v,chainId:A}},name:"store",partialize(m){return{connections:{__type:"Map",value:Array.from(m.connections.entries()).map(([w,v])=>{const{id:A,name:I,type:T,uid:U}=v.connector;return[w,{...v,connector:{id:A,name:I,type:T,uid:U}}]})},chainId:m.chainId,current:m.current}},merge(m,w){typeof m=="object"&&m&&"status"in m&&delete m.status;const v=N(m,w.chainId);return{...w,...m,chainId:v}},skipHydration:i,storage:t,version:p}):f));g.setState(f());function N(m,w){return m&&typeof m=="object"&&"chainId"in m&&typeof m.chainId=="number"&&d.getState().some(v=>v.id===m.chainId)?m.chainId:w}n&&g.subscribe(({connections:m,current:w})=>w?m.get(w)?.chainId:void 0,m=>{if(d.getState().some(v=>v.id===m))return g.setState(v=>({...v,chainId:m??v.chainId}))}),u?.subscribe(m=>{const w=new Set,v=new Set;for(const I of a.getState())if(w.add(I.id),I.rdns){const T=typeof I.rdns=="string"?[I.rdns]:I.rdns;for(const U of T)v.add(U)}const A=[];for(const I of m){if(v.has(I.info.rdns))continue;const T=r(s(I));w.has(T.id)||A.push(T)}t&&!g.persist.hasHydrated()||a.setState(I=>[...I,...A],!0)});function b(m){g.setState(w=>{const v=w.connections.get(m.uid);return v?{...w,connections:new Map(w.connections).set(m.uid,{accounts:m.accounts??v.accounts,chainId:m.chainId??v.chainId,connector:v.connector})}:w})}function y(m){g.getState().status==="connecting"||g.getState().status==="reconnecting"||g.setState(w=>{const v=a.getState().find(A=>A.uid===m.uid);return v?(v.emitter.listenerCount("connect")&&v.emitter.off("connect",b),v.emitter.listenerCount("change")||v.emitter.on("change",b),v.emitter.listenerCount("disconnect")||v.emitter.on("disconnect",P),{...w,connections:new Map(w.connections).set(m.uid,{accounts:m.accounts,chainId:m.chainId,connector:v}),current:m.uid,status:"connected"}):w})}function P(m){g.setState(w=>{const v=w.connections.get(m.uid);if(v){const I=v.connector;I.emitter.listenerCount("change")&&v.connector.emitter.off("change",b),I.emitter.listenerCount("disconnect")&&v.connector.emitter.off("disconnect",P),I.emitter.listenerCount("connect")||v.connector.emitter.on("connect",y)}if(w.connections.delete(m.uid),w.connections.size===0)return{...w,connections:new Map,current:null,status:"disconnected"};const A=w.connections.values().next().value;return{...w,connections:new Map(w.connections),current:A.connector.uid}})}return{get chains(){return d.getState()},get connectors(){return a.getState()},storage:t,getClient:h,get state(){return g.getState()},setState(m){let w;typeof m=="function"?w=m(g.getState()):w=m;const v=f();typeof w!="object"&&(w=v),Object.keys(v).some(I=>!(I in w))&&(w=v),g.setState(w,!0)},subscribe(m,w,v){return g.subscribe(m,w,v?{...v,fireImmediately:v.emitImmediately}:void 0)},_internal:{mipd:u,async revalidate(){const m=g.getState(),w=m.connections;let v=m.current;for(const[,A]of w){const I=A.connector;I.isAuthorized&&await I.isAuthorized()||(w.delete(I.uid),v===I.uid&&(v=null))}g.setState(A=>({...A,connections:w,current:v}))},store:g,ssr:!!i,syncConnectedChain:n,transports:c.transports,chains:{setState(m){const w=typeof m=="function"?m(d.getState()):m;if(w.length!==0)return d.setState(w,!0)},subscribe(m){return d.subscribe(m)}},connectors:{providerDetailToConnector:s,setup:r,setState(m){return a.setState(typeof m=="function"?m(a.getState()):m,!0)},subscribe(m){return a.subscribe(m)}},events:{change:b,connect:y,disconnect:P}}}}function Me(o){let e=[],t,n;function i(d){const a=S.getCaipNetworks(E.CHAIN.EVM);let r=Number(ge.parseEvmChainId(d));if(!a.some(s=>String(s.id)===String(d))){const s=S.getActiveCaipNetwork(E.CHAIN.EVM)?.id||a[0]?.id;s&&Number.isInteger(Number(s))&&(r=Number(s))}if(!r)throw new Error("ChainId not found in networks");return r}function c(){return t||(t=ye.getInstance({projectId:o.options.projectId,chainId:K()?.caipNetworkId,enableLogger:o.options.enableAuthLogger,onTimeout:d=>{d==="iframe_load_failed"?D.open(x.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):d==="iframe_request_timeout"?D.open(x.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):d==="unverified_domain"&&D.open(x.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},abortController:x.EmbeddedWalletAbortController,getActiveCaipNetwork:d=>K(d),getCaipNetworks:d=>S.getCaipNetworks(d)})),t}async function u(d={}){const a=c();let r=d.chainId;if(d.isReconnecting){const C=ge.parseEvmChainId(a.getLastUsedChainId()||""),g=o.chains?.[0].id;if(r=C||g,!r)throw new Error("ChainId not found in provider")}const s=ve("eip155"),{address:l,chainId:h,accounts:f}=await De.authConnectorAuthenticate({authConnector:a,chainId:r,preferredAccountType:s,socialUri:d.socialUri,chainNamespace:E.CHAIN.EVM});e=f?.map(C=>C.address)||[l];const p=i(h);return{accounts:e,account:l,chainId:p,chain:{id:p,unsupported:!1}}}return d=>({id:E.CONNECTOR_ID.AUTH,name:E.CONNECTOR_NAMES.AUTH,type:"AUTH",chain:E.CHAIN.EVM,async connect(a={}){if(n){const s=await n;return{accounts:a.withCapabilities?s.accounts.map(l=>({address:l,capabilities:{}})):s.accounts,chainId:s.chainId}}n||(n=new Promise(s=>{s(u(a))}));const r=await n;return n=void 0,{accounts:a.withCapabilities?r.accounts.map(s=>({address:s,capabilities:{}})):r.accounts,chainId:r.chainId}},async disconnect(){await(await this.getProvider()).disconnect()},getAccounts(){return e?.length?(d.emitter.emit("change",{accounts:e}),Promise.resolve(e)):Promise.resolve([])},async getProvider(){return this.provider||(this.provider=ye.getInstance({projectId:o.options.projectId,chainId:K()?.caipNetworkId,enableLogger:o.options.enableAuthLogger,abortController:x.EmbeddedWalletAbortController,onTimeout:a=>{a==="iframe_load_failed"?D.open(x.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):a==="iframe_request_timeout"?D.open(x.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):a==="unverified_domain"&&D.open(x.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},getActiveCaipNetwork:a=>K(a),getCaipNetworks:a=>S.getCaipNetworks(a)})),Promise.resolve(this.provider)},async getChainId(){const a=await this.getProvider(),{chainId:r}=await a.getChainId();return i(r)},async isAuthorized(){const r=S.state.activeChain===E.CHAIN.EVM;if(E.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(h=>qe.getConnectorId(h)===E.CONNECTOR_ID.AUTH)&&!r)return!1;const l=await this.getProvider();return Promise.resolve(l.getLoginEmailUsed())},async switchChain({chainId:a}){try{const r=d.chains.find(f=>f.id===a);if(!r)throw new B(new Error("chain not found on connector."));const s=await this.getProvider(),l=ve("eip155"),h=await s.connect({chainId:a,preferredAccountType:l});return e=h?.accounts?.map(f=>f.address)||[h.address],d.emitter.emit("change",{chainId:Number(a),accounts:e}),r}catch(r){throw r instanceof Error?new B(r):r}},onAccountsChanged(a){a.length===0?this.onDisconnect():d.emitter.emit("change",{accounts:a.map(L)})},onChainChanged(a){const r=Number(a);d.emitter.emit("change",{chainId:r})},async onDisconnect(a){await(await this.getProvider()).disconnect()}})}pe.type="walletConnect";function pe(o){const e=o.isNewChainsStale??!0;let t,n,i,c,u,d,a;return r=>({id:"walletConnect",name:"WalletConnect",type:pe.type,provider:o.universalProvider,async setup(){const s=await this.getProvider().catch(()=>null);s&&(c||(c=this.onConnect.bind(this),s.on("connect",c)),d||(d=this.onSessionDelete.bind(this),s.on("session_delete",d)))},async connect({...s}={}){try{const l=S.getCaipNetworks(),h=await this.getProvider();if(!h)throw new W;u||(u=this.onDisplayUri,h.on("display_uri",u));const f=await this.isChainsStale();h.session&&f&&await h.disconnect();const p=$.state.universalProviderConfigOverride;if(!h.session||f){const m=$e.createNamespaces(l,p);await h.connect({optionalNamespaces:m,..."pairingTopic"in s?{pairingTopic:s.pairingTopic}:{}}),this.setRequestedChainsIds(l.map(w=>Number(w.id)))}const C=await this.getAccounts(),g=await this.getChainId(),N=h.session?.namespaces?.eip155?.chains,b=N?.some(m=>Number(m.split(":")[1])===g);let y=1;b?y=g:N?.[0]&&(y=Number(N[0].split(":")[1])),u&&(h.removeListener("display_uri",u),u=void 0),c&&(h.removeListener("connect",c),c=void 0),n||(n=this.onAccountsChanged.bind(this),h.on("accountsChanged",n)),i||(i=this.onChainChanged.bind(this),h.on("chainChanged",i)),a||(a=this.onDisconnect.bind(this),h.on("disconnect",a)),d||(d=this.onSessionDelete.bind(this),h.on("session_delete",d));const P=p?.defaultChain;return h.setDefaultChain(P??`eip155:${y}`),{accounts:C,chainId:y}}catch(l){throw/(user rejected|connection request reset)/i.test(l?.message)?new _(l):l}},async disconnect(){const s=await this.getProvider();try{await s?.disconnect()}catch(l){if(!/No matching key/i.test(l.message))throw l}finally{i&&(s?.removeListener("chainChanged",i),i=void 0),a&&(s?.removeListener("disconnect",a),a=void 0),c||(c=this.onConnect.bind(this),s?.on("connect",c)),n&&(s?.removeListener("accountsChanged",n),n=void 0),d&&(s?.removeListener("session_delete",d),d=void 0),this.setRequestedChainsIds([])}},async getAccounts(){const s=await this.getProvider();if(!s?.session?.namespaces)return[];const h=s?.session?.namespaces[E.CHAIN.EVM]?.accounts?.map(C=>C.split(":")[2])??[],f=new Set;return h.filter(C=>{const g=C?.toLowerCase();return f.has(g)?!1:(f.add(g),!0)})},async getProvider({chainId:s}={}){t||(t=o.universalProvider,t?.events.setMaxListeners(Number.POSITIVE_INFINITY));const l=F.getActiveNamespace(),h=S.getActiveCaipNetwork()?.id;if(s&&h!==s&&l){const f=F.getStoredActiveCaipNetworkId(),C=(l?S.getCaipNetworks(l):[])?.find(g=>g.id===f);C&&C.chainNamespace===E.CHAIN.EVM&&await this.switchChain?.({chainId:Number(C.id)})}return t},async getChainId(){const s=S.getActiveCaipNetwork(E.CHAIN.EVM)?.id;if(s)return s;const h=(await this.getProvider()).session?.namespaces[E.CHAIN.EVM]?.chains?.[0];return S.getCaipNetworks().find(p=>p.id===h)?.id},async isAuthorized(){try{const[s,l]=await Promise.all([this.getAccounts(),this.getProvider()]);return s.length?await this.isChainsStale()&&l.session?(await l.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:s,chainId:l}){const h=await this.getProvider();if(!h)throw new W;const f=S.getCaipNetworks().find(p=>p.id===l);if(!f)throw new B(new z);try{await h.request({method:"wallet_switchEthereumChain",params:[{chainId:oe(l)}]}),f?.caipNetworkId&&h.setDefaultChain(f?.caipNetworkId),r.emitter.emit("change",{chainId:Number(l)});const p=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...p,l]),{...f,id:f.id}}catch(p){const C=p;if(/(?:user rejected)/iu.test(C.message))throw new _(C);try{let g;s?.blockExplorerUrls?g=s.blockExplorerUrls:g=f.blockExplorers?.default.url?[f.blockExplorers?.default.url]:[];const N=f.rpcUrls?.chainDefault?.http||[],b={blockExplorerUrls:g,chainId:oe(l),chainName:f.name,iconUrls:s?.iconUrls,nativeCurrency:f.nativeCurrency,rpcUrls:N};await h.request({method:"wallet_addEthereumChain",params:[b]});const y=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...y,l]),{...f,id:f.id}}catch(g){throw new _(g)}}},onAccountsChanged(s){s.length===0?this.onDisconnect():r.emitter.emit("change",{accounts:s.map(l=>L(l))})},onChainChanged(s){const l=Number(s);r.emitter.emit("change",{chainId:l})},onConnect(s){this.setRequestedChainsIds(S.getCaipNetworks().map(l=>Number(l.id)))},async onDisconnect(s){this.setRequestedChainsIds([]),r.emitter.emit("disconnect");const l=await this.getProvider();n&&(l.removeListener("accountsChanged",n),n=void 0),i&&(l.removeListener("chainChanged",i),i=void 0),a&&(l.removeListener("disconnect",a),a=void 0),d&&(l.removeListener("session_delete",d),d=void 0),c||(c=this.onConnect.bind(this),l.on("connect",c))},onDisplayUri(s){r.emitter.emit("message",{type:"display_uri",data:s})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){return t?.session?.namespaces?t?.session?.namespaces[E.CHAIN.EVM]?.accounts?.map(h=>Number.parseInt(h.split(":")[1]??""))??[]:[]},async getRequestedChainsIds(){const s=await r.storage?.getItem(this.requestedChainsStorageKey)??[];return[...new Set(s)]},async isChainsStale(){if(!e)return!1;const s=r.chains.map(f=>f.id),l=this.getNamespaceChainsIds();if(l.length&&!l.some(f=>s.includes(f)))return!1;const h=await this.getRequestedChainsIds();return!s.every(f=>h.includes(Number(f)))},async setRequestedChainsIds(s){await r.storage?.setItem(this.requestedChainsStorageKey,s)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}const H=He({pendingTransactions:0}),Pe={state:H,subscribeKey(o,e){return Fe(H,o,e)},increase(o){H[o]+=1},decrease(o){H[o]-=1},reset(o){H[o]=0}};async function Jt(o){if(te.isSafeApp()){const{safe:e}=await ke(async()=>{const{safe:t}=await import("./index-C68kxEIB.js");return{safe:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]));if(e&&!o.some(t=>t.type==="safe"))return e()}return null}async function Xt(o){try{const{baseAccount:e}=await ke(async()=>{const{baseAccount:t}=await import("./index-C68kxEIB.js");return{baseAccount:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]));if(e&&!o.some(t=>t.id==="baseAccount"))return e()}catch(e){console.error("Failed to import Coinbase Wallet SDK:",e)}return null}const Qt={enable:!1,pollingInterval:3e4};class Yt extends Be{constructor(e){const t=J.extendCaipNetworks(e.networks,{projectId:e.projectId,customNetworkImageUrls:{},customRpcUrls:e.customRpcUrls});super(),this.balancePromises={},this.namespace=E.CHAIN.EVM,this.adapterType=E.ADAPTER_TYPES.WAGMI,this.projectId=e.projectId,this.pendingTransactionsFilter={...Qt,...e.pendingTransactionsFilter??{}},this.createConfig({...e,networks:t}),this.checkChainId()}construct(e){this.checkChainId(),this.setupWatchers()}async getAccounts(e){const t=this.getWagmiConnector(e.id);if(!t)return{accounts:[]};if(t.id===E.CONNECTOR_ID.AUTH){const u=await t.getProvider();if(!u?.user)return{accounts:[]};const{address:d,accounts:a,chainId:r}=u.user;return Promise.resolve({accounts:(a||[{address:d,type:"eoa"}]).map(s=>te.createAccount({caipAddress:`eip155:${r}:${s.address}`,type:s.type}))})}const{addresses:n,address:i,chainId:c}=ie(this.wagmiConfig);return Promise.resolve({accounts:c?[...new Set(n||[i])].map(u=>te.createAccount({caipAddress:`eip155:${c}:${u||""}`,type:"eoa"})):[]})}checkChainId(){const{chainId:e}=ie(this.wagmiConfig);e&&this.emit("switchNetwork",{chainId:e})}getWagmiConnector(e){return this.wagmiConfig.connectors.find(t=>t.id===e)}createConfig(e){this.wagmiChains=e.networks.filter(i=>i.chainNamespace===E.CHAIN.EVM);const t={},n=[...e.connectors??[]];this.wagmiChains.forEach(i=>{const c=e.transports?.[i.id],u=J.getCaipNetworkId(i);c?t[i.id]=J.extendWagmiTransports(i,e.projectId,c):t[i.id]=J.getViemTransport(i,e.projectId,e.customRpcUrls?.[u])}),this.wagmiConfig=Kt({...e,chains:this.wagmiChains,connectors:n,transports:t})}setupWatchPendingTransactions(){if(!this.pendingTransactionsFilter.enable||this.unwatchPendingTransactions)return;this.unwatchPendingTransactions=Tt(this.wagmiConfig,{pollingInterval:this.pendingTransactionsFilter.pollingInterval,onError:()=>{},onTransactions:()=>{this.emit("pendingTransactions"),Pe.increase("pendingTransactions")}});const e=Pe.subscribeKey("pendingTransactions",t=>{t>=E.LIMITS.PENDING_TRANSACTIONS&&(this.unwatchPendingTransactions?.(),e())})}setupWatchers(){St(this.wagmiConfig,{onChange:e=>{this.clearConnections(),this.addConnection(...e.map(t=>{const n=this.getCaipNetworks().find(c=>c.id===t.chainId),i=t.connector.id===E.CONNECTOR_ID.AUTH;return{accounts:t.accounts.map(c=>({address:this.toChecksummedAddress(c)})),caipNetwork:n,connectorId:t.connector.id,auth:i?{name:F.getConnectedSocialProvider(),username:F.getConnectedSocialUsername()}:void 0}}))}}),_t(this.wagmiConfig,{onChange:(e,t)=>{if(e.status==="disconnected"&&t.address&&this.emit("disconnect"),e?.chainId&&e?.chainId!==t?.chainId&&this.emit("switchNetwork",{chainId:e.chainId}),e.status==="connected"){const n=e.address!==t?.address,i=e.connector.id!==t.connector?.id,c=t.status!=="connected";(n||i||c)&&(this.setupWatchPendingTransactions(),this.handleAccountChanged({address:e.address,chainId:e.chainId,connector:e.connector}))}}})}async addThirdPartyConnectors(){const e=[],{enableCoinbase:t}=$.state||{};if(t!==!1){const i=await Xt(this.wagmiConfig.connectors);i&&e.push(i)}const n=await Jt(this.wagmiConfig.connectors);n&&e.push(n),await Promise.all(e.map(i=>{const c=this.configureInternalConnector(i);return this.addWagmiConnector(c)}))}addWagmiConnectors(){const e=[];$.state.enableInjected!==!1&&e.push(ce({shimDisconnect:!0}));const{features:t,remoteFeatures:n,projectId:i,enableAuthLogger:c}=$.state,u=n?.email??t?.email??!0,d=n?.socials??t?.socials,a=Array.isArray(d)&&d?.length>0;(u||a)&&e.push(Me({chains:this.wagmiChains,options:{projectId:i,enableAuthLogger:c}})),e.forEach(r=>{this.configureInternalConnector(r)})}configureInternalConnector(e){const t=this.wagmiConfig._internal.connectors.setup(e);return this.wagmiConfig._internal.connectors.setState(n=>[...n,t]),t}async handleAccountChanged({address:e,chainId:t,connector:n}){if(!this.namespace)throw new Error("WagmiAdapter:handleAccountChanged - namespace is required");const i=await n.getProvider().catch(()=>{});this.emit("accountChanged",{address:this.toChecksummedAddress(e),chainId:t,connector:{id:n.id,name:j.ConnectorNamesMap[n.id]??n.name,imageId:j.ConnectorImageIds[n.id],type:j.ConnectorTypesMap[n.type]??"EXTERNAL",info:n.id===E.CONNECTOR_ID.INJECTED?void 0:{rdns:n.id},provider:i,chain:this.namespace,chains:[]}})}async writeSolanaTransaction(){return Promise.resolve({hash:""})}async signMessage(e){try{return{signature:await Et(this.wagmiConfig,{message:e.message,account:e.address})}}catch{throw new Error("WagmiAdapter:signMessage - Sign message failed")}}async sendTransaction(e){const{chainId:t,address:n}=ie(this.wagmiConfig),i=this.wagmiChains?.find(d=>d.id===t),c={account:n,to:e.to,value:Number.isNaN(Number(e.value))?BigInt(0):BigInt(e.value),gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,data:e.data,chain:i,type:"legacy",parameters:["nonce"]};await It(this.wagmiConfig,c);const u=await bt(this.wagmiConfig,c);return await Nt(this.wagmiConfig,{hash:u,timeout:25e3}),{hash:u}}async writeContract(e){const{caipNetwork:t,...n}=e,i=Number(ge.caipNetworkIdToNumber(t.caipNetworkId)),c=this.wagmiChains?.find(d=>d.id===i);return{hash:await kt(this.wagmiConfig,{chain:c,address:n.tokenAddress,account:n.fromAddress,abi:n.abi,functionName:n.method,args:n.args,__mode:"prepared"})}}async estimateGas(e){try{return{gas:await vt(this.wagmiConfig,{account:e.address,to:e.to,data:e.data,type:"legacy"})}}catch{throw new Error("WagmiAdapter:estimateGas - error estimating gas")}}parseUnits(e){return at(e.value,e.decimals)}formatUnits(e){return Xe(e.value,e.decimals)}async addWagmiConnector(e){if(!this.namespace)throw new Error("WagmiAdapter:addWagmiConnector - namespace is required");const{enableEIP6963:t}=$.state||{};if(e.type===E.CONNECTOR_ID.INJECTED&&t===!1||e.id===E.CONNECTOR_ID.AUTH||e.id===E.CONNECTOR_ID.WALLET_CONNECT)return;let n;e.id!==E.CONNECTOR_ID.BASE_ACCOUNT&&(n=await e.getProvider().catch(()=>{}));const i=ze.state.connectorImages;this.addConnector({id:e.id,explorerId:j.ConnectorExplorerIds[e.id]??j.ConnectorExplorerIds[e.name],imageUrl:i?.[e.id]??e.icon,name:j.ConnectorNamesMap[e.id]??e.name,imageId:j.ConnectorImageIds[e.id],type:j.ConnectorTypesMap[e.type]??"EXTERNAL",info:e.id===E.CONNECTOR_ID.INJECTED?void 0:{rdns:e.id},provider:n,chain:this.namespace,chains:[]})}async syncConnectors(){Pt(this.wagmiConfig,{onChange:e=>{e.forEach(t=>this.addWagmiConnector(t))}}),this.addWagmiConnectors(),await Promise.all(this.wagmiConfig.connectors.map(e=>this.addWagmiConnector(e))),await this.addThirdPartyConnectors()}async syncConnections(){const e=this.connectors.filter(t=>{const{hasDisconnected:n,hasConnected:i}=X.getConnectorStorageInfo(t.id,this.namespace);return!n&&i}).map(t=>this.getWagmiConnector(t.id)).filter(Boolean);await le(this.wagmiConfig,{connectors:e})}async syncConnection(e){const{id:t,chainId:n}=e,c=M(this.wagmiConfig).find(r=>r.connector.id===t),d=await this.getWagmiConnector(t)?.getProvider();if(te.isSafeApp()&&t===E.CONNECTOR_ID.SAFE&&!c?.accounts.length){const r=this.getWagmiConnector("safe");if(r){const s=await de(this.wagmiConfig,{connector:r,chainId:Number(n)}),l=await r.getProvider();return{chainId:Number(n),address:this.toChecksummedAddress(s.accounts[0]),provider:l,type:c?.connector.type?.toUpperCase(),id:c?.connector.id}}}return{chainId:Number(c?.chainId),address:this.toChecksummedAddress(c?.accounts[0]),provider:d,type:c?.connector.type?.toUpperCase(),id:c?.connector.id}}async connectWalletConnect(e){try{const t=this.getWalletConnectConnector();await t.authenticate();const n=this.getWagmiConnector("walletConnect");if(!n)throw new Error("UniversalAdapter:connectWalletConnect - connector not found");const i=await de(this.wagmiConfig,{connector:n,chainId:e?Number(e):void 0});return i.chainId!==Number(e)&&await Ee(this.wagmiConfig,{chainId:i.chainId}),{clientId:await t.provider.client.core.crypto.getClientId()}}catch(t){throw t instanceof _?new Q(t):Ie.isUserRejectedRequestError(t)?new Q(t):t}}async connect(e){try{const{id:t,address:n,provider:i,type:c,info:u,chainId:d,socialUri:a}=e,r=this.getWagmiConnector(t);if(!r)throw new Error("connectionControllerClient:connectExternal - connector is undefined");i&&u&&r.id===E.CONNECTOR_ID.EIP6963&&r.setEip6963Wallet?.({provider:i,info:u});const s=this.wagmiConfig.state?.connections?.get(r.uid);if(s){await this.wagmiConfig.storage?.setItem("recentConnectorId",r.id);const f=[...s.accounts].sort((p,C)=>X.isLowerCaseMatch(p,n)?-1:X.isLowerCaseMatch(C,n)?1:0);return this.wagmiConfig?.setState(p=>({...p,connections:new Map(p.connections).set(r.uid,{accounts:f,chainId:s.chainId,connector:s.connector}),current:r.uid,status:"connected"})),{address:this.toChecksummedAddress(f[0]),chainId:s.chainId,provider:i,type:c,id:t}}const l=await de(this.wagmiConfig,{connector:r,chainId:d?Number(d):void 0,socialUri:a}),h=i??await r.getProvider();return{address:this.toChecksummedAddress(l.accounts[0]),chainId:l.chainId,provider:h,type:c,id:t}}catch(t){throw t instanceof _?new Q(t):Ie.isUserRejectedRequestError(t)?new Q(t):t}}get connections(){return Array.from(this.wagmiConfig.state.connections.values()).map(e=>({accounts:e.accounts.map(t=>({address:this.toChecksummedAddress(t)})),connectorId:e.connector.id}))}async reconnect(e){const{id:t}=e,n=this.getWagmiConnector(t);if(!n)throw new Error("connectionControllerClient:connectExternal - connector is undefined");await le(this.wagmiConfig,{connectors:[n]})}async getBalance(e){const t=e.address,n=this.getCaipNetworks().find(i=>i.id===e.chainId);if(!t)return Promise.resolve({balance:"0.00",symbol:"ETH"});if(n&&this.wagmiConfig){const i=`${n.caipNetworkId}:${e.address}`,c=this.balancePromises[i];if(c)return c;const u=F.getNativeBalanceCacheForCaipAddress(i);return u?{balance:u.balance,symbol:u.symbol}:(this.balancePromises[i]=new Promise(async d=>{try{const a=Number(e.chainId),r=await yt(this.wagmiConfig,{address:e.address,chainId:a,token:e.tokens?.[n.caipNetworkId]?.address});F.updateNativeBalanceCache({caipAddress:i,balance:r.formatted,symbol:r.symbol,timestamp:Date.now()}),d({balance:r.formatted,symbol:r.symbol})}catch(a){console.warn("Appkit:WagmiAdapter:getBalance - Error getting balance",a),d({balance:"0.00",symbol:"ETH"})}}).finally(()=>{delete this.balancePromises[i]}),this.balancePromises[i]||{balance:"0.00",symbol:"ETH"})}return{balance:"",symbol:""}}getWalletConnectProvider(){return this.getWagmiConnector("walletConnect")?.provider}async disconnect(e){if(e.id){const t=this.getWagmiConnector(e.id),i=M(this.wagmiConfig).find(c=>X.isLowerCaseMatch(c.connector.id,e.id));return await be(this.wagmiConfig,{connector:t}),$.state.enableReconnect===!1&&this.deleteConnection(e.id),i?{connections:[{accounts:i.accounts.map(c=>({address:this.toChecksummedAddress(c)})),connectorId:i.connector.id}]}:{connections:[]}}return this.disconnectAll()}async disconnectAll(){const e=M(this.wagmiConfig),t=await Promise.allSettled(e.map(async n=>{const i=this.getWagmiConnector(n.connector.id);return i&&await be(this.wagmiConfig,{connector:i}),n}));return this.wagmiConfig.state.connections.clear(),{connections:t.filter(n=>n.status==="fulfilled").map(({value:n})=>({accounts:n.accounts.map(i=>({address:this.toChecksummedAddress(i)})),connectorId:n.connector.id}))}}async switchNetwork(e){const{caipNetwork:t}=e,n=this.wagmiConfig.chains.find(f=>f.id.toString()===t.id.toString());if(!n)throw new Error("connectionControllerClient:switchNetwork - wagmiChain is undefined");const{name:i,nativeCurrency:c,rpcUrls:u,blockExplorers:d,id:a}=n,r=t.rpcUrls?.chainDefault?.http?.[0]??u.default.http[0]??"",s=d?.default.url??t.blockExplorers?.default?.url??"",l=c??t.nativeCurrency,h=i??t.name;await Ee(this.wagmiConfig,{chainId:a,addEthereumChainParameter:{chainName:h,nativeCurrency:l,rpcUrls:[r],blockExplorerUrls:[s]}}),await super.switchNetwork(e)}async getCapabilities(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:getCapabilities - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],i=n?this.getWagmiConnector(n.connector.id):null;if(!i)throw new Error("connectionControllerClient:getCapabilities - connector is undefined");const c=await i.getProvider();if(!c)throw new Error("connectionControllerClient:getCapabilities - provider is undefined");return await c.request({method:"wallet_getCapabilities",params:[e]})}async grantPermissions(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:grantPermissions - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],i=n?this.getWagmiConnector(n.connector.id):null;if(!i)throw new Error("connectionControllerClient:grantPermissions - connector is undefined");const c=await i.getProvider();if(!c)throw new Error("connectionControllerClient:grantPermissions - provider is undefined");return c.request({method:"wallet_grantPermissions",params:e})}async revokePermissions(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:revokePermissions - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],i=n?this.getWagmiConnector(n.connector.id):null;if(!i)throw new Error("connectionControllerClient:revokePermissions - connector is undefined");const c=await i.getProvider();if(!c)throw new Error("connectionControllerClient:revokePermissions - provider is undefined");return c.request({method:"wallet_revokePermissions",params:e})}async walletGetAssets(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:walletGetAssets - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],i=n?this.getWagmiConnector(n.connector.id):null;if(!i)throw new Error("connectionControllerClient:walletGetAssets - connector is undefined");const c=await i.getProvider();if(!c)throw new Error("connectionControllerClient:walletGetAssets - provider is undefined");return c.request({method:"wallet_getAssets",params:[e]})}setAuthProvider(e){if(!this.namespace)throw new Error("WagmiAdapter:setAuthProvider - namespace is required");this.addConnector({id:E.CONNECTOR_ID.AUTH,type:"AUTH",name:E.CONNECTOR_NAMES.AUTH,provider:e,imageId:j.ConnectorImageIds[E.CONNECTOR_ID.AUTH],chain:this.namespace,chains:[]})}async setUniversalProvider(e){e.on("connect",()=>{const n=M(this.wagmiConfig),i=this.getWagmiConnector("walletConnect");if(i&&!n.find(c=>c.connector.id===i.id)){if(S.state.activeChain==="eip155")return;le(this.wagmiConfig,{connectors:[i]})}});const t=pe({universalProvider:e});return this.configureInternalConnector(t),this.addConnector(new Ve({provider:e,caipNetworks:this.getCaipNetworks(),namespace:"eip155"})),Promise.resolve()}toChecksummedAddress(e){return et(e.toLowerCase())}}const ln=Object.freeze(Object.defineProperty({__proto__:null,WagmiAdapter:Yt,authConnector:Me},Symbol.toStringTag,{value:"Module"}));export{z as C,W as P,mt as a,ln as b,un as c,ce as i};
@@ -1,4 +1,4 @@
1
- import{C as l,E as g,R as h,o as m,S as w,b as s,r as E,t as _}from"./W3MFrameProviderSingleton-9eitOT0j.js";import{ap as R}from"./NetworkUtil-DqGcuBfF.js";import{i as b,b as y}from"./lit-element-Cn7T8F1W.js";import{n as p}from"./class-map-mFRv1nW8.js";import{o as O}from"./if-defined-DsPifBxM.js";import{c as v}from"./index-wds8TuUm.js";import{d as C,r as S,e as $}from"./index-DbAu4Peg.js";function I(){try{return s.returnOpenHref(`${R.SECURE_SITE_SDK_ORIGIN}/loading`,"popupWindow","width=600,height=800,scrollbars=yes")}catch{throw new Error("Could not open social popup")}}async function L(){h.push("ConnectingFarcaster");const e=m.getAuthConnector();if(e&&!l.getAccountData()?.farcasterUrl)try{const{url:t}=await e.provider.getFarcasterUri();l.setAccountProp("farcasterUrl",t,l.state.activeChain)}catch(t){h.goBack(),w.showError(t)}}async function T(e){h.push("ConnectingSocial");const r=m.getAuthConnector();let t=null;try{const i=setTimeout(()=>{throw new Error("Social login timed out. Please try again.")},45e3);if(r&&e){if(s.isTelegram()||(t=I()),t)l.setAccountProp("socialWindow",E(t),l.state.activeChain);else if(!s.isTelegram())throw new Error("Could not create social popup");const{uri:n}=await r.provider.getSocialRedirectUri({provider:e});if(!n)throw t?.close(),new Error("Could not fetch the social redirect uri");if(t&&(t.location.href=n),s.isTelegram()){_.setTelegramSocialProvider(e);const o=s.formatTelegramSocialLoginUrl(n);s.openHref(o,"_top")}clearTimeout(i)}}catch(i){t?.close();const n=s.parseError(i);w.showError(n),g.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:e,message:n}})}}async function H(e){l.setAccountProp("socialProvider",e,l.state.activeChain),g.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}}),e==="farcaster"?await L():await T(e)}const U=C`
1
+ import{C as l,E as g,R as h,o as m,S as w,b as s,r as E,t as _}from"./W3MFrameProviderSingleton-eYQGtm7P.js";import{ap as R}from"./NetworkUtil-XsBaDkTf.js";import{i as b,b as y}from"./lit-element-Cn7T8F1W.js";import{n as p}from"./class-map-mFRv1nW8.js";import{o as O}from"./if-defined-DsPifBxM.js";import{c as v}from"./index-CYGUludi.js";import{d as C,r as S,e as $}from"./index-mUrlue57.js";function I(){try{return s.returnOpenHref(`${R.SECURE_SITE_SDK_ORIGIN}/loading`,"popupWindow","width=600,height=800,scrollbars=yes")}catch{throw new Error("Could not open social popup")}}async function L(){h.push("ConnectingFarcaster");const e=m.getAuthConnector();if(e&&!l.getAccountData()?.farcasterUrl)try{const{url:t}=await e.provider.getFarcasterUri();l.setAccountProp("farcasterUrl",t,l.state.activeChain)}catch(t){h.goBack(),w.showError(t)}}async function T(e){h.push("ConnectingSocial");const r=m.getAuthConnector();let t=null;try{const i=setTimeout(()=>{throw new Error("Social login timed out. Please try again.")},45e3);if(r&&e){if(s.isTelegram()||(t=I()),t)l.setAccountProp("socialWindow",E(t),l.state.activeChain);else if(!s.isTelegram())throw new Error("Could not create social popup");const{uri:n}=await r.provider.getSocialRedirectUri({provider:e});if(!n)throw t?.close(),new Error("Could not fetch the social redirect uri");if(t&&(t.location.href=n),s.isTelegram()){_.setTelegramSocialProvider(e);const o=s.formatTelegramSocialLoginUrl(n);s.openHref(o,"_top")}clearTimeout(i)}}catch(i){t?.close();const n=s.parseError(i);w.showError(n),g.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:e,message:n}})}}async function H(e){l.setAccountProp("socialProvider",e,l.state.activeChain),g.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}}),e==="farcaster"?await L():await T(e)}const U=C`
2
2
  :host {
3
3
  display: flex;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{w as t,a as d,i as p,b as n}from"./lit-element-Cn7T8F1W.js";import{n as f}from"./class-map-mFRv1nW8.js";import{c as w,t as k}from"./index-wds8TuUm.js";import{r as v}from"./index-DbAu4Peg.js";const g=t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ import{w as t,a as d,i as p,b as n}from"./lit-element-Cn7T8F1W.js";import{n as f}from"./class-map-mFRv1nW8.js";import{c as w,t as k}from"./index-CYGUludi.js";import{r as v}from"./index-mUrlue57.js";const g=t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <rect width="64" height="64" fill="#F7931A"/>
3
3
  <g clip-path="url(#clip0_1045_17)">
4
4
  <path d="M63.0394 39.7409C58.7654 56.8839 41.4024 67.3169 24.2574 63.0419C7.11937 58.7679 -3.31363 41.4039 0.962367 24.2619C5.23437 7.11686 22.5974 -3.31714 39.7374 0.956863C56.8814 5.23086 67.3134 22.5969 63.0394 39.7409Z" fill="#F7931A"/>
@@ -1,4 +1,4 @@
1
- import{i as b,b as l,a as E}from"./lit-element-Cn7T8F1W.js";import{n as h,r as d}from"./class-map-mFRv1nW8.js";import{d as C,r as O,e as P}from"./index-DbAu4Peg.js";import{c as v,U as x}from"./index-wds8TuUm.js";import"./index-aoxVkzFE.js";import"./index-B9U0GcYk.js";import{u as g,R as S,o as $,b as R,S as T}from"./W3MFrameProviderSingleton-9eitOT0j.js";const L=C`
1
+ import{i as b,b as l,a as E}from"./lit-element-Cn7T8F1W.js";import{n as h,r as d}from"./class-map-mFRv1nW8.js";import{d as C,r as O,e as P}from"./index-mUrlue57.js";import{c as v,U as x}from"./index-CYGUludi.js";import"./index-BVL3WVs3.js";import"./index-3gZjXx6v.js";import{u as g,R as S,o as $,b as R,S as T}from"./W3MFrameProviderSingleton-eYQGtm7P.js";const L=C`
2
2
  :host {
3
3
  position: relative;
4
4
  display: inline-block;
@@ -1,4 +1,4 @@
1
- import{i as T,b as l}from"./lit-element-Cn7T8F1W.js";import{n as u,r as I}from"./class-map-mFRv1nW8.js";import{d as D,r as q}from"./index-DbAu4Peg.js";import{U,c as A}from"./index-wds8TuUm.js";import{g as S,c as B,d as Y,f as G}from"./index-Cu4ZjLNb.js";import"./index-C5ciuua_.js";import"./index-aoxVkzFE.js";import{o as V}from"./if-defined-DsPifBxM.js";import"./index-i4VBSYqA.js";import"./index-TBthDmkl.js";import{C,Y as p,b as N,R as W,O as H,E as K,l as J,W as Q}from"./W3MFrameProviderSingleton-9eitOT0j.js";var X=B();const $=S(X);var Z=Y();const ee=S(Z);var te=G();const ie=S(te);var F={exports:{}},re=F.exports,M;function ne(){return M||(M=1,(function(e,t){(function(i,n){e.exports=n()})(re,(function(){return function(i,n,a){a.updateLocale=function(r,s){var o=a.Ls[r];if(o)return(s?Object.keys(s):[]).forEach((function(c){o[c]=s[c]})),o}}}))})(F)),F.exports}var ae=ne();const se=S(ae);$.extend(ie);$.extend(se);const oe={...ee,name:"en-web3-modal",relativeTime:{future:"in %s",past:"%s ago",s:"%d sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}},le=["January","February","March","April","May","June","July","August","September","October","November","December"];$.locale("en-web3-modal",oe);const j={getMonthNameByIndex(e){return le[e]},getYear(e=new Date().toISOString()){return $(e).year()},getRelativeDateFromNow(e){return $(e).locale("en-web3-modal").fromNow(!0)},formatDate(e,t="DD MMM"){return $(e).format(t)}},ce=3,R=.1,ue=["receive","deposit","borrow","claim"],de=["withdraw","repay","burn"],v={getTransactionGroupTitle(e,t){const i=j.getYear(),n=j.getMonthNameByIndex(t);return e===i?n:`${n} ${e}`},getTransactionImages(e){const[t]=e;return e?.length>1?e.map(n=>this.getTransactionImage(n)):[this.getTransactionImage(t)]},getTransactionImage(e){return{type:v.getTransactionTransferTokenType(e),url:v.getTransactionImageURL(e)}},getTransactionImageURL(e){let t;const i=!!e?.nft_info,n=!!e?.fungible_info;return e&&i?t=e?.nft_info?.content?.preview?.url:e&&n&&(t=e?.fungible_info?.icon?.url),t},getTransactionTransferTokenType(e){if(e?.fungible_info)return"FUNGIBLE";if(e?.nft_info)return"NFT"},getTransactionDescriptions(e,t){const i=e?.metadata?.operationType,n=t||e?.transfers,a=n&&n.length>0,r=n&&n.length>1,s=a&&n.every(_=>!!_?.fungible_info),[o,c]=n||[];let d=this.getTransferDescription(o),m=this.getTransferDescription(c);if(!a)return(i==="send"||i==="receive")&&s?(d=U.getTruncateString({string:e?.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),m=U.getTruncateString({string:e?.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[d,m]):[e.metadata.status];if(r)return n?.map(_=>this.getTransferDescription(_));let k="";return ue.includes(i)?k="+":de.includes(i)&&(k="-"),d=k.concat(d),[d]},getTransferDescription(e){let t="";return e&&(e?.nft_info?t=e?.nft_info?.name||"-":e?.fungible_info&&(t=this.getFungibleTransferDescription(e)||"-")),t},getFungibleTransferDescription(e){return e?[this.getQuantityFixedValue(e?.quantity.numeric),e?.fungible_info?.symbol].join(" ").trim():null},mergeTransfers(e){if(e?.length<=1)return e;const i=this.filterGasFeeTransfers(e).reduce((a,r)=>{const s=r?.fungible_info?.name,o=a.find(({fungible_info:c,direction:d})=>s&&s===c?.name&&d===r.direction);if(o){const c=Number(o.quantity.numeric)+Number(r.quantity.numeric);o.quantity.numeric=c.toString(),o.value=(o.value||0)+(r.value||0)}else a.push(r);return a},[]);let n=i;return i.length>2&&(n=i.sort((a,r)=>(r.value||0)-(a.value||0)).slice(0,2)),n=n.sort((a,r)=>a.direction==="out"&&r.direction==="in"?-1:a.direction==="in"&&r.direction==="out"?1:0),n},filterGasFeeTransfers(e){const t=e?.reduce((n,a)=>{const r=a?.fungible_info?.name;return r&&(n[r]||(n[r]=[]),n[r].push(a)),n},{}),i=[];return Object.values(t??{}).forEach(n=>{if(n.length===1){const a=n[0];a&&i.push(a)}else{const a=n.filter(s=>s.direction==="in"),r=n.filter(s=>s.direction==="out");if(a.length===1&&r.length===1){const s=a[0],o=r[0];let c=!1;if(s&&o){const d=Number(s.quantity.numeric),m=Number(o.quantity.numeric);m<d*R?(i.push(s),c=!0):d<m*R&&(i.push(o),c=!0)}c||i.push(...n)}else{const s=this.filterGasFeesFromTokenGroup(n);i.push(...s)}}}),e?.forEach(n=>{n?.fungible_info?.name||i.push(n)}),i},filterGasFeesFromTokenGroup(e){if(e.length<=1)return e;const t=e?.map(o=>Number(o.quantity.numeric)),i=Math.max(...t),n=Math.min(...t),a=.01;if(n<i*a)return e?.filter(c=>Number(c.quantity.numeric)>=i*a);const r=e?.filter(o=>o.direction==="in"),s=e?.filter(o=>o.direction==="out");if(r.length===1&&s.length===1){const o=r[0],c=s[0];if(o&&c){const d=Number(o.quantity.numeric),m=Number(c.quantity.numeric);if(m<d*R)return[o];if(d<m*R)return[c]}}return e},getQuantityFixedValue(e){return e?parseFloat(e).toFixed(ce):null}};var z;(function(e){e.approve="approved",e.bought="bought",e.borrow="borrowed",e.burn="burnt",e.cancel="canceled",e.claim="claimed",e.deploy="deployed",e.deposit="deposited",e.execute="executed",e.mint="minted",e.receive="received",e.repay="repaid",e.send="sent",e.sell="sold",e.stake="staked",e.trade="swapped",e.unstake="unstaked",e.withdraw="withdrawn"})(z||(z={}));const pe=D`
1
+ import{i as T,b as l}from"./lit-element-Cn7T8F1W.js";import{n as u,r as I}from"./class-map-mFRv1nW8.js";import{d as D,r as q}from"./index-mUrlue57.js";import{U,c as A}from"./index-CYGUludi.js";import{g as S,c as B,d as Y,f as G}from"./index-a-a2MqTK.js";import"./index-DcSeumRb.js";import"./index-BVL3WVs3.js";import{o as V}from"./if-defined-DsPifBxM.js";import"./index-CzGhZ9cz.js";import"./index-BYwd36WC.js";import{C,Y as p,b as N,R as W,O as H,E as K,l as J,W as Q}from"./W3MFrameProviderSingleton-eYQGtm7P.js";var X=B();const $=S(X);var Z=Y();const ee=S(Z);var te=G();const ie=S(te);var F={exports:{}},re=F.exports,M;function ne(){return M||(M=1,(function(e,t){(function(i,n){e.exports=n()})(re,(function(){return function(i,n,a){a.updateLocale=function(r,s){var o=a.Ls[r];if(o)return(s?Object.keys(s):[]).forEach((function(c){o[c]=s[c]})),o}}}))})(F)),F.exports}var ae=ne();const se=S(ae);$.extend(ie);$.extend(se);const oe={...ee,name:"en-web3-modal",relativeTime:{future:"in %s",past:"%s ago",s:"%d sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}},le=["January","February","March","April","May","June","July","August","September","October","November","December"];$.locale("en-web3-modal",oe);const j={getMonthNameByIndex(e){return le[e]},getYear(e=new Date().toISOString()){return $(e).year()},getRelativeDateFromNow(e){return $(e).locale("en-web3-modal").fromNow(!0)},formatDate(e,t="DD MMM"){return $(e).format(t)}},ce=3,R=.1,ue=["receive","deposit","borrow","claim"],de=["withdraw","repay","burn"],v={getTransactionGroupTitle(e,t){const i=j.getYear(),n=j.getMonthNameByIndex(t);return e===i?n:`${n} ${e}`},getTransactionImages(e){const[t]=e;return e?.length>1?e.map(n=>this.getTransactionImage(n)):[this.getTransactionImage(t)]},getTransactionImage(e){return{type:v.getTransactionTransferTokenType(e),url:v.getTransactionImageURL(e)}},getTransactionImageURL(e){let t;const i=!!e?.nft_info,n=!!e?.fungible_info;return e&&i?t=e?.nft_info?.content?.preview?.url:e&&n&&(t=e?.fungible_info?.icon?.url),t},getTransactionTransferTokenType(e){if(e?.fungible_info)return"FUNGIBLE";if(e?.nft_info)return"NFT"},getTransactionDescriptions(e,t){const i=e?.metadata?.operationType,n=t||e?.transfers,a=n&&n.length>0,r=n&&n.length>1,s=a&&n.every(_=>!!_?.fungible_info),[o,c]=n||[];let d=this.getTransferDescription(o),m=this.getTransferDescription(c);if(!a)return(i==="send"||i==="receive")&&s?(d=U.getTruncateString({string:e?.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),m=U.getTruncateString({string:e?.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[d,m]):[e.metadata.status];if(r)return n?.map(_=>this.getTransferDescription(_));let k="";return ue.includes(i)?k="+":de.includes(i)&&(k="-"),d=k.concat(d),[d]},getTransferDescription(e){let t="";return e&&(e?.nft_info?t=e?.nft_info?.name||"-":e?.fungible_info&&(t=this.getFungibleTransferDescription(e)||"-")),t},getFungibleTransferDescription(e){return e?[this.getQuantityFixedValue(e?.quantity.numeric),e?.fungible_info?.symbol].join(" ").trim():null},mergeTransfers(e){if(e?.length<=1)return e;const i=this.filterGasFeeTransfers(e).reduce((a,r)=>{const s=r?.fungible_info?.name,o=a.find(({fungible_info:c,direction:d})=>s&&s===c?.name&&d===r.direction);if(o){const c=Number(o.quantity.numeric)+Number(r.quantity.numeric);o.quantity.numeric=c.toString(),o.value=(o.value||0)+(r.value||0)}else a.push(r);return a},[]);let n=i;return i.length>2&&(n=i.sort((a,r)=>(r.value||0)-(a.value||0)).slice(0,2)),n=n.sort((a,r)=>a.direction==="out"&&r.direction==="in"?-1:a.direction==="in"&&r.direction==="out"?1:0),n},filterGasFeeTransfers(e){const t=e?.reduce((n,a)=>{const r=a?.fungible_info?.name;return r&&(n[r]||(n[r]=[]),n[r].push(a)),n},{}),i=[];return Object.values(t??{}).forEach(n=>{if(n.length===1){const a=n[0];a&&i.push(a)}else{const a=n.filter(s=>s.direction==="in"),r=n.filter(s=>s.direction==="out");if(a.length===1&&r.length===1){const s=a[0],o=r[0];let c=!1;if(s&&o){const d=Number(s.quantity.numeric),m=Number(o.quantity.numeric);m<d*R?(i.push(s),c=!0):d<m*R&&(i.push(o),c=!0)}c||i.push(...n)}else{const s=this.filterGasFeesFromTokenGroup(n);i.push(...s)}}}),e?.forEach(n=>{n?.fungible_info?.name||i.push(n)}),i},filterGasFeesFromTokenGroup(e){if(e.length<=1)return e;const t=e?.map(o=>Number(o.quantity.numeric)),i=Math.max(...t),n=Math.min(...t),a=.01;if(n<i*a)return e?.filter(c=>Number(c.quantity.numeric)>=i*a);const r=e?.filter(o=>o.direction==="in"),s=e?.filter(o=>o.direction==="out");if(r.length===1&&s.length===1){const o=r[0],c=s[0];if(o&&c){const d=Number(o.quantity.numeric),m=Number(c.quantity.numeric);if(m<d*R)return[o];if(d<m*R)return[c]}}return e},getQuantityFixedValue(e){return e?parseFloat(e).toFixed(ce):null}};var z;(function(e){e.approve="approved",e.bought="bought",e.borrow="borrowed",e.burn="burnt",e.cancel="canceled",e.claim="claimed",e.deploy="deployed",e.deposit="deposited",e.execute="executed",e.mint="minted",e.receive="received",e.repay="repaid",e.send="sent",e.sell="sold",e.stake="staked",e.trade="swapped",e.unstake="unstaked",e.withdraw="withdrawn"})(z||(z={}));const pe=D`
2
2
  :host > wui-flex {
3
3
  display: flex;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{a as m,i as f,b as d}from"./lit-element-Cn7T8F1W.js";import{n as p}from"./class-map-mFRv1nW8.js";import{o as c}from"./if-defined-DsPifBxM.js";import{c as b}from"./index-wds8TuUm.js";import{r as h}from"./index-DbAu4Peg.js";import"./index-JfVynEph.js";const v=m`
1
+ import{a as m,i as f,b as d}from"./lit-element-Cn7T8F1W.js";import{n as p}from"./class-map-mFRv1nW8.js";import{o as c}from"./if-defined-DsPifBxM.js";import{c as b}from"./index-CYGUludi.js";import{r as h}from"./index-mUrlue57.js";import"./index-BUjSLaXy.js";const v=m`
2
2
  :host {
3
3
  position: relative;
4
4
  display: inline-block;
@@ -1,4 +1,4 @@
1
- import{a as b,i as g,b as m}from"./lit-element-Cn7T8F1W.js";import{n as v,r as h}from"./class-map-mFRv1nW8.js";import{d as y}from"./index-DbAu4Peg.js";import{c as w}from"./index-wds8TuUm.js";import{j as x,e as $,i as R,p as T,R as C,M as P}from"./W3MFrameProviderSingleton-9eitOT0j.js";const s=T({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),_={state:s,subscribe(t){return R(s,()=>t(s))},subscribeKey(t,e){return $(s,t,e)},showTooltip({message:t,triggerRect:e,variant:o}){s.open=!0,s.message=t,s.triggerRect=e,s.variant=o},hide(){s.open=!1,s.message="",s.triggerRect={width:0,height:0,top:0,left:0}}},a=x(_),j=b`
1
+ import{a as b,i as g,b as m}from"./lit-element-Cn7T8F1W.js";import{n as v,r as h}from"./class-map-mFRv1nW8.js";import{d as y}from"./index-mUrlue57.js";import{c as w}from"./index-CYGUludi.js";import{j as x,e as $,i as R,p as T,R as C,M as P}from"./W3MFrameProviderSingleton-eYQGtm7P.js";const s=T({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),_={state:s,subscribe(t){return R(s,()=>t(s))},subscribeKey(t,e){return $(s,t,e)},showTooltip({message:t,triggerRect:e,variant:o}){s.open=!0,s.message=t,s.triggerRect=e,s.variant=o},hide(){s.open=!1,s.message="",s.triggerRect={width:0,height:0,top:0,left:0}}},a=x(_),j=b`
2
2
  :host {
3
3
  width: 100%;
4
4
  display: block;
@@ -1,4 +1,4 @@
1
- import{i as c,b as r}from"./lit-element-Cn7T8F1W.js";import{n as o}from"./class-map-mFRv1nW8.js";import{o as h}from"./if-defined-DsPifBxM.js";import{e as m,n as b}from"./ref-CYZXcxoe.js";import{c as f}from"./index-wds8TuUm.js";import{d as x,r as $,e as g}from"./index-DbAu4Peg.js";const w=x`
1
+ import{i as c,b as r}from"./lit-element-Cn7T8F1W.js";import{n as o}from"./class-map-mFRv1nW8.js";import{o as h}from"./if-defined-DsPifBxM.js";import{e as m,n as b}from"./ref-CYZXcxoe.js";import{c as f}from"./index-CYGUludi.js";import{d as x,r as $,e as g}from"./index-mUrlue57.js";const w=x`
2
2
  :host {
3
3
  position: relative;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{i as b,b as l}from"./lit-element-Cn7T8F1W.js";import{n as s}from"./class-map-mFRv1nW8.js";import{c as p}from"./index-wds8TuUm.js";import{d as m,r as f,e as v}from"./index-DbAu4Peg.js";const h=m`
1
+ import{i as b,b as l}from"./lit-element-Cn7T8F1W.js";import{n as s}from"./class-map-mFRv1nW8.js";import{c as p}from"./index-CYGUludi.js";import{d as m,r as f,e as v}from"./index-mUrlue57.js";const h=m`
2
2
  button {
3
3
  border: none;
4
4
  background: transparent;