@privy-io/react-auth 3.10.1 → 3.10.2

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 (231) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-DpWbazhN.js → AccountNotFoundScreen-CccXh5Ow.js} +1 -1
  2. package/dist/cjs/{Address-B_I2EZZe.js → Address-szbhr3eZ.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-9ZT_Z3WZ.js → AffirmativeConsentScreen-DmfPpl2i.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-DkSBlXbO.js → AllowlistRejectionScreen-B75b3HjF.js} +1 -1
  5. package/dist/cjs/{AuthenticateWithWalletScreen-B8X_BqjA.js → AuthenticateWithWalletScreen-CMdBkn5P.js} +1 -1
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-TqLrYeHi.js → AwaitingEvmToSolBridgingScreen-zqMa3M-c.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-Dy4mxIoc.js → AwaitingExternalEthereumTransferScreen-Tm1ncf9g.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-gcHc0S-p.js → AwaitingPasswordlessCodeScreen-DSJA4ZJF.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-DtJ9-ogk.js → AwaitingSolToEvmBridgingScreen-Wrz0ccTo.js} +1 -1
  10. package/dist/cjs/{BridgeNetworkSelectionView-dk0l0q-M.js → BridgeNetworkSelectionView-CfUjmKJ-.js} +1 -1
  11. package/dist/cjs/{Button-BEaVAnh4.js → Button-CyX7JNsa.js} +1 -1
  12. package/dist/cjs/{CaptchaScreen-C_mEgCfb.js → CaptchaScreen-MhvzUgNQ.js} +1 -1
  13. package/dist/cjs/{CoinbaseOnrampStatusScreen-retAGRaW.js → CoinbaseOnrampStatusScreen-BhR230ZS.js} +1 -1
  14. package/dist/cjs/{ConnectEmailForm-CfACIV6_.js → ConnectEmailForm-BSkD5EKc.js} +1 -1
  15. package/dist/cjs/{ConnectLedgerScreen-B_lID1I6.js → ConnectLedgerScreen-BvlmHoA3.js} +1 -1
  16. package/dist/cjs/{ConnectOnlyLandingScreen-ByTgLbTP.js → ConnectOnlyLandingScreen-nbPM7web.js} +1 -1
  17. package/dist/cjs/{ConnectOnlyStatusScreen-9JAufomE.js → ConnectOnlyStatusScreen-C2Wl0jxa.js} +1 -1
  18. package/dist/cjs/{ConnectOrCreateScreen-BF_OuFpX.js → ConnectOrCreateScreen-CtzSeQ-J.js} +1 -1
  19. package/dist/cjs/{ConnectPhoneForm-C0SpJtis.js → ConnectPhoneForm-BYlpF5oC.js} +1 -1
  20. package/dist/cjs/ConnectWalletView-O70yBQFu.js +1 -0
  21. package/dist/cjs/{ConnectionStatusScreen-CLgTwzQu.js → ConnectionStatusScreen-DML_ZDfW.js} +1 -1
  22. package/dist/cjs/CrossAppAuthScreen-Dz6PZNOw.js +1 -0
  23. package/dist/cjs/CustomLandingScreenView-CBW3Yr3o.js +2 -0
  24. package/dist/cjs/{DelegatedActionsConsentScreen-Co_Y95XG.js → DelegatedActionsConsentScreen-CN5Y30M4.js} +1 -1
  25. package/dist/cjs/{DelegatedActionsRevokeScreen-YAYK0-5r.js → DelegatedActionsRevokeScreen-CMkHii4b.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletConnectingScreen-ziUZeTLk.js → EmbeddedWalletConnectingScreen-SBfyKPRv.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletCreatedScreen-CG0y5Ke2.js → EmbeddedWalletCreatedScreen-sMHJGzfv.js} +1 -1
  28. package/dist/cjs/{EmbeddedWalletKeyExportScreen-DFqz986K.js → EmbeddedWalletKeyExportScreen-C5uNOzfr.js} +1 -1
  29. package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-B4WNBQna.js → EmbeddedWalletOnAccountCreateScreen-B84q1xGE.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-Y2DUG4YB.js → EmbeddedWalletPasswordUpdateScreen-CxeydwO6.js} +1 -1
  31. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-Dy8KboAq.js → EmbeddedWalletPasswordUpdateSplashScreen-BVc-qFqk.js} +1 -1
  32. package/dist/cjs/{EnrollTotp-CasC3VFI.js → EnrollTotp-DQKYLdAQ.js} +1 -1
  33. package/dist/cjs/{ErrorScreen-BrKj88o9.js → ErrorScreen-MrSIGio_.js} +1 -1
  34. package/dist/cjs/{FarcasterConnectStatusScreen-BLXWWJmD.js → FarcasterConnectStatusScreen-BYDqDWAC.js} +1 -1
  35. package/dist/cjs/{FarcasterSignerStatusScreen-Cr0xAGvg.js → FarcasterSignerStatusScreen-Bik8wrMR.js} +1 -1
  36. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-BdR31dg6.js → FundSolWalletWithExternalSolanaWallet-CUYnW9m7.js} +1 -1
  37. package/dist/cjs/{FundWalletMethodHeader-CxH_zVnz.js → FundWalletMethodHeader-D2b7Summ.js} +1 -1
  38. package/dist/cjs/{FundingEditAmountScreen-CP4EaEYh.js → FundingEditAmountScreen-BNL_9NSc.js} +1 -1
  39. package/dist/cjs/{FundingMethodSelectionScreen-BgZw0u6b.js → FundingMethodSelectionScreen-pjtPGWB4.js} +1 -1
  40. package/dist/cjs/HCaptchaWrapper-CxqJE5RH.js +1 -0
  41. package/dist/cjs/{InAppBrowserLoginNotPossible-Cg9HwW8w.js → InAppBrowserLoginNotPossible-BDP_0K6U.js} +1 -1
  42. package/dist/cjs/{InstallWalletScreen-DRTLmXtV.js → InstallWalletScreen-DatnwQ5S.js} +1 -1
  43. package/dist/cjs/{LandingScreen-Crcwq_g8.js → LandingScreen-PhSFsQAW.js} +1 -1
  44. package/dist/cjs/{LinkConflictScreen-C3dRaiQk.js → LinkConflictScreen-DhG3p7sJ.js} +1 -1
  45. package/dist/cjs/{LinkEmailScreen-DgQb2Wg1.js → LinkEmailScreen-nUhaHOKN.js} +1 -1
  46. package/dist/cjs/{LinkPasskeyScreen-52yLU_Q-.js → LinkPasskeyScreen-n7IJuNlF.js} +1 -1
  47. package/dist/cjs/{LinkPhoneScreen-DQXhoFL4.js → LinkPhoneScreen-Dek16_Y5.js} +1 -1
  48. package/dist/cjs/{LoginFailedScreen-yCmKlIj1.js → LoginFailedScreen-Du15IoL5.js} +1 -1
  49. package/dist/cjs/{ManualTransferScreen-Dk4BMFPw.js → ManualTransferScreen-CBWn4JvN.js} +1 -1
  50. package/dist/cjs/{MfaAuthEnrollmentFlowScreen-yFdG0eOh.js → MfaAuthEnrollmentFlowScreen-BT0TbVv2.js} +1 -1
  51. package/dist/cjs/{MfaAuthVerifyFlowScreen-BZJ1SkGe.js → MfaAuthVerifyFlowScreen-CRQ4FiuC.js} +1 -1
  52. package/dist/cjs/{MfaEnrollmentFlowScreen-DSsoPwhQ.js → MfaEnrollmentFlowScreen-CqRzU9XV.js} +1 -1
  53. package/dist/cjs/{MfaVerifyFlowScreen-CtOltjrq.js → MfaVerifyFlowScreen-BDOehbLb.js} +1 -1
  54. package/dist/cjs/{ModalHeader-n6Aqpos_.js → ModalHeader-D9UKo-3h.js} +1 -1
  55. package/dist/cjs/{MoonpayStatusScreen-IxyonJvb.js → MoonpayStatusScreen-CdZgJRrM.js} +1 -1
  56. package/dist/cjs/{OAuthStatusScreen-D1DDf9yn.js → OAuthStatusScreen-CIma0mu9.js} +1 -1
  57. package/dist/cjs/{PasskeySelectSignupOrLogin-D4XaKl_E.js → PasskeySelectSignupOrLogin-D1NqVZW7.js} +1 -1
  58. package/dist/cjs/{PasskeyStatusScreen-CFQM6Nh7.js → PasskeyStatusScreen-Q0ehEMbT.js} +1 -1
  59. package/dist/cjs/{PasswordRecoveryScreen-DZhILc6f.js → PasswordRecoveryScreen-C3g17CVW.js} +1 -1
  60. package/dist/cjs/{QrCode-D-MkB93C.js → QrCode-DWvu0AHR.js} +1 -1
  61. package/dist/cjs/{RecoveryOAuthStatusScreen-C47Vu6bz.js → RecoveryOAuthStatusScreen-DN0I--HN.js} +1 -1
  62. package/dist/cjs/{RecoveryPasswordCreateScreen-Cd7NUBpB.js → RecoveryPasswordCreateScreen-BAAoBkhn.js} +1 -1
  63. package/dist/cjs/{RecoverySelectionScreen-C62og2VL.js → RecoverySelectionScreen-Chnml1GU.js} +1 -1
  64. package/dist/cjs/{Screen-J7z62u7O.js → Screen-Cjd8kgCg.js} +1 -1
  65. package/dist/cjs/{ScreenLayout-D6r13vU7.js → ScreenLayout-0BeoRza6.js} +1 -1
  66. package/dist/cjs/{SetAutomaticRecoveryScreen-3unBTQcy.js → SetAutomaticRecoveryScreen-C82NF48g.js} +1 -1
  67. package/dist/cjs/{SetWalletPasswordForm-Bw9mi-NI.js → SetWalletPasswordForm-CwwM_HsZ.js} +1 -1
  68. package/dist/cjs/{SignRequestScreen-ZHkIJ3-6.js → SignRequestScreen-CN-YxEIW.js} +1 -1
  69. package/dist/cjs/{StandardSignAndSendTransactionScreen-A5KpXb14.js → StandardSignAndSendTransactionScreen-BWqXsnZ-.js} +1 -1
  70. package/dist/cjs/{TelegramAuthScreen-qw6gcnZA.js → TelegramAuthScreen-JINnIb1q.js} +1 -1
  71. package/dist/cjs/{TransactionDetails-6aFlRhNd.js → TransactionDetails-DHxuRDQm.js} +1 -1
  72. package/dist/cjs/{TransactionErrorView-U-Fg5udU.js → TransactionErrorView-DV1Rbaza.js} +1 -1
  73. package/dist/cjs/{TransferFromWalletScreen-DnUQ6O_8.js → TransferFromWalletScreen-D1RGQm-9.js} +1 -1
  74. package/dist/cjs/{TransferOrBridgeLoadingScreen-C3pf0mwq.js → TransferOrBridgeLoadingScreen-0auJk1V_.js} +1 -1
  75. package/dist/cjs/{UpdateEmailScreen-dPy98Sn_.js → UpdateEmailScreen-CjEQsyJ6.js} +1 -1
  76. package/dist/cjs/{UpdatePhoneScreen-CtNBijCK.js → UpdatePhoneScreen-66qCevzc.js} +1 -1
  77. package/dist/cjs/{UserLimitReachedScreen-DwbMomyS.js → UserLimitReachedScreen-OwK_WZiy.js} +1 -1
  78. package/dist/cjs/{WalletInfoCard-DxO9lMen.js → WalletInfoCard-BgUUNBb1.js} +1 -1
  79. package/dist/cjs/{WalletInterstitialScreen-CsZg29Za.js → WalletInterstitialScreen-BMQau9a_.js} +1 -1
  80. package/dist/cjs/{WalletLink-J6Gw0D9R.js → WalletLink-B8qg2sNq.js} +1 -1
  81. package/dist/cjs/{WalletOverflowButton-Tdaiid33.js → WalletOverflowButton-4OUSs2qQ.js} +1 -1
  82. package/dist/cjs/abstract-smart-wallets.js +1 -1
  83. package/dist/cjs/{context-BPd2qxKv.js → context-B6zndZbE.js} +1 -1
  84. package/dist/cjs/{ethers-CqH8abGL.js → ethers-BrWeKm_S.js} +1 -1
  85. package/dist/cjs/extended-chains.js +1 -1
  86. package/dist/cjs/get-is-unified-wallet-CYQvifpN.js +1 -0
  87. package/dist/cjs/{index-B4TzPiCM.js → index-DBN8rlPN.js} +1 -1
  88. package/dist/cjs/{index-BsEjyknv.js → index-JLbo6ZA0.js} +1 -1
  89. package/dist/cjs/{index-Dz7affvL.js → index-xKFTBD9J.js} +5 -5
  90. package/dist/cjs/index.js +1 -1
  91. package/dist/cjs/internal.js +1 -1
  92. package/dist/cjs/{prepareFundingModalData-Do7d2fgq.js → prepareFundingModalData-DKaL1Oqz.js} +1 -1
  93. package/dist/cjs/{shared-CbD3Tm1u.js → shared-DAxDIdOV.js} +1 -1
  94. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-BjZ_f-Zv.js → shouldProceedtoEmbeddedWalletCreationFlow-Brj0fZpr.js} +1 -1
  95. package/dist/cjs/{smart-wallets-DFIScSPs.js → smart-wallets-DSBosnGS.js} +1 -1
  96. package/dist/cjs/smart-wallets.js +1 -1
  97. package/dist/cjs/solana.js +1 -1
  98. package/dist/cjs/{to-ui-error-B83yFdtm.js → to-ui-error-3msE736K.js} +1 -1
  99. package/dist/cjs/{twitter-BVVRWkcG.js → twitter-CJSxxOMI.js} +1 -1
  100. package/dist/cjs/ui.js +1 -1
  101. package/dist/cjs/{use-create-wallet-without-fallback-BSl4qcLv.js → use-create-wallet-without-fallback-DOZsyElA.js} +1 -1
  102. package/dist/cjs/{use-export-wallet-ABk4jSh5.js → use-export-wallet-DYcsnUD8.js} +1 -1
  103. package/dist/cjs/{useActiveWallet-B-Pd49hn.js → useActiveWallet-uEEQi70o.js} +1 -1
  104. package/dist/cjs/{useGetTokenPrice-Cm0Ldnuy.js → useGetTokenPrice-tWpOVbJz.js} +1 -1
  105. package/dist/cjs/{useI18n-5uCrUblH.js → useI18n-5bG-Cpbl.js} +1 -1
  106. package/dist/cjs/{usePrivy-CANb3vg4.js → usePrivy-DZJwQPwT.js} +1 -1
  107. package/dist/cjs/{useSolanaRpcClient-BBCvBn6x.js → useSolanaRpcClient-CEhNB-sj.js} +1 -1
  108. package/dist/cjs/{useWallets-Bi_kf80t.js → useWallets-CMRZ0IEw.js} +1 -1
  109. package/dist/cjs/{useWallets-CTdzIPwr.js → useWallets-DXi6lmEg.js} +1 -1
  110. package/dist/dts/index.d.mts +1 -0
  111. package/dist/dts/index.d.ts +1 -0
  112. package/dist/esm/{AccountNotFoundScreen-S6aY2Bit.mjs → AccountNotFoundScreen-BANDQZGv.mjs} +1 -1
  113. package/dist/esm/{Address-BZeOq9QH.mjs → Address-C2aXxM2N.mjs} +1 -1
  114. package/dist/esm/{AffirmativeConsentScreen-Duhzxm_H.mjs → AffirmativeConsentScreen-CFZO2H5q.mjs} +1 -1
  115. package/dist/esm/{AllowlistRejectionScreen-BMPe-U6U.mjs → AllowlistRejectionScreen-DBeGUmgt.mjs} +1 -1
  116. package/dist/esm/{AuthenticateWithWalletScreen-B0-JIF_P.mjs → AuthenticateWithWalletScreen-ZM6DZFh1.mjs} +1 -1
  117. package/dist/esm/{AwaitingEvmToSolBridgingScreen-SpjPGAVg.mjs → AwaitingEvmToSolBridgingScreen-8IBtNu5_.mjs} +1 -1
  118. package/dist/esm/{AwaitingExternalEthereumTransferScreen-MaJkRZM2.mjs → AwaitingExternalEthereumTransferScreen-BN4n273Y.mjs} +1 -1
  119. package/dist/esm/{AwaitingPasswordlessCodeScreen-CpmHzcEh.mjs → AwaitingPasswordlessCodeScreen-BquZxC7l.mjs} +1 -1
  120. package/dist/esm/{AwaitingSolToEvmBridgingScreen-B3HJI5qn.mjs → AwaitingSolToEvmBridgingScreen-B0I6wDuo.mjs} +1 -1
  121. package/dist/esm/{BridgeNetworkSelectionView-ITdiT09i.mjs → BridgeNetworkSelectionView-BZmf7ayB.mjs} +1 -1
  122. package/dist/esm/{Button-CrJpeX0e.mjs → Button-3JMVXKiE.mjs} +1 -1
  123. package/dist/esm/{CaptchaScreen-BEvV9l59.mjs → CaptchaScreen-Bnh-Gpgm.mjs} +1 -1
  124. package/dist/esm/{CoinbaseOnrampStatusScreen-CYKvPSTa.mjs → CoinbaseOnrampStatusScreen-_W6kQCwE.mjs} +1 -1
  125. package/dist/esm/{ConnectEmailForm-CzIQouaK.mjs → ConnectEmailForm-o04NTrIc.mjs} +1 -1
  126. package/dist/esm/{ConnectLedgerScreen-B84x_XJQ.mjs → ConnectLedgerScreen-CQUW_48V.mjs} +1 -1
  127. package/dist/esm/{ConnectOnlyLandingScreen-DOUEqxQS.mjs → ConnectOnlyLandingScreen-BtemYXlu.mjs} +1 -1
  128. package/dist/esm/{ConnectOnlyStatusScreen-C2DOQ20l.mjs → ConnectOnlyStatusScreen-CN2kWiW2.mjs} +1 -1
  129. package/dist/esm/{ConnectOrCreateScreen-ls3v_wzh.mjs → ConnectOrCreateScreen-BC1JYHYR.mjs} +1 -1
  130. package/dist/esm/{ConnectPhoneForm-BeT3tDQM.mjs → ConnectPhoneForm-CK2ZaLcy.mjs} +1 -1
  131. package/dist/esm/ConnectWalletView-D3ZQBnjF.mjs +1 -0
  132. package/dist/esm/{ConnectionStatusScreen-BFOC7TO_.mjs → ConnectionStatusScreen-BHg6K1gF.mjs} +1 -1
  133. package/dist/esm/CrossAppAuthScreen-D1gqy4CI.mjs +1 -0
  134. package/dist/esm/CustomLandingScreenView-DOwh2oce.mjs +2 -0
  135. package/dist/esm/{DelegatedActionsConsentScreen-h8zjYxdK.mjs → DelegatedActionsConsentScreen-C2p3P6bN.mjs} +1 -1
  136. package/dist/esm/{DelegatedActionsRevokeScreen-C1RofLwl.mjs → DelegatedActionsRevokeScreen-C4XKaajw.mjs} +1 -1
  137. package/dist/esm/{EmbeddedWalletConnectingScreen-DRLC8HnL.mjs → EmbeddedWalletConnectingScreen-k-UW2In7.mjs} +1 -1
  138. package/dist/esm/{EmbeddedWalletCreatedScreen-BiqITDV_.mjs → EmbeddedWalletCreatedScreen-D-5pbs0R.mjs} +1 -1
  139. package/dist/esm/{EmbeddedWalletKeyExportScreen-lPloqMsw.mjs → EmbeddedWalletKeyExportScreen-C35WVhPC.mjs} +1 -1
  140. package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-DjXY44ON.mjs → EmbeddedWalletOnAccountCreateScreen-BbhGfibt.mjs} +1 -1
  141. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-CfZ6F7Xo.mjs → EmbeddedWalletPasswordUpdateScreen-B3eyAAfe.mjs} +1 -1
  142. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-1u-5wz14.mjs → EmbeddedWalletPasswordUpdateSplashScreen-D7wjWeB8.mjs} +1 -1
  143. package/dist/esm/{EnrollTotp-Ds_-ZGUd.mjs → EnrollTotp-BE-JDa07.mjs} +1 -1
  144. package/dist/esm/{ErrorScreen-A7eS3gFZ.mjs → ErrorScreen-CR_0-6OL.mjs} +1 -1
  145. package/dist/esm/{FarcasterConnectStatusScreen-CoUFovnM.mjs → FarcasterConnectStatusScreen-DcwiNT96.mjs} +1 -1
  146. package/dist/esm/{FarcasterSignerStatusScreen-DJMF_7OC.mjs → FarcasterSignerStatusScreen-DmELTB-0.mjs} +1 -1
  147. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-BCElohac.mjs → FundSolWalletWithExternalSolanaWallet-BDy0ldlm.mjs} +1 -1
  148. package/dist/esm/{FundWalletMethodHeader-DBV2Rnau.mjs → FundWalletMethodHeader-C0uPKdYw.mjs} +1 -1
  149. package/dist/esm/{FundingEditAmountScreen-hLQBUAs6.mjs → FundingEditAmountScreen-aSBCTHvs.mjs} +1 -1
  150. package/dist/esm/{FundingMethodSelectionScreen-CQ6Kjv8P.mjs → FundingMethodSelectionScreen-BF0zdnRp.mjs} +1 -1
  151. package/dist/esm/HCaptchaWrapper-CUi9LJsp.mjs +1 -0
  152. package/dist/esm/{InAppBrowserLoginNotPossible-B6aOQR90.mjs → InAppBrowserLoginNotPossible-MMzbXP1G.mjs} +1 -1
  153. package/dist/esm/{InstallWalletScreen-gwlyer4j.mjs → InstallWalletScreen-CrnAF_wK.mjs} +1 -1
  154. package/dist/esm/{LandingScreen-BkCClWy8.mjs → LandingScreen-DvQZRxAA.mjs} +1 -1
  155. package/dist/esm/{LinkConflictScreen-C0K1Bw7W.mjs → LinkConflictScreen-CyCVN1lq.mjs} +1 -1
  156. package/dist/esm/{LinkEmailScreen-DDH1Ent-.mjs → LinkEmailScreen-D5s-Ggjy.mjs} +1 -1
  157. package/dist/esm/{LinkPasskeyScreen-75b0FmMc.mjs → LinkPasskeyScreen-Br7W1Zmq.mjs} +1 -1
  158. package/dist/esm/{LinkPhoneScreen-CZaTFcuX.mjs → LinkPhoneScreen-DbRDyzwM.mjs} +1 -1
  159. package/dist/esm/{LoginFailedScreen-Csu_ek1s.mjs → LoginFailedScreen-B1tnBE4h.mjs} +1 -1
  160. package/dist/esm/{ManualTransferScreen-Cn8sFLD_.mjs → ManualTransferScreen-pFyGqOCu.mjs} +1 -1
  161. package/dist/esm/{MfaAuthEnrollmentFlowScreen-9HiNxKYV.mjs → MfaAuthEnrollmentFlowScreen-C8Pvz5fy.mjs} +1 -1
  162. package/dist/esm/{MfaAuthVerifyFlowScreen-C9Pe8A-f.mjs → MfaAuthVerifyFlowScreen-CJEESJMU.mjs} +1 -1
  163. package/dist/esm/{MfaEnrollmentFlowScreen-C-VfRmbP.mjs → MfaEnrollmentFlowScreen-DNMYRR9X.mjs} +1 -1
  164. package/dist/esm/{MfaVerifyFlowScreen-BLzgEe8U.mjs → MfaVerifyFlowScreen-CzhmszLp.mjs} +1 -1
  165. package/dist/esm/{ModalHeader-YP9pLMEP.mjs → ModalHeader-B27O6soE.mjs} +1 -1
  166. package/dist/esm/{MoonpayStatusScreen-tt17kvkR.mjs → MoonpayStatusScreen-CzQ-mLP5.mjs} +1 -1
  167. package/dist/esm/{OAuthStatusScreen-DA8QEDgm.mjs → OAuthStatusScreen-D1IVqsCW.mjs} +1 -1
  168. package/dist/esm/{PasskeySelectSignupOrLogin-BnOxpeKy.mjs → PasskeySelectSignupOrLogin-CQUv5kpw.mjs} +1 -1
  169. package/dist/esm/{PasskeyStatusScreen-CqoYgdZ0.mjs → PasskeyStatusScreen-Co_LVG4x.mjs} +1 -1
  170. package/dist/esm/{PasswordRecoveryScreen-BgFiWz_H.mjs → PasswordRecoveryScreen-CKc7ZSJe.mjs} +1 -1
  171. package/dist/esm/{QrCode-C0_lXRph.mjs → QrCode-CGBH7ZqU.mjs} +1 -1
  172. package/dist/esm/{RecoveryOAuthStatusScreen-B698r-dZ.mjs → RecoveryOAuthStatusScreen-Co_qik6B.mjs} +1 -1
  173. package/dist/esm/{RecoveryPasswordCreateScreen-U7uAGUdt.mjs → RecoveryPasswordCreateScreen-DeZGEgr1.mjs} +1 -1
  174. package/dist/esm/{RecoverySelectionScreen-CvZ8jmi2.mjs → RecoverySelectionScreen-BOUh-dCZ.mjs} +1 -1
  175. package/dist/esm/{Screen-CpIMiJNF.mjs → Screen-Bj-1pwMI.mjs} +1 -1
  176. package/dist/esm/{ScreenLayout-t3qtbQ3-.mjs → ScreenLayout-Dp0ezg8Q.mjs} +1 -1
  177. package/dist/esm/{SetAutomaticRecoveryScreen-BlqLhOJS.mjs → SetAutomaticRecoveryScreen-DqeQkzbI.mjs} +1 -1
  178. package/dist/esm/{SetWalletPasswordForm-DMOSI5Cu.mjs → SetWalletPasswordForm-D9WKtYos.mjs} +1 -1
  179. package/dist/esm/{SignRequestScreen-Bc6WEdOH.mjs → SignRequestScreen-ClKQEiLC.mjs} +1 -1
  180. package/dist/esm/{StandardSignAndSendTransactionScreen-CNnIfg-v.mjs → StandardSignAndSendTransactionScreen-COscrw9p.mjs} +1 -1
  181. package/dist/esm/{TelegramAuthScreen-C_5cJWas.mjs → TelegramAuthScreen-DC1ppGbz.mjs} +1 -1
  182. package/dist/esm/{TransactionDetails-Dpy5T9tM.mjs → TransactionDetails-BBNigCES.mjs} +1 -1
  183. package/dist/esm/{TransactionErrorView-Dyy8JzAg.mjs → TransactionErrorView-DKnANlpi.mjs} +1 -1
  184. package/dist/esm/{TransferFromWalletScreen-DsWLEs0t.mjs → TransferFromWalletScreen-DW25GKHH.mjs} +1 -1
  185. package/dist/esm/{TransferOrBridgeLoadingScreen-CKF3jFy2.mjs → TransferOrBridgeLoadingScreen-R7No-8Yr.mjs} +1 -1
  186. package/dist/esm/{UpdateEmailScreen-DjS9mWl8.mjs → UpdateEmailScreen-CXd8_t7z.mjs} +1 -1
  187. package/dist/esm/{UpdatePhoneScreen-0Wm7i3sR.mjs → UpdatePhoneScreen-B9pfgcCa.mjs} +1 -1
  188. package/dist/esm/{UserLimitReachedScreen-C4J0L2bZ.mjs → UserLimitReachedScreen-pxpwGSM-.mjs} +1 -1
  189. package/dist/esm/{WalletInfoCard-QxupP_e1.mjs → WalletInfoCard-DFrqmXTc.mjs} +1 -1
  190. package/dist/esm/{WalletInterstitialScreen-ofT84gQY.mjs → WalletInterstitialScreen-BduifiaN.mjs} +1 -1
  191. package/dist/esm/{WalletLink-DFEVbh0m.mjs → WalletLink-D5DTXYny.mjs} +1 -1
  192. package/dist/esm/{WalletOverflowButton-gDOg31Q5.mjs → WalletOverflowButton-yerFFdMA.mjs} +1 -1
  193. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  194. package/dist/esm/{context-BOoFAPna.mjs → context-BqHnoxK5.mjs} +1 -1
  195. package/dist/esm/{ethers-DnpKeAXc.mjs → ethers-CUqPIRrW.mjs} +1 -1
  196. package/dist/esm/extended-chains.mjs +1 -1
  197. package/dist/esm/get-is-unified-wallet-GLvRyJlT.mjs +1 -0
  198. package/dist/esm/{index-DL7cst3F.mjs → index-5iW2YlYC.mjs} +1 -1
  199. package/dist/esm/{index-CUao1WyN.mjs → index-B24hEnAn.mjs} +4 -4
  200. package/dist/esm/{index-Doo2h9wE.mjs → index-DT54fwyL.mjs} +1 -1
  201. package/dist/esm/index.mjs +1 -1
  202. package/dist/esm/internal.mjs +1 -1
  203. package/dist/esm/{prepareFundingModalData-CzDMa8gy.mjs → prepareFundingModalData-lYYA8ZfI.mjs} +1 -1
  204. package/dist/esm/{shared-C_3e8pDa.mjs → shared-RdgpdEMG.mjs} +1 -1
  205. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BkG4QVN4.mjs → shouldProceedtoEmbeddedWalletCreationFlow-F4FtZ8gq.mjs} +1 -1
  206. package/dist/esm/{smart-wallets-DUDljgWK.mjs → smart-wallets-Bk5LCXUu.mjs} +1 -1
  207. package/dist/esm/smart-wallets.mjs +1 -1
  208. package/dist/esm/solana.mjs +1 -1
  209. package/dist/esm/{to-ui-error-BuXu0iWM.mjs → to-ui-error-ySeuG-hJ.mjs} +1 -1
  210. package/dist/esm/{twitter-6jomarO4.mjs → twitter-BoAxhlj6.mjs} +1 -1
  211. package/dist/esm/ui.mjs +1 -1
  212. package/dist/esm/{use-create-wallet-without-fallback-4kJuPNnl.mjs → use-create-wallet-without-fallback-DCFiaOUd.mjs} +1 -1
  213. package/dist/esm/{use-export-wallet-DLpQ6ZuE.mjs → use-export-wallet-BSyJ6wXH.mjs} +1 -1
  214. package/dist/esm/{useActiveWallet-BdFIc7_K.mjs → useActiveWallet-CBIiGG1k.mjs} +1 -1
  215. package/dist/esm/{useGetTokenPrice-Cw9UgOp3.mjs → useGetTokenPrice-DOgFQ9vL.mjs} +1 -1
  216. package/dist/esm/{useI18n-fcpgyVzo.mjs → useI18n-BotQj3s2.mjs} +1 -1
  217. package/dist/esm/{usePrivy-CeQ3C1KS.mjs → usePrivy-C5z76Qhs.mjs} +1 -1
  218. package/dist/esm/{useSolanaRpcClient-DyBoxaVM.mjs → useSolanaRpcClient-BMkY8W80.mjs} +1 -1
  219. package/dist/esm/{useWallets-3r4yfFNg.mjs → useWallets-Aw21dxK9.mjs} +1 -1
  220. package/dist/esm/{useWallets-CZrLXHtS.mjs → useWallets-CHDUUIx3.mjs} +1 -1
  221. package/package.json +3 -3
  222. package/dist/cjs/ConnectWalletView-B7tEQCbZ.js +0 -1
  223. package/dist/cjs/CrossAppAuthScreen-M__fDCJH.js +0 -1
  224. package/dist/cjs/CustomLandingScreenView-D-7kPzjH.js +0 -2
  225. package/dist/cjs/HCaptchaWrapper-DMLxURsO.js +0 -1
  226. package/dist/cjs/get-is-unified-wallet-D6pn8A8g.js +0 -1
  227. package/dist/esm/ConnectWalletView-Ch6TwKX_.mjs +0 -1
  228. package/dist/esm/CrossAppAuthScreen-BbWHC41s.mjs +0 -1
  229. package/dist/esm/CustomLandingScreenView-CKarTBuo.mjs +0 -2
  230. package/dist/esm/HCaptchaWrapper-Dl2Jt_Df.mjs +0 -1
  231. package/dist/esm/get-is-unified-wallet-Ca5aEojK.mjs +0 -1
@@ -1,2 +1,2 @@
1
- import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as a,useEffect as n}from"react";import{parseEther as o,createWalletClient as s,custom as d,publicActions as c,createPublicClient as l,http as m,encodeFunctionData as u,formatUnits as p}from"viem";import{addToDefaultChains as h}from"@privy-io/js-sdk-core";import{b as f,c as g,R as v}from"./Layouts-Bmf8DxNP.mjs";import{B as y}from"./ModalHeader-YP9pLMEP.mjs";import{C}from"./ScreenHeader-Biz1wq02.mjs";import{t as I}from"./FundWalletMethodHeader-DBV2Rnau.mjs";import{N as T}from"./index-CJMgUOnw.mjs";import{u as w,t as b}from"./context-BOoFAPna.mjs";import{u as j,a as E,b as N}from"./internal-context-e-Eni5bG.mjs";import{Q as A,D as S}from"./useActiveWallet-BdFIc7_K.mjs";import{a as x}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{u as B}from"./useGetTokenPrice-Cw9UgOp3.mjs";import{u as F}from"./useWallets-3r4yfFNg.mjs";import{E as k}from"./transfer-CMPmjPsM.mjs";import{f as M}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{c as U,a as W,g as P,s as H}from"./ethers-DnpKeAXc.mjs";import{O as $}from"./analytics-mkkvFRju.mjs";import{t as q,g as L,c as D,u as R}from"./reservoir-kvLjIrEo.mjs";import{x as Q}from"./index-CUao1WyN.mjs";import{g as _,B as O}from"./BridgeNetworkSelectionView-ITdiT09i.mjs";import{g as V}from"./getErc20Balance-CaKjNAs9.mjs";import{a as G}from"./getPublicClient-A9RSftUZ.mjs";import{T as z}from"./TransferOrBridgeLoadingScreen-CKF3jFy2.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./useGetSolPrice-Cfm8o9C5.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-CrJpeX0e.mjs";import"./Row-CG0lSY5Z.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./Value-B4M62ove.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./Subtitle-DkvfP2Ev.mjs";import"./Title-D0pfZff-.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./getChainName-DjpPdUSc.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"./shared-CtYf3O54.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";import"./styles-DY17fuAX.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"./Address-BZeOq9QH.mjs";import"lucide-react";const X={component:()=>{let{rpcConfig:X,appId:Y,closePrivyModal:J,createAnalyticsEvent:K}=j(),{navigate:Z,setModalData:ee,data:te}=x(),ie=w(),{wallets:re}=F(),[ae,ne]=a(!1),[oe,se]=a(0n),[de,ce]=a(!1),[le,me]=a(null),[ue,pe]=a(null),[he,fe]=a([]),[ge,ve]=a(0),[ye,Ce]=a(!1),[Ie,Te]=a(!1),[we,be]=a(!1),[je,Ee]=a(!1),[Ne,Ae]=a(),[Se,xe]=a();if(!te?.funding||"ethereum"!==te.funding.chainType)throw Error("Invalid funding data");let{erc20ContractInfo:Be,chain:Fe,connectedWallet:ke}=te.funding,Me=te.funding.address,Ue=te.funding.erc20Address,[We,Pe]=a(te.funding.amount);n((()=>{Ue&&!Be&&me(Error("Unable to fetch token details"))}),[]);let He=!!Ue&&!!Be,$e=He?BigInt(parseFloat(We)*10**Be.decimals):o(We),qe=("ethereum"===ke?.type?ke:void 0)??re[0],Le=A(qe?.walletClientType||"unknown"),De=Le?.name||"wallet",[Re,Qe]=a(null);n((()=>{(async()=>{if(!qe)return;let e=await qe.getEthereumProvider();Qe(s({account:qe.address,transport:d(e)}).extend(c))})().catch(console.error)}),[qe]);let[_e,Oe]=a(0n);n((()=>{l({chain:Fe,transport:m(G(Fe,X,Y))}).getBalance({address:Me}).then(Oe).catch(console.error)}),[]);let[Ve,Ge]=a(0n);n((()=>{He&&V({chain:Fe,address:Me,appId:Y,rpcConfig:X,erc20Address:Ue}).then((e=>Ge(e.balance))).catch(console.error)}),[]);let{tokenPrice:ze}=B(Fe.id),[Xe,Ye]=a({to:Me,chain:Fe,value:$e,data:void 0});n((()=>{(async()=>{let e,t;if(!Re||!qe||ye||we)return;Ce(!0);let i=l({chain:Xe.chain,transport:m(G(Xe.chain,X,Y))});if(He&&!Xe.data)return await i.simulateContract({address:Ue,chain:Xe.chain,abi:k,functionName:"transfer",args:[Me,$e],account:qe.address}).catch((e=>{console.warn("Simulated token transfer failed with error, fetching bridge options.",e)}))?(Ce(!1),void Ye({to:Ue,chain:Xe.chain,data:u({abi:k,functionName:"transfer",args:[Me,$e]}),value:"0x0"})):(Ce(!1),void ce(!0));try{e=await i.prepareTransactionRequest({account:qe.address,to:Xe.to,chain:Xe.chain,data:Xe.data,value:BigInt(Xe.value??0)})}catch(e){if(console.error(e),he.length>1)pe(e.shortMessage??"Something went wrong");else if(Ie&&0===he.length)return void me(new E(`Wallet ${S(qe.address)} does not have enough funds.`,void 0,N.INSUFFICIENT_BALANCE))}if(!e)return Ce(!1),void ce(!0);Ce(!1),be(!0),ne(!0),se(e.gas);try{await Re.switchChain({id:Xe.chain.id})}catch(e){await Re.addChain({chain:Xe.chain}),await Re.switchChain({id:Xe.chain.id})}try{t=await Re.sendTransaction(e)}catch(e){if(console.error(e),"TransactionExecutionError"===e.name)if(he.length<1){let t=e.shortMessage;(e.shortMessage.includes("rejected the request")||e.details.includes("rejected the request"))&&(t="User rejected the request."),me(new E(t,void 0,N.TRANSACTION_FAILURE))}else pe(e.shortMessage??"Something went wrong")}if(t)return await Re.waitForTransactionReceipt({hash:t}),be(!1),Ie?(Ae(t),void xe("pending")):(Ee(!0),ee(Q(te,"completed",t,qe?.walletClientType,He,Be,Fe)),void K({eventName:$,payload:{provider:"external",status:"success",txHash:t,address:qe.address,chainId:Xe.chain.id,chainType:"ethereum",value:Xe.value?p(BigInt(Xe.value),Be?.decimals??18):void 0,token:Be?.symbol??Ue??"ETH",destinationAddress:Me,destinationChainId:Fe.id,destinationChainType:"ethereum",destinationValue:$e?p($e,Be?.decimals??18):void 0,destinationToken:Be?.symbol??Ue??Fe.nativeCurrency.name}}));be(!1)})().catch(console.error)}),[Re,Xe]),n((()=>{(async()=>{if(!de||!Re||!qe)return;let e=h(ie.chains).filter((e=>e.id!==Fe.id&&!!e.testnet==!!Fe.testnet));He&&e.unshift(Fe);let t=await _({chains:e,address:qe.address,appId:Y,rpcConfig:X,includeUsdc:te.funding?.isUSDC}),i=He?t.filter((e=>e.balance>0n)):t.filter((e=>e.balance>$e)),r=He&&t.every((e=>0n===e.balance));if(i.length<1)return void me(new E(r?`Wallet ${S(qe.address)} doesn't have enough funds to cover gas fees. Top up your wallet and try again.`:`Wallet ${S(qe.address)} does not have enough funds.`,void 0,N.INSUFFICIENT_BALANCE));i.sort(((e,t)=>Number(He?(t.erc20Balance??0n)-(e.erc20Balance??0n):t.balance-e.balance)));let a=i.flatMap((e=>{let t=[{...e,isErc20Quote:!1,isTestnet:!!Fe.testnet,input:q({appId:Y,amount:$e.toString(),user:qe.address,recipient:Me,destinationChainId:Fe.id,destinationCurrency:Ue,originChainId:e.chain.id})}];return He&&Ue&&(e.erc20Balance??0n)>=$e&&t.push({...e,isErc20Quote:!0,isTestnet:!!Fe.testnet,input:q({appId:Y,amount:$e.toString(),user:qe.address,recipient:Me,destinationChainId:Fe.id,destinationCurrency:Ue,originChainId:e.chain.id,originCurrency:e.erc20Address})}),t})),n=(await Promise.allSettled(a.map((async e=>({...e,quote:await L(e)}))))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));if(n.length<1)return void me(new E(`Wallet ${S(qe.address)} does not have enough funds.`,void 0,N.INSUFFICIENT_BALANCE));let o=n.map((e=>({bridgeTx:D(e.quote),balance:e.balance,chain:e.chain,erc20Balance:e.erc20Balance,isErc20Quote:e.isErc20Quote}))).filter((e=>!!e.bridgeTx));if(o.length>1)return void fe(o);let s=o[0];s?(Te(!0),Ye({data:s.bridgeTx.data,to:s.bridgeTx.to,value:s.bridgeTx.value,chain:s.chain})):me(new E(`Wallet ${S(qe.address)} does not have enough funds.`,void 0,N.INSUFFICIENT_BALANCE))})().catch(console.error)}),[de]),R({transactionHash:Ne,isTestnet:!!Fe.testnet,bridgingStatus:Se,setBridgingStatus:xe,onSuccess({transactionHash:e}){Te(!1),Ee(!0),ee(Q(te,"completed",e,qe?.walletClientType,He,Be,Fe)),K({eventName:$,payload:{provider:"external",status:"success",txHash:e,address:qe?.address,chainId:Xe.chain.id,chainType:"ethereum",value:Xe.value?p(BigInt(Xe.value),Be?.decimals??18):void 0,token:Be?.symbol??Ue??"ETH",destinationAddress:Me,destinationChainId:Fe.id,destinationChainType:"ethereum",destinationValue:$e?p($e,Be?.decimals??18):void 0,destinationToken:Be?.symbol??Ue??Fe.nativeCurrency.name}})},onFailure({error:e}){Te(!1),me(e)}}),n((()=>{le&&(ee({funding:te?.funding,solanaFundingData:te?.solanaFundingData,sendTransaction:te?.sendTransaction,errorModalData:{error:le,previousScreen:"TransferFromWalletScreen"}}),Z("ErrorScreen",!1))}),[le]);let Je=!He&&ze?U(We??"0",ze):void 0,Ke=He?oe:H([oe,$e]),Ze=Ke&&ze?W(Ke,ze):void 0,et=Ke?P(Ke,te?.funding?.erc20Address?te?.funding?.erc20ContractInfo?.symbol||"ETH":te?.funding?.chain.nativeCurrency.symbol||"ETH"):void 0,tt=oe&&ze?W(oe,ze):void 0,it=oe?P(oe,Fe?.nativeCurrency?.symbol||"ETH"):void 0;if(n((()=>{if(!je)return;let e=setTimeout(J,b);return()=>clearTimeout(e)}),[je]),je/*#__PURE__*/)return e(t,{children:[/*#__PURE__*/i(I,{}),/*#__PURE__*/i(f,{}),/*#__PURE__*/e(g,{children:[/*#__PURE__*/i(r,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/i(C,{title:"Success!",description:`You’ve successfully added ${We} ${He?Be.symbol:Fe.nativeCurrency.symbol} to your ${ie.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/i(v,{}),/*#__PURE__*/i(y,{})]});let rt=He?`${M({amount:Ve,decimals:Be.decimals})} ${Be.symbol}`:P(_e,Fe.nativeCurrency.symbol,3,!0),at=he[ge];return he.length>1&&at?/*#__PURE__*/i(O,{displayName:De,configuredFundingChain:Fe,erc20ContractInfo:Be,formattedBalance:rt,fundingAmount:We,fundingCurrency:He?Be.symbol:Fe.nativeCurrency.symbol,fundingAmountInUsd:Je,options:he,selectedOption:at,isPreparing:ye,isSubmitting:we,addressToFund:Me,fundingWalletAddress:qe?.address||"",errorMessage:ue,onSubmit:()=>{te.funding?.amount!==We?async function(){if(qe&&at)try{let e=await L({isTestnet:!!Fe.testnet,input:q({appId:Y,amount:$e.toString(),user:qe.address,recipient:Me,destinationChainId:Fe.id,destinationCurrency:Ue,originChainId:at.chain.id})}),t=D(e);if(!t)throw Error("Invalid transaction request");Te(!0),Ye({data:t.data,to:t.to,value:t.value,chain:at.chain})}catch(e){console.error(e),me(new E("Unable to fetch quotes for bridging",e,N.INSUFFICIENT_BALANCE))}}().catch(console.error):Ye({to:at.bridgeTx.to,data:at.bridgeTx.data,value:at.bridgeTx.value,chain:at.chain})},onSelect:e=>{e!==ge&&(pe(null),ve(e))},onAmountChange:Pe}):ae&&oe&&qe&&te?.funding?/*#__PURE__*/i(z,{walletClientType:qe?.walletClientType||"unknown",displayName:De,addressToFund:Me,isBridging:Ie,isErc20Flow:He,totalPriceInUsd:Ze,totalPriceInNativeCurrency:et,gasPriceInUsd:tt,gasPriceInNativeCurrency:it,chainId:Fe.id,chainName:Fe.name}):
1
+ import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as a,useEffect as n}from"react";import{parseEther as o,createWalletClient as s,custom as d,publicActions as c,createPublicClient as l,http as m,encodeFunctionData as u,formatUnits as p}from"viem";import{addToDefaultChains as h}from"@privy-io/js-sdk-core";import{b as f,c as g,R as v}from"./Layouts-Bmf8DxNP.mjs";import{B as y}from"./ModalHeader-B27O6soE.mjs";import{C}from"./ScreenHeader-Biz1wq02.mjs";import{t as I}from"./FundWalletMethodHeader-C0uPKdYw.mjs";import{N as T}from"./index-CJMgUOnw.mjs";import{u as w,t as b}from"./context-BqHnoxK5.mjs";import{u as j,a as E,b as N}from"./internal-context-e-Eni5bG.mjs";import{Q as A,D as S}from"./useActiveWallet-CBIiGG1k.mjs";import{a as x}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{u as B}from"./useGetTokenPrice-DOgFQ9vL.mjs";import{u as F}from"./useWallets-Aw21dxK9.mjs";import{E as k}from"./transfer-CMPmjPsM.mjs";import{f as M}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{c as U,a as W,g as P,s as H}from"./ethers-CUqPIRrW.mjs";import{O as $}from"./analytics-mkkvFRju.mjs";import{t as q,g as L,c as D,u as R}from"./reservoir-kvLjIrEo.mjs";import{x as Q}from"./index-B24hEnAn.mjs";import{g as _,B as O}from"./BridgeNetworkSelectionView-BZmf7ayB.mjs";import{g as V}from"./getErc20Balance-CaKjNAs9.mjs";import{a as G}from"./getPublicClient-A9RSftUZ.mjs";import{T as z}from"./TransferOrBridgeLoadingScreen-R7No-8Yr.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./prepareFundingModalData-lYYA8ZfI.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./useGetSolPrice-Cfm8o9C5.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C5z76Qhs.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-3JMVXKiE.mjs";import"./Row-CG0lSY5Z.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./Value-B4M62ove.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./Subtitle-DkvfP2Ev.mjs";import"./Title-D0pfZff-.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./getChainName-DjpPdUSc.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"./shared-CtYf3O54.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";import"./styles-DY17fuAX.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"./Address-C2aXxM2N.mjs";import"lucide-react";const X={component:()=>{let{rpcConfig:X,appId:Y,closePrivyModal:J,createAnalyticsEvent:K}=j(),{navigate:Z,setModalData:ee,data:te}=x(),ie=w(),{wallets:re}=F(),[ae,ne]=a(!1),[oe,se]=a(0n),[de,ce]=a(!1),[le,me]=a(null),[ue,pe]=a(null),[he,fe]=a([]),[ge,ve]=a(0),[ye,Ce]=a(!1),[Ie,Te]=a(!1),[we,be]=a(!1),[je,Ee]=a(!1),[Ne,Ae]=a(),[Se,xe]=a();if(!te?.funding||"ethereum"!==te.funding.chainType)throw Error("Invalid funding data");let{erc20ContractInfo:Be,chain:Fe,connectedWallet:ke}=te.funding,Me=te.funding.address,Ue=te.funding.erc20Address,[We,Pe]=a(te.funding.amount);n((()=>{Ue&&!Be&&me(Error("Unable to fetch token details"))}),[]);let He=!!Ue&&!!Be,$e=He?BigInt(parseFloat(We)*10**Be.decimals):o(We),qe=("ethereum"===ke?.type?ke:void 0)??re[0],Le=A(qe?.walletClientType||"unknown"),De=Le?.name||"wallet",[Re,Qe]=a(null);n((()=>{(async()=>{if(!qe)return;let e=await qe.getEthereumProvider();Qe(s({account:qe.address,transport:d(e)}).extend(c))})().catch(console.error)}),[qe]);let[_e,Oe]=a(0n);n((()=>{l({chain:Fe,transport:m(G(Fe,X,Y))}).getBalance({address:Me}).then(Oe).catch(console.error)}),[]);let[Ve,Ge]=a(0n);n((()=>{He&&V({chain:Fe,address:Me,appId:Y,rpcConfig:X,erc20Address:Ue}).then((e=>Ge(e.balance))).catch(console.error)}),[]);let{tokenPrice:ze}=B(Fe.id),[Xe,Ye]=a({to:Me,chain:Fe,value:$e,data:void 0});n((()=>{(async()=>{let e,t;if(!Re||!qe||ye||we)return;Ce(!0);let i=l({chain:Xe.chain,transport:m(G(Xe.chain,X,Y))});if(He&&!Xe.data)return await i.simulateContract({address:Ue,chain:Xe.chain,abi:k,functionName:"transfer",args:[Me,$e],account:qe.address}).catch((e=>{console.warn("Simulated token transfer failed with error, fetching bridge options.",e)}))?(Ce(!1),void Ye({to:Ue,chain:Xe.chain,data:u({abi:k,functionName:"transfer",args:[Me,$e]}),value:"0x0"})):(Ce(!1),void ce(!0));try{e=await i.prepareTransactionRequest({account:qe.address,to:Xe.to,chain:Xe.chain,data:Xe.data,value:BigInt(Xe.value??0)})}catch(e){if(console.error(e),he.length>1)pe(e.shortMessage??"Something went wrong");else if(Ie&&0===he.length)return void me(new E(`Wallet ${S(qe.address)} does not have enough funds.`,void 0,N.INSUFFICIENT_BALANCE))}if(!e)return Ce(!1),void ce(!0);Ce(!1),be(!0),ne(!0),se(e.gas);try{await Re.switchChain({id:Xe.chain.id})}catch(e){await Re.addChain({chain:Xe.chain}),await Re.switchChain({id:Xe.chain.id})}try{t=await Re.sendTransaction(e)}catch(e){if(console.error(e),"TransactionExecutionError"===e.name)if(he.length<1){let t=e.shortMessage;(e.shortMessage.includes("rejected the request")||e.details.includes("rejected the request"))&&(t="User rejected the request."),me(new E(t,void 0,N.TRANSACTION_FAILURE))}else pe(e.shortMessage??"Something went wrong")}if(t)return await Re.waitForTransactionReceipt({hash:t}),be(!1),Ie?(Ae(t),void xe("pending")):(Ee(!0),ee(Q(te,"completed",t,qe?.walletClientType,He,Be,Fe)),void K({eventName:$,payload:{provider:"external",status:"success",txHash:t,address:qe.address,chainId:Xe.chain.id,chainType:"ethereum",value:Xe.value?p(BigInt(Xe.value),Be?.decimals??18):void 0,token:Be?.symbol??Ue??"ETH",destinationAddress:Me,destinationChainId:Fe.id,destinationChainType:"ethereum",destinationValue:$e?p($e,Be?.decimals??18):void 0,destinationToken:Be?.symbol??Ue??Fe.nativeCurrency.name}}));be(!1)})().catch(console.error)}),[Re,Xe]),n((()=>{(async()=>{if(!de||!Re||!qe)return;let e=h(ie.chains).filter((e=>e.id!==Fe.id&&!!e.testnet==!!Fe.testnet));He&&e.unshift(Fe);let t=await _({chains:e,address:qe.address,appId:Y,rpcConfig:X,includeUsdc:te.funding?.isUSDC}),i=He?t.filter((e=>e.balance>0n)):t.filter((e=>e.balance>$e)),r=He&&t.every((e=>0n===e.balance));if(i.length<1)return void me(new E(r?`Wallet ${S(qe.address)} doesn't have enough funds to cover gas fees. Top up your wallet and try again.`:`Wallet ${S(qe.address)} does not have enough funds.`,void 0,N.INSUFFICIENT_BALANCE));i.sort(((e,t)=>Number(He?(t.erc20Balance??0n)-(e.erc20Balance??0n):t.balance-e.balance)));let a=i.flatMap((e=>{let t=[{...e,isErc20Quote:!1,isTestnet:!!Fe.testnet,input:q({appId:Y,amount:$e.toString(),user:qe.address,recipient:Me,destinationChainId:Fe.id,destinationCurrency:Ue,originChainId:e.chain.id})}];return He&&Ue&&(e.erc20Balance??0n)>=$e&&t.push({...e,isErc20Quote:!0,isTestnet:!!Fe.testnet,input:q({appId:Y,amount:$e.toString(),user:qe.address,recipient:Me,destinationChainId:Fe.id,destinationCurrency:Ue,originChainId:e.chain.id,originCurrency:e.erc20Address})}),t})),n=(await Promise.allSettled(a.map((async e=>({...e,quote:await L(e)}))))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));if(n.length<1)return void me(new E(`Wallet ${S(qe.address)} does not have enough funds.`,void 0,N.INSUFFICIENT_BALANCE));let o=n.map((e=>({bridgeTx:D(e.quote),balance:e.balance,chain:e.chain,erc20Balance:e.erc20Balance,isErc20Quote:e.isErc20Quote}))).filter((e=>!!e.bridgeTx));if(o.length>1)return void fe(o);let s=o[0];s?(Te(!0),Ye({data:s.bridgeTx.data,to:s.bridgeTx.to,value:s.bridgeTx.value,chain:s.chain})):me(new E(`Wallet ${S(qe.address)} does not have enough funds.`,void 0,N.INSUFFICIENT_BALANCE))})().catch(console.error)}),[de]),R({transactionHash:Ne,isTestnet:!!Fe.testnet,bridgingStatus:Se,setBridgingStatus:xe,onSuccess({transactionHash:e}){Te(!1),Ee(!0),ee(Q(te,"completed",e,qe?.walletClientType,He,Be,Fe)),K({eventName:$,payload:{provider:"external",status:"success",txHash:e,address:qe?.address,chainId:Xe.chain.id,chainType:"ethereum",value:Xe.value?p(BigInt(Xe.value),Be?.decimals??18):void 0,token:Be?.symbol??Ue??"ETH",destinationAddress:Me,destinationChainId:Fe.id,destinationChainType:"ethereum",destinationValue:$e?p($e,Be?.decimals??18):void 0,destinationToken:Be?.symbol??Ue??Fe.nativeCurrency.name}})},onFailure({error:e}){Te(!1),me(e)}}),n((()=>{le&&(ee({funding:te?.funding,solanaFundingData:te?.solanaFundingData,sendTransaction:te?.sendTransaction,errorModalData:{error:le,previousScreen:"TransferFromWalletScreen"}}),Z("ErrorScreen",!1))}),[le]);let Je=!He&&ze?U(We??"0",ze):void 0,Ke=He?oe:H([oe,$e]),Ze=Ke&&ze?W(Ke,ze):void 0,et=Ke?P(Ke,te?.funding?.erc20Address?te?.funding?.erc20ContractInfo?.symbol||"ETH":te?.funding?.chain.nativeCurrency.symbol||"ETH"):void 0,tt=oe&&ze?W(oe,ze):void 0,it=oe?P(oe,Fe?.nativeCurrency?.symbol||"ETH"):void 0;if(n((()=>{if(!je)return;let e=setTimeout(J,b);return()=>clearTimeout(e)}),[je]),je/*#__PURE__*/)return e(t,{children:[/*#__PURE__*/i(I,{}),/*#__PURE__*/i(f,{}),/*#__PURE__*/e(g,{children:[/*#__PURE__*/i(r,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/i(C,{title:"Success!",description:`You’ve successfully added ${We} ${He?Be.symbol:Fe.nativeCurrency.symbol} to your ${ie.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/i(v,{}),/*#__PURE__*/i(y,{})]});let rt=He?`${M({amount:Ve,decimals:Be.decimals})} ${Be.symbol}`:P(_e,Fe.nativeCurrency.symbol,3,!0),at=he[ge];return he.length>1&&at?/*#__PURE__*/i(O,{displayName:De,configuredFundingChain:Fe,erc20ContractInfo:Be,formattedBalance:rt,fundingAmount:We,fundingCurrency:He?Be.symbol:Fe.nativeCurrency.symbol,fundingAmountInUsd:Je,options:he,selectedOption:at,isPreparing:ye,isSubmitting:we,addressToFund:Me,fundingWalletAddress:qe?.address||"",errorMessage:ue,onSubmit:()=>{te.funding?.amount!==We?async function(){if(qe&&at)try{let e=await L({isTestnet:!!Fe.testnet,input:q({appId:Y,amount:$e.toString(),user:qe.address,recipient:Me,destinationChainId:Fe.id,destinationCurrency:Ue,originChainId:at.chain.id})}),t=D(e);if(!t)throw Error("Invalid transaction request");Te(!0),Ye({data:t.data,to:t.to,value:t.value,chain:at.chain})}catch(e){console.error(e),me(new E("Unable to fetch quotes for bridging",e,N.INSUFFICIENT_BALANCE))}}().catch(console.error):Ye({to:at.bridgeTx.to,data:at.bridgeTx.data,value:at.bridgeTx.value,chain:at.chain})},onSelect:e=>{e!==ge&&(pe(null),ve(e))},onAmountChange:Pe}):ae&&oe&&qe&&te?.funding?/*#__PURE__*/i(z,{walletClientType:qe?.walletClientType||"unknown",displayName:De,addressToFund:Me,isBridging:Ie,isErc20Flow:He,totalPriceInUsd:Ze,totalPriceInNativeCurrency:et,gasPriceInUsd:tt,gasPriceInNativeCurrency:it,chainId:Fe.id,chainName:Fe.name}):
2
2
  /*#__PURE__*/e(t,{children:[/*#__PURE__*/i(I,{}),/*#__PURE__*/i(T,{}),/*#__PURE__*/i("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/i(y,{})]})}};export{X as AwaitingExternalEthereumTransferScreen,X as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"@heroicons/react/20/solid/CheckIcon";import t from"@heroicons/react/24/outline/EnvelopeIcon";import i from"@heroicons/react/24/outline/PhoneIcon";import{useState as n,useEffect as a}from"react";import{isMobile as s}from"react-device-detect";import{styled as c}from"styled-components";import{H as l}from"./Layouts-Bmf8DxNP.mjs";import{L as d}from"./Link-DwjLfHwW.mjs";import{u as p,q as m}from"./context-BOoFAPna.mjs";import{u,e as f,b as v,k as h}from"./internal-context-e-Eni5bG.mjs";import{a as y,u as g}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{s as b}from"./shouldProceedtoEmbeddedWalletCreationFlow-BkG4QVN4.mjs";import{S as x}from"./ScreenLayout-t3qtbQ3-.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./index-CUao1WyN.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"./prepareFundingModalData-CzDMa8gy.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-CrJpeX0e.mjs";import"./Screen-CpIMiJNF.mjs";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const C=({contactMethod:c,authFlow:p,appName:m="Privy",whatsAppEnabled:u=!1,onBack:f,onCodeSubmit:v,onResend:h,errorMessage:y,success:g=!1,resendCountdown:b=0,onInvalidInput:C,onClearError:S})=>{let[A,I]=n(w);a((()=>{y||I(w)}),[y]);let N=async e=>{e.preventDefault();let r=e.currentTarget.value.replace(" ","");if(""===r)return;if(isNaN(Number(r)))return void C?.("Code should be numeric");S?.();let o=Number(e.currentTarget.name?.charAt(5)),t=[...r||[""]].slice(0,E-o),i=[...A.slice(0,o),...t,...A.slice(o+t.length)];I(i);let n=Math.min(Math.max(o+t.length,0),E-1);if(!isNaN(Number(e.currentTarget.value))){let e=document.querySelector(`input[name=code-${n}]`);e?.focus()}if(i.every((e=>e&&!isNaN(+e)))){let e=document.querySelector(`input[name=code-${n}]`);e?.blur(),await(v?.(i.join("")))}};/*#__PURE__*/return e(x,{title:"Enter confirmation code",subtitle:/*#__PURE__*/r("span","email"===p?{children:["Please check ",/*#__PURE__*/e(R,{children:c})," for an email from privy.io and enter your code below."]}:{children:["Please check ",/*#__PURE__*/e(R,{children:c})," for a",u?" WhatsApp":""," message from ",m," and enter your code below."]}),icon:"email"===p?t:i,onBack:f,showBack:!0,helpText:/*#__PURE__*/r(L,{children:[/*#__PURE__*/r("span",{children:["Didn't get ","email"===p?"an email":"a message","?"]}),b?/*#__PURE__*/r(M,{children:[/*#__PURE__*/e(o,{color:"var(--privy-color-foreground)",strokeWidth:1.33,height:"12px",width:"12px"}),/*#__PURE__*/e("span",{children:"Code sent"})]}):/*#__PURE__*/e(d,{as:"button",size:"sm",onClick:h,children:"Resend code"})]}),children:/*#__PURE__*/e(k,{children:/*#__PURE__*/e(l,{children:/*#__PURE__*/r(_,{children:[/*#__PURE__*/e("div",{children:A.map(((r,o)=>/*#__PURE__*/e("input",{name:`code-${o}`,type:"text",value:A[o],onChange:N,onKeyUp:e=>{"Backspace"===e.key&&(e=>{if(S?.(),I([...A.slice(0,e),"",...A.slice(e+1)]),e>0){let r=document.querySelector(`input[name=code-${e-1}]`);r?.focus()}})(o)},inputMode:"numeric",autoFocus:0===o,pattern:"[0-9]",className:`${g?"success":""} ${y?"fail":""}`,autoComplete:s?"one-time-code":"off"},o)))}),/*#__PURE__*/e(j,{$fail:!!y,$success:g,children:/*#__PURE__*/e("span",{children:"Invalid or expired verification code"===y?"Incorrect code":y||(g?"Success!":"")})})]})})})})};let E=6,w=Array(6).fill("");var S,A,I=((S=I||{})[S.RESET_AFTER_DELAY=0]="RESET_AFTER_DELAY",S[S.CLEAR_ON_NEXT_VALID_INPUT=1]="CLEAR_ON_NEXT_VALID_INPUT",S),N=((A=N||{})[A.EMAIL=0]="EMAIL",A[A.SMS=1]="SMS",A);const T={component:()=>{let{navigate:r,lastScreen:o,navigateBack:t,setModalData:i,onUserCloseViaDialogOrKeybindRef:s}=y(),c=p(),{closePrivyModal:l,resendEmailCode:d,resendSmsCode:x,getAuthMeta:E,loginWithCode:w,updateWallets:S,createAnalyticsEvent:A}=u(),{authenticated:I,logout:N,user:T}=g(),{whatsAppEnabled:k}=p(),[_,j]=n(!1),[L,M]=n(null),[R,D]=n(null),[O,P]=n(0);s.current=()=>null;let W=E()?.email?0:1,U=0===W?E()?.email||"":E()?.phoneNumber||"",F=m-500;a((()=>{if(O){let e=setTimeout((()=>{P(O-1)}),1e3);return()=>clearTimeout(e)}}),[O]),a((()=>{if(I&&_&&T){if(c?.legal.requireUsersAcceptTerms&&!T.hasAcceptedTerms){let e=setTimeout((()=>{r("AffirmativeConsentScreen")}),F);return()=>clearTimeout(e)}if(b(T,c.embeddedWallets)){let e=setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),A({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AwaitingPasswordlessCodeScreen"}}),N()},callAuthOnSuccessOnClose:!0}}),r("EmbeddedWalletOnAccountCreateScreen")}),F);return()=>clearTimeout(e)}{S();let e=setTimeout((()=>l({shouldCallAuthOnSuccess:!0,isSuccess:!0})),m);return()=>clearTimeout(e)}}}),[I,_,T]),a((()=>{if(L&&0===R){let e=setTimeout((()=>{M(null),D(null);let e=document.querySelector("input[name=code-0]");e?.focus()}),1400);return()=>clearTimeout(e)}}),[L,R]);/*#__PURE__*/return e(C,{contactMethod:U,authFlow:0===W?"email":"sms",appName:c?.name,whatsAppEnabled:k,onBack:()=>t(),onCodeSubmit:async e=>{try{await w(e),j(!0)}catch(e){if(e instanceof f&&e.privyErrorCode===v.INVALID_CREDENTIALS)M("Invalid or expired verification code"),D(0);else if(e instanceof f&&e.privyErrorCode===v.CANNOT_LINK_MORE_OF_TYPE)M(e.message);else{if(e instanceof f&&e.privyErrorCode===v.USER_LIMIT_REACHED)return console.error(new h(e).toString()),void r("UserLimitReachedScreen");if(e instanceof f&&e.privyErrorCode===v.USER_DOES_NOT_EXIST)return void r("AccountNotFoundScreen");if(e instanceof f&&e.privyErrorCode===v.LINKED_TO_ANOTHER_USER)return i({errorModalData:{error:e,previousScreen:o??"AwaitingPasswordlessCodeScreen"}}),void r("ErrorScreen",!1);if(e instanceof f&&e.privyErrorCode===v.DISALLOWED_PLUS_EMAIL)return i({inlineError:{error:e}}),void r("ConnectOrCreateScreen",!1);if(e instanceof f&&e.privyErrorCode===v.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return i({accountTransfer:{nonce:e.data?.data?.nonce,account:U,displayName:e.data?.data?.account?.displayName,linkMethod:0===W?"email":"sms",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void r("LinkConflictScreen");M("Issue verifying code"),D(0)}}},onResend:async()=>{P(30),0===W?await d():await x()},errorMessage:L||void 0,success:_,resendCountdown:O,onInvalidInput:e=>{M(e),D(1)},onClearError:()=>{1===R&&(M(null),D(null))}})}};let k=/*#__PURE__*/c.div.withConfig({displayName:"PasswordlessCodeContainer",componentId:"sc-6187bfee-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin:auto;gap:16px;flex-grow:1;width:100%;"]),_=/*#__PURE__*/c.div.withConfig({displayName:"CodeInput",componentId:"sc-6187bfee-1"})(["display:flex;flex-direction:column;width:100%;gap:12px;> div:first-child{display:flex;justify-content:center;gap:0.5rem;width:100%;border-radius:var(--privy-border-radius-sm);> input{border:1px solid var(--privy-color-foreground-4);background:var(--privy-color-background);border-radius:var(--privy-border-radius-sm);padding:8px 10px;height:48px;width:40px;text-align:center;font-size:18px;font-weight:600;color:var(--privy-color-foreground);transition:all 0.2s ease;}> input:focus{border:1px solid var(--privy-color-foreground);box-shadow:0 0 0 1px var(--privy-color-foreground);}> input:invalid{border:1px solid var(--privy-color-error);}> input.success{border:1px solid var(--privy-color-border-success);background:var(--privy-color-success-bg);}> input.fail{border:1px solid var(--privy-color-border-error);background:var(--privy-color-error-bg);animation:shake 180ms;animation-iteration-count:2;}}@keyframes shake{0%{transform:translate(1px,0px);}33%{transform:translate(-1px,0px);}67%{transform:translate(-1px,0px);}100%{transform:translate(1px,0px);}}"]),j=/*#__PURE__*/c.div.withConfig({displayName:"InputHelp",componentId:"sc-6187bfee-2"})(["line-height:20px;min-height:20px;font-size:14px;font-weight:400;color:",";display:flex;justify-content:center;width:100%;text-align:center;"],(e=>e.$success?"var(--privy-color-success-dark)":e.$fail?"var(--privy-color-error-dark)":"transparent")),L=/*#__PURE__*/c.div.withConfig({displayName:"HelpTextContainer",componentId:"sc-6187bfee-3"})(["display:flex;gap:8px;align-items:center;justify-content:center;width:100%;color:var(--privy-color-foreground-2);"]),M=/*#__PURE__*/c.div.withConfig({displayName:"Badge",componentId:"sc-6187bfee-4"})(["display:flex;align-items:center;justify-content:center;border-radius:var(--privy-border-radius-sm);padding:2px 8px;gap:4px;background:var(--privy-color-background-2);color:var(--privy-color-foreground-2);"]),R=/*#__PURE__*/c.span.withConfig({displayName:"BoldWrappingSpan",componentId:"sc-6187bfee-5"})(["font-weight:500;word-break:break-all;color:var(--privy-color-foreground);"]);export{T as AwaitingPasswordlessCodeScreen,C as AwaitingPasswordlessCodeScreenView,T as default};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"@heroicons/react/20/solid/CheckIcon";import t from"@heroicons/react/24/outline/EnvelopeIcon";import i from"@heroicons/react/24/outline/PhoneIcon";import{useState as n,useEffect as a}from"react";import{isMobile as s}from"react-device-detect";import{styled as c}from"styled-components";import{H as l}from"./Layouts-Bmf8DxNP.mjs";import{L as d}from"./Link-DwjLfHwW.mjs";import{u as p,q as m}from"./context-BqHnoxK5.mjs";import{u,e as f,b as v,k as h}from"./internal-context-e-Eni5bG.mjs";import{a as y,u as g}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{s as b}from"./shouldProceedtoEmbeddedWalletCreationFlow-F4FtZ8gq.mjs";import{S as x}from"./ScreenLayout-Dp0ezg8Q.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./index-B24hEnAn.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CBIiGG1k.mjs";import"zustand";import"./prepareFundingModalData-lYYA8ZfI.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Aw21dxK9.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C5z76Qhs.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-3JMVXKiE.mjs";import"./Screen-Bj-1pwMI.mjs";import"./ModalHeader-B27O6soE.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const C=({contactMethod:c,authFlow:p,appName:m="Privy",whatsAppEnabled:u=!1,onBack:f,onCodeSubmit:v,onResend:h,errorMessage:y,success:g=!1,resendCountdown:b=0,onInvalidInput:C,onClearError:S})=>{let[A,I]=n(w);a((()=>{y||I(w)}),[y]);let N=async e=>{e.preventDefault();let r=e.currentTarget.value.replace(" ","");if(""===r)return;if(isNaN(Number(r)))return void C?.("Code should be numeric");S?.();let o=Number(e.currentTarget.name?.charAt(5)),t=[...r||[""]].slice(0,E-o),i=[...A.slice(0,o),...t,...A.slice(o+t.length)];I(i);let n=Math.min(Math.max(o+t.length,0),E-1);if(!isNaN(Number(e.currentTarget.value))){let e=document.querySelector(`input[name=code-${n}]`);e?.focus()}if(i.every((e=>e&&!isNaN(+e)))){let e=document.querySelector(`input[name=code-${n}]`);e?.blur(),await(v?.(i.join("")))}};/*#__PURE__*/return e(x,{title:"Enter confirmation code",subtitle:/*#__PURE__*/r("span","email"===p?{children:["Please check ",/*#__PURE__*/e(R,{children:c})," for an email from privy.io and enter your code below."]}:{children:["Please check ",/*#__PURE__*/e(R,{children:c})," for a",u?" WhatsApp":""," message from ",m," and enter your code below."]}),icon:"email"===p?t:i,onBack:f,showBack:!0,helpText:/*#__PURE__*/r(L,{children:[/*#__PURE__*/r("span",{children:["Didn't get ","email"===p?"an email":"a message","?"]}),b?/*#__PURE__*/r(M,{children:[/*#__PURE__*/e(o,{color:"var(--privy-color-foreground)",strokeWidth:1.33,height:"12px",width:"12px"}),/*#__PURE__*/e("span",{children:"Code sent"})]}):/*#__PURE__*/e(d,{as:"button",size:"sm",onClick:h,children:"Resend code"})]}),children:/*#__PURE__*/e(k,{children:/*#__PURE__*/e(l,{children:/*#__PURE__*/r(_,{children:[/*#__PURE__*/e("div",{children:A.map(((r,o)=>/*#__PURE__*/e("input",{name:`code-${o}`,type:"text",value:A[o],onChange:N,onKeyUp:e=>{"Backspace"===e.key&&(e=>{if(S?.(),I([...A.slice(0,e),"",...A.slice(e+1)]),e>0){let r=document.querySelector(`input[name=code-${e-1}]`);r?.focus()}})(o)},inputMode:"numeric",autoFocus:0===o,pattern:"[0-9]",className:`${g?"success":""} ${y?"fail":""}`,autoComplete:s?"one-time-code":"off"},o)))}),/*#__PURE__*/e(j,{$fail:!!y,$success:g,children:/*#__PURE__*/e("span",{children:"Invalid or expired verification code"===y?"Incorrect code":y||(g?"Success!":"")})})]})})})})};let E=6,w=Array(6).fill("");var S,A,I=((S=I||{})[S.RESET_AFTER_DELAY=0]="RESET_AFTER_DELAY",S[S.CLEAR_ON_NEXT_VALID_INPUT=1]="CLEAR_ON_NEXT_VALID_INPUT",S),N=((A=N||{})[A.EMAIL=0]="EMAIL",A[A.SMS=1]="SMS",A);const T={component:()=>{let{navigate:r,lastScreen:o,navigateBack:t,setModalData:i,onUserCloseViaDialogOrKeybindRef:s}=y(),c=p(),{closePrivyModal:l,resendEmailCode:d,resendSmsCode:x,getAuthMeta:E,loginWithCode:w,updateWallets:S,createAnalyticsEvent:A}=u(),{authenticated:I,logout:N,user:T}=g(),{whatsAppEnabled:k}=p(),[_,j]=n(!1),[L,M]=n(null),[R,D]=n(null),[O,P]=n(0);s.current=()=>null;let W=E()?.email?0:1,U=0===W?E()?.email||"":E()?.phoneNumber||"",F=m-500;a((()=>{if(O){let e=setTimeout((()=>{P(O-1)}),1e3);return()=>clearTimeout(e)}}),[O]),a((()=>{if(I&&_&&T){if(c?.legal.requireUsersAcceptTerms&&!T.hasAcceptedTerms){let e=setTimeout((()=>{r("AffirmativeConsentScreen")}),F);return()=>clearTimeout(e)}if(b(T,c.embeddedWallets)){let e=setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),A({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AwaitingPasswordlessCodeScreen"}}),N()},callAuthOnSuccessOnClose:!0}}),r("EmbeddedWalletOnAccountCreateScreen")}),F);return()=>clearTimeout(e)}{S();let e=setTimeout((()=>l({shouldCallAuthOnSuccess:!0,isSuccess:!0})),m);return()=>clearTimeout(e)}}}),[I,_,T]),a((()=>{if(L&&0===R){let e=setTimeout((()=>{M(null),D(null);let e=document.querySelector("input[name=code-0]");e?.focus()}),1400);return()=>clearTimeout(e)}}),[L,R]);/*#__PURE__*/return e(C,{contactMethod:U,authFlow:0===W?"email":"sms",appName:c?.name,whatsAppEnabled:k,onBack:()=>t(),onCodeSubmit:async e=>{try{await w(e),j(!0)}catch(e){if(e instanceof f&&e.privyErrorCode===v.INVALID_CREDENTIALS)M("Invalid or expired verification code"),D(0);else if(e instanceof f&&e.privyErrorCode===v.CANNOT_LINK_MORE_OF_TYPE)M(e.message);else{if(e instanceof f&&e.privyErrorCode===v.USER_LIMIT_REACHED)return console.error(new h(e).toString()),void r("UserLimitReachedScreen");if(e instanceof f&&e.privyErrorCode===v.USER_DOES_NOT_EXIST)return void r("AccountNotFoundScreen");if(e instanceof f&&e.privyErrorCode===v.LINKED_TO_ANOTHER_USER)return i({errorModalData:{error:e,previousScreen:o??"AwaitingPasswordlessCodeScreen"}}),void r("ErrorScreen",!1);if(e instanceof f&&e.privyErrorCode===v.DISALLOWED_PLUS_EMAIL)return i({inlineError:{error:e}}),void r("ConnectOrCreateScreen",!1);if(e instanceof f&&e.privyErrorCode===v.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return i({accountTransfer:{nonce:e.data?.data?.nonce,account:U,displayName:e.data?.data?.account?.displayName,linkMethod:0===W?"email":"sms",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void r("LinkConflictScreen");M("Issue verifying code"),D(0)}}},onResend:async()=>{P(30),0===W?await d():await x()},errorMessage:L||void 0,success:_,resendCountdown:O,onInvalidInput:e=>{M(e),D(1)},onClearError:()=>{1===R&&(M(null),D(null))}})}};let k=/*#__PURE__*/c.div.withConfig({displayName:"PasswordlessCodeContainer",componentId:"sc-6187bfee-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin:auto;gap:16px;flex-grow:1;width:100%;"]),_=/*#__PURE__*/c.div.withConfig({displayName:"CodeInput",componentId:"sc-6187bfee-1"})(["display:flex;flex-direction:column;width:100%;gap:12px;> div:first-child{display:flex;justify-content:center;gap:0.5rem;width:100%;border-radius:var(--privy-border-radius-sm);> input{border:1px solid var(--privy-color-foreground-4);background:var(--privy-color-background);border-radius:var(--privy-border-radius-sm);padding:8px 10px;height:48px;width:40px;text-align:center;font-size:18px;font-weight:600;color:var(--privy-color-foreground);transition:all 0.2s ease;}> input:focus{border:1px solid var(--privy-color-foreground);box-shadow:0 0 0 1px var(--privy-color-foreground);}> input:invalid{border:1px solid var(--privy-color-error);}> input.success{border:1px solid var(--privy-color-border-success);background:var(--privy-color-success-bg);}> input.fail{border:1px solid var(--privy-color-border-error);background:var(--privy-color-error-bg);animation:shake 180ms;animation-iteration-count:2;}}@keyframes shake{0%{transform:translate(1px,0px);}33%{transform:translate(-1px,0px);}67%{transform:translate(-1px,0px);}100%{transform:translate(1px,0px);}}"]),j=/*#__PURE__*/c.div.withConfig({displayName:"InputHelp",componentId:"sc-6187bfee-2"})(["line-height:20px;min-height:20px;font-size:14px;font-weight:400;color:",";display:flex;justify-content:center;width:100%;text-align:center;"],(e=>e.$success?"var(--privy-color-success-dark)":e.$fail?"var(--privy-color-error-dark)":"transparent")),L=/*#__PURE__*/c.div.withConfig({displayName:"HelpTextContainer",componentId:"sc-6187bfee-3"})(["display:flex;gap:8px;align-items:center;justify-content:center;width:100%;color:var(--privy-color-foreground-2);"]),M=/*#__PURE__*/c.div.withConfig({displayName:"Badge",componentId:"sc-6187bfee-4"})(["display:flex;align-items:center;justify-content:center;border-radius:var(--privy-border-radius-sm);padding:2px 8px;gap:4px;background:var(--privy-color-background-2);color:var(--privy-color-foreground-2);"]),R=/*#__PURE__*/c.span.withConfig({displayName:"BoldWrappingSpan",componentId:"sc-6187bfee-5"})(["font-weight:500;word-break:break-all;color:var(--privy-color-foreground);"]);export{T as AwaitingPasswordlessCodeScreen,C as AwaitingPasswordlessCodeScreenView,T as default};
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/CheckCircleIcon";import{useRef as o,useState as a,useMemo as i,useEffect as s}from"react";import{parseEther as d}from"viem";import{ConnectedStandardSolanaWallet as l}from"@privy-io/js-sdk-core";import{b as c,c as m,R as u}from"./Layouts-Bmf8DxNP.mjs";import{B as p}from"./ModalHeader-YP9pLMEP.mjs";import{C as f}from"./ScreenHeader-Biz1wq02.mjs";import{t as h}from"./FundWalletMethodHeader-DBV2Rnau.mjs";import{N as g}from"./index-CJMgUOnw.mjs";import{u as v,t as w}from"./context-BOoFAPna.mjs";import{u as I,a as C,b as T}from"./internal-context-e-Eni5bG.mjs";import{Q as y,a6 as S}from"./useActiveWallet-BdFIc7_K.mjs";import{a as j}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{g as b,t as N,d as F,a as U,b as E,u as k}from"./reservoir-kvLjIrEo.mjs";import{c as x,S as W}from"./usePrivy-CeQ3C1KS.mjs";import{T as R}from"./TransferOrBridgeLoadingScreen-CKF3jFy2.mjs";import{t as L}from"./prepareFundingModalData-CzDMa8gy.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Row-CG0lSY5Z.mjs";import"./Value-B4M62ove.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./Address-BZeOq9QH.mjs";import"lucide-react";import"./Button-CrJpeX0e.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"eventemitter3";const D={component:function(){let D=v(),{closePrivyModal:B,createAnalyticsEvent:M,connectors:P}=I(),{navigate:$,setModalData:H,data:q}=j(),O=v(),_=o(!1),Q=x(),[V,z]=a(!1),[G,X]=a(!1),[Y,J]=a(null),[K,Z]=a(),[ee,te]=a();if(!q?.funding||"ethereum"!==q.funding.chainType)throw Error("Invalid funding data");let{amount:ne,connectedWallet:re,chain:oe,solanaChain:ae,isUSDC:ie}=q.funding,se=q.funding.address,de=q.funding.erc20Address,le=q.funding.isUSDC?"USDC":oe.nativeCurrency.symbol,ce=i((()=>"solana"===re?.type?re.provider:function({connectors:e,connectedWalletAddress:t}){let n=e.find((e=>"solana"===e.chainType&&e.wallets.some((e=>e.address===t)))),r=n?.wallet.accounts.find((e=>e.address===t));if(!n||!r)throw new C("Unable to find source wallet connector");return new l({wallet:n.wallet,account:r})}({connectors:P,connectedWalletAddress:re?.address||""})),[re,P]),me=i((()=>{let e=Q(W);if(!e)throw new C("Unable to load solana plugin");let t=D.solanaRpcs["solana:mainnet"];if(!t)throw new C("Unable to load mainnet RPC");return e.getSolanaRpcClient({rpc:t.rpc,rpcSubscriptions:t.rpcSubscriptions,chain:"solana:mainnet",blockExplorerUrl:t.blockExplorerUrl??"https://explorer.solana.com"})}),[]),ue=y(L(ce?.standardWallet.name||"unknown")),pe=ue?.name||"wallet";return s((()=>{(async function(){if(!ce||!oe||_.current)return;let e=Q(W);if(!e)return void J(new C("Unable to solana plugin"));_.current=!0,oe?.testnet&&console.warn("Solana testnets are not supported for bridging");let t=ie?1e6*parseFloat(ne):d(ne),n=await b({isTestnet:!!oe.testnet,input:N({appId:O.id,amount:t.toString(),user:ce.address,recipient:se,destinationChainId:oe.id,originChainId:E,originCurrency:ie?F:U,destinationCurrency:ie?de:void 0})}).catch(console.error);if(!n)return void J(new C(`Unable to fetch quotes for bridging. Wallet ${S(ce.address)} does not have enough funds.`,void 0,T.INSUFFICIENT_BALANCE));let r=await e.createTransactionFromRelayQuote({quote:n,source:ce.address,solanaClient:me});if(r)try{z(!0);let t=await e.simulateTransaction({solanaClient:me,tx:r});if(t.hasError)return t.hasFunds?(console.error("Transaction failed:",t.error),void J(new C("Something went wrong",void 0,T.TRANSACTION_FAILURE))):void J(new C(`Wallet ${S(ce?.address)} does not have enough funds. ${n.details.currencyIn.amountFormatted} ${le} are needed to complete the transaction.`,void 0,T.INSUFFICIENT_BALANCE));let{signature:o}=await ce.signAndSendTransaction({chain:"solana:mainnet",transaction:r}),a=e.getAddressFromBuffer(o);Z(a),te("pending")}catch(e){if(console.error(e),/user rejected the request/gi.test(e.message||""))return void J(new C("Transaction was rejected by the user",void 0,T.TRANSACTION_FAILURE));J(new C("Something went wrong",void 0,T.TRANSACTION_FAILURE))}else J(new C(`Unable to select bridge option from quotes. Wallet ${S(ce.address)} does not have enough funds.`,void 0,T.INSUFFICIENT_BALANCE))})().catch(console.error)}),[]),k({transactionHash:K,isTestnet:!1,bridgingStatus:ee,setBridgingStatus:te,onSuccess({transactionHash:e}){z(!1),X(!0),M({eventName:A,payload:{provider:"external",status:"success",txHash:e,address:ce.address,chainType:"solana",clusterName:ae,token:"SOL",destinationAddress:se,destinationChainId:oe.id,destinationChainType:"ethereum",destinationValue:ne,destinationToken:ie?"USDC":"ETH"}})},onFailure({error:e}){z(!1),J(e)}}),s((()=>{if(!G)return;let e=setTimeout(B,w);return()=>clearTimeout(e)}),[G]),s((()=>{Y&&(H({funding:q?.funding,solanaFundingData:q?.solanaFundingData,sendTransaction:q?.sendTransaction,errorModalData:{error:Y,previousScreen:"TransferFromWalletScreen"}}),$("ErrorScreen",!1))}),[Y]),G?/*#__PURE__*/e(n,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(c,{}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t(r,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/t(f,{title:"Success!",description:`You’ve successfully added ${ne} ${le} to your ${O.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/t(u,{}),/*#__PURE__*/t(p,{})]}):V&&ce?/*#__PURE__*/t(R,{walletClientType:L(ce?.standardWallet.name||"unknown"),displayName:pe,addressToFund:se,isBridging:V,isErc20Flow:!1,chainId:oe.id,chainName:oe.name,totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
1
+ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/CheckCircleIcon";import{useRef as o,useState as a,useMemo as i,useEffect as s}from"react";import{parseEther as d}from"viem";import{ConnectedStandardSolanaWallet as l}from"@privy-io/js-sdk-core";import{b as c,c as m,R as u}from"./Layouts-Bmf8DxNP.mjs";import{B as p}from"./ModalHeader-B27O6soE.mjs";import{C as f}from"./ScreenHeader-Biz1wq02.mjs";import{t as h}from"./FundWalletMethodHeader-C0uPKdYw.mjs";import{N as g}from"./index-CJMgUOnw.mjs";import{u as v,t as w}from"./context-BqHnoxK5.mjs";import{u as I,a as C,b as T}from"./internal-context-e-Eni5bG.mjs";import{Q as y,a6 as S}from"./useActiveWallet-CBIiGG1k.mjs";import{a as j}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{g as b,t as N,d as F,a as U,b as E,u as k}from"./reservoir-kvLjIrEo.mjs";import{c as x,S as W}from"./usePrivy-C5z76Qhs.mjs";import{T as R}from"./TransferOrBridgeLoadingScreen-R7No-8Yr.mjs";import{t as L}from"./prepareFundingModalData-lYYA8ZfI.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Aw21dxK9.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Row-CG0lSY5Z.mjs";import"./Value-B4M62ove.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./Address-C2aXxM2N.mjs";import"lucide-react";import"./Button-3JMVXKiE.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"eventemitter3";const D={component:function(){let D=v(),{closePrivyModal:B,createAnalyticsEvent:M,connectors:P}=I(),{navigate:$,setModalData:H,data:q}=j(),O=v(),_=o(!1),Q=x(),[V,z]=a(!1),[G,X]=a(!1),[Y,J]=a(null),[K,Z]=a(),[ee,te]=a();if(!q?.funding||"ethereum"!==q.funding.chainType)throw Error("Invalid funding data");let{amount:ne,connectedWallet:re,chain:oe,solanaChain:ae,isUSDC:ie}=q.funding,se=q.funding.address,de=q.funding.erc20Address,le=q.funding.isUSDC?"USDC":oe.nativeCurrency.symbol,ce=i((()=>"solana"===re?.type?re.provider:function({connectors:e,connectedWalletAddress:t}){let n=e.find((e=>"solana"===e.chainType&&e.wallets.some((e=>e.address===t)))),r=n?.wallet.accounts.find((e=>e.address===t));if(!n||!r)throw new C("Unable to find source wallet connector");return new l({wallet:n.wallet,account:r})}({connectors:P,connectedWalletAddress:re?.address||""})),[re,P]),me=i((()=>{let e=Q(W);if(!e)throw new C("Unable to load solana plugin");let t=D.solanaRpcs["solana:mainnet"];if(!t)throw new C("Unable to load mainnet RPC");return e.getSolanaRpcClient({rpc:t.rpc,rpcSubscriptions:t.rpcSubscriptions,chain:"solana:mainnet",blockExplorerUrl:t.blockExplorerUrl??"https://explorer.solana.com"})}),[]),ue=y(L(ce?.standardWallet.name||"unknown")),pe=ue?.name||"wallet";return s((()=>{(async function(){if(!ce||!oe||_.current)return;let e=Q(W);if(!e)return void J(new C("Unable to solana plugin"));_.current=!0,oe?.testnet&&console.warn("Solana testnets are not supported for bridging");let t=ie?1e6*parseFloat(ne):d(ne),n=await b({isTestnet:!!oe.testnet,input:N({appId:O.id,amount:t.toString(),user:ce.address,recipient:se,destinationChainId:oe.id,originChainId:E,originCurrency:ie?F:U,destinationCurrency:ie?de:void 0})}).catch(console.error);if(!n)return void J(new C(`Unable to fetch quotes for bridging. Wallet ${S(ce.address)} does not have enough funds.`,void 0,T.INSUFFICIENT_BALANCE));let r=await e.createTransactionFromRelayQuote({quote:n,source:ce.address,solanaClient:me});if(r)try{z(!0);let t=await e.simulateTransaction({solanaClient:me,tx:r});if(t.hasError)return t.hasFunds?(console.error("Transaction failed:",t.error),void J(new C("Something went wrong",void 0,T.TRANSACTION_FAILURE))):void J(new C(`Wallet ${S(ce?.address)} does not have enough funds. ${n.details.currencyIn.amountFormatted} ${le} are needed to complete the transaction.`,void 0,T.INSUFFICIENT_BALANCE));let{signature:o}=await ce.signAndSendTransaction({chain:"solana:mainnet",transaction:r}),a=e.getAddressFromBuffer(o);Z(a),te("pending")}catch(e){if(console.error(e),/user rejected the request/gi.test(e.message||""))return void J(new C("Transaction was rejected by the user",void 0,T.TRANSACTION_FAILURE));J(new C("Something went wrong",void 0,T.TRANSACTION_FAILURE))}else J(new C(`Unable to select bridge option from quotes. Wallet ${S(ce.address)} does not have enough funds.`,void 0,T.INSUFFICIENT_BALANCE))})().catch(console.error)}),[]),k({transactionHash:K,isTestnet:!1,bridgingStatus:ee,setBridgingStatus:te,onSuccess({transactionHash:e}){z(!1),X(!0),M({eventName:A,payload:{provider:"external",status:"success",txHash:e,address:ce.address,chainType:"solana",clusterName:ae,token:"SOL",destinationAddress:se,destinationChainId:oe.id,destinationChainType:"ethereum",destinationValue:ne,destinationToken:ie?"USDC":"ETH"}})},onFailure({error:e}){z(!1),J(e)}}),s((()=>{if(!G)return;let e=setTimeout(B,w);return()=>clearTimeout(e)}),[G]),s((()=>{Y&&(H({funding:q?.funding,solanaFundingData:q?.solanaFundingData,sendTransaction:q?.sendTransaction,errorModalData:{error:Y,previousScreen:"TransferFromWalletScreen"}}),$("ErrorScreen",!1))}),[Y]),G?/*#__PURE__*/e(n,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(c,{}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t(r,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/t(f,{title:"Success!",description:`You’ve successfully added ${ne} ${le} to your ${O.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/t(u,{}),/*#__PURE__*/t(p,{})]}):V&&ce?/*#__PURE__*/t(R,{walletClientType:L(ce?.standardWallet.name||"unknown"),displayName:pe,addressToFund:se,isBridging:V,isErc20Flow:!1,chainId:oe.id,chainName:oe.name,totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
2
2
  /*#__PURE__*/e(n,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(g,{}),/*#__PURE__*/t("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/t(p,{})]})}};export{D as AwaitingSolToEvmBridgingScreen,D as default};
@@ -1 +1 @@
1
- import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as o,formatWalletAddress as a}from"@privy-io/js-sdk-core";import{a as n}from"./getPublicClient-A9RSftUZ.mjs";import{g as i}from"./getErc20Balance-CaKjNAs9.mjs";import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import{useRef as m}from"react";import{a as l}from"./Button-CrJpeX0e.mjs";import{b as d,R as p}from"./Layouts-Bmf8DxNP.mjs";import{B as h}from"./ModalHeader-YP9pLMEP.mjs";import{t as f}from"./FundWalletMethodHeader-DBV2Rnau.mjs";import{R as g}from"./Row-CG0lSY5Z.mjs";import{E as u}from"./ErrorMessage-Cx8GKGhL.mjs";import{V as b,L as y}from"./Value-B4M62ove.mjs";import{S as v}from"./Subtitle-DkvfP2Ev.mjs";import{T as C}from"./Title-D0pfZff-.mjs";import w from"@heroicons/react/24/outline/WalletIcon";import{styled as j}from"styled-components";import{g as N}from"./getChainName-DjpPdUSc.mjs";import{C as I}from"./Chip-Bsgj4Yc-.mjs";import{N as k}from"./NetworkIcon-B48ilzF8.mjs";import{B as x,a as B}from"./shared-CtYf3O54.mjs";import{Menu as T,MenuButton as S,MenuItems as A,MenuItem as $}from"@headlessui/react";import E from"@heroicons/react/24/outline/ChevronDownIcon";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as M}from"./ethers-DnpKeAXc.mjs";import{F as P,a as W,b as L,c as R,d as H}from"./styles-DY17fuAX.mjs";const Q=({chains:a,appId:t,address:s,rpcConfig:c,includeUsdc:m})=>Promise.all(a.map((async a=>{let l=e({chain:a,transport:r(n(a,c,t))}),d=await l.getBalance({address:s}).catch((()=>0n)),p=null,h=o[a.id];if(m&&h){let{balance:e}=await i({address:s,chain:a,rpcConfig:c,appId:t,erc20Address:h});p=e}return{balance:d,erc20Balance:p,erc20Address:h,chain:a}}))),U=({balance:e,className:r,chain:o})=>/*#__PURE__*/t(x,{className:r,$state:void 0,children:/*#__PURE__*/t(V,{balance:e,chain:o})}),V=({balance:e,chain:r})=>/*#__PURE__*/s(c,{children:[/*#__PURE__*/s(z,{children:[/*#__PURE__*/t(O,{chainId:"object"==typeof r?r.id:"solana"}),/*#__PURE__*/t(b,{children:"object"==typeof r?r.name:N(r)})]}),/*#__PURE__*/s(I,{isLoading:!1,isPulsing:!1,color:"gray",children:[/*#__PURE__*/t(D,{children:/*#__PURE__*/t(w,{})}),e]})]});let z=/*#__PURE__*/j.div.withConfig({displayName:"Container",componentId:"sc-63f80cee-0"})(["display:flex;align-items:center;"]),D=/*#__PURE__*/j.div.withConfig({displayName:"IconContainer",componentId:"sc-63f80cee-1"})(["height:0.75rem;width:0.75rem;margin-right:0.2rem;"]),O=/*#__PURE__*/j(k).withConfig({displayName:"StyledNetworkIcon",componentId:"sc-63f80cee-2"})(["height:1.25rem;width:1.25rem;display:inline-block;margin-right:0.5rem;border-radius:4px;"]);const Y=({options:e,onSelect:r,selected:o,className:a})=>/*#__PURE__*/s(T,{as:q,children:[/*#__PURE__*/s(S,{as:X,children:[/*#__PURE__*/t(V,{balance:o.balance,chain:o.chain}),/*#__PURE__*/t(K,{height:16})]}),/*#__PURE__*/t(A,{as:G,className:a,children:e.map(((e,o)=>/*#__PURE__*/t($,{as:J,onClick:()=>r(o),children:/*#__PURE__*/t(V,{balance:e.balance,chain:e.chain})},o)))})]});let q=/*#__PURE__*/j.div.withConfig({displayName:"Wrapper",componentId:"sc-31c00f79-0"})(["width:100%;position:relative;"]),G=/*#__PURE__*/j.div.withConfig({displayName:"Popover",componentId:"sc-31c00f79-1"})(["width:100%;margin-top:0.5rem;position:absolute;background-color:var(--privy-color-background);border-radius:var(--privy-border-radius-md);overflow-x:hidden;overflow-y:auto;box-shadow:0px 1px 2px 0px rgba(16,24,40,0.05);max-height:11.75rem;&&{border:solid 1px var(--privy-color-foreground-4);}z-index:1;"]),J=/*#__PURE__*/j.button.withConfig({displayName:"Button",componentId:"sc-31c00f79-2"})(["width:100%;display:flex;justify-content:space-between;&&{padding:1rem;}:not(:last-child){border-bottom:solid 1px var(--privy-color-foreground-4);}:hover{background:var(--privy-color-background-2);}"]),K=/*#__PURE__*/j(E).withConfig({displayName:"StyledChevronIcon",componentId:"sc-31c00f79-3"})(["height:1rem;margin-left:0.5rem;"]),X=/*#__PURE__*/j.button.withConfig({displayName:"StyledMenuButton",componentId:"sc-31c00f79-4"})([""," span{margin-left:auto;}","{transition:rotate 100ms ease-in;}&[aria-expanded='true']{","{rotate:-180deg;}}"],B,K,K);const Z=({displayName:e,errorMessage:r,configuredFundingChain:o,formattedBalance:n,fundingAmount:i,fundingCurrency:b,fundingAmountInUsd:w,options:j,selectedOption:I,isPreparing:k,isSubmitting:x,addressToFund:B,fundingWalletAddress:T,onSubmit:S,onSelect:A,onAmountChange:$,erc20ContractInfo:E})=>{let Q=m(null);/*#__PURE__*/return s(c,{children:[/*#__PURE__*/t(f,{}),/*#__PURE__*/t(d,{}),/*#__PURE__*/t(C,{children:"Transfer from another network"}),/*#__PURE__*/s(v,{children:["You need more funds on the"," ","object"==typeof o?o.name:N(o)," ","network. Bridge from another blockchain network."]}),/*#__PURE__*/s(P,{style:{marginTop:"2rem"},children:[/*#__PURE__*/s(W,{onClick:()=>Q.current?.focus(),children:[/*#__PURE__*/t(L,{ref:Q,value:i,onChange:e=>{let r=e.target.value;if(/^[0-9.]*$/.test(r)&&r.split(".").length-1<=1){let e=/\.$/.test(r)?".":"",o=Number(r.replace(/\.$/,"")||"0");if(Number.isNaN(o))return void $("0");$(o.toString()+e)}}}),/*#__PURE__*/t(R,{children:b})]}),w&&/*#__PURE__*/t(H,{children:w})]}),/*#__PURE__*/s(g,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"From"}),/*#__PURE__*/t(y,{children:a(T)})]}),/*#__PURE__*/t(Y,{selected:{chain:I.chain,balance:I.isErc20Quote?F({amount:I.erc20Balance??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(I.balance,I.chain.nativeCurrency.symbol,3,!0)},options:j.map((({chain:e,balance:r,isErc20Quote:o,erc20Balance:a})=>({chain:e,balance:o?F({amount:a??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(r,e.nativeCurrency.symbol,3,!0)}))),onSelect:A}),/*#__PURE__*/s(g,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"To"}),/*#__PURE__*/t(y,{children:a(B)})]}),/*#__PURE__*/t(U,{chain:o,balance:n}),/*#__PURE__*/t(u,{style:{marginTop:"1rem"},children:r}),/*#__PURE__*/s(l,{style:{marginTop:"1rem"},loading:x||k,disabled:k||x,onClick:S,children:["Confirm with ",e]}),/*#__PURE__*/t(p,{}),/*#__PURE__*/t(h,{})]})};export{Z as B,Q as g};
1
+ import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as o,formatWalletAddress as a}from"@privy-io/js-sdk-core";import{a as n}from"./getPublicClient-A9RSftUZ.mjs";import{g as i}from"./getErc20Balance-CaKjNAs9.mjs";import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import{useRef as m}from"react";import{a as l}from"./Button-3JMVXKiE.mjs";import{b as d,R as p}from"./Layouts-Bmf8DxNP.mjs";import{B as h}from"./ModalHeader-B27O6soE.mjs";import{t as f}from"./FundWalletMethodHeader-C0uPKdYw.mjs";import{R as g}from"./Row-CG0lSY5Z.mjs";import{E as u}from"./ErrorMessage-Cx8GKGhL.mjs";import{V as b,L as y}from"./Value-B4M62ove.mjs";import{S as v}from"./Subtitle-DkvfP2Ev.mjs";import{T as C}from"./Title-D0pfZff-.mjs";import w from"@heroicons/react/24/outline/WalletIcon";import{styled as j}from"styled-components";import{g as N}from"./getChainName-DjpPdUSc.mjs";import{C as I}from"./Chip-Bsgj4Yc-.mjs";import{N as k}from"./NetworkIcon-B48ilzF8.mjs";import{B as x,a as B}from"./shared-CtYf3O54.mjs";import{Menu as T,MenuButton as S,MenuItems as A,MenuItem as $}from"@headlessui/react";import E from"@heroicons/react/24/outline/ChevronDownIcon";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as M}from"./ethers-CUqPIRrW.mjs";import{F as P,a as W,b as L,c as R,d as H}from"./styles-DY17fuAX.mjs";const Q=({chains:a,appId:t,address:s,rpcConfig:c,includeUsdc:m})=>Promise.all(a.map((async a=>{let l=e({chain:a,transport:r(n(a,c,t))}),d=await l.getBalance({address:s}).catch((()=>0n)),p=null,h=o[a.id];if(m&&h){let{balance:e}=await i({address:s,chain:a,rpcConfig:c,appId:t,erc20Address:h});p=e}return{balance:d,erc20Balance:p,erc20Address:h,chain:a}}))),U=({balance:e,className:r,chain:o})=>/*#__PURE__*/t(x,{className:r,$state:void 0,children:/*#__PURE__*/t(V,{balance:e,chain:o})}),V=({balance:e,chain:r})=>/*#__PURE__*/s(c,{children:[/*#__PURE__*/s(z,{children:[/*#__PURE__*/t(O,{chainId:"object"==typeof r?r.id:"solana"}),/*#__PURE__*/t(b,{children:"object"==typeof r?r.name:N(r)})]}),/*#__PURE__*/s(I,{isLoading:!1,isPulsing:!1,color:"gray",children:[/*#__PURE__*/t(D,{children:/*#__PURE__*/t(w,{})}),e]})]});let z=/*#__PURE__*/j.div.withConfig({displayName:"Container",componentId:"sc-63f80cee-0"})(["display:flex;align-items:center;"]),D=/*#__PURE__*/j.div.withConfig({displayName:"IconContainer",componentId:"sc-63f80cee-1"})(["height:0.75rem;width:0.75rem;margin-right:0.2rem;"]),O=/*#__PURE__*/j(k).withConfig({displayName:"StyledNetworkIcon",componentId:"sc-63f80cee-2"})(["height:1.25rem;width:1.25rem;display:inline-block;margin-right:0.5rem;border-radius:4px;"]);const Y=({options:e,onSelect:r,selected:o,className:a})=>/*#__PURE__*/s(T,{as:q,children:[/*#__PURE__*/s(S,{as:X,children:[/*#__PURE__*/t(V,{balance:o.balance,chain:o.chain}),/*#__PURE__*/t(K,{height:16})]}),/*#__PURE__*/t(A,{as:G,className:a,children:e.map(((e,o)=>/*#__PURE__*/t($,{as:J,onClick:()=>r(o),children:/*#__PURE__*/t(V,{balance:e.balance,chain:e.chain})},o)))})]});let q=/*#__PURE__*/j.div.withConfig({displayName:"Wrapper",componentId:"sc-31c00f79-0"})(["width:100%;position:relative;"]),G=/*#__PURE__*/j.div.withConfig({displayName:"Popover",componentId:"sc-31c00f79-1"})(["width:100%;margin-top:0.5rem;position:absolute;background-color:var(--privy-color-background);border-radius:var(--privy-border-radius-md);overflow-x:hidden;overflow-y:auto;box-shadow:0px 1px 2px 0px rgba(16,24,40,0.05);max-height:11.75rem;&&{border:solid 1px var(--privy-color-foreground-4);}z-index:1;"]),J=/*#__PURE__*/j.button.withConfig({displayName:"Button",componentId:"sc-31c00f79-2"})(["width:100%;display:flex;justify-content:space-between;&&{padding:1rem;}:not(:last-child){border-bottom:solid 1px var(--privy-color-foreground-4);}:hover{background:var(--privy-color-background-2);}"]),K=/*#__PURE__*/j(E).withConfig({displayName:"StyledChevronIcon",componentId:"sc-31c00f79-3"})(["height:1rem;margin-left:0.5rem;"]),X=/*#__PURE__*/j.button.withConfig({displayName:"StyledMenuButton",componentId:"sc-31c00f79-4"})([""," span{margin-left:auto;}","{transition:rotate 100ms ease-in;}&[aria-expanded='true']{","{rotate:-180deg;}}"],B,K,K);const Z=({displayName:e,errorMessage:r,configuredFundingChain:o,formattedBalance:n,fundingAmount:i,fundingCurrency:b,fundingAmountInUsd:w,options:j,selectedOption:I,isPreparing:k,isSubmitting:x,addressToFund:B,fundingWalletAddress:T,onSubmit:S,onSelect:A,onAmountChange:$,erc20ContractInfo:E})=>{let Q=m(null);/*#__PURE__*/return s(c,{children:[/*#__PURE__*/t(f,{}),/*#__PURE__*/t(d,{}),/*#__PURE__*/t(C,{children:"Transfer from another network"}),/*#__PURE__*/s(v,{children:["You need more funds on the"," ","object"==typeof o?o.name:N(o)," ","network. Bridge from another blockchain network."]}),/*#__PURE__*/s(P,{style:{marginTop:"2rem"},children:[/*#__PURE__*/s(W,{onClick:()=>Q.current?.focus(),children:[/*#__PURE__*/t(L,{ref:Q,value:i,onChange:e=>{let r=e.target.value;if(/^[0-9.]*$/.test(r)&&r.split(".").length-1<=1){let e=/\.$/.test(r)?".":"",o=Number(r.replace(/\.$/,"")||"0");if(Number.isNaN(o))return void $("0");$(o.toString()+e)}}}),/*#__PURE__*/t(R,{children:b})]}),w&&/*#__PURE__*/t(H,{children:w})]}),/*#__PURE__*/s(g,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"From"}),/*#__PURE__*/t(y,{children:a(T)})]}),/*#__PURE__*/t(Y,{selected:{chain:I.chain,balance:I.isErc20Quote?F({amount:I.erc20Balance??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(I.balance,I.chain.nativeCurrency.symbol,3,!0)},options:j.map((({chain:e,balance:r,isErc20Quote:o,erc20Balance:a})=>({chain:e,balance:o?F({amount:a??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(r,e.nativeCurrency.symbol,3,!0)}))),onSelect:A}),/*#__PURE__*/s(g,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"To"}),/*#__PURE__*/t(y,{children:a(B)})]}),/*#__PURE__*/t(U,{chain:o,balance:n}),/*#__PURE__*/t(u,{style:{marginTop:"1rem"},children:r}),/*#__PURE__*/s(l,{style:{marginTop:"1rem"},loading:x||k,disabled:k||x,onClick:S,children:["Confirm with ",e]}),/*#__PURE__*/t(p,{}),/*#__PURE__*/t(h,{})]})};export{Z as B,Q as g};
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as l}from"styled-components";import{G as d}from"./useActiveWallet-BdFIc7_K.mjs";const c=({variant:o="primary",size:e="lg",children:a,success:l,...d})=>{switch(o){case"secondary":/*#__PURE__*/return r(b,{size:e,...d,children:a});case"error":/*#__PURE__*/return r(b,{$warn:!0,size:e,...d,children:a});case"muted":/*#__PURE__*/return r(p,{size:e,...d,children:a});default:/*#__PURE__*/return r(n,{size:e,success:l,...d,children:a})}},i=/*#__PURE__*/a.button.withConfig({displayName:"BaseButton",componentId:"sc-e537b447-0"})(["display:flex;flex-direction:row;align-items:center;justify-content:center;user-select:none;&{width:auto;cursor:pointer;border-radius:",";font-size:14px;font-style:normal;font-weight:500;line-height:22px;letter-spacing:-0.016px;}&&{height:",";padding:0 ",";}"],(({$size:r})=>"sm"===r?"6px":"var(--privy-border-radius-sm)"),(({$size:r})=>"sm"===r?"28px":"48px"),(({$size:r})=>"sm"===r?"10px":"16px")),n=({children:a,loading:l,disabled:c,success:i,size:n="lg",loadingText:t="Loading...",as:s,onClick:b,...p})=>{let u="a"===s,y=!(!l&&!c);/*#__PURE__*/return r(v,{as:s,disabled:u?void 0:y,"aria-disabled":u?y:void 0,$success:i,$size:n,onClick:r=>{u&&y?r.preventDefault():b?.(r)},...p,children:l?/*#__PURE__*/o(e,{children:[/*#__PURE__*/r(d,{}),t?/*#__PURE__*/r("span",{style:{marginLeft:"8px"},children:t}):null]}):a})},t=({children:o,loading:e,disabled:a,...l})=>/*#__PURE__*/r(s,{disabled:a,...l,children:e?/*#__PURE__*/r(d,{color:"var(--privy-color-foreground-accent)"}):o});let s=/*#__PURE__*/a(i).withConfig({displayName:"StyledPrimaryButtonWithoutGray",componentId:"sc-e537b447-1"})(["position:relative;&&{background-color:var(--privy-color-accent);color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:var(--privy-color-accent-dark);}&:active{background-color:var(--privy-color-accent-dark);}&:disabled,&:hover:disabled,&:active:disabled{cursor:not-allowed;color:var(--privy-color-foreground-disabled);background-color:var(--privy-color-accent-dark);}"]),v=/*#__PURE__*/a(i).withConfig({displayName:"StyledPrimaryButton",componentId:"sc-e537b447-2"})(["position:relative;&&{background-color:",";color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:",";}&:active{background-color:",";}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;}&:disabled{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent-dark)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent-dark)"),(r=>r.disabled&&/*#__PURE__*/l(["&&&,&&&:hover,&&&:active{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])));const b=({children:a,loading:l,disabled:c,size:i="lg",loadingText:n="Loading...",as:t,onClick:s,...v})=>{let b="a"===t,p=!(!l&&!c);/*#__PURE__*/return r(u,{as:t,disabled:b?void 0:p,"aria-disabled":b?p:void 0,$size:i,onClick:r=>{b&&p?r.preventDefault():s?.(r)},...v,children:l?/*#__PURE__*/o(e,{children:[/*#__PURE__*/r(d,{}),n?/*#__PURE__*/r("span",{style:{marginLeft:"8px"},children:n}):null]}):a})},p=({children:a,loading:l,disabled:c,size:i="lg",loadingText:n="Loading...",as:t,onClick:s,...v})=>{let b="a"===t,p=!(!l&&!c);/*#__PURE__*/return r(y,{as:t,disabled:b?void 0:p,"aria-disabled":b?p:void 0,$size:i,onClick:r=>{b&&p?r.preventDefault():s?.(r)},...v,children:l?/*#__PURE__*/o(e,{children:[/*#__PURE__*/r(d,{}),n?/*#__PURE__*/r("span",{style:{marginLeft:"8px"},children:n}):null]}):a})};let u=/*#__PURE__*/a(i).withConfig({displayName:"StyledSecondaryButton",componentId:"sc-e537b447-3"})(["&&{border-width:1px;border-style:solid;border-color:",";background-color:var(--privy-color-background);color:",";transition:border-color 200ms ease,color 200ms ease,background-color 200ms ease;}&:hover{border-color:",";background-color:",";color:",";}&:active{border-color:",";background-color:",";color:",";}&:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(r=>r.$warn?"var(--privy-color-border-error)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-border-error)":"var(--privy-color-border-interactive-hover)"),(r=>r.$warn?"var(--privy-color-error-light)":"var(--privy-color-info-bg-hover)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-border-error)":"var(--privy-color-border-interactive)"),(r=>r.$warn?"var(--privy-color-error-bg-hover)":"var(--privy-color-info-bg)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.disabled&&/*#__PURE__*/l(["&&&,&&&:hover,&&&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"]))),y=/*#__PURE__*/a(i).withConfig({displayName:"StyledMutedButton",componentId:"sc-e537b447-4"})(["&&{border-width:1px;border-style:solid;border-color:var(--privy-color-border-default);background-color:transparent;color:var(--privy-color-text-muted);transition:border-color 200ms ease,color 200ms ease,background-color 200ms ease;}&:hover{border-color:var(--privy-color-border-default);background-color:var(--privy-color-info-bg-hover);color:var(--privy-color-foreground-2);}&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-info-bg);color:var(--privy-color-foreground-2);}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;}&:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(r=>r.disabled&&/*#__PURE__*/l(["&&&,&&&:hover,&&&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])));const g=({children:e,onClick:a,disabled:l,isSubmitting:c,...i})=>/*#__PURE__*/o(f,{$isSubmitting:c,onClick:a,disabled:l,...i,children:[/*#__PURE__*/r("span",{children:e}),
1
+ import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as l}from"styled-components";import{G as d}from"./useActiveWallet-CBIiGG1k.mjs";const c=({variant:o="primary",size:e="lg",children:a,success:l,...d})=>{switch(o){case"secondary":/*#__PURE__*/return r(b,{size:e,...d,children:a});case"error":/*#__PURE__*/return r(b,{$warn:!0,size:e,...d,children:a});case"muted":/*#__PURE__*/return r(p,{size:e,...d,children:a});default:/*#__PURE__*/return r(n,{size:e,success:l,...d,children:a})}},i=/*#__PURE__*/a.button.withConfig({displayName:"BaseButton",componentId:"sc-e537b447-0"})(["display:flex;flex-direction:row;align-items:center;justify-content:center;user-select:none;&{width:auto;cursor:pointer;border-radius:",";font-size:14px;font-style:normal;font-weight:500;line-height:22px;letter-spacing:-0.016px;}&&{height:",";padding:0 ",";}"],(({$size:r})=>"sm"===r?"6px":"var(--privy-border-radius-sm)"),(({$size:r})=>"sm"===r?"28px":"48px"),(({$size:r})=>"sm"===r?"10px":"16px")),n=({children:a,loading:l,disabled:c,success:i,size:n="lg",loadingText:t="Loading...",as:s,onClick:b,...p})=>{let u="a"===s,y=!(!l&&!c);/*#__PURE__*/return r(v,{as:s,disabled:u?void 0:y,"aria-disabled":u?y:void 0,$success:i,$size:n,onClick:r=>{u&&y?r.preventDefault():b?.(r)},...p,children:l?/*#__PURE__*/o(e,{children:[/*#__PURE__*/r(d,{}),t?/*#__PURE__*/r("span",{style:{marginLeft:"8px"},children:t}):null]}):a})},t=({children:o,loading:e,disabled:a,...l})=>/*#__PURE__*/r(s,{disabled:a,...l,children:e?/*#__PURE__*/r(d,{color:"var(--privy-color-foreground-accent)"}):o});let s=/*#__PURE__*/a(i).withConfig({displayName:"StyledPrimaryButtonWithoutGray",componentId:"sc-e537b447-1"})(["position:relative;&&{background-color:var(--privy-color-accent);color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:var(--privy-color-accent-dark);}&:active{background-color:var(--privy-color-accent-dark);}&:disabled,&:hover:disabled,&:active:disabled{cursor:not-allowed;color:var(--privy-color-foreground-disabled);background-color:var(--privy-color-accent-dark);}"]),v=/*#__PURE__*/a(i).withConfig({displayName:"StyledPrimaryButton",componentId:"sc-e537b447-2"})(["position:relative;&&{background-color:",";color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:",";}&:active{background-color:",";}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;}&:disabled{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent-dark)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent-dark)"),(r=>r.disabled&&/*#__PURE__*/l(["&&&,&&&:hover,&&&:active{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])));const b=({children:a,loading:l,disabled:c,size:i="lg",loadingText:n="Loading...",as:t,onClick:s,...v})=>{let b="a"===t,p=!(!l&&!c);/*#__PURE__*/return r(u,{as:t,disabled:b?void 0:p,"aria-disabled":b?p:void 0,$size:i,onClick:r=>{b&&p?r.preventDefault():s?.(r)},...v,children:l?/*#__PURE__*/o(e,{children:[/*#__PURE__*/r(d,{}),n?/*#__PURE__*/r("span",{style:{marginLeft:"8px"},children:n}):null]}):a})},p=({children:a,loading:l,disabled:c,size:i="lg",loadingText:n="Loading...",as:t,onClick:s,...v})=>{let b="a"===t,p=!(!l&&!c);/*#__PURE__*/return r(y,{as:t,disabled:b?void 0:p,"aria-disabled":b?p:void 0,$size:i,onClick:r=>{b&&p?r.preventDefault():s?.(r)},...v,children:l?/*#__PURE__*/o(e,{children:[/*#__PURE__*/r(d,{}),n?/*#__PURE__*/r("span",{style:{marginLeft:"8px"},children:n}):null]}):a})};let u=/*#__PURE__*/a(i).withConfig({displayName:"StyledSecondaryButton",componentId:"sc-e537b447-3"})(["&&{border-width:1px;border-style:solid;border-color:",";background-color:var(--privy-color-background);color:",";transition:border-color 200ms ease,color 200ms ease,background-color 200ms ease;}&:hover{border-color:",";background-color:",";color:",";}&:active{border-color:",";background-color:",";color:",";}&:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(r=>r.$warn?"var(--privy-color-border-error)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-border-error)":"var(--privy-color-border-interactive-hover)"),(r=>r.$warn?"var(--privy-color-error-light)":"var(--privy-color-info-bg-hover)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.$warn?"var(--privy-color-border-error)":"var(--privy-color-border-interactive)"),(r=>r.$warn?"var(--privy-color-error-bg-hover)":"var(--privy-color-info-bg)"),(r=>r.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(r=>r.disabled&&/*#__PURE__*/l(["&&&,&&&:hover,&&&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"]))),y=/*#__PURE__*/a(i).withConfig({displayName:"StyledMutedButton",componentId:"sc-e537b447-4"})(["&&{border-width:1px;border-style:solid;border-color:var(--privy-color-border-default);background-color:transparent;color:var(--privy-color-text-muted);transition:border-color 200ms ease,color 200ms ease,background-color 200ms ease;}&:hover{border-color:var(--privy-color-border-default);background-color:var(--privy-color-info-bg-hover);color:var(--privy-color-foreground-2);}&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-info-bg);color:var(--privy-color-foreground-2);}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;}&:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(r=>r.disabled&&/*#__PURE__*/l(["&&&,&&&:hover,&&&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])));const g=({children:e,onClick:a,disabled:l,isSubmitting:c,...i})=>/*#__PURE__*/o(f,{$isSubmitting:c,onClick:a,disabled:l,...i,children:[/*#__PURE__*/r("span",{children:e}),
2
2
  /*#__PURE__*/r("span",{children:/*#__PURE__*/r(d,{})})]});let f=/*#__PURE__*/a.button.withConfig({displayName:"StyledEmbeddedButton",componentId:"sc-e537b447-7"})(["&&{color:var(--privy-color-accent);font-size:16px;font-style:normal;font-weight:500;line-height:24px;cursor:pointer;border-radius:0px var(--privy-border-radius-mdlg) var(--privy-border-radius-mdlg) 0px;border:none;transition:color 200ms ease;@media (min-width:441px){font-size:14px;}:hover{color:var(--privy-color-accent-dark);}&& > :first-child{opacity:",";}&& > :last-child{position:absolute;display:flex;top:50%;left:50%;transform:translate3d(-50%,-50%,0);opacity:",";}:disabled,:hover:disabled{color:var(--privy-color-foreground-disabled);cursor:not-allowed;}}"],(r=>r.$isSubmitting?0:1),(r=>r.$isSubmitting?1:0));export{c as B,g as E,n as P,b as S,t as a};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as a,useEffect as s}from"react";import{a as n,C as c}from"./index-CUao1WyN.mjs";import{a as m}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{S as u}from"./ScreenLayout-t3qtbQ3-.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"./context-BOoFAPna.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-CrJpeX0e.mjs";import"./Screen-CpIMiJNF.mjs";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const p=({status:o,title:a,description:s,userIntentRequired:n,retriesRemaining:c,hasSelectedCta:m,onContinue:p,onRetry:l})=>{let d=i((()=>{switch(o){case"loading":default:return;case"success":return n?{label:m?"Continuing...":"Continue",onClick:p,disabled:m,loading:m}:void 0;case"error":return c>0?{label:"Retry",onClick:l}:void 0}}),[o,m,p,l]),g=i((()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"}[o]||"loading")),[o]);/*#__PURE__*/return e(u,{icon:"loading"===o||"ready"===o?void 0:"success"===o?t:r,iconVariant:g,title:a,subtitle:s,primaryCta:d,watermark:!0})},l={component:()=>{let{lastScreen:t,data:r,navigate:i,setModalData:u}=m(),{status:l,token:d,waitForResult:g,reset:y,execute:h}=n(),v=o([]),j=e=>{v.current=[e,...v.current]},[C,f]=a(!0);s((()=>(j(setTimeout(f,1e3,!1)),()=>{v.current.forEach((e=>clearTimeout(e))),v.current=[]})),[]);let[b,k]=a(""),[w,R]=a("Checking that you are a human..."),[S,I]=a(!1),[T,x]=a(3),A=r?.captchaModalData,M=async e=>{try{await(A?.callback(e)),A?.onSuccessNavigateTo&&i(A?.onSuccessNavigateTo,!1)}catch(e){if(e instanceof c)return;u({errorModalData:{error:e,previousScreen:t||"LandingScreen"}}),i(A?.onErrorNavigateTo||"ErrorScreen",!1)}};s((()=>{"success"===l?j(setTimeout((async()=>{let e=await g();!e||A?.userIntentRequired||M(e)}),1e3)):"ready"===l&&j(setTimeout((()=>{"ready"===l&&h()}),500))}),[l]),s((()=>{if(!C)switch(l){case"success":k("Success!"),R("CAPTCHA passed successfully."),A?.userIntentRequired||setTimeout((()=>{I(!0),M(d)}),2e3);break;case"loading":k(""),R("Checking that you are a human...");break;case"error":k("Something went wrong"),R(T<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}}),[l,C,S]);/*#__PURE__*/return e(p,{status:l,title:b,description:w,userIntentRequired:A?.userIntentRequired,retriesRemaining:T,hasSelectedCta:S,onContinue:()=>{I(!0),M(d)},onRetry:async()=>{if(T<=0)return;x((e=>e-1)),y(),h();let e=await g();!e||A?.userIntentRequired||M(e)}})}};export{l as CaptchaScreen,p as CaptchaScreenView,l as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as a,useEffect as s}from"react";import{a as n,C as c}from"./index-B24hEnAn.mjs";import{a as m}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{S as u}from"./ScreenLayout-Dp0ezg8Q.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CBIiGG1k.mjs";import"zustand";import"./context-BqHnoxK5.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-lYYA8ZfI.mjs";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Aw21dxK9.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C5z76Qhs.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-3JMVXKiE.mjs";import"./Screen-Bj-1pwMI.mjs";import"./ModalHeader-B27O6soE.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";const p=({status:o,title:a,description:s,userIntentRequired:n,retriesRemaining:c,hasSelectedCta:m,onContinue:p,onRetry:l})=>{let d=i((()=>{switch(o){case"loading":default:return;case"success":return n?{label:m?"Continuing...":"Continue",onClick:p,disabled:m,loading:m}:void 0;case"error":return c>0?{label:"Retry",onClick:l}:void 0}}),[o,m,p,l]),g=i((()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"}[o]||"loading")),[o]);/*#__PURE__*/return e(u,{icon:"loading"===o||"ready"===o?void 0:"success"===o?t:r,iconVariant:g,title:a,subtitle:s,primaryCta:d,watermark:!0})},l={component:()=>{let{lastScreen:t,data:r,navigate:i,setModalData:u}=m(),{status:l,token:d,waitForResult:g,reset:y,execute:h}=n(),v=o([]),j=e=>{v.current=[e,...v.current]},[C,f]=a(!0);s((()=>(j(setTimeout(f,1e3,!1)),()=>{v.current.forEach((e=>clearTimeout(e))),v.current=[]})),[]);let[b,k]=a(""),[w,R]=a("Checking that you are a human..."),[S,I]=a(!1),[T,x]=a(3),A=r?.captchaModalData,M=async e=>{try{await(A?.callback(e)),A?.onSuccessNavigateTo&&i(A?.onSuccessNavigateTo,!1)}catch(e){if(e instanceof c)return;u({errorModalData:{error:e,previousScreen:t||"LandingScreen"}}),i(A?.onErrorNavigateTo||"ErrorScreen",!1)}};s((()=>{"success"===l?j(setTimeout((async()=>{let e=await g();!e||A?.userIntentRequired||M(e)}),1e3)):"ready"===l&&j(setTimeout((()=>{"ready"===l&&h()}),500))}),[l]),s((()=>{if(!C)switch(l){case"success":k("Success!"),R("CAPTCHA passed successfully."),A?.userIntentRequired||setTimeout((()=>{I(!0),M(d)}),2e3);break;case"loading":k(""),R("Checking that you are a human...");break;case"error":k("Something went wrong"),R(T<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}}),[l,C,S]);/*#__PURE__*/return e(p,{status:l,title:b,description:w,userIntentRequired:A?.userIntentRequired,retriesRemaining:T,hasSelectedCta:S,onContinue:()=>{I(!0),M(d)},onRetry:async()=>{if(T<=0)return;x((e=>e-1)),y(),h();let e=await g();!e||A?.userIntentRequired||M(e)}})}};export{l as CaptchaScreen,p as CaptchaScreenView,l as default};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as m}from"styled-components";import{P as l}from"./Button-CrJpeX0e.mjs";import{a as d}from"./Layouts-Bmf8DxNP.mjs";import{L as p,a7 as u}from"./useActiveWallet-BdFIc7_K.mjs";import{M as f,B as g}from"./ModalHeader-YP9pLMEP.mjs";import{u as h}from"./internal-context-e-Eni5bG.mjs";import{a as v}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{O as y}from"./analytics-mkkvFRju.mjs";import{G as b}from"./index-CUao1WyN.mjs";import"zustand";import"./context-BOoFAPna.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const w={component:()=>{let{data:o,setModalData:i,navigate:c,navigateBack:m}=v(),{closePrivyModal:l,createAnalyticsEvent:d,client:p}=h(),[u,b]=n("pending-in-flow"),w=a(0),C={...o?.funding,showAlternateFundingMethod:!0};C.usingDefaultFundingMethod&&(C.usingDefaultFundingMethod=!1);let{partnerUserId:I,popup:k}=o?.coinbaseOnrampStatus??{};return s((()=>{if("pending-in-flow"===u||"pending-after-flow"===u){let e=setInterval((async()=>{if(I)try{let{status:e}=await p.getCoinbaseOnRampStatus({partnerUserId:I});if("success"===e)return void b("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(w.current>=3)return i({funding:C,solanaFundingData:o?.solanaFundingData}),void c("FundingMethodSelectionScreen");k?.closed&&(w.current=w.current+1,b("pending-after-flow"))}catch(e){console.error(e),b("error"),d({eventName:y,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),i({funding:{...C,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:o?.solanaFundingData}),c("FundingMethodSelectionScreen")}}),1500);return()=>clearInterval(e)}}),[I,k,u]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(f,{title:"Fund account",backFn:()=>{i({funding:C,solanaFundingData:o?.solanaFundingData}),m()}},"header"),/*#__PURE__*/t(j,{status:u,onClickCta:l}),/*#__PURE__*/t(g,{})]})}};let j=({status:o,onClickCta:i})=>{let{title:n,body:a,cta:s}=c((()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(k,{children:[/*#__PURE__*/t(C,{isSucccess:"success"===o}),/*#__PURE__*/e(d,{children:[/*#__PURE__*/t("h3",{children:n}),/*#__PURE__*/t(I,{children:a})]})]}),s&&/*#__PURE__*/t(l,{onClick:i,children:s})]})},C=({isSucccess:r})=>{if(!r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(p,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(u,{color:r}),/*#__PURE__*/t(b,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=r?i:()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),a=r?"var(--privy-color-success)":"var(--privy-color-foreground-4)";/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},I=/*#__PURE__*/m.p.withConfig({displayName:"StatusBody",componentId:"sc-e4350fdc-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),k=/*#__PURE__*/m.div.withConfig({displayName:"ConnectContainer",componentId:"sc-e4350fdc-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);export{w as CoinbaseOnrampStatusScreen,w as default};
1
+ import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as m}from"styled-components";import{P as l}from"./Button-3JMVXKiE.mjs";import{a as d}from"./Layouts-Bmf8DxNP.mjs";import{L as p,a7 as u}from"./useActiveWallet-CBIiGG1k.mjs";import{M as f,B as g}from"./ModalHeader-B27O6soE.mjs";import{u as h}from"./internal-context-e-Eni5bG.mjs";import{a as v}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{O as y}from"./analytics-mkkvFRju.mjs";import{G as b}from"./index-B24hEnAn.mjs";import"zustand";import"./context-BqHnoxK5.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"react-device-detect";import"./prepareFundingModalData-lYYA8ZfI.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Aw21dxK9.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C5z76Qhs.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const w={component:()=>{let{data:o,setModalData:i,navigate:c,navigateBack:m}=v(),{closePrivyModal:l,createAnalyticsEvent:d,client:p}=h(),[u,b]=n("pending-in-flow"),w=a(0),C={...o?.funding,showAlternateFundingMethod:!0};C.usingDefaultFundingMethod&&(C.usingDefaultFundingMethod=!1);let{partnerUserId:I,popup:k}=o?.coinbaseOnrampStatus??{};return s((()=>{if("pending-in-flow"===u||"pending-after-flow"===u){let e=setInterval((async()=>{if(I)try{let{status:e}=await p.getCoinbaseOnRampStatus({partnerUserId:I});if("success"===e)return void b("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(w.current>=3)return i({funding:C,solanaFundingData:o?.solanaFundingData}),void c("FundingMethodSelectionScreen");k?.closed&&(w.current=w.current+1,b("pending-after-flow"))}catch(e){console.error(e),b("error"),d({eventName:y,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),i({funding:{...C,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:o?.solanaFundingData}),c("FundingMethodSelectionScreen")}}),1500);return()=>clearInterval(e)}}),[I,k,u]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(f,{title:"Fund account",backFn:()=>{i({funding:C,solanaFundingData:o?.solanaFundingData}),m()}},"header"),/*#__PURE__*/t(j,{status:u,onClickCta:l}),/*#__PURE__*/t(g,{})]})}};let j=({status:o,onClickCta:i})=>{let{title:n,body:a,cta:s}=c((()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(k,{children:[/*#__PURE__*/t(C,{isSucccess:"success"===o}),/*#__PURE__*/e(d,{children:[/*#__PURE__*/t("h3",{children:n}),/*#__PURE__*/t(I,{children:a})]})]}),s&&/*#__PURE__*/t(l,{onClick:i,children:s})]})},C=({isSucccess:r})=>{if(!r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(p,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(u,{color:r}),/*#__PURE__*/t(b,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=r?i:()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),a=r?"var(--privy-color-success)":"var(--privy-color-foreground-4)";/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},I=/*#__PURE__*/m.p.withConfig({displayName:"StatusBody",componentId:"sc-e4350fdc-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),k=/*#__PURE__*/m.div.withConfig({displayName:"ConnectContainer",componentId:"sc-e4350fdc-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);export{w as CoinbaseOnrampStatusScreen,w as default};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as a,jsx as r}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o,useEffect as n}from"react";import{styled as l}from"styled-components";import{u as s}from"./context-BOoFAPna.mjs";import{u as c,c as m,b as d}from"./internal-context-e-Eni5bG.mjs";import{a as p}from"./index-CUao1WyN.mjs";import{u,a as h}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{F as g,a1 as f,V as y}from"./useActiveWallet-BdFIc7_K.mjs";import{E as S,P as E}from"./Button-CrJpeX0e.mjs";import{C as b}from"./Chip-Bsgj4Yc-.mjs";import{I as v,a as k}from"./EmailInputForm-B4hjCxRU.mjs";import{E as C}from"./ErrorMessage-Cx8GKGhL.mjs";const j=/*#__PURE__*/t(((t,l)=>{let[y,v]=o(t.defaultValue||""),[k,j]=o(""),[A,I]=o(!1),{authenticated:L}=u(),{initLoginWithEmail:T}=c(),{navigate:M,setModalData:D,currentScreen:N,data:U}=h(),{enabled:W,token:F}=p(),[R,V]=o(!1),{accountType:$}=g(),_=s();n((()=>{!y&&_.disablePlusEmails&&U?.inlineError?.error instanceof m&&U?.inlineError?.error.privyErrorCode===d.DISALLOWED_PLUS_EMAIL&&!k&&j("Please enter a valid email address without a '+'."),k&&j("")}),[y]);let q=f(y),z=A||!q,B=()=>{var e;D({login:U?.login,inlineError:void 0}),!W||F||L?(e=F,I(!0),T({email:y,captchaToken:e,disableSignup:U?.login?.disableSignup,withPrivyUi:!0}).then((()=>{M("AwaitingPasswordlessCodeScreen")})).catch((e=>{D({errorModalData:{error:e,previousScreen:N||"LandingScreen"}}),M("ErrorScreen")})).finally((()=>{I(!1)}))):(D({captchaModalData:{callback:e=>T({email:y,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),M("CaptchaScreen"))};/*#__PURE__*/return e(a,{children:[/*#__PURE__*/e(w,{children:[k&&/*#__PURE__*/r(C,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:k}),/*#__PURE__*/e(x,{stacked:t.stacked,$error:!!k,children:[/*#__PURE__*/r(P,{children:/*#__PURE__*/r(i,{})}),/*#__PURE__*/r("input",{ref:l,id:"email-input",className:"login-method-button",type:"email",placeholder:"your@email.com",onFocus:()=>V(!0),onChange:e=>v(e.target.value),onKeyUp:e=>{"Enter"===e.key&&B()},value:y,autoComplete:"email"}),"email"!==$||R?t.stacked?/*#__PURE__*/r("span",{}):/*#__PURE__*/r(S,{isSubmitting:A,onClick:B,disabled:z,children:"Submit"}):/*#__PURE__*/r(b,{color:"gray",children:"Recent"})]})]}),t.stacked?/*#__PURE__*/r(E,{loadingText:null,loading:A,disabled:z,onClick:B,style:{width:"100%"},children:"Submit"}):null]})}));let w=v,x=k,P=/*#__PURE__*/l(y).withConfig({displayName:"StyledLoginMethodIconWrapper",componentId:"sc-30d3bab7-0"})(["display:inline-flex;"]);export{j as C};
1
+ import{jsxs as e,Fragment as a,jsx as r}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o,useEffect as n}from"react";import{styled as l}from"styled-components";import{u as s}from"./context-BqHnoxK5.mjs";import{u as c,c as m,b as d}from"./internal-context-e-Eni5bG.mjs";import{a as p}from"./index-B24hEnAn.mjs";import{u,a as h}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{F as g,a1 as f,V as y}from"./useActiveWallet-CBIiGG1k.mjs";import{E as S,P as E}from"./Button-3JMVXKiE.mjs";import{C as b}from"./Chip-Bsgj4Yc-.mjs";import{I as v,a as k}from"./EmailInputForm-B4hjCxRU.mjs";import{E as C}from"./ErrorMessage-Cx8GKGhL.mjs";const j=/*#__PURE__*/t(((t,l)=>{let[y,v]=o(t.defaultValue||""),[k,j]=o(""),[A,I]=o(!1),{authenticated:L}=u(),{initLoginWithEmail:T}=c(),{navigate:M,setModalData:D,currentScreen:N,data:U}=h(),{enabled:W,token:F}=p(),[R,V]=o(!1),{accountType:$}=g(),_=s();n((()=>{!y&&_.disablePlusEmails&&U?.inlineError?.error instanceof m&&U?.inlineError?.error.privyErrorCode===d.DISALLOWED_PLUS_EMAIL&&!k&&j("Please enter a valid email address without a '+'."),k&&j("")}),[y]);let q=f(y),z=A||!q,B=()=>{var e;D({login:U?.login,inlineError:void 0}),!W||F||L?(e=F,I(!0),T({email:y,captchaToken:e,disableSignup:U?.login?.disableSignup,withPrivyUi:!0}).then((()=>{M("AwaitingPasswordlessCodeScreen")})).catch((e=>{D({errorModalData:{error:e,previousScreen:N||"LandingScreen"}}),M("ErrorScreen")})).finally((()=>{I(!1)}))):(D({captchaModalData:{callback:e=>T({email:y,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),M("CaptchaScreen"))};/*#__PURE__*/return e(a,{children:[/*#__PURE__*/e(w,{children:[k&&/*#__PURE__*/r(C,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:k}),/*#__PURE__*/e(x,{stacked:t.stacked,$error:!!k,children:[/*#__PURE__*/r(P,{children:/*#__PURE__*/r(i,{})}),/*#__PURE__*/r("input",{ref:l,id:"email-input",className:"login-method-button",type:"email",placeholder:"your@email.com",onFocus:()=>V(!0),onChange:e=>v(e.target.value),onKeyUp:e=>{"Enter"===e.key&&B()},value:y,autoComplete:"email"}),"email"!==$||R?t.stacked?/*#__PURE__*/r("span",{}):/*#__PURE__*/r(S,{isSubmitting:A,onClick:B,disabled:z,children:"Submit"}):/*#__PURE__*/r(b,{color:"gray",children:"Recent"})]})]}),t.stacked?/*#__PURE__*/r(E,{loadingText:null,loading:A,disabled:z,onClick:B,style:{width:"100%"},children:"Submit"}):null]})}));let w=v,x=k,P=/*#__PURE__*/l(y).withConfig({displayName:"StyledLoginMethodIconWrapper",componentId:"sc-30d3bab7-0"})(["display:inline-flex;"]);export{j as C};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{S as n}from"./ScreenLayout-t3qtbQ3-.mjs";import{F as m}from"./index-CUao1WyN.mjs";import"viem";import"react";import"./context-BOoFAPna.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./Button-CrJpeX0e.mjs";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"./Screen-CpIMiJNF.mjs";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const p=e=>/*#__PURE__*/t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:/*#__PURE__*/t("g",{children:/*#__PURE__*/t("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),s=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:s="Phantom supports Ledger",subtitle:a="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:s,subtitle:/*#__PURE__*/t(d,{children:a}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(m,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(p,{style:{width:"48px",height:"48px"}})]})});function a(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(s,{onContinueWithLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!0}}),o("ConnectionStatusScreen")},onContinueWithoutLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!1}}),o("ConnectionStatusScreen")}})}const c={component:a};let l=/*#__PURE__*/o.div.withConfig({displayName:"IconContainer",componentId:"sc-54536274-0"})(["display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:var(--screen-space);"]),d=/*#__PURE__*/o.span.withConfig({displayName:"SubtitleText",componentId:"sc-54536274-1"})(["white-space:pre-wrap;"]);export{c as ConnectLedgerScreen,a as ConnectLedgerScreenComponent,s as ConnectLedgerScreenView,c as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{S as n}from"./ScreenLayout-Dp0ezg8Q.mjs";import{F as m}from"./index-B24hEnAn.mjs";import"viem";import"react";import"./context-BqHnoxK5.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./Button-3JMVXKiE.mjs";import"./useActiveWallet-CBIiGG1k.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-lYYA8ZfI.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Aw21dxK9.mjs";import"./Screen-Bj-1pwMI.mjs";import"./ModalHeader-B27O6soE.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C5z76Qhs.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const p=e=>/*#__PURE__*/t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:/*#__PURE__*/t("g",{children:/*#__PURE__*/t("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),s=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:s="Phantom supports Ledger",subtitle:a="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:s,subtitle:/*#__PURE__*/t(d,{children:a}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(m,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(p,{style:{width:"48px",height:"48px"}})]})});function a(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(s,{onContinueWithLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!0}}),o("ConnectionStatusScreen")},onContinueWithoutLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!1}}),o("ConnectionStatusScreen")}})}const c={component:a};let l=/*#__PURE__*/o.div.withConfig({displayName:"IconContainer",componentId:"sc-54536274-0"})(["display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:var(--screen-space);"]),d=/*#__PURE__*/o.span.withConfig({displayName:"SubtitleText",componentId:"sc-54536274-1"})(["white-space:pre-wrap;"]);export{c as ConnectLedgerScreen,a as ConnectLedgerScreenComponent,s as ConnectLedgerScreenView,c as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-BOoFAPna.mjs";import{u as r,c as n,b as a}from"./internal-context-e-Eni5bG.mjs";import{a as i}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{i as c}from"./ConnectWalletView-Ch6TwKX_.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./Button-CrJpeX0e.mjs";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"./prepareFundingModalData-CzDMa8gy.mjs";import"eventemitter3";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DwjLfHwW.mjs";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./QrCode-C0_lXRph.mjs";import"qrcode";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./useI18n-fcpgyVzo.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-CpIMiJNF.mjs";import"./index-CJMgUOnw.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:s,navigate:p}=l(),d=o(),u=i(),C=s?.externalConnectWallet?.description,j=t(s?.externalConnectWallet?.walletList??d.appearance.walletList),E=t(s?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:j.current,walletChainType:E.current,preSelectedWalletId:s?.externalConnectWallet?.preSelectedWalletId,hideHeader:s?.externalConnectWallet?.hideHeader,onBack:s?.funding?()=>p("FundingMethodSelectionScreen"):void 0,onClose:()=>{u("connectWallet","onError",a.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{u("connectWallet","onSuccess",{wallet:t});let o=s?.externalConnectWallet?.onCompleteNavigateTo;o?p(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),u("connectWallet","onError",e.privyErrorCode||a.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),u("connectWallet","onError",a.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:C,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-BqHnoxK5.mjs";import{u as r,c as n,b as a}from"./internal-context-e-Eni5bG.mjs";import{a as i}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{i as c}from"./ConnectWalletView-D3ZQBnjF.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./Button-3JMVXKiE.mjs";import"./useActiveWallet-CBIiGG1k.mjs";import"zustand";import"./prepareFundingModalData-lYYA8ZfI.mjs";import"eventemitter3";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Aw21dxK9.mjs";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DwjLfHwW.mjs";import"./ModalHeader-B27O6soE.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./QrCode-CGBH7ZqU.mjs";import"qrcode";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./useI18n-BotQj3s2.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-Bj-1pwMI.mjs";import"./index-CJMgUOnw.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:s,navigate:p}=l(),d=o(),u=i(),C=s?.externalConnectWallet?.description,j=t(s?.externalConnectWallet?.walletList??d.appearance.walletList),E=t(s?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:j.current,walletChainType:E.current,preSelectedWalletId:s?.externalConnectWallet?.preSelectedWalletId,hideHeader:s?.externalConnectWallet?.hideHeader,onBack:s?.funding?()=>p("FundingMethodSelectionScreen"):void 0,onClose:()=>{u("connectWallet","onError",a.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{u("connectWallet","onSuccess",{wallet:t});let o=s?.externalConnectWallet?.onCompleteNavigateTo;o?p(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),u("connectWallet","onError",e.privyErrorCode||a.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),u("connectWallet","onError",a.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:C,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as n}from"./prepareFundingModalData-CzDMa8gy.mjs";import{q as i}from"./context-BOoFAPna.mjs";import{Q as a}from"./useActiveWallet-BdFIc7_K.mjs";import{u as s}from"./internal-context-e-Eni5bG.mjs";import{a as l}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{S as c}from"./ScreenLayout-t3qtbQ3-.mjs";import{B as m}from"./index-CUao1WyN.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-BFOC7TO_.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"tinycolor2";import"zustand";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";import"ofetch";import"./Button-CrJpeX0e.mjs";import"./Screen-CpIMiJNF.mjs";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Link-DwjLfHwW.mjs";import"./useI18n-fcpgyVzo.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-BkG4QVN4.mjs";const u=({walletLogo:t,success:o,errorMessage:r,title:i,subtitle:a,onRetry:s,onUseDifferentWallet:l,onBack:m,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(c,{title:i,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!r},primaryCta:r===n.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:l}:!o&&r?.retryable&&p<u?{label:"Retry",onClick:s,disabled:!r?.retryable||p>=u}:!o&&r&&p>=u?{label:"Use a different wallet",onClick:l}:void 0,onBack:m,watermark:!0}),d={component:()=>{let n,{navigateBack:c,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:g}=l(),{walletConnectionStatus:j,closePrivyModal:v}=s(),[h,C]=t(void 0),[k,b]=t(0),x=a(j?.connector?.walletClientType||"unknown"),S="connected"===j?.status,R="switching_to_supported_chain"===j?.status;o((()=>{if(S){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=j.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&j.connector){let e=j.connector.wallets.find((e=>e.address===o));g({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:j.connector?.walletClientType,walletChainType:j.connector?.chainType}))}),i)}else e=setTimeout(v,i);return()=>clearTimeout(e)}}),[S]);o((()=>{var e;j?.connectError&&(e=j?.connectError,C(p(e)))}),[j]);let T=j?.connector?.connectorType||"injected",B=j?.connector?.walletClientType||"unknown",W=x?.metadata?.shortName||x?.name||j?.connector?.walletBranding.name||"Browser Extension",M=x?.image_url?.md||j?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(m,{...t})),E="Browser Extension"===W?W.toLowerCase():W;n=S?`Successfully connected with ${E}`:h?h.message:R?"Switching networks":`Waiting for ${E}`;let _="Don’t see your wallet? Check your other browser windows.";return S?_="You’re good to go!":k>=2&&h?_="Unable to connect wallet":h?_=h.detail:R?_="Switch your wallet to the requested network.":"metamask"===B&&r?_="Click to continue to open and connect MetaMask.":"metamask"===B?_="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===T?_="Open your mobile wallet app to continue":"coinbase_wallet"===T&&(_="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:W,walletLogo:M,success:S,errorMessage:h,title:n,subtitle:_,onRetry:()=>{b(k+1),C(void 0),j?.connectRetry()},onUseDifferentWallet:c,onBack:f===w?void 0:c,numRetries:k,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as n}from"./prepareFundingModalData-lYYA8ZfI.mjs";import{q as i}from"./context-BqHnoxK5.mjs";import{Q as a}from"./useActiveWallet-CBIiGG1k.mjs";import{u as s}from"./internal-context-e-Eni5bG.mjs";import{a as l}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{S as c}from"./ScreenLayout-Dp0ezg8Q.mjs";import{B as m}from"./index-B24hEnAn.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-BHg6K1gF.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"tinycolor2";import"zustand";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Aw21dxK9.mjs";import"ofetch";import"./Button-3JMVXKiE.mjs";import"./Screen-Bj-1pwMI.mjs";import"./ModalHeader-B27O6soE.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-CJMgUOnw.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C5z76Qhs.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Link-DwjLfHwW.mjs";import"./useI18n-BotQj3s2.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-F4FtZ8gq.mjs";const u=({walletLogo:t,success:o,errorMessage:r,title:i,subtitle:a,onRetry:s,onUseDifferentWallet:l,onBack:m,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(c,{title:i,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!r},primaryCta:r===n.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:l}:!o&&r?.retryable&&p<u?{label:"Retry",onClick:s,disabled:!r?.retryable||p>=u}:!o&&r&&p>=u?{label:"Use a different wallet",onClick:l}:void 0,onBack:m,watermark:!0}),d={component:()=>{let n,{navigateBack:c,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:g}=l(),{walletConnectionStatus:j,closePrivyModal:v}=s(),[h,C]=t(void 0),[k,b]=t(0),x=a(j?.connector?.walletClientType||"unknown"),S="connected"===j?.status,R="switching_to_supported_chain"===j?.status;o((()=>{if(S){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=j.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&j.connector){let e=j.connector.wallets.find((e=>e.address===o));g({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:j.connector?.walletClientType,walletChainType:j.connector?.chainType}))}),i)}else e=setTimeout(v,i);return()=>clearTimeout(e)}}),[S]);o((()=>{var e;j?.connectError&&(e=j?.connectError,C(p(e)))}),[j]);let T=j?.connector?.connectorType||"injected",B=j?.connector?.walletClientType||"unknown",W=x?.metadata?.shortName||x?.name||j?.connector?.walletBranding.name||"Browser Extension",M=x?.image_url?.md||j?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(m,{...t})),E="Browser Extension"===W?W.toLowerCase():W;n=S?`Successfully connected with ${E}`:h?h.message:R?"Switching networks":`Waiting for ${E}`;let _="Don’t see your wallet? Check your other browser windows.";return S?_="You’re good to go!":k>=2&&h?_="Unable to connect wallet":h?_=h.detail:R?_="Switch your wallet to the requested network.":"metamask"===B&&r?_="Click to continue to open and connect MetaMask.":"metamask"===B?_="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===T?_="Open your mobile wallet app to continue":"coinbase_wallet"===T&&(_="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:W,walletLogo:M,success:S,errorMessage:h,title:n,subtitle:_,onRetry:()=>{b(k+1),C(void 0),j?.connectRetry()},onUseDifferentWallet:c,onBack:f===w?void 0:c,numRetries:k,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-BOoFAPna.mjs";import{C as r,L as i}from"./CustomLandingScreenView-CKarTBuo.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-YP9pLMEP.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./get-is-unified-wallet-Ca5aEojK.mjs";import"./useWallets-3r4yfFNg.mjs";import"./index-CUao1WyN.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ConnectWalletView-Ch6TwKX_.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"./Button-CrJpeX0e.mjs";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DwjLfHwW.mjs";import"./QrCode-C0_lXRph.mjs";import"qrcode";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./useI18n-fcpgyVzo.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-CpIMiJNF.mjs";import"./index-CJMgUOnw.mjs";import"lucide-react";import"./ConnectEmailForm-CzIQouaK.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-BeT3tDQM.mjs";import"./twitter-6jomarO4.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-gDOg31Q5.mjs";import"./ScreenLayout-t3qtbQ3-.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-BqHnoxK5.mjs";import{C as r,L as i}from"./CustomLandingScreenView-DOwh2oce.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-B27O6soE.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./useActiveWallet-CBIiGG1k.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-lYYA8ZfI.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./get-is-unified-wallet-GLvRyJlT.mjs";import"./useWallets-Aw21dxK9.mjs";import"./index-B24hEnAn.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C5z76Qhs.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ConnectWalletView-D3ZQBnjF.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"./Button-3JMVXKiE.mjs";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DwjLfHwW.mjs";import"./QrCode-CGBH7ZqU.mjs";import"qrcode";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./useI18n-BotQj3s2.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-Bj-1pwMI.mjs";import"./index-CJMgUOnw.mjs";import"lucide-react";import"./ConnectEmailForm-o04NTrIc.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-CK2ZaLcy.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-yerFFdMA.mjs";import"./ScreenLayout-Dp0ezg8Q.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
@@ -1 +1 @@
1
- import{jsx as o,jsxs as e,Fragment as n}from"react/jsx-runtime";import{forwardRef as r,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-BOoFAPna.mjs";import{F as m}from"./useActiveWallet-BdFIc7_K.mjs";import{E as v,P as x}from"./Button-CrJpeX0e.mjs";import{C as b}from"./Chip-Bsgj4Yc-.mjs";const f=({value:n,onChange:r})=>/*#__PURE__*/o("select",{value:n,onChange:r,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/r(((r,a)=>{let d=g(),[w,k]=t(!1),{accountType:N}=m(),[P,S]=t(""),[$,j]=t(d?.intl.defaultCountry??"US"),I=l(P,$),V=c($),z=p($),L=u($),q=!I,[B,E]=t(!1),D=L.length,F=o=>{let e=o.target.value;j(e),S(""),r.onChange&&r.onChange({rawPhoneNumber:P,qualifiedPhoneNumber:s(P,e),countryCode:e,isValid:l(P,$)})},R=(o,e)=>{try{let n=o.replace(/\D/g,"")===P.replace(/\D/g,"")?o:V.input(o);S(n),r.onChange&&r.onChange({rawPhoneNumber:n,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},T=()=>{E(!0);let o=s(P,$);r.onSubmit({rawPhoneNumber:P,qualifiedPhoneNumber:o,countryCode:$,isValid:l(P,$)}).finally((()=>E(!1)))};return i((()=>{if(r.defaultValue){let o=h(r.defaultValue);V.reset(),F({target:{value:o.countryCode}}),R(o.phone,o.countryCode)}}),[r.defaultValue]),/*#__PURE__*/e(n,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:D,$stacked:r.stacked,children:[/*#__PURE__*/o(f,{value:$,onChange:F}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:z,onFocus:()=>k(!0),onChange:o=>{R(o.target.value,$)},onKeyUp:o=>{"Enter"===o.key&&T()},value:P,autoComplete:"tel"}),"phone"!==N||w||r.hideRecent?r.stacked||r.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(v,{isSubmitting:B,onClick:T,disabled:q,children:"Submit"}):/*#__PURE__*/o(b,{color:"gray",children:"Recent"})]})}),r.stacked&&!r.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:B,loadingText:null,onClick:T,disabled:q,children:"Submit"}):null]})}));let y=/*#__PURE__*/a.div.withConfig({displayName:"InputContainer",componentId:"sc-545daacd-0"})(["width:100%;"]),C=/*#__PURE__*/a.label.withConfig({displayName:"PhoneNumberInput",componentId:"sc-545daacd-1"})(["--country-code-dropdown-width:calc(54px + calc(12 * ","px));--phone-input-extra-padding-left:calc(12px + calc(3 * ","px));display:block;position:relative;width:100%;@media (min-width:441px){--country-code-dropdown-width:calc(52px + calc(10 * ","px));}&& > select{font-size:16px;height:24px;position:absolute;margin:13px calc(var(--country-code-dropdown-width) / 4);line-height:24px;width:var(--country-code-dropdown-width);background-color:var(--privy-color-background);background-size:auto;background-position-x:right;cursor:pointer;@media (min-width:441px){font-size:14px;width:var(--country-code-dropdown-width);}:focus{outline:none;box-shadow:none;}}&& > input{font-size:16px;line-height:24px;color:var(--privy-color-foreground);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:calc(100% - var(--country-code-dropdown-width));padding:12px 88px 12px calc(var(--country-code-dropdown-width) + var(--phone-input-extra-padding-left));padding-right:",";flex-grow:1;background:var(--privy-color-background);border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-md);width:100%;:focus{outline:none;border-color:var(--privy-color-accent);}:autofill,:-webkit-autofill{background:var(--privy-color-background);}@media (min-width:441px){font-size:14px;padding-right:78px;}}&& > :last-child{right:16px;position:absolute;top:50%;transform:translate(0,-50%);}&& > button:last-child{right:0px;line-height:24px;padding:13px 17px;:focus{outline:none;border-color:var(--privy-color-accent);}}&& > input::placeholder{color:var(--privy-color-foreground-3);}"],(o=>o.$callingCodeLength),(o=>o.$callingCodeLength),(o=>o.$callingCodeLength),(o=>o.$stacked?"16px":"88px"));export{w as C};
1
+ import{jsx as o,jsxs as e,Fragment as n}from"react/jsx-runtime";import{forwardRef as r,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-BqHnoxK5.mjs";import{F as m}from"./useActiveWallet-CBIiGG1k.mjs";import{E as v,P as x}from"./Button-3JMVXKiE.mjs";import{C as b}from"./Chip-Bsgj4Yc-.mjs";const f=({value:n,onChange:r})=>/*#__PURE__*/o("select",{value:n,onChange:r,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/r(((r,a)=>{let d=g(),[w,k]=t(!1),{accountType:N}=m(),[P,S]=t(""),[$,j]=t(d?.intl.defaultCountry??"US"),I=l(P,$),V=c($),z=p($),L=u($),q=!I,[B,E]=t(!1),D=L.length,F=o=>{let e=o.target.value;j(e),S(""),r.onChange&&r.onChange({rawPhoneNumber:P,qualifiedPhoneNumber:s(P,e),countryCode:e,isValid:l(P,$)})},R=(o,e)=>{try{let n=o.replace(/\D/g,"")===P.replace(/\D/g,"")?o:V.input(o);S(n),r.onChange&&r.onChange({rawPhoneNumber:n,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},T=()=>{E(!0);let o=s(P,$);r.onSubmit({rawPhoneNumber:P,qualifiedPhoneNumber:o,countryCode:$,isValid:l(P,$)}).finally((()=>E(!1)))};return i((()=>{if(r.defaultValue){let o=h(r.defaultValue);V.reset(),F({target:{value:o.countryCode}}),R(o.phone,o.countryCode)}}),[r.defaultValue]),/*#__PURE__*/e(n,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:D,$stacked:r.stacked,children:[/*#__PURE__*/o(f,{value:$,onChange:F}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:z,onFocus:()=>k(!0),onChange:o=>{R(o.target.value,$)},onKeyUp:o=>{"Enter"===o.key&&T()},value:P,autoComplete:"tel"}),"phone"!==N||w||r.hideRecent?r.stacked||r.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(v,{isSubmitting:B,onClick:T,disabled:q,children:"Submit"}):/*#__PURE__*/o(b,{color:"gray",children:"Recent"})]})}),r.stacked&&!r.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:B,loadingText:null,onClick:T,disabled:q,children:"Submit"}):null]})}));let y=/*#__PURE__*/a.div.withConfig({displayName:"InputContainer",componentId:"sc-545daacd-0"})(["width:100%;"]),C=/*#__PURE__*/a.label.withConfig({displayName:"PhoneNumberInput",componentId:"sc-545daacd-1"})(["--country-code-dropdown-width:calc(54px + calc(12 * ","px));--phone-input-extra-padding-left:calc(12px + calc(3 * ","px));display:block;position:relative;width:100%;@media (min-width:441px){--country-code-dropdown-width:calc(52px + calc(10 * ","px));}&& > select{font-size:16px;height:24px;position:absolute;margin:13px calc(var(--country-code-dropdown-width) / 4);line-height:24px;width:var(--country-code-dropdown-width);background-color:var(--privy-color-background);background-size:auto;background-position-x:right;cursor:pointer;@media (min-width:441px){font-size:14px;width:var(--country-code-dropdown-width);}:focus{outline:none;box-shadow:none;}}&& > input{font-size:16px;line-height:24px;color:var(--privy-color-foreground);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:calc(100% - var(--country-code-dropdown-width));padding:12px 88px 12px calc(var(--country-code-dropdown-width) + var(--phone-input-extra-padding-left));padding-right:",";flex-grow:1;background:var(--privy-color-background);border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-md);width:100%;:focus{outline:none;border-color:var(--privy-color-accent);}:autofill,:-webkit-autofill{background:var(--privy-color-background);}@media (min-width:441px){font-size:14px;padding-right:78px;}}&& > :last-child{right:16px;position:absolute;top:50%;transform:translate(0,-50%);}&& > button:last-child{right:0px;line-height:24px;padding:13px 17px;:focus{outline:none;border-color:var(--privy-color-accent);}}&& > input::placeholder{color:var(--privy-color-foreground-3);}"],(o=>o.$callingCodeLength),(o=>o.$callingCodeLength),(o=>o.$callingCodeLength),(o=>o.$stacked?"16px":"88px"));export{w as C};
@@ -0,0 +1 @@
1
+ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as i}from"@heroicons/react/24/outline";import{useVirtualizer as l}from"@tanstack/react-virtual";import{useState as a,useMemo as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{B as m}from"./Button-3JMVXKiE.mjs";import p from"@heroicons/react/24/outline/CheckIcon";import{C as u}from"./copy-Bx2Jwc5_.mjs";import{L as g}from"./Link-DwjLfHwW.mjs";import{T as w}from"./ModalHeader-B27O6soE.mjs";import{Q as f}from"./QrCode-CGBH7ZqU.mjs";import{E as y}from"./EmailInputForm-B4hjCxRU.mjs";import{u as v,q as b}from"./context-BqHnoxK5.mjs";import{u as C}from"./useI18n-BotQj3s2.mjs";import{M as x,q as _,d as W,e as k,K as L,V as T,w as z,S}from"./useActiveWallet-CBIiGG1k.mjs";import{u as A,P as I,b as N}from"./internal-context-e-Eni5bG.mjs";import{W as B}from"./WalletCards-DH1rqayz.mjs";import{W as E,h as j}from"./prepareFundingModalData-lYYA8ZfI.mjs";import{S as K}from"./Screen-Bj-1pwMI.mjs";let q=/*#__PURE__*/h.button.withConfig({displayName:"CopyTextButton",componentId:"sc-4b0620dc-0"})(["display:flex;align-items:center;gap:0.5rem;&:hover{text-decoration:underline;}svg{width:0.875rem;height:0.875rem;}"]),O=/*#__PURE__*/h.span.withConfig({displayName:"CopiedText",componentId:"sc-4b0620dc-1"})(["display:flex;align-items:center;gap:0.25rem;font-size:0.875rem;color:var(--privy-color-foreground-2);"]),U=/*#__PURE__*/h(p).withConfig({displayName:"GreenCheck",componentId:"sc-4b0620dc-2"})(["color:var(--privy-color-success);"]),F=/*#__PURE__*/h(u).withConfig({displayName:"StyledCopy",componentId:"sc-4b0620dc-3"})(["color:var(--privy-color-foreground-3);opactiy:0.5;"]);function M({children:t,iconOnly:i,value:l,hideCopyIcon:o,...r}){let[c,s]=a(!1);/*#__PURE__*/return e(q,{...r,onClick:()=>{navigator.clipboard.writeText(l||t).catch(console.error),s(!0),setTimeout((()=>s(!1)),1500)},children:[t," ",c?/*#__PURE__*/e(O,{children:[/*#__PURE__*/n(U,{})," ",!i&&"Copied"]}):!o&&/*#__PURE__*/n(F,{})]})}const $={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:x,md:x}}};class D{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some((e=>e.includes("eip155:")))}isSol(e){return e.chains.some((e=>e.includes("solana:")))}inAllowList(e,n){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===n&&this.includeWalletConnect)return!0;let t=D.normalize(e);return this.normalizedAllowList.some((e=>t===D.normalize(e)))}inDenyList(e,n){return"listing"===n&&"rabby"===e}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}getAllowListKey(e,n,t,i){let l=D.normalize(e);for(let e of this.normalizedAllowList||[])if(l===D.normalize(e))return e;if("connector"===n){if(("injected"===t||"solana_adapter"===t)&&"ethereum"===i&&this.detectedEth)return"detected_ethereum_wallets";if(("injected"===t||"solana_adapter"===t)&&"solana"===i&&this.detectedSol)return"detected_solana_wallets"}if("listing"===n&&this.includeWalletConnect)return"wallet_connect"}connectorOk(e){return!!("null"!==e.connectorType&&"walletconnect_solana"!==e.walletBranding.id&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!(!this.inAllowList(e.slug,"listing")||this.inDenyList(e.slug,"listing"))}getWallets(e,n){let t=new Map,i=e=>{let n=t.get(e.id);if(n){n.chainType!==e.chainType&&(n.chainType="multi");let t=new Set(n.chains);e.chains.forEach((e=>t.add(e))),n.chains=Array.from(t),!n.icon&&e.icon&&(n.icon=e.icon),!n.url&&e.url&&(n.url=e.url),!n.listing&&e.listing&&(n.listing=e.listing),!n.allowListKey&&e.allowListKey&&(n.allowListKey=e.allowListKey)}else t.set(e.id,e)};e.filter((e=>this.connectorOk(e))).forEach((e=>{let n=D.normalize(e.walletClientType);i({id:n,label:e.walletBranding?.name??n,source:"connector",connector:e,chainType:e.chainType,icon:e.walletBranding?.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"],allowListKey:this.getAllowListKey(e.walletClientType,"connector",e.connectorType,e.chainType)})}));let l=e.find((e=>"wallet_connect_v2"===e.connectorType)),a=e.find((e=>"walletconnect_solana"===e.walletBranding.id));n.filter((e=>this.listingOk(e))).forEach((n=>{let t=[...n.chains].filter((e=>e.includes("eip155:")||e.includes("solana:")));if(e.some((e=>D.normalize(e.walletClientType)===D.normalize(n.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType))||l||n.mobile.native||n.mobile.universal||_[n.slug]?.chainTypes.includes("ethereum")||(t=t.filter((e=>!e.includes("eip155:")))),e.some((e=>D.normalize(e.walletClientType)===D.normalize(n.slug)&&"solana"===e.chainType&&"null"!==e.connectorType))||a||n.mobile.native||n.mobile.universal||_[n.slug]?.chainTypes.includes("solana")||(t=t.filter((e=>!e.includes("solana:")))),!t.length)return;let o=D.normalize(n.slug),r=$[n.slug],c=r?.image_url?.sm||n.image_url?.sm;t.some((e=>e.includes("eip155:")))&&i({id:o,label:n.name||o,source:"listing",listing:n,chainType:"ethereum",icon:c,url:n.homepage,chains:t,allowListKey:this.getAllowListKey(n.slug,"listing")}),t.some((e=>e.includes("solana:")))&&i({id:o,label:n.name||o,source:"listing",listing:n,chainType:"solana",icon:c,url:n.homepage,chains:t,allowListKey:this.getAllowListKey(n.slug,"listing")})})),this.includeWalletConnectQr&&l&&i({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:l,chainType:"ethereum",icon:E,url:void 0,chains:["eip155"],allowListKey:"wallet_connect_qr"}),this.includeWalletConnectQrSolana&&a&&i({id:"wallet_connect_qr_solana",label:"WalletConnect",source:"connector",connector:a,chainType:"solana",icon:E,url:void 0,chains:["solana"],allowListKey:"wallet_connect_qr_solana"});let o=Array.from(t.values());o.forEach((e=>{let n=$[e.listing?.slug||e.id];n?.image_url?.sm&&(e.icon=n.image_url.sm)}));let r=new Map;return this.normalizedAllowList?.forEach(((e,n)=>{r.set(D.normalize(e),n)})),{wallets:o.slice().sort(((e,n)=>{if(e.allowListKey&&n.allowListKey){let t=this.normalizedAllowList?.findIndex((n=>D.normalize(n)===D.normalize(e.allowListKey)))??-1,i=this.normalizedAllowList?.findIndex((e=>D.normalize(e)===D.normalize(n.allowListKey)))??-1;if(t!==i&&t>=0&&i>=0)return t-i}if(e.allowListKey&&!n.allowListKey)return-1;if(!e.allowListKey&&n.allowListKey)return 1;let t=D.normalize(e.id),i=D.normalize(n.id);"binance-defi"===t?t="binance":"universalprofiles"===t?t="universal_profile":"cryptocom-defi"===t?t="cryptocom":"bitkeep"===t&&(t="bitget_wallet"),"binance-defi"===i?i="binance":"universalprofiles"===i?i="universal_profile":"cryptocom-defi"===i?i="cryptocom":"bitkeep"===i&&(i="bitget_wallet");let l=r.has(t),a=r.has(i);return l&&a?r.get(t)-r.get(i):l?-1:a?1:"connector"===e.source&&"listing"===n.source?-1:"listing"===e.source&&"connector"===n.source?1:e.label.toLowerCase().localeCompare(n.label.toLowerCase())})),walletCount:o.length}}constructor(e,n){this.chainFilter=e,n&&n.length>0&&(this.normalizedAllowList=n.map(String),this.normalizedAllowList.includes("binance")&&this.normalizedAllowList.push("binance-defi-wallet"),this.normalizedAllowList.includes("bitget_wallet")&&this.normalizedAllowList.push("bitkeep")),this.detectedEth=this.normalizedAllowList?.includes("detected_ethereum_wallets")??!1,this.detectedSol=this.normalizedAllowList?.includes("detected_solana_wallets")??!1,this.includeWalletConnect=this.normalizedAllowList?.includes("wallet_connect")??!1,this.includeWalletConnectQr=this.normalizedAllowList?.includes("wallet_connect_qr")??!1,this.includeWalletConnectQrSolana=this.normalizedAllowList?.includes("wallet_connect_qr_solana")??!1}}var P=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),/*#__PURE__*/n("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),/*#__PURE__*/n("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),Q=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[/*#__PURE__*/n("stop",{offset:"0",stopColor:"#9945ff"}),/*#__PURE__*/n("stop",{offset:".2",stopColor:"#7962e7"}),/*#__PURE__*/n("stop",{offset:"1",stopColor:"#00d18c"})]}),/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),/*#__PURE__*/n("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});const H=/*#__PURE__*/h.div.withConfig({displayName:"Header",componentId:"sc-9b65f2b6-0"})(["display:flex;justify-content:space-between;align-items:center;"]),R=/*#__PURE__*/h.button.withConfig({displayName:"CloseButton",componentId:"sc-9b65f2b6-1"})(["padding:0.25rem;height:30px;width:30px;display:flex;align-items:center;justify-content:center;border-radius:var(--privy-border-radius-full);background:var(--privy-color-background-2);"]),V=/*#__PURE__*/h.div.withConfig({displayName:"WalletIconWithActiveIndicator",componentId:"sc-9b65f2b6-2"})(["position:relative;display:inline-flex;align-items:center;&::after{content:' ';border-radius:var(--privy-border-radius-full);height:6px;width:6px;background-color:var(--privy-color-icon-success);position:absolute;right:-3px;top:-3px;}"]),G=/*#__PURE__*/h.img.withConfig({displayName:"WalletIcon",componentId:"sc-9b65f2b6-3"})(["width:32px;height:32px;border-radius:0.25rem;object-fit:contain;"]),Y=/*#__PURE__*/h.span.withConfig({displayName:"Chip",componentId:"sc-9b65f2b6-4"})(["display:flex;gap:0.25rem;align-items:center;padding:0.25rem 0.5rem;font-size:0.75rem;font-weight:500;line-height:1.125rem;border-radius:var(--privy-border-radius-sm);background-color:var(--privy-color-background-2);svg{width:100%;max-width:1rem;max-height:1rem;stroke-width:2;}"]),J=/*#__PURE__*/h.div.withConfig({displayName:"ScrollContainer",componentId:"sc-9b65f2b6-5"})(["display:flex;flex-direction:column;gap:0.5rem;max-height:24rem;overflow-y:scroll;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],(e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0));function X({enabled:e=!0,walletList:n,walletChainType:t}){let i=v(),{connectors:l}=A(),{listings:r,loading:c}=W(e),s=t??i.appearance.walletChainType,d=n??i.appearance?.walletList,h=o((()=>new D(s,d)),[s,d]),{wallets:m,walletCount:p}=o((()=>h.getWallets(l,r)),[h,l,r]),[u,g]=a(""),w=o((()=>u?m.filter((e=>e.label.toLowerCase().includes(u.toLowerCase()))):m),[u,m]),[f,y]=a();return{selected:f,setSelected:y,search:u,setSearch:g,loadingListings:c,wallets:w,walletCount:p}}let Z=e=>!e||"string"!=typeof e&&(e instanceof z||e instanceof S);const ee=({index:i,style:l,data:a,recent:o})=>{let r=a.wallets[i],{walletChainType:c,handleWalletClick:s}=a,{t:d}=C(),h={...l,boxSizing:"border-box"};return r?/*#__PURE__*/e(le,{style:h,onClick:()=>s(r),children:[r.icon&&(r.connector&&!Z(r.connector)?/*#__PURE__*/n(V,{children:"string"==typeof r.icon?/*#__PURE__*/n(G,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof r.icon?/*#__PURE__*/n(G,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})),/*#__PURE__*/n(re,{children:r.label}),o?/*#__PURE__*/e(t,{children:[/*#__PURE__*/n(Y,{children:d("connectWallet.lastUsed")}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/e(t,{children:["ethereum-only"===c&&/*#__PURE__*/n(P,{}),"solana-only"===c&&/*#__PURE__*/n(Q,{})]})})]}):/*#__PURE__*/n(ae,{children:!("ethereum-only"===c||"solana-only"===c)&&/*#__PURE__*/e(t,{children:[r.chains?.some((e=>e.startsWith("eip155")))&&/*#__PURE__*/n(P,{}),r.chains?.some((e=>e.startsWith("solana")))&&/*#__PURE__*/n(Q,{})]})})]}):null};var ne=({className:h,customDescription:p,connectOnly:u,preSelectedWalletId:x,hideHeader:W,...E})=>{let q=v(),{t:O}=C(),{connectors:U}=A(),F=E.walletChainType||q.appearance.walletChainType,M=E.walletList||q.appearance?.walletList,{onBack:H,onClose:R,app:V}=E,{selected:Y,setSelected:J,qrUrl:ne,setQrUrl:de,connecting:he,uiState:me,errorCode:pe,wallets:ue,walletCount:ge,handleConnect:we,handleBack:fe,showSearchBar:ye,isInitialConnectView:ve,title:be,search:Ce,setSearch:xe}=function({onConnect:e,onBack:n,onClose:t,onConnectError:i,walletList:l,walletChainType:c,app:s}){let h=v(),{connectors:m}=A(),{t:p}=C(),{wallets:u,walletCount:g,search:w,setSearch:f,selected:y,setSelected:x}=X({enabled:k(l??[]),walletList:l,walletChainType:c}),[_,W]=a(),[T,z]=a(),[S,N]=a(),[B,E]=a(),j=!y&&!S&&!B,K=j&&(g>6||w.length>0),q=m.find((e=>"wallet_connect_v2"===e.connectorType)),O=r((async(n,t)=>{if(n){if(B?.connector===n&&"loading"===_)return void console.log("Already connecting to this wallet, skipping duplicate attempt");if(W("loading"),"string"==typeof n)return E({connector:n,name:t?.name??"Wallet",icon:t?.icon,id:t?.id,url:t?.url}),void window.open(n,"_blank");E({connector:n,name:t?.name??n.walletBranding.name??"Wallet",icon:t?.icon??n.walletBranding.icon,id:t?.id,url:t?.url});try{let t=await n.connect({showPrompt:!0});if(!t)return W("error"),z(void 0),void i?.(new I("Unable to connect wallet"));W("success"),z(void 0),L({address:t.address,client:t.walletClientType,appId:h.id}),setTimeout((()=>{e({connector:n,wallet:t})}),b)}catch(n){if(console.error("ERROR: ",{e:n}),n?.message?.includes("already pending for origin")||n?.message?.includes("wallet_requestPermissions"))return void console.log("Connection request already pending, maintaining loading state");W("error"),z(n?.privyErrorCode),i?.(n instanceof Error?n:new I(n?.message||"Unable to connect wallet"))}}}),[h.id,e,B,_]),U=r((()=>S?(W(void 0),z(void 0),E(void 0),void N(void 0)):B?(W(void 0),z(void 0),void E(void 0)):y?(W(void 0),z(void 0),E(void 0),void x(void 0)):"error"===_||"loading"===_?(W(void 0),z(void 0),void E(void 0)):void n?.()),[S,B,y,_,n]),F=o((()=>B?.connector===q&&S&&d&&B?.name?p("connectWallet.goToWallet",{walletName:B.name}):B?.connector===q&&S&&B?.name?p("connectWallet.scanToConnect",{walletName:B.name}):S&&B?.name?p(d?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:B.name}):"string"==typeof B?.connector?p("connectWallet.openOrInstall",{walletName:B.name}):y&&!B?p("connectWallet.selectNetwork"):B?null:p("connectWallet.selectYourWallet")),[B,S,y,q,p]);return{selected:y,setSelected:x,qrUrl:S,setQrUrl:N,connecting:B,uiState:_,errorCode:T,search:w,setSearch:f,wallets:u,walletCount:g,wc:q,isInitialConnectView:j,showSearchBar:K,title:F,handleConnect:O,handleBack:U,onClose:t,onConnect:e,app:s}}({...E,walletList:M,walletChainType:F}),_e=U.find((e=>"wallet_connect_v2"===e.connectorType)),We=U.find((e=>"walletconnect_solana"===e.walletBranding.id)),ke=c(null),Le=l({count:ue.length,getScrollElement:()=>ke.current,estimateSize:()=>56,overscan:6,gap:5}),Te=r((async e=>{let n="solana-only"!==F&&e.chains?.some((e=>e.startsWith("eip155"))),t="ethereum-only"!==F&&e.chains?.some((e=>e.startsWith("solana"))),i=()=>{let n=e.id;return _[n]||_[`${n}_wallet`]},l=n=>{let t=D.normalize(e.id);return U.find((e=>D.normalize(e.walletClientType)===t&&e.chainType===n&&!("ethereum"===e.chainType&&e instanceof z||"solana"===e.chainType&&e instanceof S)))},a=async()=>{if(!_e||!e.listing)return!1;let n=$[e.listing.slug]?{...e.listing,...$[e.listing.slug]}:e.listing;return _e.setWalletEntry(n,de),await _e.resetConnection(e.id),await we(_e,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0},o=async()=>!!We&&!!e.listing&&(await We.disconnect(),We.wallet.setWalletEntry(e.listing,de),await new Promise((e=>setTimeout(e,100))),await we(We,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0),r=async n=>{let t=(e=>{let n=i();if(n)return n.getMobileRedirect({isSolana:e,connectOnly:!!u,useUniversalLink:!1})})(n);return!!t&&(await we(t,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0)};if(n&&t)J(e);else{if(n&&!t){let n=l("ethereum");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d&&i()){if(await r(!1)||await a())return}else if(await a()||await r(!1))return}if(t&&!n){let n=l("solana");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d){if(await r(!0)||await o())return}else if(await o()||await r(!0))return}if(!Z(e.connector)){if(_e&&"wallet_connect_v2"===e.connector?.connectorType)if(await _e.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let n=$[e.listing.slug]?{...e.listing,...$[e.listing.slug]}:e.listing;_e.setWalletEntry(n,de)}else _e.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},de);return We&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await We.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?We.wallet.setWalletEntry(e.listing,de):We.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},de),await new Promise((e=>setTimeout(e,100)))),void await we(e.connector,{name:e.label,icon:e.icon,id:e.id,url:e.url})}e.url&&await we(e.url,{name:e.label,icon:e.icon,id:e.id,url:e.url})}}),[_e,We,we,J,de,F,u,U]);return s((()=>{if(!x)return;let e=ue.find((({id:e})=>e===x));e&&Te(e).catch(console.error)}),[x]),/*#__PURE__*/e(K,{className:h,children:[/*#__PURE__*/n(K.Header,{icon:W&&ve?void 0:he&&!ne||ne&&d&&he?.icon?he.icon:he?void 0:B,iconVariant:he&&!ne||ne&&d?"loading":void 0,iconLoadingStatus:he&&!ne||ne&&d?{success:"success"===me,fail:"error"===me}:void 0,title:W&&ve?void 0:he&&!ne?O("connectWallet.waitingForWallet",{walletName:he.name}):ne&&d?O("connectWallet.waitingForWallet",{walletName:he?.name??"connection"}):be,subtitle:W&&ve?void 0:he&&!ne&&"string"==typeof he.connector?O("connectWallet.installAndConnect",{walletName:he.name}):he&&!ne&&"string"!=typeof he.connector?"error"===me?pe===N.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${he.name} and try again.`:O("connectWallet.tryConnectingAgain"):O("connectionStatus.connectOneWallet"):ve?p??(V?O("connectWallet.connectToAccount",{appName:V.name}):null):null,showBack:!!H||!ve,showClose:!0,onBack:H||fe,onClose:R}),/*#__PURE__*/e(K.Body,{ref:ke,$colorScheme:q.appearance.palette.colorScheme,style:{marginBottom:ne?"0.5rem":void 0},children:[ye&&/*#__PURE__*/n(te,{children:/*#__PURE__*/e(y,{style:{background:"transparent"},children:[/*#__PURE__*/n(T,{children:/*#__PURE__*/n(i,{})}),/*#__PURE__*/n("input",{className:"login-method-button",type:"text",placeholder:O("connectWallet.searchPlaceholder",{count:String(ge)}),onChange:e=>xe(e.target.value),value:Ce})]})}),ne&&d&&"loading"===me&&/*#__PURE__*/e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[/*#__PURE__*/n(m,{variant:"primary",onClick:()=>window.open(ne.universal??ne.native,"_blank"),style:{width:"100%"},children:O("connectWallet.openInApp")}),/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:"Copy link"})]}),ne&&!d&&"loading"===me&&/*#__PURE__*/n("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:O("connectWallet.copyLink")})}),ne&&!d&&/*#__PURE__*/n(f,{size:280,url:ne.universal??ne.native,squareLogoElement:he?.icon?"string"==typeof he.icon?e=>/*#__PURE__*/n("svg",{...e,children:/*#__PURE__*/n("image",{href:he.icon,height:e.height,width:e.width})}):he.icon:j}),ne&&!d&&he?.url&&("binance"===he.id||"binanceus"===he.id||"binance-defi"===he.id)&&/*#__PURE__*/e(se,{children:[/*#__PURE__*/e("span",{children:["Don't have ",he.name,"? "]}),/*#__PURE__*/n(g,{href:he.url,target:"_blank",size:"sm",children:"Download here"})]}),/*#__PURE__*/e(ie,{children:[he&&!ne&&"string"==typeof he.connector&&/*#__PURE__*/e(le,{onClick:()=>window.open(he.connector,"_blank"),children:[he.icon&&("string"==typeof he.icon?/*#__PURE__*/n(G,{src:he.icon}):/*#__PURE__*/n(he.icon,{})),/*#__PURE__*/n(re,{children:he.name})]}),Y?.chains.some((e=>e.startsWith("eip155")))&&!he&&/*#__PURE__*/e(le,{onClick:()=>Te({...Y,chains:Y.chains.filter((e=>e.startsWith("eip155")))}),children:[Y.icon&&("string"==typeof Y.icon?/*#__PURE__*/n(G,{src:Y.icon}):/*#__PURE__*/n(Y.icon,{})),/*#__PURE__*/n(re,{children:Y.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(P,{})})]}),Y?.chains.some((e=>e.startsWith("solana")))&&!he&&/*#__PURE__*/e(le,{onClick:()=>Te({...Y,chains:Y.chains.filter((e=>e.startsWith("solana")))}),children:[Y.icon&&("string"==typeof Y.icon?/*#__PURE__*/n(G,{src:Y.icon}):/*#__PURE__*/n(Y.icon,{})),/*#__PURE__*/n(re,{children:Y.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(Q,{})})]}),ve&&/*#__PURE__*/e(t,{children:[!(ge>0)&&/*#__PURE__*/n(oe,{children:O("connectWallet.noWalletsFound")}),ge>0&&!ne&&/*#__PURE__*/n("div",{style:{maxHeight:56*Math.min(ue.length,5)+5,width:"100%"},children:/*#__PURE__*/n("div",{style:{height:`${Le.getTotalSize()}px`,width:"100%",position:"relative"},children:Le.getVirtualItems().map((e=>/*#__PURE__*/n(ee,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:ue,walletChainType:F,handleWalletClick:Te}},e.key)))})})]})]})]}),/*#__PURE__*/e(K.Footer,{children:[he&&!ne&&"string"!=typeof he.connector&&"error"===me&&/*#__PURE__*/n(K.Actions,{children:/*#__PURE__*/n(m,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>we(he.connector,{name:he.name,icon:he.icon,id:he.id,url:he.url}),children:O("connectWallet.retry")})}),!!(V&&V.legal.privacyPolicyUrl&&V.legal.termsAndConditionsUrl)&&/*#__PURE__*/n(w,{app:V,alwaysShowImplicitConsent:!0}),/*#__PURE__*/n(K.Watermark,{})]})]})};let te=/*#__PURE__*/h.div.withConfig({displayName:"StickySearchContainer",componentId:"sc-5a8fc7d8-0"})(["position:sticky;margin-top:-3px;padding-top:3px;top:-3px;z-index:1;background:var(--privy-color-background);padding-bottom:calc(var(--screen-space) / 2);"]),ie=/*#__PURE__*/h.div.withConfig({displayName:"WalletListContainer",componentId:"sc-5a8fc7d8-1"})(["display:flex;flex-direction:column;gap:","px;"],5),le=/*#__PURE__*/h.button.withConfig({displayName:"Button",componentId:"sc-5a8fc7d8-2"})(["&&{gap:0.5rem;align-items:center;display:flex;position:relative;text-align:left;font-weight:500;transition:background 200ms ease-in;width:calc(100% - 4px);border-radius:var(--privy-border-radius-md);padding:0.75em;border:1px solid var(--privy-color-foreground-4);justify-content:space-between;}&:hover{background:var(--privy-color-background-2);}"]),ae=/*#__PURE__*/h.span.withConfig({displayName:"ButtonBadge",componentId:"sc-5a8fc7d8-3"})(["display:flex;align-items:center;justify-content:end;position:relative;& > svg{border-radius:var(--privy-border-radius-full);stroke-width:2.5;width:100%;max-height:1rem;max-width:1rem;flex-shrink:0;}& > svg:not(:last-child){border-radius:var(--privy-border-radius-full);margin-right:-0.375rem;}"]),oe=/*#__PURE__*/h.div.withConfig({displayName:"EmptyContainer",componentId:"sc-5a8fc7d8-4"})(["height:60px;display:flex;align-items:center;justify-content:center;text-align:center;"]),re=/*#__PURE__*/h.span.withConfig({displayName:"WalletName",componentId:"sc-5a8fc7d8-5"})(["text-overflow:ellipsis;white-space:nowrap;color:var(--privy-color-foreground);font-weight:400;flex:1;"]),ce=/*#__PURE__*/h(M).withConfig({displayName:"StyledCopyableText",componentId:"sc-5a8fc7d8-6"})(["&&{margin:0.5rem auto 0 auto;}"]),se=/*#__PURE__*/h.div.withConfig({displayName:"BinanceDownloadMessage",componentId:"sc-5a8fc7d8-7"})(["text-align:center;margin-top:1rem;font-size:0.875rem;font-weight:400;color:var(--privy-color-foreground-3);"]);export{M as C,H,J as S,G as W,Y as a,R as b,D as c,ee as d,ne as i,X as u};