@privy-io/expo 0.78.1 → 0.78.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cards.js +2 -2
- package/dist/{chunk-XPHUZG6U.js → chunk-DBIA42HB.js} +1 -1
- package/dist/{chunk-WCCFBSK7.js → chunk-QAUM76HK.js} +1 -1
- package/dist/chunk-V3WU67WL.js +12 -0
- package/dist/esm/cards.js +1 -1
- package/dist/esm/{chunk-XPHUZG6U.js → chunk-DBIA42HB.js} +1 -1
- package/dist/esm/{chunk-WCCFBSK7.js → chunk-QAUM76HK.js} +1 -1
- package/dist/esm/chunk-V3WU67WL.js +12 -0
- package/dist/esm/extended-chains.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/passkey.js +1 -1
- package/dist/esm/smart-wallets.js +1 -1
- package/dist/esm/ui.js +1 -1
- package/dist/extended-chains.js +1 -1
- package/dist/index.d.ts +31 -29
- package/dist/index.js +1 -1
- package/dist/passkey.js +1 -1
- package/dist/smart-wallets.js +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-7VW6NBHO.js +0 -12
- package/dist/esm/chunk-7VW6NBHO.js +0 -12
package/dist/ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkWCCFBSK7js = require('./chunk-WCCFBSK7.js');var _chunkXPHUZG6Ujs = require('./chunk-XPHUZG6U.js');var _chunk7VW6NBHOjs = require('./chunk-7VW6NBHO.js');require('./chunk-F7DR7TVR.js');require('./chunk-3HF374LL.js');var _chunkC5WYSLQFjs = require('./chunk-C5WYSLQF.js');var _react = require('react'); var zt = _interopRequireWildcard(_react); var tr = _interopRequireWildcard(_react); var Je = _interopRequireWildcard(_react); var ht = _interopRequireWildcard(_react); var Pt = _interopRequireWildcard(_react); var mr = _interopRequireWildcard(_react); var dr = _interopRequireWildcard(_react); var wo = _interopRequireWildcard(_react); var ur = _interopRequireWildcard(_react); var Qe = _interopRequireWildcard(_react); var fr = _interopRequireWildcard(_react); var gr = _interopRequireWildcard(_react); var yr = _interopRequireWildcard(_react); var hr = _interopRequireWildcard(_react); var Sr = _interopRequireWildcard(_react); var wr = _interopRequireWildcard(_react);var _reactnative = require('react-native');function mo(){let e=_chunk7VW6NBHOjs.m.call(void 0, ),{isReady:o}=_chunk7VW6NBHOjs.aa.call(void 0, ),t=_chunk7VW6NBHOjs.d.call(void 0, );return _react.useMemo.call(void 0, ()=>{var s,a;if(!o)return null;let r=e.app.getConfig();if(!r)return null;let i=(s=r.require_users_accept_terms)!=null?s:!1,n=(a=t==null?void 0:t.has_accepted_terms)!=null?a:!1;return{termsAndConditionsUrl:r.terms_and_conditions_url,privacyPolicyUrl:r.privacy_policy_url,requireUsersAcceptTerms:i&&!n}},[e.app,o,t==null?void 0:t.has_accepted_terms])}var _jssdkcore = require('@privy-io/js-sdk-core');var pn=({value:e,isFocused:o,isSuccess:t,isError:r})=>{let{colors:i}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:[kt.box,{borderColor:r?i.error:t?i.success:o?i.interactive:i.border},o&&kt.focusedBox]},zt.default.createElement(_reactnative.Text,{style:[kt.text,{color:i.text}]},e))},kt=_reactnative.StyleSheet.create({box:{flex:1,borderWidth:1,borderRadius:12,aspectRatio:3/4,justifyContent:"center",alignItems:"center"},focusedBox:{borderWidth:2},text:{fontFamily:"Inter_500Medium",fontSize:16,lineHeight:20}});var _t=6,ra=[0,1,2,"-",3,4,5];function Bt({value:e="",status:o=" ",onChangeText:t=()=>{},editable:r=!0,success:i=!1,error:n=!1,autoFocus:s=!1}){let{colors:a}=_chunkXPHUZG6Ujs.b.call(void 0, ),u=_react.useRef.call(void 0, null),[m,l]=_react.useState.call(void 0, !1),[d,c]=_react.useState.call(void 0, {start:0,end:0}),p=S=>{let h=S.replace(/\D/g,"");t(h.substring(0,_t))},f=m?Math.min(e.length,_t-1):void 0;return zt.default.createElement(_reactnative.View,{style:Eo.container},zt.default.createElement(_reactnative.TextInput,{autoFocus:s,style:Eo.invisibleTextInput,value:e,onChangeText:p,maxLength:_t,ref:u,editable:r,onFocus:()=>{l(!0),c({start:0,end:e.length||0})},onBlur:()=>l(!1),onSelectionChange:S=>c(S.nativeEvent.selection),selection:d,keyboardType:"numeric",autoComplete:"sms-otp",textContentType:"oneTimeCode",contextMenuHidden:!1,selectTextOnFocus:!0,caretHidden:_reactnative.Platform.OS==="ios",cursorColor:_reactnative.Platform.OS==="android"?"transparent":void 0,selectionColor:"transparent"}),zt.default.createElement(_reactnative.Pressable,{style:Eo.codeContainer,onPress:()=>{var S;return r&&((S=u.current)==null?void 0:S.focus())}},ra.map((S,h)=>S==="-"?zt.default.createElement(na,{key:h}):zt.default.createElement(pn,{key:h,isFocused:f===S,value:e[S]||"",isSuccess:i,isError:n}))),zt.default.createElement(_reactnative.Text,{style:[Eo.statusText,{color:n?a.errorDark:i?a.success:a.textMuted}]},o))}var na=()=>{let{colors:e}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.Text,{style:[Eo.separator,{color:e.text}]},"-")},Eo=_reactnative.StyleSheet.create({container:{justifyContent:"center",paddingHorizontal:0,gap:6},invisibleTextInput:{position:"absolute",width:"100%",height:60,backgroundColor:"transparent",color:"transparent",opacity:0,fontSize:24,letterSpacing:20,paddingLeft:20,zIndex:1},codeContainer:{flexDirection:"row",alignItems:"center",gap:10,justifyContent:"space-between",zIndex:0},separator:{fontFamily:"Inter_600SemiBold",fontSize:18,lineHeight:24},statusText:{textAlign:"left",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});var A=({title:e,subtitle:o,tight:t=!1,style:r})=>{let{colors:i}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:[Jo.titleContainer,t&&Jo.tightContainer,r]},zt.default.createElement(_reactnative.Text,{style:[Jo.title,{color:i.textTitle}]},e),o&&zt.default.createElement(_reactnative.Text,{style:[Jo.subtitle,{color:i.textMuted}]},o))},Jo=_reactnative.StyleSheet.create({titleContainer:{alignItems:"center",gap:16},tightContainer:{gap:4},title:{fontFamily:"Inter_600SemiBold",fontSize:24,lineHeight:38},subtitle:{fontFamily:"Inter_400Regular",fontSize:16,lineHeight:24,textAlign:"center"}});var wn=({hint:e,link:o,onPress:t,disabled:r})=>{let{colors:i}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:Wt.container},zt.default.createElement(_reactnative.Text,{style:[Wt.hintText,{color:i.textMuted}]},e),o&&zt.default.createElement(_reactnative.Pressable,{onPress:t,disabled:r},zt.default.createElement(_reactnative.Text,{style:[Wt.linkText,{color:r?i.textMuted:i.interactive}]}," ",o)))},Wt=_reactnative.StyleSheet.create({container:{display:"flex",flexDirection:"row",gap:2},hintText:{fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22},linkText:{fontFamily:"Inter_500Medium",fontSize:14,lineHeight:22}});var ga=3e4,ya=()=>{let[e,o]=_react.useState.call(void 0, !1),t=_react.useCallback.call(void 0, ()=>{o(!1),setTimeout(()=>{o(!0)},ga)},[]);return _react.useEffect.call(void 0, ()=>{t()},[t]),[e,t]},se=({onSendCode:e,onRequestNewCode:o,subtitle:t,isLoading:r,error:i,isDone:n=!1,hint:s})=>{let[a,u]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{i&&u("")},[i]);let m=p=>{u(p),p.length===6&&e(p)},[l,d]=ya(),c=o&&(()=>{o(),d()});return zt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:Dt.innerContainer},zt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},zt.default.createElement(_reactnative.View,{style:Dt.content},zt.default.createElement(_reactnative.View,{style:Dt.formContainer},zt.default.createElement(A,{title:"Enter confirmation code",subtitle:t}),zt.default.createElement(Bt,{value:a,editable:!r,onChangeText:m,success:n,error:!!i,status:n?"Success.":i?ha(i):" ",autoFocus:!0}),!!c&&zt.default.createElement(wn,{hint:s||"Didn\u2019t get a message?",link:"Resend code",onPress:c,disabled:!l}))),zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Continue",loading:r,onPress:()=>e(a),variant:"primary"})))},ha=_jssdkcore.createErrorFormatter.call(void 0, {invalid_credentials:"Invalid code.",cannot_link_more_of_type:"You cannot authorize more than one account for this user.",max_accounts_reached:"This application has reached its user limit and cannot sign in new users.",user_does_not_exist:"Account not found. Please try logging in again or contact support.",linked_to_another_user:"This account has already been linked to another user.",invalid_data:"The code has expired.",too_many_requests:"Too many requests. Please try again later.",default:"Something went wrong. Please try again."}),Dt=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:16},formContainer:{rowGap:24}});var _expowebbrowser = require('expo-web-browser'); var Ht = _interopRequireWildcard(_expowebbrowser); var Zn = _interopRequireWildcard(_expowebbrowser); var ii = _interopRequireWildcard(_expowebbrowser); var Cr = _interopRequireWildcard(_expowebbrowser);function uo(){let e=mo(),{colors:o}=_chunkXPHUZG6Ujs.b.call(void 0, );if(!e)return null;let{termsAndConditionsUrl:t,privacyPolicyUrl:r,requireUsersAcceptTerms:i}=e;if(i||!t&&!r)return null;let n=!!(t&&r);return zt.default.createElement(_reactnative.View,{style:Ro.container},zt.default.createElement(_reactnative.Text,{style:[Ro.hintText,{color:o.textMuted}]},"By logging in I agree to the"," ",t&&zt.default.createElement(_reactnative.Text,{style:[Ro.linkText,{color:o.interactive}],onPress:()=>Ht.openBrowserAsync(t)},n?"Terms":"Terms of Service"),!1,n&&" & ",r&&zt.default.createElement(_reactnative.Text,{style:[Ro.linkText,{color:o.interactive}],onPress:()=>Ht.openBrowserAsync(r)},"Privacy Policy")))}var Ro=_reactnative.StyleSheet.create({container:{paddingVertical:8,justifyContent:"center"},hintText:{fontFamily:"Inter_400Regular",textAlign:"center",fontSize:14,lineHeight:22},linkText:{fontFamily:"Inter_500Medium",fontSize:14,lineHeight:22}});var _expolinking = require('expo-linking'); var Mn = _interopRequireWildcard(_expolinking); var Fs = _interopRequireWildcard(_expolinking);var _reactnativesvg = require('react-native-svg'); var _reactnativesvg2 = _interopRequireDefault(_reactnativesvg);var Pa=e=>zt.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40"},e),zt.createElement(_reactnativesvg.Path,{fill:e.color,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.02m176.8 1.71v5.72h-.27l-.09-.14a16 16 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a9 9 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.1 8.1 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.1 6.1 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.73q.12-2.34.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.02m27.66 4.14.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.8 6.8 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 13 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13 13 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.5 7.5 0 0 0-2.8.5A7.1 7.1 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 6 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.5 5.5 0 0 1 2.3-.63 10 10 0 0 1 1.13.02M69.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.7 8.7 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.49Zm64.29 0V7.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.06a5 5 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.6 2.6 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49Zm160.07.19a14.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.5 14.5 0 0 0-8.74-2.35m57.39 0a10.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.5 10.5 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.8 9.8 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.4 7.4 0 0 1-1.26-2.32 14.1 14.1 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.03m13.77-5.31-.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.96a912 912 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.4v-6.9h-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-.46v-4.4h-5.6c-4.46 0-5.6 0-5.6.02Zm27.17 13.85V30.8h3.87l3.86-.01V3.09h-7.73Zm9.8-13.85-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4v-.8h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01Zm30.38 0c-.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.88zM36.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.9 4.9 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a12 12 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07m14.51.05c-2.33.12-4.3.84-5.95 2.16a9.9 9.9 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18 18 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.8 9.8 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-.04m1.42 3.78c.88.1 1.62.34 2.28.75a6.1 6.1 0 0 1 1.99 2.15 10.3 10.3 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.03M92.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.6 7.6 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.4 8.4 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 18 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.3 5.3 0 0 1 2.9-.95c.2-.01.97 0 1.17.03Zm23.44-3.74c-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.4 9.4 0 0 0 3.6 1.8 12 12 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.5 5.5 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.3 5.3 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 11 11 0 0 0-4.88-.74m39.41 0a9.87 9.87 0 0 0-6 2.29 11 11 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.02m75.93-3.33 8.37 23.22a49 49 0 0 1-.67 1.9 5.4 5.4 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8 8 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.3h-4.82Zm59.47 27.98c-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.4a49 49 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 41 0 0 0-5.8-.24m0 0"})),Pn=Pa;var Ea="https://privy.io/?utm_source=module&utm_medium=module&utm_campaign=registration_module",W=()=>{let{colors:e}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:Ta.legalFooterContainer},zt.default.createElement(_reactnative.Pressable,{onPress:()=>Mn.openURL(Ea),accessibilityRole:"link"},zt.default.createElement(Pn,{color:e.privyBrand,width:"100%",height:11})))},Ta=_reactnative.StyleSheet.create({legalFooterContainer:{flexDirection:"row",alignItems:"center",marginVertical:16,justifyContent:"center",gap:2}});var po=i=>{var n=i,{error:e,status:o,LeftIcon:t}=n,r=_chunkC5WYSLQFjs.d.call(void 0, n,["error","status","LeftIcon"]);let{colors:s}=_chunkXPHUZG6Ujs.b.call(void 0, ),[a,u]=_react.useState.call(void 0, !1);return zt.default.createElement(_reactnative.View,{style:ot.container},zt.default.createElement(_reactnative.View,{style:[ot.inputBox,{backgroundColor:s.backgroundSecondary,borderColor:s.border},a&&{borderColor:s.interactive},e&&{borderColor:s.error}]},t,zt.default.createElement(_reactnative.TextInput,_chunkC5WYSLQFjs.b.call(void 0, {cursorColor:s.interactive,placeholderTextColor:s.textPlaceholder,onFocus:()=>u(!0),onBlur:()=>u(!1),autoCapitalize:"none",returnKeyType:"next",multiline:!1,numberOfLines:1,style:[ot.input,{color:s.text}]},r))),o&&zt.default.createElement(_reactnative.Text,{style:[ot.statusText,{color:s.textMuted},e&&{color:s.errorDark}]},o))},ot=_reactnative.StyleSheet.create({container:{gap:6},input:{flex:1,fontFamily:"Inter_400Regular",fontSize:18,lineHeight:_reactnative.Platform.OS==="android"?30:void 0,height:_reactnative.Platform.OS==="ios"?30:void 0},inputBox:{flexDirection:"row",paddingHorizontal:16,height:64,borderRadius:14,alignItems:"center",columnGap:10,borderWidth:2},statusText:{textAlign:"left",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});var En=({sendCode:e,isLoading:o,error:t,initialEmail:r,FooterComponent:i})=>{let[n,s]=_react.useState.call(void 0, r!=null?r:""),{colors:a}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:tt.innerContainer},zt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},zt.default.createElement(_reactnative.View,{style:tt.content},zt.default.createElement(_reactnative.View,{style:tt.content},zt.default.createElement(_reactnative.View,{style:tt.formContainer},zt.default.createElement(A,{title:"Enter your email"}),zt.default.createElement(po,{LeftIcon:zt.default.createElement(_chunkXPHUZG6Ujs.A,{size:24,color:a.icon}),value:n,onChangeText:s,error:!!t,status:t?Wa(t):" ",placeholder:"your@email.com",autoComplete:"email",keyboardType:"email-address",autoFocus:!0})),i),zt.default.createElement(W,null)),zt.default.createElement(_reactnative.View,null,zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Continue",loading:o,onPress:()=>e(n)}),zt.default.createElement(uo,null))))},Wa=_jssdkcore.createErrorFormatter.call(void 0, {allowlist_rejected:"You don't have access to this app. Have you been invited?",max_accounts_reached:"This application has reached its user limit and cannot sign in new users.",invalid_data:"Email address is incorrect.",too_many_requests:"Too many requests. Please try again later.",disallowed_plus_email:"Please enter a valid email address without a '+'",default:"Something went wrong. Please try again."}),tt=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:4},formContainer:{rowGap:24}});var _zustand = require('zustand');var jt={success:e=>({value:e}),error:e=>({error:e})};var Tn=e=>{let o=Array.from(new Set(e));return o.length===0?jt.error(new (0, _chunkXPHUZG6Ujs.L)("no_login_methods_available","No login methods available")):jt.success(o)},qt=e=>{let o=e.length,t=e.every(r=>r==="sms"||r==="email");return o<=2&&t?e[0]:null},Fn=(e,o)=>{if(e.length!==2)return null;let[t,r]=e;return o===t?r:t},_e={email:"email",sms:"phone",google:"Google",apple:"Apple",discord:"Discord",twitter:"X",github:"Github",spotify:"Spotify",instagram:"Instagram",tiktok:"Tiktok",linkedin:"LinkedIn",line:"LINE",twitch:"Twitch",telegram:"Telegram"};function fo(e){return new Promise((o,t)=>{e({resolve:o,reject:t})})}function Oa(e,o){return{resolve:t=>{o(),e.resolve(t)},reject:t=>{o(),e.reject(t)}}}function rt(e,o,t){let r=setTimeout(()=>{e.reject(o())},t);return Oa(e,()=>{clearTimeout(r)})}var Ha=1e3*60*5,Ke=_zustand.create.call(void 0, )((e,o)=>({privyElementsConfig:null,loginPromiseResolvers:null,activeLoginMethod:null,openLoginFlow:(t,r,i,n)=>fo(s=>{var d,c,p;let a=r.app.getConfig();if(!a)return s.reject(new (0, _chunkXPHUZG6Ujs.L)("privy_not_ready","Privy is not ready"));if(i!==null)return s.reject(new (0, _chunkXPHUZG6Ujs.L)("user_already_logged_in","User is already logged in"));if(_chunkXPHUZG6Ujs.N.call(void 0, ),o().loginPromiseResolvers!==null)return s.reject(new (0, _chunkXPHUZG6Ujs.L)("existing_login_flow_in_progress","A login flow is already in progress"));let u=Tn(t.loginMethods);if(u.error)return s.reject(u.error);let m={loginMethods:u.value,appearance:{logo:(p=(c=(d=t.appearance)==null?void 0:d.logo)!=null?c:a.logo_url)!=null?p:void 0}},l=rt(s,()=>(e({privyElementsConfig:null,loginPromiseResolvers:null}),new (0, _chunkXPHUZG6Ujs.L)("login_flow_timeout","The login flow timed out")),Ha);n(),e({loginPromiseResolvers:l,privyElementsConfig:m,activeLoginMethod:qt(m.loginMethods)})}),closeLoginFlow:()=>{var t;return(t=o().loginPromiseResolvers)==null||t.reject(new (0, _chunkXPHUZG6Ujs.L)("login_flow_closed","The login flow was closed")),e({privyElementsConfig:null,loginPromiseResolvers:null})},goBack:()=>{let{activeLoginMethod:t,privyElementsConfig:r,updateActiveLoginMethod:i,closeLoginFlow:n}=o();if(!r){n();return}let s=qt(r.loginMethods)===null;t===null||!s?n():i(null)},updateActiveLoginMethod:t=>e({activeLoginMethod:t})})),nt=()=>Ke(e=>e.privyElementsConfig),xn=()=>Ke(e=>e.openLoginFlow),Be=()=>{let e=Ke(t=>t.closeLoginFlow),o=mo();return _react.useCallback.call(void 0, t=>{o!=null&&o.requireUsersAcceptTerms&&!(t!=null&&t.termsReviewed)||e()},[e,o])},it=()=>Ke(e=>e.goBack),Ln=()=>[Ke(e=>e.activeLoginMethod),Ke(e=>e.updateActiveLoginMethod)],za=e=>{let{loginPromiseResolvers:o}=Ke.getState();o==null||o.resolve(e)},Un=()=>za;var st=({onLoginMethodChange:e,otherLoginMethod:o})=>o?zt.default.createElement(_chunkXPHUZG6Ujs.c,{variant:"tertiary",title:`Use ${_e[o]} instead`,onPress:()=>e(o)}):null;var Ka=600,_n=({goBackRef:e,onLoginMethodChange:o,otherLoginMethod:t})=>{let{setOtpState:r}=_react.useContext.call(void 0, _chunk7VW6NBHOjs.la),i=Be(),[n,s]=_react.useState.call(void 0, ""),{state:a,loginWithCode:u,sendCode:m}=_chunk7VW6NBHOjs.s.call(void 0, ),[l,d]=_react.useState.call(void 0, "email"),{step:c,error:p=null,isLoading:f=!1,isDone:S=!1}=_react.useMemo.call(void 0, ()=>{var h;switch(a.status){case"initial":return{step:{type:"email"}};case"sending-code":return{step:{type:l},isLoading:!0};case"awaiting-code-input":return{step:{type:"code"}};case"submitting-code":return{step:{type:"code"},isLoading:!0};case"done":return{step:{type:"code"},isDone:!0};case"error":return{step:{type:l},error:(h=a.error)!=null?h:new Error("Unknown error")}}},[l,a.status]);switch(l!==c.type&&d(c.type),_react.useEffect.call(void 0, ()=>{if(!S)return;let h=setTimeout(()=>{i()},Ka);return()=>clearTimeout(h)},[S,i]),_react.useEffect.call(void 0, ()=>{if(c.type==="code")return e.current=()=>{r({status:"initial"})},()=>{e.current=null}},[c.type,r]),c.type){case"code":return zt.default.createElement(se,{onSendCode:h=>u({code:h,email:n}),onRequestNewCode:()=>m({email:n}),subtitle:`Please check ${n} for a message with your login code.`,isLoading:f,error:p,isDone:S});case"email":return zt.default.createElement(En,{initialEmail:n,sendCode:h=>{s(h),m({email:h})},isLoading:f,error:p,FooterComponent:zt.default.createElement(st,{onLoginMethodChange:o,otherLoginMethod:t})})}};function Bn(e,o){let[t,r]=_react.useState.call(void 0, e);return _react.useEffect.call(void 0, ()=>{let i=setTimeout(()=>{r(e)},o);return()=>{clearTimeout(i)}},[e,o]),t}var Vn=[["Afghanistan","AF","\u{1F1E6}\u{1F1EB}"],["Albania","AL","\u{1F1E6}\u{1F1F1}"],["Algeria","DZ","\u{1F1E9}\u{1F1FF}"],["American Samoa","AS","\u{1F1E6}\u{1F1F8}"],["Andorra","AD","\u{1F1E6}\u{1F1E9}"],["Angola","AO","\u{1F1E6}\u{1F1F4}"],["Anguilla","AI","\u{1F1E6}\u{1F1EE}"],["Antigua & Barbuda","AG","\u{1F1E6}\u{1F1EC}"],["Argentina","AR","\u{1F1E6}\u{1F1F7}"],["Armenia","AM","\u{1F1E6}\u{1F1F2}"],["Aruba","AW","\u{1F1E6}\u{1F1FC}"],["Ascension Island","AC","\u{1F1E6}\u{1F1E8}"],["Australia","AU","\u{1F1E6}\u{1F1FA}"],["Austria","AT","\u{1F1E6}\u{1F1F9}"],["Azerbaijan","AZ","\u{1F1E6}\u{1F1FF}"],["Bahamas","BS","\u{1F1E7}\u{1F1F8}"],["Bahrain","BH","\u{1F1E7}\u{1F1ED}"],["Bangladesh","BD","\u{1F1E7}\u{1F1E9}"],["Barbados","BB","\u{1F1E7}\u{1F1E7}"],["Belarus","BY","\u{1F1E7}\u{1F1FE}"],["Belgium","BE","\u{1F1E7}\u{1F1EA}"],["Belize","BZ","\u{1F1E7}\u{1F1FF}"],["Benin","BJ","\u{1F1E7}\u{1F1EF}"],["Bermuda","BM","\u{1F1E7}\u{1F1F2}"],["Bhutan","BT","\u{1F1E7}\u{1F1F9}"],["Bolivia","BO","\u{1F1E7}\u{1F1F4}"],["Bosnia & Herzegovina","BA","\u{1F1E7}\u{1F1E6}"],["Botswana","BW","\u{1F1E7}\u{1F1FC}"],["Brazil","BR","\u{1F1E7}\u{1F1F7}"],["British Indian Ocean Territory","IO","\u{1F1EE}\u{1F1F4}"],["British Virgin Islands","VG","\u{1F1FB}\u{1F1EC}"],["Brunei","BN","\u{1F1E7}\u{1F1F3}"],["Bulgaria","BG","\u{1F1E7}\u{1F1EC}"],["Burkina Faso","BF","\u{1F1E7}\u{1F1EB}"],["Burundi","BI","\u{1F1E7}\u{1F1EE}"],["Cambodia","KH","\u{1F1F0}\u{1F1ED}"],["Cameroon","CM","\u{1F1E8}\u{1F1F2}"],["Canada","CA","\u{1F1E8}\u{1F1E6}"],["Cape Verde","CV","\u{1F1E8}\u{1F1FB}"],["Caribbean Netherlands","BQ","\u{1F1E7}\u{1F1F6}"],["Cayman Islands","KY","\u{1F1F0}\u{1F1FE}"],["Central African Republic","CF","\u{1F1E8}\u{1F1EB}"],["Chad","TD","\u{1F1F9}\u{1F1E9}"],["Chile","CL","\u{1F1E8}\u{1F1F1}"],["China","CN","\u{1F1E8}\u{1F1F3}"],["Christmas Island","CX","\u{1F1E8}\u{1F1FD}"],["Cocos (Keeling) Islands","CC","\u{1F1E8}\u{1F1E8}"],["Colombia","CO","\u{1F1E8}\u{1F1F4}"],["Comoros","KM","\u{1F1F0}\u{1F1F2}"],["Congo - Brazzaville","CG","\u{1F1E8}\u{1F1EC}"],["Congo - Kinshasa","CD","\u{1F1E8}\u{1F1E9}"],["Cook Islands","CK","\u{1F1E8}\u{1F1F0}"],["Costa Rica","CR","\u{1F1E8}\u{1F1F7}"],["Croatia","HR","\u{1F1ED}\u{1F1F7}"],["Cuba","CU","\u{1F1E8}\u{1F1FA}"],["Cura\xE7ao","CW","\u{1F1E8}\u{1F1FC}"],["Cyprus","CY","\u{1F1E8}\u{1F1FE}"],["Czechia","CZ","\u{1F1E8}\u{1F1FF}"],["C\xF4te d\u2019Ivoire","CI","\u{1F1E8}\u{1F1EE}"],["Denmark","DK","\u{1F1E9}\u{1F1F0}"],["Djibouti","DJ","\u{1F1E9}\u{1F1EF}"],["Dominica","DM","\u{1F1E9}\u{1F1F2}"],["Dominican Republic","DO","\u{1F1E9}\u{1F1F4}"],["Ecuador","EC","\u{1F1EA}\u{1F1E8}"],["Egypt","EG","\u{1F1EA}\u{1F1EC}"],["El Salvador","SV","\u{1F1F8}\u{1F1FB}"],["Equatorial Guinea","GQ","\u{1F1EC}\u{1F1F6}"],["Eritrea","ER","\u{1F1EA}\u{1F1F7}"],["Estonia","EE","\u{1F1EA}\u{1F1EA}"],["Eswatini","SZ","\u{1F1F8}\u{1F1FF}"],["Ethiopia","ET","\u{1F1EA}\u{1F1F9}"],["Falkland Islands","FK","\u{1F1EB}\u{1F1F0}"],["Faroe Islands","FO","\u{1F1EB}\u{1F1F4}"],["Fiji","FJ","\u{1F1EB}\u{1F1EF}"],["Finland","FI","\u{1F1EB}\u{1F1EE}"],["France","FR","\u{1F1EB}\u{1F1F7}"],["French Guiana","GF","\u{1F1EC}\u{1F1EB}"],["French Polynesia","PF","\u{1F1F5}\u{1F1EB}"],["Gabon","GA","\u{1F1EC}\u{1F1E6}"],["Gambia","GM","\u{1F1EC}\u{1F1F2}"],["Georgia","GE","\u{1F1EC}\u{1F1EA}"],["Germany","DE","\u{1F1E9}\u{1F1EA}"],["Ghana","GH","\u{1F1EC}\u{1F1ED}"],["Gibraltar","GI","\u{1F1EC}\u{1F1EE}"],["Greece","GR","\u{1F1EC}\u{1F1F7}"],["Greenland","GL","\u{1F1EC}\u{1F1F1}"],["Grenada","GD","\u{1F1EC}\u{1F1E9}"],["Guadeloupe","GP","\u{1F1EC}\u{1F1F5}"],["Guam","GU","\u{1F1EC}\u{1F1FA}"],["Guatemala","GT","\u{1F1EC}\u{1F1F9}"],["Guernsey","GG","\u{1F1EC}\u{1F1EC}"],["Guinea","GN","\u{1F1EC}\u{1F1F3}"],["Guinea-Bissau","GW","\u{1F1EC}\u{1F1FC}"],["Guyana","GY","\u{1F1EC}\u{1F1FE}"],["Haiti","HT","\u{1F1ED}\u{1F1F9}"],["Honduras","HN","\u{1F1ED}\u{1F1F3}"],["Hong Kong SAR China","HK","\u{1F1ED}\u{1F1F0}"],["Hungary","HU","\u{1F1ED}\u{1F1FA}"],["Iceland","IS","\u{1F1EE}\u{1F1F8}"],["India","IN","\u{1F1EE}\u{1F1F3}"],["Indonesia","ID","\u{1F1EE}\u{1F1E9}"],["Iran","IR","\u{1F1EE}\u{1F1F7}"],["Iraq","IQ","\u{1F1EE}\u{1F1F6}"],["Ireland","IE","\u{1F1EE}\u{1F1EA}"],["Isle of Man","IM","\u{1F1EE}\u{1F1F2}"],["Israel","IL","\u{1F1EE}\u{1F1F1}"],["Italy","IT","\u{1F1EE}\u{1F1F9}"],["Jamaica","JM","\u{1F1EF}\u{1F1F2}"],["Japan","JP","\u{1F1EF}\u{1F1F5}"],["Jersey","JE","\u{1F1EF}\u{1F1EA}"],["Jordan","JO","\u{1F1EF}\u{1F1F4}"],["Kazakhstan","KZ","\u{1F1F0}\u{1F1FF}"],["Kenya","KE","\u{1F1F0}\u{1F1EA}"],["Kiribati","KI","\u{1F1F0}\u{1F1EE}"],["Kosovo","XK","\u{1F1FD}\u{1F1F0}"],["Kuwait","KW","\u{1F1F0}\u{1F1FC}"],["Kyrgyzstan","KG","\u{1F1F0}\u{1F1EC}"],["Laos","LA","\u{1F1F1}\u{1F1E6}"],["Latvia","LV","\u{1F1F1}\u{1F1FB}"],["Lebanon","LB","\u{1F1F1}\u{1F1E7}"],["Lesotho","LS","\u{1F1F1}\u{1F1F8}"],["Liberia","LR","\u{1F1F1}\u{1F1F7}"],["Libya","LY","\u{1F1F1}\u{1F1FE}"],["Liechtenstein","LI","\u{1F1F1}\u{1F1EE}"],["Lithuania","LT","\u{1F1F1}\u{1F1F9}"],["Luxembourg","LU","\u{1F1F1}\u{1F1FA}"],["Macao SAR China","MO","\u{1F1F2}\u{1F1F4}"],["Madagascar","MG","\u{1F1F2}\u{1F1EC}"],["Malawi","MW","\u{1F1F2}\u{1F1FC}"],["Malaysia","MY","\u{1F1F2}\u{1F1FE}"],["Maldives","MV","\u{1F1F2}\u{1F1FB}"],["Mali","ML","\u{1F1F2}\u{1F1F1}"],["Malta","MT","\u{1F1F2}\u{1F1F9}"],["Marshall Islands","MH","\u{1F1F2}\u{1F1ED}"],["Martinique","MQ","\u{1F1F2}\u{1F1F6}"],["Mauritania","MR","\u{1F1F2}\u{1F1F7}"],["Mauritius","MU","\u{1F1F2}\u{1F1FA}"],["Mayotte","YT","\u{1F1FE}\u{1F1F9}"],["Mexico","MX","\u{1F1F2}\u{1F1FD}"],["Micronesia","FM","\u{1F1EB}\u{1F1F2}"],["Moldova","MD","\u{1F1F2}\u{1F1E9}"],["Monaco","MC","\u{1F1F2}\u{1F1E8}"],["Mongolia","MN","\u{1F1F2}\u{1F1F3}"],["Montenegro","ME","\u{1F1F2}\u{1F1EA}"],["Montserrat","MS","\u{1F1F2}\u{1F1F8}"],["Morocco","MA","\u{1F1F2}\u{1F1E6}"],["Mozambique","MZ","\u{1F1F2}\u{1F1FF}"],["Myanmar (Burma)","MM","\u{1F1F2}\u{1F1F2}"],["Namibia","NA","\u{1F1F3}\u{1F1E6}"],["Nauru","NR","\u{1F1F3}\u{1F1F7}"],["Nepal","NP","\u{1F1F3}\u{1F1F5}"],["Netherlands","NL","\u{1F1F3}\u{1F1F1}"],["New Caledonia","NC","\u{1F1F3}\u{1F1E8}"],["New Zealand","NZ","\u{1F1F3}\u{1F1FF}"],["Nicaragua","NI","\u{1F1F3}\u{1F1EE}"],["Niger","NE","\u{1F1F3}\u{1F1EA}"],["Nigeria","NG","\u{1F1F3}\u{1F1EC}"],["Niue","NU","\u{1F1F3}\u{1F1FA}"],["Norfolk Island","NF","\u{1F1F3}\u{1F1EB}"],["North Korea","KP","\u{1F1F0}\u{1F1F5}"],["North Macedonia","MK","\u{1F1F2}\u{1F1F0}"],["Northern Mariana Islands","MP","\u{1F1F2}\u{1F1F5}"],["Norway","NO","\u{1F1F3}\u{1F1F4}"],["Oman","OM","\u{1F1F4}\u{1F1F2}"],["Pakistan","PK","\u{1F1F5}\u{1F1F0}"],["Palau","PW","\u{1F1F5}\u{1F1FC}"],["Palestinian Territories","PS","\u{1F1F5}\u{1F1F8}"],["Panama","PA","\u{1F1F5}\u{1F1E6}"],["Papua New Guinea","PG","\u{1F1F5}\u{1F1EC}"],["Paraguay","PY","\u{1F1F5}\u{1F1FE}"],["Peru","PE","\u{1F1F5}\u{1F1EA}"],["Philippines","PH","\u{1F1F5}\u{1F1ED}"],["Poland","PL","\u{1F1F5}\u{1F1F1}"],["Portugal","PT","\u{1F1F5}\u{1F1F9}"],["Puerto Rico","PR","\u{1F1F5}\u{1F1F7}"],["Qatar","QA","\u{1F1F6}\u{1F1E6}"],["Romania","RO","\u{1F1F7}\u{1F1F4}"],["Russia","RU","\u{1F1F7}\u{1F1FA}"],["Rwanda","RW","\u{1F1F7}\u{1F1FC}"],["R\xE9union","RE","\u{1F1F7}\u{1F1EA}"],["Samoa","WS","\u{1F1FC}\u{1F1F8}"],["San Marino","SM","\u{1F1F8}\u{1F1F2}"],["Saudi Arabia","SA","\u{1F1F8}\u{1F1E6}"],["Senegal","SN","\u{1F1F8}\u{1F1F3}"],["Serbia","RS","\u{1F1F7}\u{1F1F8}"],["Seychelles","SC","\u{1F1F8}\u{1F1E8}"],["Sierra Leone","SL","\u{1F1F8}\u{1F1F1}"],["Singapore","SG","\u{1F1F8}\u{1F1EC}"],["Sint Maarten","SX","\u{1F1F8}\u{1F1FD}"],["Slovakia","SK","\u{1F1F8}\u{1F1F0}"],["Slovenia","SI","\u{1F1F8}\u{1F1EE}"],["Solomon Islands","SB","\u{1F1F8}\u{1F1E7}"],["Somalia","SO","\u{1F1F8}\u{1F1F4}"],["South Africa","ZA","\u{1F1FF}\u{1F1E6}"],["South Korea","KR","\u{1F1F0}\u{1F1F7}"],["South Sudan","SS","\u{1F1F8}\u{1F1F8}"],["Spain","ES","\u{1F1EA}\u{1F1F8}"],["Sri Lanka","LK","\u{1F1F1}\u{1F1F0}"],["St. Barth\xE9lemy","BL","\u{1F1E7}\u{1F1F1}"],["St. Helena","SH","\u{1F1F8}\u{1F1ED}"],["St. Kitts & Nevis","KN","\u{1F1F0}\u{1F1F3}"],["St. Lucia","LC","\u{1F1F1}\u{1F1E8}"],["St. Martin","MF","\u{1F1F2}\u{1F1EB}"],["St. Pierre & Miquelon","PM","\u{1F1F5}\u{1F1F2}"],["St. Vincent & Grenadines","VC","\u{1F1FB}\u{1F1E8}"],["Sudan","SD","\u{1F1F8}\u{1F1E9}"],["Suriname","SR","\u{1F1F8}\u{1F1F7}"],["Svalbard & Jan Mayen","SJ","\u{1F1F8}\u{1F1EF}"],["Sweden","SE","\u{1F1F8}\u{1F1EA}"],["Switzerland","CH","\u{1F1E8}\u{1F1ED}"],["Syria","SY","\u{1F1F8}\u{1F1FE}"],["S\xE3o Tom\xE9 & Pr\xEDncipe","ST","\u{1F1F8}\u{1F1F9}"],["Taiwan","TW","\u{1F1F9}\u{1F1FC}"],["Tajikistan","TJ","\u{1F1F9}\u{1F1EF}"],["Tanzania","TZ","\u{1F1F9}\u{1F1FF}"],["Thailand","TH","\u{1F1F9}\u{1F1ED}"],["Timor-Leste","TL","\u{1F1F9}\u{1F1F1}"],["Togo","TG","\u{1F1F9}\u{1F1EC}"],["Tokelau","TK","\u{1F1F9}\u{1F1F0}"],["Tonga","TO","\u{1F1F9}\u{1F1F4}"],["Trinidad & Tobago","TT","\u{1F1F9}\u{1F1F9}"],["Tristan da Cunha","TA","\u{1F1F9}\u{1F1E6}"],["Tunisia","TN","\u{1F1F9}\u{1F1F3}"],["Turkey","TR","\u{1F1F9}\u{1F1F7}"],["Turkmenistan","TM","\u{1F1F9}\u{1F1F2}"],["Turks & Caicos Islands","TC","\u{1F1F9}\u{1F1E8}"],["Tuvalu","TV","\u{1F1F9}\u{1F1FB}"],["U.S. Virgin Islands","VI","\u{1F1FB}\u{1F1EE}"],["Uganda","UG","\u{1F1FA}\u{1F1EC}"],["Ukraine","UA","\u{1F1FA}\u{1F1E6}"],["United Arab Emirates","AE","\u{1F1E6}\u{1F1EA}"],["United Kingdom","GB","\u{1F1EC}\u{1F1E7}"],["United States","US","\u{1F1FA}\u{1F1F8}"],["Uruguay","UY","\u{1F1FA}\u{1F1FE}"],["Uzbekistan","UZ","\u{1F1FA}\u{1F1FF}"],["Vanuatu","VU","\u{1F1FB}\u{1F1FA}"],["Vatican City","VA","\u{1F1FB}\u{1F1E6}"],["Venezuela","VE","\u{1F1FB}\u{1F1EA}"],["Vietnam","VN","\u{1F1FB}\u{1F1F3}"],["Wallis & Futuna","WF","\u{1F1FC}\u{1F1EB}"],["Western Sahara","EH","\u{1F1EA}\u{1F1ED}"],["Yemen","YE","\u{1F1FE}\u{1F1EA}"],["Zambia","ZM","\u{1F1FF}\u{1F1F2}"],["Zimbabwe","ZW","\u{1F1FF}\u{1F1FC}"],["\xC5land Islands","AX","\u{1F1E6}\u{1F1FD}"]];var Qa=Vn,Wn=Qa.map(([e,o,t])=>({name:e,code:o,callCode:_jssdkcore.getCountryCallingCode.call(void 0, o),flag:t}));var Dn=({country:e,onPress:o,selected:t})=>{let{colors:r}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.Pressable,{onPress:o},zt.default.createElement(_reactnative.View,{style:Yt.row},zt.default.createElement(_reactnative.Text,{style:Yt.rowFlag},e.flag),zt.default.createElement(_reactnative.Text,{style:[Yt.rowLabel,{color:r.text}]},e.name," (+",e.callCode,")"),t&&zt.default.createElement(_chunkXPHUZG6Ujs.g,{size:24,color:r.interactive})))},Yt=_reactnative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",gap:10,height:56},rowFlag:{fontFamily:"Inter_400Regular",fontSize:17,lineHeight:22},rowLabel:{flex:1,fontFamily:"Inter_400Regular",fontSize:17,lineHeight:22}});var ll=600,Hn=({countryCode:e,onChangeCountryCode:o,onComplete:t})=>{let{colors:r}=_chunkXPHUZG6Ujs.b.call(void 0, ),[i,n]=_react.useState.call(void 0, ""),s=Bn(i,ll),a=_react.useMemo.call(void 0, ()=>Wn.filter(u=>u.name.toLowerCase().includes(s.toLowerCase())),[s]);return zt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:Nn.innerContainer},zt.default.createElement(_reactnative.View,{style:Nn.header},zt.default.createElement(A,{title:"Select country code"}),zt.default.createElement(po,{LeftIcon:zt.default.createElement(_chunkXPHUZG6Ujs.F,{size:24,color:r.iconSubtle}),value:i,onChangeText:n,placeholder:"Search country"})),zt.default.createElement(_reactnative.FlatList,{style:{flex:1},data:a,keyExtractor:u=>`country-option-${u.code}`,renderItem:({item:u})=>zt.default.createElement(Dn,{country:u,selected:u.code===e,onPress:()=>{o(u.code),t()}})}),zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Continue",onPress:t}))},Nn=_reactnative.StyleSheet.create({innerContainer:{flex:1,paddingHorizontal:16},header:{gap:20}});var Gn=({countryCode:e,onPress:o})=>{let{colors:t}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.Pressable,{onPress:o},zt.default.createElement(_reactnative.View,{style:zn.cell},zt.default.createElement(_reactnative.Text,{style:[zn.text,{color:t.text}]},e," +",_jssdkcore.getCountryCallingCode.call(void 0, e)),zt.default.createElement(_chunkXPHUZG6Ujs.h,{size:16,color:t.icon})))},zn=_reactnative.StyleSheet.create({cell:{flexDirection:"row",alignItems:"center",gap:6},text:{fontFamily:"Inter_400Regular",fontSize:18,lineHeight:30}});var ct=({sendCode:e,isLoading:o,error:t,initialPhone:r,FooterComponent:i})=>{let[n,s]=_react.useState.call(void 0, r!=null?r:""),[a,u]=_react.useState.call(void 0, "US"),[m,l]=_react.useState.call(void 0, !1),d=_jssdkcore.phoneNumberTypingFormatter.call(void 0, a),c=_jssdkcore.getPlaceholderPhoneNumber.call(void 0, a),p=f=>{try{let S=f.replace(/\D/g,""),h=n.replace(/\D/g,""),v=S===h?f:d.input(f);s(v)}catch(S){console.error("Error processing phone number:",S),s("")}};return m?zt.default.createElement(Hn,{countryCode:a,onChangeCountryCode:u,onComplete:()=>l(!1)}):zt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:lt.innerContainer},zt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},zt.default.createElement(_reactnative.View,{style:lt.content},zt.default.createElement(_reactnative.View,{style:lt.content},zt.default.createElement(_reactnative.View,{style:lt.formContainer},zt.default.createElement(A,{title:"Enter your phone"}),zt.default.createElement(po,{LeftIcon:zt.default.createElement(Gn,{countryCode:a,onPress:()=>l(!0)}),value:n,onChangeText:p,error:!!t,status:t?vl(t):" ",placeholder:c,autoComplete:"tel",keyboardType:"phone-pad",autoFocus:!0})),i),zt.default.createElement(W,null)),zt.default.createElement(_reactnative.View,null,zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Continue",loading:o,onPress:()=>e(_jssdkcore.formatPhoneNumber.call(void 0, n.replace(/\D/g,""),a))}),zt.default.createElement(uo,null))))},vl=_jssdkcore.createErrorFormatter.call(void 0, {allowlist_rejected:"You don't have access to this app. Have you been invited?",max_accounts_reached:"This application has reached its user limit and cannot sign in new users.",invalid_data:"Phone is incorrect.",too_many_requests:"Too many requests. Please try again later.",not_supported:"Region or carrier not yet supported.",default:"Something went wrong. Please try again."}),lt=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:4},formContainer:{rowGap:24}});var Il=600,Kn=({goBackRef:e,onLoginMethodChange:o,otherLoginMethod:t})=>{let{setOtpState:r}=_react.useContext.call(void 0, _chunk7VW6NBHOjs.la),i=Be(),[n,s]=_react.useState.call(void 0, ""),{state:a,loginWithCode:u,sendCode:m}=_chunk7VW6NBHOjs.u.call(void 0, ),[l,d]=_react.useState.call(void 0, "phone"),{step:c,error:p=null,isLoading:f=!1,isDone:S=!1}=_react.useMemo.call(void 0, ()=>{var h;switch(a.status){case"initial":return{step:{type:"phone"}};case"sending-code":return{step:{type:l},isLoading:!0};case"awaiting-code-input":return{step:{type:"code"}};case"submitting-code":return{step:{type:"code"},isLoading:!0};case"done":return{step:{type:"code"},isDone:!0};case"error":return{step:{type:l},error:(h=a.error)!=null?h:new Error("Unknown error")}}},[l,a.status]);switch(l!==c.type&&d(c.type),_react.useEffect.call(void 0, ()=>{if(!S)return;let h=setTimeout(()=>{i()},Il);return()=>clearTimeout(h)},[S,i]),_react.useEffect.call(void 0, ()=>{if(c.type==="code")return e.current=()=>{r({status:"initial"})},()=>{e.current=null}},[c.type,r,i]),c.type){case"phone":return zt.default.createElement(ct,{initialPhone:n,sendCode:h=>{s(h),m({phone:h})},isLoading:f,error:p,FooterComponent:zt.default.createElement(st,{onLoginMethodChange:o,otherLoginMethod:t})});case"code":return zt.default.createElement(se,{onSendCode:h=>u({code:h,phone:n}),onRequestNewCode:()=>m({phone:n}),subtitle:`Please check ${n} for a message with your login code.`,isLoading:f,error:p,isDone:S})}};var Yn=()=>{let{colors:e}=_chunkXPHUZG6Ujs.b.call(void 0, ),o=_reactnative.useAnimatedValue.call(void 0, 0);_react.useEffect.call(void 0, ()=>{o.setValue(0);let r=_reactnative.Animated.loop(_reactnative.Animated.timing(o,{toValue:1,duration:1200,useNativeDriver:!0,easing:_reactnative.Easing.linear}));return r.start(),()=>r.stop()},[o]);let t=o.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return zt.default.createElement(_reactnative.Animated.View,{style:{transform:[{rotate:t}]}},zt.default.createElement(_reactnativesvg2.default,{width:160,height:160,viewBox:"0 0 166 166",fill:"none"},zt.default.createElement(_reactnativesvg.Circle,{cx:"83",cy:"83",r:"80",stroke:e.icon,strokeWidth:"6"}),zt.default.createElement(_reactnativesvg.Path,{d:"M142.715 29.7639C156.578 45.3143 163.829 65.6592 162.925 86.4724C162.02 107.286 153.033 126.925 137.873 141.214C122.714 155.504 102.578 163.316 81.7476 162.99C60.9174 162.664 41.036 154.225 26.3312 139.468",stroke:e.iconSubtle,strokeWidth:"6",strokeLinecap:"round"})))};var We=()=>zt.default.createElement(_reactnative.View,{style:kl.container},zt.default.createElement(Yn,null)),kl=_reactnative.StyleSheet.create({container:{flex:1,gap:20,alignItems:"center",justifyContent:"center",paddingHorizontal:16}});function Ce({children:e,footer:o}){return zt.default.createElement(_reactnative.ScrollView,{contentContainerStyle:le.scroll,bounces:!1},zt.default.createElement(_reactnative.View,{style:le.content},e),o?zt.default.createElement(_reactnative.View,{style:le.footer},o):null)}function ve({Icon:e,accent:o=!1}){let{colors:t}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:[le.iconCircle,{backgroundColor:o?t.interactive:t.backgroundSecondary}]},zt.default.createElement(e,{size:o?26:24,strokeWidth:2,color:o?t.textInteractive:t.icon}))}function Pe({title:e,subtitle:o}){let{colors:t}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:le.header},zt.default.createElement(_reactnative.Text,{accessibilityRole:"header",style:[le.title,{color:t.textTitle}]},e),typeof o=="string"?zt.default.createElement($e,null,o):o)}function $e({children:e}){let{colors:o}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.Text,{style:[le.subtitle,{color:o.text}]},e)}function ut({items:e}){let{colors:o}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:le.checklist},e.map(t=>zt.default.createElement(_reactnative.View,{key:t,style:le.checklistRow},zt.default.createElement(_reactnative.View,{style:[le.checkCircle,{backgroundColor:o.backgroundSecondary}]},zt.default.createElement(_chunkXPHUZG6Ujs.g,{size:14,strokeWidth:3,color:o.icon})),zt.default.createElement(_reactnative.Text,{style:[le.checklistLabel,{color:o.text}]},t))))}function Qt({url:e,children:o}){let t=_chunkXPHUZG6Ujs.V.call(void 0, e);return zt.default.createElement(_reactnative.Text,{style:le.link,accessibilityRole:t?"link":void 0,onPress:t?()=>void Zn.openBrowserAsync(t).catch(()=>{}):void 0},o)}var le=_reactnative.StyleSheet.create({scroll:{flexGrow:1,justifyContent:"space-between",paddingHorizontal:24,paddingVertical:24,gap:24},content:{alignItems:"center",gap:24},footer:{gap:12},iconCircle:{width:64,height:64,borderRadius:32,alignItems:"center",justifyContent:"center"},header:{alignItems:"center",gap:8},title:{fontFamily:_chunkXPHUZG6Ujs.R.semibold,fontSize:22,lineHeight:28,textAlign:"center"},subtitle:{fontFamily:_chunkXPHUZG6Ujs.R.regular,fontSize:16,lineHeight:24,textAlign:"center"},checklist:{alignSelf:"stretch",gap:10},checklistRow:{flexDirection:"row",alignItems:"center",gap:12},checkCircle:{width:28,height:28,borderRadius:14,alignItems:"center",justifyContent:"center"},checklistLabel:{flex:1,fontFamily:_chunkXPHUZG6Ujs.R.regular,fontSize:16,lineHeight:24},link:{textDecorationLine:"underline"}});function Lo({Icon:e=_chunkXPHUZG6Ujs.q,title:o,subtitle:t,cta:r,pending:i,onPress:n}){return zt.default.createElement(Ce,{footer:zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:r,onPress:n,loading:i})},zt.default.createElement(ve,{Icon:e}),zt.default.createElement(Pe,{title:o,subtitle:t}))}function go({Icon:e=_chunkXPHUZG6Ujs.q,accent:o,title:t,subtitle:r,cta:i,secondary:n,onPress:s}){return zt.default.createElement(Ce,{footer:zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:i,variant:n?"secondary":"primary",style:n?Wl.centeredButton:void 0,onPress:s})},zt.default.createElement(ve,{Icon:e,accent:o}),zt.default.createElement(Pe,{title:t,subtitle:r}))}var Wl=_reactnative.StyleSheet.create({centeredButton:{justifyContent:"center"}});function Qn({symbol:e,vaultProvider:o}){let{colors:t}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:Jn.effects},zt.default.createElement(_reactnative.Text,{style:[Jn.heading,{color:t.text}]},"What this does:"),zt.default.createElement(ut,{items:o?["Automatically withdraws only what's needed for purchases","Your remaining assets stay in Earn","Turn this off anytime in Settings"]:[`Connects your card to your ${e} balance`,"Lets your card make purchases","Spending limits are managed separately"]}),o?zt.default.createElement($e,null,`Earn is separate from your card and involves risk. Earn is provided by ${o} through your noncustodial wallet. Assets in Earn can lose value and aren't held, insured, or guaranteed by Lead Bank or Bridge. Card protections don't cover losses from Earn. Your prepaid debit card is issued by Lead Bank.`):null)}var Jn=_reactnative.StyleSheet.create({effects:{alignSelf:"stretch",gap:16},heading:{fontFamily:_chunkXPHUZG6Ujs.R.semibold,fontSize:14,lineHeight:20}});function Ze({title:e,subtitle:o}){return zt.default.createElement(Ce,{footer:zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:e,loading:!0,disabled:!0})},zt.default.createElement(ve,{Icon:_chunkXPHUZG6Ujs.q}),zt.default.createElement(Pe,{title:e,subtitle:o}))}var _areaddressesequal = require('@privy-io/are-addresses-equal');var _viem = require('viem');function Xt({client:e,account:o,provider:t}){return(a,u)=>_chunkC5WYSLQFjs.e.call(void 0, this,[a,u],function*({to:r,chainId:i,data:n},{sponsor:s}){if(s){if(!_jssdkcore.isUnifiedWallet.call(void 0, o))throw new Error("Sponsored sends need a wallet that executes in Privy's secure enclave");let l=yield _jssdkcore.rpc.call(void 0, e,(...d)=>e.embeddedWallet.signWithUserSigner(...d),{wallet_id:o.id,chain_type:"ethereum",method:"eth_sendTransaction",caip2:`eip155:${i}`,sponsor:!0,params:{transaction:{from:o.address,to:r,chain_id:_viem.toHex.call(void 0, i),data:n}}});if(l.data&&"hash"in l.data)return{hash:l.data.hash};throw new Error("Sponsored approval did not return a transaction hash")}let m=yield t.request({method:"eth_sendTransaction",params:[{from:o.address,to:r,chainId:i,data:n}]});if(typeof m!="string")throw new Error("Card spend approval did not return a hash");return{hash:m}})}function Xn({environment:e,walletId:o,chainId:t,asset:r,spendApproval:i}){let n=_chunk7VW6NBHOjs.m.call(void 0, ),s=_chunk7VW6NBHOjs.d.call(void 0, ),{wallets:a}=_chunk7VW6NBHOjs.Z.call(void 0, ),u=_react.useRef.call(void 0, s);u.current=s;let m=_react.useRef.call(void 0, a);m.current=a;let l=_react.useRef.call(void 0, i);l.current=i;let d=_react.useCallback.call(void 0, ()=>{var k;let C=(k=u.current)==null?void 0:k.linked_accounts.find(T=>_jssdkcore.isEmbeddedWalletAccount.call(void 0, T)&&T.id===o);if(!C)throw new Error("Could not find the wallet for this card");let x=m.current.find(T=>_areaddressesequal.areAddressesEqual.call(void 0, T.address,C.address));if(!x)throw new Error("Connect the wallet for this card to approve spending");return{account:C,wallet:x}},[o]),c=_react.useCallback.call(void 0, ()=>{let C=_jssdkcore.getSpendApproval.call(void 0, t,l.current,r);if((C==null?void 0:C.kind)!=="evm")return{kind:"unsupported",reason:"Card spending is not yet supported on this network"};let{account:x,wallet:k}=d(),T=Number(t.slice(7)),{stablecoinAddress:j,spenderAddress:fe}=C;return{kind:"supported",isApproved:()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){return(yield _jssdkcore.readSpendAllowance.call(void 0, {provider:yield k.getProvider(),evmChainId:T,owner:x.address,stablecoinAddress:j,spenderAddress:fe}))>BigInt(0)}),approve:()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){yield _jssdkcore.approveSpend.call(void 0, {sendTransaction:Xt({client:n,account:x,provider:yield k.getProvider()}),evmChainId:T,stablecoinAddress:j,spenderAddress:fe})})}},[r,n,t,d]),p=_react.useCallback.call(void 0, ()=>{let{account:C,wallet:x}=d();return{address:C.address,getProvider:()=>x.getProvider(),sendTransaction:(T,j)=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){return Xt({client:n,account:C,provider:yield x.getProvider()})(T,j)})}},[n,d]),f=_react.useMemo.call(void 0, ()=>_jssdkcore.createCardSignUp.call(void 0, {client:n,environment:e,walletId:o,chainId:t,asset:r,platform:{openHostedPage:_chunkXPHUZG6Ujs.W,resolveSpendApproval:c,resolveEvmWallet:p,setStep:_chunkXPHUZG6Ujs._}}),[n,e,o,t,r,c,p]),S=_react.useCallback.call(void 0, ()=>{let C=_chunkXPHUZG6Ujs.Y.call(void 0, );C&&f.start(C.signal)},[f]),h=_react.useCallback.call(void 0, ()=>{let C=_chunkXPHUZG6Ujs.Y.call(void 0, );C&&f.acceptDisclosure(C.signal)},[f]),v=_react.useCallback.call(void 0, ()=>{let C=_chunkXPHUZG6Ujs.Y.call(void 0, );C&&f.acceptBankTerms(C.signal)},[f]),I=_react.useCallback.call(void 0, ()=>{let C=_chunkXPHUZG6Ujs.Y.call(void 0, );C&&f.proceed(C.signal)},[f]),_=_react.useCallback.call(void 0, ()=>{let C=_chunkXPHUZG6Ujs.Y.call(void 0, );C&&f.approve(C.signal)},[f]),F=_react.useCallback.call(void 0, ()=>{let C=_chunkXPHUZG6Ujs.Y.call(void 0, );C&&f.retry(C.signal)},[f]);return _react.useEffect.call(void 0, ()=>{let C=_chunkXPHUZG6Ujs.Y.call(void 0, );C&&f.load(C.signal)},[f]),{start:S,acceptDisclosure:h,acceptBankTerms:v,proceed:I,approve:_,retry:F}}function Rn(){let e=_chunkXPHUZG6Ujs.X.call(void 0, );return e?zt.default.createElement(rc,_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},e.options),{step:e.step,onSuccess:e.onSuccess,onFailure:e.onFailure})):null}function rc(e){let{environment:o,walletId:t,chainId:r,asset:i,step:n,onSuccess:s,onFailure:a}=e,u=e.environment==="production"?e.spendApproval:void 0,m=_chunk7VW6NBHOjs.m.call(void 0, ),{start:l,acceptDisclosure:d,acceptBankTerms:c,proceed:p,approve:f,retry:S}=Xn({environment:o,walletId:t,chainId:r,asset:i,spendApproval:u}),h=m.app.getConfig(),v=(h==null?void 0:h.name)||void 0,I=(h==null?void 0:h.legal_name)||v,_=_jssdkcore.getCardAssetDisplayName.call(void 0, i),F=()=>_jssdkcore.handleSignUpClose.call(void 0, {step:n,onSuccess:s,onFailure:a}),C=()=>{var x,k;switch(n.status){case"loading":return zt.default.createElement(We,null);case"get-started":return zt.default.createElement(Ce,{footer:zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Get started",onPress:l,loading:n.pending})},zt.default.createElement(ve,{Icon:_chunkXPHUZG6Ujs.q}),zt.default.createElement(Pe,{title:v?`Create ${v} card`:"Create card",subtitle:v?`Complete a few quick steps to set up your ${v} card.`:"Complete a few quick steps to set up your card."}),zt.default.createElement(ut,{items:["Review required agreements","Provide your information","Verify your identity"]}));case"disclosure-prompt":return zt.default.createElement(Lo,{Icon:_chunkXPHUZG6Ujs.v,title:"Accept electronic disclosures",subtitle:zt.default.createElement($e,null,"Review and accept the"," ",zt.default.createElement(Qt,{url:n.disclosureUrl},"Electronic Disclosure Statement")," to receive and sign card documents electronically."),cta:"Accept and continue",onPress:d});case"accepting-disclosure":return zt.default.createElement(Ze,{title:"Accepting disclosures",subtitle:"This will only take a moment."});case"bank-terms-prompt":{let T=n.bankInfo.name;return zt.default.createElement(Lo,{Icon:_chunkXPHUZG6Ujs.w,title:"Review card agreements",subtitle:zt.default.createElement(zt.default.Fragment,null,zt.default.createElement($e,null,`${I!=null?I:"This app"} uses a wallet provided by Privy. ${T} issues the card, and Bridge manages the card program.`),zt.default.createElement($e,null,"By tapping Accept and continue, you agree to the"," ",nc(n.bankInfo.agreements),".")),cta:"Accept and continue",onPress:c})}case"accepting-bank-terms":return zt.default.createElement(Ze,{title:"Accepting agreements",subtitle:"This will only take a moment."});case"provider-terms-prompt":return zt.default.createElement(Lo,{Icon:_chunkXPHUZG6Ujs.w,title:"Review card program terms",subtitle:"Open the card program terms to review and accept them.",cta:"Accept and continue",pending:n.pending,onPress:p});case"accepting-provider-terms":return zt.default.createElement(Ze,{title:"Review card program terms",subtitle:"Finish reviewing the card program terms in the browser to continue."});case"kyc-prompt":return zt.default.createElement(Lo,{title:"Verify your identity",subtitle:"Open the verification flow to confirm your identity.",cta:"Verify identity",pending:n.pending,onPress:p});case"verifying-identity":return zt.default.createElement(Ze,{title:"Verify your identity",subtitle:"Finish verifying your identity in the browser to continue."});case"pending":return zt.default.createElement(Ze,{title:"Finishing up",subtitle:"We're getting your account ready. This can take a moment."});case"under-review":return zt.default.createElement(go,{Icon:_chunkXPHUZG6Ujs.G,title:"Identity under review",subtitle:"Your identity information is being reviewed. You can close this sign up and check back later to finish.",cta:"Done",secondary:!0,onPress:F});case"creating-card":return zt.default.createElement(Ze,{title:"Creating your card",subtitle:"Hang tight while we finish creating your card."});case"approve-prompt":{let{vaultProvider:T}=n;return zt.default.createElement(Ce,{footer:zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Approve and continue",onPress:f,loading:n.pending})},zt.default.createElement(ve,{Icon:T?_chunkXPHUZG6Ujs.f:_chunkXPHUZG6Ujs.q}),zt.default.createElement(Pe,{title:T?"Spend from your Earn balance":"Approve card spending",subtitle:T?"Keep funds in Earn until they're needed for a card purchase.":`Sign a one-time approval to let your card spend from your selected ${_} balance.`}),zt.default.createElement(Qn,{symbol:_,vaultProvider:T}))}case"ready":{let T=n.cardId;return zt.default.createElement(go,{Icon:_chunkXPHUZG6Ujs.g,accent:!0,title:"Your card is ready",subtitle:"Your card has been created and is ready to use.",cta:"Continue",onPress:()=>s({id:T})})}case"rejected":return zt.default.createElement(go,{title:"We couldn't verify your identity",subtitle:(x=n.reason)!=null?x:"Your card application could not be approved.",cta:"Done",secondary:!0,onPress:F});case"approve-error":return zt.default.createElement(go,{title:"Spend approval failed",subtitle:"We couldn't approve card spending. Tap below to try again.",cta:"Try again",onPress:f});case"error":return zt.default.createElement(go,{title:"Something went wrong",subtitle:(k=n.message)!=null?k:"We couldn't set up your card. Please try again.",cta:"Try again",onPress:S});default:return null}};return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{close:F}),o==="sandbox"?zt.default.createElement(_reactnative.View,{style:ic.banner},zt.default.createElement(_chunkXPHUZG6Ujs.S,{variant:"info"},zt.default.createElement(_chunkXPHUZG6Ujs.T,null,"In sandbox mode using test funds"))):null,C())}function nc(e){return e.map((o,t)=>{let r=t===e.length-1,i=t===0?"":r?`${e.length>2?",":""} and `:", ";return zt.default.createElement(_react.Fragment,{key:o.id},i,zt.default.createElement(Qt,{url:o.url||void 0},o.name))})}var ic=_reactnative.StyleSheet.create({banner:{paddingHorizontal:24}});var cc=28,mc=24,ei=({close:e,style:o})=>{let{colors:t}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:[dc.slimNavigationBar,o]},e&&zt.default.createElement(_reactnative.Pressable,{onPress:e},zt.default.createElement(_chunkXPHUZG6Ujs.m,{color:t.icon,size:mc})))},dc=_reactnative.StyleSheet.create({slimNavigationBar:{height:cc,paddingBottom:4,flexDirection:"row",justifyContent:"flex-end",backgroundColor:"transparent"}});var O=({title:e="Error!",subtitle:o="Something went wrong."})=>{let{colors:t}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:fc.container},zt.default.createElement(_chunkXPHUZG6Ujs.m,{size:74,color:t.error}),zt.default.createElement(A,{title:e,subtitle:o,tight:!0}))},fc=_reactnative.StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:16}});var Y=({title:e="Success!",subtitle:o})=>{let{colors:t}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:Cc.container},zt.default.createElement(_reactnativesvg2.default,{height:"74",width:"74",viewBox:"0 0 74 74"},zt.default.createElement(_reactnativesvg.Circle,{cx:"37",cy:"37",r:"36.8",fill:t.successLight}),zt.default.createElement(_reactnativesvg.G,{transform:"translate(18, 18)"},zt.default.createElement(_chunkXPHUZG6Ujs.k,{size:38,color:t.success}))),zt.default.createElement(A,{title:e,subtitle:o,tight:!0}))},Cc=_reactnative.StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:16}});var Mc=e=>tr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",x:0,y:0,baseProfile:"tiny",viewBox:"0 0 512 210.2"},e),tr.createElement(_reactnativesvg.Path,{d:"M93.6 27.1C87.6 34.2 78 39.8 68.4 39c-1.2-9.6 3.5-19.8 9-26.1 6-7.3 16.5-12.5 25-12.9 1 10-2.9 19.8-8.8 27.1m8.7 13.8c-13.9-.8-25.8 7.9-32.4 7.9-6.7 0-16.8-7.5-27.8-7.3-14.3.2-27.6 8.3-34.9 21.2-15 25.8-3.9 64 10.6 85 7.1 10.4 15.6 21.8 26.8 21.4 10.6-.4 14.8-6.9 27.6-6.9 12.9 0 16.6 6.9 27.8 6.7 11.6-.2 18.9-10.4 26-20.8 8.1-11.8 11.4-23.3 11.6-23.9-.2-.2-22.4-8.7-22.6-34.3-.2-21.4 17.5-31.6 18.3-32.2-10-14.8-25.6-16.4-31-16.8m80.3-29v155.9h24.2v-53.3h33.5c30.6 0 52.1-21 52.1-51.4s-21.1-51.2-51.3-51.2zm24.2 20.4h27.9c21 0 33 11.2 33 30.9s-12 31-33.1 31h-27.8zM336.6 169c15.2 0 29.3-7.7 35.7-19.9h.5v18.7h22.4V90.2c0-22.5-18-37-45.7-37-25.7 0-44.7 14.7-45.4 34.9h21.8c1.8-9.6 10.7-15.9 22.9-15.9 14.8 0 23.1 6.9 23.1 19.6v8.6l-30.2 1.8c-28.1 1.7-43.3 13.2-43.3 33.2 0 20.2 15.7 33.6 38.2 33.6m6.5-18.5c-12.9 0-21.1-6.2-21.1-15.7 0-9.8 7.9-15.5 23-16.4l26.9-1.7v8.8c0 14.6-12.4 25-28.8 25m82 59.7c23.6 0 34.7-9 44.4-36.3L512 54.7h-24.6l-28.5 92.1h-.5l-28.5-92.1h-25.3l41 113.5-2.2 6.9c-3.7 11.7-9.7 16.2-20.4 16.2-1.9 0-5.6-.2-7.1-.4v18.7c1.4.4 7.4.6 9.2.6"})),oi=Mc;var bc=e=>Je.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",x:0,y:0,viewBox:"0 0 80 38.1"},e),Je.createElement(_reactnativesvg.Path,{d:"M37.8 19.7V29h-3V6h7.8c1.9 0 3.7.7 5.1 2 1.4 1.2 2.1 3 2.1 4.9s-.7 3.6-2.1 4.9-3.1 2-5.1 2zm0-10.9v8h5c1.1 0 2.2-.4 2.9-1.2 1.6-1.5 1.6-4 .1-5.5l-.1-.1c-.8-.8-1.8-1.3-2.9-1.2zM56.7 12.8c2.2 0 3.9.6 5.2 1.8s1.9 2.8 1.9 4.8V29H61v-2.2h-.1c-1.2 1.8-2.9 2.7-4.9 2.7-1.7 0-3.2-.5-4.4-1.5-1.1-1-1.8-2.4-1.8-3.9q0-2.4 1.8-3.9c1.2-1 2.9-1.4 4.9-1.4 1.8 0 3.2.3 4.3 1v-.7c0-1-.4-2-1.2-2.6-.8-.7-1.8-1.1-2.9-1.1q-2.55 0-3.9 2.1l-2.6-1.6c1.6-2.1 3.7-3.1 6.5-3.1m-3.8 11.4c0 .8.4 1.5 1 1.9.7.5 1.5.8 2.3.8 1.2 0 2.4-.5 3.3-1.4 1-.9 1.5-2 1.5-3.2-.9-.7-2.2-1.1-3.9-1.1q-1.8 0-3 .9-1.2.75-1.2 2.1M80 13.3 70.1 36h-3l3.7-7.9-6.5-14.7h3.2l4.7 11.3h.1l4.6-11.3H80z",style:{fill:"#5f6368"}}),Je.createElement(_reactnativesvg.Path,{d:"M25.9 17.7c0-.9-.1-1.8-.2-2.7H13.2v5.1h7.1c-.3 1.6-1.2 3.1-2.6 4v3.3H22c2.5-2.3 3.9-5.7 3.9-9.7",style:{fill:"#4285f4"}}),Je.createElement(_reactnativesvg.Path,{d:"M13.2 30.6c3.6 0 6.6-1.2 8.8-3.2l-4.3-3.3c-1.2.8-2.7 1.3-4.5 1.3-3.4 0-6.4-2.3-7.4-5.5H1.4v3.4c2.3 4.5 6.8 7.3 11.8 7.3",style:{fill:"#34a853"}}),Je.createElement(_reactnativesvg.Path,{d:"M5.8 19.9c-.6-1.6-.6-3.4 0-5.1v-3.4H1.4c-1.9 3.7-1.9 8.1 0 11.9z",style:{fill:"#fbbc04"}}),Je.createElement(_reactnativesvg.Path,{d:"M13.2 9.4c1.9 0 3.7.7 5.1 2l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4-5 0-9.6 2.8-11.8 7.3l4.4 3.4c.9-3.2 3.9-5.5 7.3-5.5",style:{fill:"#ea4335"}})),ti=bc;function ko({method:e}){let{colors:o}=_chunkXPHUZG6Ujs.b.call(void 0, );switch(e){case"card":return zt.default.createElement(_chunkXPHUZG6Ujs.q,{size:24,color:o.icon});case"exchange":return zt.default.createElement(_chunkXPHUZG6Ujs.d,{size:24,color:o.icon});case"payment-request":return _reactnative.Platform.OS==="ios"?zt.default.createElement(oi,{height:70,width:33}):zt.default.createElement(ti,{height:70,width:33});case"manual":return zt.default.createElement(_chunkXPHUZG6Ujs.C,{size:24,color:o.icon});default:return null}}function ni({appName:e,methods:o,onMethodSelected:t,onSwitchProvider:r}){let{colors:i}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.ScrollView,{style:rr.scrollView,contentContainerStyle:rr.container},zt.default.createElement(_reactnative.View,{style:{gap:32}},zt.default.createElement(A,{title:"Add funds",subtitle:`Select a method for funding your ${e?`${e} `:""}wallet.`}),zt.default.createElement(_reactnative.View,{style:rr.listContainer},o.includes("card")&&zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Debit card",LeftIcon:zt.default.createElement(ko,{method:"card"}),RightIcon:o.includes("payment-request")?zt.default.createElement(ko,{method:"payment-request"}):void 0,onPress:()=>t("card"),variant:"secondary"}),o.includes("exchange")&&zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Transfer from an exchange",LeftIcon:zt.default.createElement(ko,{method:"exchange"}),onPress:()=>t("exchange"),variant:"secondary"}),zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Receive funds",LeftIcon:zt.default.createElement(ko,{method:"manual"}),onPress:()=>t("manual"),variant:"secondary"}),!!r&&zt.default.createElement(_reactnative.Pressable,{onPress:r},zt.default.createElement(_chunkXPHUZG6Ujs.S,{variant:"info",style:{borderWidth:1}},zt.default.createElement(_chunkXPHUZG6Ujs.y,{size:16,color:i.iconInformation}),zt.default.createElement(_chunkXPHUZG6Ujs.T,null,"Having trouble facing location restrictions?"," ",zt.default.createElement(_reactnative.Text,{style:{color:i.interactive}},"Try a different provider.")))))),zt.default.createElement(W,null))}var rr=_reactnative.StyleSheet.create({scrollView:{flex:1},container:{paddingHorizontal:16,justifyContent:"space-between",flex:1},listContainer:{gap:16,alignSelf:"stretch"}});function si({uri:e,goBackRef:o}){let t=_react.useRef.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{e&&!t.current&&(t.current=!0,ii.openBrowserAsync(e,{createTask:!1}).catch(r=>{console.warn("[Privy] Funding flow error",r)}).finally(()=>{var r;(r=o==null?void 0:o.current)==null||r.call(o)}))},[e,o]),zt.default.createElement(We,null)}var _reactnativeqrcodestyled = require('react-native-qrcode-styled'); var _reactnativeqrcodestyled2 = _interopRequireDefault(_reactnativeqrcodestyled);var _expoclipboard = require('expo-clipboard'); var di = _interopRequireWildcard(_expoclipboard); var Ts = _interopRequireWildcard(_expoclipboard);function ai({children:e,style:o}){let{colors:t}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.Text,{style:[Wc.badge,{backgroundColor:t.backgroundHighlight,color:t.textHighlight},o]},e)}var Wc=_reactnative.StyleSheet.create({badge:{fontSize:12,lineHeight:18,paddingHorizontal:8,paddingVertical:2,borderRadius:6,flexGrow:0}});function li({children:e,stopped:o}){let t=_reactnative.useAnimatedValue.call(void 0, 1);return _react.useEffect.call(void 0, ()=>{let r=_reactnative.Animated.loop(_reactnative.Animated.sequence([_reactnative.Animated.timing(t,{toValue:.3,duration:800,useNativeDriver:!0}),_reactnative.Animated.timing(t,{toValue:1,duration:800,useNativeDriver:!0})]));return!o&&r.start(),()=>(r.stop(),r.reset())},[t,o]),zt.default.createElement(_reactnative.Animated.View,{style:{opacity:t}},e)}function ui({address:e,balance:o,currencySymbol:t,isLoading:r}){let{colors:i}=_chunkXPHUZG6Ujs.b.call(void 0, ),[n,s]=_react.useState.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{if(n){let a=setTimeout(()=>s(!1),2e3);return()=>clearTimeout(a)}},[n]),zt.default.createElement(_reactnative.Pressable,{style:[nr.container,{borderColor:i.border}],onPress:()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){di.setStringAsync(e),s(!0)})},zt.default.createElement(_reactnative.View,null,zt.default.createElement(_reactnative.Text,{style:[nr.title,{color:i.textMuted}]},"Your wallet"),zt.default.createElement(_reactnative.View,{style:{flexDirection:"row",gap:10,alignItems:"center"}},zt.default.createElement(_reactnative.Text,{style:[nr.walletAddress,{color:i.text}]},_jssdkcore.formatWalletAddress.call(void 0, e)),n?zt.default.createElement(_chunkXPHUZG6Ujs.g,{size:14,color:i.textMuted}):zt.default.createElement(_chunkXPHUZG6Ujs.p,{size:14,color:i.textMuted}))),zt.default.createElement(li,{stopped:!r},zt.default.createElement(ai,{style:{minWidth:50}},r?"":`${o} ${t}`)))}var nr=_reactnative.StyleSheet.create({container:{paddingHorizontal:16,paddingVertical:12,borderRadius:10,borderWidth:1,borderStyle:"solid",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},title:{fontSize:12,lineHeight:18},walletAddress:{fontSize:14,lineHeight:22,fontFamily:_chunkXPHUZG6Ujs.R.medium}});var Zc=e=>ht.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:40,height:40,viewBox:"0 0 59 59",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),ht.createElement(_reactnativesvg.G,{fill:e.color},ht.createElement(_reactnativesvg.Path,{d:"M28.746.016a30 30 0 0 0-1.383.09 22.75 22.75 0 0 0-12.12 4.886A22.78 22.78 0 0 0 6.73 20.805c-.062.71-.082 1.168-.082 2.058s.02 1.344.082 2.067a22.75 22.75 0 0 0 5.48 12.886 23 23 0 0 0 6.185 5.028 28 28 0 0 0 2.136 1.047 22.8 22.8 0 0 0 6.867 1.726c1.372.13 2.809.13 4.18 0a22.76 22.76 0 0 0 10.457-3.652 23 23 0 0 0 5.024-4.488A22.7 22.7 0 0 0 52.188 25.5c.199-1.73.199-3.617-.008-5.355a22.8 22.8 0 0 0-5.211-12.012 25 25 0 0 0-2.75-2.75 23 23 0 0 0-7.36-4.16C34.934.57 33.11.207 31.02.059a32 32 0 0 0-2.273-.043M27.191 52.469c-7.043.222-12.539 1.433-13.238 2.918a.64.64 0 0 0-.07.336c0 .164.008.199.078.34.691 1.41 5.707 2.574 12.34 2.867 5.933.265 12.164-.235 15.754-1.266 1.691-.488 2.675-1.02 2.968-1.613a.56.56 0 0 0 .07-.328c0-.266-.081-.438-.335-.688-.223-.222-.488-.398-.88-.594-2.148-1.062-6.726-1.804-12.218-1.976-.84-.024-3.605-.024-4.469.004m0 0",fillRule:"nonzero"}))),pi=Zc;var z=_zustand.create.call(void 0, )((e,o)=>({config:null,promiseResolvers:null,screen:null,setScreen:t=>e({screen:t}),method:null,setMethod:t=>{var r;if(!t&&((r=o().config)!=null&&r.paymentOptions.length)){e({method:null,screen:"method-selection",providerLink:null,moonpayTransactionId:null,coinbasePartnerUserId:null,error:null});return}if(t==="manual"){e({method:t,screen:"manual-funding"});return}e({method:t,screen:"provider-funding"})},providerLink:null,setProviderLink:t=>{e({providerLink:t})},moonpayTransactionId:null,setMoonpayTransactionId:t=>{e({moonpayTransactionId:t})},coinbasePartnerUserId:null,setCoinbasePartnerUserId:t=>{e({coinbasePartnerUserId:t})},provider:"coinbase",switchProvider:()=>{let t=o().provider==="coinbase"?"moonpay":"coinbase";return e({provider:t}),t},error:null,setError:t=>{e({error:t,screen:"error"})},reset:()=>e({config:null,method:null,screen:null,providerLink:null,moonpayTransactionId:null,coinbasePartnerUserId:null,error:null}),startFundingFlow:t=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){return fo(r=>{_chunkXPHUZG6Ujs.N.call(void 0, ),e({config:t,promiseResolvers:r,method:t.paymentOptions.length?null:"manual",screen:t.paymentOptions.length?"method-selection":"manual-funding"})})}),endFundingFlow:()=>{var t;(t=o().promiseResolvers)==null||t.resolve(),o().reset()},exitFundingFlow:()=>{var t;(t=o().promiseResolvers)==null||t.reject(new (0, _chunkXPHUZG6Ujs.L)("funding_flow_cancelled","Funding flow was cancelled")),o().reset()}})),Oe=()=>z(e=>e.config),fi=()=>[z(e=>e.screen),z(e=>e.setScreen)],gi=()=>[z(e=>e.method),z(e=>e.setMethod)],yi=()=>[z(e=>e.providerLink),z(e=>e.setProviderLink)],hi=()=>[z(e=>e.moonpayTransactionId),z(e=>e.setMoonpayTransactionId)],Si=()=>[z(e=>e.coinbasePartnerUserId),z(e=>e.setCoinbasePartnerUserId)],wi=()=>[z(e=>e.provider),z(e=>e.switchProvider)],Ci=()=>[z(e=>e.error),z(e=>e.setError)],St=()=>z(e=>e.startFundingFlow),vi=()=>z(e=>e.endFundingFlow),Pi=()=>z(e=>e.exitFundingFlow),De=z.setState;function wt(e){var o;return(o=e.tokenInfo)!=null&&o.symbol?e.tokenInfo.symbol:e.chainType==="solana"?"SOL":e.chain.nativeCurrency.symbol}function Mi(r){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({chain:e,walletAddress:o,erc20Address:t}){return yield _viem.createPublicClient.call(void 0, {chain:e,transport:_viem.http.call(void 0, )}).readContract({address:t,abi:Rc,functionName:"balanceOf",args:[o]})})}var Rc=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];var Fi=5e3;function xi({fundingUiConfig:e,onFunded:o}){let t=im({enabled:e.chainType==="ethereum",fundingUiConfig:e,onFunded:o}),r=sm({enabled:e.chainType==="solana",fundingUiConfig:e,onFunded:o});return e.chainType==="ethereum"?t:r}function im({enabled:e,fundingUiConfig:{address:o,chain:t,tokenInfo:r},onFunded:i}){let[n,s]=_react.useState.call(void 0, null),[a,u]=_react.useState.call(void 0, !1),m=_react.useMemo.call(void 0, ()=>{if(!(!e||!t))return _viem.createPublicClient.call(void 0, {chain:t,transport:_viem.http.call(void 0, )})},[t,e]),l=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){if(!(!e||!o||!m))try{return u(!0),r!=null&&r.address?yield Mi({walletAddress:o,erc20Address:r.address,chain:t}):yield m.getBalance({address:o})}catch(d){console.error(d)}finally{u(!1)}}),[m,o,r==null?void 0:r.address,t,e]);return _react.useEffect.call(void 0, ()=>{if(n==null&&l().then(d=>d!=null&&s(d)),i){let d=setInterval(()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){let c=yield l();c!=null&&(s(c),n!=null&&c>n&&i())}),Fi);return()=>clearInterval(d)}},[l,n,i]),{balance:n,isLoading:a&&n==null,formattedBalance:r?_jssdkcore.formatTokenAmount.call(void 0, {amount:n!=null?n:BigInt(0),decimals:r.decimals}):_jssdkcore.formatWeiAmount.call(void 0, {wei:n!=null?n:BigInt(0)})}}function sm({enabled:e,fundingUiConfig:{address:o,cluster:t,tokenInfo:r},onFunded:i}){let[n,s]=_react.useState.call(void 0, null),[a,u]=_react.useState.call(void 0, !1),m=_react.useMemo.call(void 0, ()=>{if(!(!e||!t))return new (0, _jssdkcore.SolanaClient)(t)},[e,t]),l=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){if(!(!e||!o||!m))try{if(u(!0),r!=null&&r.address){let d=yield m.getTokenAccountsByOwner(o,r.address);return d==null?void 0:d.amount}else return yield m.getBalance(o)}catch(d){console.error(d)}finally{u(!1)}}),[o,m,e,r==null?void 0:r.address]);return _react.useEffect.call(void 0, ()=>{if(n==null&&l().then(d=>d!=null&&s(d)),i){let d=setInterval(()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){let c=yield l();c!=null&&(s(c),n!=null&&c>n&&i())}),Fi);return()=>clearInterval(d)}},[l,n,i]),{balance:n,isLoading:a&&n==null,formattedBalance:r!=null&&r.address?_jssdkcore.formatTokenAmount.call(void 0, {amount:n!=null?n:BigInt(0),decimals:r.decimals}):_jssdkcore.formatLamportsAmount.call(void 0, {lamports:n!=null?n:BigInt(0)})}}function Li({onFunded:e}){let o=Oe(),{colors:t}=_chunkXPHUZG6Ujs.b.call(void 0, );if(!o)throw new Error("Invalid funding config");let r=o.chainType==="ethereum"?o.chain.name:_jssdkcore.getSolanaClusterDisplayName.call(void 0, o.cluster.name),i=wt(o),{formattedBalance:n,isLoading:s}=xi({fundingUiConfig:o,onFunded:e});return zt.default.createElement(_reactnative.View,{style:sr.container},zt.default.createElement(_reactnative.View,{style:{gap:28}},zt.default.createElement(A,{title:"Receive funds",subtitle:`Scan or copy your wallet address to receive funds on ${r}.`}),zt.default.createElement(_reactnative.View,{style:sr.qrContainer},zt.default.createElement(_reactnativeqrcodestyled2.default,{data:o.address,pieceSize:8,errorCorrectionLevel:"Q",pieceBorderRadius:2,isPiecesGlued:!0,color:t.text}),zt.default.createElement(_reactnative.View,{style:[sr.logoContainer,{backgroundColor:t.background}]},zt.default.createElement(pi,{height:40,width:40,color:t.privyBrand}))),zt.default.createElement(_reactnative.View,{style:{gap:12}},zt.default.createElement(_chunkXPHUZG6Ujs.S,{variant:"info"},zt.default.createElement(_chunkXPHUZG6Ujs.y,{size:16,color:t.iconInformation}),zt.default.createElement(_chunkXPHUZG6Ujs.T,null,"Make sure to send on ",r,".")),zt.default.createElement(ui,{address:o.address,currencySymbol:i,balance:n,isLoading:s}))),zt.default.createElement(W,null))}var sr=_reactnative.StyleSheet.create({container:{paddingHorizontal:16,justifyContent:"space-between",flex:1},qrContainer:{justifyContent:"center",alignItems:"center"},logoContainer:{position:"absolute",width:56,height:56,justifyContent:"center",alignItems:"center"}});function ho(i){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({config:e,method:o,client:t,provider:r}){var n,s,a,u,m,l;if(De({method:o}),o==="manual"){De({screen:"manual-funding"});return}De({screen:"provider-funding"});try{let d=e.paymentOptions.find(c=>c.method===o&&c.provider===r)||e.paymentOptions.find(c=>c.method===o);if((d==null?void 0:d.provider)==="moonpay"){let c;e.chainType==="ethereum"?c=_jssdkcore.chainToMoonpayCurrency.call(void 0, e.chain.id,((n=e.tokenInfo)==null?void 0:n.symbol)==="USDC"?"USDC":"native-currency"):c=((s=e.tokenInfo)==null?void 0:s.symbol)==="USDC"?"USDC_SOL":"SOL";let p=yield t.funding.moonpay.sign({address:e.address,config:{currencyCode:c,paymentMethod:_jssdkcore.fundingMethodToMoonpayPaymentMethod.call(void 0, o),quoteCurrencyAmount:parseFloat(e.amount),uiConfig:_chunkC5WYSLQFjs.b.call(void 0, {accentColor:gm},(a=e.moonpay)==null?void 0:a.uiConfig)},useSandbox:!!((u=e.moonpay)!=null&&u.useSandbox)});De({providerLink:p.signedUrl,moonpayTransactionId:p.externalTransactionId});return}if((d==null?void 0:d.provider)==="coinbase"){let c,p;e.chainType==="ethereum"?(c=_jssdkcore.toCoinbaseAssetId.call(void 0, e.chain.id,((m=e.tokenInfo)==null?void 0:m.symbol)==="USDC"?"USDC":"native-currency"),p=_jssdkcore.toCoinbaseBlockchainFromChainId.call(void 0, e.chain.id)):(c=((l=e.tokenInfo)==null?void 0:l.symbol)==="USDC"?"USDC":"SOL",p="solana");let f=yield t.funding.coinbase.initOnRampSession({addresses:[{address:e.address,blockchains:[p]}],assets:[c]}),S=_jssdkcore.getCoinbaseOnRampUrl.call(void 0, {appId:t.app.appId,input:f,amount:e.amount,blockchain:p,asset:c,experience:o==="exchange"?"send":"buy"});De({providerLink:S.url.toString(),coinbasePartnerUserId:f.partner_user_id});return}De({error:new (0, _chunkXPHUZG6Ujs.L)("failed_to_fetch_funding_provider_uri","A provider for this funding flow couldn't be found")})}catch(d){console.error(d),De({error:new (0, _chunkXPHUZG6Ujs.L)("failed_to_fetch_funding_provider_uri","A provider for this funding flow couldn't be found")})}})}var gm="#110F2A";var Sm=3e3,wm=["success","failure"];function Ui({onSuccess:e,onError:o}){var u;let t=_chunk7VW6NBHOjs.m.call(void 0, ),r=Oe(),[i]=Si(),[n,s]=_react.useState.call(void 0, "pending"),a=_react.useRef.call(void 0, 0);_react.useEffect.call(void 0, ()=>{s("pending")},[i]),_react.useEffect.call(void 0, ()=>{if(!i||wm.includes(n))return;let m=setInterval(()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{let l=yield t.funding.coinbase.getStatus(i);if(!(l!=null&&l.status))return;s(l.status),a.current=0}catch(l){console.error(l),a.current+=1,a.current>=3&&s("failure")}}),Sm);return()=>clearInterval(m)},[n,i,t,(u=r==null?void 0:r.moonpay)==null?void 0:u.useSandbox]),_react.useEffect.call(void 0, ()=>{n==="success"?e({status:n}):n==="failure"&&o({status:n})},[n,e,o])}var Mm=3e3,Im=["completed","failed","serviceFailure"];function ki({onSuccess:e,onError:o}){var u;let t=_chunk7VW6NBHOjs.m.call(void 0, ),r=Oe(),[i]=hi(),[n,s]=_react.useState.call(void 0, "pending"),a=_react.useRef.call(void 0, 0);_react.useEffect.call(void 0, ()=>{s("pending")},[i]),_react.useEffect.call(void 0, ()=>{if(!i||Im.includes(n))return;let m=setInterval(()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){var l,d;try{let c=yield t.funding.moonpay.getTransactionStatus({transactionId:i,useSandbox:!!((l=r==null?void 0:r.moonpay)!=null&&l.useSandbox)});if(!(c!=null&&c.status))return;if(s(c.status),a.current=0,c.status==="completed"){let p=(d=c.getValidQuote)==null?void 0:d.quoteCurrencyAmount;e({status:"completed",amount:p?String(p):void 0})}else c.status==="failed"||c.status}catch(c){if(c instanceof _jssdkcore.MoonpayApiError&&c.response.status===404)return;console.error(c),a.current>=3&&(s("serviceFailure"),o({status:"serviceFailure"}))}}),Mm);return()=>clearInterval(m)},[n,i,t,(u=r==null?void 0:r.moonpay)==null?void 0:u.useSandbox,e,o])}function Bi({config:e,goBackRef:o}){let t=_chunk7VW6NBHOjs.m.call(void 0, ),[r,i]=fi(),n=Pi(),s=vi(),[a,u]=gi(),[m,l]=wi(),[d]=yi(),[c,p]=Ci(),[f,S]=_react.useState.call(void 0, ),[h,v]=_react.useState.call(void 0, !1),[I,_]=_react.useState.call(void 0, ),F=_react.useMemo.call(void 0, ()=>Array.from(new Set(e.paymentOptions.map(({method:L})=>L))),[e.paymentOptions]),C=_react.useMemo.call(void 0, ()=>e.paymentOptions.filter(L=>L.method===f),[e.paymentOptions,f]);function x(L,je){return _chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){L!==f&&S(L),yield ho({method:L,provider:(()=>{var Mo,Io;return je||(L==="card"&&(Io=(Mo=e.card)==null?void 0:Mo.preferredProvider)!=null?Io:m)})(),client:t,config:e})})}function k(){if(!f)return;let L=l();x(f,L)}let T=_react.useCallback.call(void 0, ()=>{i("success");let L=setTimeout(()=>s(),5e3);return()=>clearTimeout(L)},[i,s]),j=_react.useCallback.call(void 0, ({amount:L})=>{_(L),i("success");let je=setTimeout(()=>s(),5e3);return()=>clearTimeout(je)},[i,s]),fe=_react.useCallback.call(void 0, ()=>{p(new (0, _chunkXPHUZG6Ujs.L)("provider_transaction_failed","Something went wrong adding funds from Moonpay. Please try again or use another method to fund your wallet."))},[p]),Ge=_react.useCallback.call(void 0, ()=>{p(new (0, _chunkXPHUZG6Ujs.L)("provider_transaction_failed","Something went wrong adding funds from Coinbase. Please try again or use another method to fund your wallet."))},[p]);switch(ki({onSuccess:j,onError:fe}),Ui({onSuccess:j,onError:Ge}),_react.useEffect.call(void 0, ()=>(o.current=()=>{if(r==="method-selection"){n();return}if(r==="manual-funding"&&!e.paymentOptions.length){n();return}if(e.defaultPaymentMethod!==void 0){n();return}a!=="manual"&&a!=null&&(v(!0),S(a)),u(null)},()=>{o.current=null}),[r,o,a,u,n,e]),r){case"method-selection":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{goBack:()=>{var L;return(L=o==null?void 0:o.current)==null?void 0:L.call(o)}}),zt.default.createElement(ni,{appName:e.appName,methods:F,onMethodSelected:x,onSwitchProvider:h&&C.length>1?k:void 0}));case"manual-funding":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{goBack:()=>{var L;return(L=o==null?void 0:o.current)==null?void 0:L.call(o)},close:()=>s()}),zt.default.createElement(Li,{onFunded:T}));case"provider-funding":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(ei,{close:()=>{var L;return(L=o==null?void 0:o.current)==null?void 0:L.call(o)},style:{paddingRight:23}}),zt.default.createElement(si,{uri:d,goBackRef:o}));case"success":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{close:()=>s()}),zt.default.createElement(Y,{subtitle:`You\u2019ve successfully added ${I?`${I} `:""}${wt(e)} to your ${e.appName?`${e.appName} `:""}wallet. It may take a minute before the funds are available to use.`}));case"error":default:return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{goBack:()=>{var L;return(L=o==null?void 0:o.current)==null?void 0:L.call(o)}}),zt.default.createElement(O,{title:"Something went wrong",subtitle:(c==null?void 0:c.message)||"Please try again."}))}}var Fm=1e3*60*5,So=_zustand.create.call(void 0, )((e,o)=>({walletUIConfig:null,walletPromiseResolvers:null,openWalletFlow:t=>fo(r=>{if(_chunkXPHUZG6Ujs.N.call(void 0, ),o().walletPromiseResolvers!==null)throw new (0, _chunkXPHUZG6Ujs.L)("existing_ui_flow_in_progress","A wallet flow is already in progress");let i=rt(r,()=>(e({walletUIConfig:null,walletPromiseResolvers:null}),new (0, _chunkXPHUZG6Ujs.L)("ui_flow_timeout","The wallet flow timed out")),Fm);e({walletPromiseResolvers:i,walletUIConfig:t})}),navigateWhileInFlow:t=>{if(o().walletPromiseResolvers===null)throw new Error("Internal PrivyElements error");e({walletUIConfig:t})},closeWalletFlow:t=>{var r;return(r=o().walletPromiseResolvers)==null||r.reject(t!=null?t:new (0, _chunkXPHUZG6Ujs.L)("ui_flow_closed","The wallet flow was closed")),e({walletUIConfig:null,walletPromiseResolvers:null})}})),Vi=()=>So(e=>e.walletUIConfig),Wi=()=>So.getState().walletUIConfig,H=()=>_react.useCallback.call(void 0, o=>{let{walletPromiseResolvers:t,closeWalletFlow:r}=So.getState();t==null||t.resolve(o),r()},[]),D=()=>So(e=>e.closeWalletFlow),ye=()=>So(e=>e.openWalletFlow),oe=()=>So(e=>e.navigateWhileInFlow);function Oi({isMfaUIEnabled:e=!1}){let o=ye(),t=oe();_chunk7VW6NBHOjs.R.call(void 0, {onMfaRequired:_react.useCallback.call(void 0, r=>{var a,u;if(!e)return;let i=(u=(a=_chunk7VW6NBHOjs.a.call(void 0, ))==null?void 0:a.mfa)==null?void 0:u.relyingParty,n=Wi(),s=n?t:o;if(r.length===1){let m=r[0];s({type:`mfa:verify:${m}`,payload:{relyingParty:i,ongoingWalletUIFlow:n}});return}s({type:"mfa:verify:landing",payload:{enrolledMfaMethods:r,relyingParty:i,ongoingWalletUIFlow:n}})},[e,t,o])})}var _m=1200,Ni=({oauthProvider:e})=>{let{setOAuthState:o}=_react.useContext.call(void 0, _chunk7VW6NBHOjs.la),t=Be(),r=it(),{state:i}=_chunkWCCFBSK7js.b.call(void 0, ),{step:n,error:s=null,isNewUser:a=!1}=_react.useMemo.call(void 0, ()=>{var l;switch(i.status){case"initial":return{step:"initial"};case"loading":return{step:"loading"};case"done":return{step:"done",isNewUser:i.isNewUser};case"error":return{step:"error",error:(l=i.error)!=null?l:new Error("Unknown error")}}},[i]);_react.useEffect.call(void 0, ()=>{s instanceof _jssdkcore.PrivyClientError&&s.code==="login_with_oauth_was_cancelled_by_user"&&(o({status:"initial"}),r())},[s,r,o]),_react.useEffect.call(void 0, ()=>{if(n!=="done")return;let l=setTimeout(()=>{t()},_m);return()=>clearTimeout(l)},[n,t]);let u=_e[e],m=a?"You've successfully created an account.":"Your account is secured.";switch(n){case"initial":case"loading":return zt.default.createElement(We,null);case"done":return zt.default.createElement(Y,{subtitle:m});case"error":return zt.default.createElement(O,{title:"Authentication failed",subtitle:Bm(s).replace("{provider}",u)})}},Bm=_jssdkcore.createErrorFormatter.call(void 0, {linked_to_another_user:"This account has already been linked to another user.",invalid_credentials:"Something went wrong. Try again.",too_many_requests:"Too many requests. Please wait before trying again.",oauth_account_suspended:"Your {provider} account is suspended. Please try another login method.",cannot_link_more_of_type:"You cannot authorize more than one account for this user.",default:"Something went wrong. Please try again."});var Hi=()=>{var o,t;let{logo:e}=(t=(o=nt())==null?void 0:o.appearance)!=null?t:{};return e?zt.default.createElement(_reactnative.Image,{source:{uri:e},style:{width:Om,height:Dm,resizeMode:"contain"}}):null},Om=220,Dm=110;var Nm={email:_chunkXPHUZG6Ujs.A,sms:_chunkXPHUZG6Ujs.B},Gi=({method:e,onLoginMethodChange:o,preferred:t})=>{let r=Nm[e],{colors:i}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_chunkXPHUZG6Ujs.c,{LeftIcon:t?null:zt.default.createElement(r,{size:24,color:i.icon}),variant:t?"primary":"secondary",onPress:()=>o(e),title:`Continue with ${_e[e]}`})};var zm=e=>Pt.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 18 22"},e),Pt.createElement(_reactnativesvg.Path,{fill:e.color,d:"M9.795 2.375c.72-.928 2.172-1.796 3.198-1.91.325-.036.365-.034.438.036l.066.063-.015.428c-.026.668-.114 1.137-.31 1.642-.197.503-.552 1.083-.83 1.344a7 7 0 0 0-.347.37c-.439.5-1.056.854-1.898 1.088-.315.09-.337.092-.705.09-.444-.002-.507-.015-.54-.094a3 3 0 0 1-.03-.465l-.005-.406.106-.382c.212-.764.456-1.272.872-1.804"}),Pt.createElement(_reactnativesvg.Path,{fill:e.color,d:"M9.951 6.208c.965-.363 2.308-.72 2.807-.745a6.8 6.8 0 0 1 1.465.116c.415.083.713.182 1.144.382.69.322 1.277.752 1.743 1.277.348.392.368.443.23.573a1.4 1.4 0 0 1-.235.16c-.15.08-.768.575-.768.616 0 .01-.101.124-.224.247-.406.416-.585.752-.845 1.591-.06.193-.123.447-.14.568-.071.464-.036 1.132.087 1.741.074.37.366.996.656 1.415a4.5 4.5 0 0 0 1.62 1.402c.325.158.509.295.509.382a.4.4 0 0 1-.048.13 1 1 0 0 0-.088.24c-.053.218-.363.94-.557 1.294-.72 1.308-1.434 2.278-2.197 2.986-.749.69-1.45.999-2.175.955-.5-.029-.975-.145-1.65-.406-.56-.215-.777-.283-.991-.312-.106-.014-.303-.043-.434-.063-.383-.06-.635-.065-.907-.01-.907.18-.94.19-1.439.39-.79.32-1.207.42-1.723.42-.404.003-.595-.043-1.033-.248a3.4 3.4 0 0 1-1.003-.711c-.326-.317-.55-.583-.99-1.166-1.077-1.424-1.243-1.704-1.77-2.974C.786 15.955.7 15.75.63 15.54c-.055-.167-.1-.338-.187-.666-.211-.8-.234-.887-.234-1.003 0-.056-.023-.196-.048-.315-.22-.964-.214-2.555.01-3.385a8 8 0 0 1 .633-1.62c.625-1.219 1.413-1.997 2.57-2.539.383-.181.67-.266 1.18-.353.236-.039.498-.09.582-.111.206-.056.682-.048.97.012.685.15 1.149.28 1.6.452.85.329 1.343.467 1.545.435l.05-.008c.08-.017.16-.046.65-.231"})),qi=zm;var qm=e=>mr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),mr.createElement(_reactnativesvg.Path,{fill:"#5865F2",d:"M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0 13 13 0 0 0-.617-1.25.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.08.08 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13 13 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10 10 0 0 0 .372-.292.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.3 12.3 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028 19.8 19.8 0 0 0 6.002-3.03.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418"})),Ki=qm;var $m=e=>dr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",x:24,y:24,viewBox:"0 0 98 96"},e),dr.createElement(_reactnativesvg.Path,{fill:e.color,d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a47 47 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0"})),Yi=$m;var Jm=e=>wo.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),wo.createElement(_reactnativesvg.Path,{fill:"#4285F4",stroke:"#6366F1",strokeWidth:1.128,d:"M17.382 13.486h-4.818v-2.74h8.372q.1.717.1 1.481c0 2.82-.977 5.168-2.642 6.786H15.95v-1.654a5.15 5.15 0 0 0 1.986-3.206l.123-.667z"}),wo.createElement(_reactnativesvg.Path,{fill:"#34A853",d:"M12 22c2.7 0 4.964-.896 6.618-2.423l-3.232-2.509c-.895.6-2.04.955-3.386.955-2.604 0-4.809-1.76-5.595-4.123H3.064v2.59A10 10 0 0 0 12 22"}),wo.createElement(_reactnativesvg.Path,{fill:"#FBBC05",d:"M6.405 13.9c-.2-.6-.314-1.24-.314-1.9s.114-1.3.314-1.9V7.51H3.064A10 10 0 0 0 2 12c0 1.614.386 3.141 1.064 4.491z"}),wo.createElement(_reactnativesvg.Path,{fill:"#EA4335",d:"M12 5.977c1.468 0 2.786.505 3.823 1.496l2.868-2.868C16.959 2.99 14.696 2 12.001 2 8.09 2 4.708 4.24 3.063 7.51l3.34 2.59C7.192 7.736 9.397 5.977 12 5.977"})),$i=Jm;var Rm=e=>ur.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",role:"img",viewBox:"0 0 24 24"},e),ur.createElement(_reactnativesvg.Path,{fill:"#E4405F",d:"M7.03.084c-1.277.06-2.149.264-2.91.563a5.9 5.9 0 0 0-2.124 1.388 5.9 5.9 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076s-.069 1.688-.063 4.947.021 3.667.083 4.947c.061 1.277.264 2.149.563 2.911.308.789.72 1.457 1.388 2.123a5.9 5.9 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552 1.278.056 1.689.069 4.947.063s3.668-.021 4.947-.082c1.28-.06 2.147-.265 2.91-.563a5.9 5.9 0 0 0 2.123-1.388 5.9 5.9 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912.056-1.28.07-1.69.063-4.948-.006-3.258-.02-3.667-.081-4.947-.06-1.28-.264-2.148-.564-2.911a5.9 5.9 0 0 0-1.387-2.123 5.86 5.86 0 0 0-2.128-1.38C19.074.322 18.202.12 16.924.066 15.647.009 15.236-.006 11.977 0S8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.7 3.7 0 0 1-1.382-.895 3.7 3.7 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228-.06-1.264-.072-1.644-.08-4.848-.006-3.204.006-3.583.061-4.848.05-1.169.246-1.805.408-2.228.216-.561.477-.96.895-1.382a3.7 3.7 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417 1.265-.06 1.644-.072 4.848-.08 3.203-.006 3.583.006 4.85.062 1.168.05 1.804.244 2.227.408.56.216.96.475 1.382.895s.681.817.9 1.378c.165.422.362 1.056.417 2.227.06 1.265.074 1.645.08 4.848.005 3.203-.006 3.583-.061 4.848-.051 1.17-.245 1.805-.408 2.23-.216.56-.477.96-.896 1.38a3.7 3.7 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418-1.266.06-1.645.072-4.85.079s-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442 1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024 6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16 4 4 0 0 1 8 12.008"})),Zi=Rm;var od=e=>Qe.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 320"},e),Qe.createElement(_reactnativesvg.Rect,{width:320,height:320,fill:"#06c755",rx:72.14}),Qe.createElement(_reactnativesvg.Path,{fill:"#fff",d:"M266.66 144.92c0-47.74-47.86-86.58-106.69-86.58S53.28 97.18 53.28 144.92c0 42.8 38 78.65 89.22 85.42 3.48.75 8.21 2.29 9.4 5.26 1.08 2.7.71 6.93.35 9.65 0 0-1.25 7.53-1.52 9.13-.47 2.7-2.15 10.55 9.24 5.76s61.44-36.18 83.82-61.95c15.46-16.95 22.87-34.19 22.87-53.27"}),Qe.createElement(_reactnativesvg.Path,{fill:"#06c755",d:"M231.16 172.49h-30a2 2 0 0 1-2-2v-46.55a2 2 0 0 1 2-2h30a2 2 0 0 1 2 2v7.57a2 2 0 0 1-2 2h-20.37v7.85h20.37a2 2 0 0 1 2 2V151a2 2 0 0 1-2 2h-20.37v7.86h20.37a2 2 0 0 1 2 2v7.56a2 2 0 0 1-2 2.07M120.29 172.49a2 2 0 0 0 2-2v-7.56a2 2 0 0 0-2-2H99.92v-37a2 2 0 0 0-2-2h-7.6a2 2 0 0 0-2 2v46.53a2 2 0 0 0 2 2h30Z"}),Qe.createElement(_reactnativesvg.Rect,{width:11.64,height:50.64,x:128.73,y:121.85,fill:"#06c755",rx:2.04}),Qe.createElement(_reactnativesvg.Path,{fill:"#06c755",d:"M189.84 121.85h-7.56a2 2 0 0 0-2 2v27.66l-21.3-28.77a1.2 1.2 0 0 0-.17-.21l-.12-.12-.11-.09h-.06l-.11-.08h-.06l-.11-.06h-8.47a2 2 0 0 0-2 2v46.56a2 2 0 0 0 2 2h7.57a2 2 0 0 0 2-2v-27.93l21.33 28.8a2 2 0 0 0 .52.52l.12.08h.06l.1.05h.31a2.4 2.4 0 0 0 .54.07h7.52a2 2 0 0 0 2-2v-46.44a2 2 0 0 0-2-2.04"})),Qi=od;var nd=e=>fr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),fr.createElement(_reactnativesvg.Path,{fill:"#0A66C2",d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.06 2.06 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065m1.782 13.019H3.555V9h3.564zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0z"})),Xi=nd;var ad=e=>gr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),gr.createElement(_reactnativesvg.Path,{fill:"#1DB954",d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0m5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02m1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6s.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2m.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3"})),Ri=ad;var md=e=>yr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"},e),yr.createElement(_reactnativesvg.Path,{fill:"#26A5E4",d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm4.962 7.224c.1-.002.321.023.465.14a.5.5 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024q-.159.037-5.061 3.345-.72.495-1.302.48c-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789q.04-.324.893-.663 5.247-2.286 6.998-3.014c3.332-1.386 4.025-1.627 4.476-1.635"})),es=md;var pd=e=>hr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),hr.createElement(_reactnativesvg.Path,{fill:e.color,d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07"})),os=pd;var yd=e=>Sr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"currentColor",viewBox:"0 0 24 24"},e),Sr.createElement(_reactnativesvg.Path,{d:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 2 3.43 4.571v14.858h5.142V22l2.572-2.571h4.286l5.141-5.143V2zm13.714 11.143-3.428 3.428h-3.429l-2.571 2.572v-2.572H6.857V3.429h12.857Z"})),ts=yd;var wd=e=>wr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),wr.createElement(_reactnativesvg.Path,{fill:e.color,d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"})),rs=wd;var Cd={google:$i,apple:qi,discord:Ki,github:Yi,twitter:rs,spotify:Ri,instagram:Zi,tiktok:os,linkedin:Xi,line:Qi,twitch:ts,telegram:es},is=({method:e,onLoginMethodChange:o})=>{let{login:t}=_chunkWCCFBSK7js.b.call(void 0, ),{colors:r}=_chunkXPHUZG6Ujs.b.call(void 0, ),i=Cd[e],n=()=>{t({provider:e}),o(e)};return zt.default.createElement(_chunkXPHUZG6Ujs.c,{LeftIcon:zt.default.createElement(i,{width:24,height:24,color:r.icon}),variant:"secondary",onPress:n,title:_e[e]})};var as=({method:e,onLoginMethodChange:o,preferred:t})=>{switch(e){case"apple":case"google":case"discord":case"github":case"twitter":case"spotify":case"instagram":case"tiktok":case"line":case"linkedin":case"twitch":case"telegram":return zt.default.createElement(is,{method:e,onLoginMethodChange:o});case"email":case"sms":return zt.default.createElement(Gi,{method:e,onLoginMethodChange:o,preferred:t});default:throw new (0, _chunkXPHUZG6Ujs.L)("unsupported_login_method",`Unsupported login method: ${e}`)}};var cs=({loginMethods:e,onLoginMethodChange:o})=>zt.default.createElement(_reactnative.ScrollView,{style:It.scrollView,contentContainerStyle:It.container},zt.default.createElement(_reactnative.View,{style:It.formContainer},zt.default.createElement(Hi,null),zt.default.createElement(A,{title:"Login or sign up"}),zt.default.createElement(_reactnative.View,{style:It.listContainer},e.map((t,r)=>zt.default.createElement(as,{key:`method-button-${t}`,method:t,onLoginMethodChange:o,preferred:r===0})))),zt.default.createElement(uo,null),zt.default.createElement(W,null)),It=_reactnative.StyleSheet.create({scrollView:{flex:1},container:{paddingHorizontal:16},formContainer:{alignItems:"center",gap:32},listContainer:{gap:16,alignSelf:"stretch"}});function he({Icons:e,title:o,subtitle:t,Features:r,Footer:i}){return zt.default.createElement(_reactnative.View,{style:Vo.screen},zt.default.createElement(_reactnative.View,{style:Vo.content},zt.default.createElement(_reactnative.View,{style:Vo.header},zt.default.createElement(_reactnative.View,{style:Vo.headerIcons},e),zt.default.createElement(A,{tight:!0,title:o,subtitle:t})),zt.default.createElement(_reactnative.View,{style:Vo.featuresList},r)),zt.default.createElement(_reactnative.View,null,i))}var Vo=_reactnative.StyleSheet.create({screen:{flex:1,paddingTop:24,paddingHorizontal:16,gap:24,justifyContent:"space-between"},content:{gap:48,paddingHorizontal:8},header:{alignItems:"center",gap:8},headerIcons:{flexDirection:"row",gap:12},featuresList:{gap:12}});var ms=({termsAndPolicyConfig:e})=>{let{colors:o}=_chunkXPHUZG6Ujs.b.call(void 0, ),t=_chunk7VW6NBHOjs.m.call(void 0, ),{logout:r}=_chunk7VW6NBHOjs.aa.call(void 0, ),{termsAndConditionsUrl:i,privacyPolicyUrl:n}=e,s=Be(),[a,u]=_react.useState.call(void 0, !1),m=()=>{r(),s({termsReviewed:!0})},l=()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){u(!0),yield t.user.acceptTerms().finally(()=>u(!1)),s({termsReviewed:!0})});return zt.default.createElement(he,{Icons:zt.default.createElement(_chunkXPHUZG6Ujs.u,{size:48,color:o.icon}),title:"One last step",subtitle:"By signing up, you agree to our terms and privacy policy.",Features:zt.default.createElement(zt.default.Fragment,null,i&&zt.default.createElement(_chunkXPHUZG6Ujs.c,{variant:"secondary",title:"View Terms",onPress:()=>Cr.openBrowserAsync(i),RightIcon:zt.default.createElement(_chunkXPHUZG6Ujs.r,{color:o.icon,size:24})}),n&&zt.default.createElement(_chunkXPHUZG6Ujs.c,{variant:"secondary",title:"View Privacy Policy",onPress:()=>Cr.openBrowserAsync(n),RightIcon:zt.default.createElement(_chunkXPHUZG6Ujs.r,{color:o.icon,size:24})})),Footer:zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.c,{variant:"primary",title:"Accept",onPress:l,loading:a}),zt.default.createElement(_chunkXPHUZG6Ujs.c,{variant:"tertiary",destroy:!0,title:"No thanks",onPress:m}))})};var _reactnativesafeareacontext = require('react-native-safe-area-context');var xd=()=>{let e=_reactnativesafeareacontext.useSafeAreaInsets.call(void 0, );return{paddingTop:e.top,paddingBottom:e.bottom,paddingLeft:e.left,paddingRight:e.right}},us=({children:e,visible:o})=>{let t=xd(),{colors:r}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.Modal,{animationType:"slide",transparent:!0,visible:o},zt.default.createElement(_reactnative.View,{style:[_reactnative.StyleSheet.absoluteFill,{backgroundColor:r.background},t]},e))};var ps=()=>{let{client:e}=_react.useContext.call(void 0, _chunk7VW6NBHOjs.la),o=e.app.getConfig(),t=o==null?void 0:o.logo_url;_react.useEffect.call(void 0, ()=>{t&&_reactnative.Image.prefetch(t)},[t])};var fs=1e3,ys=({config:e})=>{let{appName:o,onConsent:t}=e,{colors:r}=_chunkXPHUZG6Ujs.b.call(void 0, ),i=H(),n=D(),[s,a]=_react.useState.call(void 0, !1),[u,m]=_react.useState.call(void 0, !1),[l,d]=_react.useState.call(void 0, !1),c=()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){try{a(!0),m(!1),d(!1);let f=yield t();m(!0),yield _chunk7VW6NBHOjs.i.call(void 0, fs),i(f)}catch(f){d(!0),yield _chunk7VW6NBHOjs.i.call(void 0, fs),n(f instanceof _chunkXPHUZG6Ujs.L?f:new (0, _chunkXPHUZG6Ujs.M)(f))}finally{a(!1)}});if(u)return zt.default.createElement(Y,{subtitle:"You\u2019ve successfully enabled offline access."});if(l)return zt.default.createElement(O,null);let p=`By confirming, ${o} will be able to use your wallet for you even when you're not around. You can revoke this later.`;return zt.default.createElement(_reactnative.View,{style:gs.container},zt.default.createElement(_reactnative.View,{style:gs.header},zt.default.createElement(_chunkXPHUZG6Ujs.o,{size:48,color:r.icon}),zt.default.createElement(A,{title:"Enable offline access",subtitle:p})),zt.default.createElement(_reactnative.View,null,zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Confirm",onPress:c,loading:s}),zt.default.createElement(W,null)))},gs=_reactnative.StyleSheet.create({container:{paddingTop:24,paddingHorizontal:16,gap:24,flex:1,justifyContent:"space-between"},header:{alignItems:"center",gap:8}});var hs=1e3,ws=({config:e})=>{let{appName:o,onRevoke:t}=e,{colors:r}=_chunkXPHUZG6Ujs.b.call(void 0, ),i=H(),n=D(),[s,a]=_react.useState.call(void 0, !1),[u,m]=_react.useState.call(void 0, !1),[l,d]=_react.useState.call(void 0, !1),c=()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){try{a(!0),m(!1),d(!1);let f=yield t();m(!0),yield _chunk7VW6NBHOjs.i.call(void 0, hs),i(f)}catch(f){d(!0),yield _chunk7VW6NBHOjs.i.call(void 0, hs),n(f instanceof _chunkXPHUZG6Ujs.L?f:new (0, _chunkXPHUZG6Ujs.M)(f))}finally{a(!1)}});if(u)return zt.default.createElement(Y,{subtitle:"You\u2019ve successfully revoked offline access."});if(l)return zt.default.createElement(O,null);let p=`By confirming, ${o} will no longer be able to use this wallet on your behalf when you are not online.`;return zt.default.createElement(_reactnative.View,{style:Ss.container},zt.default.createElement(_reactnative.View,{style:Ss.header},zt.default.createElement(_chunkXPHUZG6Ujs.e,{size:48,color:r.icon}),zt.default.createElement(A,{title:"Revoke offline access to wallet",subtitle:p})),zt.default.createElement(_reactnative.View,null,zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Confirm",onPress:c,loading:s}),zt.default.createElement(W,null)))},Ss=_reactnative.StyleSheet.create({container:{paddingTop:24,paddingHorizontal:16,gap:24,flex:1,justifyContent:"space-between"},header:{alignItems:"center",gap:8}});var _encoding = require('@privy-io/encoding');function bt(e){return`0x${_encoding.encoding.hex.fromBytes(e)}`}var vs=({iconUrl:e})=>zt.default.createElement(_reactnative.Image,{source:{uri:e},style:{width:Od,height:Cs,borderRadius:Cs/2,resizeMode:"contain",alignSelf:"center"}}),Od=80,Cs=80;var Ps=1e3,Ms=({config:e})=>{let{message:o,onSignMessage:t,title:r="Sign message",description:i="Sign to continue",buttonText:n="Confirm signature",logo:s}=e,{colors:a}=_chunkXPHUZG6Ujs.b.call(void 0, ),u=H(),m=D(),[l,d]=_react.useState.call(void 0, !1),[c,p]=_react.useState.call(void 0, !1),[f,S]=_react.useState.call(void 0, !1),h=()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){try{d(!0),p(!1),S(!1);let I=yield t(o);p(!0),yield _chunk7VW6NBHOjs.i.call(void 0, Ps),u(I)}catch(I){S(!0),yield _chunk7VW6NBHOjs.i.call(void 0, Ps),m(I instanceof _chunkXPHUZG6Ujs.L?I:new (0, _chunkXPHUZG6Ujs.M)(I))}finally{d(!1)}}),v=_react.useMemo.call(void 0, ()=>o instanceof Uint8Array?bt(o):o,[o]);return c?zt.default.createElement(Y,{subtitle:"You\u2019ve successfully completed the signature."}):f?zt.default.createElement(O,null):zt.default.createElement(_reactnative.ScrollView,{style:vo.container,contentContainerStyle:vo.contentContainer},zt.default.createElement(_reactnative.View,{style:vo.content},zt.default.createElement(_reactnative.View,{style:vo.header},s&&zt.default.createElement(vs,{iconUrl:s}),zt.default.createElement(A,{title:r,subtitle:i,tight:!0})),zt.default.createElement(_reactnative.View,{style:[vo.messageBox,{backgroundColor:a.backgroundSecondary}]},zt.default.createElement(_reactnative.Text,{style:[vo.message,{color:a.text}]},v))),zt.default.createElement(_reactnative.View,null,zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:n,onPress:h,loading:l}),zt.default.createElement(W,null)))},vo=_reactnative.StyleSheet.create({container:{flex:1},contentContainer:{paddingHorizontal:16,gap:24,flexGrow:1,justifyContent:"space-between"},header:{gap:24},content:{gap:48},messageBox:{paddingVertical:16,paddingHorizontal:16,borderRadius:14},message:{fontFamily:"Inter_400Regular",fontSize:20,lineHeight:32,width:"100%",textAlign:"center"}});function Re({Icon:e,children:o}){let{colors:t}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:Is.row},zt.default.createElement(e,{size:24,color:t.icon}),zt.default.createElement(_reactnative.Text,{style:[Is.label,{color:t.text}]},o))}var Is=_reactnative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",gap:12},label:{flex:1,fontFamily:"Inter_500Medium",fontSize:14,lineHeight:22}});function R(e){return _jssdkcore.errorIndicatesMaxMfaRetries.call(void 0, e)?{isBlockingError:!0,error:new Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.",{cause:e})}:_jssdkcore.errorIndicatesMfaVerificationFailed.call(void 0, e)?{isBlockingError:!1,error:new Error("The code you entered is not valid.",{cause:e})}:_jssdkcore.errorIndicatesMfaTimeout.call(void 0, e)?{isBlockingError:!0,error:new Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.",{cause:e})}:{isBlockingError:!1,error:new Error("Something went wrong.",{cause:e})}}function bs({onBack:e}){let{initMfaEnrollment:o,submitMfaEnrollment:t}=_chunk7VW6NBHOjs.W.call(void 0, ),{prompt:r}=_chunk7VW6NBHOjs.V.call(void 0, ),i=H(),n=D(),{user:s}=_chunk7VW6NBHOjs.aa.call(void 0, ),{colors:a}=_chunkXPHUZG6Ujs.b.call(void 0, ),[u,m]=_react.useState.call(void 0, !1),[l,d]=_react.useState.call(void 0, !1),[c,p]=_react.useState.call(void 0, ),[f,S]=_react.useState.call(void 0, !1),h=_react.useMemo.call(void 0, ()=>{var F;return((F=s==null?void 0:s.linked_accounts)!=null?F:[]).filter(C=>C.type==="passkey").map(C=>C.credential_id)},[s]),v=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{d(!0),S(!1),p(void 0),m(!1),yield r(),yield o({method:"passkey"}),yield t({method:"passkey",credentialIds:h}),m(!0),yield _chunk7VW6NBHOjs.i.call(void 0, 1500),i({success:!0})}catch(I){let{isBlockingError:_,error:F}=R(I);p(F),S(_),_&&(yield _chunk7VW6NBHOjs.i.call(void 0, 1500),n(F instanceof _chunkXPHUZG6Ujs.L?F:new (0, _chunkXPHUZG6Ujs.M)(F)))}finally{d(!1)}}),[h,o,n,i,r,t]);return u?zt.default.createElement(Y,{subtitle:"From now on, you'll use the passkey whenever you use your Privy wallet."}):f?zt.default.createElement(O,{subtitle:c==null?void 0:c.message}):zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{goBack:()=>e()}),zt.default.createElement(he,{Icons:zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.E,{size:48,color:a.icon}),zt.default.createElement(_chunkXPHUZG6Ujs.x,{size:48,color:a.icon})),title:"Set up passkey verification",subtitle:"You can change this later.",Features:zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(Re,{Icon:_chunkXPHUZG6Ujs.H},"Verify with Touch ID, Face ID, PIN, or hardware key"),zt.default.createElement(Re,{Icon:_chunkXPHUZG6Ujs.n},"Takes seconds to set up and use"),zt.default.createElement(Re,{Icon:_chunkXPHUZG6Ujs.z},"Use your passkey to verify transactions"),c&&zt.default.createElement(_reactnative.Text,{style:[Rd.statusText,{color:a.errorDark}]},c.message)),Footer:zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Confirm",onPress:()=>v(),loading:l})}))}var Rd=_reactnative.StyleSheet.create({statusText:{textAlign:"center",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});var eu=1e3;function Es({onBack:e}){let{initMfaEnrollment:o,submitMfaEnrollment:t}=_chunk7VW6NBHOjs.W.call(void 0, ),r=H(),i=D(),[n,s]=_react.useState.call(void 0, "phone-input"),[a,u]=_react.useState.call(void 0, ""),[m,l]=_react.useState.call(void 0, !1),[d,c]=_react.useState.call(void 0, !1),[p,f]=_react.useState.call(void 0, ),[S,h]=_react.useState.call(void 0, !1),v=_react.useCallback.call(void 0, F=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{u(F),f(void 0),l(!0),yield o({method:"sms",phoneNumber:F}),s("otp-submit")}catch(C){let{isBlockingError:x,error:k}=R(C);f(k),h(x),x&&(yield _chunk7VW6NBHOjs.i.call(void 0, 1500),i(new (0, _chunkXPHUZG6Ujs.M)(k)))}finally{l(!1)}}),[o,i]),I=_react.useCallback.call(void 0, F=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{l(!0),f(void 0),yield t({method:"sms",phoneNumber:a,code:F}),c(!0),yield _chunk7VW6NBHOjs.i.call(void 0, eu),r({success:!0})}catch(C){let{isBlockingError:x,error:k}=R(C);f(k),h(x),x&&(yield _chunk7VW6NBHOjs.i.call(void 0, 1500),i(new (0, _chunkXPHUZG6Ujs.M)(k)))}finally{l(!1)}}),[i,r,a,t]),_=_react.useCallback.call(void 0, ()=>{n==="otp-submit"?s("phone-input"):e()},[e,n]);return S?zt.default.createElement(O,{subtitle:p==null?void 0:p.message}):d?zt.default.createElement(Y,{subtitle:""}):n==="phone-input"?zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{goBack:_}),zt.default.createElement(ct,{error:p!=null?p:null,isLoading:m,sendCode:v})):zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{goBack:_}),zt.default.createElement(se,{subtitle:"Please check your phone for a message with your MFA code.",hint:"Didn\u2019t get an SMS?",error:p!=null?p:null,isDone:d,isLoading:m,onSendCode:I,onRequestNewCode:()=>v(a)}))}function xs({onContinue:e,secret:o,authUrl:t}){let{colors:r}=_chunkXPHUZG6Ujs.b.call(void 0, ),i=()=>Fs.openURL(t),[n,s]=_react.useState.call(void 0, !1),a=()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){yield Ts.setStringAsync(o!=null?o:""),s(!0),yield _chunk7VW6NBHOjs.i.call(void 0, 2e3),s(!1)});return zt.default.createElement(_reactnative.View,{style:Oo.container},zt.default.createElement(_reactnative.View,{style:Oo.formContainer},zt.default.createElement(A,{title:"Scan QR code",subtitle:"Open your authenticator app and scan the QR code to continue."}),zt.default.createElement(_reactnative.View,{style:Oo.listContainer},zt.default.createElement(_reactnative.View,{style:Oo.qrContainer},zt.default.createElement(_reactnativeqrcodestyled2.default,{data:t,color:r.text,errorCorrectionLevel:"Q",pieceSize:6,pieceBorderRadius:3,outerEyesOptions:{borderRadius:20},innerEyesOptions:{borderRadius:9}}),zt.default.createElement(_reactnative.View,{style:[Oo.logoContainer,{backgroundColor:r.background}]},zt.default.createElement(_chunkXPHUZG6Ujs.H,{size:40,color:r.text}))),zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Open in Authenticator app",variant:"tertiary",color:r.textMuted,onPress:i,LeftIcon:zt.default.createElement(_chunkXPHUZG6Ujs.r,{color:r.iconSubtle,size:16})}),zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Copy secret",variant:"tertiary",color:r.textMuted,onPress:a,LeftIcon:n?zt.default.createElement(_chunkXPHUZG6Ujs.g,{color:r.iconSubtle,size:16}):zt.default.createElement(_chunkXPHUZG6Ujs.p,{color:r.iconSubtle,size:16})}),zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Continue",onPress:e}))),zt.default.createElement(W,null))}var Oo=_reactnative.StyleSheet.create({container:{flex:1,justifyContent:"space-between",paddingHorizontal:16},formContainer:{alignItems:"center",gap:32},listContainer:{gap:16,alignSelf:"stretch"},qrContainer:{justifyContent:"center",alignItems:"center"},logoContainer:{position:"absolute",width:42,height:42,justifyContent:"center",alignItems:"center"}});var iu=1e3;function Ls({onBack:e}){let{initMfaEnrollment:o,submitMfaEnrollment:t}=_chunk7VW6NBHOjs.W.call(void 0, ),r=H(),i=D(),[n,s]=_react.useState.call(void 0, "auth-link"),[a,u]=_react.useState.call(void 0, ),[m,l]=_react.useState.call(void 0, ),[d,c]=_react.useState.call(void 0, !1),[p,f]=_react.useState.call(void 0, !1),[S,h]=_react.useState.call(void 0, ),[v,I]=_react.useState.call(void 0, !1),_=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{h(void 0),c(!0);let{authUrl:x,secret:k}=yield o({method:"totp"});l(k),u(x)}catch(x){let{isBlockingError:k,error:T}=R(x);h(T),I(k),k&&(yield _chunk7VW6NBHOjs.i.call(void 0, 1500),i(T instanceof _chunkXPHUZG6Ujs.L?T:new (0, _chunkXPHUZG6Ujs.M)(T)))}finally{c(!1)}}),[o,i]),F=_react.useCallback.call(void 0, x=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{c(!0),h(void 0),yield t({method:"totp",code:x}),f(!0),yield _chunk7VW6NBHOjs.i.call(void 0, iu),r({success:!0})}catch(k){let{isBlockingError:T,error:j}=R(k);h(j),I(T),T&&(yield _chunk7VW6NBHOjs.i.call(void 0, 1500),i(j instanceof _chunkXPHUZG6Ujs.L?j:new (0, _chunkXPHUZG6Ujs.M)(j)))}finally{c(!1)}}),[i,r,t]);_react.useEffect.call(void 0, ()=>{_()},[_]);let C=_react.useCallback.call(void 0, ()=>{n==="otp-submit"?s("auth-link"):e()},[e,n]);return a?v?zt.default.createElement(O,{subtitle:S==null?void 0:S.message}):p?zt.default.createElement(Y,{subtitle:""}):n==="auth-link"?zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{goBack:C}),zt.default.createElement(xs,{secret:m!=null?m:"",authUrl:a!=null?a:"",onContinue:()=>s("otp-submit")})):zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{goBack:C}),zt.default.createElement(se,{subtitle:"Please check your for code in you Authenticator app.",error:S!=null?S:null,isDone:p,isLoading:d,onSendCode:F})):zt.default.createElement(We,null)}function Us({config:e}){let{method:o,onBack:t}=e;switch(o){case"totp":return zt.default.createElement(Ls,{onBack:t});case"sms":return zt.default.createElement(Es,{onBack:t});case"passkey":return zt.default.createElement(bs,{onBack:t})}}function As({config:e}){let{colors:o}=_chunkXPHUZG6Ujs.b.call(void 0, ),t=oe(),{availableMethods:r,enrolledMfaMethods:i}=e,n=_react.useCallback.call(void 0, a=>{if(i.includes(a)){t({type:"mfa:enrollment:unenroll",payload:{method:a,onBack:()=>t({type:"mfa:enrollment:landing",payload:e})}});return}t({type:"mfa:enrollment:enroll",payload:{method:a,relyingParty:e.relyingParty,onBack:()=>t({type:"mfa:enrollment:landing",payload:e})}})},[e,i,t]);function s({mfaMethod:a}){return i&&i.includes(a)?zt.default.createElement(_reactnative.View,{style:xt.unenrollGroup},zt.default.createElement(_reactnative.Text,null,"Enabled"),zt.default.createElement(_chunkXPHUZG6Ujs.m,{color:o.icon,size:24})):zt.default.createElement(_chunkXPHUZG6Ujs.i,{color:o.icon,size:24})}return zt.default.createElement(_reactnative.View,{style:xt.container},zt.default.createElement(_reactnative.View,{style:xt.formContainer},zt.default.createElement(A,{title:"Choose a verification method",subtitle:"You can change this later."}),zt.default.createElement(_reactnative.View,{style:xt.listContainer},r.includes("totp")&&zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Authenticator app",variant:"secondary",onPress:()=>n("totp"),LeftIcon:zt.default.createElement(_chunkXPHUZG6Ujs.I,{color:o.icon,size:24}),RightIcon:zt.default.createElement(s,{mfaMethod:"totp"})}),r.includes("passkey")&&zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Passkey",variant:"secondary",onPress:()=>n("passkey"),LeftIcon:zt.default.createElement(_chunkXPHUZG6Ujs.x,{color:o.icon,size:24}),RightIcon:zt.default.createElement(s,{mfaMethod:"passkey"})}),r.includes("sms")&&zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"SMS",variant:"secondary",onPress:()=>n("sms"),LeftIcon:zt.default.createElement(_chunkXPHUZG6Ujs.B,{color:o.icon,size:24}),RightIcon:zt.default.createElement(s,{mfaMethod:"sms"})}))),zt.default.createElement(W,null))}var xt=_reactnative.StyleSheet.create({container:{flex:1,justifyContent:"space-between",paddingHorizontal:16},formContainer:{alignItems:"center",gap:32},listContainer:{gap:16,alignSelf:"stretch"},unenrollGroup:{flexDirection:"row",gap:16,alignItems:"center"}});function ks({config:e}){let{colors:o}=_chunkXPHUZG6Ujs.b.call(void 0, ),{method:t,onBack:r}=e,{unenrollMfa:i}=_chunk7VW6NBHOjs.W.call(void 0, ),{prompt:n}=_chunk7VW6NBHOjs.V.call(void 0, ),s=H(),a=D(),[u,m]=_react.useState.call(void 0, !1),[l,d]=_react.useState.call(void 0, !1),[c,p]=_react.useState.call(void 0, !1),f=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){var I;try{m(!0),d(!1),p(!1),t==="sms"?yield i({method:"sms"}):t==="totp"?yield i({method:"totp"}):t==="passkey"&&(yield n(),yield i({method:"passkey",removeForLogin:(I=_chunkXPHUZG6Ujs.O.call(void 0, ).passkeys)==null?void 0:I.shouldUnlinkOnUnenrollMfa})),d(!0),yield _chunk7VW6NBHOjs.i.call(void 0, 1500),s({success:!0})}catch(_){p(!0),yield _chunk7VW6NBHOjs.i.call(void 0, 1500),a(_ instanceof _chunkXPHUZG6Ujs.L?_:new (0, _chunkXPHUZG6Ujs.M)(_))}finally{m(!1)}}),[t,a,s,n,i]);if(l)return zt.default.createElement(Y,{subtitle:""});if(c)return zt.default.createElement(O,null);let S=mu[t],h=`Remove ${S} verification?`,v="MFA adds an extra layer of security to your account. Make sure you have other methods to secure your account.";return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{goBack:r}),zt.default.createElement(he,{Icons:zt.default.createElement(_chunkXPHUZG6Ujs.l,{size:48,color:o.icon}),title:h,subtitle:v,Footer:zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:`Remove ${S} for MFA`,variant:"primary",destroy:!0,onPress:f,loading:u})}))}var mu={totp:"TOTP",sms:"SMS",passkey:"Passkey"};function _s({config:e}){var n,s,a;let{onContinue:o,appearance:t}=e,r=D(),{colors:i}=_chunkXPHUZG6Ujs.b.call(void 0, );return zt.default.createElement(_reactnative.View,{style:Lt.container},zt.default.createElement(_reactnative.View,{style:Lt.content},zt.default.createElement(_reactnative.View,{style:Lt.header},zt.default.createElement(_chunkXPHUZG6Ujs.H,{color:i.icon,size:32}),zt.default.createElement(A,{title:(n=t==null?void 0:t.title)!=null?n:"Add more security",subtitle:(s=t==null?void 0:t.subtitle)!=null?s:"Set up multi-factor verification.",tight:!0})),zt.default.createElement(_reactnative.View,{style:Lt.featureList},zt.default.createElement(Re,{Icon:_chunkXPHUZG6Ujs.j},(a=t==null?void 0:t.description)!=null?a:"Enable multi-factor verification for your wallet."),zt.default.createElement(Re,{Icon:_chunkXPHUZG6Ujs.K},"You may be asked to complete a verification before certain actions to help keep your wallet secure."))),zt.default.createElement(_reactnative.View,null,zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Continue",onPress:()=>o()}),zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Not now",variant:"tertiary",onPress:()=>r()}),zt.default.createElement(W,null)))}var Lt=_reactnative.StyleSheet.create({container:{flex:1,justifyContent:"space-between",paddingTop:24,paddingHorizontal:16},content:{gap:24},header:{alignItems:"center",gap:8},featureList:{gap:12}});function Bs({config:e}){let{colors:o}=_chunkXPHUZG6Ujs.b.call(void 0, ),t=oe(),{enrolledMfaMethods:r}=e,i=_react.useCallback.call(void 0, n=>{t({type:`mfa:verify:${n}`,payload:{relyingParty:e.relyingParty,ongoingWalletUIFlow:e.ongoingWalletUIFlow,onBack:()=>t({type:"mfa:verify:landing",payload:e})}})},[e,t]);return zt.default.createElement(he,{Icons:void 0,title:"Choose a verification method",subtitle:"",Features:zt.default.createElement(zt.default.Fragment,null,r.includes("totp")&&zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Authenticator app",variant:"secondary",onPress:()=>i("totp"),LeftIcon:zt.default.createElement(_chunkXPHUZG6Ujs.I,{color:o.icon,size:24}),RightIcon:zt.default.createElement(_chunkXPHUZG6Ujs.i,{color:o.icon,size:24})}),r.includes("passkey")&&zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Passkey",variant:"secondary",onPress:()=>i("passkey"),LeftIcon:zt.default.createElement(_chunkXPHUZG6Ujs.x,{color:o.icon,size:24}),RightIcon:zt.default.createElement(_chunkXPHUZG6Ujs.i,{color:o.icon,size:24})}),r.includes("sms")&&zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"SMS",variant:"secondary",onPress:()=>i("sms"),LeftIcon:zt.default.createElement(_chunkXPHUZG6Ujs.B,{color:o.icon,size:24}),RightIcon:zt.default.createElement(_chunkXPHUZG6Ujs.i,{color:o.icon,size:24})})),Footer:zt.default.createElement(W,null)})}var Vs=({config:e})=>{let{colors:o}=_chunkXPHUZG6Ujs.b.call(void 0, ),{init:t,submit:r}=_chunk7VW6NBHOjs.V.call(void 0, ),{relyingParty:i,ongoingWalletUIFlow:n}=e,s=oe(),a=H(),u=D(),[m,l]=_react.useState.call(void 0, !1),[d,c]=_react.useState.call(void 0, ),[p,f]=_react.useState.call(void 0, !1),S=_react.useRef.call(void 0, void 0),h=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){try{l(!0),c(void 0),f(!1);let v=S.current;v||(v=yield t({method:"passkey",relyingParty:i})),yield r({method:"passkey",mfaCode:v,relyingParty:i}),n?s(n):a({success:!0})}catch(v){let{isBlockingError:I,error:_}=R(v);c(_),f(I),I&&(yield _chunk7VW6NBHOjs.i.call(void 0, 1500),u(new (0, _chunkXPHUZG6Ujs.M)(v)))}finally{l(!1)}}),[t,s,u,a,n,i,r]);return _react.useEffect.call(void 0, ()=>{h()},[h]),p?zt.default.createElement(O,{subtitle:d==null?void 0:d.message}):zt.default.createElement(he,{Icons:zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.E,{size:48,color:o.icon}),zt.default.createElement(_chunkXPHUZG6Ujs.x,{size:48,color:o.icon})),title:"Verifying with passkey",subtitle:"Approve this action using your touch, face, PIN, or hardware key.",Features:d?zt.default.createElement(_reactnative.Text,{style:[Su.statusText,{color:o.errorDark}]},d.message):void 0,Footer:zt.default.createElement(_chunkXPHUZG6Ujs.c,{title:"Try again",loading:m,onPress:()=>h(),variant:"primary"})})},Su=_reactnative.StyleSheet.create({statusText:{textAlign:"center",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});function Ds({config:e}){let{init:o,submit:t}=_chunk7VW6NBHOjs.V.call(void 0, ),{ongoingWalletUIFlow:r}=e,i=oe(),n=H(),s=D(),[a,u]=_react.useState.call(void 0, !1),[m,l]=_react.useState.call(void 0, ),[d,c]=_react.useState.call(void 0, !1),p=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{u(!0),l(void 0),c(!1),yield o({method:"sms"})}catch(S){let{isBlockingError:h,error:v}=R(S);l(v),c(h),h&&(yield _chunk7VW6NBHOjs.i.call(void 0, 1500),s(new (0, _chunkXPHUZG6Ujs.M)(S)))}finally{u(!1)}}),[o,s]),f=_react.useCallback.call(void 0, S=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{u(!0),l(void 0),c(!1),yield t({method:"sms",mfaCode:S}),r?i(r):n({success:!0})}catch(h){let{isBlockingError:v,error:I}=R(h);l(I),c(v),v&&(yield _chunk7VW6NBHOjs.i.call(void 0, 1500),s(new (0, _chunkXPHUZG6Ujs.M)(h)))}finally{u(!1)}}),[i,s,n,r,t]);return _react.useEffect.call(void 0, ()=>{p()},[p]),d?zt.default.createElement(O,{subtitle:m==null?void 0:m.message}):zt.default.createElement(se,{subtitle:"Please check your phone for a message with your MFA code.",hint:"Didn\u2019t get an SMS?",error:m!=null?m:null,isLoading:a,onSendCode:f,onRequestNewCode:p})}function Ns({config:e}){let{init:o,submit:t}=_chunk7VW6NBHOjs.V.call(void 0, ),{ongoingWalletUIFlow:r}=e,i=oe(),n=H(),s=D(),[a,u]=_react.useState.call(void 0, !1),[m,l]=_react.useState.call(void 0, ),[d,c]=_react.useState.call(void 0, !1),p=_react.useCallback.call(void 0, f=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{if(u(!0),l(void 0),c(!1),yield o({method:"totp"}),yield t({method:"totp",mfaCode:f}),r)return i(r);n({success:!0})}catch(S){let{isBlockingError:h,error:v}=R(S);l(v),c(h),h&&(yield _chunk7VW6NBHOjs.i.call(void 0, 1500),s(new (0, _chunkXPHUZG6Ujs.M)(S)))}finally{u(!1)}}),[o,i,s,n,r,t]);return d?zt.default.createElement(O,{subtitle:m==null?void 0:m.message}):zt.default.createElement(se,{subtitle:zt.default.createElement(zt.default.Fragment,null,"To continue, please enter the 6-digit code generated from your"," ",zt.default.createElement(_reactnative.Text,{style:Mu.strong},"authenticator app")),error:m!=null?m:null,isLoading:a,onSendCode:p})}var Mu=_reactnative.StyleSheet.create({strong:{fontFamily:"Inter_600SemiBold"}});var _r=({config:e})=>{let o=D(),{cancel:t}=_chunk7VW6NBHOjs.V.call(void 0, ),r=zt.default.useCallback(()=>{t(),o(new (0, _chunkXPHUZG6Ujs.M)(new Error("MFA verification was canceled")))},[t,o]);switch(e.type){case"mfa:enrollment:welcome":return zt.default.createElement(_s,{config:e.payload});case"mfa:enrollment:unenroll":return zt.default.createElement(ks,{config:e.payload});case"mfa:enrollment:landing":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{close:()=>o()}),zt.default.createElement(As,{config:e.payload}));case"mfa:enrollment:enroll":return zt.default.createElement(Us,{config:e.payload});case"mfa:verify:landing":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{close:r}),zt.default.createElement(Bs,{config:e.payload}));case"mfa:verify:passkey":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{close:r,goBack:e.payload.onBack}),zt.default.createElement(Vs,{config:e.payload}));case"mfa:verify:totp":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{close:r,goBack:e.payload.onBack}),zt.default.createElement(Ns,{config:e.payload}));case"mfa:verify:sms":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{close:r,goBack:e.payload.onBack}),zt.default.createElement(Ds,{config:e.payload}));case"wallet:signature":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{close:()=>o()}),zt.default.createElement(Ms,{config:e.payload}));case"delegatedActions:consent":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{close:()=>o()}),zt.default.createElement(ys,{config:e.payload}));case"delegatedActions:revoke":return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{close:()=>o()}),zt.default.createElement(ws,{config:e.payload}));default:throw new Error("Unsupported wallet UI config type")}};function Fu({config:e,goBackRef:o}){let t=it();return zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_chunkXPHUZG6Ujs.U,{goBack:()=>{var r;return((r=o.current)!=null?r:t)()}}),zt.default.createElement(xu,{config:e,goBackRef:o}))}var xu=({config:e,goBackRef:o})=>{let[t,r]=Ln(),i=t&&Fn(e.loginMethods,t),n=mo();if(_chunk7VW6NBHOjs.e.call(void 0, )&&(n!=null&&n.requireUsersAcceptTerms))return zt.default.createElement(ms,{termsAndPolicyConfig:n});switch(t){case"email":return zt.default.createElement(_n,{goBackRef:o,otherLoginMethod:i,onLoginMethodChange:r});case"sms":return zt.default.createElement(Kn,{goBackRef:o,otherLoginMethod:i,onLoginMethodChange:r});case"apple":case"google":case"discord":case"twitter":case"github":case"spotify":case"instagram":case"tiktok":case"line":case"linkedin":case"twitch":case"telegram":return zt.default.createElement(Ni,{oauthProvider:t,goBackRef:o,otherLoginMethod:i,onLoginMethodChange:r});case null:return zt.default.createElement(cs,{loginMethods:e.loginMethods,onLoginMethodChange:r,goBackRef:o});default:throw new (0, _chunkXPHUZG6Ujs.L)("unsupported_login_method",`Unsupported login method: ${t}`)}},Lu= exports.PrivyElements =({config:e={}})=>{var r;let o=Un();_react.useEffect.call(void 0, ()=>_chunk7VW6NBHOjs.c.call(void 0, ({user:i})=>{i&&o(i)}),[o]),ps(),_chunkXPHUZG6Ujs.Q.call(void 0, e),Oi({isMfaUIEnabled:(r=e.mfa)==null?void 0:r.enableMfaVerificationUIs});let t=Uu();return zt.default.createElement(_chunkXPHUZG6Ujs.a,{appearance:e.appearance},zt.default.createElement(us,{visible:!!t},t))};function Uu(){let e=_react.useRef.call(void 0, null),o=nt(),t=Oe(),r=Vi(),i=_chunkXPHUZG6Ujs.X.call(void 0, n=>n!==null);return t?zt.default.createElement(Bi,{config:t,goBackRef:e}):i?zt.default.createElement(zt.default.Fragment,null,zt.default.createElement(_reactnative.View,{style:r?Hs.hidden:Hs.fill},zt.default.createElement(Rn,null)),r?zt.default.createElement(_r,{config:r}):null):o?zt.default.createElement(Fu,{config:o,goBackRef:e}):r?zt.default.createElement(_r,{config:r}):null}var Hs=_reactnative.StyleSheet.create({fill:{flex:1},hidden:{display:"none"}});var ku=()=>{let e=xn(),{setOtpState:o,setOAuthState:t,client:r}=_react.useContext.call(void 0, _chunk7VW6NBHOjs.la),i=_react.useCallback.call(void 0, ()=>{o({status:"initial"}),t({status:"initial"})},[t,o]);return{login:_react.useCallback.call(void 0, s=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){let a=_chunk7VW6NBHOjs.b.call(void 0, );return{user:yield e(s,r,a,i)}}),[e,r,i])}};var Ou=()=>{let e=ye(),{client:o}=_react.useContext.call(void 0, _chunk7VW6NBHOjs.la);return{signMessage:_react.useCallback.call(void 0, t=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){var a,u,m,l;let r=_chunk7VW6NBHOjs.b.call(void 0, ),i=_jssdkcore.getAllUserEmbeddedEthereumWallets.call(void 0, r)[0],n=i?_jssdkcore.getEntropyDetailsFromUser.call(void 0, r,i):null;if(!i||!n)throw new Error("No embedded Ethereum wallet found");let s=yield o.embeddedWallet.getEthereumProvider({entropyId:n.entropyId,entropyIdVerifier:n.entropyIdVerifier,wallet:i});return yield e({type:"wallet:signature",payload:{message:t.message,logo:(a=t.appearance)==null?void 0:a.logo,buttonText:(u=t.appearance)==null?void 0:u.buttonText,description:(m=t.appearance)==null?void 0:m.description,title:(l=t.appearance)==null?void 0:l.title,onSignMessage:d=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){return d instanceof Uint8Array&&(d=bt(d)),yield s.request({method:"personal_sign",params:[d,i.address]})})}})}),[o.embeddedWallet,e])}};var ju=()=>{let e=ye(),{client:o}=_react.useContext.call(void 0, _chunk7VW6NBHOjs.la);return{signMessage:_react.useCallback.call(void 0, t=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){var l,d,c,p;let r=_chunk7VW6NBHOjs.b.call(void 0, ),i=_jssdkcore.getAllUserEmbeddedSolanaWallets.call(void 0, r),n=t.address?i.find(f=>f.address===t.address):i[0];if(!n)throw new Error("Solana account not found");let s=_jssdkcore.getEntropyDetailsFromUser.call(void 0, r,n);if(!s)throw new Error("No embedded Solana wallets found");let{entropyId:a,entropyIdVerifier:u}=s,m=yield o.embeddedWallet.getSolanaProvider(n,a,u);return yield e(_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {type:"wallet:signature"},t),{payload:{message:t.message,logo:(l=t.appearance)==null?void 0:l.logo,buttonText:(d=t.appearance)==null?void 0:d.buttonText,description:(c=t.appearance)==null?void 0:c.description,title:(p=t.appearance)==null?void 0:p.title,onSignMessage:f=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){return f instanceof Uint8Array&&(f=_encoding.encoding.base64.fromBytes(f)),yield m.request({method:"signMessage",params:{message:f}})})}}))}),[o.embeddedWallet,e])}};var Ku=()=>{let e=ye(),{client:o}=_react.useContext.call(void 0, _chunk7VW6NBHOjs.la),t=_react.useMemo.call(void 0, ()=>_jssdkcore.delegatedActions.delegateWallet(o),[o]),r=_react.useMemo.call(void 0, ()=>_jssdkcore.delegatedActions.revokeWallets(o),[o]);return{delegateWallet:_react.useCallback.call(void 0, i=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){let{name:n}=yield o.app.getConfig();return yield e({type:"delegatedActions:consent",payload:{appName:n,onConsent:()=>t(i)}})}),[o,t,e]),revokeWallets:_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){let{name:i}=yield o.app.getConfig();return yield e({type:"delegatedActions:revoke",payload:{appName:i,onRevoke:()=>r()}})}),[o,r,e])}};function Zu(){let{client:e}=_react.useContext.call(void 0, _chunk7VW6NBHOjs.la),o=ye(),t=oe();return{init:_react.useCallback.call(void 0, i=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){var d,c;let n=_chunk7VW6NBHOjs.b.call(void 0, );if(!n)throw new Error("User is not logged in");let s=n.linked_accounts.some(({type:p})=>p==="passkey"),a=n.mfa_methods.map(p=>p.type).filter(p=>p!=="email"),u=i.relyingParty||((c=(d=_chunk7VW6NBHOjs.a.call(void 0, ))==null?void 0:d.mfa)==null?void 0:c.relyingParty),m=i.mfaMethods;(!s||!u)&&(__DEV__&&i.mfaMethods.includes("passkey")&&(s?u||e.logger.warn("Passkey was included in mfaMethods but removed from enrollment: no relyingParty provided. Set mfa.relyingParty on PrivyProvider or pass it to init()."):e.logger.warn("Passkey was included in mfaMethods but removed from enrollment: user has no linked passkey account. Link a passkey as a login method first.")),m=m.filter(p=>p!=="passkey"));let l={type:"mfa:enrollment:landing",payload:{availableMethods:m,enrolledMfaMethods:a,relyingParty:u}};if(a.length===0){yield o({type:"mfa:enrollment:welcome",payload:{onContinue:()=>t(l),appearance:i.appearance}});return}yield o(l)}),[t,o])}}function Ys(t){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({chain:e,erc20Address:o}){let r=_viem.createPublicClient.call(void 0, {chain:e,transport:_viem.http.call(void 0, )}),[i,n]=yield Promise.all([r.readContract({abi:Ks,address:o,functionName:"symbol"}),r.readContract({abi:Ks,address:o,functionName:"decimals"})]);return{decimals:n,symbol:i}})}var Ks=[{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];function ip(){let e=_chunk7VW6NBHOjs.m.call(void 0, ),o=St();return{fundWallet:_react.useCallback.call(void 0, u=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){var m=u,{address:r,asset:i,chain:n,amount:s}=m,a=_chunkC5WYSLQFjs.d.call(void 0, m,["address","asset","chain","amount"]);var T,j,fe,Ge,L,je,Ut,Mo,Io,Br;let l=e.app.getConfig(),d=(l==null?void 0:l.name)||"",c=(T=l==null?void 0:l.funding_config)==null?void 0:T.default_recommended_amount,p=(j=l==null?void 0:l.funding_config)==null?void 0:j.default_recommended_currency.asset,f=(fe=l==null?void 0:l.funding_config)==null?void 0:fe.default_recommended_currency.chain.replace("eip155:",""),S=f?_jssdkcore.getSupportedChainById.call(void 0, +f):void 0,h=(L=(Ge=l==null?void 0:l.funding_config)==null?void 0:Ge.options)!=null?L:[],v=n!=null?n:S,I=(je=i!=null?i:p)!=null?je:"native-currency",_=(Ut=s!=null?s:c)==null?void 0:Ut.trim();if(!v)throw new (0, _chunkXPHUZG6Ujs.L)("chain_not_supported",`Chain with id ${(Mo=n==null?void 0:n.id)!=null?Mo:f} is not supported`);if(!_)throw new (0, _chunkXPHUZG6Ujs.L)("amount_not_specified","amount was not specified");let F;if(I==="USDC"){let we=_jssdkcore.UsdcAddressMap[v.id];if(!we)throw new (0, _chunkXPHUZG6Ujs.L)("asset_not_supported",`Chain with id ${v.id} does not support USDC`);F={address:we,symbol:"USDC",decimals:6}}else if(typeof I=="object"&&I.tokenAddress)if(_jssdkcore.getIsTokenUsdc.call(void 0, I.tokenAddress,v))F={address:I.tokenAddress,symbol:"USDC",decimals:6};else{let we=yield Ys({chain:v,erc20Address:I.tokenAddress}).catch(console.error);if(!we)throw new (0, _chunkXPHUZG6Ujs.L)("asset_info_not_found",`Asset ${I.tokenAddress} information could not be found`);F={address:I.tokenAddress,symbol:we.symbol,decimals:we.decimals}}let C=h.filter(({provider:we})=>{let Vr=(F==null?void 0:F.symbol)==="USDC"?"USDC":"native-currency";if(we==="moonpay")return _jssdkcore.isSupportedChainIdForMoonpay.call(void 0, v.id,Vr);if(we==="coinbase")return _jssdkcore.toCoinbaseBlockchainFromChainId.call(void 0, v.id)&&_jssdkcore.isSupportedChainIdForCoinbaseOnramp.call(void 0, v.id,Vr)}),x=_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},a),{chainType:"ethereum",appName:d,address:r,tokenInfo:F,paymentOptions:C,chain:v,asset:I,amount:_}),k=o(x);return a.defaultPaymentMethod&&(yield ho({client:e,method:a.defaultPaymentMethod,provider:a.defaultPaymentMethod==="card"&&(Br=(Io=a.card)==null?void 0:Io.preferredProvider)!=null?Br:"coinbase",config:x})),yield k}),[o,e])}}function cp(){let e=_chunk7VW6NBHOjs.m.call(void 0, ),o=St();return{fundWallet:_react.useCallback.call(void 0, u=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){var m=u,{address:r,asset:i,amount:n,cluster:s}=m,a=_chunkC5WYSLQFjs.d.call(void 0, m,["address","asset","amount","cluster"]);var C,x,k,T,j,fe,Ge,L;let l=e.app.getConfig(),d=(l==null?void 0:l.name)||"",c=(C=l==null?void 0:l.funding_config)==null?void 0:C.default_recommended_amount,p=(x=l==null?void 0:l.funding_config)==null?void 0:x.default_recommended_currency.asset,f=(T=(k=l==null?void 0:l.funding_config)==null?void 0:k.options)!=null?T:[],S=(j=i!=null?i:p)!=null?j:"native-currency",h=(fe=n!=null?n:c)==null?void 0:fe.trim(),v=s!=null?s:{name:"mainnet-beta"};if(!h)throw new (0, _chunkXPHUZG6Ujs.L)("amount_not_specified","amount was not specified");let I;S==="USDC"&&(I={symbol:"USDC",decimals:6,address:_jssdkcore.getSolanaUsdcMintAddressForCluster.call(void 0, v)});let _=_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},a),{chainType:"solana",appName:d,address:r,tokenInfo:I,paymentOptions:f,asset:S,amount:h,cluster:{name:v.name,rpcUrl:_jssdkcore.getSolanaRpcEndpointForCluster.call(void 0, v)}}),F=o(_);return a.defaultPaymentMethod&&(yield ho({client:e,method:a.defaultPaymentMethod,provider:a.defaultPaymentMethod==="card"&&(L=(Ge=a.card)==null?void 0:Ge.preferredProvider)!=null?L:"coinbase",config:_})),yield F}),[o,e])}}exports.PrivyElements = Lu; exports.PrivyUIError = _chunkXPHUZG6Ujs.L; exports.useDelegatedActions = Ku; exports.useFundSolanaWallet = cp; exports.useFundWallet = ip; exports.useLogin = ku; exports.useMfaEnrollmentUI = Zu; exports.useSignMessage = Ou; exports.useSolanaSignMessage = ju;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkQAUM76HKjs = require('./chunk-QAUM76HK.js');var _chunkDBIA42HBjs = require('./chunk-DBIA42HB.js');var _chunkV3WU67WLjs = require('./chunk-V3WU67WL.js');require('./chunk-F7DR7TVR.js');require('./chunk-3HF374LL.js');var _chunkC5WYSLQFjs = require('./chunk-C5WYSLQF.js');var _react = require('react'); var qt = _interopRequireWildcard(_react); var ir = _interopRequireWildcard(_react); var Qe = _interopRequireWildcard(_react); var Ct = _interopRequireWildcard(_react); var Et = _interopRequireWildcard(_react); var gr = _interopRequireWildcard(_react); var yr = _interopRequireWildcard(_react); var wo = _interopRequireWildcard(_react); var hr = _interopRequireWildcard(_react); var Xe = _interopRequireWildcard(_react); var wr = _interopRequireWildcard(_react); var Cr = _interopRequireWildcard(_react); var vr = _interopRequireWildcard(_react); var Pr = _interopRequireWildcard(_react); var Mr = _interopRequireWildcard(_react); var Ir = _interopRequireWildcard(_react);var _reactnative = require('react-native');function uo(){let e=_chunkV3WU67WLjs.o.call(void 0, ),{isReady:o}=_chunkV3WU67WLjs.ca.call(void 0, ),t=_chunkV3WU67WLjs.f.call(void 0, );return _react.useMemo.call(void 0, ()=>{var s,l;if(!o)return null;let r=e.app.getConfig();if(!r)return null;let i=(s=r.require_users_accept_terms)!=null?s:!1,n=(l=t==null?void 0:t.has_accepted_terms)!=null?l:!1;return{termsAndConditionsUrl:r.terms_and_conditions_url,privacyPolicyUrl:r.privacy_policy_url,requireUsersAcceptTerms:i&&!n}},[e.app,o,t==null?void 0:t.has_accepted_terms])}var _jssdkcore = require('@privy-io/js-sdk-core');var Sn=({value:e,isFocused:o,isSuccess:t,isError:r})=>{let{colors:i}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:[Wt.box,{borderColor:r?i.error:t?i.success:o?i.interactive:i.border},o&&Wt.focusedBox]},qt.default.createElement(_reactnative.Text,{style:[Wt.text,{color:i.text}]},e))},Wt=_reactnative.StyleSheet.create({box:{flex:1,borderWidth:1,borderRadius:12,aspectRatio:3/4,justifyContent:"center",alignItems:"center"},focusedBox:{borderWidth:2},text:{fontFamily:"Inter_500Medium",fontSize:16,lineHeight:20}});var Vt=6,ua=[0,1,2,"-",3,4,5];function Ot({value:e="",status:o=" ",onChangeText:t=()=>{},editable:r=!0,success:i=!1,error:n=!1,autoFocus:s=!1}){let{colors:l}=_chunkDBIA42HBjs.b.call(void 0, ),u=_react.useRef.call(void 0, null),[d,a]=_react.useState.call(void 0, !1),[m,c]=_react.useState.call(void 0, {start:0,end:0}),p=S=>{let h=S.replace(/\D/g,"");t(h.substring(0,Vt))},f=d?Math.min(e.length,Vt-1):void 0;return qt.default.createElement(_reactnative.View,{style:bo.container},qt.default.createElement(_reactnative.TextInput,{autoFocus:s,style:bo.invisibleTextInput,value:e,onChangeText:p,maxLength:Vt,ref:u,editable:r,onFocus:()=>{a(!0),c({start:0,end:e.length||0})},onBlur:()=>a(!1),onSelectionChange:S=>c(S.nativeEvent.selection),selection:m,keyboardType:"numeric",autoComplete:"sms-otp",textContentType:"oneTimeCode",contextMenuHidden:!1,selectTextOnFocus:!0,caretHidden:_reactnative.Platform.OS==="ios",cursorColor:_reactnative.Platform.OS==="android"?"transparent":void 0,selectionColor:"transparent"}),qt.default.createElement(_reactnative.Pressable,{style:bo.codeContainer,onPress:()=>{var S;return r&&((S=u.current)==null?void 0:S.focus())}},ua.map((S,h)=>S==="-"?qt.default.createElement(pa,{key:h}):qt.default.createElement(Sn,{key:h,isFocused:f===S,value:e[S]||"",isSuccess:i,isError:n}))),qt.default.createElement(_reactnative.Text,{style:[bo.statusText,{color:n?l.errorDark:i?l.success:l.textMuted}]},o))}var pa=()=>{let{colors:e}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.Text,{style:[bo.separator,{color:e.text}]},"-")},bo=_reactnative.StyleSheet.create({container:{justifyContent:"center",paddingHorizontal:0,gap:6},invisibleTextInput:{position:"absolute",width:"100%",height:60,backgroundColor:"transparent",color:"transparent",opacity:0,fontSize:24,letterSpacing:20,paddingLeft:20,zIndex:1},codeContainer:{flexDirection:"row",alignItems:"center",gap:10,justifyContent:"space-between",zIndex:0},separator:{fontFamily:"Inter_600SemiBold",fontSize:18,lineHeight:24},statusText:{textAlign:"left",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});var A=({title:e,subtitle:o,tight:t=!1,style:r})=>{let{colors:i}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:[Ro.titleContainer,t&&Ro.tightContainer,r]},qt.default.createElement(_reactnative.Text,{style:[Ro.title,{color:i.textTitle}]},e),o&&qt.default.createElement(_reactnative.Text,{style:[Ro.subtitle,{color:i.textMuted}]},o))},Ro=_reactnative.StyleSheet.create({titleContainer:{alignItems:"center",gap:16},tightContainer:{gap:4},title:{fontFamily:"Inter_600SemiBold",fontSize:24,lineHeight:38},subtitle:{fontFamily:"Inter_400Regular",fontSize:16,lineHeight:24,textAlign:"center"}});var In=({hint:e,link:o,onPress:t,disabled:r})=>{let{colors:i}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:Nt.container},qt.default.createElement(_reactnative.Text,{style:[Nt.hintText,{color:i.textMuted}]},e),o&&qt.default.createElement(_reactnative.Pressable,{onPress:t,disabled:r},qt.default.createElement(_reactnative.Text,{style:[Nt.linkText,{color:r?i.textMuted:i.interactive}]}," ",o)))},Nt=_reactnative.StyleSheet.create({container:{display:"flex",flexDirection:"row",gap:2},hintText:{fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22},linkText:{fontFamily:"Inter_500Medium",fontSize:14,lineHeight:22}});var Ia=3e4,Ea=()=>{let[e,o]=_react.useState.call(void 0, !1),t=_react.useCallback.call(void 0, ()=>{o(!1),setTimeout(()=>{o(!0)},Ia)},[]);return _react.useEffect.call(void 0, ()=>{t()},[t]),[e,t]},ae=({onSendCode:e,onRequestNewCode:o,subtitle:t,isLoading:r,error:i,isDone:n=!1,hint:s})=>{let[l,u]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{i&&u("")},[i]);let d=p=>{u(p),p.length===6&&e(p)},[a,m]=Ea(),c=o&&(()=>{o(),m()});return qt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:zt.innerContainer},qt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},qt.default.createElement(_reactnative.View,{style:zt.content},qt.default.createElement(_reactnative.View,{style:zt.formContainer},qt.default.createElement(A,{title:"Enter confirmation code",subtitle:t}),qt.default.createElement(Ot,{value:l,editable:!r,onChangeText:d,success:n,error:!!i,status:n?"Success.":i?ba(i):" ",autoFocus:!0}),!!c&&qt.default.createElement(In,{hint:s||"Didn\u2019t get a message?",link:"Resend code",onPress:c,disabled:!a}))),qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Continue",loading:r,onPress:()=>e(l),variant:"primary"})))},ba=_jssdkcore.createErrorFormatter.call(void 0, {invalid_credentials:"Invalid code.",cannot_link_more_of_type:"You cannot authorize more than one account for this user.",max_accounts_reached:"This application has reached its user limit and cannot sign in new users.",user_does_not_exist:"Account not found. Please try logging in again or contact support.",linked_to_another_user:"This account has already been linked to another user.",invalid_data:"The code has expired.",too_many_requests:"Too many requests. Please try again later.",default:"Something went wrong. Please try again."}),zt=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:16},formContainer:{rowGap:24}});var _expowebbrowser = require('expo-web-browser'); var jt = _interopRequireWildcard(_expowebbrowser); var ei = _interopRequireWildcard(_expowebbrowser); var mi = _interopRequireWildcard(_expowebbrowser); var Er = _interopRequireWildcard(_expowebbrowser);function po(){let e=uo(),{colors:o}=_chunkDBIA42HBjs.b.call(void 0, );if(!e)return null;let{termsAndConditionsUrl:t,privacyPolicyUrl:r,requireUsersAcceptTerms:i}=e;if(i||!t&&!r)return null;let n=!!(t&&r);return qt.default.createElement(_reactnative.View,{style:tt.container},qt.default.createElement(_reactnative.Text,{style:[tt.hintText,{color:o.textMuted}]},"By logging in I agree to the"," ",t&&qt.default.createElement(_reactnative.Text,{style:[tt.linkText,{color:o.interactive}],onPress:()=>jt.openBrowserAsync(t)},n?"Terms":"Terms of Service"),!1,n&&" & ",r&&qt.default.createElement(_reactnative.Text,{style:[tt.linkText,{color:o.interactive}],onPress:()=>jt.openBrowserAsync(r)},"Privacy Policy")))}var tt=_reactnative.StyleSheet.create({container:{paddingVertical:8,justifyContent:"center"},hintText:{fontFamily:"Inter_400Regular",textAlign:"center",fontSize:14,lineHeight:22},linkText:{fontFamily:"Inter_500Medium",fontSize:14,lineHeight:22}});var _expolinking = require('expo-linking'); var Tn = _interopRequireWildcard(_expolinking); var Vs = _interopRequireWildcard(_expolinking);var _reactnativesvg = require('react-native-svg'); var _reactnativesvg2 = _interopRequireDefault(_reactnativesvg);var La=e=>qt.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40"},e),qt.createElement(_reactnativesvg.Path,{fill:e.color,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.02m176.8 1.71v5.72h-.27l-.09-.14a16 16 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a9 9 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.1 8.1 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.1 6.1 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.73q.12-2.34.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.02m27.66 4.14.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.8 6.8 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 13 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13 13 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.5 7.5 0 0 0-2.8.5A7.1 7.1 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 6 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.5 5.5 0 0 1 2.3-.63 10 10 0 0 1 1.13.02M69.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.7 8.7 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.49Zm64.29 0V7.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.06a5 5 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.6 2.6 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49Zm160.07.19a14.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.5 14.5 0 0 0-8.74-2.35m57.39 0a10.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.5 10.5 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.8 9.8 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.4 7.4 0 0 1-1.26-2.32 14.1 14.1 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.03m13.77-5.31-.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.96a912 912 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.4v-6.9h-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-.46v-4.4h-5.6c-4.46 0-5.6 0-5.6.02Zm27.17 13.85V30.8h3.87l3.86-.01V3.09h-7.73Zm9.8-13.85-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4v-.8h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01Zm30.38 0c-.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.88zM36.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.9 4.9 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a12 12 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07m14.51.05c-2.33.12-4.3.84-5.95 2.16a9.9 9.9 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18 18 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.8 9.8 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-.04m1.42 3.78c.88.1 1.62.34 2.28.75a6.1 6.1 0 0 1 1.99 2.15 10.3 10.3 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.03M92.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.6 7.6 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.4 8.4 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 18 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.3 5.3 0 0 1 2.9-.95c.2-.01.97 0 1.17.03Zm23.44-3.74c-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.4 9.4 0 0 0 3.6 1.8 12 12 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.5 5.5 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.3 5.3 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 11 11 0 0 0-4.88-.74m39.41 0a9.87 9.87 0 0 0-6 2.29 11 11 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.02m75.93-3.33 8.37 23.22a49 49 0 0 1-.67 1.9 5.4 5.4 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8 8 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.3h-4.82Zm59.47 27.98c-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.4a49 49 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 41 0 0 0-5.8-.24m0 0"})),Fn=La;var Ba="https://privy.io/?utm_source=module&utm_medium=module&utm_campaign=registration_module",V=()=>{let{colors:e}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:Wa.legalFooterContainer},qt.default.createElement(_reactnative.Pressable,{onPress:()=>Tn.openURL(Ba),accessibilityRole:"link"},qt.default.createElement(Fn,{color:e.privyBrand,width:"100%",height:11})))},Wa=_reactnative.StyleSheet.create({legalFooterContainer:{flexDirection:"row",alignItems:"center",marginVertical:16,justifyContent:"center",gap:2}});var fo=i=>{var n=i,{error:e,status:o,LeftIcon:t}=n,r=_chunkC5WYSLQFjs.d.call(void 0, n,["error","status","LeftIcon"]);let{colors:s}=_chunkDBIA42HBjs.b.call(void 0, ),[l,u]=_react.useState.call(void 0, !1);return qt.default.createElement(_reactnative.View,{style:nt.container},qt.default.createElement(_reactnative.View,{style:[nt.inputBox,{backgroundColor:s.backgroundSecondary,borderColor:s.border},l&&{borderColor:s.interactive},e&&{borderColor:s.error}]},t,qt.default.createElement(_reactnative.TextInput,_chunkC5WYSLQFjs.b.call(void 0, {cursorColor:s.interactive,placeholderTextColor:s.textPlaceholder,onFocus:()=>u(!0),onBlur:()=>u(!1),autoCapitalize:"none",returnKeyType:"next",multiline:!1,numberOfLines:1,style:[nt.input,{color:s.text}]},r))),o&&qt.default.createElement(_reactnative.Text,{style:[nt.statusText,{color:s.textMuted},e&&{color:s.errorDark}]},o))},nt=_reactnative.StyleSheet.create({container:{gap:6},input:{flex:1,fontFamily:"Inter_400Regular",fontSize:18,lineHeight:_reactnative.Platform.OS==="android"?30:void 0,height:_reactnative.Platform.OS==="ios"?30:void 0},inputBox:{flexDirection:"row",paddingHorizontal:16,height:64,borderRadius:14,alignItems:"center",columnGap:10,borderWidth:2},statusText:{textAlign:"left",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});var Ln=({sendCode:e,isLoading:o,error:t,initialEmail:r,FooterComponent:i})=>{let[n,s]=_react.useState.call(void 0, r!=null?r:""),{colors:l}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:it.innerContainer},qt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},qt.default.createElement(_reactnative.View,{style:it.content},qt.default.createElement(_reactnative.View,{style:it.content},qt.default.createElement(_reactnative.View,{style:it.formContainer},qt.default.createElement(A,{title:"Enter your email"}),qt.default.createElement(fo,{LeftIcon:qt.default.createElement(_chunkDBIA42HBjs.A,{size:24,color:l.icon}),value:n,onChangeText:s,error:!!t,status:t?Ka(t):" ",placeholder:"your@email.com",autoComplete:"email",keyboardType:"email-address",autoFocus:!0})),i),qt.default.createElement(V,null)),qt.default.createElement(_reactnative.View,null,qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Continue",loading:o,onPress:()=>e(n)}),qt.default.createElement(po,null))))},Ka=_jssdkcore.createErrorFormatter.call(void 0, {allowlist_rejected:"You don't have access to this app. Have you been invited?",max_accounts_reached:"This application has reached its user limit and cannot sign in new users.",invalid_data:"Email address is incorrect.",too_many_requests:"Too many requests. Please try again later.",disallowed_plus_email:"Please enter a valid email address without a '+'",default:"Something went wrong. Please try again."}),it=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:4},formContainer:{rowGap:24}});var _zustand = require('zustand');var Yt={success:e=>({value:e}),error:e=>({error:e})};var An=e=>{let o=Array.from(new Set(e));return o.length===0?Yt.error(new (0, _chunkDBIA42HBjs.L)("no_login_methods_available","No login methods available")):Yt.success(o)},$t=e=>{let o=e.length,t=e.every(r=>r==="sms"||r==="email");return o<=2&&t?e[0]:null},kn=(e,o)=>{if(e.length!==2)return null;let[t,r]=e;return o===t?r:t},Be={email:"email",sms:"phone",google:"Google",apple:"Apple",discord:"Discord",twitter:"X",github:"Github",spotify:"Spotify",instagram:"Instagram",tiktok:"Tiktok",linkedin:"LinkedIn",line:"LINE",twitch:"Twitch",telegram:"Telegram"};function go(e){return new Promise((o,t)=>{e({resolve:o,reject:t})})}function Ya(e,o){return{resolve:t=>{o(),e.resolve(t)},reject:t=>{o(),e.reject(t)}}}function st(e,o,t){let r=setTimeout(()=>{e.reject(o())},t);return Ya(e,()=>{clearTimeout(r)})}var Ja=1e3*60*5,Ye=_zustand.create.call(void 0, )((e,o)=>({privyElementsConfig:null,loginPromiseResolvers:null,activeLoginMethod:null,openLoginFlow:(t,r,i,n)=>go(s=>{var m,c,p;let l=r.app.getConfig();if(!l)return s.reject(new (0, _chunkDBIA42HBjs.L)("privy_not_ready","Privy is not ready"));if(i!==null)return s.reject(new (0, _chunkDBIA42HBjs.L)("user_already_logged_in","User is already logged in"));if(_chunkDBIA42HBjs.N.call(void 0, ),o().loginPromiseResolvers!==null)return s.reject(new (0, _chunkDBIA42HBjs.L)("existing_login_flow_in_progress","A login flow is already in progress"));let u=An(t.loginMethods);if(u.error)return s.reject(u.error);let d={loginMethods:u.value,appearance:{logo:(p=(c=(m=t.appearance)==null?void 0:m.logo)!=null?c:l.logo_url)!=null?p:void 0}},a=st(s,()=>(e({privyElementsConfig:null,loginPromiseResolvers:null}),new (0, _chunkDBIA42HBjs.L)("login_flow_timeout","The login flow timed out")),Ja);n(),e({loginPromiseResolvers:a,privyElementsConfig:d,activeLoginMethod:$t(d.loginMethods)})}),closeLoginFlow:()=>{var t;return(t=o().loginPromiseResolvers)==null||t.reject(new (0, _chunkDBIA42HBjs.L)("login_flow_closed","The login flow was closed")),e({privyElementsConfig:null,loginPromiseResolvers:null})},goBack:()=>{let{activeLoginMethod:t,privyElementsConfig:r,updateActiveLoginMethod:i,closeLoginFlow:n}=o();if(!r){n();return}let s=$t(r.loginMethods)===null;t===null||!s?n():i(null)},updateActiveLoginMethod:t=>e({activeLoginMethod:t})})),at=()=>Ye(e=>e.privyElementsConfig),_n=()=>Ye(e=>e.openLoginFlow),We=()=>{let e=Ye(t=>t.closeLoginFlow),o=uo();return _react.useCallback.call(void 0, t=>{o!=null&&o.requireUsersAcceptTerms&&!(t!=null&&t.termsReviewed)||e()},[e,o])},lt=()=>Ye(e=>e.goBack),Bn=()=>[Ye(e=>e.activeLoginMethod),Ye(e=>e.updateActiveLoginMethod)],Qa=e=>{let{loginPromiseResolvers:o}=Ye.getState();o==null||o.resolve(e)},Wn=()=>Qa;var ct=({onLoginMethodChange:e,otherLoginMethod:o})=>o?qt.default.createElement(_chunkDBIA42HBjs.c,{variant:"tertiary",title:`Use ${Be[o]} instead`,onPress:()=>e(o)}):null;var ol=600,Dn=({goBackRef:e,onLoginMethodChange:o,otherLoginMethod:t})=>{let{setOtpState:r}=_react.useContext.call(void 0, _chunkV3WU67WLjs.na),i=We(),[n,s]=_react.useState.call(void 0, ""),{state:l,loginWithCode:u,sendCode:d}=_chunkV3WU67WLjs.u.call(void 0, ),[a,m]=_react.useState.call(void 0, "email"),{step:c,error:p=null,isLoading:f=!1,isDone:S=!1}=_react.useMemo.call(void 0, ()=>{var h;switch(l.status){case"initial":return{step:{type:"email"}};case"sending-code":return{step:{type:a},isLoading:!0};case"awaiting-code-input":return{step:{type:"code"}};case"submitting-code":return{step:{type:"code"},isLoading:!0};case"done":return{step:{type:"code"},isDone:!0};case"error":return{step:{type:a},error:(h=l.error)!=null?h:new Error("Unknown error")}}},[a,l.status]);switch(a!==c.type&&m(c.type),_react.useEffect.call(void 0, ()=>{if(!S)return;let h=setTimeout(()=>{i()},ol);return()=>clearTimeout(h)},[S,i]),_react.useEffect.call(void 0, ()=>{if(c.type==="code")return e.current=()=>{r({status:"initial"})},()=>{e.current=null}},[c.type,r]),c.type){case"code":return qt.default.createElement(ae,{onSendCode:h=>u({code:h,email:n}),onRequestNewCode:()=>d({email:n}),subtitle:`Please check ${n} for a message with your login code.`,isLoading:f,error:p,isDone:S});case"email":return qt.default.createElement(Ln,{initialEmail:n,sendCode:h=>{s(h),d({email:h})},isLoading:f,error:p,FooterComponent:qt.default.createElement(ct,{onLoginMethodChange:o,otherLoginMethod:t})})}};function Nn(e,o){let[t,r]=_react.useState.call(void 0, e);return _react.useEffect.call(void 0, ()=>{let i=setTimeout(()=>{r(e)},o);return()=>{clearTimeout(i)}},[e,o]),t}var Hn=[["Afghanistan","AF","\u{1F1E6}\u{1F1EB}"],["Albania","AL","\u{1F1E6}\u{1F1F1}"],["Algeria","DZ","\u{1F1E9}\u{1F1FF}"],["American Samoa","AS","\u{1F1E6}\u{1F1F8}"],["Andorra","AD","\u{1F1E6}\u{1F1E9}"],["Angola","AO","\u{1F1E6}\u{1F1F4}"],["Anguilla","AI","\u{1F1E6}\u{1F1EE}"],["Antigua & Barbuda","AG","\u{1F1E6}\u{1F1EC}"],["Argentina","AR","\u{1F1E6}\u{1F1F7}"],["Armenia","AM","\u{1F1E6}\u{1F1F2}"],["Aruba","AW","\u{1F1E6}\u{1F1FC}"],["Ascension Island","AC","\u{1F1E6}\u{1F1E8}"],["Australia","AU","\u{1F1E6}\u{1F1FA}"],["Austria","AT","\u{1F1E6}\u{1F1F9}"],["Azerbaijan","AZ","\u{1F1E6}\u{1F1FF}"],["Bahamas","BS","\u{1F1E7}\u{1F1F8}"],["Bahrain","BH","\u{1F1E7}\u{1F1ED}"],["Bangladesh","BD","\u{1F1E7}\u{1F1E9}"],["Barbados","BB","\u{1F1E7}\u{1F1E7}"],["Belarus","BY","\u{1F1E7}\u{1F1FE}"],["Belgium","BE","\u{1F1E7}\u{1F1EA}"],["Belize","BZ","\u{1F1E7}\u{1F1FF}"],["Benin","BJ","\u{1F1E7}\u{1F1EF}"],["Bermuda","BM","\u{1F1E7}\u{1F1F2}"],["Bhutan","BT","\u{1F1E7}\u{1F1F9}"],["Bolivia","BO","\u{1F1E7}\u{1F1F4}"],["Bosnia & Herzegovina","BA","\u{1F1E7}\u{1F1E6}"],["Botswana","BW","\u{1F1E7}\u{1F1FC}"],["Brazil","BR","\u{1F1E7}\u{1F1F7}"],["British Indian Ocean Territory","IO","\u{1F1EE}\u{1F1F4}"],["British Virgin Islands","VG","\u{1F1FB}\u{1F1EC}"],["Brunei","BN","\u{1F1E7}\u{1F1F3}"],["Bulgaria","BG","\u{1F1E7}\u{1F1EC}"],["Burkina Faso","BF","\u{1F1E7}\u{1F1EB}"],["Burundi","BI","\u{1F1E7}\u{1F1EE}"],["Cambodia","KH","\u{1F1F0}\u{1F1ED}"],["Cameroon","CM","\u{1F1E8}\u{1F1F2}"],["Canada","CA","\u{1F1E8}\u{1F1E6}"],["Cape Verde","CV","\u{1F1E8}\u{1F1FB}"],["Caribbean Netherlands","BQ","\u{1F1E7}\u{1F1F6}"],["Cayman Islands","KY","\u{1F1F0}\u{1F1FE}"],["Central African Republic","CF","\u{1F1E8}\u{1F1EB}"],["Chad","TD","\u{1F1F9}\u{1F1E9}"],["Chile","CL","\u{1F1E8}\u{1F1F1}"],["China","CN","\u{1F1E8}\u{1F1F3}"],["Christmas Island","CX","\u{1F1E8}\u{1F1FD}"],["Cocos (Keeling) Islands","CC","\u{1F1E8}\u{1F1E8}"],["Colombia","CO","\u{1F1E8}\u{1F1F4}"],["Comoros","KM","\u{1F1F0}\u{1F1F2}"],["Congo - Brazzaville","CG","\u{1F1E8}\u{1F1EC}"],["Congo - Kinshasa","CD","\u{1F1E8}\u{1F1E9}"],["Cook Islands","CK","\u{1F1E8}\u{1F1F0}"],["Costa Rica","CR","\u{1F1E8}\u{1F1F7}"],["Croatia","HR","\u{1F1ED}\u{1F1F7}"],["Cuba","CU","\u{1F1E8}\u{1F1FA}"],["Cura\xE7ao","CW","\u{1F1E8}\u{1F1FC}"],["Cyprus","CY","\u{1F1E8}\u{1F1FE}"],["Czechia","CZ","\u{1F1E8}\u{1F1FF}"],["C\xF4te d\u2019Ivoire","CI","\u{1F1E8}\u{1F1EE}"],["Denmark","DK","\u{1F1E9}\u{1F1F0}"],["Djibouti","DJ","\u{1F1E9}\u{1F1EF}"],["Dominica","DM","\u{1F1E9}\u{1F1F2}"],["Dominican Republic","DO","\u{1F1E9}\u{1F1F4}"],["Ecuador","EC","\u{1F1EA}\u{1F1E8}"],["Egypt","EG","\u{1F1EA}\u{1F1EC}"],["El Salvador","SV","\u{1F1F8}\u{1F1FB}"],["Equatorial Guinea","GQ","\u{1F1EC}\u{1F1F6}"],["Eritrea","ER","\u{1F1EA}\u{1F1F7}"],["Estonia","EE","\u{1F1EA}\u{1F1EA}"],["Eswatini","SZ","\u{1F1F8}\u{1F1FF}"],["Ethiopia","ET","\u{1F1EA}\u{1F1F9}"],["Falkland Islands","FK","\u{1F1EB}\u{1F1F0}"],["Faroe Islands","FO","\u{1F1EB}\u{1F1F4}"],["Fiji","FJ","\u{1F1EB}\u{1F1EF}"],["Finland","FI","\u{1F1EB}\u{1F1EE}"],["France","FR","\u{1F1EB}\u{1F1F7}"],["French Guiana","GF","\u{1F1EC}\u{1F1EB}"],["French Polynesia","PF","\u{1F1F5}\u{1F1EB}"],["Gabon","GA","\u{1F1EC}\u{1F1E6}"],["Gambia","GM","\u{1F1EC}\u{1F1F2}"],["Georgia","GE","\u{1F1EC}\u{1F1EA}"],["Germany","DE","\u{1F1E9}\u{1F1EA}"],["Ghana","GH","\u{1F1EC}\u{1F1ED}"],["Gibraltar","GI","\u{1F1EC}\u{1F1EE}"],["Greece","GR","\u{1F1EC}\u{1F1F7}"],["Greenland","GL","\u{1F1EC}\u{1F1F1}"],["Grenada","GD","\u{1F1EC}\u{1F1E9}"],["Guadeloupe","GP","\u{1F1EC}\u{1F1F5}"],["Guam","GU","\u{1F1EC}\u{1F1FA}"],["Guatemala","GT","\u{1F1EC}\u{1F1F9}"],["Guernsey","GG","\u{1F1EC}\u{1F1EC}"],["Guinea","GN","\u{1F1EC}\u{1F1F3}"],["Guinea-Bissau","GW","\u{1F1EC}\u{1F1FC}"],["Guyana","GY","\u{1F1EC}\u{1F1FE}"],["Haiti","HT","\u{1F1ED}\u{1F1F9}"],["Honduras","HN","\u{1F1ED}\u{1F1F3}"],["Hong Kong SAR China","HK","\u{1F1ED}\u{1F1F0}"],["Hungary","HU","\u{1F1ED}\u{1F1FA}"],["Iceland","IS","\u{1F1EE}\u{1F1F8}"],["India","IN","\u{1F1EE}\u{1F1F3}"],["Indonesia","ID","\u{1F1EE}\u{1F1E9}"],["Iran","IR","\u{1F1EE}\u{1F1F7}"],["Iraq","IQ","\u{1F1EE}\u{1F1F6}"],["Ireland","IE","\u{1F1EE}\u{1F1EA}"],["Isle of Man","IM","\u{1F1EE}\u{1F1F2}"],["Israel","IL","\u{1F1EE}\u{1F1F1}"],["Italy","IT","\u{1F1EE}\u{1F1F9}"],["Jamaica","JM","\u{1F1EF}\u{1F1F2}"],["Japan","JP","\u{1F1EF}\u{1F1F5}"],["Jersey","JE","\u{1F1EF}\u{1F1EA}"],["Jordan","JO","\u{1F1EF}\u{1F1F4}"],["Kazakhstan","KZ","\u{1F1F0}\u{1F1FF}"],["Kenya","KE","\u{1F1F0}\u{1F1EA}"],["Kiribati","KI","\u{1F1F0}\u{1F1EE}"],["Kosovo","XK","\u{1F1FD}\u{1F1F0}"],["Kuwait","KW","\u{1F1F0}\u{1F1FC}"],["Kyrgyzstan","KG","\u{1F1F0}\u{1F1EC}"],["Laos","LA","\u{1F1F1}\u{1F1E6}"],["Latvia","LV","\u{1F1F1}\u{1F1FB}"],["Lebanon","LB","\u{1F1F1}\u{1F1E7}"],["Lesotho","LS","\u{1F1F1}\u{1F1F8}"],["Liberia","LR","\u{1F1F1}\u{1F1F7}"],["Libya","LY","\u{1F1F1}\u{1F1FE}"],["Liechtenstein","LI","\u{1F1F1}\u{1F1EE}"],["Lithuania","LT","\u{1F1F1}\u{1F1F9}"],["Luxembourg","LU","\u{1F1F1}\u{1F1FA}"],["Macao SAR China","MO","\u{1F1F2}\u{1F1F4}"],["Madagascar","MG","\u{1F1F2}\u{1F1EC}"],["Malawi","MW","\u{1F1F2}\u{1F1FC}"],["Malaysia","MY","\u{1F1F2}\u{1F1FE}"],["Maldives","MV","\u{1F1F2}\u{1F1FB}"],["Mali","ML","\u{1F1F2}\u{1F1F1}"],["Malta","MT","\u{1F1F2}\u{1F1F9}"],["Marshall Islands","MH","\u{1F1F2}\u{1F1ED}"],["Martinique","MQ","\u{1F1F2}\u{1F1F6}"],["Mauritania","MR","\u{1F1F2}\u{1F1F7}"],["Mauritius","MU","\u{1F1F2}\u{1F1FA}"],["Mayotte","YT","\u{1F1FE}\u{1F1F9}"],["Mexico","MX","\u{1F1F2}\u{1F1FD}"],["Micronesia","FM","\u{1F1EB}\u{1F1F2}"],["Moldova","MD","\u{1F1F2}\u{1F1E9}"],["Monaco","MC","\u{1F1F2}\u{1F1E8}"],["Mongolia","MN","\u{1F1F2}\u{1F1F3}"],["Montenegro","ME","\u{1F1F2}\u{1F1EA}"],["Montserrat","MS","\u{1F1F2}\u{1F1F8}"],["Morocco","MA","\u{1F1F2}\u{1F1E6}"],["Mozambique","MZ","\u{1F1F2}\u{1F1FF}"],["Myanmar (Burma)","MM","\u{1F1F2}\u{1F1F2}"],["Namibia","NA","\u{1F1F3}\u{1F1E6}"],["Nauru","NR","\u{1F1F3}\u{1F1F7}"],["Nepal","NP","\u{1F1F3}\u{1F1F5}"],["Netherlands","NL","\u{1F1F3}\u{1F1F1}"],["New Caledonia","NC","\u{1F1F3}\u{1F1E8}"],["New Zealand","NZ","\u{1F1F3}\u{1F1FF}"],["Nicaragua","NI","\u{1F1F3}\u{1F1EE}"],["Niger","NE","\u{1F1F3}\u{1F1EA}"],["Nigeria","NG","\u{1F1F3}\u{1F1EC}"],["Niue","NU","\u{1F1F3}\u{1F1FA}"],["Norfolk Island","NF","\u{1F1F3}\u{1F1EB}"],["North Korea","KP","\u{1F1F0}\u{1F1F5}"],["North Macedonia","MK","\u{1F1F2}\u{1F1F0}"],["Northern Mariana Islands","MP","\u{1F1F2}\u{1F1F5}"],["Norway","NO","\u{1F1F3}\u{1F1F4}"],["Oman","OM","\u{1F1F4}\u{1F1F2}"],["Pakistan","PK","\u{1F1F5}\u{1F1F0}"],["Palau","PW","\u{1F1F5}\u{1F1FC}"],["Palestinian Territories","PS","\u{1F1F5}\u{1F1F8}"],["Panama","PA","\u{1F1F5}\u{1F1E6}"],["Papua New Guinea","PG","\u{1F1F5}\u{1F1EC}"],["Paraguay","PY","\u{1F1F5}\u{1F1FE}"],["Peru","PE","\u{1F1F5}\u{1F1EA}"],["Philippines","PH","\u{1F1F5}\u{1F1ED}"],["Poland","PL","\u{1F1F5}\u{1F1F1}"],["Portugal","PT","\u{1F1F5}\u{1F1F9}"],["Puerto Rico","PR","\u{1F1F5}\u{1F1F7}"],["Qatar","QA","\u{1F1F6}\u{1F1E6}"],["Romania","RO","\u{1F1F7}\u{1F1F4}"],["Russia","RU","\u{1F1F7}\u{1F1FA}"],["Rwanda","RW","\u{1F1F7}\u{1F1FC}"],["R\xE9union","RE","\u{1F1F7}\u{1F1EA}"],["Samoa","WS","\u{1F1FC}\u{1F1F8}"],["San Marino","SM","\u{1F1F8}\u{1F1F2}"],["Saudi Arabia","SA","\u{1F1F8}\u{1F1E6}"],["Senegal","SN","\u{1F1F8}\u{1F1F3}"],["Serbia","RS","\u{1F1F7}\u{1F1F8}"],["Seychelles","SC","\u{1F1F8}\u{1F1E8}"],["Sierra Leone","SL","\u{1F1F8}\u{1F1F1}"],["Singapore","SG","\u{1F1F8}\u{1F1EC}"],["Sint Maarten","SX","\u{1F1F8}\u{1F1FD}"],["Slovakia","SK","\u{1F1F8}\u{1F1F0}"],["Slovenia","SI","\u{1F1F8}\u{1F1EE}"],["Solomon Islands","SB","\u{1F1F8}\u{1F1E7}"],["Somalia","SO","\u{1F1F8}\u{1F1F4}"],["South Africa","ZA","\u{1F1FF}\u{1F1E6}"],["South Korea","KR","\u{1F1F0}\u{1F1F7}"],["South Sudan","SS","\u{1F1F8}\u{1F1F8}"],["Spain","ES","\u{1F1EA}\u{1F1F8}"],["Sri Lanka","LK","\u{1F1F1}\u{1F1F0}"],["St. Barth\xE9lemy","BL","\u{1F1E7}\u{1F1F1}"],["St. Helena","SH","\u{1F1F8}\u{1F1ED}"],["St. Kitts & Nevis","KN","\u{1F1F0}\u{1F1F3}"],["St. Lucia","LC","\u{1F1F1}\u{1F1E8}"],["St. Martin","MF","\u{1F1F2}\u{1F1EB}"],["St. Pierre & Miquelon","PM","\u{1F1F5}\u{1F1F2}"],["St. Vincent & Grenadines","VC","\u{1F1FB}\u{1F1E8}"],["Sudan","SD","\u{1F1F8}\u{1F1E9}"],["Suriname","SR","\u{1F1F8}\u{1F1F7}"],["Svalbard & Jan Mayen","SJ","\u{1F1F8}\u{1F1EF}"],["Sweden","SE","\u{1F1F8}\u{1F1EA}"],["Switzerland","CH","\u{1F1E8}\u{1F1ED}"],["Syria","SY","\u{1F1F8}\u{1F1FE}"],["S\xE3o Tom\xE9 & Pr\xEDncipe","ST","\u{1F1F8}\u{1F1F9}"],["Taiwan","TW","\u{1F1F9}\u{1F1FC}"],["Tajikistan","TJ","\u{1F1F9}\u{1F1EF}"],["Tanzania","TZ","\u{1F1F9}\u{1F1FF}"],["Thailand","TH","\u{1F1F9}\u{1F1ED}"],["Timor-Leste","TL","\u{1F1F9}\u{1F1F1}"],["Togo","TG","\u{1F1F9}\u{1F1EC}"],["Tokelau","TK","\u{1F1F9}\u{1F1F0}"],["Tonga","TO","\u{1F1F9}\u{1F1F4}"],["Trinidad & Tobago","TT","\u{1F1F9}\u{1F1F9}"],["Tristan da Cunha","TA","\u{1F1F9}\u{1F1E6}"],["Tunisia","TN","\u{1F1F9}\u{1F1F3}"],["Turkey","TR","\u{1F1F9}\u{1F1F7}"],["Turkmenistan","TM","\u{1F1F9}\u{1F1F2}"],["Turks & Caicos Islands","TC","\u{1F1F9}\u{1F1E8}"],["Tuvalu","TV","\u{1F1F9}\u{1F1FB}"],["U.S. Virgin Islands","VI","\u{1F1FB}\u{1F1EE}"],["Uganda","UG","\u{1F1FA}\u{1F1EC}"],["Ukraine","UA","\u{1F1FA}\u{1F1E6}"],["United Arab Emirates","AE","\u{1F1E6}\u{1F1EA}"],["United Kingdom","GB","\u{1F1EC}\u{1F1E7}"],["United States","US","\u{1F1FA}\u{1F1F8}"],["Uruguay","UY","\u{1F1FA}\u{1F1FE}"],["Uzbekistan","UZ","\u{1F1FA}\u{1F1FF}"],["Vanuatu","VU","\u{1F1FB}\u{1F1FA}"],["Vatican City","VA","\u{1F1FB}\u{1F1E6}"],["Venezuela","VE","\u{1F1FB}\u{1F1EA}"],["Vietnam","VN","\u{1F1FB}\u{1F1F3}"],["Wallis & Futuna","WF","\u{1F1FC}\u{1F1EB}"],["Western Sahara","EH","\u{1F1EA}\u{1F1ED}"],["Yemen","YE","\u{1F1FE}\u{1F1EA}"],["Zambia","ZM","\u{1F1FF}\u{1F1F2}"],["Zimbabwe","ZW","\u{1F1FF}\u{1F1FC}"],["\xC5land Islands","AX","\u{1F1E6}\u{1F1FD}"]];var sl=Hn,zn=sl.map(([e,o,t])=>({name:e,code:o,callCode:_jssdkcore.getCountryCallingCode.call(void 0, o),flag:t}));var jn=({country:e,onPress:o,selected:t})=>{let{colors:r}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.Pressable,{onPress:o},qt.default.createElement(_reactnative.View,{style:Jt.row},qt.default.createElement(_reactnative.Text,{style:Jt.rowFlag},e.flag),qt.default.createElement(_reactnative.Text,{style:[Jt.rowLabel,{color:r.text}]},e.name," (+",e.callCode,")"),t&&qt.default.createElement(_chunkDBIA42HBjs.g,{size:24,color:r.interactive})))},Jt=_reactnative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",gap:10,height:56},rowFlag:{fontFamily:"Inter_400Regular",fontSize:17,lineHeight:22},rowLabel:{flex:1,fontFamily:"Inter_400Regular",fontSize:17,lineHeight:22}});var hl=600,Kn=({countryCode:e,onChangeCountryCode:o,onComplete:t})=>{let{colors:r}=_chunkDBIA42HBjs.b.call(void 0, ),[i,n]=_react.useState.call(void 0, ""),s=Nn(i,hl),l=_react.useMemo.call(void 0, ()=>zn.filter(u=>u.name.toLowerCase().includes(s.toLowerCase())),[s]);return qt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:qn.innerContainer},qt.default.createElement(_reactnative.View,{style:qn.header},qt.default.createElement(A,{title:"Select country code"}),qt.default.createElement(fo,{LeftIcon:qt.default.createElement(_chunkDBIA42HBjs.F,{size:24,color:r.iconSubtle}),value:i,onChangeText:n,placeholder:"Search country"})),qt.default.createElement(_reactnative.FlatList,{style:{flex:1},data:l,keyExtractor:u=>`country-option-${u.code}`,renderItem:({item:u})=>qt.default.createElement(jn,{country:u,selected:u.code===e,onPress:()=>{o(u.code),t()}})}),qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Continue",onPress:t}))},qn=_reactnative.StyleSheet.create({innerContainer:{flex:1,paddingHorizontal:16},header:{gap:20}});var $n=({countryCode:e,onPress:o})=>{let{colors:t}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.Pressable,{onPress:o},qt.default.createElement(_reactnative.View,{style:Yn.cell},qt.default.createElement(_reactnative.Text,{style:[Yn.text,{color:t.text}]},e," +",_jssdkcore.getCountryCallingCode.call(void 0, e)),qt.default.createElement(_chunkDBIA42HBjs.h,{size:16,color:t.icon})))},Yn=_reactnative.StyleSheet.create({cell:{flexDirection:"row",alignItems:"center",gap:6},text:{fontFamily:"Inter_400Regular",fontSize:18,lineHeight:30}});var ut=({sendCode:e,isLoading:o,error:t,initialPhone:r,FooterComponent:i})=>{let[n,s]=_react.useState.call(void 0, r!=null?r:""),[l,u]=_react.useState.call(void 0, "US"),[d,a]=_react.useState.call(void 0, !1),m=_jssdkcore.phoneNumberTypingFormatter.call(void 0, l),c=_jssdkcore.getPlaceholderPhoneNumber.call(void 0, l),p=f=>{try{let S=f.replace(/\D/g,""),h=n.replace(/\D/g,""),v=S===h?f:m.input(f);s(v)}catch(S){console.error("Error processing phone number:",S),s("")}};return d?qt.default.createElement(Kn,{countryCode:l,onChangeCountryCode:u,onComplete:()=>a(!1)}):qt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:dt.innerContainer},qt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},qt.default.createElement(_reactnative.View,{style:dt.content},qt.default.createElement(_reactnative.View,{style:dt.content},qt.default.createElement(_reactnative.View,{style:dt.formContainer},qt.default.createElement(A,{title:"Enter your phone"}),qt.default.createElement(fo,{LeftIcon:qt.default.createElement($n,{countryCode:l,onPress:()=>a(!0)}),value:n,onChangeText:p,error:!!t,status:t?Ul(t):" ",placeholder:c,autoComplete:"tel",keyboardType:"phone-pad",autoFocus:!0})),i),qt.default.createElement(V,null)),qt.default.createElement(_reactnative.View,null,qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Continue",loading:o,onPress:()=>e(_jssdkcore.formatPhoneNumber.call(void 0, n.replace(/\D/g,""),l))}),qt.default.createElement(po,null))))},Ul=_jssdkcore.createErrorFormatter.call(void 0, {allowlist_rejected:"You don't have access to this app. Have you been invited?",max_accounts_reached:"This application has reached its user limit and cannot sign in new users.",invalid_data:"Phone is incorrect.",too_many_requests:"Too many requests. Please try again later.",not_supported:"Region or carrier not yet supported.",default:"Something went wrong. Please try again."}),dt=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:4},formContainer:{rowGap:24}});var kl=600,Qn=({goBackRef:e,onLoginMethodChange:o,otherLoginMethod:t})=>{let{setOtpState:r}=_react.useContext.call(void 0, _chunkV3WU67WLjs.na),i=We(),[n,s]=_react.useState.call(void 0, ""),{state:l,loginWithCode:u,sendCode:d}=_chunkV3WU67WLjs.w.call(void 0, ),[a,m]=_react.useState.call(void 0, "phone"),{step:c,error:p=null,isLoading:f=!1,isDone:S=!1}=_react.useMemo.call(void 0, ()=>{var h;switch(l.status){case"initial":return{step:{type:"phone"}};case"sending-code":return{step:{type:a},isLoading:!0};case"awaiting-code-input":return{step:{type:"code"}};case"submitting-code":return{step:{type:"code"},isLoading:!0};case"done":return{step:{type:"code"},isDone:!0};case"error":return{step:{type:a},error:(h=l.error)!=null?h:new Error("Unknown error")}}},[a,l.status]);switch(a!==c.type&&m(c.type),_react.useEffect.call(void 0, ()=>{if(!S)return;let h=setTimeout(()=>{i()},kl);return()=>clearTimeout(h)},[S,i]),_react.useEffect.call(void 0, ()=>{if(c.type==="code")return e.current=()=>{r({status:"initial"})},()=>{e.current=null}},[c.type,r,i]),c.type){case"phone":return qt.default.createElement(ut,{initialPhone:n,sendCode:h=>{s(h),d({phone:h})},isLoading:f,error:p,FooterComponent:qt.default.createElement(ct,{onLoginMethodChange:o,otherLoginMethod:t})});case"code":return qt.default.createElement(ae,{onSendCode:h=>u({code:h,phone:n}),onRequestNewCode:()=>d({phone:n}),subtitle:`Please check ${n} for a message with your login code.`,isLoading:f,error:p,isDone:S})}};var Xn=()=>{let{colors:e}=_chunkDBIA42HBjs.b.call(void 0, ),o=_reactnative.useAnimatedValue.call(void 0, 0);_react.useEffect.call(void 0, ()=>{o.setValue(0);let r=_reactnative.Animated.loop(_reactnative.Animated.timing(o,{toValue:1,duration:1200,useNativeDriver:!0,easing:_reactnative.Easing.linear}));return r.start(),()=>r.stop()},[o]);let t=o.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return qt.default.createElement(_reactnative.Animated.View,{style:{transform:[{rotate:t}]}},qt.default.createElement(_reactnativesvg2.default,{width:160,height:160,viewBox:"0 0 166 166",fill:"none"},qt.default.createElement(_reactnativesvg.Circle,{cx:"83",cy:"83",r:"80",stroke:e.icon,strokeWidth:"6"}),qt.default.createElement(_reactnativesvg.Path,{d:"M142.715 29.7639C156.578 45.3143 163.829 65.6592 162.925 86.4724C162.02 107.286 153.033 126.925 137.873 141.214C122.714 155.504 102.578 163.316 81.7476 162.99C60.9174 162.664 41.036 154.225 26.3312 139.468",stroke:e.iconSubtle,strokeWidth:"6",strokeLinecap:"round"})))};var Oe=()=>qt.default.createElement(_reactnative.View,{style:zl.container},qt.default.createElement(Xn,null)),zl=_reactnative.StyleSheet.create({container:{flex:1,gap:20,alignItems:"center",justifyContent:"center",paddingHorizontal:16}});function ve({children:e,footer:o}){return qt.default.createElement(_reactnative.ScrollView,{contentContainerStyle:ce.scroll,bounces:!1},qt.default.createElement(_reactnative.View,{style:ce.content},e),o?qt.default.createElement(_reactnative.View,{style:ce.footer},o):null)}function Pe({Icon:e,accent:o=!1}){let{colors:t}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:[ce.iconCircle,{backgroundColor:o?t.interactive:t.backgroundSecondary}]},qt.default.createElement(e,{size:o?26:24,strokeWidth:2,color:o?t.textInteractive:t.icon}))}function Me({title:e,subtitle:o}){let{colors:t}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:ce.header},qt.default.createElement(_reactnative.Text,{accessibilityRole:"header",style:[ce.title,{color:t.textTitle}]},e),typeof o=="string"?qt.default.createElement(Ze,null,o):o)}function Ze({children:e}){let{colors:o}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.Text,{style:[ce.subtitle,{color:o.text}]},e)}function gt({items:e}){let{colors:o}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:ce.checklist},e.map(t=>qt.default.createElement(_reactnative.View,{key:t,style:ce.checklistRow},qt.default.createElement(_reactnative.View,{style:[ce.checkCircle,{backgroundColor:o.backgroundSecondary}]},qt.default.createElement(_chunkDBIA42HBjs.g,{size:14,strokeWidth:3,color:o.icon})),qt.default.createElement(_reactnative.Text,{style:[ce.checklistLabel,{color:o.text}]},t))))}function er({url:e,children:o}){let t=_chunkDBIA42HBjs.V.call(void 0, e);return qt.default.createElement(_reactnative.Text,{style:ce.link,accessibilityRole:t?"link":void 0,onPress:t?()=>void ei.openBrowserAsync(t).catch(()=>{}):void 0},o)}var ce=_reactnative.StyleSheet.create({scroll:{flexGrow:1,justifyContent:"space-between",paddingHorizontal:24,paddingVertical:24,gap:24},content:{alignItems:"center",gap:24},footer:{gap:12},iconCircle:{width:64,height:64,borderRadius:32,alignItems:"center",justifyContent:"center"},header:{alignItems:"center",gap:8},title:{fontFamily:_chunkDBIA42HBjs.R.semibold,fontSize:22,lineHeight:28,textAlign:"center"},subtitle:{fontFamily:_chunkDBIA42HBjs.R.regular,fontSize:16,lineHeight:24,textAlign:"center"},checklist:{alignSelf:"stretch",gap:10},checklistRow:{flexDirection:"row",alignItems:"center",gap:12},checkCircle:{width:28,height:28,borderRadius:14,alignItems:"center",justifyContent:"center"},checklistLabel:{flex:1,fontFamily:_chunkDBIA42HBjs.R.regular,fontSize:16,lineHeight:24},link:{textDecorationLine:"underline"}});function Uo({Icon:e=_chunkDBIA42HBjs.q,title:o,subtitle:t,cta:r,pending:i,onPress:n}){return qt.default.createElement(ve,{footer:qt.default.createElement(_chunkDBIA42HBjs.c,{title:r,onPress:n,loading:i})},qt.default.createElement(Pe,{Icon:e}),qt.default.createElement(Me,{title:o,subtitle:t}))}function yo({Icon:e=_chunkDBIA42HBjs.q,accent:o,title:t,subtitle:r,cta:i,secondary:n,onPress:s}){return qt.default.createElement(ve,{footer:qt.default.createElement(_chunkDBIA42HBjs.c,{title:i,variant:n?"secondary":"primary",style:n?Kl.centeredButton:void 0,onPress:s})},qt.default.createElement(Pe,{Icon:e,accent:o}),qt.default.createElement(Me,{title:t,subtitle:r}))}var Kl=_reactnative.StyleSheet.create({centeredButton:{justifyContent:"center"}});function ti({symbol:e,vaultProvider:o}){let{colors:t}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:oi.effects},qt.default.createElement(_reactnative.Text,{style:[oi.heading,{color:t.text}]},"What this does:"),qt.default.createElement(gt,{items:o?["Automatically withdraws only what's needed for purchases","Your remaining assets stay in Earn","Turn this off anytime in Settings"]:[`Connects your card to your ${e} balance`,"Lets your card make purchases","Spending limits are managed separately"]}),o?qt.default.createElement(Ze,null,`Earn is separate from your card and involves risk. Earn is provided by ${o} through your noncustodial wallet. Assets in Earn can lose value and aren't held, insured, or guaranteed by Lead Bank or Bridge. Card protections don't cover losses from Earn. Your prepaid debit card is issued by Lead Bank.`):null)}var oi=_reactnative.StyleSheet.create({effects:{alignSelf:"stretch",gap:16},heading:{fontFamily:_chunkDBIA42HBjs.R.semibold,fontSize:14,lineHeight:20}});function Je({title:e,subtitle:o}){return qt.default.createElement(ve,{footer:qt.default.createElement(_chunkDBIA42HBjs.c,{title:e,loading:!0,disabled:!0})},qt.default.createElement(Pe,{Icon:_chunkDBIA42HBjs.q}),qt.default.createElement(Me,{title:e,subtitle:o}))}var _areaddressesequal = require('@privy-io/are-addresses-equal');var _viem = require('viem');function or({client:e,account:o,provider:t}){return(l,u)=>_chunkC5WYSLQFjs.e.call(void 0, this,[l,u],function*({to:r,chainId:i,data:n},{sponsor:s}){if(s){if(!_jssdkcore.isUnifiedWallet.call(void 0, o))throw new Error("Sponsored sends need a wallet that executes in Privy's secure enclave");let a=yield _jssdkcore.rpc.call(void 0, e,(...m)=>e.embeddedWallet.signWithUserSigner(...m),{wallet_id:o.id,chain_type:"ethereum",method:"eth_sendTransaction",caip2:`eip155:${i}`,sponsor:!0,params:{transaction:{from:o.address,to:r,chain_id:_viem.toHex.call(void 0, i),data:n}}});if(a.data&&"hash"in a.data)return{hash:a.data.hash};throw new Error("Sponsored approval did not return a transaction hash")}let d=yield t.request({method:"eth_sendTransaction",params:[{from:o.address,to:r,chainId:i,data:n}]});if(typeof d!="string")throw new Error("Card spend approval did not return a hash");return{hash:d}})}function ri({environment:e,walletId:o,chainId:t,asset:r,spendApproval:i}){let n=_chunkV3WU67WLjs.o.call(void 0, ),s=_chunkV3WU67WLjs.f.call(void 0, ),{wallets:l}=_chunkV3WU67WLjs.$.call(void 0, ),u=_react.useRef.call(void 0, s);u.current=s;let d=_react.useRef.call(void 0, l);d.current=l;let a=_react.useRef.call(void 0, i);a.current=i;let m=_react.useCallback.call(void 0, ()=>{var k;let C=(k=u.current)==null?void 0:k.linked_accounts.find(F=>_jssdkcore.isEmbeddedWalletAccount.call(void 0, F)&&F.id===o);if(!C)throw new Error("Could not find the wallet for this card");let x=d.current.find(F=>_areaddressesequal.areAddressesEqual.call(void 0, F.address,C.address));if(!x)throw new Error("Connect the wallet for this card to approve spending");return{account:C,wallet:x}},[o]),c=_react.useCallback.call(void 0, ()=>{let C=_jssdkcore.getSpendApproval.call(void 0, t,a.current,r);if((C==null?void 0:C.kind)!=="evm")return{kind:"unsupported",reason:"Card spending is not yet supported on this network"};let{account:x,wallet:k}=m(),F=Number(t.slice(7)),{stablecoinAddress:q,spenderAddress:ge}=C;return{kind:"supported",isApproved:()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){return(yield _jssdkcore.readSpendAllowance.call(void 0, {provider:yield k.getProvider(),evmChainId:F,owner:x.address,stablecoinAddress:q,spenderAddress:ge}))>BigInt(0)}),approve:()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){yield _jssdkcore.approveSpend.call(void 0, {sendTransaction:or({client:n,account:x,provider:yield k.getProvider()}),evmChainId:F,stablecoinAddress:q,spenderAddress:ge})})}},[r,n,t,m]),p=_react.useCallback.call(void 0, ()=>{let{account:C,wallet:x}=m();return{address:C.address,getProvider:()=>x.getProvider(),sendTransaction:(F,q)=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){return or({client:n,account:C,provider:yield x.getProvider()})(F,q)})}},[n,m]),f=_react.useMemo.call(void 0, ()=>_jssdkcore.createCardSignUp.call(void 0, {client:n,environment:e,walletId:o,chainId:t,asset:r,platform:{openHostedPage:_chunkDBIA42HBjs.W,resolveSpendApproval:c,resolveEvmWallet:p,setStep:_chunkDBIA42HBjs._}}),[n,e,o,t,r,c,p]),S=_react.useCallback.call(void 0, ()=>{let C=_chunkDBIA42HBjs.Y.call(void 0, );C&&f.start(C.signal)},[f]),h=_react.useCallback.call(void 0, ()=>{let C=_chunkDBIA42HBjs.Y.call(void 0, );C&&f.acceptDisclosure(C.signal)},[f]),v=_react.useCallback.call(void 0, ()=>{let C=_chunkDBIA42HBjs.Y.call(void 0, );C&&f.acceptBankTerms(C.signal)},[f]),I=_react.useCallback.call(void 0, ()=>{let C=_chunkDBIA42HBjs.Y.call(void 0, );C&&f.proceed(C.signal)},[f]),_=_react.useCallback.call(void 0, ()=>{let C=_chunkDBIA42HBjs.Y.call(void 0, );C&&f.approve(C.signal)},[f]),T=_react.useCallback.call(void 0, ()=>{let C=_chunkDBIA42HBjs.Y.call(void 0, );C&&f.retry(C.signal)},[f]);return _react.useEffect.call(void 0, ()=>{let C=_chunkDBIA42HBjs.Y.call(void 0, );C&&f.load(C.signal)},[f]),{start:S,acceptDisclosure:h,acceptBankTerms:v,proceed:I,approve:_,retry:T}}function ni(){let e=_chunkDBIA42HBjs.X.call(void 0, );return e?qt.default.createElement(uc,_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},e.options),{step:e.step,onSuccess:e.onSuccess,onFailure:e.onFailure})):null}function uc(e){let{environment:o,walletId:t,chainId:r,asset:i,step:n,onSuccess:s,onFailure:l}=e,u=e.environment==="production"?e.spendApproval:void 0,d=_chunkV3WU67WLjs.o.call(void 0, ),{start:a,acceptDisclosure:m,acceptBankTerms:c,proceed:p,approve:f,retry:S}=ri({environment:o,walletId:t,chainId:r,asset:i,spendApproval:u}),h=d.app.getConfig(),v=(h==null?void 0:h.name)||void 0,I=(h==null?void 0:h.legal_name)||v,_=_jssdkcore.getCardAssetDisplayName.call(void 0, i),T=()=>_jssdkcore.handleSignUpClose.call(void 0, {step:n,onSuccess:s,onFailure:l}),C=()=>{var x,k;switch(n.status){case"loading":return qt.default.createElement(Oe,null);case"get-started":return qt.default.createElement(ve,{footer:qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Get started",onPress:a,loading:n.pending})},qt.default.createElement(Pe,{Icon:_chunkDBIA42HBjs.q}),qt.default.createElement(Me,{title:v?`Create ${v} card`:"Create card",subtitle:v?`Complete a few quick steps to set up your ${v} card.`:"Complete a few quick steps to set up your card."}),qt.default.createElement(gt,{items:["Review required agreements","Provide your information","Verify your identity"]}));case"disclosure-prompt":return qt.default.createElement(Uo,{Icon:_chunkDBIA42HBjs.v,title:"Accept electronic disclosures",subtitle:qt.default.createElement(Ze,null,"Review and accept the"," ",qt.default.createElement(er,{url:n.disclosureUrl},"Electronic Disclosure Statement")," to receive and sign card documents electronically."),cta:"Accept and continue",onPress:m});case"accepting-disclosure":return qt.default.createElement(Je,{title:"Accepting disclosures",subtitle:"This will only take a moment."});case"bank-terms-prompt":{let F=n.bankInfo.name;return qt.default.createElement(Uo,{Icon:_chunkDBIA42HBjs.w,title:"Review card agreements",subtitle:qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(Ze,null,`${I!=null?I:"This app"} uses a wallet provided by Privy. ${F} issues the card, and Bridge manages the card program.`),qt.default.createElement(Ze,null,"By tapping Accept and continue, you agree to the"," ",pc(n.bankInfo.agreements),".")),cta:"Accept and continue",onPress:c})}case"accepting-bank-terms":return qt.default.createElement(Je,{title:"Accepting agreements",subtitle:"This will only take a moment."});case"provider-terms-prompt":return qt.default.createElement(Uo,{Icon:_chunkDBIA42HBjs.w,title:"Review card program terms",subtitle:"Open the card program terms to review and accept them.",cta:"Accept and continue",pending:n.pending,onPress:p});case"accepting-provider-terms":return qt.default.createElement(Je,{title:"Review card program terms",subtitle:"Finish reviewing the card program terms in the browser to continue."});case"kyc-prompt":return qt.default.createElement(Uo,{title:"Verify your identity",subtitle:"Open the verification flow to confirm your identity.",cta:"Verify identity",pending:n.pending,onPress:p});case"verifying-identity":return qt.default.createElement(Je,{title:"Verify your identity",subtitle:"Finish verifying your identity in the browser to continue."});case"pending":return qt.default.createElement(Je,{title:"Finishing up",subtitle:"We're getting your account ready. This can take a moment."});case"under-review":return qt.default.createElement(yo,{Icon:_chunkDBIA42HBjs.G,title:"Identity under review",subtitle:"Your identity information is being reviewed. You can close this sign up and check back later to finish.",cta:"Done",secondary:!0,onPress:T});case"creating-card":return qt.default.createElement(Je,{title:"Creating your card",subtitle:"Hang tight while we finish creating your card."});case"approve-prompt":{let{vaultProvider:F}=n;return qt.default.createElement(ve,{footer:qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Approve and continue",onPress:f,loading:n.pending})},qt.default.createElement(Pe,{Icon:F?_chunkDBIA42HBjs.f:_chunkDBIA42HBjs.q}),qt.default.createElement(Me,{title:F?"Spend from your Earn balance":"Approve card spending",subtitle:F?"Keep funds in Earn until they're needed for a card purchase.":`Sign a one-time approval to let your card spend from your selected ${_} balance.`}),qt.default.createElement(ti,{symbol:_,vaultProvider:F}))}case"ready":{let F=n.cardId;return qt.default.createElement(yo,{Icon:_chunkDBIA42HBjs.g,accent:!0,title:"Your card is ready",subtitle:"Your card has been created and is ready to use.",cta:"Continue",onPress:()=>s({id:F})})}case"rejected":return qt.default.createElement(yo,{title:"We couldn't verify your identity",subtitle:(x=n.reason)!=null?x:"Your card application could not be approved.",cta:"Done",secondary:!0,onPress:T});case"approve-error":return qt.default.createElement(yo,{title:"Spend approval failed",subtitle:"We couldn't approve card spending. Tap below to try again.",cta:"Try again",onPress:f});case"error":return qt.default.createElement(yo,{title:"Something went wrong",subtitle:(k=n.message)!=null?k:"We couldn't set up your card. Please try again.",cta:"Try again",onPress:S});default:return null}};return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{close:T}),o==="sandbox"?qt.default.createElement(_reactnative.View,{style:fc.banner},qt.default.createElement(_chunkDBIA42HBjs.S,{variant:"info"},qt.default.createElement(_chunkDBIA42HBjs.T,null,"In sandbox mode using test funds"))):null,C())}function pc(e){return e.map((o,t)=>{let r=t===e.length-1,i=t===0?"":r?`${e.length>2?",":""} and `:", ";return qt.default.createElement(_react.Fragment,{key:o.id},i,qt.default.createElement(er,{url:o.url||void 0},o.name))})}var fc=_reactnative.StyleSheet.create({banner:{paddingHorizontal:24}});var Sc=28,wc=24,ii=({close:e,style:o})=>{let{colors:t}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:[Cc.slimNavigationBar,o]},e&&qt.default.createElement(_reactnative.Pressable,{onPress:e},qt.default.createElement(_chunkDBIA42HBjs.m,{color:t.icon,size:wc})))},Cc=_reactnative.StyleSheet.create({slimNavigationBar:{height:Sc,paddingBottom:4,flexDirection:"row",justifyContent:"flex-end",backgroundColor:"transparent"}});var O=({title:e="Error!",subtitle:o="Something went wrong."})=>{let{colors:t}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:Mc.container},qt.default.createElement(_chunkDBIA42HBjs.m,{size:74,color:t.error}),qt.default.createElement(A,{title:e,subtitle:o,tight:!0}))},Mc=_reactnative.StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:16}});var Y=({title:e="Success!",subtitle:o})=>{let{colors:t}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:xc.container},qt.default.createElement(_reactnativesvg2.default,{height:"74",width:"74",viewBox:"0 0 74 74"},qt.default.createElement(_reactnativesvg.Circle,{cx:"37",cy:"37",r:"36.8",fill:t.successLight}),qt.default.createElement(_reactnativesvg.G,{transform:"translate(18, 18)"},qt.default.createElement(_chunkDBIA42HBjs.k,{size:38,color:t.success}))),qt.default.createElement(A,{title:e,subtitle:o,tight:!0}))},xc=_reactnative.StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:16}});var Ac=e=>ir.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",x:0,y:0,baseProfile:"tiny",viewBox:"0 0 512 210.2"},e),ir.createElement(_reactnativesvg.Path,{d:"M93.6 27.1C87.6 34.2 78 39.8 68.4 39c-1.2-9.6 3.5-19.8 9-26.1 6-7.3 16.5-12.5 25-12.9 1 10-2.9 19.8-8.8 27.1m8.7 13.8c-13.9-.8-25.8 7.9-32.4 7.9-6.7 0-16.8-7.5-27.8-7.3-14.3.2-27.6 8.3-34.9 21.2-15 25.8-3.9 64 10.6 85 7.1 10.4 15.6 21.8 26.8 21.4 10.6-.4 14.8-6.9 27.6-6.9 12.9 0 16.6 6.9 27.8 6.7 11.6-.2 18.9-10.4 26-20.8 8.1-11.8 11.4-23.3 11.6-23.9-.2-.2-22.4-8.7-22.6-34.3-.2-21.4 17.5-31.6 18.3-32.2-10-14.8-25.6-16.4-31-16.8m80.3-29v155.9h24.2v-53.3h33.5c30.6 0 52.1-21 52.1-51.4s-21.1-51.2-51.3-51.2zm24.2 20.4h27.9c21 0 33 11.2 33 30.9s-12 31-33.1 31h-27.8zM336.6 169c15.2 0 29.3-7.7 35.7-19.9h.5v18.7h22.4V90.2c0-22.5-18-37-45.7-37-25.7 0-44.7 14.7-45.4 34.9h21.8c1.8-9.6 10.7-15.9 22.9-15.9 14.8 0 23.1 6.9 23.1 19.6v8.6l-30.2 1.8c-28.1 1.7-43.3 13.2-43.3 33.2 0 20.2 15.7 33.6 38.2 33.6m6.5-18.5c-12.9 0-21.1-6.2-21.1-15.7 0-9.8 7.9-15.5 23-16.4l26.9-1.7v8.8c0 14.6-12.4 25-28.8 25m82 59.7c23.6 0 34.7-9 44.4-36.3L512 54.7h-24.6l-28.5 92.1h-.5l-28.5-92.1h-25.3l41 113.5-2.2 6.9c-3.7 11.7-9.7 16.2-20.4 16.2-1.9 0-5.6-.2-7.1-.4v18.7c1.4.4 7.4.6 9.2.6"})),si=Ac;var _c=e=>Qe.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",x:0,y:0,viewBox:"0 0 80 38.1"},e),Qe.createElement(_reactnativesvg.Path,{d:"M37.8 19.7V29h-3V6h7.8c1.9 0 3.7.7 5.1 2 1.4 1.2 2.1 3 2.1 4.9s-.7 3.6-2.1 4.9-3.1 2-5.1 2zm0-10.9v8h5c1.1 0 2.2-.4 2.9-1.2 1.6-1.5 1.6-4 .1-5.5l-.1-.1c-.8-.8-1.8-1.3-2.9-1.2zM56.7 12.8c2.2 0 3.9.6 5.2 1.8s1.9 2.8 1.9 4.8V29H61v-2.2h-.1c-1.2 1.8-2.9 2.7-4.9 2.7-1.7 0-3.2-.5-4.4-1.5-1.1-1-1.8-2.4-1.8-3.9q0-2.4 1.8-3.9c1.2-1 2.9-1.4 4.9-1.4 1.8 0 3.2.3 4.3 1v-.7c0-1-.4-2-1.2-2.6-.8-.7-1.8-1.1-2.9-1.1q-2.55 0-3.9 2.1l-2.6-1.6c1.6-2.1 3.7-3.1 6.5-3.1m-3.8 11.4c0 .8.4 1.5 1 1.9.7.5 1.5.8 2.3.8 1.2 0 2.4-.5 3.3-1.4 1-.9 1.5-2 1.5-3.2-.9-.7-2.2-1.1-3.9-1.1q-1.8 0-3 .9-1.2.75-1.2 2.1M80 13.3 70.1 36h-3l3.7-7.9-6.5-14.7h3.2l4.7 11.3h.1l4.6-11.3H80z",style:{fill:"#5f6368"}}),Qe.createElement(_reactnativesvg.Path,{d:"M25.9 17.7c0-.9-.1-1.8-.2-2.7H13.2v5.1h7.1c-.3 1.6-1.2 3.1-2.6 4v3.3H22c2.5-2.3 3.9-5.7 3.9-9.7",style:{fill:"#4285f4"}}),Qe.createElement(_reactnativesvg.Path,{d:"M13.2 30.6c3.6 0 6.6-1.2 8.8-3.2l-4.3-3.3c-1.2.8-2.7 1.3-4.5 1.3-3.4 0-6.4-2.3-7.4-5.5H1.4v3.4c2.3 4.5 6.8 7.3 11.8 7.3",style:{fill:"#34a853"}}),Qe.createElement(_reactnativesvg.Path,{d:"M5.8 19.9c-.6-1.6-.6-3.4 0-5.1v-3.4H1.4c-1.9 3.7-1.9 8.1 0 11.9z",style:{fill:"#fbbc04"}}),Qe.createElement(_reactnativesvg.Path,{d:"M13.2 9.4c1.9 0 3.7.7 5.1 2l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4-5 0-9.6 2.8-11.8 7.3l4.4 3.4c.9-3.2 3.9-5.5 7.3-5.5",style:{fill:"#ea4335"}})),ai=_c;function ko({method:e}){let{colors:o}=_chunkDBIA42HBjs.b.call(void 0, );switch(e){case"card":return qt.default.createElement(_chunkDBIA42HBjs.q,{size:24,color:o.icon});case"exchange":return qt.default.createElement(_chunkDBIA42HBjs.d,{size:24,color:o.icon});case"payment-request":return _reactnative.Platform.OS==="ios"?qt.default.createElement(si,{height:70,width:33}):qt.default.createElement(ai,{height:70,width:33});case"manual":return qt.default.createElement(_chunkDBIA42HBjs.C,{size:24,color:o.icon});default:return null}}function ci({appName:e,methods:o,onMethodSelected:t,onSwitchProvider:r}){let{colors:i}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.ScrollView,{style:sr.scrollView,contentContainerStyle:sr.container},qt.default.createElement(_reactnative.View,{style:{gap:32}},qt.default.createElement(A,{title:"Add funds",subtitle:`Select a method for funding your ${e?`${e} `:""}wallet.`}),qt.default.createElement(_reactnative.View,{style:sr.listContainer},o.includes("card")&&qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Debit card",LeftIcon:qt.default.createElement(ko,{method:"card"}),RightIcon:o.includes("payment-request")?qt.default.createElement(ko,{method:"payment-request"}):void 0,onPress:()=>t("card"),variant:"secondary"}),o.includes("exchange")&&qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Transfer from an exchange",LeftIcon:qt.default.createElement(ko,{method:"exchange"}),onPress:()=>t("exchange"),variant:"secondary"}),qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Receive funds",LeftIcon:qt.default.createElement(ko,{method:"manual"}),onPress:()=>t("manual"),variant:"secondary"}),!!r&&qt.default.createElement(_reactnative.Pressable,{onPress:r},qt.default.createElement(_chunkDBIA42HBjs.S,{variant:"info",style:{borderWidth:1}},qt.default.createElement(_chunkDBIA42HBjs.y,{size:16,color:i.iconInformation}),qt.default.createElement(_chunkDBIA42HBjs.T,null,"Having trouble facing location restrictions?"," ",qt.default.createElement(_reactnative.Text,{style:{color:i.interactive}},"Try a different provider.")))))),qt.default.createElement(V,null))}var sr=_reactnative.StyleSheet.create({scrollView:{flex:1},container:{paddingHorizontal:16,justifyContent:"space-between",flex:1},listContainer:{gap:16,alignSelf:"stretch"}});function di({uri:e,goBackRef:o}){let t=_react.useRef.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{e&&!t.current&&(t.current=!0,mi.openBrowserAsync(e,{createTask:!1}).catch(r=>{console.warn("[Privy] Funding flow error",r)}).finally(()=>{var r;(r=o==null?void 0:o.current)==null||r.call(o)}))},[e,o]),qt.default.createElement(Oe,null)}var _reactnativeqrcodestyled = require('react-native-qrcode-styled'); var _reactnativeqrcodestyled2 = _interopRequireDefault(_reactnativeqrcodestyled);var _expoclipboard = require('expo-clipboard'); var yi = _interopRequireWildcard(_expoclipboard); var Ws = _interopRequireWildcard(_expoclipboard);function ui({children:e,style:o}){let{colors:t}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.Text,{style:[Kc.badge,{backgroundColor:t.backgroundHighlight,color:t.textHighlight},o]},e)}var Kc=_reactnative.StyleSheet.create({badge:{fontSize:12,lineHeight:18,paddingHorizontal:8,paddingVertical:2,borderRadius:6,flexGrow:0}});function pi({children:e,stopped:o}){let t=_reactnative.useAnimatedValue.call(void 0, 1);return _react.useEffect.call(void 0, ()=>{let r=_reactnative.Animated.loop(_reactnative.Animated.sequence([_reactnative.Animated.timing(t,{toValue:.3,duration:800,useNativeDriver:!0}),_reactnative.Animated.timing(t,{toValue:1,duration:800,useNativeDriver:!0})]));return!o&&r.start(),()=>(r.stop(),r.reset())},[t,o]),qt.default.createElement(_reactnative.Animated.View,{style:{opacity:t}},e)}function hi({address:e,balance:o,currencySymbol:t,isLoading:r}){let{colors:i}=_chunkDBIA42HBjs.b.call(void 0, ),[n,s]=_react.useState.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{if(n){let l=setTimeout(()=>s(!1),2e3);return()=>clearTimeout(l)}},[n]),qt.default.createElement(_reactnative.Pressable,{style:[ar.container,{borderColor:i.border}],onPress:()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){yi.setStringAsync(e),s(!0)})},qt.default.createElement(_reactnative.View,null,qt.default.createElement(_reactnative.Text,{style:[ar.title,{color:i.textMuted}]},"Your wallet"),qt.default.createElement(_reactnative.View,{style:{flexDirection:"row",gap:10,alignItems:"center"}},qt.default.createElement(_reactnative.Text,{style:[ar.walletAddress,{color:i.text}]},_jssdkcore.formatWalletAddress.call(void 0, e)),n?qt.default.createElement(_chunkDBIA42HBjs.g,{size:14,color:i.textMuted}):qt.default.createElement(_chunkDBIA42HBjs.p,{size:14,color:i.textMuted}))),qt.default.createElement(pi,{stopped:!r},qt.default.createElement(ui,{style:{minWidth:50}},r?"":`${o} ${t}`)))}var ar=_reactnative.StyleSheet.create({container:{paddingHorizontal:16,paddingVertical:12,borderRadius:10,borderWidth:1,borderStyle:"solid",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},title:{fontSize:12,lineHeight:18},walletAddress:{fontSize:14,lineHeight:22,fontFamily:_chunkDBIA42HBjs.R.medium}});var nm=e=>Ct.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:40,height:40,viewBox:"0 0 59 59",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),Ct.createElement(_reactnativesvg.G,{fill:e.color},Ct.createElement(_reactnativesvg.Path,{d:"M28.746.016a30 30 0 0 0-1.383.09 22.75 22.75 0 0 0-12.12 4.886A22.78 22.78 0 0 0 6.73 20.805c-.062.71-.082 1.168-.082 2.058s.02 1.344.082 2.067a22.75 22.75 0 0 0 5.48 12.886 23 23 0 0 0 6.185 5.028 28 28 0 0 0 2.136 1.047 22.8 22.8 0 0 0 6.867 1.726c1.372.13 2.809.13 4.18 0a22.76 22.76 0 0 0 10.457-3.652 23 23 0 0 0 5.024-4.488A22.7 22.7 0 0 0 52.188 25.5c.199-1.73.199-3.617-.008-5.355a22.8 22.8 0 0 0-5.211-12.012 25 25 0 0 0-2.75-2.75 23 23 0 0 0-7.36-4.16C34.934.57 33.11.207 31.02.059a32 32 0 0 0-2.273-.043M27.191 52.469c-7.043.222-12.539 1.433-13.238 2.918a.64.64 0 0 0-.07.336c0 .164.008.199.078.34.691 1.41 5.707 2.574 12.34 2.867 5.933.265 12.164-.235 15.754-1.266 1.691-.488 2.675-1.02 2.968-1.613a.56.56 0 0 0 .07-.328c0-.266-.081-.438-.335-.688-.223-.222-.488-.398-.88-.594-2.148-1.062-6.726-1.804-12.218-1.976-.84-.024-3.605-.024-4.469.004m0 0",fillRule:"nonzero"}))),Si=nm;var G=_zustand.create.call(void 0, )((e,o)=>({config:null,promiseResolvers:null,screen:null,setScreen:t=>e({screen:t}),method:null,setMethod:t=>{var r;if(!t&&((r=o().config)!=null&&r.paymentOptions.length)){e({method:null,screen:"method-selection",providerLink:null,moonpayTransactionId:null,coinbasePartnerUserId:null,error:null});return}if(t==="manual"){e({method:t,screen:"manual-funding"});return}e({method:t,screen:"provider-funding"})},providerLink:null,setProviderLink:t=>{e({providerLink:t})},moonpayTransactionId:null,setMoonpayTransactionId:t=>{e({moonpayTransactionId:t})},coinbasePartnerUserId:null,setCoinbasePartnerUserId:t=>{e({coinbasePartnerUserId:t})},provider:"coinbase",switchProvider:()=>{let t=o().provider==="coinbase"?"moonpay":"coinbase";return e({provider:t}),t},error:null,setError:t=>{e({error:t,screen:"error"})},reset:()=>e({config:null,method:null,screen:null,providerLink:null,moonpayTransactionId:null,coinbasePartnerUserId:null,error:null}),startFundingFlow:t=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){return go(r=>{_chunkDBIA42HBjs.N.call(void 0, ),e({config:t,promiseResolvers:r,method:t.paymentOptions.length?null:"manual",screen:t.paymentOptions.length?"method-selection":"manual-funding"})})}),endFundingFlow:()=>{var t;(t=o().promiseResolvers)==null||t.resolve(),o().reset()},exitFundingFlow:()=>{var t;(t=o().promiseResolvers)==null||t.reject(new (0, _chunkDBIA42HBjs.L)("funding_flow_cancelled","Funding flow was cancelled")),o().reset()}})),De=()=>G(e=>e.config),wi=()=>[G(e=>e.screen),G(e=>e.setScreen)],Ci=()=>[G(e=>e.method),G(e=>e.setMethod)],vi=()=>[G(e=>e.providerLink),G(e=>e.setProviderLink)],Pi=()=>[G(e=>e.moonpayTransactionId),G(e=>e.setMoonpayTransactionId)],Mi=()=>[G(e=>e.coinbasePartnerUserId),G(e=>e.setCoinbasePartnerUserId)],Ii=()=>[G(e=>e.provider),G(e=>e.switchProvider)],Ei=()=>[G(e=>e.error),G(e=>e.setError)],vt=()=>G(e=>e.startFundingFlow),bi=()=>G(e=>e.endFundingFlow),Fi=()=>G(e=>e.exitFundingFlow),Ne=G.setState;function Pt(e){var o;return(o=e.tokenInfo)!=null&&o.symbol?e.tokenInfo.symbol:e.chainType==="solana"?"SOL":e.chain.nativeCurrency.symbol}function Ti(r){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({chain:e,walletAddress:o,erc20Address:t}){return yield _viem.createPublicClient.call(void 0, {chain:e,transport:_viem.http.call(void 0, )}).readContract({address:t,abi:lm,functionName:"balanceOf",args:[o]})})}var lm=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];var ki=5e3;function _i({fundingUiConfig:e,onFunded:o}){let t=fm({enabled:e.chainType==="ethereum",fundingUiConfig:e,onFunded:o}),r=gm({enabled:e.chainType==="solana",fundingUiConfig:e,onFunded:o});return e.chainType==="ethereum"?t:r}function fm({enabled:e,fundingUiConfig:{address:o,chain:t,tokenInfo:r},onFunded:i}){let[n,s]=_react.useState.call(void 0, null),[l,u]=_react.useState.call(void 0, !1),d=_react.useMemo.call(void 0, ()=>{if(!(!e||!t))return _viem.createPublicClient.call(void 0, {chain:t,transport:_viem.http.call(void 0, )})},[t,e]),a=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){if(!(!e||!o||!d))try{return u(!0),r!=null&&r.address?yield Ti({walletAddress:o,erc20Address:r.address,chain:t}):yield d.getBalance({address:o})}catch(m){console.error(m)}finally{u(!1)}}),[d,o,r==null?void 0:r.address,t,e]);return _react.useEffect.call(void 0, ()=>{if(n==null&&a().then(m=>m!=null&&s(m)),i){let m=setInterval(()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){let c=yield a();c!=null&&(s(c),n!=null&&c>n&&i())}),ki);return()=>clearInterval(m)}},[a,n,i]),{balance:n,isLoading:l&&n==null,formattedBalance:r?_jssdkcore.formatTokenAmount.call(void 0, {amount:n!=null?n:BigInt(0),decimals:r.decimals}):_jssdkcore.formatWeiAmount.call(void 0, {wei:n!=null?n:BigInt(0)})}}function gm({enabled:e,fundingUiConfig:{address:o,cluster:t,tokenInfo:r},onFunded:i}){let[n,s]=_react.useState.call(void 0, null),[l,u]=_react.useState.call(void 0, !1),d=_react.useMemo.call(void 0, ()=>{if(!(!e||!t))return new (0, _jssdkcore.SolanaClient)(t)},[e,t]),a=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){if(!(!e||!o||!d))try{if(u(!0),r!=null&&r.address){let m=yield d.getTokenAccountsByOwner(o,r.address);return m==null?void 0:m.amount}else return yield d.getBalance(o)}catch(m){console.error(m)}finally{u(!1)}}),[o,d,e,r==null?void 0:r.address]);return _react.useEffect.call(void 0, ()=>{if(n==null&&a().then(m=>m!=null&&s(m)),i){let m=setInterval(()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){let c=yield a();c!=null&&(s(c),n!=null&&c>n&&i())}),ki);return()=>clearInterval(m)}},[a,n,i]),{balance:n,isLoading:l&&n==null,formattedBalance:r!=null&&r.address?_jssdkcore.formatTokenAmount.call(void 0, {amount:n!=null?n:BigInt(0),decimals:r.decimals}):_jssdkcore.formatLamportsAmount.call(void 0, {lamports:n!=null?n:BigInt(0)})}}function Bi({onFunded:e}){let o=De(),{colors:t}=_chunkDBIA42HBjs.b.call(void 0, );if(!o)throw new Error("Invalid funding config");let r=o.chainType==="ethereum"?o.chain.name:_jssdkcore.getSolanaClusterDisplayName.call(void 0, o.cluster.name),i=Pt(o),{formattedBalance:n,isLoading:s}=_i({fundingUiConfig:o,onFunded:e});return qt.default.createElement(_reactnative.View,{style:cr.container},qt.default.createElement(_reactnative.View,{style:{gap:28}},qt.default.createElement(A,{title:"Receive funds",subtitle:`Scan or copy your wallet address to receive funds on ${r}.`}),qt.default.createElement(_reactnative.View,{style:cr.qrContainer},qt.default.createElement(_reactnativeqrcodestyled2.default,{data:o.address,pieceSize:8,errorCorrectionLevel:"Q",pieceBorderRadius:2,isPiecesGlued:!0,color:t.text}),qt.default.createElement(_reactnative.View,{style:[cr.logoContainer,{backgroundColor:t.background}]},qt.default.createElement(Si,{height:40,width:40,color:t.privyBrand}))),qt.default.createElement(_reactnative.View,{style:{gap:12}},qt.default.createElement(_chunkDBIA42HBjs.S,{variant:"info"},qt.default.createElement(_chunkDBIA42HBjs.y,{size:16,color:t.iconInformation}),qt.default.createElement(_chunkDBIA42HBjs.T,null,"Make sure to send on ",r,".")),qt.default.createElement(hi,{address:o.address,currencySymbol:i,balance:n,isLoading:s}))),qt.default.createElement(V,null))}var cr=_reactnative.StyleSheet.create({container:{paddingHorizontal:16,justifyContent:"space-between",flex:1},qrContainer:{justifyContent:"center",alignItems:"center"},logoContainer:{position:"absolute",width:56,height:56,justifyContent:"center",alignItems:"center"}});function So(i){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({config:e,method:o,client:t,provider:r}){var n,s,l,u,d,a;if(Ne({method:o}),o==="manual"){Ne({screen:"manual-funding"});return}Ne({screen:"provider-funding"});try{let m=e.paymentOptions.find(c=>c.method===o&&c.provider===r)||e.paymentOptions.find(c=>c.method===o);if((m==null?void 0:m.provider)==="moonpay"){let c;e.chainType==="ethereum"?c=_jssdkcore.chainToMoonpayCurrency.call(void 0, e.chain.id,((n=e.tokenInfo)==null?void 0:n.symbol)==="USDC"?"USDC":"native-currency"):c=((s=e.tokenInfo)==null?void 0:s.symbol)==="USDC"?"USDC_SOL":"SOL";let p=yield t.funding.moonpay.sign({address:e.address,config:{currencyCode:c,paymentMethod:_jssdkcore.fundingMethodToMoonpayPaymentMethod.call(void 0, o),quoteCurrencyAmount:parseFloat(e.amount),uiConfig:_chunkC5WYSLQFjs.b.call(void 0, {accentColor:Im},(l=e.moonpay)==null?void 0:l.uiConfig)},useSandbox:!!((u=e.moonpay)!=null&&u.useSandbox)});Ne({providerLink:p.signedUrl,moonpayTransactionId:p.externalTransactionId});return}if((m==null?void 0:m.provider)==="coinbase"){let c,p;e.chainType==="ethereum"?(c=_jssdkcore.toCoinbaseAssetId.call(void 0, e.chain.id,((d=e.tokenInfo)==null?void 0:d.symbol)==="USDC"?"USDC":"native-currency"),p=_jssdkcore.toCoinbaseBlockchainFromChainId.call(void 0, e.chain.id)):(c=((a=e.tokenInfo)==null?void 0:a.symbol)==="USDC"?"USDC":"SOL",p="solana");let f=yield t.funding.coinbase.initOnRampSession({addresses:[{address:e.address,blockchains:[p]}],assets:[c]}),S=_jssdkcore.getCoinbaseOnRampUrl.call(void 0, {appId:t.app.appId,input:f,amount:e.amount,blockchain:p,asset:c,experience:o==="exchange"?"send":"buy"});Ne({providerLink:S.url.toString(),coinbasePartnerUserId:f.partner_user_id});return}Ne({error:new (0, _chunkDBIA42HBjs.L)("failed_to_fetch_funding_provider_uri","A provider for this funding flow couldn't be found")})}catch(m){console.error(m),Ne({error:new (0, _chunkDBIA42HBjs.L)("failed_to_fetch_funding_provider_uri","A provider for this funding flow couldn't be found")})}})}var Im="#110F2A";var Fm=3e3,Tm=["success","failure"];function Wi({onSuccess:e,onError:o}){var u;let t=_chunkV3WU67WLjs.o.call(void 0, ),r=De(),[i]=Mi(),[n,s]=_react.useState.call(void 0, "pending"),l=_react.useRef.call(void 0, 0);_react.useEffect.call(void 0, ()=>{s("pending")},[i]),_react.useEffect.call(void 0, ()=>{if(!i||Tm.includes(n))return;let d=setInterval(()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{let a=yield t.funding.coinbase.getStatus(i);if(!(a!=null&&a.status))return;s(a.status),l.current=0}catch(a){console.error(a),l.current+=1,l.current>=3&&s("failure")}}),Fm);return()=>clearInterval(d)},[n,i,t,(u=r==null?void 0:r.moonpay)==null?void 0:u.useSandbox]),_react.useEffect.call(void 0, ()=>{n==="success"?e({status:n}):n==="failure"&&o({status:n})},[n,e,o])}var Am=3e3,km=["completed","failed","serviceFailure"];function Oi({onSuccess:e,onError:o}){var u;let t=_chunkV3WU67WLjs.o.call(void 0, ),r=De(),[i]=Pi(),[n,s]=_react.useState.call(void 0, "pending"),l=_react.useRef.call(void 0, 0);_react.useEffect.call(void 0, ()=>{s("pending")},[i]),_react.useEffect.call(void 0, ()=>{if(!i||km.includes(n))return;let d=setInterval(()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){var a,m;try{let c=yield t.funding.moonpay.getTransactionStatus({transactionId:i,useSandbox:!!((a=r==null?void 0:r.moonpay)!=null&&a.useSandbox)});if(!(c!=null&&c.status))return;if(s(c.status),l.current=0,c.status==="completed"){let p=(m=c.getValidQuote)==null?void 0:m.quoteCurrencyAmount;e({status:"completed",amount:p?String(p):void 0})}else c.status==="failed"||c.status}catch(c){if(c instanceof _jssdkcore.MoonpayApiError&&c.response.status===404)return;console.error(c),l.current>=3&&(s("serviceFailure"),o({status:"serviceFailure"}))}}),Am);return()=>clearInterval(d)},[n,i,t,(u=r==null?void 0:r.moonpay)==null?void 0:u.useSandbox,e,o])}function Ni({config:e,goBackRef:o}){let t=_chunkV3WU67WLjs.o.call(void 0, ),[r,i]=wi(),n=Fi(),s=bi(),[l,u]=Ci(),[d,a]=Ii(),[m]=vi(),[c,p]=Ei(),[f,S]=_react.useState.call(void 0, ),[h,v]=_react.useState.call(void 0, !1),[I,_]=_react.useState.call(void 0, ),T=_react.useMemo.call(void 0, ()=>Array.from(new Set(e.paymentOptions.map(({method:U})=>U))),[e.paymentOptions]),C=_react.useMemo.call(void 0, ()=>e.paymentOptions.filter(U=>U.method===f),[e.paymentOptions,f]);function x(U,qe){return _chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){U!==f&&S(U),yield So({method:U,provider:(()=>{var Mo,Io;return qe||(U==="card"&&(Io=(Mo=e.card)==null?void 0:Mo.preferredProvider)!=null?Io:d)})(),client:t,config:e})})}function k(){if(!f)return;let U=a();x(f,U)}let F=_react.useCallback.call(void 0, ()=>{i("success");let U=setTimeout(()=>s(),5e3);return()=>clearTimeout(U)},[i,s]),q=_react.useCallback.call(void 0, ({amount:U})=>{_(U),i("success");let qe=setTimeout(()=>s(),5e3);return()=>clearTimeout(qe)},[i,s]),ge=_react.useCallback.call(void 0, ()=>{p(new (0, _chunkDBIA42HBjs.L)("provider_transaction_failed","Something went wrong adding funds from Moonpay. Please try again or use another method to fund your wallet."))},[p]),je=_react.useCallback.call(void 0, ()=>{p(new (0, _chunkDBIA42HBjs.L)("provider_transaction_failed","Something went wrong adding funds from Coinbase. Please try again or use another method to fund your wallet."))},[p]);switch(Oi({onSuccess:q,onError:ge}),Wi({onSuccess:q,onError:je}),_react.useEffect.call(void 0, ()=>(o.current=()=>{if(r==="method-selection"){n();return}if(r==="manual-funding"&&!e.paymentOptions.length){n();return}if(e.defaultPaymentMethod!==void 0){n();return}l!=="manual"&&l!=null&&(v(!0),S(l)),u(null)},()=>{o.current=null}),[r,o,l,u,n,e]),r){case"method-selection":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{goBack:()=>{var U;return(U=o==null?void 0:o.current)==null?void 0:U.call(o)}}),qt.default.createElement(ci,{appName:e.appName,methods:T,onMethodSelected:x,onSwitchProvider:h&&C.length>1?k:void 0}));case"manual-funding":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{goBack:()=>{var U;return(U=o==null?void 0:o.current)==null?void 0:U.call(o)},close:()=>s()}),qt.default.createElement(Bi,{onFunded:F}));case"provider-funding":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(ii,{close:()=>{var U;return(U=o==null?void 0:o.current)==null?void 0:U.call(o)},style:{paddingRight:23}}),qt.default.createElement(di,{uri:m,goBackRef:o}));case"success":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{close:()=>s()}),qt.default.createElement(Y,{subtitle:`You\u2019ve successfully added ${I?`${I} `:""}${Pt(e)} to your ${e.appName?`${e.appName} `:""}wallet. It may take a minute before the funds are available to use.`}));case"error":default:return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{goBack:()=>{var U;return(U=o==null?void 0:o.current)==null?void 0:U.call(o)}}),qt.default.createElement(O,{title:"Something went wrong",subtitle:(c==null?void 0:c.message)||"Please try again."}))}}var oe=_zustand.create.call(void 0, )(()=>({walletUIConfig:null,walletPromiseResolvers:null,suspendedWalletFlow:null})),Hi=e=>{if(!oe.getState().walletPromiseResolvers)throw new Error("Internal PrivyElements error");oe.setState({walletUIConfig:e})},zi=1e3*60*5;var Wo=e=>{var t,r,i,n;let o=oe.getState();if(e.completion){if(o.walletPromiseResolvers===e.completion){let s=o.suspendedWalletFlow;oe.setState({walletUIConfig:(t=s==null?void 0:s.config)!=null?t:null,walletPromiseResolvers:(r=s==null?void 0:s.completion)!=null?r:null,suspendedWalletFlow:null})}else if(((i=o.suspendedWalletFlow)==null?void 0:i.completion)===e.completion)oe.setState({walletUIConfig:null,walletPromiseResolvers:null,suspendedWalletFlow:null}),(n=o.walletPromiseResolvers)==null||n.reject("error"in e?e.error:new (0, _chunkDBIA42HBjs.L)("ui_flow_closed","The parent wallet flow was closed"));else return;"result"in e?e.completion.resolve(e.result):e.completion.reject(e.error)}};var Gi=e=>go(o=>{var n;_chunkDBIA42HBjs.N.call(void 0, );let t=oe.getState(),r=t.suspendedWalletFlow;if(t.walletPromiseResolvers){if(t.suspendedWalletFlow||((n=t.walletUIConfig)==null?void 0:n.type)!=="wallet:signature"||!e.type.startsWith("mfa:enrollment:"))throw new (0, _chunkDBIA42HBjs.L)("existing_ui_flow_in_progress","A wallet flow is already in progress");r={config:t.walletUIConfig,completion:t.walletPromiseResolvers}}let i=st(o,()=>{let s=new (0, _chunkDBIA42HBjs.L)("ui_flow_timeout","The wallet flow timed out");return Wo({completion:i,error:s}),s},zi);oe.setState({walletUIConfig:e,walletPromiseResolvers:i,suspendedWalletFlow:r})});var qi=()=>oe(e=>e.walletUIConfig),Ki=()=>oe.getState().walletUIConfig,he=()=>Gi,te=()=>Hi,z=()=>{let e=oe(o=>o.walletPromiseResolvers);return _react.useCallback.call(void 0, o=>Wo({completion:e,result:o}),[e])},D=()=>{let e=oe(o=>o.walletPromiseResolvers);return _react.useCallback.call(void 0, (o=new (0, _chunkDBIA42HBjs.L)("ui_flow_closed","The wallet flow was closed"))=>Wo({completion:e,error:o}),[e])};function ur(){let{client:e}=_react.useContext.call(void 0, _chunkV3WU67WLjs.na),o=he(),t=te();return{init:_react.useCallback.call(void 0, i=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){var m,c;let n=_chunkV3WU67WLjs.d.call(void 0, );if(!n)throw new Error("User is not logged in");let s=n.linked_accounts.some(({type:p})=>p==="passkey"),l=n.mfa_methods.map(p=>p.type).filter(p=>p!=="email"),u=i.relyingParty||((c=(m=_chunkV3WU67WLjs.a.call(void 0, ))==null?void 0:m.mfa)==null?void 0:c.relyingParty),d=i.mfaMethods;(!s||!u)&&(__DEV__&&i.mfaMethods.includes("passkey")&&(s?u||e.logger.warn("Passkey was included in mfaMethods but removed from enrollment: no relyingParty provided. Set mfa.relyingParty on PrivyProvider or pass it to init()."):e.logger.warn("Passkey was included in mfaMethods but removed from enrollment: user has no linked passkey account. Link a passkey as a login method first.")),d=d.filter(p=>p!=="passkey"));let a={type:"mfa:enrollment:landing",payload:{availableMethods:d,enrolledMfaMethods:l,relyingParty:u}};if(l.length===0){yield o({type:"mfa:enrollment:welcome",payload:{onContinue:()=>t(a),appearance:i.appearance}});return}yield o(a)}),[t,o])}}var Yi=({isMfaUIEnabled:e=!1})=>{let{client:o}=_react.useContext.call(void 0, _chunkV3WU67WLjs.na),t=he(),r=te(),{init:i}=ur(),n=_react.useCallback.call(void 0, u=>{var c,p;let d=(p=(c=_chunkV3WU67WLjs.a.call(void 0, ))==null?void 0:c.mfa)==null?void 0:p.relyingParty,a=Ki(),m=a?r:t;if(u.length===1){let f=u[0];m({type:`mfa:verify:${f}`,payload:{relyingParty:d,ongoingWalletUIFlow:a}});return}m({type:"mfa:verify:landing",payload:{enrolledMfaMethods:u,relyingParty:d,ongoingWalletUIFlow:a}})},[r,t]),s=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){yield o.mfa.verifyMfa()}),[o]),l=_react.useCallback.call(void 0, u=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){var a,m;let d=((m=(a=o.app.getConfig())==null?void 0:a.mfa_methods)!=null?m:[]).filter(c=>c!=="email");if(!d.length)throw u.error;return yield i({mfaMethods:d}),yield o.user.refreshUser()}),[o,i]);_chunkV3WU67WLjs.T.call(void 0, {onMfaRequired:e?n:void 0,onMfaVerificationRequired:e?s:void 0,onMfaEnrollmentRequired:e?l:void 0})};var Gm=1200,Zi=({oauthProvider:e})=>{let{setOAuthState:o}=_react.useContext.call(void 0, _chunkV3WU67WLjs.na),t=We(),r=lt(),{state:i}=_chunkQAUM76HKjs.b.call(void 0, ),{step:n,error:s=null,isNewUser:l=!1}=_react.useMemo.call(void 0, ()=>{var a;switch(i.status){case"initial":return{step:"initial"};case"loading":return{step:"loading"};case"done":return{step:"done",isNewUser:i.isNewUser};case"error":return{step:"error",error:(a=i.error)!=null?a:new Error("Unknown error")}}},[i]);_react.useEffect.call(void 0, ()=>{s instanceof _jssdkcore.PrivyClientError&&s.code==="login_with_oauth_was_cancelled_by_user"&&(o({status:"initial"}),r())},[s,r,o]),_react.useEffect.call(void 0, ()=>{if(n!=="done")return;let a=setTimeout(()=>{t()},Gm);return()=>clearTimeout(a)},[n,t]);let u=Be[e],d=l?"You've successfully created an account.":"Your account is secured.";switch(n){case"initial":case"loading":return qt.default.createElement(Oe,null);case"done":return qt.default.createElement(Y,{subtitle:d});case"error":return qt.default.createElement(O,{title:"Authentication failed",subtitle:jm(s).replace("{provider}",u)})}},jm=_jssdkcore.createErrorFormatter.call(void 0, {linked_to_another_user:"This account has already been linked to another user.",invalid_credentials:"Something went wrong. Try again.",too_many_requests:"Too many requests. Please wait before trying again.",oauth_account_suspended:"Your {provider} account is suspended. Please try another login method.",cannot_link_more_of_type:"You cannot authorize more than one account for this user.",default:"Something went wrong. Please try again."});var Ji=()=>{var o,t;let{logo:e}=(t=(o=at())==null?void 0:o.appearance)!=null?t:{};return e?qt.default.createElement(_reactnative.Image,{source:{uri:e},style:{width:Ym,height:$m,resizeMode:"contain"}}):null},Ym=220,$m=110;var Zm={email:_chunkDBIA42HBjs.A,sms:_chunkDBIA42HBjs.B},Xi=({method:e,onLoginMethodChange:o,preferred:t})=>{let r=Zm[e],{colors:i}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_chunkDBIA42HBjs.c,{LeftIcon:t?null:qt.default.createElement(r,{size:24,color:i.icon}),variant:t?"primary":"secondary",onPress:()=>o(e),title:`Continue with ${Be[e]}`})};var Qm=e=>Et.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 18 22"},e),Et.createElement(_reactnativesvg.Path,{fill:e.color,d:"M9.795 2.375c.72-.928 2.172-1.796 3.198-1.91.325-.036.365-.034.438.036l.066.063-.015.428c-.026.668-.114 1.137-.31 1.642-.197.503-.552 1.083-.83 1.344a7 7 0 0 0-.347.37c-.439.5-1.056.854-1.898 1.088-.315.09-.337.092-.705.09-.444-.002-.507-.015-.54-.094a3 3 0 0 1-.03-.465l-.005-.406.106-.382c.212-.764.456-1.272.872-1.804"}),Et.createElement(_reactnativesvg.Path,{fill:e.color,d:"M9.951 6.208c.965-.363 2.308-.72 2.807-.745a6.8 6.8 0 0 1 1.465.116c.415.083.713.182 1.144.382.69.322 1.277.752 1.743 1.277.348.392.368.443.23.573a1.4 1.4 0 0 1-.235.16c-.15.08-.768.575-.768.616 0 .01-.101.124-.224.247-.406.416-.585.752-.845 1.591-.06.193-.123.447-.14.568-.071.464-.036 1.132.087 1.741.074.37.366.996.656 1.415a4.5 4.5 0 0 0 1.62 1.402c.325.158.509.295.509.382a.4.4 0 0 1-.048.13 1 1 0 0 0-.088.24c-.053.218-.363.94-.557 1.294-.72 1.308-1.434 2.278-2.197 2.986-.749.69-1.45.999-2.175.955-.5-.029-.975-.145-1.65-.406-.56-.215-.777-.283-.991-.312-.106-.014-.303-.043-.434-.063-.383-.06-.635-.065-.907-.01-.907.18-.94.19-1.439.39-.79.32-1.207.42-1.723.42-.404.003-.595-.043-1.033-.248a3.4 3.4 0 0 1-1.003-.711c-.326-.317-.55-.583-.99-1.166-1.077-1.424-1.243-1.704-1.77-2.974C.786 15.955.7 15.75.63 15.54c-.055-.167-.1-.338-.187-.666-.211-.8-.234-.887-.234-1.003 0-.056-.023-.196-.048-.315-.22-.964-.214-2.555.01-3.385a8 8 0 0 1 .633-1.62c.625-1.219 1.413-1.997 2.57-2.539.383-.181.67-.266 1.18-.353.236-.039.498-.09.582-.111.206-.056.682-.048.97.012.685.15 1.149.28 1.6.452.85.329 1.343.467 1.545.435l.05-.008c.08-.017.16-.046.65-.231"})),es=Qm;var ed=e=>gr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),gr.createElement(_reactnativesvg.Path,{fill:"#5865F2",d:"M20.317 4.37a19.8 19.8 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.3 18.3 0 0 0-5.487 0 13 13 0 0 0-.617-1.25.08.08 0 0 0-.079-.037A19.7 19.7 0 0 0 3.677 4.37a.1.1 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.08.08 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.08.08 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13 13 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10 10 0 0 0 .372-.292.07.07 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.07.07 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.3 12.3 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.08.08 0 0 0 .084.028 19.8 19.8 0 0 0 6.002-3.03.08.08 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03M8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418m7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418"})),os=ed;var rd=e=>yr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",x:24,y:24,viewBox:"0 0 98 96"},e),yr.createElement(_reactnativesvg.Path,{fill:e.color,d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a47 47 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0"})),ts=rd;var id=e=>wo.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),wo.createElement(_reactnativesvg.Path,{fill:"#4285F4",stroke:"#6366F1",strokeWidth:1.128,d:"M17.382 13.486h-4.818v-2.74h8.372q.1.717.1 1.481c0 2.82-.977 5.168-2.642 6.786H15.95v-1.654a5.15 5.15 0 0 0 1.986-3.206l.123-.667z"}),wo.createElement(_reactnativesvg.Path,{fill:"#34A853",d:"M12 22c2.7 0 4.964-.896 6.618-2.423l-3.232-2.509c-.895.6-2.04.955-3.386.955-2.604 0-4.809-1.76-5.595-4.123H3.064v2.59A10 10 0 0 0 12 22"}),wo.createElement(_reactnativesvg.Path,{fill:"#FBBC05",d:"M6.405 13.9c-.2-.6-.314-1.24-.314-1.9s.114-1.3.314-1.9V7.51H3.064A10 10 0 0 0 2 12c0 1.614.386 3.141 1.064 4.491z"}),wo.createElement(_reactnativesvg.Path,{fill:"#EA4335",d:"M12 5.977c1.468 0 2.786.505 3.823 1.496l2.868-2.868C16.959 2.99 14.696 2 12.001 2 8.09 2 4.708 4.24 3.063 7.51l3.34 2.59C7.192 7.736 9.397 5.977 12 5.977"})),rs=id;var ld=e=>hr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",role:"img",viewBox:"0 0 24 24"},e),hr.createElement(_reactnativesvg.Path,{fill:"#E4405F",d:"M7.03.084c-1.277.06-2.149.264-2.91.563a5.9 5.9 0 0 0-2.124 1.388 5.9 5.9 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076s-.069 1.688-.063 4.947.021 3.667.083 4.947c.061 1.277.264 2.149.563 2.911.308.789.72 1.457 1.388 2.123a5.9 5.9 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552 1.278.056 1.689.069 4.947.063s3.668-.021 4.947-.082c1.28-.06 2.147-.265 2.91-.563a5.9 5.9 0 0 0 2.123-1.388 5.9 5.9 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912.056-1.28.07-1.69.063-4.948-.006-3.258-.02-3.667-.081-4.947-.06-1.28-.264-2.148-.564-2.911a5.9 5.9 0 0 0-1.387-2.123 5.86 5.86 0 0 0-2.128-1.38C19.074.322 18.202.12 16.924.066 15.647.009 15.236-.006 11.977 0S8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.7 3.7 0 0 1-1.382-.895 3.7 3.7 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228-.06-1.264-.072-1.644-.08-4.848-.006-3.204.006-3.583.061-4.848.05-1.169.246-1.805.408-2.228.216-.561.477-.96.895-1.382a3.7 3.7 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417 1.265-.06 1.644-.072 4.848-.08 3.203-.006 3.583.006 4.85.062 1.168.05 1.804.244 2.227.408.56.216.96.475 1.382.895s.681.817.9 1.378c.165.422.362 1.056.417 2.227.06 1.265.074 1.645.08 4.848.005 3.203-.006 3.583-.061 4.848-.051 1.17-.245 1.805-.408 2.23-.216.56-.477.96-.896 1.38a3.7 3.7 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418-1.266.06-1.645.072-4.85.079s-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442 1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024 6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16 4 4 0 0 1 8 12.008"})),ns=ld;var md=e=>Xe.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 320"},e),Xe.createElement(_reactnativesvg.Rect,{width:320,height:320,fill:"#06c755",rx:72.14}),Xe.createElement(_reactnativesvg.Path,{fill:"#fff",d:"M266.66 144.92c0-47.74-47.86-86.58-106.69-86.58S53.28 97.18 53.28 144.92c0 42.8 38 78.65 89.22 85.42 3.48.75 8.21 2.29 9.4 5.26 1.08 2.7.71 6.93.35 9.65 0 0-1.25 7.53-1.52 9.13-.47 2.7-2.15 10.55 9.24 5.76s61.44-36.18 83.82-61.95c15.46-16.95 22.87-34.19 22.87-53.27"}),Xe.createElement(_reactnativesvg.Path,{fill:"#06c755",d:"M231.16 172.49h-30a2 2 0 0 1-2-2v-46.55a2 2 0 0 1 2-2h30a2 2 0 0 1 2 2v7.57a2 2 0 0 1-2 2h-20.37v7.85h20.37a2 2 0 0 1 2 2V151a2 2 0 0 1-2 2h-20.37v7.86h20.37a2 2 0 0 1 2 2v7.56a2 2 0 0 1-2 2.07M120.29 172.49a2 2 0 0 0 2-2v-7.56a2 2 0 0 0-2-2H99.92v-37a2 2 0 0 0-2-2h-7.6a2 2 0 0 0-2 2v46.53a2 2 0 0 0 2 2h30Z"}),Xe.createElement(_reactnativesvg.Rect,{width:11.64,height:50.64,x:128.73,y:121.85,fill:"#06c755",rx:2.04}),Xe.createElement(_reactnativesvg.Path,{fill:"#06c755",d:"M189.84 121.85h-7.56a2 2 0 0 0-2 2v27.66l-21.3-28.77a1.2 1.2 0 0 0-.17-.21l-.12-.12-.11-.09h-.06l-.11-.08h-.06l-.11-.06h-8.47a2 2 0 0 0-2 2v46.56a2 2 0 0 0 2 2h7.57a2 2 0 0 0 2-2v-27.93l21.33 28.8a2 2 0 0 0 .52.52l.12.08h.06l.1.05h.31a2.4 2.4 0 0 0 .54.07h7.52a2 2 0 0 0 2-2v-46.44a2 2 0 0 0-2-2.04"})),ss=md;var pd=e=>wr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),wr.createElement(_reactnativesvg.Path,{fill:"#0A66C2",d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.06 2.06 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065m1.782 13.019H3.555V9h3.564zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0z"})),as=pd;var yd=e=>Cr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),Cr.createElement(_reactnativesvg.Path,{fill:"#1DB954",d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0m5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02m1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6s.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2m.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3"})),ls=yd;var wd=e=>vr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"},e),vr.createElement(_reactnativesvg.Path,{fill:"#26A5E4",d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm4.962 7.224c.1-.002.321.023.465.14a.5.5 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024q-.159.037-5.061 3.345-.72.495-1.302.48c-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789q.04-.324.893-.663 5.247-2.286 6.998-3.014c3.332-1.386 4.025-1.627 4.476-1.635"})),cs=wd;var Pd=e=>Pr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),Pr.createElement(_reactnativesvg.Path,{fill:e.color,d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07"})),ms=Pd;var Ed=e=>Mr.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"currentColor",viewBox:"0 0 24 24"},e),Mr.createElement(_reactnativesvg.Path,{d:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 2 3.43 4.571v14.858h5.142V22l2.572-2.571h4.286l5.141-5.143V2zm13.714 11.143-3.428 3.428h-3.429l-2.571 2.572v-2.572H6.857V3.429h12.857Z"})),ds=Ed;var Td=e=>Ir.createElement(_reactnativesvg2.default,_chunkC5WYSLQFjs.b.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),Ir.createElement(_reactnativesvg.Path,{fill:e.color,d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"})),us=Td;var xd={google:rs,apple:es,discord:os,github:ts,twitter:us,spotify:ls,instagram:ns,tiktok:ms,linkedin:as,line:ss,twitch:ds,telegram:cs},fs=({method:e,onLoginMethodChange:o})=>{let{login:t}=_chunkQAUM76HKjs.b.call(void 0, ),{colors:r}=_chunkDBIA42HBjs.b.call(void 0, ),i=xd[e],n=()=>{t({provider:e}),o(e)};return qt.default.createElement(_chunkDBIA42HBjs.c,{LeftIcon:qt.default.createElement(i,{width:24,height:24,color:r.icon}),variant:"secondary",onPress:n,title:Be[e]})};var ys=({method:e,onLoginMethodChange:o,preferred:t})=>{switch(e){case"apple":case"google":case"discord":case"github":case"twitter":case"spotify":case"instagram":case"tiktok":case"line":case"linkedin":case"twitch":case"telegram":return qt.default.createElement(fs,{method:e,onLoginMethodChange:o});case"email":case"sms":return qt.default.createElement(Xi,{method:e,onLoginMethodChange:o,preferred:t});default:throw new (0, _chunkDBIA42HBjs.L)("unsupported_login_method",`Unsupported login method: ${e}`)}};var Ss=({loginMethods:e,onLoginMethodChange:o})=>qt.default.createElement(_reactnative.ScrollView,{style:Ft.scrollView,contentContainerStyle:Ft.container},qt.default.createElement(_reactnative.View,{style:Ft.formContainer},qt.default.createElement(Ji,null),qt.default.createElement(A,{title:"Login or sign up"}),qt.default.createElement(_reactnative.View,{style:Ft.listContainer},e.map((t,r)=>qt.default.createElement(ys,{key:`method-button-${t}`,method:t,onLoginMethodChange:o,preferred:r===0})))),qt.default.createElement(po,null),qt.default.createElement(V,null)),Ft=_reactnative.StyleSheet.create({scrollView:{flex:1},container:{paddingHorizontal:16},formContainer:{alignItems:"center",gap:32},listContainer:{gap:16,alignSelf:"stretch"}});function Se({Icons:e,title:o,subtitle:t,Features:r,Footer:i}){return qt.default.createElement(_reactnative.View,{style:Vo.screen},qt.default.createElement(_reactnative.View,{style:Vo.content},qt.default.createElement(_reactnative.View,{style:Vo.header},qt.default.createElement(_reactnative.View,{style:Vo.headerIcons},e),qt.default.createElement(A,{tight:!0,title:o,subtitle:t})),qt.default.createElement(_reactnative.View,{style:Vo.featuresList},r)),qt.default.createElement(_reactnative.View,null,i))}var Vo=_reactnative.StyleSheet.create({screen:{flex:1,paddingTop:24,paddingHorizontal:16,gap:24,justifyContent:"space-between"},content:{gap:48,paddingHorizontal:8},header:{alignItems:"center",gap:8},headerIcons:{flexDirection:"row",gap:12},featuresList:{gap:12}});var ws=({termsAndPolicyConfig:e})=>{let{colors:o}=_chunkDBIA42HBjs.b.call(void 0, ),t=_chunkV3WU67WLjs.o.call(void 0, ),{logout:r}=_chunkV3WU67WLjs.ca.call(void 0, ),{termsAndConditionsUrl:i,privacyPolicyUrl:n}=e,s=We(),[l,u]=_react.useState.call(void 0, !1),d=()=>{r(),s({termsReviewed:!0})},a=()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){u(!0),yield t.user.acceptTerms().finally(()=>u(!1)),s({termsReviewed:!0})});return qt.default.createElement(Se,{Icons:qt.default.createElement(_chunkDBIA42HBjs.u,{size:48,color:o.icon}),title:"One last step",subtitle:"By signing up, you agree to our terms and privacy policy.",Features:qt.default.createElement(qt.default.Fragment,null,i&&qt.default.createElement(_chunkDBIA42HBjs.c,{variant:"secondary",title:"View Terms",onPress:()=>Er.openBrowserAsync(i),RightIcon:qt.default.createElement(_chunkDBIA42HBjs.r,{color:o.icon,size:24})}),n&&qt.default.createElement(_chunkDBIA42HBjs.c,{variant:"secondary",title:"View Privacy Policy",onPress:()=>Er.openBrowserAsync(n),RightIcon:qt.default.createElement(_chunkDBIA42HBjs.r,{color:o.icon,size:24})})),Footer:qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.c,{variant:"primary",title:"Accept",onPress:a,loading:l}),qt.default.createElement(_chunkDBIA42HBjs.c,{variant:"tertiary",destroy:!0,title:"No thanks",onPress:d}))})};var _reactnativesafeareacontext = require('react-native-safe-area-context');var Od=()=>{let e=_reactnativesafeareacontext.useSafeAreaInsets.call(void 0, );return{paddingTop:e.top,paddingBottom:e.bottom,paddingLeft:e.left,paddingRight:e.right}},vs=({children:e,visible:o})=>{let t=Od(),{colors:r}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.Modal,{animationType:"slide",transparent:!0,visible:o},qt.default.createElement(_reactnative.View,{style:[_reactnative.StyleSheet.absoluteFill,{backgroundColor:r.background},t]},e))};var Ps=()=>{let{client:e}=_react.useContext.call(void 0, _chunkV3WU67WLjs.na),o=e.app.getConfig(),t=o==null?void 0:o.logo_url;_react.useEffect.call(void 0, ()=>{t&&_reactnative.Image.prefetch(t)},[t])};var Ms=1e3,Es=({config:e})=>{let{appName:o,onConsent:t}=e,{colors:r}=_chunkDBIA42HBjs.b.call(void 0, ),i=z(),n=D(),[s,l]=_react.useState.call(void 0, !1),[u,d]=_react.useState.call(void 0, !1),[a,m]=_react.useState.call(void 0, !1),c=()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){try{l(!0),d(!1),m(!1);let f=yield t();d(!0),yield _chunkV3WU67WLjs.k.call(void 0, Ms),i(f)}catch(f){m(!0),yield _chunkV3WU67WLjs.k.call(void 0, Ms),n(f instanceof _chunkDBIA42HBjs.L?f:new (0, _chunkDBIA42HBjs.M)(f))}finally{l(!1)}});if(u)return qt.default.createElement(Y,{subtitle:"You\u2019ve successfully enabled offline access."});if(a)return qt.default.createElement(O,null);let p=`By confirming, ${o} will be able to use your wallet for you even when you're not around. You can revoke this later.`;return qt.default.createElement(_reactnative.View,{style:Is.container},qt.default.createElement(_reactnative.View,{style:Is.header},qt.default.createElement(_chunkDBIA42HBjs.o,{size:48,color:r.icon}),qt.default.createElement(A,{title:"Enable offline access",subtitle:p})),qt.default.createElement(_reactnative.View,null,qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Confirm",onPress:c,loading:s}),qt.default.createElement(V,null)))},Is=_reactnative.StyleSheet.create({container:{paddingTop:24,paddingHorizontal:16,gap:24,flex:1,justifyContent:"space-between"},header:{alignItems:"center",gap:8}});var bs=1e3,Ts=({config:e})=>{let{appName:o,onRevoke:t}=e,{colors:r}=_chunkDBIA42HBjs.b.call(void 0, ),i=z(),n=D(),[s,l]=_react.useState.call(void 0, !1),[u,d]=_react.useState.call(void 0, !1),[a,m]=_react.useState.call(void 0, !1),c=()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){try{l(!0),d(!1),m(!1);let f=yield t();d(!0),yield _chunkV3WU67WLjs.k.call(void 0, bs),i(f)}catch(f){m(!0),yield _chunkV3WU67WLjs.k.call(void 0, bs),n(f instanceof _chunkDBIA42HBjs.L?f:new (0, _chunkDBIA42HBjs.M)(f))}finally{l(!1)}});if(u)return qt.default.createElement(Y,{subtitle:"You\u2019ve successfully revoked offline access."});if(a)return qt.default.createElement(O,null);let p=`By confirming, ${o} will no longer be able to use this wallet on your behalf when you are not online.`;return qt.default.createElement(_reactnative.View,{style:Fs.container},qt.default.createElement(_reactnative.View,{style:Fs.header},qt.default.createElement(_chunkDBIA42HBjs.e,{size:48,color:r.icon}),qt.default.createElement(A,{title:"Revoke offline access to wallet",subtitle:p})),qt.default.createElement(_reactnative.View,null,qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Confirm",onPress:c,loading:s}),qt.default.createElement(V,null)))},Fs=_reactnative.StyleSheet.create({container:{paddingTop:24,paddingHorizontal:16,gap:24,flex:1,justifyContent:"space-between"},header:{alignItems:"center",gap:8}});var _encoding = require('@privy-io/encoding');function Tt(e){return`0x${_encoding.encoding.hex.fromBytes(e)}`}var Us=({iconUrl:e})=>qt.default.createElement(_reactnative.Image,{source:{uri:e},style:{width:Yd,height:xs,borderRadius:xs/2,resizeMode:"contain",alignSelf:"center"}}),Yd=80,xs=80;var Ls=1e3,As=({config:e})=>{let{message:o,onSignMessage:t,title:r="Sign message",description:i="Sign to continue",buttonText:n="Confirm signature",logo:s}=e,{colors:l}=_chunkDBIA42HBjs.b.call(void 0, ),u=z(),d=D(),[a,m]=_react.useState.call(void 0, !1),[c,p]=_react.useState.call(void 0, !1),[f,S]=_react.useState.call(void 0, !1),h=()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){try{m(!0),p(!1),S(!1);let I=yield t(o);p(!0),yield _chunkV3WU67WLjs.k.call(void 0, Ls),u(I)}catch(I){S(!0),yield _chunkV3WU67WLjs.k.call(void 0, Ls),d(I instanceof _chunkDBIA42HBjs.L?I:new (0, _chunkDBIA42HBjs.M)(I))}finally{m(!1)}}),v=_react.useMemo.call(void 0, ()=>o instanceof Uint8Array?Tt(o):o,[o]);return c?qt.default.createElement(Y,{subtitle:"You\u2019ve successfully completed the signature."}):f?qt.default.createElement(O,null):qt.default.createElement(_reactnative.ScrollView,{style:vo.container,contentContainerStyle:vo.contentContainer},qt.default.createElement(_reactnative.View,{style:vo.content},qt.default.createElement(_reactnative.View,{style:vo.header},s&&qt.default.createElement(Us,{iconUrl:s}),qt.default.createElement(A,{title:r,subtitle:i,tight:!0})),qt.default.createElement(_reactnative.View,{style:[vo.messageBox,{backgroundColor:l.backgroundSecondary}]},qt.default.createElement(_reactnative.Text,{style:[vo.message,{color:l.text}]},v))),qt.default.createElement(_reactnative.View,null,qt.default.createElement(_chunkDBIA42HBjs.c,{title:n,onPress:h,loading:a}),qt.default.createElement(V,null)))},vo=_reactnative.StyleSheet.create({container:{flex:1},contentContainer:{paddingHorizontal:16,gap:24,flexGrow:1,justifyContent:"space-between"},header:{gap:24},content:{gap:48},messageBox:{paddingVertical:16,paddingHorizontal:16,borderRadius:14},message:{fontFamily:"Inter_400Regular",fontSize:20,lineHeight:32,width:"100%",textAlign:"center"}});function eo({Icon:e,children:o}){let{colors:t}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:ks.row},qt.default.createElement(e,{size:24,color:t.icon}),qt.default.createElement(_reactnative.Text,{style:[ks.label,{color:t.text}]},o))}var ks=_reactnative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",gap:12},label:{flex:1,fontFamily:"Inter_500Medium",fontSize:14,lineHeight:22}});function R(e){return _jssdkcore.errorIndicatesMaxMfaRetries.call(void 0, e)?{isBlockingError:!0,error:new Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.",{cause:e})}:_jssdkcore.errorIndicatesMfaVerificationFailed.call(void 0, e)?{isBlockingError:!1,error:new Error("The code you entered is not valid.",{cause:e})}:_jssdkcore.errorIndicatesMfaTimeout.call(void 0, e)?{isBlockingError:!0,error:new Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.",{cause:e})}:{isBlockingError:!1,error:new Error("Something went wrong.",{cause:e})}}function _s({onBack:e}){let{initMfaEnrollment:o,submitMfaEnrollment:t}=_chunkV3WU67WLjs.Y.call(void 0, ),{prompt:r}=_chunkV3WU67WLjs.X.call(void 0, ),i=z(),n=D(),{user:s}=_chunkV3WU67WLjs.ca.call(void 0, ),{colors:l}=_chunkDBIA42HBjs.b.call(void 0, ),[u,d]=_react.useState.call(void 0, !1),[a,m]=_react.useState.call(void 0, !1),[c,p]=_react.useState.call(void 0, ),[f,S]=_react.useState.call(void 0, !1),h=_react.useMemo.call(void 0, ()=>{var T;return((T=s==null?void 0:s.linked_accounts)!=null?T:[]).filter(C=>C.type==="passkey").map(C=>C.credential_id)},[s]),v=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{m(!0),S(!1),p(void 0),d(!1),yield r(),yield o({method:"passkey"}),yield t({method:"passkey",credentialIds:h}),d(!0),yield _chunkV3WU67WLjs.k.call(void 0, 1500),i({success:!0})}catch(I){let{isBlockingError:_,error:T}=R(I);p(T),S(_),_&&(yield _chunkV3WU67WLjs.k.call(void 0, 1500),n(T instanceof _chunkDBIA42HBjs.L?T:new (0, _chunkDBIA42HBjs.M)(T)))}finally{m(!1)}}),[h,o,n,i,r,t]);return u?qt.default.createElement(Y,{subtitle:"From now on, you'll use the passkey whenever you use your Privy wallet."}):f?qt.default.createElement(O,{subtitle:c==null?void 0:c.message}):qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{goBack:()=>e()}),qt.default.createElement(Se,{Icons:qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.E,{size:48,color:l.icon}),qt.default.createElement(_chunkDBIA42HBjs.x,{size:48,color:l.icon})),title:"Set up passkey verification",subtitle:"You can change this later.",Features:qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(eo,{Icon:_chunkDBIA42HBjs.H},"Verify with Touch ID, Face ID, PIN, or hardware key"),qt.default.createElement(eo,{Icon:_chunkDBIA42HBjs.n},"Takes seconds to set up and use"),qt.default.createElement(eo,{Icon:_chunkDBIA42HBjs.z},"Use your passkey to verify transactions"),c&&qt.default.createElement(_reactnative.Text,{style:[lu.statusText,{color:l.errorDark}]},c.message)),Footer:qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Confirm",onPress:()=>v(),loading:a})}))}var lu=_reactnative.StyleSheet.create({statusText:{textAlign:"center",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});var cu=1e3;function Bs({onBack:e}){let{initMfaEnrollment:o,submitMfaEnrollment:t}=_chunkV3WU67WLjs.Y.call(void 0, ),r=z(),i=D(),[n,s]=_react.useState.call(void 0, "phone-input"),[l,u]=_react.useState.call(void 0, ""),[d,a]=_react.useState.call(void 0, !1),[m,c]=_react.useState.call(void 0, !1),[p,f]=_react.useState.call(void 0, ),[S,h]=_react.useState.call(void 0, !1),v=_react.useCallback.call(void 0, T=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{u(T),f(void 0),a(!0),yield o({method:"sms",phoneNumber:T}),s("otp-submit")}catch(C){let{isBlockingError:x,error:k}=R(C);f(k),h(x),x&&(yield _chunkV3WU67WLjs.k.call(void 0, 1500),i(new (0, _chunkDBIA42HBjs.M)(k)))}finally{a(!1)}}),[o,i]),I=_react.useCallback.call(void 0, T=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{a(!0),f(void 0),yield t({method:"sms",phoneNumber:l,code:T}),c(!0),yield _chunkV3WU67WLjs.k.call(void 0, cu),r({success:!0})}catch(C){let{isBlockingError:x,error:k}=R(C);f(k),h(x),x&&(yield _chunkV3WU67WLjs.k.call(void 0, 1500),i(new (0, _chunkDBIA42HBjs.M)(k)))}finally{a(!1)}}),[i,r,l,t]),_=_react.useCallback.call(void 0, ()=>{n==="otp-submit"?s("phone-input"):e()},[e,n]);return S?qt.default.createElement(O,{subtitle:p==null?void 0:p.message}):m?qt.default.createElement(Y,{subtitle:""}):n==="phone-input"?qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{goBack:_}),qt.default.createElement(ut,{error:p!=null?p:null,isLoading:d,sendCode:v})):qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{goBack:_}),qt.default.createElement(ae,{subtitle:"Please check your phone for a message with your MFA code.",hint:"Didn\u2019t get an SMS?",error:p!=null?p:null,isDone:m,isLoading:d,onSendCode:I,onRequestNewCode:()=>v(l)}))}function Os({onContinue:e,secret:o,authUrl:t}){let{colors:r}=_chunkDBIA42HBjs.b.call(void 0, ),i=()=>Vs.openURL(t),[n,s]=_react.useState.call(void 0, !1),l=()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){yield Ws.setStringAsync(o!=null?o:""),s(!0),yield _chunkV3WU67WLjs.k.call(void 0, 2e3),s(!1)});return qt.default.createElement(_reactnative.View,{style:Do.container},qt.default.createElement(_reactnative.View,{style:Do.formContainer},qt.default.createElement(A,{title:"Scan QR code",subtitle:"Open your authenticator app and scan the QR code to continue."}),qt.default.createElement(_reactnative.View,{style:Do.listContainer},qt.default.createElement(_reactnative.View,{style:Do.qrContainer},qt.default.createElement(_reactnativeqrcodestyled2.default,{data:t,color:r.text,errorCorrectionLevel:"Q",pieceSize:6,pieceBorderRadius:3,outerEyesOptions:{borderRadius:20},innerEyesOptions:{borderRadius:9}}),qt.default.createElement(_reactnative.View,{style:[Do.logoContainer,{backgroundColor:r.background}]},qt.default.createElement(_chunkDBIA42HBjs.H,{size:40,color:r.text}))),qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Open in Authenticator app",variant:"tertiary",color:r.textMuted,onPress:i,LeftIcon:qt.default.createElement(_chunkDBIA42HBjs.r,{color:r.iconSubtle,size:16})}),qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Copy secret",variant:"tertiary",color:r.textMuted,onPress:l,LeftIcon:n?qt.default.createElement(_chunkDBIA42HBjs.g,{color:r.iconSubtle,size:16}):qt.default.createElement(_chunkDBIA42HBjs.p,{color:r.iconSubtle,size:16})}),qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Continue",onPress:e}))),qt.default.createElement(V,null))}var Do=_reactnative.StyleSheet.create({container:{flex:1,justifyContent:"space-between",paddingHorizontal:16},formContainer:{alignItems:"center",gap:32},listContainer:{gap:16,alignSelf:"stretch"},qrContainer:{justifyContent:"center",alignItems:"center"},logoContainer:{position:"absolute",width:42,height:42,justifyContent:"center",alignItems:"center"}});var fu=1e3;function Ds({onBack:e}){let{initMfaEnrollment:o,submitMfaEnrollment:t}=_chunkV3WU67WLjs.Y.call(void 0, ),r=z(),i=D(),[n,s]=_react.useState.call(void 0, "auth-link"),[l,u]=_react.useState.call(void 0, ),[d,a]=_react.useState.call(void 0, ),[m,c]=_react.useState.call(void 0, !1),[p,f]=_react.useState.call(void 0, !1),[S,h]=_react.useState.call(void 0, ),[v,I]=_react.useState.call(void 0, !1),_=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{h(void 0),c(!0);let{authUrl:x,secret:k}=yield o({method:"totp"});a(k),u(x)}catch(x){let{isBlockingError:k,error:F}=R(x);h(F),I(k),k&&(yield _chunkV3WU67WLjs.k.call(void 0, 1500),i(F instanceof _chunkDBIA42HBjs.L?F:new (0, _chunkDBIA42HBjs.M)(F)))}finally{c(!1)}}),[o,i]),T=_react.useCallback.call(void 0, x=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{c(!0),h(void 0),yield t({method:"totp",code:x}),f(!0),yield _chunkV3WU67WLjs.k.call(void 0, fu),r({success:!0})}catch(k){let{isBlockingError:F,error:q}=R(k);h(q),I(F),F&&(yield _chunkV3WU67WLjs.k.call(void 0, 1500),i(q instanceof _chunkDBIA42HBjs.L?q:new (0, _chunkDBIA42HBjs.M)(q)))}finally{c(!1)}}),[i,r,t]);_react.useEffect.call(void 0, ()=>{_()},[_]);let C=_react.useCallback.call(void 0, ()=>{n==="otp-submit"?s("auth-link"):e()},[e,n]);return l?v?qt.default.createElement(O,{subtitle:S==null?void 0:S.message}):p?qt.default.createElement(Y,{subtitle:""}):n==="auth-link"?qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{goBack:C}),qt.default.createElement(Os,{secret:d!=null?d:"",authUrl:l!=null?l:"",onContinue:()=>s("otp-submit")})):qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{goBack:C}),qt.default.createElement(ae,{subtitle:"Please check your for code in you Authenticator app.",error:S!=null?S:null,isDone:p,isLoading:m,onSendCode:T})):qt.default.createElement(Oe,null)}function Ns({config:e}){let{method:o,onBack:t}=e;switch(o){case"totp":return qt.default.createElement(Ds,{onBack:t});case"sms":return qt.default.createElement(Bs,{onBack:t});case"passkey":return qt.default.createElement(_s,{onBack:t})}}function Hs({config:e}){let{colors:o}=_chunkDBIA42HBjs.b.call(void 0, ),t=te(),{availableMethods:r,enrolledMfaMethods:i}=e,n=_react.useCallback.call(void 0, l=>{if(i.includes(l)){t({type:"mfa:enrollment:unenroll",payload:{method:l,onBack:()=>t({type:"mfa:enrollment:landing",payload:e})}});return}t({type:"mfa:enrollment:enroll",payload:{method:l,relyingParty:e.relyingParty,onBack:()=>t({type:"mfa:enrollment:landing",payload:e})}})},[e,i,t]);function s({mfaMethod:l}){return i&&i.includes(l)?qt.default.createElement(_reactnative.View,{style:At.unenrollGroup},qt.default.createElement(_reactnative.Text,null,"Enabled"),qt.default.createElement(_chunkDBIA42HBjs.m,{color:o.icon,size:24})):qt.default.createElement(_chunkDBIA42HBjs.i,{color:o.icon,size:24})}return qt.default.createElement(_reactnative.View,{style:At.container},qt.default.createElement(_reactnative.View,{style:At.formContainer},qt.default.createElement(A,{title:"Choose a verification method",subtitle:"You can change this later."}),qt.default.createElement(_reactnative.View,{style:At.listContainer},r.includes("totp")&&qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Authenticator app",variant:"secondary",onPress:()=>n("totp"),LeftIcon:qt.default.createElement(_chunkDBIA42HBjs.I,{color:o.icon,size:24}),RightIcon:qt.default.createElement(s,{mfaMethod:"totp"})}),r.includes("passkey")&&qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Passkey",variant:"secondary",onPress:()=>n("passkey"),LeftIcon:qt.default.createElement(_chunkDBIA42HBjs.x,{color:o.icon,size:24}),RightIcon:qt.default.createElement(s,{mfaMethod:"passkey"})}),r.includes("sms")&&qt.default.createElement(_chunkDBIA42HBjs.c,{title:"SMS",variant:"secondary",onPress:()=>n("sms"),LeftIcon:qt.default.createElement(_chunkDBIA42HBjs.B,{color:o.icon,size:24}),RightIcon:qt.default.createElement(s,{mfaMethod:"sms"})}))),qt.default.createElement(V,null))}var At=_reactnative.StyleSheet.create({container:{flex:1,justifyContent:"space-between",paddingHorizontal:16},formContainer:{alignItems:"center",gap:32},listContainer:{gap:16,alignSelf:"stretch"},unenrollGroup:{flexDirection:"row",gap:16,alignItems:"center"}});function zs({config:e}){let{colors:o}=_chunkDBIA42HBjs.b.call(void 0, ),{method:t,onBack:r}=e,{unenrollMfa:i}=_chunkV3WU67WLjs.Y.call(void 0, ),{prompt:n}=_chunkV3WU67WLjs.X.call(void 0, ),s=z(),l=D(),[u,d]=_react.useState.call(void 0, !1),[a,m]=_react.useState.call(void 0, !1),[c,p]=_react.useState.call(void 0, !1),f=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){var I;try{d(!0),m(!1),p(!1),t==="sms"?yield i({method:"sms"}):t==="totp"?yield i({method:"totp"}):t==="passkey"&&(yield n(),yield i({method:"passkey",removeForLogin:(I=_chunkDBIA42HBjs.O.call(void 0, ).passkeys)==null?void 0:I.shouldUnlinkOnUnenrollMfa})),m(!0),yield _chunkV3WU67WLjs.k.call(void 0, 1500),s({success:!0})}catch(_){p(!0),yield _chunkV3WU67WLjs.k.call(void 0, 1500),l(_ instanceof _chunkDBIA42HBjs.L?_:new (0, _chunkDBIA42HBjs.M)(_))}finally{d(!1)}}),[t,l,s,n,i]);if(a)return qt.default.createElement(Y,{subtitle:""});if(c)return qt.default.createElement(O,null);let S=wu[t],h=`Remove ${S} verification?`,v="MFA adds an extra layer of security to your account. Make sure you have other methods to secure your account.";return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{goBack:r}),qt.default.createElement(Se,{Icons:qt.default.createElement(_chunkDBIA42HBjs.l,{size:48,color:o.icon}),title:h,subtitle:v,Footer:qt.default.createElement(_chunkDBIA42HBjs.c,{title:`Remove ${S} for MFA`,variant:"primary",destroy:!0,onPress:f,loading:u})}))}var wu={totp:"TOTP",sms:"SMS",passkey:"Passkey"};function Gs({config:e}){var n,s,l;let{onContinue:o,appearance:t}=e,r=D(),{colors:i}=_chunkDBIA42HBjs.b.call(void 0, );return qt.default.createElement(_reactnative.View,{style:kt.container},qt.default.createElement(_reactnative.View,{style:kt.content},qt.default.createElement(_reactnative.View,{style:kt.header},qt.default.createElement(_chunkDBIA42HBjs.H,{color:i.icon,size:32}),qt.default.createElement(A,{title:(n=t==null?void 0:t.title)!=null?n:"Add more security",subtitle:(s=t==null?void 0:t.subtitle)!=null?s:"Set up multi-factor verification.",tight:!0})),qt.default.createElement(_reactnative.View,{style:kt.featureList},qt.default.createElement(eo,{Icon:_chunkDBIA42HBjs.j},(l=t==null?void 0:t.description)!=null?l:"Enable multi-factor verification for your wallet."),qt.default.createElement(eo,{Icon:_chunkDBIA42HBjs.K},"You may be asked to complete a verification before certain actions to help keep your wallet secure."))),qt.default.createElement(_reactnative.View,null,qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Continue",onPress:()=>o()}),qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Not now",variant:"tertiary",onPress:()=>r()}),qt.default.createElement(V,null)))}var kt=_reactnative.StyleSheet.create({container:{flex:1,justifyContent:"space-between",paddingTop:24,paddingHorizontal:16},content:{gap:24},header:{alignItems:"center",gap:8},featureList:{gap:12}});function js({config:e}){let{colors:o}=_chunkDBIA42HBjs.b.call(void 0, ),t=te(),{enrolledMfaMethods:r}=e,i=_react.useCallback.call(void 0, n=>{t({type:`mfa:verify:${n}`,payload:{relyingParty:e.relyingParty,ongoingWalletUIFlow:e.ongoingWalletUIFlow,onBack:()=>t({type:"mfa:verify:landing",payload:e})}})},[e,t]);return qt.default.createElement(Se,{Icons:void 0,title:"Choose a verification method",subtitle:"",Features:qt.default.createElement(qt.default.Fragment,null,r.includes("totp")&&qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Authenticator app",variant:"secondary",onPress:()=>i("totp"),LeftIcon:qt.default.createElement(_chunkDBIA42HBjs.I,{color:o.icon,size:24}),RightIcon:qt.default.createElement(_chunkDBIA42HBjs.i,{color:o.icon,size:24})}),r.includes("passkey")&&qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Passkey",variant:"secondary",onPress:()=>i("passkey"),LeftIcon:qt.default.createElement(_chunkDBIA42HBjs.x,{color:o.icon,size:24}),RightIcon:qt.default.createElement(_chunkDBIA42HBjs.i,{color:o.icon,size:24})}),r.includes("sms")&&qt.default.createElement(_chunkDBIA42HBjs.c,{title:"SMS",variant:"secondary",onPress:()=>i("sms"),LeftIcon:qt.default.createElement(_chunkDBIA42HBjs.B,{color:o.icon,size:24}),RightIcon:qt.default.createElement(_chunkDBIA42HBjs.i,{color:o.icon,size:24})})),Footer:qt.default.createElement(V,null)})}var qs=({config:e})=>{let{colors:o}=_chunkDBIA42HBjs.b.call(void 0, ),{init:t,submit:r}=_chunkV3WU67WLjs.X.call(void 0, ),{relyingParty:i,ongoingWalletUIFlow:n}=e,s=te(),l=z(),u=D(),[d,a]=_react.useState.call(void 0, !1),[m,c]=_react.useState.call(void 0, ),[p,f]=_react.useState.call(void 0, !1),S=_react.useRef.call(void 0, void 0),h=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){try{a(!0),c(void 0),f(!1);let v=S.current;v||(v=yield t({method:"passkey",relyingParty:i})),yield r({method:"passkey",mfaCode:v,relyingParty:i}),n?s(n):l({success:!0})}catch(v){let{isBlockingError:I,error:_}=R(v);c(_),f(I),I&&(yield _chunkV3WU67WLjs.k.call(void 0, 1500),u(new (0, _chunkDBIA42HBjs.M)(v)))}finally{a(!1)}}),[t,s,u,l,n,i,r]);return _react.useEffect.call(void 0, ()=>{h()},[h]),p?qt.default.createElement(O,{subtitle:m==null?void 0:m.message}):qt.default.createElement(Se,{Icons:qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.E,{size:48,color:o.icon}),qt.default.createElement(_chunkDBIA42HBjs.x,{size:48,color:o.icon})),title:"Verifying with passkey",subtitle:"Approve this action using your touch, face, PIN, or hardware key.",Features:m?qt.default.createElement(_reactnative.Text,{style:[Fu.statusText,{color:o.errorDark}]},m.message):void 0,Footer:qt.default.createElement(_chunkDBIA42HBjs.c,{title:"Try again",loading:d,onPress:()=>h(),variant:"primary"})})},Fu=_reactnative.StyleSheet.create({statusText:{textAlign:"center",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});function $s({config:e}){let{init:o,submit:t}=_chunkV3WU67WLjs.X.call(void 0, ),{ongoingWalletUIFlow:r}=e,i=te(),n=z(),s=D(),[l,u]=_react.useState.call(void 0, !1),[d,a]=_react.useState.call(void 0, ),[m,c]=_react.useState.call(void 0, !1),p=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{u(!0),a(void 0),c(!1),yield o({method:"sms"})}catch(S){let{isBlockingError:h,error:v}=R(S);a(v),c(h),h&&(yield _chunkV3WU67WLjs.k.call(void 0, 1500),s(new (0, _chunkDBIA42HBjs.M)(S)))}finally{u(!1)}}),[o,s]),f=_react.useCallback.call(void 0, S=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{u(!0),a(void 0),c(!1),yield t({method:"sms",mfaCode:S}),r?i(r):n({success:!0})}catch(h){let{isBlockingError:v,error:I}=R(h);a(I),c(v),v&&(yield _chunkV3WU67WLjs.k.call(void 0, 1500),s(new (0, _chunkDBIA42HBjs.M)(h)))}finally{u(!1)}}),[i,s,n,r,t]);return _react.useEffect.call(void 0, ()=>{p()},[p]),m?qt.default.createElement(O,{subtitle:d==null?void 0:d.message}):qt.default.createElement(ae,{subtitle:"Please check your phone for a message with your MFA code.",hint:"Didn\u2019t get an SMS?",error:d!=null?d:null,isLoading:l,onSendCode:f,onRequestNewCode:p})}function Zs({config:e}){let{init:o,submit:t}=_chunkV3WU67WLjs.X.call(void 0, ),{ongoingWalletUIFlow:r}=e,i=te(),n=z(),s=D(),[l,u]=_react.useState.call(void 0, !1),[d,a]=_react.useState.call(void 0, ),[m,c]=_react.useState.call(void 0, !1),p=_react.useCallback.call(void 0, f=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){try{if(u(!0),a(void 0),c(!1),yield o({method:"totp"}),yield t({method:"totp",mfaCode:f}),r)return i(r);n({success:!0})}catch(S){let{isBlockingError:h,error:v}=R(S);a(v),c(h),h&&(yield _chunkV3WU67WLjs.k.call(void 0, 1500),s(new (0, _chunkDBIA42HBjs.M)(S)))}finally{u(!1)}}),[o,i,s,n,r,t]);return m?qt.default.createElement(O,{subtitle:d==null?void 0:d.message}):qt.default.createElement(ae,{subtitle:qt.default.createElement(qt.default.Fragment,null,"To continue, please enter the 6-digit code generated from your"," ",qt.default.createElement(_reactnative.Text,{style:Au.strong},"authenticator app")),error:d!=null?d:null,isLoading:l,onSendCode:p})}var Au=_reactnative.StyleSheet.create({strong:{fontFamily:"Inter_600SemiBold"}});var Dr=({config:e})=>{let o=D(),{cancel:t}=_chunkV3WU67WLjs.X.call(void 0, ),r=qt.default.useCallback(()=>{t(),o(new (0, _chunkDBIA42HBjs.M)(new Error("MFA verification was canceled")))},[t,o]);switch(e.type){case"mfa:enrollment:welcome":return qt.default.createElement(Gs,{config:e.payload});case"mfa:enrollment:unenroll":return qt.default.createElement(zs,{config:e.payload});case"mfa:enrollment:landing":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{close:()=>o()}),qt.default.createElement(Hs,{config:e.payload}));case"mfa:enrollment:enroll":return qt.default.createElement(Ns,{config:e.payload});case"mfa:verify:landing":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{close:r}),qt.default.createElement(js,{config:e.payload}));case"mfa:verify:passkey":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{close:r,goBack:e.payload.onBack}),qt.default.createElement(qs,{config:e.payload}));case"mfa:verify:totp":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{close:r,goBack:e.payload.onBack}),qt.default.createElement(Zs,{config:e.payload}));case"mfa:verify:sms":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{close:r,goBack:e.payload.onBack}),qt.default.createElement($s,{config:e.payload}));case"wallet:signature":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{close:()=>o()}),qt.default.createElement(As,{config:e.payload}));case"delegatedActions:consent":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{close:()=>o()}),qt.default.createElement(Es,{config:e.payload}));case"delegatedActions:revoke":return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{close:()=>o()}),qt.default.createElement(Ts,{config:e.payload}));default:throw new Error("Unsupported wallet UI config type")}};function Vu({config:e,goBackRef:o}){let t=lt();return qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_chunkDBIA42HBjs.U,{goBack:()=>{var r;return((r=o.current)!=null?r:t)()}}),qt.default.createElement(Ou,{config:e,goBackRef:o}))}var Ou=({config:e,goBackRef:o})=>{let[t,r]=Bn(),i=t&&kn(e.loginMethods,t),n=uo();if(_chunkV3WU67WLjs.g.call(void 0, )&&(n!=null&&n.requireUsersAcceptTerms))return qt.default.createElement(ws,{termsAndPolicyConfig:n});switch(t){case"email":return qt.default.createElement(Dn,{goBackRef:o,otherLoginMethod:i,onLoginMethodChange:r});case"sms":return qt.default.createElement(Qn,{goBackRef:o,otherLoginMethod:i,onLoginMethodChange:r});case"apple":case"google":case"discord":case"twitter":case"github":case"spotify":case"instagram":case"tiktok":case"line":case"linkedin":case"twitch":case"telegram":return qt.default.createElement(Zi,{oauthProvider:t,goBackRef:o,otherLoginMethod:i,onLoginMethodChange:r});case null:return qt.default.createElement(Ss,{loginMethods:e.loginMethods,onLoginMethodChange:r,goBackRef:o});default:throw new (0, _chunkDBIA42HBjs.L)("unsupported_login_method",`Unsupported login method: ${t}`)}},Du= exports.PrivyElements =({config:e={}})=>{var r;let o=Wn();_react.useEffect.call(void 0, ()=>_chunkV3WU67WLjs.e.call(void 0, ({user:i})=>{i&&o(i)}),[o]),Ps(),_chunkDBIA42HBjs.Q.call(void 0, e),Yi({isMfaUIEnabled:(r=e.mfa)==null?void 0:r.enableMfaVerificationUIs});let t=Nu();return qt.default.createElement(_chunkDBIA42HBjs.a,{appearance:e.appearance},qt.default.createElement(vs,{visible:!!t},t))};function Nu(){let e=_react.useRef.call(void 0, null),o=at(),t=De(),r=qi(),i=_chunkDBIA42HBjs.X.call(void 0, n=>n!==null);return t?qt.default.createElement(Ni,{config:t,goBackRef:e}):i?qt.default.createElement(qt.default.Fragment,null,qt.default.createElement(_reactnative.View,{style:r?Js.hidden:Js.fill},qt.default.createElement(ni,null)),r?qt.default.createElement(Dr,{config:r}):null):o?qt.default.createElement(Vu,{config:o,goBackRef:e}):r?qt.default.createElement(Dr,{config:r}):null}var Js=_reactnative.StyleSheet.create({fill:{flex:1},hidden:{display:"none"}});var zu=()=>{let e=_n(),{setOtpState:o,setOAuthState:t,client:r}=_react.useContext.call(void 0, _chunkV3WU67WLjs.na),i=_react.useCallback.call(void 0, ()=>{o({status:"initial"}),t({status:"initial"})},[t,o]);return{login:_react.useCallback.call(void 0, s=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){let l=_chunkV3WU67WLjs.d.call(void 0, );return{user:yield e(s,r,l,i)}}),[e,r,i])}};var Yu=()=>{let e=he(),{client:o}=_react.useContext.call(void 0, _chunkV3WU67WLjs.na);return{signMessage:_react.useCallback.call(void 0, t=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){var l,u,d,a;let r=_chunkV3WU67WLjs.d.call(void 0, ),i=_jssdkcore.getAllUserEmbeddedEthereumWallets.call(void 0, r)[0],n=i?_jssdkcore.getEntropyDetailsFromUser.call(void 0, r,i):null;if(!i||!n)throw new Error("No embedded Ethereum wallet found");let s=yield o.embeddedWallet.getEthereumProvider({entropyId:n.entropyId,entropyIdVerifier:n.entropyIdVerifier,wallet:i,onMfaEnrollmentRequired:m=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){return yield _chunkV3WU67WLjs.b.call(void 0, )(m)}),onMfaVerificationRequired:m=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){return yield _chunkV3WU67WLjs.c.call(void 0, )(m)})});return yield e({type:"wallet:signature",payload:{message:t.message,logo:(l=t.appearance)==null?void 0:l.logo,buttonText:(u=t.appearance)==null?void 0:u.buttonText,description:(d=t.appearance)==null?void 0:d.description,title:(a=t.appearance)==null?void 0:a.title,onSignMessage:m=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){return m instanceof Uint8Array&&(m=Tt(m)),yield s.request({method:"personal_sign",params:[m,i.address]})})}})}),[o,e])}};var Ru=()=>{let e=he(),{client:o}=_react.useContext.call(void 0, _chunkV3WU67WLjs.na);return{signMessage:_react.useCallback.call(void 0, t=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){var a,m,c,p;let r=_chunkV3WU67WLjs.d.call(void 0, ),i=_jssdkcore.getAllUserEmbeddedSolanaWallets.call(void 0, r),n=t.address?i.find(f=>f.address===t.address):i[0];if(!n)throw new Error("Solana account not found");let s=_jssdkcore.getEntropyDetailsFromUser.call(void 0, r,n);if(!s)throw new Error("No embedded Solana wallets found");let{entropyId:l,entropyIdVerifier:u}=s,d=yield o.embeddedWallet.getSolanaProvider(n,l,u,void 0,void 0,void 0,void 0,f=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){return yield _chunkV3WU67WLjs.b.call(void 0, )(f)}),f=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){return yield _chunkV3WU67WLjs.c.call(void 0, )(f)}));return yield e(_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {type:"wallet:signature"},t),{payload:{message:t.message,logo:(a=t.appearance)==null?void 0:a.logo,buttonText:(m=t.appearance)==null?void 0:m.buttonText,description:(c=t.appearance)==null?void 0:c.description,title:(p=t.appearance)==null?void 0:p.title,onSignMessage:f=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){return f instanceof Uint8Array&&(f=_encoding.encoding.base64.fromBytes(f)),yield d.request({method:"signMessage",params:{message:f}})})}}))}),[o,e])}};var op=()=>{let e=he(),{client:o}=_react.useContext.call(void 0, _chunkV3WU67WLjs.na),t=_react.useMemo.call(void 0, ()=>_jssdkcore.delegatedActions.delegateWallet(o),[o]),r=_react.useMemo.call(void 0, ()=>_jssdkcore.delegatedActions.revokeWallets(o),[o]);return{delegateWallet:_react.useCallback.call(void 0, i=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){let{name:n}=yield o.app.getConfig();return yield e({type:"delegatedActions:consent",payload:{appName:n,onConsent:()=>t(i)}})}),[o,t,e]),revokeWallets:_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){let{name:i}=yield o.app.getConfig();return yield e({type:"delegatedActions:revoke",payload:{appName:i,onRevoke:()=>r()}})}),[o,r,e])}};function ta(t){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({chain:e,erc20Address:o}){let r=_viem.createPublicClient.call(void 0, {chain:e,transport:_viem.http.call(void 0, )}),[i,n]=yield Promise.all([r.readContract({abi:oa,address:o,functionName:"symbol"}),r.readContract({abi:oa,address:o,functionName:"decimals"})]);return{decimals:n,symbol:i}})}var oa=[{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];function dp(){let e=_chunkV3WU67WLjs.o.call(void 0, ),o=vt();return{fundWallet:_react.useCallback.call(void 0, u=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){var d=u,{address:r,asset:i,chain:n,amount:s}=d,l=_chunkC5WYSLQFjs.d.call(void 0, d,["address","asset","chain","amount"]);var F,q,ge,je,U,qe,_t,Mo,Io,Nr;let a=e.app.getConfig(),m=(a==null?void 0:a.name)||"",c=(F=a==null?void 0:a.funding_config)==null?void 0:F.default_recommended_amount,p=(q=a==null?void 0:a.funding_config)==null?void 0:q.default_recommended_currency.asset,f=(ge=a==null?void 0:a.funding_config)==null?void 0:ge.default_recommended_currency.chain.replace("eip155:",""),S=f?_jssdkcore.getSupportedChainById.call(void 0, +f):void 0,h=(U=(je=a==null?void 0:a.funding_config)==null?void 0:je.options)!=null?U:[],v=n!=null?n:S,I=(qe=i!=null?i:p)!=null?qe:"native-currency",_=(_t=s!=null?s:c)==null?void 0:_t.trim();if(!v)throw new (0, _chunkDBIA42HBjs.L)("chain_not_supported",`Chain with id ${(Mo=n==null?void 0:n.id)!=null?Mo:f} is not supported`);if(!_)throw new (0, _chunkDBIA42HBjs.L)("amount_not_specified","amount was not specified");let T;if(I==="USDC"){let Ce=_jssdkcore.UsdcAddressMap[v.id];if(!Ce)throw new (0, _chunkDBIA42HBjs.L)("asset_not_supported",`Chain with id ${v.id} does not support USDC`);T={address:Ce,symbol:"USDC",decimals:6}}else if(typeof I=="object"&&I.tokenAddress)if(_jssdkcore.getIsTokenUsdc.call(void 0, I.tokenAddress,v))T={address:I.tokenAddress,symbol:"USDC",decimals:6};else{let Ce=yield ta({chain:v,erc20Address:I.tokenAddress}).catch(console.error);if(!Ce)throw new (0, _chunkDBIA42HBjs.L)("asset_info_not_found",`Asset ${I.tokenAddress} information could not be found`);T={address:I.tokenAddress,symbol:Ce.symbol,decimals:Ce.decimals}}let C=h.filter(({provider:Ce})=>{let Hr=(T==null?void 0:T.symbol)==="USDC"?"USDC":"native-currency";if(Ce==="moonpay")return _jssdkcore.isSupportedChainIdForMoonpay.call(void 0, v.id,Hr);if(Ce==="coinbase")return _jssdkcore.toCoinbaseBlockchainFromChainId.call(void 0, v.id)&&_jssdkcore.isSupportedChainIdForCoinbaseOnramp.call(void 0, v.id,Hr)}),x=_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},l),{chainType:"ethereum",appName:m,address:r,tokenInfo:T,paymentOptions:C,chain:v,asset:I,amount:_}),k=o(x);return l.defaultPaymentMethod&&(yield So({client:e,method:l.defaultPaymentMethod,provider:l.defaultPaymentMethod==="card"&&(Nr=(Io=l.card)==null?void 0:Io.preferredProvider)!=null?Nr:"coinbase",config:x})),yield k}),[o,e])}}function gp(){let e=_chunkV3WU67WLjs.o.call(void 0, ),o=vt();return{fundWallet:_react.useCallback.call(void 0, u=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){var d=u,{address:r,asset:i,amount:n,cluster:s}=d,l=_chunkC5WYSLQFjs.d.call(void 0, d,["address","asset","amount","cluster"]);var C,x,k,F,q,ge,je,U;let a=e.app.getConfig(),m=(a==null?void 0:a.name)||"",c=(C=a==null?void 0:a.funding_config)==null?void 0:C.default_recommended_amount,p=(x=a==null?void 0:a.funding_config)==null?void 0:x.default_recommended_currency.asset,f=(F=(k=a==null?void 0:a.funding_config)==null?void 0:k.options)!=null?F:[],S=(q=i!=null?i:p)!=null?q:"native-currency",h=(ge=n!=null?n:c)==null?void 0:ge.trim(),v=s!=null?s:{name:"mainnet-beta"};if(!h)throw new (0, _chunkDBIA42HBjs.L)("amount_not_specified","amount was not specified");let I;S==="USDC"&&(I={symbol:"USDC",decimals:6,address:_jssdkcore.getSolanaUsdcMintAddressForCluster.call(void 0, v)});let _=_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},l),{chainType:"solana",appName:m,address:r,tokenInfo:I,paymentOptions:f,asset:S,amount:h,cluster:{name:v.name,rpcUrl:_jssdkcore.getSolanaRpcEndpointForCluster.call(void 0, v)}}),T=o(_);return l.defaultPaymentMethod&&(yield So({client:e,method:l.defaultPaymentMethod,provider:l.defaultPaymentMethod==="card"&&(U=(je=l.card)==null?void 0:je.preferredProvider)!=null?U:"coinbase",config:_})),yield T}),[o,e])}}exports.PrivyElements = Du; exports.PrivyUIError = _chunkDBIA42HBjs.L; exports.useDelegatedActions = op; exports.useFundSolanaWallet = gp; exports.useFundWallet = dp; exports.useLogin = zu; exports.useMfaEnrollmentUI = ur; exports.useSignMessage = Yu; exports.useSolanaSignMessage = Ru;
|