@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,3 +1,3 @@
1
- import{jsx as o,jsxs as c}from"react/jsx-runtime";import{styled as e}from"styled-components";import{u as a}from"./context-BOoFAPna.mjs";import i from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import r from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import n from"@heroicons/react/24/outline/XMarkIcon";import{u as l}from"./internal-context-e-Eni5bG.mjs";function t(c){/*#__PURE__*/return o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...c,children:/*#__PURE__*/o("g",{fill:c.color||"var(--privy-color-foreground)",children:/*#__PURE__*/o("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let d=/*#__PURE__*/e.span.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-ff3bd734-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);display:block;&& > a{color:var(--privy-color-accent);}"]);function h({app:{legal:{privacyPolicyUrl:e,termsAndConditionsUrl:a,requireUsersAcceptTerms:i}},alwaysShowImplicitConsent:r}){let n=!(!e||!a);return i&&!r||!a&&!e?
1
+ import{jsx as o,jsxs as c}from"react/jsx-runtime";import{styled as e}from"styled-components";import{u as a}from"./context-BqHnoxK5.mjs";import i from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import r from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import n from"@heroicons/react/24/outline/XMarkIcon";import{u as l}from"./internal-context-e-Eni5bG.mjs";function t(c){/*#__PURE__*/return o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...c,children:/*#__PURE__*/o("g",{fill:c.color||"var(--privy-color-foreground)",children:/*#__PURE__*/o("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let d=/*#__PURE__*/e.span.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-ff3bd734-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);display:block;&& > a{color:var(--privy-color-accent);}"]);function h({app:{legal:{privacyPolicyUrl:e,termsAndConditionsUrl:a,requireUsersAcceptTerms:i}},alwaysShowImplicitConsent:r}){let n=!(!e||!a);return i&&!r||!a&&!e?
2
2
  /*#__PURE__*/o(d,{}):
3
3
  /*#__PURE__*/ /*#__PURE__*/c(d,{children:["By logging in I agree to the"," ",a&&/*#__PURE__*/o("a",{href:a,target:"_blank",children:n?"Terms":"Terms of Service"}),n&&" & ",e&&/*#__PURE__*/o("a",{href:e,target:"_blank",children:"Privacy Policy"})]})}const s=({className:c})=>{let{appearance:e}=a();/*#__PURE__*/return o(v,{className:c,children:e.footerLogo??/*#__PURE__*/o(p,{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:/*#__PURE__*/o(t,{color:"currentColor",height:13,width:150})})})};let p=/*#__PURE__*/e.a.withConfig({displayName:"PrivyLink",componentId:"sc-ff3bd734-1"})(["&&{padding:0;color:var(--privy-color-foreground-3);}"]);const v=/*#__PURE__*/e.div.withConfig({displayName:"ModalFooter",componentId:"sc-ff3bd734-2"})(["display:flex;align-items:center;justify-content:center;padding-top:8px;padding-bottom:12px;gap:8px;font-size:13px;&& a{padding:0.5rem 0;&:hover{text-decoration:none;}}@media all and (display-mode:standalone){padding-bottom:30px;}"]),m=({backFn:c})=>/*#__PURE__*/o("div",{children:/*#__PURE__*/o(x,{onClick:c,children:/*#__PURE__*/o(i,{height:"16px",width:"16px",strokeWidth:2})})}),f=({infoFn:c})=>/*#__PURE__*/o("div",{children:/*#__PURE__*/o(u,{"aria-label":"info",onClick:c,children:/*#__PURE__*/o(r,{height:"22px",width:"22px",strokeWidth:2})})}),g=c=>/*#__PURE__*/o("div",{children:/*#__PURE__*/o(x,{"aria-label":"close modal",onClick:c.onClose,children:/*#__PURE__*/o(n,{height:"16px",width:"16px",strokeWidth:2})})}),y=({backFn:e,infoFn:i,onClose:r,title:n,closeable:t=!0,className:d})=>{let{closePrivyModal:h}=l(),s=a();/*#__PURE__*/return c(w,{className:d,children:[/*#__PURE__*/c(b,{children:[e&&/*#__PURE__*/o(m,{backFn:e}),/*#__PURE__*/o("div",{style:{height:24}}),i&&/*#__PURE__*/o(f,{infoFn:i})]}),n&&/*#__PURE__*/o(Z,{id:"privy-dialog-title",children:n}),/*#__PURE__*/o(C,{children:!s.render.standalone&&t&&/*#__PURE__*/o(g,{onClose:r||(()=>h())})})]})};let x=/*#__PURE__*/e.button.withConfig({displayName:"StyledButton",componentId:"sc-bc3cd0df-0"})(["&&{cursor:pointer;display:flex;opacity:0.6;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-full);padding:4px;> svg{margin:auto;color:var(--privy-color-foreground);}:hover{opacity:1;}}"]),u=/*#__PURE__*/e(x).withConfig({displayName:"TransparentStyledButton",componentId:"sc-bc3cd0df-1"})(["&&{background-color:transparent;}"]),w=/*#__PURE__*/e.div.withConfig({displayName:"StyledHeader",componentId:"sc-bc3cd0df-2"})(["padding:16px 0;display:flex;align-items:center;justify-content:space-between;h2{font-size:16px;line-height:24px;font-weight:600;color:var(--privy-color-foreground);}"]),b=/*#__PURE__*/e.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-bc3cd0df-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),C=/*#__PURE__*/e.div.withConfig({displayName:"RightActionContainer",componentId:"sc-bc3cd0df-4"})(["flex:1;display:flex;justify-content:flex-end;"]),Z=/*#__PURE__*/e.div.withConfig({displayName:"TitleContainer",componentId:"sc-bc3cd0df-5"})(["overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis;text-align:center;color:var(--privy-color-foreground-2);"]);export{s as B,y as M,h as T,v as a};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as e,Fragment as o}from"react/jsx-runtime";import r from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useMemo as n}from"react";import{styled as a}from"styled-components";import{P as s}from"./Button-CrJpeX0e.mjs";import{a as c}from"./Layouts-Bmf8DxNP.mjs";import{L as l,a7 as m}from"./useActiveWallet-BdFIc7_K.mjs";import{M as d,B as u}from"./ModalHeader-YP9pLMEP.mjs";import{u as p}from"./context-BOoFAPna.mjs";import{u as h}from"./internal-context-e-Eni5bG.mjs";import{a as f}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{u as g}from"./index-Doo2h9wE.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"@privy-io/js-sdk-core";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"tinycolor2";import"ofetch";import"./analytics-mkkvFRju.mjs";const y=({size:o=61,...r})=>/*#__PURE__*/t("svg",{width:o,height:o,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:/*#__PURE__*/e("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/t("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/t("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})});const C={component:()=>{let{data:r,setModalData:i,navigateBack:n}=f(),a=p(),{closePrivyModal:s}=h(),{externalTransactionId:c}=r?.moonpayStatus,l=g(c||null,a.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(d,{title:"Fund account",backFn:()=>{let t={...r?.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(t.usingDefaultFundingMethod=!1),i({funding:t,solanaFundingData:r?.solanaFundingData}),n()}}),/*#__PURE__*/t(v,{status:l,onClickCta:s}),/*#__PURE__*/t(u,{})]})}};let v=({status:r,onClickCta:i})=>{let{title:a,body:l,cta:m}=n((()=>(t=>{switch(t){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(r)),[r]);/*#__PURE__*/return e(o,{children:[/*#__PURE__*/e(j,{children:[/*#__PURE__*/t(w,{status:r}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/t("h3",{children:a}),/*#__PURE__*/t(b,{children:l})]})]}),m&&/*#__PURE__*/t(s,{onClick:i,children:m})]})},w=({status:o})=>{if(!o||"pending"===o){let o="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(l,{color:o,style:{position:"absolute"}}),/*#__PURE__*/t(m,{color:o}),/*#__PURE__*/t(y,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let n=(e=>{switch(e){case"completed":return i;case"waitingAuthorization":return()=>/*#__PURE__*/t(r,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(o),a=(s=o)?{completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"}[s]:"var(--privy-color-foreground-4)";var s;/*#__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})})},b=/*#__PURE__*/a.p.withConfig({displayName:"StatusBody",componentId:"sc-76c9ed5b-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),j=/*#__PURE__*/a.div.withConfig({displayName:"ConnectContainer",componentId:"sc-76c9ed5b-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);export{C as MoonpayStatusScreen,C as default};
1
+ import{jsx as t,jsxs as e,Fragment as o}from"react/jsx-runtime";import r from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useMemo as n}from"react";import{styled as a}from"styled-components";import{P as s}from"./Button-3JMVXKiE.mjs";import{a as c}from"./Layouts-Bmf8DxNP.mjs";import{L as l,a7 as m}from"./useActiveWallet-CBIiGG1k.mjs";import{M as d,B as u}from"./ModalHeader-B27O6soE.mjs";import{u as p}from"./context-BqHnoxK5.mjs";import{u as h}from"./internal-context-e-Eni5bG.mjs";import{a as f}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{u as g}from"./index-DT54fwyL.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-lYYA8ZfI.mjs";import"@privy-io/js-sdk-core";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"tinycolor2";import"ofetch";import"./analytics-mkkvFRju.mjs";const y=({size:o=61,...r})=>/*#__PURE__*/t("svg",{width:o,height:o,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:/*#__PURE__*/e("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/t("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/t("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})});const C={component:()=>{let{data:r,setModalData:i,navigateBack:n}=f(),a=p(),{closePrivyModal:s}=h(),{externalTransactionId:c}=r?.moonpayStatus,l=g(c||null,a.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(d,{title:"Fund account",backFn:()=>{let t={...r?.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(t.usingDefaultFundingMethod=!1),i({funding:t,solanaFundingData:r?.solanaFundingData}),n()}}),/*#__PURE__*/t(v,{status:l,onClickCta:s}),/*#__PURE__*/t(u,{})]})}};let v=({status:r,onClickCta:i})=>{let{title:a,body:l,cta:m}=n((()=>(t=>{switch(t){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(r)),[r]);/*#__PURE__*/return e(o,{children:[/*#__PURE__*/e(j,{children:[/*#__PURE__*/t(w,{status:r}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/t("h3",{children:a}),/*#__PURE__*/t(b,{children:l})]})]}),m&&/*#__PURE__*/t(s,{onClick:i,children:m})]})},w=({status:o})=>{if(!o||"pending"===o){let o="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(l,{color:o,style:{position:"absolute"}}),/*#__PURE__*/t(m,{color:o}),/*#__PURE__*/t(y,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let n=(e=>{switch(e){case"completed":return i;case"waitingAuthorization":return()=>/*#__PURE__*/t(r,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(o),a=(s=o)?{completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"}[s]:"var(--privy-color-foreground-4)";var s;/*#__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})})},b=/*#__PURE__*/a.p.withConfig({displayName:"StatusBody",componentId:"sc-76c9ed5b-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),j=/*#__PURE__*/a.div.withConfig({displayName:"ConnectContainer",componentId:"sc-76c9ed5b-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);export{C as MoonpayStatusScreen,C as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import t,{useState as r,useEffect as o}from"react";import{i,u as a,a as n}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{A as s,T as m,I as c,S as l,a as d,L as p,b as u,D as h,G as v}from"./twitter-6jomarO4.mjs";import y from"@heroicons/react/24/outline/GlobeAltIcon";import{T as g,L as f}from"./twitch-5IOe4sIQ.mjs";import{u as E,q as A}from"./context-BOoFAPna.mjs";import{b as T,u as S,k as w}from"./internal-context-e-Eni5bG.mjs";import{s as b}from"./shouldProceedtoEmbeddedWalletCreationFlow-BkG4QVN4.mjs";import{S as C}from"./ScreenLayout-t3qtbQ3-.mjs";import{e as _}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{l as j}from"./index-CUao1WyN.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./Button-CrJpeX0e.mjs";import"styled-components";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 O=({style:t})=>/*#__PURE__*/e(y,{style:{color:"var(--privy-color-error)",...t}});let R={google:{name:"Google",component:v},discord:{name:"Discord",component:h},github:{name:"Github",component:u},linkedin:{name:"LinkedIn",component:p},twitter:{name:"Twitter",component:d},spotify:{name:"Spotify",component:l},instagram:{name:"Instagram",component:c},tiktok:{name:"Tiktok",component:m},line:{name:"LINE",component:f},twitch:{name:"Twitch",component:g},apple:{name:"Apple",component:s}},N=({iconUrl:e,...r})=>t.createElement("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},t.createElement("foreignObject",{x:"2",y:"2",width:"29",height:"28"},t.createElement("img",{src:e,width:"29",height:"28",style:{display:"block",objectFit:"contain",borderRadius:"4px"},alt:"Provider icon"})));const U=(e,r)=>{if(e in R)return R[e];if(i(e)&&r){let o=r.find((t=>t.provider===e));if(o)return{name:o.provider_display_name,component:e=>t.createElement(N,{...e,iconUrl:o.provider_icon_url})}}return{name:"Unknown",component:O}};function I(e,t,r){let o={detail:"",retryable:!1},i=_(t);if(e?.privyErrorCode===T.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===T.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===T.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===T.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===T.TOO_MANY_REQUESTS&&e.message.includes("provider rate limit")){let e=U(t,r).name;o.detail=`Request limit reached for ${e}. Please wait a moment and try again.`}if(e?.privyErrorCode===T.OAUTH_ACCOUNT_SUSPENDED){let e=U(t,r).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===T.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===T.OAUTH_UNEXPECTED&&t.startsWith("privy:")&&(o.detail="Something went wrong. Please try again."),o}const L=({providerName:t,ProviderLogo:r,success:o,errorMessage:i,onRetry:a})=>{let n=o?`Successfully connected with ${t}`:i?i.message:`Verifying connection to ${t}`;/*#__PURE__*/return e(C,{title:n,subtitle:o?"You're good to go!":i?i.detail:"Just a few moments more",icon:r,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!i},secondaryCta:i?.retryable&&a?{label:"Retry",onClick:a}:void 0,watermark:!0})},k={component:()=>{let{authenticated:t,logout:i,ready:s,user:m}=a(),{setModalData:c,navigate:l,resetNavigation:d}=n(),p=E(),{getAuthMeta:u,initLoginWithOAuth:h,loginWithOAuth:v,updateWallets:y,setReadyToTrue:g,closePrivyModal:f,createAnalyticsEvent:C}=S(),[_,O]=r(!1),[R,N]=r(void 0),k=u()?.provider||"google",{name:D,component:P}=U(k,p.customOAuthProviders);return o((()=>{v(k).then((()=>{O(!0),g(!0)})).catch((e=>{if(g(!1),e?.privyErrorCode===T.ALLOWLIST_REJECTED)return N(void 0),d(),void l("AllowlistRejectionScreen");if(e?.privyErrorCode===T.USER_LIMIT_REACHED)return console.error(new w(e).toString()),N(void 0),d(),void l("UserLimitReachedScreen");if(e?.privyErrorCode===T.USER_DOES_NOT_EXIST)return N(void 0),d(),void l("AccountNotFoundScreen");if(e?.privyErrorCode===T.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return N(void 0),d(),c({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:u()?.provider,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void l("LinkConflictScreen");let{retryable:t,detail:r}=I(e,k,p.customOAuthProviders);N({retryable:t,detail:r,message:"Authentication failed"})})).finally((()=>{j()}))}),[D,k]),o((()=>{if(s&&t&&_&&m){if(p?.legal.requireUsersAcceptTerms&&!m.hasAcceptedTerms){let e=setTimeout((()=>{l("AffirmativeConsentScreen")}),A);return()=>clearTimeout(e)}if(b(m,p.embeddedWallets)){let e=setTimeout((()=>{c({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),C({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:k,screen:"OAuthStatusScreen"}}),i()},callAuthOnSuccessOnClose:!0}}),l("EmbeddedWalletOnAccountCreateScreen")}),A);return()=>clearTimeout(e)}{let e=setTimeout((()=>f({shouldCallAuthOnSuccess:!0,isSuccess:!0})),A);return y(),()=>clearTimeout(e)}}}),[s,t,_,m]),/*#__PURE__*/e(L,{providerName:D,ProviderLogo:P,success:_,errorMessage:R,onRetry:R?.retryable?()=>{j(),h(k),N(void 0)}:void 0})},isShownBeforeReady:!0};export{k as OAuthStatusScreen,L as OAuthStatusScreenView,k as default};
1
+ import{jsx as e}from"react/jsx-runtime";import t,{useState as r,useEffect as o}from"react";import{i,u as a,a as n}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{A as s,T as m,I as c,S as l,a as d,L as p,b as u,D as h,G as v}from"./twitter-BoAxhlj6.mjs";import y from"@heroicons/react/24/outline/GlobeAltIcon";import{T as g,L as f}from"./twitch-5IOe4sIQ.mjs";import{u as E,q as A}from"./context-BqHnoxK5.mjs";import{b as T,u as S,k as w}from"./internal-context-e-Eni5bG.mjs";import{s as b}from"./shouldProceedtoEmbeddedWalletCreationFlow-F4FtZ8gq.mjs";import{S as C}from"./ScreenLayout-Dp0ezg8Q.mjs";import{e as _}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{l as j}from"./index-B24hEnAn.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./Button-3JMVXKiE.mjs";import"styled-components";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 O=({style:t})=>/*#__PURE__*/e(y,{style:{color:"var(--privy-color-error)",...t}});let R={google:{name:"Google",component:v},discord:{name:"Discord",component:h},github:{name:"Github",component:u},linkedin:{name:"LinkedIn",component:p},twitter:{name:"Twitter",component:d},spotify:{name:"Spotify",component:l},instagram:{name:"Instagram",component:c},tiktok:{name:"Tiktok",component:m},line:{name:"LINE",component:f},twitch:{name:"Twitch",component:g},apple:{name:"Apple",component:s}},N=({iconUrl:e,...r})=>t.createElement("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},t.createElement("foreignObject",{x:"2",y:"2",width:"29",height:"28"},t.createElement("img",{src:e,width:"29",height:"28",style:{display:"block",objectFit:"contain",borderRadius:"4px"},alt:"Provider icon"})));const U=(e,r)=>{if(e in R)return R[e];if(i(e)&&r){let o=r.find((t=>t.provider===e));if(o)return{name:o.provider_display_name,component:e=>t.createElement(N,{...e,iconUrl:o.provider_icon_url})}}return{name:"Unknown",component:O}};function I(e,t,r){let o={detail:"",retryable:!1},i=_(t);if(e?.privyErrorCode===T.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===T.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===T.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===T.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===T.TOO_MANY_REQUESTS&&e.message.includes("provider rate limit")){let e=U(t,r).name;o.detail=`Request limit reached for ${e}. Please wait a moment and try again.`}if(e?.privyErrorCode===T.OAUTH_ACCOUNT_SUSPENDED){let e=U(t,r).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===T.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===T.OAUTH_UNEXPECTED&&t.startsWith("privy:")&&(o.detail="Something went wrong. Please try again."),o}const L=({providerName:t,ProviderLogo:r,success:o,errorMessage:i,onRetry:a})=>{let n=o?`Successfully connected with ${t}`:i?i.message:`Verifying connection to ${t}`;/*#__PURE__*/return e(C,{title:n,subtitle:o?"You're good to go!":i?i.detail:"Just a few moments more",icon:r,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!i},secondaryCta:i?.retryable&&a?{label:"Retry",onClick:a}:void 0,watermark:!0})},k={component:()=>{let{authenticated:t,logout:i,ready:s,user:m}=a(),{setModalData:c,navigate:l,resetNavigation:d}=n(),p=E(),{getAuthMeta:u,initLoginWithOAuth:h,loginWithOAuth:v,updateWallets:y,setReadyToTrue:g,closePrivyModal:f,createAnalyticsEvent:C}=S(),[_,O]=r(!1),[R,N]=r(void 0),k=u()?.provider||"google",{name:D,component:P}=U(k,p.customOAuthProviders);return o((()=>{v(k).then((()=>{O(!0),g(!0)})).catch((e=>{if(g(!1),e?.privyErrorCode===T.ALLOWLIST_REJECTED)return N(void 0),d(),void l("AllowlistRejectionScreen");if(e?.privyErrorCode===T.USER_LIMIT_REACHED)return console.error(new w(e).toString()),N(void 0),d(),void l("UserLimitReachedScreen");if(e?.privyErrorCode===T.USER_DOES_NOT_EXIST)return N(void 0),d(),void l("AccountNotFoundScreen");if(e?.privyErrorCode===T.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return N(void 0),d(),c({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:u()?.provider,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void l("LinkConflictScreen");let{retryable:t,detail:r}=I(e,k,p.customOAuthProviders);N({retryable:t,detail:r,message:"Authentication failed"})})).finally((()=>{j()}))}),[D,k]),o((()=>{if(s&&t&&_&&m){if(p?.legal.requireUsersAcceptTerms&&!m.hasAcceptedTerms){let e=setTimeout((()=>{l("AffirmativeConsentScreen")}),A);return()=>clearTimeout(e)}if(b(m,p.embeddedWallets)){let e=setTimeout((()=>{c({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),C({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:k,screen:"OAuthStatusScreen"}}),i()},callAuthOnSuccessOnClose:!0}}),l("EmbeddedWalletOnAccountCreateScreen")}),A);return()=>clearTimeout(e)}{let e=setTimeout((()=>f({shouldCallAuthOnSuccess:!0,isSuccess:!0})),A);return y(),()=>clearTimeout(e)}}}),[s,t,_,m]),/*#__PURE__*/e(L,{providerName:D,ProviderLogo:P,success:_,errorMessage:R,onRetry:R?.retryable?()=>{j(),h(k),N(void 0)}:void 0})},isShownBeforeReady:!0};export{k as OAuthStatusScreen,L as OAuthStatusScreenView,k as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as o}from"./index-CUao1WyN.mjs";import{u as i}from"./internal-context-e-Eni5bG.mjs";import{a as r}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{S as a}from"./ScreenLayout-t3qtbQ3-.mjs";import"react";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"./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"ofetch";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 s=({title:o="Log in or create a new account?",subtitle:i="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:r,onLogin:s})=>/*#__PURE__*/t(a,{title:o,subtitle:i,icon:e,primaryCta:{label:"Create new account",onClick:r},secondaryCta:{label:"Log in with a passkey",onClick:s},watermark:!0}),n={component:()=>{let{enabled:e,token:a}=o(),{navigate:n,setModalData:p}=r(),{initSignupWithPasskey:c,initLoginWithPasskey:m}=i();/*#__PURE__*/return t(s,{onSignup:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:t=>c({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:a}),p({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:t=>m({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await m({withPrivyUi:!0,captchaToken:a}),p({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};export{n as PasskeySelectSignupOrLogin,s as PasskeySelectSignupOrLoginView,n as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as o}from"./index-B24hEnAn.mjs";import{u as i}from"./internal-context-e-Eni5bG.mjs";import{a as r}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{S as a}from"./ScreenLayout-Dp0ezg8Q.mjs";import"react";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"./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"ofetch";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 s=({title:o="Log in or create a new account?",subtitle:i="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:r,onLogin:s})=>/*#__PURE__*/t(a,{title:o,subtitle:i,icon:e,primaryCta:{label:"Create new account",onClick:r},secondaryCta:{label:"Log in with a passkey",onClick:s},watermark:!0}),n={component:()=>{let{enabled:e,token:a}=o(),{navigate:n,setModalData:p}=r(),{initSignupWithPasskey:c,initLoginWithPasskey:m}=i();/*#__PURE__*/return t(s,{onSignup:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:t=>c({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:a}),p({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:t=>m({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await m({withPrivyUi:!0,captchaToken:a}),p({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};export{n as PasskeySelectSignupOrLogin,s as PasskeySelectSignupOrLoginView,n as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{FingerprintIcon as r}from"lucide-react";import{useState as t,useRef as o,useEffect as s}from"react";import{styled as i}from"styled-components";import{u as a,q as n}from"./context-BOoFAPna.mjs";import{c,b as m,u}from"./internal-context-e-Eni5bG.mjs";import{a as l,u as p}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-BkG4QVN4.mjs";import{S as y}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"react-device-detect";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 h=({status:t,passkeySignupFlow:o=!1,error:s,onRetry:i})=>/*#__PURE__*/e(y,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e(g,{children:(()=>{switch(t){case"loading":return o?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(s instanceof c){if(s.privyErrorCode===m.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(s.privyErrorCode===m.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&i?{label:"Retry",onClick:i}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),f={component:()=>{let{data:r,setModalData:i,navigate:c}=l(),m=a(),{loginWithPasskey:y,signupWithPasskey:f,closePrivyModal:g,createAnalyticsEvent:v}=u(),{user:w,logout:j}=p(),{passkeySignupFlow:k}=r?.passkeyAuthModalData??{},S=n-500,[b,C]=t("loading"),[A,P]=t(null),E=o([]),W=e=>{E.current=[e,...E.current]};s((()=>()=>{E.current.forEach((e=>clearTimeout(e))),E.current=[]}),[]);let T=async()=>{C("loading");try{k?await f():await y(),C("success")}catch(e){P(e),C("error")}};return s((()=>{if("success"===b&&w){if(m?.legal.requireUsersAcceptTerms&&!w.hasAcceptedTerms)return void W(setTimeout((()=>{c("AffirmativeConsentScreen")}),S));if(!d(w,m?.embeddedWallets))return void W(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));W(setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),v({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),j()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),S))}}),[w,b]),s((()=>{T()}),[]),/*#__PURE__*/e(h,{status:b,passkeySignupFlow:k,error:A,onRetry:T})}};let g=/*#__PURE__*/i.span.withConfig({displayName:"SubtitleText",componentId:"sc-5f92460f-0"})(["white-space:pre-wrap;"]);export{f as PasskeyStatusScreen,h as PasskeyStatusScreenView,f as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{FingerprintIcon as r}from"lucide-react";import{useState as t,useRef as o,useEffect as s}from"react";import{styled as i}from"styled-components";import{u as a,q as n}from"./context-BqHnoxK5.mjs";import{c,b as m,u}from"./internal-context-e-Eni5bG.mjs";import{a as l,u as p}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-F4FtZ8gq.mjs";import{S as y}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"react-device-detect";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 h=({status:t,passkeySignupFlow:o=!1,error:s,onRetry:i})=>/*#__PURE__*/e(y,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e(g,{children:(()=>{switch(t){case"loading":return o?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(s instanceof c){if(s.privyErrorCode===m.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(s.privyErrorCode===m.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&i?{label:"Retry",onClick:i}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),f={component:()=>{let{data:r,setModalData:i,navigate:c}=l(),m=a(),{loginWithPasskey:y,signupWithPasskey:f,closePrivyModal:g,createAnalyticsEvent:v}=u(),{user:w,logout:j}=p(),{passkeySignupFlow:k}=r?.passkeyAuthModalData??{},S=n-500,[b,C]=t("loading"),[A,P]=t(null),E=o([]),W=e=>{E.current=[e,...E.current]};s((()=>()=>{E.current.forEach((e=>clearTimeout(e))),E.current=[]}),[]);let T=async()=>{C("loading");try{k?await f():await y(),C("success")}catch(e){P(e),C("error")}};return s((()=>{if("success"===b&&w){if(m?.legal.requireUsersAcceptTerms&&!w.hasAcceptedTerms)return void W(setTimeout((()=>{c("AffirmativeConsentScreen")}),S));if(!d(w,m?.embeddedWallets))return void W(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));W(setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),v({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),j()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),S))}}),[w,b]),s((()=>{T()}),[]),/*#__PURE__*/e(h,{status:b,passkeySignupFlow:k,error:A,onRetry:T})}};let g=/*#__PURE__*/i.span.withConfig({displayName:"SubtitleText",componentId:"sc-5f92460f-0"})(["white-space:pre-wrap;"]);export{f as PasskeyStatusScreen,h as PasskeyStatusScreenView,f as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as t,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as c,h as l}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{P as m}from"./Button-CrJpeX0e.mjs";import{S as d}from"./Layouts-Bmf8DxNP.mjs";import{P as p,a as u,I as h,H as y,S as v}from"./shared-C_3e8pDa.mjs";import{n as f}from"./index-CUao1WyN.mjs";import{u as g,m as w}from"./internal-context-e-Eni5bG.mjs";import{S as j}from"./Screen-CpIMiJNF.mjs";import"viem";import"./context-BOoFAPna.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";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"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";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"ofetch";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"./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 b={component:()=>{let[s,a]=t(!0),{authenticated:m,user:b}=n(),{walletProxy:A,closePrivyModal:k,createAnalyticsEvent:P,client:S}=g(),{navigate:N,data:T,onUserCloseViaDialogOrKeybindRef:E}=c(),[M,W]=t(void 0),[_,H]=t(""),[R,U]=t(!1),{entropyId:B,entropyIdVerifier:D,onCompleteNavigateTo:F,onSuccess:O,onFailure:V}=T.recoverWallet,z=(e="User exited before their wallet could be recovered")=>{k({shouldCallAuthOnSuccess:!1}),V("string"==typeof e?new w(e):e)};E.current=z,i((()=>{if(!m)return z("User must be authenticated and have a Privy wallet before it can be recovered")}),[m]);/*#__PURE__*/return e(j,{children:[/*#__PURE__*/r(j.Header,{icon:o,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:z}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(C,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(p,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&W(e)})(e.target.value),disabled:R,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/r(h,{style:{right:"0.75rem"},children:s?/*#__PURE__*/r(y,{onClick:()=>a(!1)}):/*#__PURE__*/r(v,{onClick:()=>a(!0)})})]}),!!_&&/*#__PURE__*/r(x,{children:_})]})})}),/*#__PURE__*/e(j.Footer,{children:[/*#__PURE__*/r(j.HelpText,{children:/*#__PURE__*/e(d,{children:[/*#__PURE__*/r("h4",{children:"Why is this necessary?"}),/*#__PURE__*/r("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/r(j.Actions,{children:/*#__PURE__*/r(I,{loading:R||!A,disabled:!M,onClick:async()=>{U(!0);let e=await S.getAccessToken(),r=l(b,B);if(!e||!r||null===M)return z("User must be authenticated and have a Privy wallet before it can be recovered");try{P({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(A?.recover({accessToken:e,entropyId:B,entropyIdVerifier:D,recoveryPassword:M})),H(""),F?N(F):k({shouldCallAuthOnSuccess:!1}),O?.(r),P({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){f(e)?H("Invalid recovery password, please try again."):H("An error has occurred, please try again.")}finally{U(!1)}},$hideAnimations:!B&&R,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let C=/*#__PURE__*/s.div.withConfig({displayName:"Content",componentId:"sc-1247f710-0"})(["display:flex;flex-direction:column;gap:1.5rem;"]),x=/*#__PURE__*/s.div.withConfig({displayName:"ErrorMessage",componentId:"sc-1247f710-1"})(["line-height:20px;height:20px;font-size:13px;color:var(--privy-color-error);text-align:left;margin-top:0.5rem;"]),I=/*#__PURE__*/s(m).withConfig({displayName:"NoAnimationPrimaryButton",componentId:"sc-1247f710-2"})(["",""],(({$hideAnimations:e})=>e&&/*#__PURE__*/a(["&&{transition:none;}"])));export{b as PasswordRecoveryScreen,b as default};
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as t,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as c,h as l}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{P as m}from"./Button-3JMVXKiE.mjs";import{S as d}from"./Layouts-Bmf8DxNP.mjs";import{P as p,a as u,I as h,H as y,S as v}from"./shared-RdgpdEMG.mjs";import{n as f}from"./index-B24hEnAn.mjs";import{u as g,m as w}from"./internal-context-e-Eni5bG.mjs";import{S as j}from"./Screen-Bj-1pwMI.mjs";import"viem";import"./context-BqHnoxK5.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";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"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";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"ofetch";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"./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 b={component:()=>{let[s,a]=t(!0),{authenticated:m,user:b}=n(),{walletProxy:A,closePrivyModal:k,createAnalyticsEvent:P,client:S}=g(),{navigate:N,data:T,onUserCloseViaDialogOrKeybindRef:E}=c(),[M,W]=t(void 0),[_,H]=t(""),[R,U]=t(!1),{entropyId:B,entropyIdVerifier:D,onCompleteNavigateTo:F,onSuccess:O,onFailure:V}=T.recoverWallet,z=(e="User exited before their wallet could be recovered")=>{k({shouldCallAuthOnSuccess:!1}),V("string"==typeof e?new w(e):e)};E.current=z,i((()=>{if(!m)return z("User must be authenticated and have a Privy wallet before it can be recovered")}),[m]);/*#__PURE__*/return e(j,{children:[/*#__PURE__*/r(j.Header,{icon:o,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:z}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(C,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(p,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&W(e)})(e.target.value),disabled:R,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/r(h,{style:{right:"0.75rem"},children:s?/*#__PURE__*/r(y,{onClick:()=>a(!1)}):/*#__PURE__*/r(v,{onClick:()=>a(!0)})})]}),!!_&&/*#__PURE__*/r(x,{children:_})]})})}),/*#__PURE__*/e(j.Footer,{children:[/*#__PURE__*/r(j.HelpText,{children:/*#__PURE__*/e(d,{children:[/*#__PURE__*/r("h4",{children:"Why is this necessary?"}),/*#__PURE__*/r("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/r(j.Actions,{children:/*#__PURE__*/r(I,{loading:R||!A,disabled:!M,onClick:async()=>{U(!0);let e=await S.getAccessToken(),r=l(b,B);if(!e||!r||null===M)return z("User must be authenticated and have a Privy wallet before it can be recovered");try{P({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(A?.recover({accessToken:e,entropyId:B,entropyIdVerifier:D,recoveryPassword:M})),H(""),F?N(F):k({shouldCallAuthOnSuccess:!1}),O?.(r),P({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){f(e)?H("Invalid recovery password, please try again."):H("An error has occurred, please try again.")}finally{U(!1)}},$hideAnimations:!B&&R,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let C=/*#__PURE__*/s.div.withConfig({displayName:"Content",componentId:"sc-1247f710-0"})(["display:flex;flex-direction:column;gap:1.5rem;"]),x=/*#__PURE__*/s.div.withConfig({displayName:"ErrorMessage",componentId:"sc-1247f710-1"})(["line-height:20px;height:20px;font-size:13px;color:var(--privy-color-error);text-align:left;margin-top:0.5rem;"]),I=/*#__PURE__*/s(m).withConfig({displayName:"NoAnimationPrimaryButton",componentId:"sc-1247f710-2"})(["",""],(({$hideAnimations:e})=>e&&/*#__PURE__*/a(["&&{transition:none;}"])));export{b as PasswordRecoveryScreen,b as default};
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import t from"qrcode";import l from"react";import{styled as i}from"styled-components";import{u as n}from"./context-BOoFAPna.mjs";import{a2 as c,a3 as a}from"./useActiveWallet-BdFIc7_K.mjs";const g=()=>/*#__PURE__*/e("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let h=(e,r,o,t,l)=>{for(let i=r;i<r+t;i++)for(let r=o;r<o+l;r++){let o=e?.[r];o&&o[i]&&(o[i]=0)}return e},m=(e,r)=>{let o=t.create(e,{errorCorrectionLevel:r}).modules,l=a(Array.from(o.data),o.size);return l=h(l,0,0,7,7),l=h(l,l.length-7,0,7,7),h(l,0,l.length-7,7,7)},d=({x:r,y:t,cellSize:l,bgColor:i,fgColor:n})=>
1
+ import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import t from"qrcode";import l from"react";import{styled as i}from"styled-components";import{u as n}from"./context-BqHnoxK5.mjs";import{a2 as c,a3 as a}from"./useActiveWallet-CBIiGG1k.mjs";const g=()=>/*#__PURE__*/e("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let h=(e,r,o,t,l)=>{for(let i=r;i<r+t;i++)for(let r=o;r<o+l;r++){let o=e?.[r];o&&o[i]&&(o[i]=0)}return e},m=(e,r)=>{let o=t.create(e,{errorCorrectionLevel:r}).modules,l=a(Array.from(o.data),o.size);return l=h(l,0,0,7,7),l=h(l,l.length-7,0,7,7),h(l,0,l.length-7,7,7)},d=({x:r,y:t,cellSize:l,bgColor:i,fgColor:n})=>
2
2
  /*#__PURE__*/e(o,{children:[0,1,2].map((o=>/*#__PURE__*/e("circle",{r:l*(7-2*o)/2,cx:r+7*l/2,cy:t+7*l/2,fill:o%2!=0?i:n},`finder-${r}-${t}-${o}`)))}),s=({cellSize:r,matrixSize:t,bgColor:l,fgColor:i})=>/*#__PURE__*/e(o,{children:[[0,0],[(t-7)*r,0],[0,(t-7)*r]].map((([o,t])=>/*#__PURE__*/e(d,{x:o,y:t,cellSize:r,bgColor:l,fgColor:i},`finder-${o}-${t}`)))}),p=({matrix:r,cellSize:t,color:i})=>/*#__PURE__*/e(o,{children:r.map(((r,o)=>r.map(((r,n)=>r?/*#__PURE__*/e("rect",{height:t-.4,width:t-.4,x:o*t+.1*t,y:n*t+.1*t,rx:.5*t,ry:.5*t,fill:i},`cell-${o}-${n}`):/*#__PURE__*/e(l.Fragment,{},`circle-${o}-${n}`)))))}),f=({cellSize:t,matrixSize:l,element:i,sizePercentage:n,bgColor:c})=>{if(!i)/*#__PURE__*/return e(o,{});let a=l*(n||.14),g=Math.floor(l/2-a/2),h=Math.floor(l/2+a/2);(h-g)%2!=l%2&&(h+=1);let m=(h-g)*t,d=m-.2*m,s=g*t;/*#__PURE__*/return r(o,{children:[/*#__PURE__*/e("rect",{x:g*t,y:g*t,width:m,height:m,fill:c}),/*#__PURE__*/e(i,{x:s+.1*m,y:s+.1*m,height:d,width:d})]})},u=o=>{let t=o.outputSize,l=m(o.url,o.errorCorrectionLevel),i=t/l.length,n=c(2*i,{min:.025*t,max:.036*t});/*#__PURE__*/return r("svg",{height:o.outputSize,width:o.outputSize,viewBox:`0 0 ${o.outputSize} ${o.outputSize}`,style:{height:"100%",width:"100%",padding:`${n}px`},children:[/*#__PURE__*/e(p,{matrix:l,cellSize:i,color:o.fgColor}),/*#__PURE__*/e(s,{cellSize:i,matrixSize:l.length,fgColor:o.fgColor,bgColor:o.bgColor}),/*#__PURE__*/e(f,{cellSize:i,element:o.logo?.element,bgColor:o.bgColor,matrixSize:l.length})]})},C=/*#__PURE__*/i.div.attrs({className:"ph-no-capture"}).withConfig({displayName:"QrContainer",componentId:"sc-597e27f3-0"})(["display:flex;justify-content:center;align-items:center;height:",";width:",";margin:auto;background-color:",";&&{border-width:2px;border-color:",";border-radius:var(--privy-border-radius-md);}"],(e=>`${e.$size}px`),(e=>`${e.$size}px`),(e=>e.$bgColor),(e=>e.$borderColor));const x=r=>{let{appearance:o}=n(),t=r.bgColor||"#FFFFFF",l=r.fgColor||"#000000",i=r.size||160,c="dark"===o.palette.colorScheme?t:l;/*#__PURE__*/return e(C,{$size:i,$bgColor:t,$fgColor:l,$borderColor:c,children:/*#__PURE__*/e(u,{url:r.url,logo:{element:r.squareLogoElement??g},outputSize:i,bgColor:t,fgColor:l,errorCorrectionLevel:r.errorCorrectionLevel||"Q"})})};export{x as Q};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useState as o,useEffect as a,useCallback as i}from"react";import{P as c}from"./Button-CrJpeX0e.mjs";import{M as l,B as s}from"./ModalHeader-YP9pLMEP.mjs";import{C as n}from"./ScreenHeader-Biz1wq02.mjs";import{q as d}from"./context-BOoFAPna.mjs";import{o as p,q as u,r as m,R as h,l as v}from"./index-CUao1WyN.mjs";import{a as w,f as y,b as f,u as _}from"./internal-context-e-Eni5bG.mjs";import{a as A,u as E,g}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{a8 as C,a9 as b,aa as R}from"./paths-3HW55qZg.mjs";import{g as k}from"./useWallets-3r4yfFNg.mjs";import{a as T}from"./events-context-CI0iqAXA.mjs";import{u as O}from"./use-create-wallet-without-fallback-4kJuPNnl.mjs";import{A as N,G as S,R as I}from"./styles-BxA7nKxI.mjs";import"styled-components";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.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"tinycolor2";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./usePrivy-CeQ3C1KS.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";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";async function M({url:e,popup:t,provider:r}){return t.location=e,new Promise(((e,r)=>{function o(){t?.close(),window.removeEventListener("message",a)}function a(t){t.data&&("PRIVY_OAUTH_RESPONSE"===t.data.type&&t.data.stateCode&&t.data.authorizationCode&&(e(t.data),o()),"https://cdn.apple-cloudkit.com"===t.origin&&t.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:t.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===t.data.type&&(r(t.data.error),o()))}window.addEventListener("message",a)}))}async function j({api:e,provider:t,stateCode:r,codeVerifier:o,authorizationCode:a}){if(!a||!r)throw new w("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new w("User denied confirmation during OAuth flow");try{return(await e.post(C,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=y(e);if(t.privyErrorCode)throw new w(t.message||"Invalid code during OAuth flow.",void 0,t.privyErrorCode);if("User denied confirmation during OAuth flow"===t.message)throw new w("Invalid code during oauth flow.",void 0,f.OAUTH_USER_DENIED);throw new w("Invalid code during OAuth flow.",void 0,f.UNKNOWN_AUTH_ERROR)}}async function x({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(b,{client_type:"web"})).url}:{url:(await e.post(R,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw y(e)}}let U={"google-drive":{name:"Google Drive",component:S},icloud:{name:"iCloud",component:N}};const W={component:()=>{let{logout:p}=E(),{navigate:u,setModalData:m,data:y}=A(),{closePrivyModal:C,createAnalyticsEvent:b}=_(),{execute:R}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=_(),{data:o}=A(),{user:a}=E(),i=T(),{create:c}=O();return{execute:async({provider:l,action:s,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new w("Missing client");function h(t){if(!t&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:l}}),new w("Recovery OAuth failed")}switch(l){case"google-drive":{let t,r,{url:o,codeVerifier:a,stateCode:i}=await x({api:e.api,provider:l});h(o);try{let a=await M({url:o,popup:n,provider:l});if(t=a.stateCode,r=a.authorizationCode,t!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:l,storedStateCode:i??"",returnedStateCode:t??""}}),new w("Unexpected auth flow. This may be a phishing attempt.",void 0,f.OAUTH_UNEXPECTED)}catch(t){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:t.toString(),provider:l}}),new w("Recovery OAuth failed")}[u,m]=await Promise.all([e.getAccessToken(),j({api:e.api,provider:l,codeVerifier:a,stateCode:t,authorizationCode:r})]);break}case"icloud":{let{url:t}=await x({api:e.api,provider:l});h(t);let{ckWebAuthToken:r}=await M({url:t,popup:n,provider:l});m=r,u=await e.getAccessToken()}}if(!t)throw new w("Cannot connect to wallet proxy");if(!u)throw new w("Unable to authorize user");switch(s){case"recover":{let r=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!r||!a)throw new w("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r,recoveryMethod:l}}),await t.recover({accessToken:u,entropyId:r,entropyIdVerifier:a,recoveryAccessToken:m}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r,recoveryMethod:l}});break}case"create-wallet":{let t;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),d&&p)t=await c({recoveryMethod:l,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a}),t=await c({chainType:"solana",walletIndex:0,latestUser:t.user});else if(p)t=await c({recoveryMethod:l,recoveryAccessToken:m,chainType:"solana",walletIndex:0,latestUser:a});else{if(!d)throw Error("Invalid args to create wallet");t=await c({recoveryMethod:l,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!t)throw i("createWallet","onError",f.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:t.account.address}}),i("createWallet","onSuccess",{wallet:t.account});break}case"set-recovery":{let o=g(a);if(!o)throw i("setWalletRecovery","onError",f.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:l}});let{entropyId:c,entropyIdVerifier:s}=k(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:s,recoveryMethod:l,recoveryAccessToken:m});let n=g(await r());if(!n)throw i("createWallet","onError",f.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:l}}),i("setWalletRecovery","onSuccess",{method:l,wallet:n});break}default:throw new w("Unsupported recovery action")}}}})(),[N,S]=o(!1),{provider:W,action:D,isInAccountCreateFlow:P,shouldCreateEth:V,shouldCreateSol:L}=y?.recoveryOAuthStatus,[z,H]=o(void 0),[$,B]=o("create-wallet"===D);if("user-passcode"===W)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let F=U[W].name,G=U[W].component,K=y?.recoverWallet?.onCompleteNavigateTo,Y=new h((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await R({provider:W,action:e,popup:r,shouldCreateEth:V,shouldCreateSol:L}),S(!0),t()}catch(t){H({message:`${"recover"===e?"Recovery":"Back up"} with ${F} unsuccessful`,detail:"recover"===D?`Please verify that you are selecting the ${F} account associated with your backup.`:"",retryable:!0}),r()}}),0)})))));a((()=>{"recover"!==D&&Y.execute(P?"create-wallet":"set-recovery")}),[]),a((()=>{if(!N)return;let e=setTimeout((()=>{P?(m({createWallet:{onSuccess:()=>{},onFailure:e=>{b({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):C({shouldCallAuthOnSuccess:!1})}),d);return()=>clearTimeout(e)}),[N]);let q=i((async()=>{await Y.execute("recover"),K?u(K):S(!0)}),[]),X="google-drive"===W?"Google Drive":"Apple iCloud",Q=N&&`Successfully ${"recover"===D?"recovered":"backed up"} with ${X}.`||z&&z.message||`${"recover"===D?"Recovering":"Backing up"} with ${X}...`,J=z?z.detail:"";/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(l,{}),$?/*#__PURE__*/r(t,{children:/*#__PURE__*/e(I,{children:[/*#__PURE__*/r(n,{title:Q,icon:/*#__PURE__*/r(G,{style:{width:"38px",height:"38px"}}),description:J}),z&&z?.retryable?/*#__PURE__*/r(c,{onClick:()=>{v(),H(void 0),"create-wallet"===D?Y.execute("create-wallet"):q()},disabled:!N&&!z?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e(I,{children:[/*#__PURE__*/r(n,{title:"Confirm it's really you",icon:/*#__PURE__*/r(G,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${X} where your account is backed up.`}),/*#__PURE__*/e(c,{onClick:q,children:["Confirm with ",X]})]}),/*#__PURE__*/r(s,{})]})}};export{W as RecoveryOAuthScreen,W as default};
1
+ import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useState as o,useEffect as a,useCallback as i}from"react";import{P as c}from"./Button-3JMVXKiE.mjs";import{M as l,B as s}from"./ModalHeader-B27O6soE.mjs";import{C as n}from"./ScreenHeader-Biz1wq02.mjs";import{q as d}from"./context-BqHnoxK5.mjs";import{o as p,q as u,r as m,R as h,l as v}from"./index-B24hEnAn.mjs";import{a as w,f as y,b as f,u as _}from"./internal-context-e-Eni5bG.mjs";import{a as A,u as E,g}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{a8 as C,a9 as b,aa as R}from"./paths-3HW55qZg.mjs";import{g as k}from"./useWallets-Aw21dxK9.mjs";import{a as T}from"./events-context-CI0iqAXA.mjs";import{u as O}from"./use-create-wallet-without-fallback-DCFiaOUd.mjs";import{A as N,G as S,R as I}from"./styles-BxA7nKxI.mjs";import"styled-components";import"./useActiveWallet-CBIiGG1k.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-lYYA8ZfI.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.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"tinycolor2";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./usePrivy-C5z76Qhs.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";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";async function M({url:e,popup:t,provider:r}){return t.location=e,new Promise(((e,r)=>{function o(){t?.close(),window.removeEventListener("message",a)}function a(t){t.data&&("PRIVY_OAUTH_RESPONSE"===t.data.type&&t.data.stateCode&&t.data.authorizationCode&&(e(t.data),o()),"https://cdn.apple-cloudkit.com"===t.origin&&t.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:t.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===t.data.type&&(r(t.data.error),o()))}window.addEventListener("message",a)}))}async function j({api:e,provider:t,stateCode:r,codeVerifier:o,authorizationCode:a}){if(!a||!r)throw new w("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new w("User denied confirmation during OAuth flow");try{return(await e.post(C,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=y(e);if(t.privyErrorCode)throw new w(t.message||"Invalid code during OAuth flow.",void 0,t.privyErrorCode);if("User denied confirmation during OAuth flow"===t.message)throw new w("Invalid code during oauth flow.",void 0,f.OAUTH_USER_DENIED);throw new w("Invalid code during OAuth flow.",void 0,f.UNKNOWN_AUTH_ERROR)}}async function x({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(b,{client_type:"web"})).url}:{url:(await e.post(R,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw y(e)}}let U={"google-drive":{name:"Google Drive",component:S},icloud:{name:"iCloud",component:N}};const W={component:()=>{let{logout:p}=E(),{navigate:u,setModalData:m,data:y}=A(),{closePrivyModal:C,createAnalyticsEvent:b}=_(),{execute:R}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=_(),{data:o}=A(),{user:a}=E(),i=T(),{create:c}=O();return{execute:async({provider:l,action:s,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new w("Missing client");function h(t){if(!t&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:l}}),new w("Recovery OAuth failed")}switch(l){case"google-drive":{let t,r,{url:o,codeVerifier:a,stateCode:i}=await x({api:e.api,provider:l});h(o);try{let a=await M({url:o,popup:n,provider:l});if(t=a.stateCode,r=a.authorizationCode,t!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:l,storedStateCode:i??"",returnedStateCode:t??""}}),new w("Unexpected auth flow. This may be a phishing attempt.",void 0,f.OAUTH_UNEXPECTED)}catch(t){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:t.toString(),provider:l}}),new w("Recovery OAuth failed")}[u,m]=await Promise.all([e.getAccessToken(),j({api:e.api,provider:l,codeVerifier:a,stateCode:t,authorizationCode:r})]);break}case"icloud":{let{url:t}=await x({api:e.api,provider:l});h(t);let{ckWebAuthToken:r}=await M({url:t,popup:n,provider:l});m=r,u=await e.getAccessToken()}}if(!t)throw new w("Cannot connect to wallet proxy");if(!u)throw new w("Unable to authorize user");switch(s){case"recover":{let r=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!r||!a)throw new w("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r,recoveryMethod:l}}),await t.recover({accessToken:u,entropyId:r,entropyIdVerifier:a,recoveryAccessToken:m}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r,recoveryMethod:l}});break}case"create-wallet":{let t;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),d&&p)t=await c({recoveryMethod:l,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a}),t=await c({chainType:"solana",walletIndex:0,latestUser:t.user});else if(p)t=await c({recoveryMethod:l,recoveryAccessToken:m,chainType:"solana",walletIndex:0,latestUser:a});else{if(!d)throw Error("Invalid args to create wallet");t=await c({recoveryMethod:l,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!t)throw i("createWallet","onError",f.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:t.account.address}}),i("createWallet","onSuccess",{wallet:t.account});break}case"set-recovery":{let o=g(a);if(!o)throw i("setWalletRecovery","onError",f.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:l}});let{entropyId:c,entropyIdVerifier:s}=k(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:s,recoveryMethod:l,recoveryAccessToken:m});let n=g(await r());if(!n)throw i("createWallet","onError",f.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:l}}),i("setWalletRecovery","onSuccess",{method:l,wallet:n});break}default:throw new w("Unsupported recovery action")}}}})(),[N,S]=o(!1),{provider:W,action:D,isInAccountCreateFlow:P,shouldCreateEth:V,shouldCreateSol:L}=y?.recoveryOAuthStatus,[z,H]=o(void 0),[$,B]=o("create-wallet"===D);if("user-passcode"===W)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let F=U[W].name,G=U[W].component,K=y?.recoverWallet?.onCompleteNavigateTo,Y=new h((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await R({provider:W,action:e,popup:r,shouldCreateEth:V,shouldCreateSol:L}),S(!0),t()}catch(t){H({message:`${"recover"===e?"Recovery":"Back up"} with ${F} unsuccessful`,detail:"recover"===D?`Please verify that you are selecting the ${F} account associated with your backup.`:"",retryable:!0}),r()}}),0)})))));a((()=>{"recover"!==D&&Y.execute(P?"create-wallet":"set-recovery")}),[]),a((()=>{if(!N)return;let e=setTimeout((()=>{P?(m({createWallet:{onSuccess:()=>{},onFailure:e=>{b({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):C({shouldCallAuthOnSuccess:!1})}),d);return()=>clearTimeout(e)}),[N]);let q=i((async()=>{await Y.execute("recover"),K?u(K):S(!0)}),[]),X="google-drive"===W?"Google Drive":"Apple iCloud",Q=N&&`Successfully ${"recover"===D?"recovered":"backed up"} with ${X}.`||z&&z.message||`${"recover"===D?"Recovering":"Backing up"} with ${X}...`,J=z?z.detail:"";/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(l,{}),$?/*#__PURE__*/r(t,{children:/*#__PURE__*/e(I,{children:[/*#__PURE__*/r(n,{title:Q,icon:/*#__PURE__*/r(G,{style:{width:"38px",height:"38px"}}),description:J}),z&&z?.retryable?/*#__PURE__*/r(c,{onClick:()=>{v(),H(void 0),"create-wallet"===D?Y.execute("create-wallet"):q()},disabled:!N&&!z?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e(I,{children:[/*#__PURE__*/r(n,{title:"Confirm it's really you",icon:/*#__PURE__*/r(G,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${X} where your account is backed up.`}),/*#__PURE__*/e(c,{onClick:q,children:["Confirm with ",X]})]}),/*#__PURE__*/r(s,{})]})}};export{W as RecoveryOAuthScreen,W as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{u as r}from"./context-BOoFAPna.mjs";import{R as i}from"./index-CUao1WyN.mjs";import{u as s,m as a}from"./internal-context-e-Eni5bG.mjs";import{u as n}from"./use-create-wallet-without-fallback-4kJuPNnl.mjs";import{a as c,u as l}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-DMOSI5Cu.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-CzDMa8gy.mjs";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"ofetch";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"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-Bmf8DxNP.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"./shared-C_3e8pDa.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Button-CrJpeX0e.mjs";import"./Checkbox-NmGCZeKL.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-Biz1wq02.mjs";const u={component:()=>{let{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=t(""),[j,f]=t(!1),[g,C]=t(),[I,b]=t(null),{create:x}=n(),{authenticated:S,user:P}=l(),{closePrivyModal:A,isNewUserThisSession:k,initializeWalletProxy:M}=s(),{onSuccess:T,onFailure:U,callAuthOnSuccessOnClose:E,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=t(null),R=new i((async()=>{try{let e;if(O&&W)e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"ethereum",walletIndex:0,latestUser:P}),e=await x({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"solana",walletIndex:0,latestUser:P});else{if(!O)throw Error("Invalid args to create wallet");e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"ethereum",walletIndex:0,latestUser:P})}L(e),k?u("EmbeddedWalletCreatedScreen"):(T(e),A({shouldCallAuthOnSuccess:E}))}catch(e){v(e.message)}}));o((()=>{I||M(3e4).then((e=>b(e)))}),[I]),o((()=>{if(!S||!P)return u("LandingScreen"),void U(Error("User must be authenticated before creating a Privy wallet"))}),[S]),h.current=()=>null;/*#__PURE__*/return e(m,{config:{initiatedBy:"automatic"},appName:w?.name||"privy",loading:!I,buttonLoading:j,buttonHideAnimations:!D&&j,isResettingPassword:!1,error:y,password:g||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(U(new a("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(T(D),A({shouldCallAuthOnSuccess:E})):(U(new a("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:C,onPasswordGenerate:()=>C(p()),onSubmit:async()=>(f(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>f(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{u as r}from"./context-BqHnoxK5.mjs";import{R as i}from"./index-B24hEnAn.mjs";import{u as s,m as a}from"./internal-context-e-Eni5bG.mjs";import{u as n}from"./use-create-wallet-without-fallback-DCFiaOUd.mjs";import{a as c,u as l}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-D9WKtYos.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CBIiGG1k.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-lYYA8ZfI.mjs";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"ofetch";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"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-Bmf8DxNP.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"./shared-RdgpdEMG.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Button-3JMVXKiE.mjs";import"./Checkbox-NmGCZeKL.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-Biz1wq02.mjs";const u={component:()=>{let{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=t(""),[j,f]=t(!1),[g,C]=t(),[I,b]=t(null),{create:x}=n(),{authenticated:S,user:P}=l(),{closePrivyModal:A,isNewUserThisSession:k,initializeWalletProxy:M}=s(),{onSuccess:T,onFailure:U,callAuthOnSuccessOnClose:E,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=t(null),R=new i((async()=>{try{let e;if(O&&W)e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"ethereum",walletIndex:0,latestUser:P}),e=await x({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"solana",walletIndex:0,latestUser:P});else{if(!O)throw Error("Invalid args to create wallet");e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"ethereum",walletIndex:0,latestUser:P})}L(e),k?u("EmbeddedWalletCreatedScreen"):(T(e),A({shouldCallAuthOnSuccess:E}))}catch(e){v(e.message)}}));o((()=>{I||M(3e4).then((e=>b(e)))}),[I]),o((()=>{if(!S||!P)return u("LandingScreen"),void U(Error("User must be authenticated before creating a Privy wallet"))}),[S]),h.current=()=>null;/*#__PURE__*/return e(m,{config:{initiatedBy:"automatic"},appName:w?.name||"privy",loading:!I,buttonLoading:j,buttonHideAnimations:!D&&j,isResettingPassword:!1,error:y,password:g||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(U(new a("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(T(D),A({shouldCallAuthOnSuccess:E})):(U(new a("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:C,onPasswordGenerate:()=>C(p()),onSubmit:async()=>(f(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>f(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/LockClosedIcon";import i from"@heroicons/react/24/outline/PencilSquareIcon";import s from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import{useState as c}from"react";import{styled as n}from"styled-components";import{a,u as l,g as p}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{P as d}from"./Button-CrJpeX0e.mjs";import{M as m,B as u}from"./ModalHeader-YP9pLMEP.mjs";import{C as h}from"./ScreenHeader-Biz1wq02.mjs";import{u as v}from"./context-BOoFAPna.mjs";import{u as y}from"./internal-context-e-Eni5bG.mjs";import{v as g}from"./index-CUao1WyN.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BxA7nKxI.mjs";import{U as k}from"./useActiveWallet-BdFIc7_K.mjs";import"viem";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useWallets-3r4yfFNg.mjs";import"./prepareFundingModalData-CzDMa8gy.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CeQ3C1KS.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-A9RSftUZ.mjs";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";let S=/*#__PURE__*/n.div.withConfig({displayName:"IconContainer",componentId:"sc-1c4e63fb-0"})(["width:24px;height:24px;display:flex;justify-content:center;align-items:center;"]),b={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},A=({onClose:t})=>/*#__PURE__*/e(j,{children:[/*#__PURE__*/o(h,{title:"Why do I need to secure my account?",icon:/*#__PURE__*/o(s,{width:48}),description:/*#__PURE__*/e(r,{children:[/*#__PURE__*/o("p",{children:"Your app uses cryptography to secure your account. App secrets are split and encrypted so only you can access them."}),/*#__PURE__*/o("p",{children:"To use this app on new devices, secure account secrets using a password, your Google or your Apple account. It’s important you don’t lose access to the method you choose."})]})}),/*#__PURE__*/o(d,{onClick:t,children:"Select backup method"})]});const I={component:()=>{let[s,n]=c(!1),{navigate:d,lastScreen:j,navigateBack:I,setModalData:x,data:M,onUserCloseViaDialogOrKeybindRef:P}=a(),{user:O}=l(),{embeddedWallets:W}=v(),{closePrivyModal:R}=y(),F=p(O),B=null===F,{isInAccountCreateFlow:D,isResettingPassword:E,shouldCreateEth:G,shouldCreateSol:U}=M.recoverySelection,H=F&&"privy"!==F.recoveryMethod,L=H?/*#__PURE__*/e("span",{children:["Your account is currently secured using"," ",/*#__PURE__*/o("strong",{children:b[F?.recoveryMethod||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function Y(e){x({recoveryOAuthStatus:{provider:e,action:B?"create-wallet":"set-recovery",isInAccountCreateFlow:D,shouldCreateEth:G,shouldCreateSol:U}}),d("RecoveryOAuthScreen")}function q(){M?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),R({shouldCallAuthOnSuccess:M?.setWalletPassword?.callAuthOnSuccessOnClose??!1})}return P.current=q,/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{onClose:q,backFn:s?()=>n(!1):j?I:void 0,infoFn:j||s?void 0:()=>n(!0)},"header"),s?/*#__PURE__*/o(A,{onClose:()=>n(!1)}):/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(h,{title:H?"Update backup method":"Secure your account",icon:/*#__PURE__*/o(t,{width:48}),description:L}),/*#__PURE__*/o(f,{children:W.userOwnedRecoveryOptions.filter((e=>!["icloud","google-drive"].includes(F?.recoveryMethod||"")||e!==F?.recoveryMethod)).sort().map((r=>{switch(r){case"google-drive":/*#__PURE__*/return e(k,{onClick:()=>Y("google-drive"),children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(C,{style:{width:18}})}),"Back up to Google Drive"]},r);case"icloud":/*#__PURE__*/return e(k,{onClick:()=>Y("icloud"),children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(w,{style:{width:24}})}),"Back up to Apple iCloud"]},r);case"user-passcode":/*#__PURE__*/return e(k,{onClick:()=>{d(g({isCreatingWallet:B,skipSplashScreen:!0}))},children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(i,{style:{width:18}})}),E?"Reset your":"Set a"," password"]},r);default:return null}}))})]}),/*#__PURE__*/o(u,{})]})}};export{I as RecoverySelectionScreen,I as default};
1
+ import{jsxs as e,jsx as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/LockClosedIcon";import i from"@heroicons/react/24/outline/PencilSquareIcon";import s from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import{useState as c}from"react";import{styled as n}from"styled-components";import{a,u as l,g as p}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{P as d}from"./Button-3JMVXKiE.mjs";import{M as m,B as u}from"./ModalHeader-B27O6soE.mjs";import{C as h}from"./ScreenHeader-Biz1wq02.mjs";import{u as v}from"./context-BqHnoxK5.mjs";import{u as y}from"./internal-context-e-Eni5bG.mjs";import{v as g}from"./index-B24hEnAn.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BxA7nKxI.mjs";import{U as k}from"./useActiveWallet-CBIiGG1k.mjs";import"viem";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useWallets-Aw21dxK9.mjs";import"./prepareFundingModalData-lYYA8ZfI.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C5z76Qhs.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-A9RSftUZ.mjs";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";let S=/*#__PURE__*/n.div.withConfig({displayName:"IconContainer",componentId:"sc-1c4e63fb-0"})(["width:24px;height:24px;display:flex;justify-content:center;align-items:center;"]),b={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},A=({onClose:t})=>/*#__PURE__*/e(j,{children:[/*#__PURE__*/o(h,{title:"Why do I need to secure my account?",icon:/*#__PURE__*/o(s,{width:48}),description:/*#__PURE__*/e(r,{children:[/*#__PURE__*/o("p",{children:"Your app uses cryptography to secure your account. App secrets are split and encrypted so only you can access them."}),/*#__PURE__*/o("p",{children:"To use this app on new devices, secure account secrets using a password, your Google or your Apple account. It’s important you don’t lose access to the method you choose."})]})}),/*#__PURE__*/o(d,{onClick:t,children:"Select backup method"})]});const I={component:()=>{let[s,n]=c(!1),{navigate:d,lastScreen:j,navigateBack:I,setModalData:x,data:M,onUserCloseViaDialogOrKeybindRef:P}=a(),{user:O}=l(),{embeddedWallets:W}=v(),{closePrivyModal:R}=y(),F=p(O),B=null===F,{isInAccountCreateFlow:D,isResettingPassword:E,shouldCreateEth:G,shouldCreateSol:U}=M.recoverySelection,H=F&&"privy"!==F.recoveryMethod,L=H?/*#__PURE__*/e("span",{children:["Your account is currently secured using"," ",/*#__PURE__*/o("strong",{children:b[F?.recoveryMethod||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function Y(e){x({recoveryOAuthStatus:{provider:e,action:B?"create-wallet":"set-recovery",isInAccountCreateFlow:D,shouldCreateEth:G,shouldCreateSol:U}}),d("RecoveryOAuthScreen")}function q(){M?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),R({shouldCallAuthOnSuccess:M?.setWalletPassword?.callAuthOnSuccessOnClose??!1})}return P.current=q,/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{onClose:q,backFn:s?()=>n(!1):j?I:void 0,infoFn:j||s?void 0:()=>n(!0)},"header"),s?/*#__PURE__*/o(A,{onClose:()=>n(!1)}):/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(h,{title:H?"Update backup method":"Secure your account",icon:/*#__PURE__*/o(t,{width:48}),description:L}),/*#__PURE__*/o(f,{children:W.userOwnedRecoveryOptions.filter((e=>!["icloud","google-drive"].includes(F?.recoveryMethod||"")||e!==F?.recoveryMethod)).sort().map((r=>{switch(r){case"google-drive":/*#__PURE__*/return e(k,{onClick:()=>Y("google-drive"),children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(C,{style:{width:18}})}),"Back up to Google Drive"]},r);case"icloud":/*#__PURE__*/return e(k,{onClick:()=>Y("icloud"),children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(w,{style:{width:24}})}),"Back up to Apple iCloud"]},r);case"user-passcode":/*#__PURE__*/return e(k,{onClick:()=>{d(g({isCreatingWallet:B,skipSplashScreen:!0}))},children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(i,{style:{width:18}})}),E?"Reset your":"Set a"," password"]},r);default:return null}}))})]}),/*#__PURE__*/o(u,{})]})}};export{I as RecoverySelectionScreen,I as default};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{a4 as n}from"./useActiveWallet-BdFIc7_K.mjs";import{M as a,B as t}from"./ModalHeader-YP9pLMEP.mjs";import{N as c}from"./index-CJMgUOnw.mjs";const l=/*#__PURE__*/o.div.withConfig({displayName:"ScreenRoot",componentId:"sc-2e815abe-0"})(["--screen-space:16px;--screen-space-lg:calc(var(--screen-space) * 1.5);position:relative;overflow:hidden;margin:0 calc(-1 * var(--screen-space));height:100%;border-radius:var(--privy-border-radius-lg);"]),d=/*#__PURE__*/o.div.withConfig({displayName:"ScreenRootInner",componentId:"sc-2e815abe-1"})(["display:flex;flex-direction:column;gap:calc(var(--screen-space) * 1.5);width:100%;background:var(--privy-color-background);padding:0 var(--screen-space-lg) var(--screen-space);height:100%;border-radius:var(--privy-border-radius-lg);"]),s=/*#__PURE__*/o.div.withConfig({displayName:"HeaderContainer",componentId:"sc-2e815abe-2"})(["position:relative;display:flex;flex-direction:column;"]),p=/*#__PURE__*/o(a).withConfig({displayName:"StyledModalHeader",componentId:"sc-2e815abe-3"})(["margin:0 -8px;"]),g=/*#__PURE__*/o.div.withConfig({displayName:"BodyContainer",componentId:"sc-2e815abe-4"})(["flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:3px;margin:-3px;&::-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;"],(({$colorScheme:e})=>"light"===e?"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?"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)),h=/*#__PURE__*/o.div.withConfig({displayName:"FooterContainer",componentId:"sc-2e815abe-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]);let m=/*#__PURE__*/o.div.withConfig({displayName:"CenteredHeader",componentId:"sc-2e815abe-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),v=/*#__PURE__*/o.div.withConfig({displayName:"TitleContainer",componentId:"sc-2e815abe-7"})(["display:flex;flex-direction:column;gap:4px;"]),u=/*#__PURE__*/o.h3.withConfig({displayName:"HeaderTitle",componentId:"sc-2e815abe-8"})(["&&{font-size:20px;line-height:32px;font-weight:500;color:var(--privy-color-foreground);margin:0;}"]),f=/*#__PURE__*/o.p.withConfig({displayName:"HeaderSubtitle",componentId:"sc-2e815abe-9"})(["&&{margin:0;font-size:16px;font-weight:300;line-height:24px;color:var(--privy-color-foreground);}"]),y=/*#__PURE__*/o.div.withConfig({displayName:"IconContainer",componentId:"sc-2e815abe-10"})(["background:",";border-radius:50%;width:64px;height:64px;display:flex;align-items:center;justify-content:center;"],(({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}})),b=/*#__PURE__*/o.div.withConfig({displayName:"LogoContainer",componentId:"sc-2e815abe-11"})(["display:flex;align-items:center;justify-content:center;margin-bottom:var(--screen-space);img,svg{max-height:90px;max-width:180px;}"]),x=/*#__PURE__*/o.div.withConfig({displayName:"LoadingWithIconContainer",componentId:"sc-2e815abe-12"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > :first-child{position:relative;}> div > :last-child{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}"]);const w=({children:r,...i})=>/*#__PURE__*/e(l,{children:/*#__PURE__*/e(d,{...i,children:r})});let C=/*#__PURE__*/o.div.withConfig({displayName:"ProgressBarContainer",componentId:"sc-2e815abe-13"})(["position:absolute;top:0;left:calc(-1 * var(--screen-space-lg));width:calc(100% + calc(var(--screen-space-lg) * 2));height:4px;background:var(--privy-color-background-2);border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;"]),k=/*#__PURE__*/o(t).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-2e815abe-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),I=/*#__PURE__*/o.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-2e815abe-15"})(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],(({pct:e})=>e)),N=({step:r})=>r?/*#__PURE__*/e(C,{children:/*#__PURE__*/e(I,{pct:Math.min(100,r.current/r.total*100)})}):null;w.Header=({title:i,subtitle:o,icon:n,iconVariant:a,iconLoadingStatus:t,showBack:c,onBack:l,showInfo:d,onInfo:g,showClose:h,onClose:y,step:b,...x})=>/*#__PURE__*/r(s,{...x,children:[/*#__PURE__*/e(p,{backFn:c?l:void 0,infoFn:d?g:void 0,onClose:h?y:void 0,closeable:h}),(n||a||i||o)&&/*#__PURE__*/r(m,{children:[n||a?/*#__PURE__*/e(w.Icon,{icon:n,variant:a,loadingStatus:t}):null,/*#__PURE__*/r(v,{children:[i&&/*#__PURE__*/e(u,{children:i}),o&&/*#__PURE__*/e(f,{children:o})]})]}),b&&/*#__PURE__*/e(N,{step:b})]}),(w.Body=/*#__PURE__*/i.forwardRef((({children:r,...i},o)=>/*#__PURE__*/e(g,{ref:o,...i,children:r})))).displayName="Screen.Body",w.Footer=({children:r,...i})=>/*#__PURE__*/e(h,{id:"privy-content-footer-container",...i,children:r}),w.Actions=({children:r,...i})=>/*#__PURE__*/e(E,{...i,children:r}),w.HelpText=({children:r,...i})=>/*#__PURE__*/e(S,{...i,children:r}),w.Watermark=()=>/*#__PURE__*/e(k,{}),w.Icon=({icon:o,variant:a="subtle",loadingStatus:t})=>"logo"===a&&o?/*#__PURE__*/e(b,"string"==typeof o?{children:/*#__PURE__*/e("img",{src:o,alt:""})}:/*#__PURE__*/i.isValidElement(o)?{children:o}:{children:/*#__PURE__*/i.createElement(o)}):"loading"===a?o?
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{a4 as n}from"./useActiveWallet-CBIiGG1k.mjs";import{M as a,B as t}from"./ModalHeader-B27O6soE.mjs";import{N as c}from"./index-CJMgUOnw.mjs";const l=/*#__PURE__*/o.div.withConfig({displayName:"ScreenRoot",componentId:"sc-2e815abe-0"})(["--screen-space:16px;--screen-space-lg:calc(var(--screen-space) * 1.5);position:relative;overflow:hidden;margin:0 calc(-1 * var(--screen-space));height:100%;border-radius:var(--privy-border-radius-lg);"]),d=/*#__PURE__*/o.div.withConfig({displayName:"ScreenRootInner",componentId:"sc-2e815abe-1"})(["display:flex;flex-direction:column;gap:calc(var(--screen-space) * 1.5);width:100%;background:var(--privy-color-background);padding:0 var(--screen-space-lg) var(--screen-space);height:100%;border-radius:var(--privy-border-radius-lg);"]),s=/*#__PURE__*/o.div.withConfig({displayName:"HeaderContainer",componentId:"sc-2e815abe-2"})(["position:relative;display:flex;flex-direction:column;"]),p=/*#__PURE__*/o(a).withConfig({displayName:"StyledModalHeader",componentId:"sc-2e815abe-3"})(["margin:0 -8px;"]),g=/*#__PURE__*/o.div.withConfig({displayName:"BodyContainer",componentId:"sc-2e815abe-4"})(["flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:3px;margin:-3px;&::-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;"],(({$colorScheme:e})=>"light"===e?"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?"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)),h=/*#__PURE__*/o.div.withConfig({displayName:"FooterContainer",componentId:"sc-2e815abe-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]);let m=/*#__PURE__*/o.div.withConfig({displayName:"CenteredHeader",componentId:"sc-2e815abe-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),v=/*#__PURE__*/o.div.withConfig({displayName:"TitleContainer",componentId:"sc-2e815abe-7"})(["display:flex;flex-direction:column;gap:4px;"]),u=/*#__PURE__*/o.h3.withConfig({displayName:"HeaderTitle",componentId:"sc-2e815abe-8"})(["&&{font-size:20px;line-height:32px;font-weight:500;color:var(--privy-color-foreground);margin:0;}"]),f=/*#__PURE__*/o.p.withConfig({displayName:"HeaderSubtitle",componentId:"sc-2e815abe-9"})(["&&{margin:0;font-size:16px;font-weight:300;line-height:24px;color:var(--privy-color-foreground);}"]),y=/*#__PURE__*/o.div.withConfig({displayName:"IconContainer",componentId:"sc-2e815abe-10"})(["background:",";border-radius:50%;width:64px;height:64px;display:flex;align-items:center;justify-content:center;"],(({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}})),b=/*#__PURE__*/o.div.withConfig({displayName:"LogoContainer",componentId:"sc-2e815abe-11"})(["display:flex;align-items:center;justify-content:center;margin-bottom:var(--screen-space);img,svg{max-height:90px;max-width:180px;}"]),x=/*#__PURE__*/o.div.withConfig({displayName:"LoadingWithIconContainer",componentId:"sc-2e815abe-12"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > :first-child{position:relative;}> div > :last-child{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}"]);const w=({children:r,...i})=>/*#__PURE__*/e(l,{children:/*#__PURE__*/e(d,{...i,children:r})});let C=/*#__PURE__*/o.div.withConfig({displayName:"ProgressBarContainer",componentId:"sc-2e815abe-13"})(["position:absolute;top:0;left:calc(-1 * var(--screen-space-lg));width:calc(100% + calc(var(--screen-space-lg) * 2));height:4px;background:var(--privy-color-background-2);border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;"]),k=/*#__PURE__*/o(t).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-2e815abe-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),I=/*#__PURE__*/o.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-2e815abe-15"})(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],(({pct:e})=>e)),N=({step:r})=>r?/*#__PURE__*/e(C,{children:/*#__PURE__*/e(I,{pct:Math.min(100,r.current/r.total*100)})}):null;w.Header=({title:i,subtitle:o,icon:n,iconVariant:a,iconLoadingStatus:t,showBack:c,onBack:l,showInfo:d,onInfo:g,showClose:h,onClose:y,step:b,...x})=>/*#__PURE__*/r(s,{...x,children:[/*#__PURE__*/e(p,{backFn:c?l:void 0,infoFn:d?g:void 0,onClose:h?y:void 0,closeable:h}),(n||a||i||o)&&/*#__PURE__*/r(m,{children:[n||a?/*#__PURE__*/e(w.Icon,{icon:n,variant:a,loadingStatus:t}):null,/*#__PURE__*/r(v,{children:[i&&/*#__PURE__*/e(u,{children:i}),o&&/*#__PURE__*/e(f,{children:o})]})]}),b&&/*#__PURE__*/e(N,{step:b})]}),(w.Body=/*#__PURE__*/i.forwardRef((({children:r,...i},o)=>/*#__PURE__*/e(g,{ref:o,...i,children:r})))).displayName="Screen.Body",w.Footer=({children:r,...i})=>/*#__PURE__*/e(h,{id:"privy-content-footer-container",...i,children:r}),w.Actions=({children:r,...i})=>/*#__PURE__*/e(E,{...i,children:r}),w.HelpText=({children:r,...i})=>/*#__PURE__*/e(S,{...i,children:r}),w.Watermark=()=>/*#__PURE__*/e(k,{}),w.Icon=({icon:o,variant:a="subtle",loadingStatus:t})=>"logo"===a&&o?/*#__PURE__*/e(b,"string"==typeof o?{children:/*#__PURE__*/e("img",{src:o,alt:""})}:/*#__PURE__*/i.isValidElement(o)?{children:o}:{children:/*#__PURE__*/i.createElement(o)}):"loading"===a?o?
2
2
  /*#__PURE__*/e(x,{children:/*#__PURE__*/r("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[/*#__PURE__*/e(n,{success:t?.success,fail:t?.fail}),"string"==typeof o?
3
3
  /*#__PURE__*/e("span",{style:{background:`url('${o}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):/*#__PURE__*/i.isValidElement(o)?
4
4
  /*#__PURE__*/i.cloneElement(o,{style:{width:"38px",height:"38px"}}):
@@ -1 +1 @@
1
- import{jsxs as r,Fragment as e,jsx as l}from"react/jsx-runtime";import{B as t}from"./Button-CrJpeX0e.mjs";import{S as a}from"./Screen-CpIMiJNF.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:s,watermark:c=!0,children:d,...m})=>{let o=n||i?/*#__PURE__*/r(e,{children:[n&&(()=>{let{label:r,...e}=n,a=e.variant||"primary";/*#__PURE__*/return l(t,{...e,variant:a,style:{width:"100%",...e.style},children:r})})(),i&&(()=>{let{label:r,...e}=i,a=e.variant||"secondary";/*#__PURE__*/return l(t,{...e,variant:a,style:{width:"100%",...e.style},children:r})})()]}):null;/*#__PURE__*/return r(a,{id:m.id,className:m.className,children:[/*#__PURE__*/l(a.Header,{...m}),d?/*#__PURE__*/l(a.Body,{children:d}):null,s||o||c?/*#__PURE__*/r(a.Footer,{children:[s?/*#__PURE__*/l(a.HelpText,{children:s}):null,o?/*#__PURE__*/l(a.Actions,{children:o}):null,c?/*#__PURE__*/l(a.Watermark,{}):null]}):null]})};export{n as S};
1
+ import{jsxs as r,Fragment as e,jsx as l}from"react/jsx-runtime";import{B as t}from"./Button-3JMVXKiE.mjs";import{S as a}from"./Screen-Bj-1pwMI.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:s,watermark:c=!0,children:d,...m})=>{let o=n||i?/*#__PURE__*/r(e,{children:[n&&(()=>{let{label:r,...e}=n,a=e.variant||"primary";/*#__PURE__*/return l(t,{...e,variant:a,style:{width:"100%",...e.style},children:r})})(),i&&(()=>{let{label:r,...e}=i,a=e.variant||"secondary";/*#__PURE__*/return l(t,{...e,variant:a,style:{width:"100%",...e.style},children:r})})()]}):null;/*#__PURE__*/return r(a,{id:m.id,className:m.className,children:[/*#__PURE__*/l(a.Header,{...m}),d?/*#__PURE__*/l(a.Body,{children:d}):null,s||o||c?/*#__PURE__*/r(a.Footer,{children:[s?/*#__PURE__*/l(a.HelpText,{children:s}):null,o?/*#__PURE__*/l(a.Actions,{children:o}):null,c?/*#__PURE__*/l(a.Watermark,{}):null]}):null]})};export{n as S};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,h as s}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{a as c}from"./Button-CrJpeX0e.mjs";import{M as m,B as d}from"./ModalHeader-YP9pLMEP.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-DkvfP2Ev.mjs";import{T as y}from"./Title-D0pfZff-.mjs";import{q as h}from"./context-BOoFAPna.mjs";import{u as f}from"./internal-context-e-Eni5bG.mjs";import{Y as v}from"./useActiveWallet-BdFIc7_K.mjs";import"viem";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"@privy-io/js-sdk-core";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"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-3r4yfFNg.mjs";const g=/*#__PURE__*/p.div.withConfig({displayName:"WithCircleBorder",componentId:"sc-e4fc5563-0"})(["&&{border-width:4px;}display:flex;justify-content:center;align-items:center;padding:1rem;aspect-ratio:1;border-style:solid;border-color:",";border-radius:50%;"],(e=>e.$color??"var(--privy-color-accent)")),w={component:()=>{let{user:p}=l(),{client:w,walletProxy:j,refreshSessionAndUser:I,closePrivyModal:b}=f(),x=a(),{entropyId:C,entropyIdVerifier:T}=x.data?.recoverWallet,[k,M]=n(!1),[S,W]=n(null),[A,P]=n(null);function U(){if(!k){if(A)return x.data?.setWalletPassword?.onFailure(A),void b();if(!S)return x.data?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),void b()}}x.onUserCloseViaDialogOrKeybindRef.current=U;let E=!(!k&&!S);/*#__PURE__*/return e(r,A?{children:[/*#__PURE__*/o(m,{onClose:U},"header"),/*#__PURE__*/o(g,{$color:"var(--privy-color-error)",style:{alignSelf:"center"},children:/*#__PURE__*/o(t,{height:38,width:38,stroke:"var(--privy-color-error)"})}),/*#__PURE__*/o(y,{style:{marginTop:"0.5rem"},children:"Something went wrong"}),/*#__PURE__*/o(v,{style:{minHeight:"2rem"}}),/*#__PURE__*/o(c,{onClick:()=>P(null),children:"Try again"}),/*#__PURE__*/o(d,{})]}:{children:[/*#__PURE__*/o(m,{onClose:U},"header"),/*#__PURE__*/o(i,{style:{width:"3rem",height:"3rem",alignSelf:"center"}}),/*#__PURE__*/o(y,{style:{marginTop:"0.5rem"},children:"Automatically secure your account"}),/*#__PURE__*/o(u,{style:{marginTop:"1rem"},children:"When you log into a new device, you’ll only need to authenticate to access your account. Never get logged out if you forget your password."}),/*#__PURE__*/o(v,{style:{minHeight:"2rem"}}),/*#__PURE__*/o(c,{loading:k,disabled:E,onClick:()=>async function(){M(!0);try{let e=await w.getAccessToken(),r=s(p,C);if(!e||!j||!r)return;if(!(await j.setRecovery({accessToken:e,entropyId:C,entropyIdVerifier:T,existingRecoveryMethod:r.recoveryMethod,recoveryMethod:"privy"})).entropyId)throw Error("Unable to set recovery on wallet");let o=await I();if(!o)throw Error("Unable to set recovery on wallet");let t=s(o,r.address);if(!t)throw Error("Unabled to set recovery on wallet");W(!!o),setTimeout((()=>{x.data?.setWalletPassword?.onSuccess(t),b()}),h)}catch(e){P(e)}finally{M(!1)}}(),children:S?"Success":"Confirm"}),/*#__PURE__*/o(d,{})]})}};export{w as SetAutomaticRecoveryScreen,w as default};
1
+ import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,h as s}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{a as c}from"./Button-3JMVXKiE.mjs";import{M as m,B as d}from"./ModalHeader-B27O6soE.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-DkvfP2Ev.mjs";import{T as y}from"./Title-D0pfZff-.mjs";import{q as h}from"./context-BqHnoxK5.mjs";import{u as f}from"./internal-context-e-Eni5bG.mjs";import{Y as v}from"./useActiveWallet-CBIiGG1k.mjs";import"viem";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"@privy-io/js-sdk-core";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"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Aw21dxK9.mjs";const g=/*#__PURE__*/p.div.withConfig({displayName:"WithCircleBorder",componentId:"sc-e4fc5563-0"})(["&&{border-width:4px;}display:flex;justify-content:center;align-items:center;padding:1rem;aspect-ratio:1;border-style:solid;border-color:",";border-radius:50%;"],(e=>e.$color??"var(--privy-color-accent)")),w={component:()=>{let{user:p}=l(),{client:w,walletProxy:j,refreshSessionAndUser:I,closePrivyModal:b}=f(),x=a(),{entropyId:C,entropyIdVerifier:T}=x.data?.recoverWallet,[k,M]=n(!1),[S,W]=n(null),[A,P]=n(null);function U(){if(!k){if(A)return x.data?.setWalletPassword?.onFailure(A),void b();if(!S)return x.data?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),void b()}}x.onUserCloseViaDialogOrKeybindRef.current=U;let E=!(!k&&!S);/*#__PURE__*/return e(r,A?{children:[/*#__PURE__*/o(m,{onClose:U},"header"),/*#__PURE__*/o(g,{$color:"var(--privy-color-error)",style:{alignSelf:"center"},children:/*#__PURE__*/o(t,{height:38,width:38,stroke:"var(--privy-color-error)"})}),/*#__PURE__*/o(y,{style:{marginTop:"0.5rem"},children:"Something went wrong"}),/*#__PURE__*/o(v,{style:{minHeight:"2rem"}}),/*#__PURE__*/o(c,{onClick:()=>P(null),children:"Try again"}),/*#__PURE__*/o(d,{})]}:{children:[/*#__PURE__*/o(m,{onClose:U},"header"),/*#__PURE__*/o(i,{style:{width:"3rem",height:"3rem",alignSelf:"center"}}),/*#__PURE__*/o(y,{style:{marginTop:"0.5rem"},children:"Automatically secure your account"}),/*#__PURE__*/o(u,{style:{marginTop:"1rem"},children:"When you log into a new device, you’ll only need to authenticate to access your account. Never get logged out if you forget your password."}),/*#__PURE__*/o(v,{style:{minHeight:"2rem"}}),/*#__PURE__*/o(c,{loading:k,disabled:E,onClick:()=>async function(){M(!0);try{let e=await w.getAccessToken(),r=s(p,C);if(!e||!j||!r)return;if(!(await j.setRecovery({accessToken:e,entropyId:C,entropyIdVerifier:T,existingRecoveryMethod:r.recoveryMethod,recoveryMethod:"privy"})).entropyId)throw Error("Unable to set recovery on wallet");let o=await I();if(!o)throw Error("Unable to set recovery on wallet");let t=s(o,r.address);if(!t)throw Error("Unabled to set recovery on wallet");W(!!o),setTimeout((()=>{x.data?.setWalletPassword?.onSuccess(t),b()}),h)}catch(e){P(e)}finally{M(!1)}}(),children:S?"Success":"Confirm"}),/*#__PURE__*/o(d,{})]})}};export{w as SetAutomaticRecoveryScreen,w as default};
@@ -1,2 +1,2 @@
1
- import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as n,useEffect as i,useMemo as t,useCallback as a,useReducer as l}from"react";import{q as c}from"./context-BOoFAPna.mjs";import{a as s}from"./get-is-unified-wallet-Ca5aEojK.mjs";import d from"@heroicons/react/24/outline/ExclamationTriangleIcon";import{b as h,R as p,c as u}from"./Layouts-Bmf8DxNP.mjs";import{M as m,B as g}from"./ModalHeader-YP9pLMEP.mjs";import{E as y,b as v,P as f,a as w,I as b,H as k,S as C,c as S,N as x,D as B,d as $,R as I,e as R,f as P,g as j}from"./shared-C_3e8pDa.mjs";import{styled as A}from"styled-components";import{S as L,P as E}from"./Button-CrJpeX0e.mjs";import{C as D}from"./Checkbox-NmGCZeKL.mjs";import T from"@heroicons/react/24/outline/KeyIcon";import z from"@heroicons/react/24/solid/CheckCircleIcon";import H from"fast-password-entropy";import*as U from"secure-password-utilities";import{DEFAULT_WORDLIST as F}from"secure-password-utilities/wordlists";import M from"@heroicons/react/24/outline/ArrowDownTrayIcon";import N from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import K from"@heroicons/react/24/outline/DocumentDuplicateIcon";import O from"@heroicons/react/24/solid/XCircleIcon";import{C as W}from"./ScreenHeader-Biz1wq02.mjs";const Y=({buttonHideAnimations:t,buttonLoading:a,password:l,onSubmit:c,onBack:s})=>{let[u,B]=n(!0),[$,I]=n(!1),[R,P]=n(""),j=l===R;return i((()=>{R&&!$&&I(!0)}),[R]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:s}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(y,{children:[/*#__PURE__*/e(v,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/o(w,{value:R,onChange:e=>P(e.target.value),onKeyUp:e=>{"Enter"===e.key&&c()},onBlur:()=>I(!0),placeholder:"confirm your password",type:u?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/o(b,{style:{right:"0.75rem"},children:u?/*#__PURE__*/o(k,{onClick:()=>B(!1)}):/*#__PURE__*/o(C,{onClick:()=>B(!0)})})]}),
1
+ import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as n,useEffect as i,useMemo as t,useCallback as a,useReducer as l}from"react";import{q as c}from"./context-BqHnoxK5.mjs";import{a as s}from"./get-is-unified-wallet-GLvRyJlT.mjs";import d from"@heroicons/react/24/outline/ExclamationTriangleIcon";import{b as h,R as p,c as u}from"./Layouts-Bmf8DxNP.mjs";import{M as m,B as g}from"./ModalHeader-B27O6soE.mjs";import{E as y,b as v,P as f,a as w,I as b,H as k,S as C,c as S,N as x,D as B,d as $,R as I,e as R,f as P,g as j}from"./shared-RdgpdEMG.mjs";import{styled as A}from"styled-components";import{S as L,P as E}from"./Button-3JMVXKiE.mjs";import{C as D}from"./Checkbox-NmGCZeKL.mjs";import T from"@heroicons/react/24/outline/KeyIcon";import z from"@heroicons/react/24/solid/CheckCircleIcon";import H from"fast-password-entropy";import*as U from"secure-password-utilities";import{DEFAULT_WORDLIST as F}from"secure-password-utilities/wordlists";import M from"@heroicons/react/24/outline/ArrowDownTrayIcon";import N from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import K from"@heroicons/react/24/outline/DocumentDuplicateIcon";import O from"@heroicons/react/24/solid/XCircleIcon";import{C as W}from"./ScreenHeader-Biz1wq02.mjs";const Y=({buttonHideAnimations:t,buttonLoading:a,password:l,onSubmit:c,onBack:s})=>{let[u,B]=n(!0),[$,I]=n(!1),[R,P]=n(""),j=l===R;return i((()=>{R&&!$&&I(!0)}),[R]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:s}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(y,{children:[/*#__PURE__*/e(v,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/o(w,{value:R,onChange:e=>P(e.target.value),onKeyUp:e=>{"Enter"===e.key&&c()},onBlur:()=>I(!0),placeholder:"confirm your password",type:u?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/o(b,{style:{right:"0.75rem"},children:u?/*#__PURE__*/o(k,{onClick:()=>B(!1)}):/*#__PURE__*/o(C,{onClick:()=>B(!0)})})]}),
2
2
  /*#__PURE__*/o(S,{"aria-hidden":!$||j,error:!0,children:"Passwords do not match"})]}),/*#__PURE__*/o(x,{onClick:c,loading:a,disabled:!j,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]})},Z=({buttonHideAnimations:i,buttonLoading:t,onSubmit:a,onBack:l,config:c})=>{let[s,u]=n(!1);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:l}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(y,{children:[/*#__PURE__*/e(v,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-error)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm you have saved"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Losing access to your password means you will lose access to your account."})]}),/*#__PURE__*/o(B,{children:/*#__PURE__*/e($,{style:{color:"var(--privy-color-error)",cursor:"pointer"},onClick:e=>{e.preventDefault(),u((e=>!e))},children:[/*#__PURE__*/o(D,{color:"var(--privy-color-error)",readOnly:!0,checked:s}),/*#__PURE__*/o(r,{children:"I understand that if I lose my password and device, I will lose access to my account and my assets."})]})})]}),/*#__PURE__*/e(_,{children:["user"===c.initiatedBy&&/*#__PURE__*/o(L,{onClick:c.onCancel,disabled:t,children:"Cancel"}),/*#__PURE__*/o(x,{onClick:a,loading:t,$hideAnimations:i,disabled:!s,children:"Set Password"})]}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]})};let _=/*#__PURE__*/A.div.withConfig({displayName:"ButtonsContainer",componentId:"sc-d1659c5f-0"})(["display:flex;gap:10px;"]),q=/[a-z]/,G=/[A-Z]/,X=/[0-9]/,J="!@#$%^&*()\\-_+.",Q=`a-zA-Z0-9${J}`,V=RegExp(`[${J}]`),ee=RegExp(`[${Q}]`);const re=RegExp(`^[${Q}]{6,}$`),oe=()=>U.generatePassphrase(4,F);function ne(e){return e>.9?"Strong":e>.5?"Medium":"Weak"}function ie(e=""){return(.3*function(e){if(e.length<8)return 0;let r=0;return q.test(e)&&(r+=1),G.test(e)&&(r+=1),X.test(e)&&(r+=1),V.test(e)&&(r+=1),Math.max(0,Math.min(1,r/3))}(e)+H(e)/95)/2}const te=({buttonHideAnimations:a,buttonLoading:l,password:c="",config:s,isResettingPassword:d,onSubmit:u,onClose:P,onBack:j,onPasswordChange:A,onPasswordGenerate:L})=>{let[E,D]=n(!1),[H,U]=n(!1);i((()=>{c&&!H&&U(!0)}),[c]);let F=t((()=>H?6>(c?.length||0)?"Password must be at least 6 characters":re.test(c||"")?null:`Invalid characters used ( ${((e="")=>[...new Set(e.split("").filter((e=>!ee.test(e))).map((e=>e.replace(" ","SPACE"))))])(c).join(" ")} )`:null),[c,H]),M=t((()=>F?{value:0,label:"Weak"}:function(e=""){let r=ie(e);return{value:r,label:ne(r)}}(c)),[c,F]),N=t((()=>!c?.length||!!F),[F,c]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{onClose:P,closeable:"user"===s.initiatedBy,backFn:j}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(y,{children:[/*#__PURE__*/e(v,{children:[/*#__PURE__*/o(T,{height:48,width:48,stroke:"var(--privy-color-accent)"}),/*#__PURE__*/e("h3",{style:{color:"var(--privy-color-foreground)"},children:[d?"Reset":"Set"," your password"]}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Select a strong, memorable password to secure your account."})]}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/o(w,{value:c,onChange:e=>A(e.target.value),onKeyUp:e=>{"Enter"===e.key&&u()},placeholder:"enter or generate a strong password",type:E?"password":"text",style:{paddingRight:"3.8rem"}}),/*#__PURE__*/e(b,{style:{width:"3.5rem"},children:[E?/*#__PURE__*/o(k,{onClick:()=>D(!1)}):/*#__PURE__*/o(C,{onClick:()=>D(!0)}),/*#__PURE__*/o(I,{onClick:L})]})]}),/*#__PURE__*/o(R,{value:0===M.value?.01:M.value,label:M.label}),/*#__PURE__*/o(S,{error:!!F,children:F||`Password Strength: ${H?M.label:"--"}`}),/*#__PURE__*/e(le,{children:[/*#__PURE__*/o(ae,{children:/*#__PURE__*/e(B,{children:[/*#__PURE__*/e($,{children:[/*#__PURE__*/o(z,{width:24,height:24,fill:"var(--privy-color-accent)"}),"This password is used to secure your account."]}),/*#__PURE__*/e($,{children:[/*#__PURE__*/o(z,{width:24,height:24,fill:"var(--privy-color-accent)"}),"Use it to log in on a new environment, like another browser or device."]})]})}),/*#__PURE__*/o(x,{onClick:u,loading:l,disabled:N,$hideAnimations:a,children:"Continue"})]})]}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]})};let ae=/*#__PURE__*/A(B).withConfig({displayName:"DetailsContainer",componentId:"sc-2da5fe90-0"})(["flex:1;padding-top:1rem;"]),le=/*#__PURE__*/A.div.withConfig({displayName:"LowerContainer",componentId:"sc-2da5fe90-1"})(["display:flex;flex-direction:column;height:100%;"]);const ce=({buttonHideAnimations:i,buttonLoading:t,appName:l,password:c,onSubmit:s,onBack:u})=>{let[w,S]=n(!1),[B,$]=n(!0),I=a((()=>{S(!0),c&&navigator.clipboard.writeText(c)}),[c]),R=a((()=>{let e=document.createElement("a"),r=l.toLowerCase().replace(/[^a-z\s]/g,"").replace(/\s/g,"-"),o=new Blob([se(l,c)],{type:"text/plain"}),n=URL.createObjectURL(o);e.href=n,e.target="_blank",e.download=`${r}-privy-wallet-recovery.txt`,document.body.appendChild(e),e.click(),setTimeout((()=>{e.remove(),URL.revokeObjectURL(n)}),5e3)}),[c]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{backFn:u,closeable:!1}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(y,{children:[/*#__PURE__*/e(v,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Save your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"For your security, this password cannot be reset, so keep it somewhere safe."})]}),/*#__PURE__*/e(f,{centered:!0,children:[/*#__PURE__*/o(P,{children:B?"•".repeat(c.length):c}),/*#__PURE__*/o(b,{style:{right:"0.75rem"},children:B?/*#__PURE__*/o(k,{onClick:()=>$(!1)}):/*#__PURE__*/o(C,{onClick:()=>$(!0)})})]}),/*#__PURE__*/e("div",{style:{display:"flex",margin:"12px 0",gap:"12px"},children:[/*#__PURE__*/o(j,{onClick:I,children:/*#__PURE__*/e(r,w?{children:[/*#__PURE__*/o(N,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copied"]}:{children:[/*#__PURE__*/o(K,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copy"]})}),/*#__PURE__*/e(j,{onClick:R,children:[/*#__PURE__*/o(M,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Download"]})]})]}),/*#__PURE__*/o(x,{onClick:s,loading:t,$hideAnimations:i,children:"Continue"}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]})};let se=(e,r)=>`Your wallet recovery password for ${e} is\n\n${r}\n\nYou will need this password to access your ${e} wallet on a new device. Please keep it somewhere safe.`;const de=({error:n,onClose:i})=>/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(u,n?{children:[/*#__PURE__*/o(O,{fill:"var(--privy-color-error)",width:"64px",height:"64px"}),/*#__PURE__*/o(W,{title:"Something went wrong",description:n})]}:{children:[/*#__PURE__*/o(z,{fill:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/o(W,{title:"Success"})]}),/*#__PURE__*/o(E,{onClick:i,children:"Close"}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]});let he=(e,r)=>{switch(e){case"creating":return"back"===r?e:"saving";case"saving":return"back"===r?"creating":"confirming";case"confirming":return"back"===r?"saving":"finalizing";case"finalizing":return"back"===r?"confirming":"done";default:return e}};const pe=({onSubmit:e,...r})=>{let{lastScreen:n,navigate:t}=s(),{send:d,state:h}=(()=>{let[e,r]=l(he,"creating");return{send:r,state:e}})(),p=a((async()=>{"finalizing"===h&&await e(),d("next")}),[h,d,e]);i((()=>{let e;return"done"===h&&"automatic"===r.config.initiatedBy&&(e=setTimeout((()=>r.onClose?.()),c)),()=>{e&&clearTimeout(e)}}),[h,r.config.initiatedBy,r.onClose]);let u=a((()=>{d("back")}),[d]),m=a((()=>{t("RecoverySelectionScreen")}),[n,t]);return"creating"===h?/*#__PURE__*/o(te,{...r,onSubmit:p,onBack:"RecoverySelectionScreen"===n?m:void 0}):"saving"===h?/*#__PURE__*/o(ce,{...r,onSubmit:p,onBack:u}):"confirming"===h?/*#__PURE__*/o(Y,{...r,onSubmit:p,onBack:u}):"finalizing"===h?/*#__PURE__*/o(Z,{...r,onSubmit:p,onBack:u}):"done"===h?/*#__PURE__*/o(de,{...r,onSubmit:p}):null};export{pe as S,oe as g};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as i}from"@scure/base";import{Edit as r}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-DatKc59_.mjs";import{a as d}from"./Layouts-Bmf8DxNP.mjs";import{M as u,D as g}from"./JsonTree-Bvd2C29R.mjs";import{P as y,j as h}from"./prepareFundingModalData-CzDMa8gy.mjs";import{W as f,q as C}from"./context-BOoFAPna.mjs";import{u as x}from"./internal-context-e-Eni5bG.mjs";import{u as w,a as j}from"./get-is-unified-wallet-Ca5aEojK.mjs";import{S as T}from"./ScreenLayout-t3qtbQ3-.mjs";import"./copy-Bx2Jwc5_.mjs";import"eventemitter3";import"tinycolor2";import"ofetch";import"./Button-CrJpeX0e.mjs";import"./useActiveWallet-BdFIc7_K.mjs";import"zustand";import"react-device-detect";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";const b=/*#__PURE__*/s.img.withConfig({displayName:"StyledLogo",componentId:"sc-68c1b1ea-0"})(["&&{height:",";width:",";border-radius:16px;margin-bottom:12px;}"],(e=>"sm"===e.size?"65px":"140px"),(e=>"sm"===e.size?"65px":"140px"));let v=e=>{if(!l(e))return e;try{let t=c(e);return t.includes("�")?e:t}catch{return e}},S=e=>{try{let t=i.decode(e),o=(new TextDecoder).decode(t);return o.includes("�")?e:o}catch{return e}},E=i=>{let{types:r,primaryType:n,...a}=i.typedData;/*#__PURE__*/return t(o,{children:[/*#__PURE__*/e(_,{data:a}),/*#__PURE__*/e(p,{text:(s=i.typedData,JSON.stringify(s,null,2)),itemName:"full payload to clipboard"})," "]});var s};const D=({method:o,messageData:i,copy:n,iconUrl:a,isLoading:s,success:l,walletProxyIsLoading:c,errorMessage:m,isCancellable:p,onSign:u,onCancel:g,onClose:y})=>/*#__PURE__*/e(T,{title:n.title,subtitle:n.description,showClose:!0,onClose:y,icon:r,iconVariant:"subtle",helpText:m?/*#__PURE__*/e(R,{children:m}):void 0,primaryCta:{label:n.buttonText,onClick:u,disabled:s||l||c,loading:s},secondaryCta:p?{label:"Not now",onClick:g,disabled:s||l||c}:void 0,watermark:!0,children:/*#__PURE__*/t(d,{children:[a?/*#__PURE__*/e(b,{style:{alignSelf:"center"},size:"sm",src:a,alt:"app image"}):null,/*#__PURE__*/t(L,{children:["personal_sign"===o&&/*#__PURE__*/e(M,{children:v(i)}),"eth_signTypedData_v4"===o&&/*#__PURE__*/e(E,{typedData:i}),"solana_signMessage"===o&&/*#__PURE__*/e(M,{children:S(i)})]})]})}),I={component:()=>{let{authenticated:t}=w(),{initializeWalletProxy:o,closePrivyModal:i}=x(),{navigate:r,data:s,onUserCloseViaDialogOrKeybindRef:l}=j(),[c,p]=n(!0),[d,u]=n(""),[g,T]=n(),[b,v]=n(null),[S,E]=n(!1);a((()=>{t||r("LandingScreen")}),[t]),a((()=>{o(f).then((e=>{p(!1),e||(u("An error has occurred, please try again."),T(new y(new h(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:I,data:L,confirmAndSign:R,onSuccess:_,onFailure:M,uiOptions:N}=s.signMessage,A={title:N?.title||"Sign message",description:N?.description||"Signing this message will not cost you any fees.",buttonText:N?.buttonText||"Sign and continue"},U=e=>{e?_(e):M(g||new y(new h("The user rejected the request.",m.E4001_USER_REJECTED_REQUEST.eipCode))),i({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{v(null),u(""),T(void 0)}),200)};l.current=()=>{U(b)};/*#__PURE__*/return e(D,{method:I,messageData:L,copy:A,iconUrl:N?.iconUrl&&"string"==typeof N.iconUrl?N.iconUrl:void 0,isLoading:S,success:null!==b,walletProxyIsLoading:c,errorMessage:d,isCancellable:N?.isCancellable,onSign:async()=>{E(!0),u("");try{let e=await R();v(e),E(!1),setTimeout((()=>{U(e)}),C)}catch(e){console.error(e),u("An error has occurred, please try again."),T(new y(new h(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),E(!1)}},onCancel:()=>U(null),onClose:()=>U(b)})}};let L=/*#__PURE__*/s.div.withConfig({displayName:"MessageContainer",componentId:"sc-124260c0-0"})(["flex:1;display:flex;flex-direction:column;gap:16px;"]),R=/*#__PURE__*/s.p.withConfig({displayName:"ErrorText",componentId:"sc-124260c0-1"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-error-dark);font-size:14px;line-height:22px;}"]),_=/*#__PURE__*/s(g).withConfig({displayName:"StyledDisplayJsonTree",componentId:"sc-124260c0-2"})(["margin-top:0;"]),M=/*#__PURE__*/s(u).withConfig({displayName:"StyledMessage",componentId:"sc-124260c0-3"})(["margin-top:0;"]);export{I as SignRequestScreen,D as SignRequestView,I as default};
1
+ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as i}from"@scure/base";import{Edit as r}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-DatKc59_.mjs";import{a as d}from"./Layouts-Bmf8DxNP.mjs";import{M as u,D as g}from"./JsonTree-Bvd2C29R.mjs";import{P as y,j as h}from"./prepareFundingModalData-lYYA8ZfI.mjs";import{W as f,q as C}from"./context-BqHnoxK5.mjs";import{u as x}from"./internal-context-e-Eni5bG.mjs";import{u as w,a as j}from"./get-is-unified-wallet-GLvRyJlT.mjs";import{S as T}from"./ScreenLayout-Dp0ezg8Q.mjs";import"./copy-Bx2Jwc5_.mjs";import"eventemitter3";import"tinycolor2";import"ofetch";import"./Button-3JMVXKiE.mjs";import"./useActiveWallet-CBIiGG1k.mjs";import"zustand";import"react-device-detect";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";const b=/*#__PURE__*/s.img.withConfig({displayName:"StyledLogo",componentId:"sc-68c1b1ea-0"})(["&&{height:",";width:",";border-radius:16px;margin-bottom:12px;}"],(e=>"sm"===e.size?"65px":"140px"),(e=>"sm"===e.size?"65px":"140px"));let v=e=>{if(!l(e))return e;try{let t=c(e);return t.includes("�")?e:t}catch{return e}},S=e=>{try{let t=i.decode(e),o=(new TextDecoder).decode(t);return o.includes("�")?e:o}catch{return e}},E=i=>{let{types:r,primaryType:n,...a}=i.typedData;/*#__PURE__*/return t(o,{children:[/*#__PURE__*/e(_,{data:a}),/*#__PURE__*/e(p,{text:(s=i.typedData,JSON.stringify(s,null,2)),itemName:"full payload to clipboard"})," "]});var s};const D=({method:o,messageData:i,copy:n,iconUrl:a,isLoading:s,success:l,walletProxyIsLoading:c,errorMessage:m,isCancellable:p,onSign:u,onCancel:g,onClose:y})=>/*#__PURE__*/e(T,{title:n.title,subtitle:n.description,showClose:!0,onClose:y,icon:r,iconVariant:"subtle",helpText:m?/*#__PURE__*/e(R,{children:m}):void 0,primaryCta:{label:n.buttonText,onClick:u,disabled:s||l||c,loading:s},secondaryCta:p?{label:"Not now",onClick:g,disabled:s||l||c}:void 0,watermark:!0,children:/*#__PURE__*/t(d,{children:[a?/*#__PURE__*/e(b,{style:{alignSelf:"center"},size:"sm",src:a,alt:"app image"}):null,/*#__PURE__*/t(L,{children:["personal_sign"===o&&/*#__PURE__*/e(M,{children:v(i)}),"eth_signTypedData_v4"===o&&/*#__PURE__*/e(E,{typedData:i}),"solana_signMessage"===o&&/*#__PURE__*/e(M,{children:S(i)})]})]})}),I={component:()=>{let{authenticated:t}=w(),{initializeWalletProxy:o,closePrivyModal:i}=x(),{navigate:r,data:s,onUserCloseViaDialogOrKeybindRef:l}=j(),[c,p]=n(!0),[d,u]=n(""),[g,T]=n(),[b,v]=n(null),[S,E]=n(!1);a((()=>{t||r("LandingScreen")}),[t]),a((()=>{o(f).then((e=>{p(!1),e||(u("An error has occurred, please try again."),T(new y(new h(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:I,data:L,confirmAndSign:R,onSuccess:_,onFailure:M,uiOptions:N}=s.signMessage,A={title:N?.title||"Sign message",description:N?.description||"Signing this message will not cost you any fees.",buttonText:N?.buttonText||"Sign and continue"},U=e=>{e?_(e):M(g||new y(new h("The user rejected the request.",m.E4001_USER_REJECTED_REQUEST.eipCode))),i({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{v(null),u(""),T(void 0)}),200)};l.current=()=>{U(b)};/*#__PURE__*/return e(D,{method:I,messageData:L,copy:A,iconUrl:N?.iconUrl&&"string"==typeof N.iconUrl?N.iconUrl:void 0,isLoading:S,success:null!==b,walletProxyIsLoading:c,errorMessage:d,isCancellable:N?.isCancellable,onSign:async()=>{E(!0),u("");try{let e=await R();v(e),E(!1),setTimeout((()=>{U(e)}),C)}catch(e){console.error(e),u("An error has occurred, please try again."),T(new y(new h(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),E(!1)}},onCancel:()=>U(null),onClose:()=>U(b)})}};let L=/*#__PURE__*/s.div.withConfig({displayName:"MessageContainer",componentId:"sc-124260c0-0"})(["flex:1;display:flex;flex-direction:column;gap:16px;"]),R=/*#__PURE__*/s.p.withConfig({displayName:"ErrorText",componentId:"sc-124260c0-1"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-error-dark);font-size:14px;line-height:22px;}"]),_=/*#__PURE__*/s(g).withConfig({displayName:"StyledDisplayJsonTree",componentId:"sc-124260c0-2"})(["margin-top:0;"]),M=/*#__PURE__*/s(u).withConfig({displayName:"StyledMessage",componentId:"sc-124260c0-3"})(["margin-top:0;"]);export{I as SignRequestScreen,D as SignRequestView,I as default};