@privy-io/react-auth 3.12.0 → 3.12.1-beta-20260128234636

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 (331) hide show
  1. package/dist/cjs/AccountNotFoundScreen-DBramzeJ.js +1 -0
  2. package/dist/cjs/{Address-6qDWL5TN.js → Address-B3n6an_E.js} +1 -1
  3. package/dist/cjs/AffirmativeConsentScreen-CPSpq0C6.js +6 -0
  4. package/dist/cjs/AllowlistRejectionScreen-BAH9dA4M.js +1 -0
  5. package/dist/cjs/AuthenticateWithWalletScreen-CLyXmbf9.js +1 -0
  6. package/dist/cjs/AwaitingEvmToSolBridgingScreen-A6h7gwhx.js +2 -0
  7. package/dist/cjs/AwaitingExternalEthereumTransferScreen-DtWr7lXB.js +2 -0
  8. package/dist/cjs/AwaitingPasswordlessCodeScreen-B8-PAQCp.js +103 -0
  9. package/dist/cjs/AwaitingSolToEvmBridgingScreen-Cy4Sf5-r.js +2 -0
  10. package/dist/cjs/{BridgeNetworkSelectionView-DKA06V8u.js → BridgeNetworkSelectionView-DafNn8w7.js} +1 -1
  11. package/dist/cjs/CaptchaScreen-cKcm3kF3.js +1 -0
  12. package/dist/cjs/CoinbaseOnrampStatusScreen-C22v2nBP.js +16 -0
  13. package/dist/cjs/{ConnectEmailForm-DZrCSv9t.js → ConnectEmailForm-0tcp5WIo.js} +1 -1
  14. package/dist/cjs/ConnectLedgerScreen-v0lTZbNZ.js +9 -0
  15. package/dist/cjs/ConnectOnlyLandingScreen-BoUoz2T3.js +1 -0
  16. package/dist/cjs/ConnectOnlyStatusScreen-2I5fXBYo.js +1 -0
  17. package/dist/cjs/ConnectOrCreateScreen-COeokpK3.js +1 -0
  18. package/dist/cjs/{ConnectPhoneForm-BWSmRonl.js → ConnectPhoneForm-5J-HI-6c.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-Bh1DK9t5.js → ConnectWalletView-BP7jtIOS.js} +8 -8
  20. package/dist/cjs/ConnectionStatusScreen-D4fGSRqf.js +7 -0
  21. package/dist/cjs/CrossAppAuthScreen-M_c4PWjZ.js +1 -0
  22. package/dist/cjs/{CustomLandingScreenView-DP1fJrBU.js → CustomLandingScreenView-zuP1y51E.js} +1 -1
  23. package/dist/cjs/DelegatedActionsConsentScreen-B_K3Ii9B.js +1 -0
  24. package/dist/cjs/DelegatedActionsRevokeScreen-C6WEMQeE.js +1 -0
  25. package/dist/cjs/EmbeddedWalletConnectingScreen-BncvqX7Q.js +1 -0
  26. package/dist/cjs/EmbeddedWalletCreatedScreen-BvQmJMT2.js +1 -0
  27. package/dist/cjs/EmbeddedWalletKeyExportScreen-Cd8noSvo.js +40 -0
  28. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-DXvtKset.js +1 -0
  29. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-ClEyXQFM.js +1 -0
  30. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-BUChPmFP.js +1 -0
  31. package/dist/cjs/{EnrollTotp-leOB_B4o.js → EnrollTotp-7ClajYO5.js} +1 -1
  32. package/dist/cjs/ErrorScreen-DeTAcSrU.js +4 -0
  33. package/dist/cjs/{FarcasterConnectStatusScreen-Bzmd4izn.js → FarcasterConnectStatusScreen-CTqliSQQ.js} +4 -4
  34. package/dist/cjs/{FarcasterSignerStatusScreen-Cxoi54pp.js → FarcasterSignerStatusScreen-BfpG-vxs.js} +1 -1
  35. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-nk3-8Cko.js +2 -0
  36. package/dist/cjs/{FundWalletMethodHeader-YwNCXAU_.js → FundWalletMethodHeader-Br5yuy4Y.js} +1 -1
  37. package/dist/cjs/FundingEditAmountScreen-CkN7MEsP.js +1 -0
  38. package/dist/cjs/FundingMethodSelectionScreen-GAbtb6OX.js +1 -0
  39. package/dist/cjs/InAppBrowserLoginNotPossible-CT02qBTq.js +1 -0
  40. package/dist/cjs/InstallWalletScreen-qPlR85ky.js +1 -0
  41. package/dist/cjs/LandingScreen-D8L4igmQ.js +1 -0
  42. package/dist/cjs/{LinkConflictScreen-BCzS7Szr.js → LinkConflictScreen-B737vUbD.js} +1 -1
  43. package/dist/cjs/LinkEmailScreen-MLwnc5jm.js +1 -0
  44. package/dist/cjs/{LinkPasskeyScreen-o4qdrAL3.js → LinkPasskeyScreen-BJ1m3id2.js} +11 -11
  45. package/dist/cjs/LinkPhoneScreen-yRSjv6ae.js +1 -0
  46. package/dist/cjs/LoginFailedScreen-I5ksysLT.js +1 -0
  47. package/dist/cjs/ManualTransferScreen-DcN6S-SJ.js +1 -0
  48. package/dist/cjs/MfaAuthEnrollmentFlowScreen-BQHWPpCM.js +1 -0
  49. package/dist/cjs/MfaAuthVerifyFlowScreen-DOrloojz.js +1 -0
  50. package/dist/cjs/MfaEnrollmentFlowScreen-BdLB0mFq.js +1 -0
  51. package/dist/cjs/MfaVerifyFlowScreen-Bk0-M9__.js +1 -0
  52. package/dist/cjs/{ModalHeader-C5O9gNUP.js → ModalHeader-KwHCNxiU.js} +1 -1
  53. package/dist/cjs/MoonpayStatusScreen-DDr4Vkyi.js +16 -0
  54. package/dist/cjs/OAuthStatusScreen-CppJwxLf.js +1 -0
  55. package/dist/cjs/PasskeySelectSignupOrLogin-ClUBjHFM.js +1 -0
  56. package/dist/cjs/PasskeyStatusScreen-B2_-WfVa.js +3 -0
  57. package/dist/cjs/PasswordRecoveryScreen-vf83E9aP.js +20 -0
  58. package/dist/cjs/{QrCode-CLd3Ytk7.js → QrCode-BhmojmWg.js} +1 -1
  59. package/dist/cjs/RecoveryOAuthStatusScreen-BdSOccuL.js +1 -0
  60. package/dist/cjs/RecoveryPasswordCreateScreen-BLaYQNKK.js +1 -0
  61. package/dist/cjs/{RecoverySelectionScreen-Bw9_M6y0.js → RecoverySelectionScreen-BneG3jc0.js} +2 -2
  62. package/dist/cjs/{Screen-BSwlHqPg.js → Screen-C1Ydlvkq.js} +3 -4
  63. package/dist/cjs/{ScreenLayout-BtVIYAso.js → ScreenLayout-DnkmZJSx.js} +1 -1
  64. package/dist/cjs/{SetAutomaticRecoveryScreen-SUOUjBk4.js → SetAutomaticRecoveryScreen-v61QgGt9.js} +2 -2
  65. package/dist/cjs/{SetWalletPasswordForm-Gkq-DskE.js → SetWalletPasswordForm-B_Msv6ub.js} +1 -1
  66. package/dist/cjs/{SignRequestScreen-BNcy6yU_.js → SignRequestScreen-CEFanY2A.js} +2 -2
  67. package/dist/cjs/{StandardSignAndSendTransactionScreen-z_EUNaeD.js → StandardSignAndSendTransactionScreen-BITiqDxA.js} +1 -1
  68. package/dist/cjs/TelegramAuthScreen-BU6xiLOe.js +1 -0
  69. package/dist/cjs/{TransactionDetails-DYow9ihU.js → TransactionDetails-TeqmJubL.js} +1 -1
  70. package/dist/cjs/{TransactionErrorView-yUMJqqF2.js → TransactionErrorView-hm96eri-.js} +1 -1
  71. package/dist/cjs/{TransferFromWalletScreen-Duk7CEcq.js → TransferFromWalletScreen-CnhtyQ1i.js} +2 -2
  72. package/dist/cjs/{TransferOrBridgeLoadingScreen-DuBLyfE1.js → TransferOrBridgeLoadingScreen-BdIP7jdZ.js} +1 -1
  73. package/dist/cjs/UpdateEmailScreen-YRHdiXp6.js +1 -0
  74. package/dist/cjs/UpdatePhoneScreen-Db27LG3y.js +1 -0
  75. package/dist/cjs/UserLimitReachedScreen-Cd877Xx6.js +1 -0
  76. package/dist/cjs/{WalletInfoCard-CHEynRZS.js → WalletInfoCard-vgtM0ubJ.js} +1 -1
  77. package/dist/cjs/WalletInterstitialScreen-DeNyJ-3q.js +1 -0
  78. package/dist/cjs/{WalletLink-CZLtiI7E.js → WalletLink-9sZRsiet.js} +1 -1
  79. package/dist/cjs/{WalletOverflowButton-FlgoA77a.js → WalletOverflowButton-DhlNqoAO.js} +1 -1
  80. package/dist/cjs/abstract-smart-wallets.js +1 -1
  81. package/dist/cjs/{context-BeSQM-Ma.js → context-BCMEQ5MO.js} +1 -1
  82. package/dist/cjs/{ethers-XrYC9HG-.js → ethers-DX1tw95u.js} +1 -1
  83. package/dist/cjs/extended-chains.js +1 -1
  84. package/dist/cjs/get-is-unified-wallet-Dg4KqQ0p.js +1 -0
  85. package/dist/cjs/index-BhSLy7Nc.js +174 -0
  86. package/dist/cjs/{index-W2ZSukRW.js → index-CWU_iy3R.js} +1 -1
  87. package/dist/cjs/{index-0-2WrPDo.js → index-Dd9z1fY6.js} +1 -1
  88. package/dist/cjs/index.js +1 -1
  89. package/dist/cjs/internal.js +1 -1
  90. package/dist/cjs/{shared-BcueHfN-.js → shared-ssREsE-L.js} +1 -1
  91. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-j6p9PEm-.js → shouldProceedtoEmbeddedWalletCreationFlow-BN3aUGgy.js} +1 -1
  92. package/dist/cjs/{smart-wallets-BBh3vgRq.js → smart-wallets-WntASNhF.js} +1 -1
  93. package/dist/cjs/smart-wallets.js +1 -1
  94. package/dist/cjs/solana.js +1 -1
  95. package/dist/cjs/{styles-Csarwypj.js → styles-DTcqxfSy.js} +1 -1
  96. package/dist/cjs/{to-ui-error-C4aac_aM.js → to-ui-error-DtK3_1wP.js} +1 -1
  97. package/dist/cjs/ui.js +14 -14
  98. package/dist/cjs/use-export-wallet-BkHEBlvp.js +1 -0
  99. package/dist/cjs/use-export-wallet-C-uM5Ofr.js +1 -0
  100. package/dist/cjs/{useActiveWallet-vlXeDPzp.js → useActiveWallet-B6oEOEWn.js} +2 -2
  101. package/dist/cjs/{useGetTokenPrice-DJpJnTij.js → useGetTokenPrice-C_nmg4xT.js} +1 -1
  102. package/dist/cjs/{useI18n-CnsBjm9v.js → useI18n-BwZScV_7.js} +1 -1
  103. package/dist/cjs/usePrivy-DUCSNlpX.js +1 -0
  104. package/dist/cjs/{useSolanaRpcClient-CYMWkK7E.js → useSolanaRpcClient-COvcS5LN.js} +1 -1
  105. package/dist/cjs/{useWallets-DMyuB5aJ.js → useWallets-CzK7D1op.js} +1 -1
  106. package/dist/cjs/useWallets-JxMLMc9Z.js +1 -0
  107. package/dist/dts/index.d.mts +54 -1
  108. package/dist/dts/index.d.ts +54 -1
  109. package/dist/esm/AccountNotFoundScreen-uRGtEJqn.mjs +1 -0
  110. package/dist/esm/{Address-QmAVCQtO.mjs → Address-B3pOzvIk.mjs} +1 -1
  111. package/dist/esm/AffirmativeConsentScreen-BGAa9lkE.mjs +6 -0
  112. package/dist/esm/AllowlistRejectionScreen-DBuQjf2C.mjs +1 -0
  113. package/dist/esm/AuthenticateWithWalletScreen-Dh6CCfWB.mjs +1 -0
  114. package/dist/esm/AwaitingEvmToSolBridgingScreen-CG-QmnxT.mjs +2 -0
  115. package/dist/esm/AwaitingExternalEthereumTransferScreen-DajMWJD_.mjs +2 -0
  116. package/dist/esm/AwaitingPasswordlessCodeScreen-DsLo_XbV.mjs +103 -0
  117. package/dist/esm/AwaitingSolToEvmBridgingScreen-DhYOqo0N.mjs +2 -0
  118. package/dist/esm/{BridgeNetworkSelectionView-DQGcampg.mjs → BridgeNetworkSelectionView-BA212LUH.mjs} +1 -1
  119. package/dist/esm/CaptchaScreen-CpjTgBuC.mjs +1 -0
  120. package/dist/esm/CoinbaseOnrampStatusScreen-DXQ72a0D.mjs +16 -0
  121. package/dist/esm/{ConnectEmailForm-Df5OtmDR.mjs → ConnectEmailForm-BOaRwgjM.mjs} +1 -1
  122. package/dist/esm/ConnectLedgerScreen-CjA-L5l5.mjs +9 -0
  123. package/dist/esm/ConnectOnlyLandingScreen-noIWe4JR.mjs +1 -0
  124. package/dist/esm/ConnectOnlyStatusScreen-DZMalBQr.mjs +1 -0
  125. package/dist/esm/ConnectOrCreateScreen-u4yt-3sr.mjs +1 -0
  126. package/dist/esm/{ConnectPhoneForm-BMtTIItD.mjs → ConnectPhoneForm-CwVcpNfb.mjs} +1 -1
  127. package/dist/esm/{ConnectWalletView-BMjEKo1_.mjs → ConnectWalletView-NvVzGHBr.mjs} +4 -4
  128. package/dist/esm/ConnectionStatusScreen-8jrGgJZg.mjs +7 -0
  129. package/dist/esm/CrossAppAuthScreen-DPWSq0Io.mjs +1 -0
  130. package/dist/esm/{CustomLandingScreenView-BlDfJaDr.mjs → CustomLandingScreenView-C2HMC1Df.mjs} +1 -1
  131. package/dist/esm/DelegatedActionsConsentScreen-DawiGwZk.mjs +1 -0
  132. package/dist/esm/DelegatedActionsRevokeScreen-CFOdEpk0.mjs +1 -0
  133. package/dist/esm/EmbeddedWalletConnectingScreen-Dssq6BgK.mjs +1 -0
  134. package/dist/esm/EmbeddedWalletCreatedScreen-X0JMlwTi.mjs +1 -0
  135. package/dist/esm/EmbeddedWalletKeyExportScreen-B2dIQCOE.mjs +40 -0
  136. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-CbkTFbdd.mjs +1 -0
  137. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-Bfpjz9TR.mjs +1 -0
  138. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-DFXj-md3.mjs +1 -0
  139. package/dist/esm/{EnrollTotp-DVLg14UT.mjs → EnrollTotp-w6UxoJph.mjs} +1 -1
  140. package/dist/esm/ErrorScreen-CWTvIq8L.mjs +4 -0
  141. package/dist/esm/{FarcasterConnectStatusScreen-CUO9DKCJ.mjs → FarcasterConnectStatusScreen-RzptJxlJ.mjs} +8 -8
  142. package/dist/esm/FarcasterSignerStatusScreen-C36T4hPW.mjs +28 -0
  143. package/dist/esm/FundSolWalletWithExternalSolanaWallet-BQg4VfHs.mjs +1 -0
  144. package/dist/esm/{FundWalletMethodHeader-PIxwFzzh.mjs → FundWalletMethodHeader-CDUUJTHP.mjs} +1 -1
  145. package/dist/esm/FundingEditAmountScreen-CLkxWyD5.mjs +1 -0
  146. package/dist/esm/FundingMethodSelectionScreen-Cqxg2r2F.mjs +1 -0
  147. package/dist/esm/InAppBrowserLoginNotPossible-BZ5Aj9FY.mjs +1 -0
  148. package/dist/esm/InstallWalletScreen-Bm6tWm-p.mjs +1 -0
  149. package/dist/esm/LandingScreen-7pZs6v3y.mjs +1 -0
  150. package/dist/esm/{LinkConflictScreen-B94e_-2N.mjs → LinkConflictScreen-Dt2FTzqs.mjs} +3 -3
  151. package/dist/esm/LinkEmailScreen-BIWTNxT7.mjs +1 -0
  152. package/dist/esm/{LinkPasskeyScreen-DYfWSjKR.mjs → LinkPasskeyScreen-C0qjIYHG.mjs} +1 -1
  153. package/dist/esm/LinkPhoneScreen-zATN3v5S.mjs +1 -0
  154. package/dist/esm/LoginFailedScreen-Bep4nqVd.mjs +1 -0
  155. package/dist/esm/ManualTransferScreen-DHe5eNOc.mjs +1 -0
  156. package/dist/esm/MfaAuthEnrollmentFlowScreen-C6L-LQJU.mjs +1 -0
  157. package/dist/esm/MfaAuthVerifyFlowScreen-BGrmTQYF.mjs +1 -0
  158. package/dist/esm/MfaEnrollmentFlowScreen-Cq48wofE.mjs +1 -0
  159. package/dist/esm/MfaVerifyFlowScreen-DNhPBBJ7.mjs +1 -0
  160. package/dist/esm/{ModalHeader-rCMpqA2a.mjs → ModalHeader-Dt9RfCUU.mjs} +1 -1
  161. package/dist/esm/MoonpayStatusScreen-CS0Qs79J.mjs +16 -0
  162. package/dist/esm/OAuthStatusScreen-Bq0Ey0ZF.mjs +1 -0
  163. package/dist/esm/PasskeySelectSignupOrLogin-c4yN_RBw.mjs +1 -0
  164. package/dist/esm/PasskeyStatusScreen-C6WM9Zrz.mjs +3 -0
  165. package/dist/esm/PasswordRecoveryScreen-DHUXnySi.mjs +20 -0
  166. package/dist/esm/{QrCode-DjnQgnaZ.mjs → QrCode-0otXb_E9.mjs} +1 -1
  167. package/dist/esm/RecoveryOAuthStatusScreen-DB8LKiZS.mjs +1 -0
  168. package/dist/esm/RecoveryPasswordCreateScreen-BdJzdrZT.mjs +1 -0
  169. package/dist/esm/{RecoverySelectionScreen-B2V3518x.mjs → RecoverySelectionScreen-CeFYbMt7.mjs} +2 -2
  170. package/dist/esm/{Screen-CV2tt2Ap.mjs → Screen-D3XHNOhT.mjs} +8 -9
  171. package/dist/esm/{ScreenLayout-DF3DCKOK.mjs → ScreenLayout-Dfp-g3KU.mjs} +1 -1
  172. package/dist/esm/{SetAutomaticRecoveryScreen-C6cFVbSx.mjs → SetAutomaticRecoveryScreen-D7M6fycA.mjs} +2 -2
  173. package/dist/esm/{SetWalletPasswordForm-ChA4tW4Y.mjs → SetWalletPasswordForm-Cqfgm_5A.mjs} +1 -1
  174. package/dist/esm/SignRequestScreen-C5i_Qoj2.mjs +26 -0
  175. package/dist/esm/{StandardSignAndSendTransactionScreen-D4OBsj5k.mjs → StandardSignAndSendTransactionScreen-B2CqPGkZ.mjs} +2 -2
  176. package/dist/esm/TelegramAuthScreen-BmmV0kiQ.mjs +1 -0
  177. package/dist/esm/{TransactionDetails-BP142O9n.mjs → TransactionDetails-BnQV3aq5.mjs} +1 -1
  178. package/dist/esm/{TransactionErrorView-BwwGMqSj.mjs → TransactionErrorView-CkXjlGw-.mjs} +1 -1
  179. package/dist/esm/{TransferFromWalletScreen-BHH0YcI4.mjs → TransferFromWalletScreen-C-WNRSeB.mjs} +2 -2
  180. package/dist/esm/{TransferOrBridgeLoadingScreen-VLQTcf_6.mjs → TransferOrBridgeLoadingScreen-3zmLJTU6.mjs} +1 -1
  181. package/dist/esm/UpdateEmailScreen-CbqW0_xT.mjs +1 -0
  182. package/dist/esm/UpdatePhoneScreen-0PswjFok.mjs +1 -0
  183. package/dist/esm/UserLimitReachedScreen-DaqBCoMH.mjs +1 -0
  184. package/dist/esm/{WalletInfoCard-ChBHG5L5.mjs → WalletInfoCard-D4QREH8T.mjs} +1 -1
  185. package/dist/esm/WalletInterstitialScreen-DP3jqPtN.mjs +1 -0
  186. package/dist/esm/{WalletLink-CN4enmsE.mjs → WalletLink-CeVlaFWB.mjs} +1 -1
  187. package/dist/esm/{WalletOverflowButton-B-nEN4GW.mjs → WalletOverflowButton-DxD32Aku.mjs} +1 -1
  188. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  189. package/dist/esm/context-DJw8ICPU.mjs +1 -0
  190. package/dist/esm/{ethers-BQ45eiVv.mjs → ethers-CG8w3aPx.mjs} +1 -1
  191. package/dist/esm/extended-chains.mjs +1 -1
  192. package/dist/esm/{get-is-unified-wallet-CNcx75Dp.mjs → get-is-unified-wallet-CtfiZMWv.mjs} +1 -1
  193. package/dist/esm/index-CMDYWbe4.mjs +174 -0
  194. package/dist/esm/{index-DoasOxbi.mjs → index-RPlvvhMv.mjs} +1 -1
  195. package/dist/esm/{index-2knYP69D.mjs → index-XM_HdCVn.mjs} +2 -2
  196. package/dist/esm/index.mjs +1 -1
  197. package/dist/esm/internal.mjs +1 -1
  198. package/dist/esm/{shared-DwO5pr5t.mjs → shared-CRLmzZyl.mjs} +1 -1
  199. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-Cv_C9s3_.mjs → shouldProceedtoEmbeddedWalletCreationFlow-C9ZLO2KP.mjs} +1 -1
  200. package/dist/esm/{smart-wallets-9LKzbfWj.mjs → smart-wallets-DbUfQZQ2.mjs} +1 -1
  201. package/dist/esm/smart-wallets.mjs +1 -1
  202. package/dist/esm/solana.mjs +1 -1
  203. package/dist/esm/{styles-BNn7MnP1.mjs → styles-Bb6ZtmWU.mjs} +1 -1
  204. package/dist/esm/{to-ui-error-CCqAdorW.mjs → to-ui-error-CRLswbee.mjs} +1 -1
  205. package/dist/esm/ui.mjs +39 -39
  206. package/dist/esm/use-export-wallet-BgKZ6lTG.mjs +1 -0
  207. package/dist/esm/use-export-wallet-ByGs9MT4.mjs +1 -0
  208. package/dist/esm/{useActiveWallet-RZ4w-uGq.mjs → useActiveWallet-DaOhml0T.mjs} +2 -2
  209. package/dist/esm/{useGetTokenPrice-DERdsrmf.mjs → useGetTokenPrice-D-ZL2L5m.mjs} +1 -1
  210. package/dist/esm/{useI18n-Dk9y58cU.mjs → useI18n-OYSBAOoJ.mjs} +1 -1
  211. package/dist/esm/usePrivy-CJdU0Qbv.mjs +1 -0
  212. package/dist/esm/{useSolanaRpcClient-B7UDPdLi.mjs → useSolanaRpcClient-B1FbNl2G.mjs} +1 -1
  213. package/dist/esm/useWallets-CbdM0Ytx.mjs +1 -0
  214. package/dist/esm/{useWallets-DlGuNtGR.mjs → useWallets-Cgll-RH3.mjs} +1 -1
  215. package/package.json +3 -3
  216. package/dist/cjs/AccountNotFoundScreen-BBWWze9O.js +0 -1
  217. package/dist/cjs/AffirmativeConsentScreen-CCwAwjH1.js +0 -6
  218. package/dist/cjs/AllowlistRejectionScreen-DEMYbzGA.js +0 -1
  219. package/dist/cjs/AuthenticateWithWalletScreen-dBvBC7MB.js +0 -1
  220. package/dist/cjs/AwaitingEvmToSolBridgingScreen-D9NwI47L.js +0 -2
  221. package/dist/cjs/AwaitingExternalEthereumTransferScreen-D_0NulpI.js +0 -2
  222. package/dist/cjs/AwaitingPasswordlessCodeScreen-B4HAKL4-.js +0 -103
  223. package/dist/cjs/AwaitingSolToEvmBridgingScreen-CnuLLTC0.js +0 -2
  224. package/dist/cjs/CaptchaScreen-N-ueJQF3.js +0 -1
  225. package/dist/cjs/CoinbaseOnrampStatusScreen-06yaO6r4.js +0 -16
  226. package/dist/cjs/ConnectLedgerScreen-C7vGQocf.js +0 -9
  227. package/dist/cjs/ConnectOnlyLandingScreen-_9y9kOsT.js +0 -1
  228. package/dist/cjs/ConnectOnlyStatusScreen-mZHx4a7S.js +0 -1
  229. package/dist/cjs/ConnectOrCreateScreen-Cp4uExOd.js +0 -1
  230. package/dist/cjs/ConnectionStatusScreen-B27DUsGt.js +0 -7
  231. package/dist/cjs/CrossAppAuthScreen-BbLFbCdU.js +0 -1
  232. package/dist/cjs/DelegatedActionsConsentScreen-DzWruJOn.js +0 -1
  233. package/dist/cjs/DelegatedActionsRevokeScreen-D-TwUXyj.js +0 -1
  234. package/dist/cjs/EmbeddedWalletConnectingScreen-CYav4Mjb.js +0 -1
  235. package/dist/cjs/EmbeddedWalletCreatedScreen-m0t_c_AA.js +0 -1
  236. package/dist/cjs/EmbeddedWalletKeyExportScreen-_4GMdJuo.js +0 -40
  237. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-B5-JBZRJ.js +0 -1
  238. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-CITAy3i6.js +0 -1
  239. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-DG5LKyjo.js +0 -1
  240. package/dist/cjs/ErrorScreen-xNDIVXx8.js +0 -4
  241. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-BCyBv_xe.js +0 -2
  242. package/dist/cjs/FundingEditAmountScreen-CDlb4Acx.js +0 -1
  243. package/dist/cjs/FundingMethodSelectionScreen-DlPxjsJq.js +0 -1
  244. package/dist/cjs/InAppBrowserLoginNotPossible-Bdx0vKyA.js +0 -1
  245. package/dist/cjs/InstallWalletScreen-Cshn01eK.js +0 -1
  246. package/dist/cjs/LandingScreen-0FdwpJ9w.js +0 -1
  247. package/dist/cjs/LinkEmailScreen-B7rxdQso.js +0 -1
  248. package/dist/cjs/LinkPhoneScreen-DweFqlM1.js +0 -1
  249. package/dist/cjs/LoginFailedScreen-mHcvCBEz.js +0 -1
  250. package/dist/cjs/ManualTransferScreen-CfYgtyLD.js +0 -1
  251. package/dist/cjs/MfaAuthEnrollmentFlowScreen-D631h0XW.js +0 -1
  252. package/dist/cjs/MfaAuthVerifyFlowScreen-BZ3IyqAd.js +0 -1
  253. package/dist/cjs/MfaEnrollmentFlowScreen-_tNeX5lT.js +0 -1
  254. package/dist/cjs/MfaVerifyFlowScreen-D_7nkuBq.js +0 -1
  255. package/dist/cjs/MoonpayStatusScreen-DoFbZ_0d.js +0 -16
  256. package/dist/cjs/OAuthStatusScreen-BZY7BiP5.js +0 -1
  257. package/dist/cjs/PasskeySelectSignupOrLogin-C3k_ixTz.js +0 -1
  258. package/dist/cjs/PasskeyStatusScreen-BX-SOBDr.js +0 -3
  259. package/dist/cjs/PasswordRecoveryScreen-VZQDtt5v.js +0 -20
  260. package/dist/cjs/RecoveryOAuthStatusScreen-DKYx6ECd.js +0 -1
  261. package/dist/cjs/RecoveryPasswordCreateScreen-DP0xOBMA.js +0 -1
  262. package/dist/cjs/TelegramAuthScreen-DV8KYJMX.js +0 -1
  263. package/dist/cjs/UpdateEmailScreen-DRJv5CZs.js +0 -1
  264. package/dist/cjs/UpdatePhoneScreen-C3myqOv0.js +0 -1
  265. package/dist/cjs/UserLimitReachedScreen-l_e6Vhr0.js +0 -1
  266. package/dist/cjs/WalletInterstitialScreen-BgoDwKIp.js +0 -1
  267. package/dist/cjs/get-is-unified-wallet-BwdzQwn_.js +0 -1
  268. package/dist/cjs/index-CzmnSRoa.js +0 -174
  269. package/dist/cjs/prepareFundingModalData-DDf6xLze.js +0 -1
  270. package/dist/cjs/use-export-wallet-C9HWu0Dq.js +0 -1
  271. package/dist/cjs/usePrivy-Bx2PKTrU.js +0 -1
  272. package/dist/cjs/useWallets-BwB7ALB8.js +0 -1
  273. package/dist/esm/AccountNotFoundScreen-C6S8_GyN.mjs +0 -1
  274. package/dist/esm/AffirmativeConsentScreen-QfJBfI_f.mjs +0 -6
  275. package/dist/esm/AllowlistRejectionScreen-CX57yv4U.mjs +0 -1
  276. package/dist/esm/AuthenticateWithWalletScreen-CZJ-aWhZ.mjs +0 -1
  277. package/dist/esm/AwaitingEvmToSolBridgingScreen-C1CMtT4Y.mjs +0 -2
  278. package/dist/esm/AwaitingExternalEthereumTransferScreen-DX91STcF.mjs +0 -2
  279. package/dist/esm/AwaitingPasswordlessCodeScreen-BuExr50N.mjs +0 -103
  280. package/dist/esm/AwaitingSolToEvmBridgingScreen-Bm1i_2qW.mjs +0 -2
  281. package/dist/esm/CaptchaScreen-B-hFDb5f.mjs +0 -1
  282. package/dist/esm/CoinbaseOnrampStatusScreen-OHm2RUBv.mjs +0 -16
  283. package/dist/esm/ConnectLedgerScreen-BHLYW-F3.mjs +0 -9
  284. package/dist/esm/ConnectOnlyLandingScreen-C6nzEwpN.mjs +0 -1
  285. package/dist/esm/ConnectOnlyStatusScreen-CremlXDY.mjs +0 -1
  286. package/dist/esm/ConnectOrCreateScreen-262UvCdD.mjs +0 -1
  287. package/dist/esm/ConnectionStatusScreen-mk5beBL7.mjs +0 -7
  288. package/dist/esm/CrossAppAuthScreen-BXjEJQv6.mjs +0 -1
  289. package/dist/esm/DelegatedActionsConsentScreen-ANmQe-9G.mjs +0 -1
  290. package/dist/esm/DelegatedActionsRevokeScreen-D9X7mWmI.mjs +0 -1
  291. package/dist/esm/EmbeddedWalletConnectingScreen-2g-RrIvW.mjs +0 -1
  292. package/dist/esm/EmbeddedWalletCreatedScreen-BXTAv4_-.mjs +0 -1
  293. package/dist/esm/EmbeddedWalletKeyExportScreen-DYVHVHOj.mjs +0 -40
  294. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-CYyMoMFF.mjs +0 -1
  295. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-oT5ZcPQV.mjs +0 -1
  296. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BQcHDyuV.mjs +0 -1
  297. package/dist/esm/ErrorScreen-CLfeO5pd.mjs +0 -4
  298. package/dist/esm/FarcasterSignerStatusScreen-B135UOnV.mjs +0 -28
  299. package/dist/esm/FundSolWalletWithExternalSolanaWallet-DO3ttgom.mjs +0 -1
  300. package/dist/esm/FundingEditAmountScreen-BRQb2ffL.mjs +0 -1
  301. package/dist/esm/FundingMethodSelectionScreen-DTt1Z5RI.mjs +0 -1
  302. package/dist/esm/InAppBrowserLoginNotPossible-DH96QD2c.mjs +0 -1
  303. package/dist/esm/InstallWalletScreen-PnK6VfrP.mjs +0 -1
  304. package/dist/esm/LandingScreen-D_EvjOHf.mjs +0 -1
  305. package/dist/esm/LinkEmailScreen-CT8gAQr3.mjs +0 -1
  306. package/dist/esm/LinkPhoneScreen-ccrKA6tf.mjs +0 -1
  307. package/dist/esm/LoginFailedScreen-BwgxhbMf.mjs +0 -1
  308. package/dist/esm/ManualTransferScreen-DgCG2P3B.mjs +0 -1
  309. package/dist/esm/MfaAuthEnrollmentFlowScreen-CNVUTOnE.mjs +0 -1
  310. package/dist/esm/MfaAuthVerifyFlowScreen-2nvvFipu.mjs +0 -1
  311. package/dist/esm/MfaEnrollmentFlowScreen-DfnIqNNU.mjs +0 -1
  312. package/dist/esm/MfaVerifyFlowScreen-BwerwBz5.mjs +0 -1
  313. package/dist/esm/MoonpayStatusScreen-D5fRCEb3.mjs +0 -16
  314. package/dist/esm/OAuthStatusScreen-DtLgYw89.mjs +0 -1
  315. package/dist/esm/PasskeySelectSignupOrLogin-QoPhmagh.mjs +0 -1
  316. package/dist/esm/PasskeyStatusScreen-DzjU3ZVT.mjs +0 -3
  317. package/dist/esm/PasswordRecoveryScreen-LZYGRBkP.mjs +0 -20
  318. package/dist/esm/RecoveryOAuthStatusScreen-DKfp8Udh.mjs +0 -1
  319. package/dist/esm/RecoveryPasswordCreateScreen-D4DI5Bom.mjs +0 -1
  320. package/dist/esm/SignRequestScreen-BslfKJ1N.mjs +0 -26
  321. package/dist/esm/TelegramAuthScreen-BJq5f_Rq.mjs +0 -1
  322. package/dist/esm/UpdateEmailScreen-CMFBvYz5.mjs +0 -1
  323. package/dist/esm/UpdatePhoneScreen-DmhHcNq3.mjs +0 -1
  324. package/dist/esm/UserLimitReachedScreen-DNqgCf3B.mjs +0 -1
  325. package/dist/esm/WalletInterstitialScreen-RS89fm6t.mjs +0 -1
  326. package/dist/esm/context-LVpDfP2H.mjs +0 -1
  327. package/dist/esm/index-DNz_w3-G.mjs +0 -174
  328. package/dist/esm/prepareFundingModalData-DjTxAoJ1.mjs +0 -1
  329. package/dist/esm/use-export-wallet-DllHf-2F.mjs +0 -1
  330. package/dist/esm/usePrivy-Dj52a5sp.mjs +0 -1
  331. package/dist/esm/useWallets-cSQYA-Jk.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as c}from"styled-components";import{u as l}from"./context-LVpDfP2H.mjs";import{G as i}from"./useActiveWallet-RZ4w-uGq.mjs";import d from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import n from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import t from"@heroicons/react/24/outline/XMarkIcon";import{u as v}from"./internal-context-Z-fyxadS.mjs";function s(o){/*#__PURE__*/return r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...o,children:/*#__PURE__*/r("g",{fill:o.color||"var(--privy-color-foreground)",children:/*#__PURE__*/r("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 p=a.span`
1
+ import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as c}from"styled-components";import{u as l}from"./context-DJw8ICPU.mjs";import{G as i}from"./useActiveWallet-DaOhml0T.mjs";import d from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import n from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import t from"@heroicons/react/24/outline/XMarkIcon";import{u as v}from"./internal-context-Z-fyxadS.mjs";function s(o){/*#__PURE__*/return r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...o,children:/*#__PURE__*/r("g",{fill:o.color||"var(--privy-color-foreground)",children:/*#__PURE__*/r("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 p=a.span`
2
2
  margin-top: 16px;
3
3
  font-size: 13px;
4
4
  text-align: center;
@@ -0,0 +1,16 @@
1
+ import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import o 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{M as l,B as s,P as c}from"./ModalHeader-Dt9RfCUU.mjs";import{a as m}from"./Layouts-BlFm53ED.mjs";import{L as d,a7 as u}from"./useActiveWallet-DaOhml0T.mjs";import{u as p}from"./context-DJw8ICPU.mjs";import{u as h}from"./internal-context-Z-fyxadS.mjs";import{a as f}from"./get-is-unified-wallet-CtfiZMWv.mjs";import{u as g}from"./index-RPlvvhMv.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"zustand";import"react-device-detect";import"./use-export-wallet-ByGs9MT4.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-Cgll-RH3.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"tinycolor2";import"ofetch";import"./analytics-mkkvFRju.mjs";const y=({size:r=61,...o})=>/*#__PURE__*/t("svg",{width:r,height:r,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,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 v={component:()=>{let{data:o,setModalData:i,navigateBack:n}=f(),a=p(),{closePrivyModal:c}=h(),{externalTransactionId:m}=o?.moonpayStatus,d=g(m||null,a.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/t(l,{title:"Fund account",backFn:()=>{let t={...o?.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(t.usingDefaultFundingMethod=!1),i({funding:t,solanaFundingData:o?.solanaFundingData}),n()}}),/*#__PURE__*/t(C,{status:d,onClickCta:c}),/*#__PURE__*/t(s,{})]})}};let C=({status:o,onClickCta:i})=>{let{title:a,body:l,cta:s}=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:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(x,{children:[/*#__PURE__*/t(w,{status:o}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t("h3",{children:a}),/*#__PURE__*/t(b,{children:l})]})]}),s&&/*#__PURE__*/t(c,{onClick:i,children:s})]})},w=({status:r})=>{if(!r||"pending"===r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(d,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(u,{color:r}),/*#__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(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(r),a=(l=r)?{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)"}[l]:"var(--privy-color-foreground-4)";var l;/*#__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=a.p`
2
+ font-size: 1rem;
3
+ color: var(--privy-color-foreground-3);
4
+ margin-bottom: 1rem;
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 1rem;
8
+ `,x=a.div`
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ justify-content: center;
13
+ margin-left: 1.75rem;
14
+ margin-right: 1.75rem;
15
+ padding: 2rem 0;
16
+ `;export{v as MoonpayStatusScreen,v as default};
@@ -0,0 +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-CtfiZMWv.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 T}from"./context-DJw8ICPU.mjs";import{b as A,u as S,k as w}from"./internal-context-Z-fyxadS.mjs";import{s as b}from"./shouldProceedtoEmbeddedWalletCreationFlow-C9ZLO2KP.mjs";import{S as C}from"./ScreenLayout-Dfp-g3KU.mjs";import{e as _}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{l as j}from"./index-CMDYWbe4.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-Dt9RfCUU.mjs";import"styled-components";import"./useActiveWallet-DaOhml0T.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-ByGs9MT4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-Cgll-RH3.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.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"./Screen-D3XHNOhT.mjs";import"./index-Dq_xe9dz.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-CJdU0Qbv.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.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===A.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===A.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===A.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===A.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===A.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===A.OAUTH_ACCOUNT_SUSPENDED){let e=U(t,r).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===A.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===A.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:P,component:D}=U(k,p.customOAuthProviders);return o((()=>{v(k).then((()=>{O(!0),g(!0)})).catch((e=>{if(g(!1),e?.privyErrorCode===A.ALLOWLIST_REJECTED)return N(void 0),d(),void l("AllowlistRejectionScreen");if(e?.privyErrorCode===A.USER_LIMIT_REACHED)return console.error(new w(e).toString()),N(void 0),d(),void l("UserLimitReachedScreen");if(e?.privyErrorCode===A.USER_DOES_NOT_EXIST)return N(void 0),d(),void l("AccountNotFoundScreen");if(e?.privyErrorCode===A.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()}))}),[P,k]),o((()=>{if(s&&t&&_&&m){if(p?.legal.requireUsersAcceptTerms&&!m.hasAcceptedTerms){let e=setTimeout((()=>{l("AffirmativeConsentScreen")}),T);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")}),T);return()=>clearTimeout(e)}{let e=setTimeout((()=>f({shouldCallAuthOnSuccess:!0,isSuccess:!0})),T);return y(),()=>clearTimeout(e)}}}),[s,t,_,m]),/*#__PURE__*/e(L,{providerName:P,ProviderLogo:D,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};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as o}from"./index-CMDYWbe4.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as r}from"./get-is-unified-wallet-CtfiZMWv.mjs";import{S as a}from"./ScreenLayout-Dfp-g3KU.mjs";import"react";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DaOhml0T.mjs";import"zustand";import"./context-DJw8ICPU.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./use-export-wallet-ByGs9MT4.mjs";import"viem/utils";import"./useWallets-Cgll-RH3.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CJdU0Qbv.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-Dt9RfCUU.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"./Screen-D3XHNOhT.mjs";import"./index-Dq_xe9dz.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};
@@ -0,0 +1,3 @@
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-DJw8ICPU.mjs";import{c,b as m,u}from"./internal-context-Z-fyxadS.mjs";import{a as l,u as p}from"./get-is-unified-wallet-CtfiZMWv.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-C9ZLO2KP.mjs";import{S as y}from"./ScreenLayout-Dfp-g3KU.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./index-CMDYWbe4.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DaOhml0T.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-ByGs9MT4.mjs";import"viem/utils";import"./useWallets-Cgll-RH3.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CJdU0Qbv.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-Dt9RfCUU.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"./Screen-D3XHNOhT.mjs";import"./index-Dq_xe9dz.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:w}=u(),{user:v,logout:k}=p(),{passkeySignupFlow:j}=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{j?await f():await y(),C("success")}catch(e){P(e),C("error")}};return s((()=>{if("success"===b&&v){if(m?.legal.requireUsersAcceptTerms&&!v.hasAcceptedTerms)return void W(setTimeout((()=>{c("AffirmativeConsentScreen")}),S));if(!d(v,m?.embeddedWallets))return void W(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));W(setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),w({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),k()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),S))}}),[v,b]),s((()=>{T()}),[]),/*#__PURE__*/e(h,{status:b,passkeySignupFlow:j,error:A,onRetry:T})}};let g=i.span`
2
+ white-space: pre-wrap;
3
+ `;export{f as PasskeyStatusScreen,h as PasskeyStatusScreenView,f as default};
@@ -0,0 +1,20 @@
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as o,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as l,h as c}from"./get-is-unified-wallet-CtfiZMWv.mjs";import{P as m}from"./ModalHeader-Dt9RfCUU.mjs";import{S as d}from"./Layouts-BlFm53ED.mjs";import{P as p,a as u,I as h,H as y,S as v}from"./shared-CRLmzZyl.mjs";import{n as f}from"./index-CMDYWbe4.mjs";import{u as w,m as g}from"./internal-context-Z-fyxadS.mjs";import{S as j}from"./Screen-D3XHNOhT.mjs";import"viem";import"./context-DJw8ICPU.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-DaOhml0T.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-ByGs9MT4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-Cgll-RH3.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.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"@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-CJdU0Qbv.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./index-Dq_xe9dz.mjs";const b={component:()=>{let[s,a]=o(!0),{authenticated:m,user:b}=n(),{walletProxy:A,closePrivyModal:I,createAnalyticsEvent:P,client:S}=w(),{navigate:W,data:T,onUserCloseViaDialogOrKeybindRef:_}=l(),[E,R]=o(void 0),[H,M]=o(""),[U,N]=o(!1),{entropyId:O,entropyIdVerifier:V,onCompleteNavigateTo:$,onSuccess:z,onFailure:B}=T.recoverWallet,F=(e="User exited before their wallet could be recovered")=>{I({shouldCallAuthOnSuccess:!1}),B("string"==typeof e?new g(e):e)};_.current=F,i((()=>{if(!m)return F("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:t,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:F}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(x,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(p,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&R(e)})(e.target.value),disabled:U,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)})})]}),!!H&&/*#__PURE__*/r(k,{children:H})]})})}),/*#__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(C,{loading:U||!A,disabled:!E,onClick:async()=>{N(!0);let e=await S.getAccessToken(),r=c(b,O);if(!e||!r||null===E)return F("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:O,entropyIdVerifier:V,recoveryPassword:E})),M(""),$?W($):I({shouldCallAuthOnSuccess:!1}),z?.(r),P({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){f(e)?M("Invalid recovery password, please try again."):M("An error has occurred, please try again.")}finally{N(!1)}},$hideAnimations:!O&&U,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let x=s.div`
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 1.5rem;
5
+ `,k=s.div`
6
+ line-height: 20px;
7
+ height: 20px;
8
+ font-size: 13px;
9
+ color: var(--privy-color-error);
10
+ text-align: left;
11
+ margin-top: 0.5rem;
12
+ `,C=s(m)`
13
+ ${({$hideAnimations:e})=>e&&a`
14
+ && {
15
+ // Remove animations because the recoverWallet task on the iframe partially
16
+ // blocks the renderer, so the animation stutters and doesn't look good
17
+ transition: none;
18
+ }
19
+ `}
20
+ `;export{b as PasswordRecoveryScreen,b as default};
@@ -1,4 +1,4 @@
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 c}from"./context-LVpDfP2H.mjs";import{a2 as n,a3 as a}from"./useActiveWallet-RZ4w-uGq.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:c})=>
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 c}from"./context-DJw8ICPU.mjs";import{a2 as n,a3 as a}from"./useActiveWallet-DaOhml0T.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:c})=>
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:c},`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,c)=>r?/*#__PURE__*/e("rect",{height:t-.4,width:t-.4,x:o*t+.1*t,y:c*t+.1*t,rx:.5*t,ry:.5*t,fill:i},`cell-${o}-${c}`):/*#__PURE__*/e(l.Fragment,{},`circle-${o}-${c}`)))))}),u=({cellSize:t,matrixSize:l,element:i,sizePercentage:c,bgColor:n})=>{if(!i)/*#__PURE__*/return e(o,{});let a=l*(c||.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:n}),/*#__PURE__*/e(i,{x:s+.1*m,y:s+.1*m,height:d,width:d})]})},f=o=>{let t=o.outputSize,l=m(o.url,o.errorCorrectionLevel),i=t/l.length,c=n(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:`${c}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(u,{cellSize:i,element:o.logo?.element,bgColor:o.bgColor,matrixSize:l.length})]})},x=i.div.attrs({className:"ph-no-capture"})`
3
3
  display: flex;
4
4
  justify-content: center;
@@ -0,0 +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{M as c,P as s,B as l}from"./ModalHeader-Dt9RfCUU.mjs";import{C as n}from"./ScreenHeader-CHmc4-Lu.mjs";import{q as d}from"./context-DJw8ICPU.mjs";import{o as p,q as u,r as m,v as h,R as v,l as w}from"./index-CMDYWbe4.mjs";import{a as y,f,b as _,u as A}from"./internal-context-Z-fyxadS.mjs";import{a as E,u as g,g as C}from"./get-is-unified-wallet-CtfiZMWv.mjs";import{a8 as b,a9 as R,aa as k}from"./paths-3HW55qZg.mjs";import{g as T}from"./useWallets-Cgll-RH3.mjs";import{a as O}from"./events-context-CI0iqAXA.mjs";import{A as N,G as S,R as I}from"./styles-BsotlekN.mjs";import"styled-components";import"./useActiveWallet-DaOhml0T.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-ByGs9MT4.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"viem";import"./getPublicClient-B4uPLKn-.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-CJdU0Qbv.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";async function x({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 M({api:e,provider:t,stateCode:r,codeVerifier:o,authorizationCode:a}){if(!a||!r)throw new y("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new y("User denied confirmation during OAuth flow");try{return(await e.post(b,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=f(e);if(t.privyErrorCode)throw new y(t.message||"Invalid code during OAuth flow.",void 0,t.privyErrorCode);if("User denied confirmation during OAuth flow"===t.message)throw new y("Invalid code during oauth flow.",void 0,_.OAUTH_USER_DENIED);throw new y("Invalid code during OAuth flow.",void 0,_.UNKNOWN_AUTH_ERROR)}}async function U({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(R,{client_type:"web"})).url}:{url:(await e.post(k,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw f(e)}}let j={"google-drive":{name:"Google Drive",component:S},icloud:{name:"iCloud",component:N}};const W={component:()=>{let{logout:p}=g(),{navigate:u,setModalData:m,data:f}=E(),{closePrivyModal:b,createAnalyticsEvent:R}=A(),{execute:k}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=A(),{data:o}=E(),{user:a}=g(),i=O(),{create:c}=h();return{execute:async({provider:s,action:l,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new y("Missing client");function h(t){if(!t&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:s}}),new y("Recovery OAuth failed")}switch(s){case"google-drive":{let t,r,{url:o,codeVerifier:a,stateCode:i}=await U({api:e.api,provider:s});h(o);try{let a=await x({url:o,popup:n,provider:s});if(t=a.stateCode,r=a.authorizationCode,t!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:s,storedStateCode:i??"",returnedStateCode:t??""}}),new y("Unexpected auth flow. This may be a phishing attempt.",void 0,_.OAUTH_UNEXPECTED)}catch(t){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:t.toString(),provider:s}}),new y("Recovery OAuth failed")}[u,m]=await Promise.all([e.getAccessToken(),M({api:e.api,provider:s,codeVerifier:a,stateCode:t,authorizationCode:r})]);break}case"icloud":{let{url:t}=await U({api:e.api,provider:s});h(t);let{ckWebAuthToken:r}=await x({url:t,popup:n,provider:s});m=r,u=await e.getAccessToken()}}if(!t)throw new y("Cannot connect to wallet proxy");if(!u)throw new y("Unable to authorize user");switch(l){case"recover":{let r=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!r||!a)throw new y("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r,recoveryMethod:s}}),await t.recover({accessToken:u,entropyId:r,entropyIdVerifier:a,recoveryAccessToken:m}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r,recoveryMethod:s}});break}case"create-wallet":{let t;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),d&&p)t=await c({recoveryMethod:s,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:s,recoveryAccessToken:m,chainType:"solana",walletIndex:0,latestUser:a});else{if(!d)throw Error("Invalid args to create wallet");t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!t)throw i("createWallet","onError",_.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=C(a);if(!o)throw i("setWalletRecovery","onError",_.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:s}});let{entropyId:c,entropyIdVerifier:l}=T(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:l,recoveryMethod:s,recoveryAccessToken:m});let n=C(await r());if(!n)throw i("createWallet","onError",_.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:s}}),i("setWalletRecovery","onSuccess",{method:s,wallet:n});break}default:throw new y("Unsupported recovery action")}}}})(),[N,S]=o(!1),{provider:W,action:D,isInAccountCreateFlow:P,shouldCreateEth:V,shouldCreateSol:L}=f?.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=j[W].name,G=j[W].component,K=f?.recoverWallet?.onCompleteNavigateTo,Y=new v((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await k({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=>{R({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):b({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(c,{}),$?/*#__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(s,{onClick:()=>{w(),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(s,{onClick:q,children:["Confirm with ",X]})]}),/*#__PURE__*/r(l,{})]})}};export{W as RecoveryOAuthScreen,W as default};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import{u as r}from"./context-DJw8ICPU.mjs";import{v as i,R as s}from"./index-CMDYWbe4.mjs";import{u as a,m as n}from"./internal-context-Z-fyxadS.mjs";import{a as c,u as l}from"./get-is-unified-wallet-CtfiZMWv.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-Cqfgm_5A.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DaOhml0T.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-ByGs9MT4.mjs";import"viem/utils";import"./useWallets-Cgll-RH3.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CJdU0Qbv.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"./ModalHeader-Dt9RfCUU.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-CRLmzZyl.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.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-CHmc4-Lu.mjs";const u={component:()=>{let{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=o(""),[f,j]=o(!1),[C,g]=o(),[I,b]=o(null),{create:x}=i(),{authenticated:S,user:P}=l(),{closePrivyModal:A,isNewUserThisSession:U,initializeWalletProxy:k}=a(),{onSuccess:E,onFailure:M,callAuthOnSuccessOnClose:T,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=o(null),R=new s((async()=>{try{let e;if(O&&W)e=await x({recoveryMethod:"user-passcode",recoveryPassword:C,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:C,chainType:"solana",walletIndex:0,latestUser:P});else{if(!O)throw Error("Invalid args to create wallet");e=await x({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:P})}L(e),U?u("EmbeddedWalletCreatedScreen"):(E(e),A({shouldCallAuthOnSuccess:T}))}catch(e){v(e.message)}}));t((()=>{I||k(3e4).then((e=>b(e)))}),[I]),t((()=>{if(!S||!P)return u("LandingScreen"),void M(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:f,buttonHideAnimations:!D&&f,isResettingPassword:!1,error:y,password:C||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(M(new n("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(E(D),A({shouldCallAuthOnSuccess:T})):(M(new n("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:g,onPasswordGenerate:()=>g(p()),onSubmit:async()=>(j(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>j(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
@@ -1,7 +1,7 @@
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-CNcx75Dp.mjs";import{M as d,B as u,P as m}from"./ModalHeader-rCMpqA2a.mjs";import{C as h}from"./ScreenHeader-CHmc4-Lu.mjs";import{u as y}from"./context-LVpDfP2H.mjs";import{u as v}from"./internal-context-Z-fyxadS.mjs";import{w as g}from"./index-DNz_w3-G.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BsotlekN.mjs";import{U as k}from"./useActiveWallet-RZ4w-uGq.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-DlGuNtGR.mjs";import"./prepareFundingModalData-DjTxAoJ1.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-Dj52a5sp.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-B4uPLKn-.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";let S=n.div`
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-CtfiZMWv.mjs";import{M as d,B as u,P as m}from"./ModalHeader-Dt9RfCUU.mjs";import{C as h}from"./ScreenHeader-CHmc4-Lu.mjs";import{u as y}from"./context-DJw8ICPU.mjs";import{u as v}from"./internal-context-Z-fyxadS.mjs";import{w as g}from"./index-CMDYWbe4.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BsotlekN.mjs";import{U as k}from"./useActiveWallet-DaOhml0T.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-Cgll-RH3.mjs";import"./use-export-wallet-ByGs9MT4.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CJdU0Qbv.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-B4uPLKn-.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";let S=n.div`
2
2
  width: 24px;
3
3
  height: 24px;
4
4
  display: flex;
5
5
  justify-content: center;
6
6
  align-items: center;
7
- `,A={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},b=({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(m,{onClick:t,children:"Select backup method"})]});const x={component:()=>{let[s,n]=c(!1),{navigate:m,lastScreen:j,navigateBack:x,setModalData:M,data:I,onUserCloseViaDialogOrKeybindRef:P}=a(),{user:O}=l(),{embeddedWallets:W}=y(),{closePrivyModal:R}=v(),F=p(O),D=null===F,{isInAccountCreateFlow:B,isResettingPassword:E,shouldCreateEth:G,shouldCreateSol:U}=I.recoverySelection,H=F&&"privy"!==F.recoveryMethod,L=H?/*#__PURE__*/e("span",{children:["Your account is currently secured using"," ",/*#__PURE__*/o("strong",{children:A[F?.recoveryMethod||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function Y(e){M({recoveryOAuthStatus:{provider:e,action:D?"create-wallet":"set-recovery",isInAccountCreateFlow:B,shouldCreateEth:G,shouldCreateSol:U}}),m("RecoveryOAuthScreen")}function q(){I?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),R({shouldCallAuthOnSuccess:I?.setWalletPassword?.callAuthOnSuccessOnClose??!1})}return P.current=q,/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(d,{onClose:q,backFn:s?()=>n(!1):j?x:void 0,infoFn:j||s?void 0:()=>n(!0)},"header"),s?/*#__PURE__*/o(b,{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:()=>{m(g({isCreatingWallet:D,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{x as RecoverySelectionScreen,x as default};
7
+ `,A={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},x=({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(m,{onClick:t,children:"Select backup method"})]});const b={component:()=>{let[s,n]=c(!1),{navigate:m,lastScreen:j,navigateBack:b,setModalData:I,data:M,onUserCloseViaDialogOrKeybindRef:P}=a(),{user:O}=l(),{embeddedWallets:W}=y(),{closePrivyModal:R}=v(),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:A[F?.recoveryMethod||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function Y(e){I({recoveryOAuthStatus:{provider:e,action:B?"create-wallet":"set-recovery",isInAccountCreateFlow:D,shouldCreateEth:G,shouldCreateSol:U}}),m("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(d,{onClose:q,backFn:s?()=>n(!1):j?b:void 0,infoFn:j||s?void 0:()=>n(!0)},"header"),s?/*#__PURE__*/o(x,{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:()=>{m(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{b as RecoverySelectionScreen,b 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-RZ4w-uGq.mjs";import{M as a,B as t}from"./ModalHeader-rCMpqA2a.mjs";import{N as c}from"./index-Dq_xe9dz.mjs";const l=o.div`
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-DaOhml0T.mjs";import{M as t,B as a}from"./ModalHeader-Dt9RfCUU.mjs";import{N as c}from"./index-Dq_xe9dz.mjs";const l=o.div`
2
2
  /* spacing tokens */
3
3
  --screen-space: 16px; /* base 1x = 16 */
4
4
  --screen-space-lg: calc(var(--screen-space) * 1.5); /* 24px */
@@ -21,7 +21,7 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{st
21
21
  position: relative;
22
22
  display: flex;
23
23
  flex-direction: column;
24
- `,p=o(a)`
24
+ `,p=o(t)`
25
25
  margin: 0 -8px;
26
26
  `,g=o.div`
27
27
  flex: 1 1 auto;
@@ -94,7 +94,6 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{st
94
94
  display: flex;
95
95
  align-items: center;
96
96
  justify-content: center;
97
- margin-bottom: var(--screen-space);
98
97
 
99
98
  img,
100
99
  svg {
@@ -133,7 +132,7 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{st
133
132
  border-top-left-radius: inherit;
134
133
  border-top-right-radius: inherit;
135
134
  overflow: hidden;
136
- `,E=o(t)`
135
+ `,E=o(a)`
137
136
  padding: 0;
138
137
  && a {
139
138
  padding: 0;
@@ -145,19 +144,19 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{st
145
144
  background: var(--privy-color-foreground-3);
146
145
  border-radius: 2px;
147
146
  transition: width 300ms ease-in-out;
148
- `,F=({step:r})=>r?/*#__PURE__*/e(k,{children:/*#__PURE__*/e(j,{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:v,onClose:x,step:b,...y})=>/*#__PURE__*/r(s,{...y,children:[/*#__PURE__*/e(p,{backFn:c?l:void 0,infoFn:d?g:void 0,onClose:v?x:void 0,closeable:v}),(n||a||i||o)&&/*#__PURE__*/r(h,{children:[n||a?/*#__PURE__*/e(w.Icon,{icon:n,variant:a,loadingStatus:t}):null,/*#__PURE__*/r(u,{children:[i&&/*#__PURE__*/e(f,{children:i}),o&&/*#__PURE__*/e(m,{children:o})]})]}),b&&/*#__PURE__*/e(F,{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(v,{id:"privy-content-footer-container",...i,children:r}),w.Actions=({children:r,...i})=>/*#__PURE__*/e($,{...i,children:r}),w.HelpText=({children:r,...i})=>/*#__PURE__*/e(C,{...i,children:r}),w.Watermark=()=>/*#__PURE__*/e(E,{}),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?
149
- /*#__PURE__*/e(y,{children:/*#__PURE__*/r("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[/*#__PURE__*/e(n,{success:t?.success,fail:t?.fail}),"string"==typeof o?
147
+ `,F=({step:r})=>r?/*#__PURE__*/e(k,{children:/*#__PURE__*/e(j,{pct:Math.min(100,r.current/r.total*100)})}):null;w.Header=({title:i,subtitle:o,icon:n,iconVariant:t,iconLoadingStatus:a,showBack:c,onBack:l,showInfo:d,onInfo:g,showClose:v,onClose:x,step:b,...y})=>/*#__PURE__*/r(s,{...y,children:[/*#__PURE__*/e(p,{backFn:c?l:void 0,infoFn:d?g:void 0,onClose:v?x:void 0,closeable:v}),(n||t||i||o)&&/*#__PURE__*/r(h,{children:[n||t?/*#__PURE__*/e(w.Icon,{icon:n,variant:t,loadingStatus:a}):null,!(!i&&!o)&&/*#__PURE__*/r(u,{children:[i&&/*#__PURE__*/e(f,{children:i}),o&&/*#__PURE__*/e(m,{children:o})]})]}),b&&/*#__PURE__*/e(F,{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(v,{id:"privy-content-footer-container",...i,children:r}),w.Actions=({children:r,...i})=>/*#__PURE__*/e($,{...i,children:r}),w.HelpText=({children:r,...i})=>/*#__PURE__*/e(C,{...i,children:r}),w.Watermark=()=>/*#__PURE__*/e(E,{}),w.Icon=({icon:o,variant:t="subtle",loadingStatus:a})=>"logo"===t&&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"===t?o?
148
+ /*#__PURE__*/e(y,{children:/*#__PURE__*/r("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[/*#__PURE__*/e(n,{success:a?.success,fail:a?.fail}),"string"==typeof o?
150
149
  /*#__PURE__*/e("span",{style:{background:`url('${o}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):/*#__PURE__*/i.isValidElement(o)?
151
150
  /*#__PURE__*/i.cloneElement(o,{style:{width:"38px",height:"38px"}}):
152
151
  /*#__PURE__*/i.createElement(o,{style:{width:"38px",height:"38px"}})]})}):
153
- /*#__PURE__*/e(x,{$variant:a,children:/*#__PURE__*/e(c,{size:"64px"})}):/*#__PURE__*/e(x,{$variant:a,children:o&&("string"==typeof o?
152
+ /*#__PURE__*/e(x,{$variant:t,children:/*#__PURE__*/e(c,{size:"64px"})}):/*#__PURE__*/e(x,{$variant:t,children:o&&("string"==typeof o?
154
153
  /*#__PURE__*/e("img",{src:o,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):/*#__PURE__*/i.isValidElement(o)?o:
155
- /*#__PURE__*/i.createElement(o,{width:32,height:32,stroke:(()=>{switch(a){case"success":return"var(--privy-color-icon-success)";case"warning":return"var(--privy-color-icon-warning)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}})(),strokeWidth:2}))});let $=o.div`
154
+ /*#__PURE__*/i.createElement(o,{width:32,height:32,stroke:(()=>{switch(t){case"success":return"var(--privy-color-icon-success)";case"warning":return"var(--privy-color-icon-warning)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}})(),strokeWidth:2}))});let $=o.div`
156
155
  width: 100%;
157
156
  display: flex;
158
157
  flex-direction: column;
159
158
  gap: calc(var(--screen-space) / 2);
160
- `,C=o.p`
159
+ `,C=o.div`
161
160
  && {
162
161
  margin: 0;
163
162
  width: 100%;
@@ -1 +1 @@
1
- import{jsxs as r,Fragment as e,jsx as l}from"react/jsx-runtime";import{a}from"./ModalHeader-rCMpqA2a.mjs";import{S as t}from"./Screen-CV2tt2Ap.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:d,watermark:s=!0,children:c,...m})=>{let o=n||i?/*#__PURE__*/r(e,{children:[n&&(()=>{let{label:r,...e}=n,t=e.variant||"primary";/*#__PURE__*/return l(a,{...e,variant:t,style:{width:"100%",...e.style},children:r})})(),i&&(()=>{let{label:r,...e}=i,t=e.variant||"secondary";/*#__PURE__*/return l(a,{...e,variant:t,style:{width:"100%",...e.style},children:r})})()]}):null;/*#__PURE__*/return r(t,{id:m.id,className:m.className,children:[/*#__PURE__*/l(t.Header,{...m}),c?/*#__PURE__*/l(t.Body,{children:c}):null,d||o||s?/*#__PURE__*/r(t.Footer,{children:[d?/*#__PURE__*/l(t.HelpText,{children:d}):null,o?/*#__PURE__*/l(t.Actions,{children:o}):null,s?/*#__PURE__*/l(t.Watermark,{}):null]}):null]})};export{n as S};
1
+ import{jsxs as r,Fragment as e,jsx as l}from"react/jsx-runtime";import{a}from"./ModalHeader-Dt9RfCUU.mjs";import{S as t}from"./Screen-D3XHNOhT.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:d,watermark:s=!0,children:c,...m})=>{let o=n||i?/*#__PURE__*/r(e,{children:[n&&(()=>{let{label:r,...e}=n,t=e.variant||"primary";/*#__PURE__*/return l(a,{...e,variant:t,style:{width:"100%",...e.style},children:r})})(),i&&(()=>{let{label:r,...e}=i,t=e.variant||"secondary";/*#__PURE__*/return l(a,{...e,variant:t,style:{width:"100%",...e.style},children:r})})()]}):null;/*#__PURE__*/return r(t,{id:m.id,className:m.className,children:[/*#__PURE__*/l(t.Header,{...m}),c?/*#__PURE__*/l(t.Body,{children:c}):null,d||o||s?/*#__PURE__*/r(t.Footer,{children:[d?/*#__PURE__*/l(t.HelpText,{children:d}):null,o?/*#__PURE__*/l(t.Actions,{children:o}):null,s?/*#__PURE__*/l(t.Watermark,{}):null]}):null]})};export{n as S};
@@ -1,4 +1,4 @@
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-CNcx75Dp.mjs";import{M as c,c as m,B as d}from"./ModalHeader-rCMpqA2a.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-CV-2yKE4.mjs";import{T as y}from"./Title-BnzYV3Is.mjs";import{q as h}from"./context-LVpDfP2H.mjs";import{u as f}from"./internal-context-Z-fyxadS.mjs";import{Y as v}from"./useActiveWallet-RZ4w-uGq.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-DjTxAoJ1.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";const g=p.div`
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-CtfiZMWv.mjs";import{M as c,c as m,B as d}from"./ModalHeader-Dt9RfCUU.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-CV-2yKE4.mjs";import{T as y}from"./Title-BnzYV3Is.mjs";import{q as h}from"./context-DJw8ICPU.mjs";import{u as f}from"./internal-context-Z-fyxadS.mjs";import{Y as v}from"./useActiveWallet-DaOhml0T.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"./use-export-wallet-ByGs9MT4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-Cgll-RH3.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";const g=p.div`
2
2
  && {
3
3
  border-width: 4px;
4
4
  }
@@ -11,4 +11,4 @@ import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@h
11
11
  border-style: solid;
12
12
  border-color: ${e=>e.$color??"var(--privy-color-accent)"};
13
13
  border-radius: 50%;
14
- `,w={component:()=>{let{user:p}=l(),{client:w,walletProxy:j,refreshSessionAndUser:b,closePrivyModal:x}=f(),I=a(),{entropyId:T,entropyIdVerifier:k}=I.data?.recoverWallet,[C,M]=n(!1),[S,W]=n(null),[A,P]=n(null);function U(){if(!C){if(A)return I.data?.setWalletPassword?.onFailure(A),void x();if(!S)return I.data?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),void x()}}I.onUserCloseViaDialogOrKeybindRef.current=U;let E=!(!C&&!S);/*#__PURE__*/return e(r,A?{children:[/*#__PURE__*/o(c,{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(m,{onClick:()=>P(null),children:"Try again"}),/*#__PURE__*/o(d,{})]}:{children:[/*#__PURE__*/o(c,{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(m,{loading:C,disabled:E,onClick:()=>async function(){M(!0);try{let e=await w.getAccessToken(),r=s(p,T);if(!e||!j||!r)return;if(!(await j.setRecovery({accessToken:e,entropyId:T,entropyIdVerifier:k,existingRecoveryMethod:r.recoveryMethod,recoveryMethod:"privy"})).entropyId)throw Error("Unable to set recovery on wallet");let o=await b();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((()=>{I.data?.setWalletPassword?.onSuccess(t),x()}),h)}catch(e){P(e)}finally{M(!1)}}(),children:S?"Success":"Confirm"}),/*#__PURE__*/o(d,{})]})}};export{w as SetAutomaticRecoveryScreen,w as default};
14
+ `,w={component:()=>{let{user:p}=l(),{client:w,walletProxy:j,refreshSessionAndUser:x,closePrivyModal:b}=f(),I=a(),{entropyId:T,entropyIdVerifier:k}=I.data?.recoverWallet,[C,M]=n(!1),[S,W]=n(null),[A,P]=n(null);function U(){if(!C){if(A)return I.data?.setWalletPassword?.onFailure(A),void b();if(!S)return I.data?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),void b()}}I.onUserCloseViaDialogOrKeybindRef.current=U;let E=!(!C&&!S);/*#__PURE__*/return e(r,A?{children:[/*#__PURE__*/o(c,{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(m,{onClick:()=>P(null),children:"Try again"}),/*#__PURE__*/o(d,{})]}:{children:[/*#__PURE__*/o(c,{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(m,{loading:C,disabled:E,onClick:()=>async function(){M(!0);try{let e=await w.getAccessToken(),r=s(p,T);if(!e||!j||!r)return;if(!(await j.setRecovery({accessToken:e,entropyId:T,entropyIdVerifier:k,existingRecoveryMethod:r.recoveryMethod,recoveryMethod:"privy"})).entropyId)throw Error("Unable to set recovery on wallet");let o=await x();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((()=>{I.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,4 +1,4 @@
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-LVpDfP2H.mjs";import{a as s}from"./get-is-unified-wallet-CNcx75Dp.mjs";import d from"@heroicons/react/24/outline/ExclamationTriangleIcon";import{b as h,R as u,c as p}from"./Layouts-BlFm53ED.mjs";import{M as m,B as g,S as y,P as v}from"./ModalHeader-rCMpqA2a.mjs";import{E as f,b as w,P as b,a as k,I as C,H as S,S as x,c as $,N as B,D as R,d as P,R as A,e as I,f as j,g as L}from"./shared-DwO5pr5t.mjs";import{styled as E}from"styled-components";import{C as z}from"./Checkbox-BhNoOKjX.mjs";import D from"@heroicons/react/24/outline/KeyIcon";import H from"@heroicons/react/24/solid/CheckCircleIcon";import T 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 K from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import O from"@heroicons/react/24/outline/DocumentDuplicateIcon";import N from"@heroicons/react/24/solid/XCircleIcon";import{C as W}from"./ScreenHeader-CHmc4-Lu.mjs";const Y=({buttonHideAnimations:t,buttonLoading:a,password:l,onSubmit:c,onBack:s})=>{let[p,y]=n(!0),[v,R]=n(!1),[P,A]=n(""),I=l===P;return i((()=>{P&&!v&&R(!0)}),[P]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:s}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{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(b,{children:[/*#__PURE__*/o(k,{value:P,onChange:e=>A(e.target.value),onKeyUp:e=>{"Enter"===e.key&&c()},onBlur:()=>R(!0),placeholder:"confirm your password",type:p?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/o(C,{style:{right:"0.75rem"},children:p?/*#__PURE__*/o(S,{onClick:()=>y(!1)}):/*#__PURE__*/o(x,{onClick:()=>y(!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-DJw8ICPU.mjs";import{a as s}from"./get-is-unified-wallet-CtfiZMWv.mjs";import d from"@heroicons/react/24/outline/ExclamationTriangleIcon";import{b as h,R as u,c as p}from"./Layouts-BlFm53ED.mjs";import{M as m,B as g,S as y,P as v}from"./ModalHeader-Dt9RfCUU.mjs";import{E as f,b as w,P as b,a as k,I as C,H as S,S as x,c as $,N as B,D as R,d as P,R as A,e as I,f as j,g as L}from"./shared-CRLmzZyl.mjs";import{styled as E}from"styled-components";import{C as z}from"./Checkbox-BhNoOKjX.mjs";import D from"@heroicons/react/24/outline/KeyIcon";import H from"@heroicons/react/24/solid/CheckCircleIcon";import T 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 K from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import O from"@heroicons/react/24/outline/DocumentDuplicateIcon";import N from"@heroicons/react/24/solid/XCircleIcon";import{C as W}from"./ScreenHeader-CHmc4-Lu.mjs";const Y=({buttonHideAnimations:t,buttonLoading:a,password:l,onSubmit:c,onBack:s})=>{let[p,y]=n(!0),[v,R]=n(!1),[P,A]=n(""),I=l===P;return i((()=>{P&&!v&&R(!0)}),[P]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:s}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{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(b,{children:[/*#__PURE__*/o(k,{value:P,onChange:e=>A(e.target.value),onKeyUp:e=>{"Enter"===e.key&&c()},onBlur:()=>R(!0),placeholder:"confirm your password",type:p?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/o(C,{style:{right:"0.75rem"},children:p?/*#__PURE__*/o(S,{onClick:()=>y(!1)}):/*#__PURE__*/o(x,{onClick:()=>y(!0)})})]}),
2
2
  /*#__PURE__*/o($,{"aria-hidden":!v||I,error:!0,children:"Passwords do not match"})]}),/*#__PURE__*/o(B,{onClick:c,loading:a,disabled:!I,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/o(u,{}),/*#__PURE__*/o(g,{})]})},Z=({buttonHideAnimations:i,buttonLoading:t,onSubmit:a,onBack:l,config:c})=>{let[s,p]=n(!1);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:l}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{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(R,{children:/*#__PURE__*/e(P,{style:{color:"var(--privy-color-error)",cursor:"pointer"},onClick:e=>{e.preventDefault(),p((e=>!e))},children:[/*#__PURE__*/o(z,{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(y,{onClick:c.onCancel,disabled:t,children:"Cancel"}),/*#__PURE__*/o(B,{onClick:a,loading:t,$hideAnimations:i,disabled:!s,children:"Set Password"})]}),/*#__PURE__*/o(u,{}),/*#__PURE__*/o(g,{})]})};let _=E.div`
3
3
  display: flex;
4
4
  gap: 10px;
@@ -0,0 +1,26 @@
1
+ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}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-BGTSFnT3.mjs";import{a as d}from"./Layouts-BlFm53ED.mjs";import{M as u,D as g}from"./JsonTree-aPaJmPx7.mjs";import{P as h,j as y}from"./use-export-wallet-ByGs9MT4.mjs";import{W as f,q as x}from"./context-DJw8ICPU.mjs";import{u as C}from"./internal-context-Z-fyxadS.mjs";import{u as j,a as w}from"./get-is-unified-wallet-CtfiZMWv.mjs";import{S as b}from"./ScreenLayout-Dfp-g3KU.mjs";import"./copy-Bx2Jwc5_.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-Cgll-RH3.mjs";import"tinycolor2";import"ofetch";import"./ModalHeader-Dt9RfCUU.mjs";import"./useActiveWallet-DaOhml0T.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.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"./Screen-D3XHNOhT.mjs";import"./index-Dq_xe9dz.mjs";const v=s.img`
2
+ && {
3
+ height: ${e=>"sm"===e.size?"65px":"140px"};
4
+ width: ${e=>"sm"===e.size?"65px":"140px"};
5
+ border-radius: 16px;
6
+ margin-bottom: 12px;
7
+ }
8
+ `;let T=e=>{if(!l(e))return e;try{let t=c(e);return t.includes("�")?e:t}catch{return e}},S=e=>{try{let t=r.decode(e),o=(new TextDecoder).decode(t);return o.includes("�")?e:o}catch{return e}},E=r=>{let{types:i,primaryType:n,...a}=r.typedData;/*#__PURE__*/return t(o,{children:[/*#__PURE__*/e(A,{data:a}),/*#__PURE__*/e(p,{text:(s=r.typedData,JSON.stringify(s,null,2)),itemName:"full payload to clipboard"})," "]});var s};const R=({method:o,messageData:r,copy:n,iconUrl:a,isLoading:s,success:l,walletProxyIsLoading:c,errorMessage:m,isCancellable:p,onSign:u,onCancel:g,onClose:h})=>/*#__PURE__*/e(b,{title:n.title,subtitle:n.description,showClose:!0,onClose:h,icon:i,iconVariant:"subtle",helpText:m?/*#__PURE__*/e(L,{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(v,{style:{alignSelf:"center"},size:"sm",src:a,alt:"app image"}):null,/*#__PURE__*/t(D,{children:["personal_sign"===o&&/*#__PURE__*/e(U,{children:T(r)}),"eth_signTypedData_v4"===o&&/*#__PURE__*/e(E,{typedData:r}),"solana_signMessage"===o&&/*#__PURE__*/e(U,{children:S(r)})]})]})}),_={component:()=>{let{authenticated:t}=j(),{initializeWalletProxy:o,closePrivyModal:r}=C(),{navigate:i,data:s,onUserCloseViaDialogOrKeybindRef:l}=w(),[c,p]=n(!0),[d,u]=n(""),[g,b]=n(),[v,T]=n(null),[S,E]=n(!1);a((()=>{t||i("LandingScreen")}),[t]),a((()=>{o(f).then((e=>{p(!1),e||(u("An error has occurred, please try again."),b(new h(new y(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:_,data:D,confirmAndSign:L,onSuccess:A,onFailure:U,uiOptions:M}=s.signMessage,I={title:M?.title||"Sign message",description:M?.description||"Signing this message will not cost you any fees.",buttonText:M?.buttonText||"Sign and continue"},k=e=>{e?A(e):U(g||new h(new y("The user rejected the request.",m.E4001_USER_REJECTED_REQUEST.eipCode))),r({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{T(null),u(""),b(void 0)}),200)};l.current=()=>{k(v)};/*#__PURE__*/return e(R,{method:_,messageData:D,copy:I,iconUrl:M?.iconUrl&&"string"==typeof M.iconUrl?M.iconUrl:void 0,isLoading:S,success:null!==v,walletProxyIsLoading:c,errorMessage:d,isCancellable:M?.isCancellable,onSign:async()=>{E(!0),u("");try{let e=await L();T(e),E(!1),setTimeout((()=>{k(e)}),x)}catch(e){console.error(e),u("An error has occurred, please try again."),b(new h(new y(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),E(!1)}},onCancel:()=>k(null),onClose:()=>k(v)})}};let D=s.div`
9
+ flex: 1;
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 16px;
13
+ `,L=s.p`
14
+ && {
15
+ margin: 0;
16
+ width: 100%;
17
+ text-align: center;
18
+ color: var(--privy-color-error-dark);
19
+ font-size: 14px;
20
+ line-height: 22px;
21
+ }
22
+ `,A=s(g)`
23
+ margin-top: 0;
24
+ `,U=s(u)`
25
+ margin-top: 0;
26
+ `;export{_ as SignRequestScreen,R as SignRequestView,_ as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,k as l,g as d}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{u}from"./context-LVpDfP2H.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{u as p}from"./useGetSolPrice-DwwjjGbd.mjs";import{ErrorScreenView as f}from"./ErrorScreen-CLfeO5pd.mjs";import g from"@heroicons/react/24/outline/CheckCircleIcon";import{styled as h}from"styled-components";import{M as y,B as w,P as k}from"./ModalHeader-rCMpqA2a.mjs";import{R as b}from"./Layouts-BlFm53ED.mjs";import{C as v}from"./ScreenHeader-CHmc4-Lu.mjs";import{a as A,R as I}from"./Row-C9vrS4Zi.mjs";import{L as S,V as j}from"./Value-tcJV9e0L.mjs";import{S as C,W as T}from"./WalletLink-CN4enmsE.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{Y as x}from"./useActiveWallet-RZ4w-uGq.mjs";import{T as $,a as L}from"./TransactionErrorView-BwwGMqSj.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as F,getCompiledTransactionMessageDecoder as _,decompileTransactionMessage as P,setTransactionMessageLifetimeUsingBlockhash as B,compileTransaction as J,getTransactionEncoder as W,getBase58Decoder as D,fetchAddressesForLookupTables as M}from"@solana/kit";import{a as R,f as q,s as U,b as H,u as V}from"./useSolanaRpcClient-B7UDPdLi.mjs";import{D as z,T as Q,a as X,S as Y,A as G,R as K,J as N,g as Z}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"viem";import"tinycolor2";import"ofetch";import"lucide-react";import"./index-DNz_w3-G.mjs";import"uuid";import"jose";import"eventemitter3";import"./useWallets-DlGuNtGR.mjs";import"./prepareFundingModalData-DjTxAoJ1.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-Dj52a5sp.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-B4uPLKn-.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-DF3DCKOK.mjs";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.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"./LoadingSkeleton-U6-3yFwI.mjs";import"./ethers-BQ45eiVv.mjs";import"@heroicons/react/24/outline";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./Address-QmAVCQtO.mjs";import"./WalletInfoCard-ChBHG5L5.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-c8L53pJ2.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";const tt=h.span`
1
+ import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,k as l,g as d}from"./get-is-unified-wallet-CtfiZMWv.mjs";import{u}from"./context-DJw8ICPU.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{u as p}from"./useGetSolPrice-DwwjjGbd.mjs";import{ErrorScreenView as f}from"./ErrorScreen-CWTvIq8L.mjs";import g from"@heroicons/react/24/outline/CheckCircleIcon";import{styled as h}from"styled-components";import{M as y,B as w,P as k}from"./ModalHeader-Dt9RfCUU.mjs";import{R as b}from"./Layouts-BlFm53ED.mjs";import{C as v}from"./ScreenHeader-CHmc4-Lu.mjs";import{a as A,R as I}from"./Row-C9vrS4Zi.mjs";import{L as S,V as j}from"./Value-tcJV9e0L.mjs";import{S as C,W as T}from"./WalletLink-CeVlaFWB.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{Y as x}from"./useActiveWallet-DaOhml0T.mjs";import{T as $,a as L}from"./TransactionErrorView-CkXjlGw-.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as _,getCompiledTransactionMessageDecoder as F,decompileTransactionMessage as P,setTransactionMessageLifetimeUsingBlockhash as B,compileTransaction as J,getTransactionEncoder as W,getBase58Decoder as D,fetchAddressesForLookupTables as R}from"@solana/kit";import{a as M,f as q,s as U,b as H,u as V}from"./useSolanaRpcClient-B1FbNl2G.mjs";import{D as z,T as Q,a as X,S as Y,A as G,R as K,J as N,g as Z}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"viem";import"tinycolor2";import"ofetch";import"lucide-react";import"./index-CMDYWbe4.mjs";import"uuid";import"jose";import"eventemitter3";import"./useWallets-Cgll-RH3.mjs";import"./use-export-wallet-ByGs9MT4.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CJdU0Qbv.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-B4uPLKn-.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-Dfp-g3KU.mjs";import"./Screen-D3XHNOhT.mjs";import"./index-Dq_xe9dz.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"./LoadingSkeleton-U6-3yFwI.mjs";import"./ethers-CG8w3aPx.mjs";import"@heroicons/react/24/outline";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./Address-B3pOzvIk.mjs";import"./WalletInfoCard-D4QREH8T.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-c8L53pJ2.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";const tt=h.span`
2
2
  && {
3
3
  width: 82px;
4
4
  height: 82px;
@@ -17,4 +17,4 @@ import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState
17
17
  transition:
18
18
  color 350ms ease,
19
19
  background-color 350ms ease;
20
- `;async function rt(t,n){try{return await t}catch{return n}}function ot(t){switch(t){case"solana:mainnet":return"mainnet-beta";case"solana:devnet":return"devnet";case"solana:testnet":return"testnet"}}async function it({privyClient:t,chain:n,mint:e}){let a=z[n];if(!a[e]){let r=await t.getSplTokenMetadata({mintAddress:e,cluster:ot(n)});r&&(a[e]={address:e,symbol:r.symbol,decimals:r.decimals})}return a[e]}async function st({tx:t,solanaClient:n,privyClient:e,checkFunds:a}){let r=_().decode(R(t)),o=r.staticAccounts[0]??"",i=await q({solanaClient:n,tx:t}),s=a?await rt(U({solanaClient:n,tx:t})):void 0,c=s?.hasFunds??!0,l={},d=[],u=await async function({solanaClient:t,message:n}){if(!("addressTableLookups"in n)||!n.addressTableLookups)return[...n.staticAccounts];let e=n.addressTableLookups.map((t=>t.lookupTableAddress)),a=await M(e,t.rpc),r=e.map(((t,e)=>[...n.addressTableLookups[e]?.writableIndexes.map((n=>{let r=a[t]?.[n];if(r)return{key:r,isWritable:!0,altIdx:e}}))??[],...n.addressTableLookups[e]?.readonlyIndexes.map((n=>{let r=a[t]?.[n];if(r)return{key:r,isWritable:!1,altIdx:e}}))??[]])).flat().filter((t=>!!t)).sort(((t,n)=>t.isWritable!==n.isWritable?t.isWritable?-1:1:t.altIdx-n.altIdx)).map((({key:t})=>t));return[...n.staticAccounts,...r]}({solanaClient:n,message:r});for(let t of r.instructions){let a=r.staticAccounts[t.programAddressIndex]||"";if(a!==Q&&a!==X)if(a!==Y){if(a===G){let n=await rt(function(t,n,e){let[a,r,o,i]=t.accountIndices?.map((t=>n[t]))??[];return{type:"ata-creation",program:e,payer:a,ata:r,owner:o,mint:i}}(t,u,a));if(!n){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}if(d.push(n),n.ata&&n.owner&&n.mint){l[n.ata]={owner:n.owner,mint:n.mint};continue}}if(K.includes(a)){let r=await rt(ut(t,u,n,e,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r)}else if(N.includes(a)){let r=await rt(mt(t,u,n,e,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r)}else d.push({type:"unknown",program:a,discriminator:t.data?.[0]})}else{let n=await rt(dt(t,u));if(!n){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(n)}else{let r=await rt(lt(t,u,n,e,l,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r),"spl-transfer"===r.type&&(r.fromAta&&r.fromAccount&&r.token.address&&(l[r.fromAta]??={owner:r.fromAccount,mint:r.token.address}),r.toAta&&r.toAccount&&r.token.address&&(l[r.toAta]??={owner:r.toAccount,mint:r.token.address}))}}return{spender:o,fee:i,instructions:d,hasFunds:!!c}}function ct(t,n=0){try{return function(t,n=0){let e=0n;for(let a=0;a<8;a++)e|=BigInt(t[n+a])<<BigInt(8*a);return e}(t,n)}catch{}try{return t.readBigInt64LE(n)}catch{}let e=H(t);try{return((t,n=0)=>{let e=t[n],a=t[n+7];if(!e||!a)throw Error(`Buffer offset out of range: first: ${e}, last: ${a}.`);return(BigInt(t[n+4]+256*t[n+5]+65536*t[n+6]+(a<<24))<<32n)+BigInt(e+256*t[++n]+65536*t[++n]+16777216*t[++n])})(e)}catch{}try{return e.subarray(n).readBigInt64LE()}catch{}try{return e.readBigInt64LE(n)}catch{}return 0n}async function lt(t,n,e,a,r,o){let i=t.data?.[0],s=t.accountIndices?.map((t=>n[t]))??[];if(1===i){let[t,n,e]=s;return{type:"spl-init-account",program:o,account:t,mint:n,owner:e}}if(3===i){let n,i,[c,l,d]=s,u="",m=l?r[l]:void 0;if(m)n=m.owner,u=m.mint;else if(l){let t=await e.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send(),a=t.value?.data;n=a?.parsed?.info?.owner,u=a?.parsed?.info?.mint??"",i=a?.parsed?.info?.tokenAmount?.decimals}if(!u&&c){let t=await e.rpc.getAccountInfo(c,{commitment:"confirmed",encoding:"jsonParsed"}).send(),n=t.value?.data;u=n?.parsed?.info?.mint??""}let p=await it({privyClient:a,chain:e.chain,mint:u}),f=p?.symbol??"";return i??=p?.decimals??9,{type:"spl-transfer",program:o,fromAta:c,fromAccount:d,toAta:l,toAccount:n,value:ct(t.data,1),token:{symbol:f,decimals:i,address:u}}}if(9===i){let[t,n,e]=s;return{type:"spl-close-account",program:o,source:t,destination:n,owner:e}}if(17===i)return{type:"spl-sync-native",program:o};throw Error(`Token program instruction type ${i} not supported`)}async function dt(t,n){let e=t.data?.[0],a=t.accountIndices?.map((t=>n[t]))??[];if(0===e){let[,n]=a;return{type:"create-account",program:Y,account:n?.toString(),value:ct(t.data,4),withSeed:!1}}if(2===e){let[n,e]=a;return{type:"sol-transfer",program:Y,fromAccount:n,toAccount:e,token:{symbol:"SOL",decimals:9},value:ct(t.data,4),withSeed:!1}}if(3===e){let[,n]=a;return{type:"create-account",program:Y,account:n,withSeed:!0,value:ct(t.data.slice(t.data.length-32-8-8))}}if(11===e){let[n,e]=a;return{type:"sol-transfer",program:Y,fromAccount:n,toAccount:e,value:ct(t.data,4),token:{symbol:"SOL",decimals:9},withSeed:!0}}throw Error(`System program instruction type ${e} not supported`)}async function ut(t,n,e,a,r){let o=t.accountIndices?.map((t=>n[t]))??[],i=t.data?.[0];if(143===i){let n=o[10],i=o[11];return{type:"raydium-swap-base-input",program:r,mintIn:n,mintOut:i,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:i?await it({privyClient:a,chain:e.chain,mint:i}):void 0,amountIn:ct(t.data,8),minimumAmountOut:ct(t.data,16)}}if(55===i){let n=o[10],i=o[11];return{type:"raydium-swap-base-output",program:r,mintIn:n,mintOut:i,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:i?await it({privyClient:a,chain:e.chain,mint:i}):void 0,maxAmountIn:ct(t.data,8),amountOut:ct(t.data,16)}}throw Error(`Raydium swap program instruction type ${i} not supported`)}async function mt(t,n,e,a,r){let o=t.data?.[0],i=t.accountIndices?.map((t=>n[t]))??[];if([208,51,239,151,123,43,237,92].includes(o)){let n=i[5],o=i[6];return{type:"jupiter-swap-exact-out-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,outAmount:ct(t.data,t.data.length-1-2-8-8),quotedInAmount:ct(t.data,t.data.length-1-2-8)}}if([176,209,105,168,154,125,69,62].includes(o)){let n=i[7],o=i[8];return{type:"jupiter-swap-exact-out-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,outAmount:ct(t.data,t.data.length-1-2-8-8),quotedInAmount:ct(t.data,t.data.length-1-2-8)}}if([193,32,155,51,65,214,156,129].includes(o)){let n=i[7],o=i[8];return{type:"jupiter-swap-shared-accounts-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,inAmount:ct(t.data,t.data.length-1-2-8-8),quotedOutAmount:ct(t.data,t.data.length-1-2-8)}}throw[62,198,214,193,213,159,108,210].includes(o)&&console.warn("Jupiter swap program instruction 'claim' not implemented"),[116,206,27,191,166,19,0,73].includes(o)&&console.warn("Jupiter swap program instruction 'claim_token' not implemented"),[26,74,236,151,104,64,183,249].includes(o)&&console.warn("Jupiter swap program instruction 'close_token' not implemented"),[229,194,212,172,8,10,134,147].includes(o)&&console.warn("Jupiter swap program instruction 'create_open_orders' not implemented"),[28,226,32,148,188,136,113,171].includes(o)&&console.warn("Jupiter swap program instruction 'create_program_open_orders' not implemented"),[232,242,197,253,240,143,129,52].includes(o)&&console.warn("Jupiter swap program instruction 'create_token_ledger' not implemented"),[147,241,123,100,244,132,174,118].includes(o)&&console.warn("Jupiter swap program instruction 'create_token_account' not implemented"),[229,23,203,151,122,227,173,42].includes(o)&&console.warn("Jupiter swap program instruction 'route' not implemented"),[150,86,71,116,167,93,14,104].includes(o)&&console.warn("Jupiter swap program instruction 'route_with_token_ledger' not implemented"),[228,85,185,112,78,79,77,2].includes(o)&&console.warn("Jupiter swap program instruction 'set_token_ledger' not implemented"),[230,121,143,80,119,159,106,170].includes(o)&&console.warn("Jupiter swap program instruction 'shared_accounts_route_with_token_ledger' not implemented"),Error(`Jupiter swap program instruction type ${o} not supported`)}const pt={component:()=>{let{data:t,onUserCloseViaDialogOrKeybindRef:e,setModalData:g,navigate:h}=s(),{client:y,closePrivyModal:w,walletProxy:k,showFiatPrices:b}=m(),v=u(),{user:A}=c(),I=V()(t?.standardSignAndSendTransaction?.chain??"solana:mainnet"),[S,j]=a(t?.standardSignAndSendTransaction?.transaction),[C,T]=a(),[O,x]=a(),[M,q]=a({value:0n,isLoading:!1}),[U,H]=a(!1),[z,Q]=a({}),[X,Y]=a(),G=t?.standardSignAndSendTransaction?.account,K=!!t?.standardSignAndSendTransaction?.signOnly,N=G?.imported?l(A).find((t=>t.address===G.address)):d(A),{solPrice:tt,isSolPriceLoading:nt}=p({enabled:b}),at=r((()=>{if(!C)return;let t=C.spender,n=E(C.fee),e=E(M.value,3,!0),a=C.instructions.filter((t=>["sol-transfer","spl-transfer","raydium-swap-base-input","raydium-swap-base-output","jupiter-swap-shared-accounts-route","jupiter-swap-exact-out-route"].includes(t.type))),r=a.at(0);if(!r||a.length>1)return{fee:n,spender:t,balance:e};if("sol-transfer"===r.type)return{fee:n,spender:t,balance:e,total:E(r.value)};if("spl-transfer"===r.type)return{fee:n,spender:t,balance:e,total:`${i({amount:r.value,decimals:r.token.decimals})} ${r.token.symbol}`};if("raydium-swap-base-input"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.amountIn,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.minimumAmountOut,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("raydium-swap-base-output"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.maxAmountIn,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.amountOut,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("jupiter-swap-shared-accounts-route"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.inAmount,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.quotedOutAmount,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("jupiter-swap-exact-out-route"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.quotedInAmount,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.outAmount,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}return{fee:n,spender:t,balance:e}}),[C,G?.address,M]),rt=r((()=>{let t;if(!C||!b||!tt||nt)return;function n(...t){return Z(t.reduce(((t,n)=>t+n),0n),tt??0)}G?.address===C.spender&&(t=n(C.fee));let e=n(M.value),a=C.instructions.filter((t=>"sol-transfer"===t.type||"spl-transfer"===t.type)).at(0);return!a||C.instructions.length>1?{fee:t,balance:e}:"sol-transfer"===a.type?{fee:t,balance:e,total:n(a.value,G?.address===C.spender?C.fee:0n)}:"spl-transfer"===a.type?{fee:t,balance:e,total:`${i({amount:a.value,decimals:a.token.decimals})} ${a.token.symbol}`}:{fee:t,balance:e}}),[C,b,tt,nt,G?.address,M]);if(o((()=>{!async function(){if(S&&y)try{x(void 0);let t=await st({tx:S,solanaClient:I,privyClient:y,checkFunds:!K});T(t)}catch(t){console.error("Failed to prepare transaction",t),x(t)}}()}),[S,I,y,K]),o((()=>{(async function(){if(!G)return;q({value:M.value,isLoading:!0});let{value:t}=await I.rpc.getBalance(G.address,{commitment:"confirmed"}).send();q({value:t??0n,isLoading:!1})})().catch(console.error)}),[C]),!S||!t?.standardSignAndSendTransaction||!G){let e=Error("Invalid transaction request");/*#__PURE__*/return n(f,{error:e,allowlistConfig:v.allowlistConfig,onRetry:()=>{t?.standardSignAndSendTransaction?.onFailure(e),w({shouldCallAuthOnSuccess:!1})}})}let ot=()=>{if(!U)return z.signature||z.signedTransaction?t?.standardSignAndSendTransaction?.onSuccess({signature:z.signature,signedTransaction:z.signedTransaction}):t?.standardSignAndSendTransaction?.onFailure(X??O??Error("User exited the modal before submitting the transaction")),w({shouldCallAuthOnSuccess:!1})};e.current=ot;let it=t.standardSignAndSendTransaction?.uiOptions?.transactionInfo?.contractInfo?.imgUrl?/*#__PURE__*/n("img",{src:t.standardSignAndSendTransaction.uiOptions.transactionInfo.contractInfo.imgUrl,alt:t.standardSignAndSendTransaction.uiOptions.transactionInfo.contractInfo.imgAltText}):null,ct=!!(t.funding&&t.funding.supportedOptions.length>0),lt=!C?.hasFunds&&ct;if(z.signature||z.signedTransaction){let e=C?.instructions.filter((t=>"sol-transfer"===t.type||"spl-transfer"===t.type)),a=1===e?.length?e?.at(0):void 0;/*#__PURE__*/return n(et,{fees:z.fees??0n,onClose:ot,transactionInfo:t.standardSignAndSendTransaction?.uiOptions.transactionInfo,solPrice:tt,receiptHeader:t.standardSignAndSendTransaction?.uiOptions.successHeader,receiptDescription:t.standardSignAndSendTransaction?.uiOptions.successDescription,chain:I.chain,signOnly:K,instruction:"sol-transfer"===a?.type?{to:a.toAccount,amount:a.value}:{to:a?.toAccount||a?.toAta,total:at?.total}})}return X?/*#__PURE__*/n($,{transactionError:X,chainId:I.chain,onClose:ot,chainType:"solana",onRetry:async()=>{Y(void 0);let{value:t}=await I.rpc.getLatestBlockhash().send();var n,e;j((n=S,e=t,F(_().decode(R(n)),(t=>P(t)),(t=>B(e,t)),(t=>J(t)),(t=>new Uint8Array(W().encode(t))))))}}):/*#__PURE__*/n(L,{img:it,title:t.standardSignAndSendTransaction?.uiOptions?.transactionInfo?.title||"Confirm transaction",subtitle:t.standardSignAndSendTransaction?.uiOptions?.description||`${v.name} wants your permission to approve the following transaction.`,cta:lt?"Add funds":t.standardSignAndSendTransaction?.uiOptions?.buttonText||"Approve",instructions:C?.instructions??[],network:"solana:mainnet"==I.chain?"Solana":I.chain.replace("solana:",""),blockExplorerUrl:I.blockExplorerUrl,total:b?rt?.total:at?.total,fee:b?rt?.fee:at?.fee,balance:b?rt?.balance:at?.balance,swap:at?.swap,transactingWalletAddress:G.address,disabled:!C?.hasFunds&&!ct,isSubmitting:U,isPreparing:!C||M.isLoading,isTokenPriceLoading:b&&nt,isMissingFunds:!C?.hasFunds,submitError:X??void 0,isSponsored:!!t.standardSignAndSendTransaction?.isSponsored,parseError:O,onClick:lt?async()=>{if(!G)return;if(!ct)throw Error("Funding wallet is not enabled");let n="FundingMethodSelectionScreen";g({...t,funding:{...t.funding,methodScreen:n},solanaFundingData:t?.solanaFundingData}),h(n)}:async()=>{try{if(H(!0),U||!G||!k||!A||!N)return;let n=await t.standardSignAndSendTransaction.onConfirm(S);if("signature"in n){let t=await async function({solanaClient:t,signature:n}){let e=D().decode(n),a=await t.rpc.getTransaction(e,{maxSupportedTransactionVersion:0,commitment:"confirmed",encoding:"base64"}).send().catch((()=>null));return a?{fee:a.meta?.fee??0n}:null}({solanaClient:I,signature:n.signature});return void Q({...n,fees:t?.fee})}Q(n)}catch(t){console.warn({transaction:S,error:t}),Y(t)}finally{H(!1)}},onClose:ot})}};export{pt as StandardSignAndSendTransactionScreen,pt as default};
20
+ `;async function rt(t,n){try{return await t}catch{return n}}function ot(t){switch(t){case"solana:mainnet":return"mainnet-beta";case"solana:devnet":return"devnet";case"solana:testnet":return"testnet"}}async function it({privyClient:t,chain:n,mint:e}){let a=z[n];if(!a[e]){let r=await t.getSplTokenMetadata({mintAddress:e,cluster:ot(n)});r&&(a[e]={address:e,symbol:r.symbol,decimals:r.decimals})}return a[e]}async function st({tx:t,solanaClient:n,privyClient:e,checkFunds:a}){let r=F().decode(M(t)),o=r.staticAccounts[0]??"",i=await q({solanaClient:n,tx:t}),s=a?await rt(U({solanaClient:n,tx:t})):void 0,c=s?.hasFunds??!0,l={},d=[],u=await async function({solanaClient:t,message:n}){if(!("addressTableLookups"in n)||!n.addressTableLookups)return[...n.staticAccounts];let e=n.addressTableLookups.map((t=>t.lookupTableAddress)),a=await R(e,t.rpc),r=e.map(((t,e)=>[...n.addressTableLookups[e]?.writableIndexes.map((n=>{let r=a[t]?.[n];if(r)return{key:r,isWritable:!0,altIdx:e}}))??[],...n.addressTableLookups[e]?.readonlyIndexes.map((n=>{let r=a[t]?.[n];if(r)return{key:r,isWritable:!1,altIdx:e}}))??[]])).flat().filter((t=>!!t)).sort(((t,n)=>t.isWritable!==n.isWritable?t.isWritable?-1:1:t.altIdx-n.altIdx)).map((({key:t})=>t));return[...n.staticAccounts,...r]}({solanaClient:n,message:r});for(let t of r.instructions){let a=r.staticAccounts[t.programAddressIndex]||"";if(a!==Q&&a!==X)if(a!==Y){if(a===G){let n=await rt(function(t,n,e){let[a,r,o,i]=t.accountIndices?.map((t=>n[t]))??[];return{type:"ata-creation",program:e,payer:a,ata:r,owner:o,mint:i}}(t,u,a));if(!n){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}if(d.push(n),n.ata&&n.owner&&n.mint){l[n.ata]={owner:n.owner,mint:n.mint};continue}}if(K.includes(a)){let r=await rt(ut(t,u,n,e,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r)}else if(N.includes(a)){let r=await rt(mt(t,u,n,e,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r)}else d.push({type:"unknown",program:a,discriminator:t.data?.[0]})}else{let n=await rt(dt(t,u));if(!n){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(n)}else{let r=await rt(lt(t,u,n,e,l,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r),"spl-transfer"===r.type&&(r.fromAta&&r.fromAccount&&r.token.address&&(l[r.fromAta]??={owner:r.fromAccount,mint:r.token.address}),r.toAta&&r.toAccount&&r.token.address&&(l[r.toAta]??={owner:r.toAccount,mint:r.token.address}))}}return{spender:o,fee:i,instructions:d,hasFunds:!!c}}function ct(t,n=0){try{return function(t,n=0){let e=0n;for(let a=0;a<8;a++)e|=BigInt(t[n+a])<<BigInt(8*a);return e}(t,n)}catch{}try{return t.readBigInt64LE(n)}catch{}let e=H(t);try{return((t,n=0)=>{let e=t[n],a=t[n+7];if(!e||!a)throw Error(`Buffer offset out of range: first: ${e}, last: ${a}.`);return(BigInt(t[n+4]+256*t[n+5]+65536*t[n+6]+(a<<24))<<32n)+BigInt(e+256*t[++n]+65536*t[++n]+16777216*t[++n])})(e)}catch{}try{return e.subarray(n).readBigInt64LE()}catch{}try{return e.readBigInt64LE(n)}catch{}return 0n}async function lt(t,n,e,a,r,o){let i=t.data?.[0],s=t.accountIndices?.map((t=>n[t]))??[];if(1===i){let[t,n,e]=s;return{type:"spl-init-account",program:o,account:t,mint:n,owner:e}}if(3===i){let n,i,[c,l,d]=s,u="",m=l?r[l]:void 0;if(m)n=m.owner,u=m.mint;else if(l){let t=await e.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send(),a=t.value?.data;n=a?.parsed?.info?.owner,u=a?.parsed?.info?.mint??"",i=a?.parsed?.info?.tokenAmount?.decimals}if(!u&&c){let t=await e.rpc.getAccountInfo(c,{commitment:"confirmed",encoding:"jsonParsed"}).send(),n=t.value?.data;u=n?.parsed?.info?.mint??""}let p=await it({privyClient:a,chain:e.chain,mint:u}),f=p?.symbol??"";return i??=p?.decimals??9,{type:"spl-transfer",program:o,fromAta:c,fromAccount:d,toAta:l,toAccount:n,value:ct(t.data,1),token:{symbol:f,decimals:i,address:u}}}if(9===i){let[t,n,e]=s;return{type:"spl-close-account",program:o,source:t,destination:n,owner:e}}if(17===i)return{type:"spl-sync-native",program:o};throw Error(`Token program instruction type ${i} not supported`)}async function dt(t,n){let e=t.data?.[0],a=t.accountIndices?.map((t=>n[t]))??[];if(0===e){let[,n]=a;return{type:"create-account",program:Y,account:n?.toString(),value:ct(t.data,4),withSeed:!1}}if(2===e){let[n,e]=a;return{type:"sol-transfer",program:Y,fromAccount:n,toAccount:e,token:{symbol:"SOL",decimals:9},value:ct(t.data,4),withSeed:!1}}if(3===e){let[,n]=a;return{type:"create-account",program:Y,account:n,withSeed:!0,value:ct(t.data.slice(t.data.length-32-8-8))}}if(11===e){let[n,e]=a;return{type:"sol-transfer",program:Y,fromAccount:n,toAccount:e,value:ct(t.data,4),token:{symbol:"SOL",decimals:9},withSeed:!0}}throw Error(`System program instruction type ${e} not supported`)}async function ut(t,n,e,a,r){let o=t.accountIndices?.map((t=>n[t]))??[],i=t.data?.[0];if(143===i){let n=o[10],i=o[11];return{type:"raydium-swap-base-input",program:r,mintIn:n,mintOut:i,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:i?await it({privyClient:a,chain:e.chain,mint:i}):void 0,amountIn:ct(t.data,8),minimumAmountOut:ct(t.data,16)}}if(55===i){let n=o[10],i=o[11];return{type:"raydium-swap-base-output",program:r,mintIn:n,mintOut:i,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:i?await it({privyClient:a,chain:e.chain,mint:i}):void 0,maxAmountIn:ct(t.data,8),amountOut:ct(t.data,16)}}throw Error(`Raydium swap program instruction type ${i} not supported`)}async function mt(t,n,e,a,r){let o=t.data?.[0],i=t.accountIndices?.map((t=>n[t]))??[];if([208,51,239,151,123,43,237,92].includes(o)){let n=i[5],o=i[6];return{type:"jupiter-swap-exact-out-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,outAmount:ct(t.data,t.data.length-1-2-8-8),quotedInAmount:ct(t.data,t.data.length-1-2-8)}}if([176,209,105,168,154,125,69,62].includes(o)){let n=i[7],o=i[8];return{type:"jupiter-swap-exact-out-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,outAmount:ct(t.data,t.data.length-1-2-8-8),quotedInAmount:ct(t.data,t.data.length-1-2-8)}}if([193,32,155,51,65,214,156,129].includes(o)){let n=i[7],o=i[8];return{type:"jupiter-swap-shared-accounts-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,inAmount:ct(t.data,t.data.length-1-2-8-8),quotedOutAmount:ct(t.data,t.data.length-1-2-8)}}throw[62,198,214,193,213,159,108,210].includes(o)&&console.warn("Jupiter swap program instruction 'claim' not implemented"),[116,206,27,191,166,19,0,73].includes(o)&&console.warn("Jupiter swap program instruction 'claim_token' not implemented"),[26,74,236,151,104,64,183,249].includes(o)&&console.warn("Jupiter swap program instruction 'close_token' not implemented"),[229,194,212,172,8,10,134,147].includes(o)&&console.warn("Jupiter swap program instruction 'create_open_orders' not implemented"),[28,226,32,148,188,136,113,171].includes(o)&&console.warn("Jupiter swap program instruction 'create_program_open_orders' not implemented"),[232,242,197,253,240,143,129,52].includes(o)&&console.warn("Jupiter swap program instruction 'create_token_ledger' not implemented"),[147,241,123,100,244,132,174,118].includes(o)&&console.warn("Jupiter swap program instruction 'create_token_account' not implemented"),[229,23,203,151,122,227,173,42].includes(o)&&console.warn("Jupiter swap program instruction 'route' not implemented"),[150,86,71,116,167,93,14,104].includes(o)&&console.warn("Jupiter swap program instruction 'route_with_token_ledger' not implemented"),[228,85,185,112,78,79,77,2].includes(o)&&console.warn("Jupiter swap program instruction 'set_token_ledger' not implemented"),[230,121,143,80,119,159,106,170].includes(o)&&console.warn("Jupiter swap program instruction 'shared_accounts_route_with_token_ledger' not implemented"),Error(`Jupiter swap program instruction type ${o} not supported`)}const pt={component:()=>{let{data:t,onUserCloseViaDialogOrKeybindRef:e,setModalData:g,navigate:h}=s(),{client:y,closePrivyModal:w,walletProxy:k,showFiatPrices:b}=m(),v=u(),{user:A}=c(),I=V()(t?.standardSignAndSendTransaction?.chain??"solana:mainnet"),[S,j]=a(t?.standardSignAndSendTransaction?.transaction),[C,T]=a(),[O,x]=a(),[R,q]=a({value:0n,isLoading:!1}),[U,H]=a(!1),[z,Q]=a({}),[X,Y]=a(),G=t?.standardSignAndSendTransaction?.account,K=!!t?.standardSignAndSendTransaction?.signOnly,N=G?.imported?l(A).find((t=>t.address===G.address)):d(A),{solPrice:tt,isSolPriceLoading:nt}=p({enabled:b}),at=r((()=>{if(!C)return;let t=C.spender,n=E(C.fee),e=E(R.value,3,!0),a=C.instructions.filter((t=>["sol-transfer","spl-transfer","raydium-swap-base-input","raydium-swap-base-output","jupiter-swap-shared-accounts-route","jupiter-swap-exact-out-route"].includes(t.type))),r=a.at(0);if(!r||a.length>1)return{fee:n,spender:t,balance:e};if("sol-transfer"===r.type)return{fee:n,spender:t,balance:e,total:E(r.value)};if("spl-transfer"===r.type)return{fee:n,spender:t,balance:e,total:`${i({amount:r.value,decimals:r.token.decimals})} ${r.token.symbol}`};if("raydium-swap-base-input"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.amountIn,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.minimumAmountOut,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("raydium-swap-base-output"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.maxAmountIn,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.amountOut,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("jupiter-swap-shared-accounts-route"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.inAmount,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.quotedOutAmount,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("jupiter-swap-exact-out-route"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.quotedInAmount,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.outAmount,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}return{fee:n,spender:t,balance:e}}),[C,G?.address,R]),rt=r((()=>{let t;if(!C||!b||!tt||nt)return;function n(...t){return Z(t.reduce(((t,n)=>t+n),0n),tt??0)}G?.address===C.spender&&(t=n(C.fee));let e=n(R.value),a=C.instructions.filter((t=>"sol-transfer"===t.type||"spl-transfer"===t.type)).at(0);return!a||C.instructions.length>1?{fee:t,balance:e}:"sol-transfer"===a.type?{fee:t,balance:e,total:n(a.value,G?.address===C.spender?C.fee:0n)}:"spl-transfer"===a.type?{fee:t,balance:e,total:`${i({amount:a.value,decimals:a.token.decimals})} ${a.token.symbol}`}:{fee:t,balance:e}}),[C,b,tt,nt,G?.address,R]);if(o((()=>{!async function(){if(S&&y)try{x(void 0);let t=await st({tx:S,solanaClient:I,privyClient:y,checkFunds:!K});T(t)}catch(t){console.error("Failed to prepare transaction",t),x(t)}}()}),[S,I,y,K]),o((()=>{(async function(){if(!G)return;q({value:R.value,isLoading:!0});let{value:t}=await I.rpc.getBalance(G.address,{commitment:"confirmed"}).send();q({value:t??0n,isLoading:!1})})().catch(console.error)}),[C]),!S||!t?.standardSignAndSendTransaction||!G){let e=Error("Invalid transaction request");/*#__PURE__*/return n(f,{error:e,allowlistConfig:v.allowlistConfig,onRetry:()=>{t?.standardSignAndSendTransaction?.onFailure(e),w({shouldCallAuthOnSuccess:!1})}})}let ot=()=>{if(!U)return z.signature||z.signedTransaction?t?.standardSignAndSendTransaction?.onSuccess({signature:z.signature,signedTransaction:z.signedTransaction}):t?.standardSignAndSendTransaction?.onFailure(X??O??Error("User exited the modal before submitting the transaction")),w({shouldCallAuthOnSuccess:!1})};e.current=ot;let it=t.standardSignAndSendTransaction?.uiOptions?.transactionInfo?.contractInfo?.imgUrl?/*#__PURE__*/n("img",{src:t.standardSignAndSendTransaction.uiOptions.transactionInfo.contractInfo.imgUrl,alt:t.standardSignAndSendTransaction.uiOptions.transactionInfo.contractInfo.imgAltText}):null,ct=!!(t.funding&&t.funding.supportedOptions.length>0),lt=!C?.hasFunds&&ct;if(z.signature||z.signedTransaction){let e=C?.instructions.filter((t=>"sol-transfer"===t.type||"spl-transfer"===t.type)),a=1===e?.length?e?.at(0):void 0;/*#__PURE__*/return n(et,{fees:z.fees??0n,onClose:ot,transactionInfo:t.standardSignAndSendTransaction?.uiOptions.transactionInfo,solPrice:tt,receiptHeader:t.standardSignAndSendTransaction?.uiOptions.successHeader,receiptDescription:t.standardSignAndSendTransaction?.uiOptions.successDescription,chain:I.chain,signOnly:K,instruction:"sol-transfer"===a?.type?{to:a.toAccount,amount:a.value}:{to:a?.toAccount||a?.toAta,total:at?.total}})}return X?/*#__PURE__*/n($,{transactionError:X,chainId:I.chain,onClose:ot,chainType:"solana",onRetry:async()=>{Y(void 0);let{value:t}=await I.rpc.getLatestBlockhash().send();var n,e;j((n=S,e=t,_(F().decode(M(n)),(t=>P(t)),(t=>B(e,t)),(t=>J(t)),(t=>new Uint8Array(W().encode(t))))))}}):/*#__PURE__*/n(L,{img:it,title:t.standardSignAndSendTransaction?.uiOptions?.transactionInfo?.title||"Confirm transaction",subtitle:t.standardSignAndSendTransaction?.uiOptions?.description||`${v.name} wants your permission to approve the following transaction.`,cta:lt?"Add funds":t.standardSignAndSendTransaction?.uiOptions?.buttonText||"Approve",instructions:C?.instructions??[],network:"solana:mainnet"==I.chain?"Solana":I.chain.replace("solana:",""),blockExplorerUrl:I.blockExplorerUrl,total:b?rt?.total:at?.total,fee:b?rt?.fee:at?.fee,balance:b?rt?.balance:at?.balance,swap:at?.swap,transactingWalletAddress:G.address,disabled:!C?.hasFunds&&!ct,isSubmitting:U,isPreparing:!C||R.isLoading,isTokenPriceLoading:b&&nt,isMissingFunds:!C?.hasFunds,submitError:X??void 0,isSponsored:!!t.standardSignAndSendTransaction?.isSponsored,parseError:O,onClick:lt?async()=>{if(!G)return;if(!ct)throw Error("Funding wallet is not enabled");let n="FundingMethodSelectionScreen";g({...t,funding:{...t.funding,methodScreen:n},solanaFundingData:t?.solanaFundingData}),h(n)}:async()=>{try{if(H(!0),U||!G||!k||!A||!N)return;let n=await t.standardSignAndSendTransaction.onConfirm(S);if("signature"in n){let t=await async function({solanaClient:t,signature:n}){let e=D().decode(n),a=await t.rpc.getTransaction(e,{maxSupportedTransactionVersion:0,commitment:"confirmed",encoding:"base64"}).send().catch((()=>null));return a?{fee:a.meta?.fee??0n}:null}({solanaClient:I,signature:n.signature});return void Q({...n,fees:t?.fee})}Q(n)}catch(t){console.warn({transaction:S,error:t}),Y(t)}finally{H(!1)}},onClose:ot})}};export{pt as StandardSignAndSendTransactionScreen,pt as default};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{a as o,m as i,C as a}from"./index-CMDYWbe4.mjs";import{u as s,q as n}from"./context-DJw8ICPU.mjs";import{u as l,b as m,k as c}from"./internal-context-Z-fyxadS.mjs";import{u as d,a as u}from"./get-is-unified-wallet-CtfiZMWv.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-C9ZLO2KP.mjs";import{S as g}from"./ScreenLayout-Dfp-g3KU.mjs";import{T as v}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DaOhml0T.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-ByGs9MT4.mjs";import"viem/utils";import"./useWallets-Cgll-RH3.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-CJdU0Qbv.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"tinycolor2";import"./ModalHeader-Dt9RfCUU.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"./Screen-D3XHNOhT.mjs";import"./index-Dq_xe9dz.mjs";const y=({success:t,errorMessage:r,onRetry:o})=>{let i=t?"Successfully connected with Telegram":r?r.message:"Verifying connection to Telegram";/*#__PURE__*/return e(g,{title:i,subtitle:t?"You're good to go!":r?r.detail:"Just a few moments more",icon:v,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!r},secondaryCta:r?.retryable&&o?{label:"Retry",onClick:o}:void 0,watermark:!0})},h={component:()=>{let{authenticated:g,logout:v,ready:h,user:f}=d(),{setModalData:A,navigate:b,resetNavigation:T,data:j}=u(),S=s(),{initLoginWithTelegram:C,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:k}=l(),[L,M]=t(!1),[x,I]=t(void 0),D=o();async function N(){try{let e=await async function(){let e;if(!g){if(D.enabled&&"error"===D.status)throw new a(D.error,null,m.CAPTCHA_FAILURE);return D.enabled&&"success"!==D.status&&(D.execute(),e=await D.waitForResult()),e}}();await w({captchaToken:e}),M(!0),R(!0)}catch(e){if(e?.privyErrorCode===m.ALLOWLIST_REJECTED)return I(void 0),T(),void b("AllowlistRejectionScreen");if(e?.privyErrorCode===m.USER_LIMIT_REACHED)return console.error(new c(e).toString()),I(void 0),T(),void b("UserLimitReachedScreen");if(e?.privyErrorCode===m.USER_DOES_NOT_EXIST)return I(void 0),T(),void b("AccountNotFoundScreen");if(e?.privyErrorCode===m.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return I(void 0),T(),A({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,telegramAuthResult:k()?.telegramAuthResult,telegramWebAppData:k()?.telegramWebAppData,displayName:e.data?.data?.account?.displayName,linkMethod:"telegram",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void b("LinkConflictScreen");let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}r((()=>{N()}),[]),r((()=>{if(!(h&&g&&L&&f))return;if(S?.legal.requireUsersAcceptTerms&&!f.hasAcceptedTerms){let e=setTimeout((()=>{b("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(f,S.embeddedWallets)){let e=setTimeout((()=>{A({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"telegram",screen:"TelegramAuthScreen"}}),v()},callAuthOnSuccessOnClose:!0}}),b("EmbeddedWalletOnAccountCreateScreen")}),n);return()=>clearTimeout(e)}E();let e=setTimeout((()=>W({shouldCallAuthOnSuccess:!0,isSuccess:!0})),n);return()=>clearTimeout(e)}),[h,g,L,f]);/*#__PURE__*/return e(y,{success:L,errorMessage:x,onRetry:x?.retryable?async()=>{try{I(void 0),j?.telegramAuthModalData?.seamlessAuth||await C(void 0,j?.login?.disableSignup),await N()}catch(e){let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0,isShownBeforeReady:!0};export{h as TelegramAuthScreen,y as TelegramAuthScreenView,h as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink-CN4enmsE.mjs";import{g as d}from"./ethers-BQ45eiVv.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import c from"@heroicons/react/24/outline/ChevronDownIcon";import{createContext as s,useState as h,useContext as p}from"react";import{s as v,u}from"./context-LVpDfP2H.mjs";const g=({label:t,children:n,valueStyles:r})=>/*#__PURE__*/e(f,{children:[/*#__PURE__*/i("div",{children:t}),/*#__PURE__*/i(x,{style:{...r},children:n})]});let f=n.div`
1
+ import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink-CeVlaFWB.mjs";import{g as d}from"./ethers-CG8w3aPx.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import c from"@heroicons/react/24/outline/ChevronDownIcon";import{createContext as s,useState as h,useContext as p}from"react";import{s as v,u}from"./context-DJw8ICPU.mjs";const g=({label:t,children:n,valueStyles:r})=>/*#__PURE__*/e(f,{children:[/*#__PURE__*/i("div",{children:t}),/*#__PURE__*/i(x,{style:{...r},children:n})]});let f=n.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon as i,ArrowRightIcon as o,ChevronDownIcon as t}from"@heroicons/react/24/outline";import{useState as l}from"react";import{styled as a}from"styled-components";import{formatTokenAmount as s}from"@privy-io/js-sdk-core";import{M as c,P as d,E as h,B as m,b as u}from"./ModalHeader-rCMpqA2a.mjs";import{L as p,V as g,a as f}from"./Value-tcJV9e0L.mjs";import{a as y,R as x}from"./Row-C9vrS4Zi.mjs";import{E as k}from"./ErrorMessage-D8VaAP5m.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{S as b}from"./Subtitle-CV-2yKE4.mjs";import{T as w}from"./Title-BnzYV3Is.mjs";import{A as T}from"./Address-QmAVCQtO.mjs";import{W as I}from"./WalletInfoCard-ChBHG5L5.mjs";import{u as A}from"./context-LVpDfP2H.mjs";import{Y as S}from"./useActiveWallet-RZ4w-uGq.mjs";import{L as C}from"./LoadingSkeleton-U6-3yFwI.mjs";import{isAddress as $}from"viem";import{B as j}from"./shared-FM0rljBt.mjs";import{C as M}from"./Checkbox-BhNoOKjX.mjs";import{E}from"./ErrorBanner-CQERa7bL.mjs";import{W as O}from"./WarningBanner-c8L53pJ2.mjs";import D from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import N from"@heroicons/react/24/outline/ClipboardDocumentIcon";import F from"@heroicons/react/24/outline/ExclamationCircleIcon";import{u as L}from"./internal-context-Z-fyxadS.mjs";const P=a(p)`
1
+ import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon as i,ArrowRightIcon as o,ChevronDownIcon as t}from"@heroicons/react/24/outline";import{useState as l}from"react";import{styled as a}from"styled-components";import{formatTokenAmount as s}from"@privy-io/js-sdk-core";import{M as c,P as d,E as h,B as m,b as u}from"./ModalHeader-Dt9RfCUU.mjs";import{L as p,V as g,a as f}from"./Value-tcJV9e0L.mjs";import{a as y,R as x}from"./Row-C9vrS4Zi.mjs";import{E as k}from"./ErrorMessage-D8VaAP5m.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{S as b}from"./Subtitle-CV-2yKE4.mjs";import{T as w}from"./Title-BnzYV3Is.mjs";import{A as T}from"./Address-B3pOzvIk.mjs";import{W as I}from"./WalletInfoCard-D4QREH8T.mjs";import{u as A}from"./context-DJw8ICPU.mjs";import{Y as S}from"./useActiveWallet-DaOhml0T.mjs";import{L as C}from"./LoadingSkeleton-U6-3yFwI.mjs";import{isAddress as $}from"viem";import{B as j}from"./shared-FM0rljBt.mjs";import{C as M}from"./Checkbox-BhNoOKjX.mjs";import{E}from"./ErrorBanner-CQERa7bL.mjs";import{W as O}from"./WarningBanner-c8L53pJ2.mjs";import D from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import N from"@heroicons/react/24/outline/ClipboardDocumentIcon";import F from"@heroicons/react/24/outline/ExclamationCircleIcon";import{u as L}from"./internal-context-Z-fyxadS.mjs";const P=a(p)`
2
2
  cursor: pointer;
3
3
  display: inline-flex;
4
4
  gap: 8px;