@privy-io/expo 0.63.8 → 0.63.9

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/ui.js CHANGED
@@ -1,4 +1,4 @@
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 _chunkULTUNRFWjs = require('./chunk-ULTUNRFW.js');var _chunkFS424Q3Ojs = require('./chunk-FS424Q3O.js');var _chunkQTVIWU3Njs = require('./chunk-QTVIWU3N.js');var _react = require('react'); var Nt = _interopRequireWildcard(_react); var ro = _interopRequireWildcard(_react); var aa = _interopRequireWildcard(_react); var It = _interopRequireWildcard(_react); var yt = _interopRequireWildcard(_react); var mo = _interopRequireWildcard(_react); var go = _interopRequireWildcard(_react); var Ia = _interopRequireWildcard(_react); var Lo = _interopRequireWildcard(_react); var ta = _interopRequireWildcard(_react); var ho = _interopRequireWildcard(_react); var Co = _interopRequireWildcard(_react); var xo = _interopRequireWildcard(_react); var So = _interopRequireWildcard(_react); var yo = _interopRequireWildcard(_react);function ua(){let e=_chunkFS424Q3Ojs.l.call(void 0, ),{isReady:a}=_chunkFS424Q3Ojs.X.call(void 0, ),t=_chunkFS424Q3Ojs.d.call(void 0, );return _react.useMemo.call(void 0, ()=>{var s,u;if(!a)return null;let o=e.app.getConfig();if(!o)return null;let r=(s=o.require_users_accept_terms)!=null?s:!1,l=(u=t==null?void 0:t.has_accepted_terms)!=null?u:!1;return{termsAndConditionsUrl:o.terms_and_conditions_url,privacyPolicyUrl:o.privacy_policy_url,requireUsersAcceptTerms:r&&!l}},[e.app,a,t==null?void 0:t.has_accepted_terms])}var _reactnative = require('react-native');var _jssdkcore = require('@privy-io/js-sdk-core');var _reactnativesvg = require('react-native-svg'); var Rt = _interopRequireWildcard(_reactnativesvg);var Xo=({color:e})=>{let a=_reactnative.useAnimatedValue.call(void 0, 0);_react.useEffect.call(void 0, ()=>{a.setValue(0);let o=_reactnative.Animated.loop(_reactnative.Animated.timing(a,{toValue:1,duration:1200,useNativeDriver:!0,easing:_reactnative.Easing.linear}));return o.start(),()=>o.stop()},[a]);let t=a.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return Nt.default.createElement(_reactnative.Animated.View,{style:{transform:[{rotate:t}]}},Nt.default.createElement(Rt.default,{width:20,height:20,viewBox:"0 0 20 20",fill:"none"},Nt.default.createElement(_reactnativesvg.Path,{d:"M19 10a9 9 0 11-6.219-8.56",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))};var et=_react.createContext.call(void 0, void 0);var Ko="#5B4FFF";function Zo({colorScheme:e,accentHex:a}){return e==="dark"?{interactive:a,background:"#22222A",backgroundSecondary:"#010110",backgroundInformation:"#1E1B4B",backgroundTertiary:"#010110",backgroundHighlight:"#052E16",text:"#ffffff",textPlaceholder:"#9498B8",textMuted:"#FFFFFF",textHighlight:"#BBF7D0",textTitle:"#FFFFFF",textInteractive:"#FFFFFF",icon:"#FFFFFF",iconInformation:"#818CF8",iconSubtle:"#919191",privyBrand:"#FFFFFF",success:"#4ADE80",successLight:"#C5F7D7",border:"#474869",borderInformation:"#818CF8",error:"#FCA5A5",errorDark:"#EF4444"}:{interactive:a,background:"#FFFFFF",backgroundSecondary:"#F3F3F3",backgroundInformation:"#E0E7FF",backgroundTertiary:"#FFFFFF",backgroundHighlight:"#F1F2F9",text:"#040217",textPlaceholder:"#9498B8",textMuted:"#64668B",textHighlight:"#64668B",textTitle:"#1A1C29",textInteractive:"#FFFFFF",icon:"#110F2A",iconSubtle:"#9498B8",iconInformation:"#4F46E5",privyBrand:"#010110",success:"#16A34A",successLight:"#DCFCE7",border:"#E2E3F0",borderInformation:"#5B4FFF",error:"#EF4444",errorDark:"#B91C1C"}}function jo({colorScheme:e,accentHex:a}){return{colors:Zo({colorScheme:e,accentHex:a}),colorScheme:e}}function Dt({children:e,appearance:a={}}){let{colorScheme:t="light",accentColor:o}=a,{isReady:r,client:l}=_react.useContext.call(void 0, _chunkFS424Q3Ojs._),s=_react.useMemo.call(void 0, ()=>{var i,d;let u=r?l.app.getConfig():void 0,c=(i=u==null?void 0:u.accent_color)!=null?i:void 0;return jo({colorScheme:t,accentHex:(d=o!=null?o:c)!=null?d:Ko})},[t,o,r,l]);return Nt.default.createElement(et.Provider,{value:s},e)}var p=()=>{let e=_react.useContext.call(void 0, et);if(e===void 0)throw new Error("Components calling useTheme must be wrapped in an ElementsThemeProvider");return e};var y=i=>{var d=i,{variant:e="primary",title:a,destroy:t=!1,loading:o=!1,LeftIcon:r,RightIcon:l,color:s,style:u}=d,c=_chunkQTVIWU3Njs.c.call(void 0, d,["variant","title","destroy","loading","LeftIcon","RightIcon","color","style"]);let{colors:f}=p(),n=t?f.errorDark:f.interactive,m={primary:n,secondary:f.backgroundTertiary,tertiary:f.background}[e],g={primary:f.textInteractive,secondary:f.text,tertiary:n}[e];return Nt.default.createElement(_reactnative.Pressable,_chunkQTVIWU3Njs.b.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {},c),{disabled:c.disabled||o}),Nt.default.createElement(_reactnative.View,{style:[wa.buttonBox,{backgroundColor:m},e==="secondary"&&wa.buttonBoxSecondary,e==="secondary"&&{borderColor:f.border},u]},o?Nt.default.createElement(Xo,{color:s!=null?s:g}):Nt.default.createElement(Nt.default.Fragment,null,r,Nt.default.createElement(_reactnative.Text,{style:[wa.buttonLabel,{color:s!=null?s:g},e==="secondary"&&wa.buttonLabelSecondary,e==="tertiary"&&wa.buttonLabelTertiary]},a),!!l&&Nt.default.createElement(_reactnative.View,{style:{marginLeft:"auto"}},l))))},wa=_reactnative.StyleSheet.create({buttonBox:{height:54,flexDirection:"row",justifyContent:"center",alignItems:"center",borderRadius:14,paddingHorizontal:16,gap:12},buttonBoxSecondary:{justifyContent:"flex-start",borderWidth:1,borderRadius:12},buttonLabel:{fontFamily:"Inter_600SemiBold",fontSize:16,lineHeight:24},buttonLabelSecondary:{fontFamily:"Inter_400Regular"},buttonLabelTertiary:{fontFamily:"Inter_500Medium"}});var Yo=({value:e,isFocused:a,isSuccess:t,isError:o})=>{let{colors:r}=p();return Nt.default.createElement(_reactnative.View,{style:[Et.box,{borderColor:o?r.error:t?r.success:a?r.interactive:r.border},a&&Et.focusedBox]},Nt.default.createElement(_reactnative.Text,{style:[Et.text,{color:r.text}]},e))},Et=_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 Ot=6,eu=[0,1,2,"-",3,4,5];function qt({value:e="",status:a=" ",onChangeText:t=()=>{},editable:o=!0,success:r=!1,error:l=!1,autoFocus:s=!1}){let{colors:u}=p(),c=_react.useRef.call(void 0, null),[i,d]=_react.useState.call(void 0, !1),[f,n]=_react.useState.call(void 0, {start:0,end:0}),m=h=>{let I=h.replace(/\D/g,"");t(I.substring(0,Ot))},g=i?Math.min(e.length,Ot-1):void 0;return Nt.default.createElement(_reactnative.View,{style:Pa.container},Nt.default.createElement(_reactnative.TextInput,{autoFocus:s,style:Pa.invisibleTextInput,value:e,onChangeText:m,maxLength:Ot,ref:c,editable:o,onFocus:()=>{d(!0),n({start:0,end:e.length||0})},onBlur:()=>d(!1),onSelectionChange:h=>n(h.nativeEvent.selection),selection:f,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"}),Nt.default.createElement(_reactnative.View,{style:Pa.codeContainer,pointerEvents:"none"},eu.map((h,I)=>h==="-"?Nt.default.createElement(au,{key:I}):Nt.default.createElement(Yo,{key:I,isFocused:g===h,value:e[h]||"",isSuccess:r,isError:l}))),Nt.default.createElement(_reactnative.Text,{style:[Pa.statusText,{color:l?u.errorDark:r?u.success:u.textMuted}]},a))}var au=()=>{let{colors:e}=p();return Nt.default.createElement(_reactnative.Text,{style:[Pa.separator,{color:e.text}]},"-")},Pa=_reactnative.StyleSheet.create({container:{justifyContent:"center",paddingHorizontal:0,gap:6},invisibleTextInput:{position:"absolute",width:"100%",height:60,backgroundColor:"transparent",color:"transparent",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 k=({title:e,subtitle:a,tight:t=!1,style:o})=>{let{colors:r}=p();return Nt.default.createElement(_reactnative.View,{style:[at.titleContainer,t&&at.tightContainer,o]},Nt.default.createElement(_reactnative.Text,{style:[at.title,{color:r.textTitle}]},e),a&&Nt.default.createElement(_reactnative.Text,{style:[at.subtitle,{color:r.textMuted}]},a))},at=_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 lr=({hint:e,link:a,onPress:t,disabled:o})=>{let{colors:r}=p();return Nt.default.createElement(_reactnative.View,{style:Vt.container},Nt.default.createElement(_reactnative.Text,{style:[Vt.hintText,{color:r.textMuted}]},e),a&&Nt.default.createElement(_reactnative.Pressable,{onPress:t,disabled:o},Nt.default.createElement(_reactnative.Text,{style:[Vt.linkText,{color:o?r.textMuted:r.interactive}]}," ",a)))},Vt=_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 pu=3e4,mu=()=>{let[e,a]=_react.useState.call(void 0, !1),t=_react.useCallback.call(void 0, ()=>{a(!1),setTimeout(()=>{a(!0)},pu)},[]);return _react.useEffect.call(void 0, ()=>{t()},[t]),[e,t]},se=({onSendCode:e,onRequestNewCode:a,subtitle:t,isLoading:o,error:r,isDone:l=!1,hint:s})=>{let[u,c]=_react.useState.call(void 0, ""),i=m=>{c(m),m.length===6&&e(m)},[d,f]=mu(),n=a&&(()=>{a(),f()});return Nt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:_t.innerContainer},Nt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},Nt.default.createElement(_reactnative.View,{style:_t.content},Nt.default.createElement(_reactnative.View,{style:_t.formContainer},Nt.default.createElement(k,{title:"Enter confirmation code",subtitle:t}),Nt.default.createElement(qt,{value:u,editable:!o,onChangeText:i,success:l,error:!!r,status:l?"Success.":r?gu(r):" ",autoFocus:!0}),!!n&&Nt.default.createElement(lr,{hint:s||"Didn\u2019t get a message?",link:"Resend code",onPress:n,disabled:!d}))),Nt.default.createElement(y,{title:"Continue",loading:o,onPress:()=>e(u),variant:"primary"})))},gu=_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."}),_t=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:16},formContainer:{rowGap:24}});var Ze={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ur={fill:Ze.fill,stroke:Ze.stroke,strokeWidth:Ze.strokeWidth,strokeLinecap:Ze.strokeLinecap,strokeLinejoin:Ze.strokeLinejoin};var x=(e,a)=>{let t=_react.forwardRef.call(void 0, (f,d)=>{var n=f,{color:o="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:s,children:u,"data-testid":c}=n,i=_chunkQTVIWU3Njs.c.call(void 0, n,["color","size","strokeWidth","absoluteStrokeWidth","children","data-testid"]);let m=_chunkQTVIWU3Njs.a.call(void 0, {stroke:o,strokeWidth:s?Number(l)*24/Number(r):l},i);return _react.createElement.call(void 0, Rt.Svg,_chunkQTVIWU3Njs.a.call(void 0, _chunkQTVIWU3Njs.b.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {ref:d},Ze),{width:r,height:r,"data-testid":c}),m),[...a.map(([g,h])=>{let I=g.charAt(0).toUpperCase()+g.slice(1);return _react.createElement.call(void 0, Rt[I],_chunkQTVIWU3Njs.a.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {},ur),m),h))}),...(Array.isArray(u)?u:[u])||[]])});return t.displayName=`${e}`,t};var Ma=x("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);var Fa=x("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var va=x("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);var xe=x("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var ka=x("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var Se=x("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var Te=x("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var be=x("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var Be=x("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var ue=x("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var Aa=x("Clock10",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 8 10",key:"atfzqc"}]]);var Ue=x("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);var je=x("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var Ta=x("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var De=x("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var ba=x("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);var ce=x("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);var Je=x("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var Ba=x("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);var Qe=x("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);var ye=x("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);var Ua=x("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);var Ye=x("ScanFace",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 9h.01",key:"x1ddxp"}]]);var Da=x("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var we=x("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var $e=x("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);var Ea=x("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);var Oa=x("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var _expowebbrowser = require('expo-web-browser'); var zt = _interopRequireWildcard(_expowebbrowser); var Xr = _interopRequireWildcard(_expowebbrowser); var wo = _interopRequireWildcard(_expowebbrowser);function da(){let e=ua(),{colors:a}=p();if(!e)return null;let{termsAndConditionsUrl:t,privacyPolicyUrl:o,requireUsersAcceptTerms:r}=e;if(r||!t&&!o)return null;let l=!!(t&&o);return Nt.default.createElement(_reactnative.View,{style:rt.container},Nt.default.createElement(_reactnative.Text,{style:[rt.hintText,{color:a.textMuted}]},"By logging in I agree to the"," ",t&&Nt.default.createElement(_reactnative.Text,{style:[rt.linkText,{color:a.interactive}],onPress:()=>zt.openBrowserAsync(t)},l?"Terms":"Terms of Service"),!1,l&&" & ",o&&Nt.default.createElement(_reactnative.Text,{style:[rt.linkText,{color:a.interactive}],onPress:()=>zt.openBrowserAsync(o)},"Privacy Policy")))}var rt=_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 ir = _interopRequireWildcard(_expolinking); var Nr = _interopRequireWildcard(_expolinking); var ms = _interopRequireWildcard(_expolinking);var Su=e=>Nt.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40"},e),Nt.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"})),nr=Su;var Mu="https://privy.io/?utm_source=module&utm_medium=module&utm_campaign=registration_module",B=()=>{let{colors:e}=p();return Nt.default.createElement(_reactnative.View,{style:Fu.legalFooterContainer},Nt.default.createElement(_reactnative.Pressable,{onPress:()=>ir.openURL(Mu),accessibilityRole:"link"},Nt.default.createElement(nr,{color:e.privyBrand,width:"100%",height:11})))},Fu=_reactnative.StyleSheet.create({legalFooterContainer:{flexDirection:"row",alignItems:"center",marginVertical:16,justifyContent:"center",gap:2}});var na=r=>{var l=r,{error:e,status:a,LeftIcon:t}=l,o=_chunkQTVIWU3Njs.c.call(void 0, l,["error","status","LeftIcon"]);let{colors:s}=p(),[u,c]=_react.useState.call(void 0, !1);return Nt.default.createElement(_reactnative.View,{style:st.container},Nt.default.createElement(_reactnative.View,{style:[st.inputBox,{backgroundColor:s.backgroundSecondary,borderColor:s.border},u&&{borderColor:s.interactive},e&&{borderColor:s.error}]},t,Nt.default.createElement(_reactnative.TextInput,_chunkQTVIWU3Njs.a.call(void 0, {cursorColor:s.interactive,placeholderTextColor:s.textPlaceholder,onFocus:()=>c(!0),onBlur:()=>c(!1),autoCapitalize:"none",returnKeyType:"next",multiline:!1,numberOfLines:1,style:[st.input,{color:s.text}]},o))),a&&Nt.default.createElement(_reactnative.Text,{style:[st.statusText,{color:s.textMuted},e&&{color:s.errorDark}]},a))},st=_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 pr=({sendCode:e,isLoading:a,error:t,initialEmail:o,FooterComponent:r})=>{let[l,s]=_react.useState.call(void 0, o!=null?o:""),{colors:u}=p();return Nt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:ut.innerContainer},Nt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},Nt.default.createElement(_reactnative.View,{style:ut.content},Nt.default.createElement(_reactnative.View,{style:ut.content},Nt.default.createElement(_reactnative.View,{style:ut.formContainer},Nt.default.createElement(k,{title:"Enter your email"}),Nt.default.createElement(na,{LeftIcon:Nt.default.createElement(Qe,{size:24,color:u.icon}),value:l,onChangeText:s,error:!!t,status:t?Ou(t):" ",placeholder:"your@email.com",autoComplete:"email",keyboardType:"email-address",autoFocus:!0})),r),Nt.default.createElement(B,null)),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:"Continue",loading:a,onPress:()=>e(l)}),Nt.default.createElement(da,null))))},Ou=_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."}),ut=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:4},formContainer:{rowGap:24}});var _zustand = require('zustand');var S=class extends Error{constructor(t,o){super(o);this.code=t,this.error=o}},A=class extends S{constructor(t){super("underlying_error",t instanceof Error?t.message:"An underlying error occurred");this.wrappedError=t}};var Kt={success:e=>({value:e}),error:e=>({error:e})};var mr=e=>{let a=Array.from(new Set(e));return a.length===0?Kt.error(new S("no_login_methods_available","No login methods available")):Kt.success(a)},Zt=e=>{let a=e.length,t=e.every(o=>o==="sms"||o==="email");return a<=2&&t?e[0]:null},gr=(e,a)=>{if(e.length!==2)return null;let[t,o]=e;return a===t?o:t},Ee={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"};var _vanilla = require('zustand/vanilla');var jt=_vanilla.createStore.call(void 0, )(e=>({elementsConfig:null,updateUIMounted:a=>e({elementsConfig:a})})),ia=()=>{let{elementsConfig:e}=jt.getState();if(!(e!==null))throw new S("privy_elements_not_ready","Privy Elements is not mounted")},Lr=()=>{let{elementsConfig:e}=jt.getState();if(e===null)throw new S("privy_elements_not_ready","Privy Elements is not mounted");return e},Ir=e=>{_react.useEffect.call(void 0, ()=>{let{updateUIMounted:a}=jt.getState();return a(e),()=>{a(null)}},[e])};function fa(e){return new Promise((a,t)=>{e({resolve:a,reject:t})})}function Vu(e,a){return{resolve:t=>{a(),e.resolve(t)},reject:t=>{a(),e.reject(t)}}}function dt(e,a,t){let o=setTimeout(()=>{e.reject(a())},t);return Vu(e,()=>{clearTimeout(o)})}var Ru=1e3*60*5,ea=_zustand.create.call(void 0, )((e,a)=>({privyElementsConfig:null,loginPromiseResolvers:null,activeLoginMethod:null,openLoginFlow:(t,o,r,l)=>fa(s=>{var f,n,m;let u=o.app.getConfig();if(!u)return s.reject(new S("privy_not_ready","Privy is not ready"));if(r!==null)return s.reject(new S("user_already_logged_in","User is already logged in"));if(ia(),a().loginPromiseResolvers!==null)return s.reject(new S("existing_login_flow_in_progress","A login flow is already in progress"));let c=mr(t.loginMethods);if(c.error)return s.reject(c.error);let i={loginMethods:c.value,appearance:{logo:(m=(n=(f=t.appearance)==null?void 0:f.logo)!=null?n:u.logo_url)!=null?m:void 0}},d=dt(s,()=>(e({privyElementsConfig:null,loginPromiseResolvers:null}),new S("login_flow_timeout","The login flow timed out")),Ru);l(),e({loginPromiseResolvers:d,privyElementsConfig:i,activeLoginMethod:Zt(i.loginMethods)})}),closeLoginFlow:()=>{var t;return(t=a().loginPromiseResolvers)==null||t.reject(new S("login_flow_closed","The login flow was closed")),e({privyElementsConfig:null,loginPromiseResolvers:null})},goBack:()=>{let{activeLoginMethod:t,privyElementsConfig:o,updateActiveLoginMethod:r,closeLoginFlow:l}=a();if(!o){l();return}let s=Zt(o.loginMethods)===null;t===null||!s?l():r(null)},updateActiveLoginMethod:t=>e({activeLoginMethod:t})})),nt=()=>ea(e=>e.privyElementsConfig),hr=()=>ea(e=>e.openLoginFlow),Oe=()=>{let e=ea(t=>t.closeLoginFlow),a=ua();return _react.useCallback.call(void 0, t=>{a!=null&&a.requireUsersAcceptTerms&&!(t!=null&&t.termsReviewed)||e()},[e,a])},it=()=>ea(e=>e.goBack),Cr=()=>[ea(e=>e.activeLoginMethod),ea(e=>e.updateActiveLoginMethod)],Gu=e=>{let{loginPromiseResolvers:a}=ea.getState();a==null||a.resolve(e)},xr=()=>Gu;var ft=({onLoginMethodChange:e,otherLoginMethod:a})=>a?Nt.default.createElement(y,{variant:"tertiary",title:`Use ${Ee[a]} instead`,onPress:()=>e(a)}):null;var Ku=600,wr=({goBackRef:e,onLoginMethodChange:a,otherLoginMethod:t})=>{let{setOtpState:o}=_react.useContext.call(void 0, _chunkFS424Q3Ojs._),r=Oe(),[l,s]=_react.useState.call(void 0, ""),{state:u,loginWithCode:c,sendCode:i}=_chunkFS424Q3Ojs.r.call(void 0, ),[d,f]=_react.useState.call(void 0, "email"),{step:n,error:m=null,isLoading:g=!1,isDone:h=!1}=_react.useMemo.call(void 0, ()=>{var I;switch(u.status){case"initial":return{step:{type:"email"}};case"sending-code":return{step:{type:d},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:d},error:(I=u.error)!=null?I:new Error("Unknown error")}}},[d,u.status]);switch(d!==n.type&&f(n.type),_react.useEffect.call(void 0, ()=>{if(!h)return;let I=setTimeout(()=>{r()},Ku);return()=>clearTimeout(I)},[h,r]),_react.useEffect.call(void 0, ()=>{if(n.type==="code")return e.current=()=>{o({status:"initial"})},()=>{e.current=null}},[n.type,o]),n.type){case"code":return Nt.default.createElement(se,{onSendCode:I=>c({code:I,email:l}),onRequestNewCode:()=>i({email:l}),subtitle:`Please check ${l} for a message with your login code.`,isLoading:g,error:m,isDone:h});case"email":return Nt.default.createElement(pr,{initialEmail:l,sendCode:I=>{s(I),i({email:I})},isLoading:g,error:m,FooterComponent:Nt.default.createElement(ft,{onLoginMethodChange:a,otherLoginMethod:t})})}};function Pr(e,a){let[t,o]=_react.useState.call(void 0, e);return _react.useEffect.call(void 0, ()=>{let r=setTimeout(()=>{o(e)},a);return()=>{clearTimeout(r)}},[e,a]),t}var Mr=[["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 Yu=Mr,Fr=Yu.map(([e,a,t])=>({name:e,code:a,callCode:_jssdkcore.getCountryCallingCode.call(void 0, a),flag:t}));var kr=({country:e,onPress:a,selected:t})=>{let{colors:o}=p();return Nt.default.createElement(_reactnative.Pressable,{onPress:a},Nt.default.createElement(_reactnative.View,{style:Qt.row},Nt.default.createElement(_reactnative.Text,{style:Qt.rowFlag},e.flag),Nt.default.createElement(_reactnative.Text,{style:[Qt.rowLabel,{color:o.text}]},e.name," (+",e.callCode,")"),t&&Nt.default.createElement(xe,{size:24,color:o.interactive})))},Qt=_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 nd=600,Tr=({countryCode:e,onChangeCountryCode:a,onComplete:t})=>{let{colors:o}=p(),[r,l]=_react.useState.call(void 0, ""),s=Pr(r,nd),u=_react.useMemo.call(void 0, ()=>Fr.filter(c=>c.name.toLowerCase().includes(s.toLowerCase())),[s]);return Nt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:Ar.innerContainer},Nt.default.createElement(_reactnative.View,{style:Ar.header},Nt.default.createElement(k,{title:"Select country code"}),Nt.default.createElement(na,{LeftIcon:Nt.default.createElement(Da,{size:24,color:o.iconSubtle}),value:r,onChangeText:l,placeholder:"Search country"})),Nt.default.createElement(_reactnative.FlatList,{style:{flex:1},data:u,keyExtractor:c=>`country-option-${c.code}`,renderItem:({item:c})=>Nt.default.createElement(kr,{country:c,selected:c.code===e,onPress:()=>{a(c.code),t()}})}),Nt.default.createElement(y,{title:"Continue",onPress:t}))},Ar=_reactnative.StyleSheet.create({innerContainer:{flex:1,paddingHorizontal:16},header:{gap:20}});var Br=({countryCode:e,onPress:a})=>{let{colors:t}=p();return Nt.default.createElement(_reactnative.Pressable,{onPress:a},Nt.default.createElement(_reactnative.View,{style:br.cell},Nt.default.createElement(_reactnative.Text,{style:[br.text,{color:t.text}]},e," +",_jssdkcore.getCountryCallingCode.call(void 0, e)),Nt.default.createElement(ka,{size:16,color:t.icon})))},br=_reactnative.StyleSheet.create({cell:{flexDirection:"row",alignItems:"center",gap:6},text:{fontFamily:"Inter_400Regular",fontSize:18,lineHeight:30}});var mt=({sendCode:e,isLoading:a,error:t,initialPhone:o,FooterComponent:r})=>{let[l,s]=_react.useState.call(void 0, o!=null?o:""),[u,c]=_react.useState.call(void 0, "US"),[i,d]=_react.useState.call(void 0, !1),f=_jssdkcore.phoneNumberTypingFormatter.call(void 0, u),n=_jssdkcore.getPlaceholderPhoneNumber.call(void 0, u),m=g=>{try{let h=g.replace(/\D/g,""),I=l.replace(/\D/g,""),w=h===I?g:f.input(g);s(w)}catch(h){console.error("Error processing phone number:",h),s("")}};return i?Nt.default.createElement(Tr,{countryCode:u,onChangeCountryCode:c,onComplete:()=>d(!1)}):Nt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:pt.innerContainer},Nt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},Nt.default.createElement(_reactnative.View,{style:pt.content},Nt.default.createElement(_reactnative.View,{style:pt.content},Nt.default.createElement(_reactnative.View,{style:pt.formContainer},Nt.default.createElement(k,{title:"Enter your phone"}),Nt.default.createElement(na,{LeftIcon:Nt.default.createElement(Br,{countryCode:u,onPress:()=>d(!0)}),value:l,onChangeText:m,error:!!t,status:t?yd(t):" ",placeholder:n,autoComplete:"tel",keyboardType:"phone-pad",autoFocus:!0})),r),Nt.default.createElement(B,null)),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:"Continue",loading:a,onPress:()=>e(_jssdkcore.formatPhoneNumber.call(void 0, l.replace(/\D/g,""),u))}),Nt.default.createElement(da,null))))},yd=_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."}),pt=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:4},formContainer:{rowGap:24}});var Md=600,Er=({goBackRef:e,onLoginMethodChange:a,otherLoginMethod:t})=>{let{setOtpState:o}=_react.useContext.call(void 0, _chunkFS424Q3Ojs._),r=Oe(),[l,s]=_react.useState.call(void 0, ""),{state:u,loginWithCode:c,sendCode:i}=_chunkFS424Q3Ojs.t.call(void 0, ),[d,f]=_react.useState.call(void 0, "phone"),{step:n,error:m=null,isLoading:g=!1,isDone:h=!1}=_react.useMemo.call(void 0, ()=>{var I;switch(u.status){case"initial":return{step:{type:"phone"}};case"sending-code":return{step:{type:d},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:d},error:(I=u.error)!=null?I:new Error("Unknown error")}}},[d,u.status]);switch(d!==n.type&&f(n.type),_react.useEffect.call(void 0, ()=>{if(!h)return;let I=setTimeout(()=>{r()},Md);return()=>clearTimeout(I)},[h,r]),_react.useEffect.call(void 0, ()=>{if(n.type==="code")return e.current=()=>{o({status:"initial"})},()=>{e.current=null}},[n.type,o,r]),n.type){case"phone":return Nt.default.createElement(mt,{initialPhone:l,sendCode:I=>{s(I),i({phone:I})},isLoading:g,error:m,FooterComponent:Nt.default.createElement(ft,{onLoginMethodChange:a,otherLoginMethod:t})});case"code":return Nt.default.createElement(se,{onSendCode:I=>c({code:I,phone:l}),onRequestNewCode:()=>i({phone:l}),subtitle:`Please check ${l} for a message with your login code.`,isLoading:g,error:m,isDone:h})}};var Ad=28,Td=24,Or=({close:e,style:a})=>{let{colors:t}=p();return Nt.default.createElement(_reactnative.View,{style:[bd.slimNavigationBar,a]},e&&Nt.default.createElement(_reactnative.Pressable,{onPress:e},Nt.default.createElement(ue,{color:t.icon,size:Td})))},bd=_reactnative.StyleSheet.create({slimNavigationBar:{height:Ad,paddingBottom:4,flexDirection:"row",justifyContent:"flex-end",backgroundColor:"transparent"}});var b=({goBack:e,close:a})=>Nt.default.createElement(_reactnative.View,{style:ao.navigationBar},Nt.default.createElement(_reactnative.View,null,e&&Nt.default.createElement(Ud,{onPress:e})),Nt.default.createElement(_reactnative.View,null,a&&Nt.default.createElement(Dd,{onPress:a}))),Ud=e=>{let{colors:a}=p();return Nt.default.createElement(_reactnative.Pressable,_chunkQTVIWU3Njs.a.call(void 0, {},e),Nt.default.createElement(_reactnative.View,{style:ao.backButton},Nt.default.createElement(Fa,{size:24,color:a.icon})))},Dd=e=>{let{colors:a}=p();return Nt.default.createElement(_reactnative.Pressable,_chunkQTVIWU3Njs.a.call(void 0, {},e),Nt.default.createElement(_reactnative.View,{style:ao.backButton},Nt.default.createElement(Oa,{size:24,color:a.icon})))},ao=_reactnative.StyleSheet.create({navigationBar:{height:48,flexDirection:"row",justifyContent:"space-between"},backButton:{width:48,height:48,justifyContent:"center",alignItems:"center"}});var U=({title:e="Error!",subtitle:a="Something went wrong."})=>{let{colors:t}=p();return Nt.default.createElement(_reactnative.View,{style:qd.container},Nt.default.createElement(ue,{size:74,color:t.error}),Nt.default.createElement(k,{title:e,subtitle:a,tight:!0}))},qd=_reactnative.StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:16}});var R=({title:e="Success!",subtitle:a})=>{let{colors:t}=p();return Nt.default.createElement(_reactnative.View,{style:Gd.container},Nt.default.createElement(Rt.default,{height:"74",width:"74",viewBox:"0 0 74 74"},Nt.default.createElement(_reactnativesvg.Circle,{cx:"37",cy:"37",r:"36.8",fill:t.successLight}),Nt.default.createElement(_reactnativesvg.G,{transform:"translate(18, 18)"},Nt.default.createElement(be,{size:38,color:t.success}))),Nt.default.createElement(k,{title:e,subtitle:a,tight:!0}))},Gd=_reactnative.StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:16}});var gt={regular:"Inter_400Regular",medium:"Inter_500Medium",semibold:"Inter_600SemiBold"};var _a=Nt.default.forwardRef((r,o)=>{var l=r,{style:e,variant:a="default"}=l,t=_chunkQTVIWU3Njs.c.call(void 0, l,["style","variant"]);let{colors:s}=p();return Nt.default.createElement(_reactnative.View,_chunkQTVIWU3Njs.a.call(void 0, {ref:o,style:[oo.alert,a==="info"&&{backgroundColor:s.backgroundInformation,borderColor:s.borderInformation},e]},t))});_a.displayName="Alert";var Xd=Nt.default.forwardRef((o,t)=>{var r=o,{style:e}=r,a=_chunkQTVIWU3Njs.c.call(void 0, r,["style"]);let{colors:l}=p();return Nt.default.createElement(_reactnative.Text,_chunkQTVIWU3Njs.a.call(void 0, {ref:t,style:[oo.title,{color:l.text},e]},a))});Xd.displayName="AlertTitle";var Ra=Nt.default.forwardRef((o,t)=>{var r=o,{style:e}=r,a=_chunkQTVIWU3Njs.c.call(void 0, r,["style"]);let{colors:l}=p();return Nt.default.createElement(_reactnative.Text,_chunkQTVIWU3Njs.a.call(void 0, {ref:t,style:[oo.description,{color:l.text},e]},a))});Ra.displayName="AlertDescription";var oo=_reactnative.StyleSheet.create({alert:{borderRadius:8,alignItems:"center",gap:12,paddingHorizontal:12,paddingVertical:8,flexDirection:"row"},title:{marginBottom:4,fontFamily:gt.semibold,fontSize:16},description:{fontSize:14,lineHeight:20}});var jd=e=>ro.createElement(Rt.default,_chunkQTVIWU3Njs.a.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),ro.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"})),Vr=jd;var Qd=e=>aa.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",x:0,y:0,viewBox:"0 0 80 38.1"},e),aa.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"}}),aa.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"}}),aa.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"}}),aa.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"}}),aa.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"}})),Wr=Qd;function Na({method:e}){let{colors:a}=p();switch(e){case"card":return Nt.default.createElement(Ta,{size:24,color:a.icon});case"exchange":return Nt.default.createElement(Ma,{size:24,color:a.icon});case"payment-request":return _reactnative.Platform.OS==="ios"?Nt.default.createElement(Vr,{height:70,width:33}):Nt.default.createElement(Wr,{height:70,width:33});case"manual":return Nt.default.createElement(Ua,{size:24,color:a.icon});default:return null}}function Rr({appName:e,methods:a,onMethodSelected:t,onSwitchProvider:o}){let{colors:r}=p();return Nt.default.createElement(_reactnative.ScrollView,{style:lo.scrollView,contentContainerStyle:lo.container},Nt.default.createElement(_reactnative.View,{style:{gap:32}},Nt.default.createElement(k,{title:"Add funds",subtitle:`Select a method for funding your ${e?`${e} `:""}wallet.`}),Nt.default.createElement(_reactnative.View,{style:lo.listContainer},a.includes("card")&&Nt.default.createElement(y,{title:"Debit card",LeftIcon:Nt.default.createElement(Na,{method:"card"}),RightIcon:a.includes("payment-request")?Nt.default.createElement(Na,{method:"payment-request"}):void 0,onPress:()=>t("card"),variant:"secondary"}),a.includes("exchange")&&Nt.default.createElement(y,{title:"Transfer from an exchange",LeftIcon:Nt.default.createElement(Na,{method:"exchange"}),onPress:()=>t("exchange"),variant:"secondary"}),Nt.default.createElement(y,{title:"Receive funds",LeftIcon:Nt.default.createElement(Na,{method:"manual"}),onPress:()=>t("manual"),variant:"secondary"}),!!o&&Nt.default.createElement(_reactnative.Pressable,{onPress:o},Nt.default.createElement(_a,{variant:"info",style:{borderWidth:1}},Nt.default.createElement(Je,{size:16,color:r.iconInformation}),Nt.default.createElement(Ra,null,"Having trouble facing location restrictions?"," ",Nt.default.createElement(_reactnative.Text,{style:{color:r.interactive}},"Try a different provider.")))))),Nt.default.createElement(B,null))}var lo=_reactnative.StyleSheet.create({scrollView:{flex:1},container:{paddingHorizontal:16,justifyContent:"space-between",flex:1},listContainer:{gap:16,alignSelf:"stretch"}});var Gr=()=>{let{colors:e}=p(),a=_reactnative.useAnimatedValue.call(void 0, 0);_react.useEffect.call(void 0, ()=>{a.setValue(0);let o=_reactnative.Animated.loop(_reactnative.Animated.timing(a,{toValue:1,duration:1200,useNativeDriver:!0,easing:_reactnative.Easing.linear}));return o.start(),()=>o.stop()},[a]);let t=a.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return Nt.default.createElement(_reactnative.Animated.View,{style:{transform:[{rotate:t}]}},Nt.default.createElement(Rt.default,{width:160,height:160,viewBox:"0 0 166 166",fill:"none"},Nt.default.createElement(_reactnativesvg.Circle,{cx:"83",cy:"83",r:"80",stroke:e.icon,strokeWidth:"6"}),Nt.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 ma=()=>Nt.default.createElement(_reactnative.View,{style:cn.container},Nt.default.createElement(Gr,null)),cn=_reactnative.StyleSheet.create({container:{flex:1,gap:20,alignItems:"center",justifyContent:"center",paddingHorizontal:16}});function Kr({uri:e,goBackRef:a}){let t=_react.useRef.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{if(e&&!t.current){t.current=!0;let o=Nr.createURL("/");Xr.openAuthSessionAsync(e,o,{createTask:!1}).catch(r=>{console.warn("[Privy] Funding flow error",r)}).finally(()=>{var r;console.log("[Privy] Funding flow finished"),(r=a==null?void 0:a.current)==null||r.call(a)})}},[e,a]),Nt.default.createElement(ma,null)}var _reactnativeqrcodestyled = require('react-native-qrcode-styled'); var _reactnativeqrcodestyled2 = _interopRequireDefault(_reactnativeqrcodestyled);var _expoclipboard = require('expo-clipboard'); var Yr = _interopRequireWildcard(_expoclipboard); var ps = _interopRequireWildcard(_expoclipboard);function Zr({children:e,style:a}){let{colors:t}=p();return Nt.default.createElement(_reactnative.Text,{style:[Cn.badge,{backgroundColor:t.backgroundHighlight,color:t.textHighlight},a]},e)}var Cn=_reactnative.StyleSheet.create({badge:{fontSize:12,lineHeight:18,paddingHorizontal:8,paddingVertical:2,borderRadius:6,flexGrow:0}});function jr({children:e,stopped:a}){let t=_reactnative.useAnimatedValue.call(void 0, 1);return _react.useEffect.call(void 0, ()=>{let o=_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!a&&o.start(),()=>(o.stop(),o.reset())},[t,a]),Nt.default.createElement(_reactnative.Animated.View,{style:{opacity:t}},e)}function $r({address:e,balance:a,currencySymbol:t,isLoading:o}){let{colors:r}=p(),[l,s]=_react.useState.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{if(l){let u=setTimeout(()=>s(!1),2e3);return()=>clearTimeout(u)}},[l]),Nt.default.createElement(_reactnative.Pressable,{style:[uo.container,{borderColor:r.border}],onPress:()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){Yr.setStringAsync(e),s(!0)})},Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(_reactnative.Text,{style:[uo.title,{color:r.textMuted}]},"Your wallet"),Nt.default.createElement(_reactnative.View,{style:{flexDirection:"row",gap:10,alignItems:"center"}},Nt.default.createElement(_reactnative.Text,{style:[uo.walletAddress,{color:r.text}]},_jssdkcore.formatWalletAddress.call(void 0, e)),l?Nt.default.createElement(xe,{size:14,color:r.textMuted}):Nt.default.createElement(je,{size:14,color:r.textMuted}))),Nt.default.createElement(jr,{stopped:!o},Nt.default.createElement(Zr,{style:{minWidth:50}},o?"":`${a} ${t}`)))}var uo=_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:gt.medium}});var bn=e=>It.createElement(Rt.default,_chunkQTVIWU3Njs.a.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),It.createElement(_reactnativesvg.G,{fill:e.color},It.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"}))),el=bn;var W=_zustand.create.call(void 0, )((e,a)=>({config:null,promiseResolvers:null,screen:null,setScreen:t=>e({screen:t}),method:null,setMethod:t=>{var o;if(!t&&((o=a().config)!=null&&o.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=a().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=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){return fa(o=>{ia(),e({config:t,promiseResolvers:o,method:t.paymentOptions.length?null:"manual",screen:t.paymentOptions.length?"method-selection":"manual-funding"})})}),endFundingFlow:()=>{var t;(t=a().promiseResolvers)==null||t.resolve(),a().reset()},exitFundingFlow:()=>{var t;(t=a().promiseResolvers)==null||t.reject(new S("funding_flow_cancelled","Funding flow was cancelled")),a().reset()}})),He=()=>W(e=>e.config),al=()=>[W(e=>e.screen),W(e=>e.setScreen)],tl=()=>[W(e=>e.method),W(e=>e.setMethod)],ol=()=>[W(e=>e.providerLink),W(e=>e.setProviderLink)],rl=()=>[W(e=>e.moonpayTransactionId),W(e=>e.setMoonpayTransactionId)],ll=()=>[W(e=>e.coinbasePartnerUserId),W(e=>e.setCoinbasePartnerUserId)],sl=()=>[W(e=>e.provider),W(e=>e.switchProvider)],ul=()=>[W(e=>e.error),W(e=>e.setError)],ht=()=>W(e=>e.startFundingFlow),dl=()=>W(e=>e.endFundingFlow),nl=()=>W(e=>e.exitFundingFlow),Ve=W.setState;function Ct(e){var a;return(a=e.tokenInfo)!=null&&a.symbol?e.tokenInfo.symbol:e.chainType==="solana"?"SOL":e.chain.nativeCurrency.symbol}var _viem = require('viem');function il(o){return _chunkQTVIWU3Njs.d.call(void 0, this,arguments,function*({chain:e,walletAddress:a,erc20Address:t}){return yield _viem.createPublicClient.call(void 0, {chain:e,transport:_viem.http.call(void 0, )}).readContract({address:t,abi:En,functionName:"balanceOf",args:[a]})})}var En=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];var gl=5e3;function Ll({fundingUiConfig:e,onFunded:a}){let t=_n({enabled:e.chainType==="ethereum",fundingUiConfig:e,onFunded:a}),o=Rn({enabled:e.chainType==="solana",fundingUiConfig:e,onFunded:a});return e.chainType==="ethereum"?t:o}function _n({enabled:e,fundingUiConfig:{address:a,chain:t,tokenInfo:o},onFunded:r}){let[l,s]=_react.useState.call(void 0, null),[u,c]=_react.useState.call(void 0, !1),i=_react.useMemo.call(void 0, ()=>{if(!(!e||!t))return _viem.createPublicClient.call(void 0, {chain:t,transport:_viem.http.call(void 0, )})},[t,e]),d=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){if(!(!e||!a||!i))try{return c(!0),o!=null&&o.address?yield il({walletAddress:a,erc20Address:o.address,chain:t}):yield i.getBalance({address:a})}catch(f){console.error(f)}finally{c(!1)}}),[i,a,o==null?void 0:o.address,t,e]);return _react.useEffect.call(void 0, ()=>{if(l==null&&d().then(f=>f!=null&&s(f)),r){let f=setInterval(()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){let n=yield d();n!=null&&(s(n),l!=null&&n>l&&r())}),gl);return()=>clearInterval(f)}},[d,l,r]),{balance:l,isLoading:u&&l==null,formattedBalance:o?_jssdkcore.formatTokenAmount.call(void 0, {amount:l!=null?l:BigInt(0),decimals:o.decimals}):_jssdkcore.formatWeiAmount.call(void 0, {wei:l!=null?l:BigInt(0)})}}function Rn({enabled:e,fundingUiConfig:{address:a,cluster:t,tokenInfo:o},onFunded:r}){let[l,s]=_react.useState.call(void 0, null),[u,c]=_react.useState.call(void 0, !1),i=_react.useMemo.call(void 0, ()=>{if(!(!e||!t))return new (0, _jssdkcore.SolanaClient)(t)},[e,t]),d=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){if(!(!e||!a||!i))try{if(c(!0),o!=null&&o.address){let f=yield i.getTokenAccountsByOwner(a,o.address);return f==null?void 0:f.amount}else return yield i.getBalance(a)}catch(f){console.error(f)}finally{c(!1)}}),[a,i,e,o==null?void 0:o.address]);return _react.useEffect.call(void 0, ()=>{if(l==null&&d().then(f=>f!=null&&s(f)),r){let f=setInterval(()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){let n=yield d();n!=null&&(s(n),l!=null&&n>l&&r())}),gl);return()=>clearInterval(f)}},[d,l,r]),{balance:l,isLoading:u&&l==null,formattedBalance:o!=null&&o.address?_jssdkcore.formatTokenAmount.call(void 0, {amount:l!=null?l:BigInt(0),decimals:o.decimals}):_jssdkcore.formatLamportsAmount.call(void 0, {lamports:l!=null?l:BigInt(0)})}}function Il({onFunded:e}){let a=He(),{colors:t}=p();if(!a)throw new Error("Invalid funding config");let o=a.chainType==="ethereum"?a.chain.name:_jssdkcore.getSolanaClusterDisplayName.call(void 0, a.cluster.name),r=Ct(a),{formattedBalance:l,isLoading:s}=Ll({fundingUiConfig:a,onFunded:e});return Nt.default.createElement(_reactnative.View,{style:io.container},Nt.default.createElement(_reactnative.View,{style:{gap:28}},Nt.default.createElement(k,{title:"Receive funds",subtitle:`Scan or copy your wallet address to receive funds on ${o}.`}),Nt.default.createElement(_reactnative.View,{style:io.qrContainer},Nt.default.createElement(_reactnativeqrcodestyled2.default,{data:a.address,pieceSize:8,errorCorrectionLevel:"Q",pieceBorderRadius:2,isPiecesGlued:!0,color:t.text}),Nt.default.createElement(_reactnative.View,{style:[io.logoContainer,{backgroundColor:t.background}]},Nt.default.createElement(el,{height:40,width:40,color:t.privyBrand}))),Nt.default.createElement(_reactnative.View,{style:{gap:12}},Nt.default.createElement(_a,{variant:"info"},Nt.default.createElement(Je,{size:16,color:t.iconInformation}),Nt.default.createElement(Ra,null,"Make sure to send on ",o,".")),Nt.default.createElement($r,{address:a.address,currencySymbol:r,balance:l,isLoading:s}))),Nt.default.createElement(B,null))}var io=_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 ga(r){return _chunkQTVIWU3Njs.d.call(void 0, this,arguments,function*({config:e,method:a,client:t,provider:o}){var l,s,u,c,i,d;if(Ve({method:a}),a==="manual"){Ve({screen:"manual-funding"});return}Ve({screen:"provider-funding"});try{let f=e.paymentOptions.find(n=>n.method===a&&n.provider===o)||e.paymentOptions.find(n=>n.method===a);if((f==null?void 0:f.provider)==="moonpay"){let n;e.chainType==="ethereum"?n=_jssdkcore.chainToMoonpayCurrency.call(void 0, e.chain.id,((l=e.tokenInfo)==null?void 0:l.symbol)==="USDC"?"USDC":"native-currency"):n=((s=e.tokenInfo)==null?void 0:s.symbol)==="USDC"?"USDC_SOL":"SOL";let m=yield t.funding.moonpay.sign({address:e.address,config:{currencyCode:n,paymentMethod:_jssdkcore.fundingMethodToMoonpayPaymentMethod.call(void 0, a),quoteCurrencyAmount:parseFloat(e.amount),uiConfig:_chunkQTVIWU3Njs.a.call(void 0, {accentColor:Qn},(u=e.moonpay)==null?void 0:u.uiConfig)},useSandbox:!!((c=e.moonpay)!=null&&c.useSandbox)});Ve({providerLink:m.signedUrl,moonpayTransactionId:m.externalTransactionId});return}if((f==null?void 0:f.provider)==="coinbase"){let n,m;e.chainType==="ethereum"?(n=_jssdkcore.toCoinbaseAssetId.call(void 0, e.chain.id,((i=e.tokenInfo)==null?void 0:i.symbol)==="USDC"?"USDC":"native-currency"),m=_jssdkcore.toCoinbaseBlockchainFromChainId.call(void 0, e.chain.id)):(n=((d=e.tokenInfo)==null?void 0:d.symbol)==="USDC"?"USDC":"SOL",m="solana");let g=yield t.funding.coinbase.initOnRampSession({addresses:[{address:e.address,blockchains:[m]}],assets:[n]}),h=_jssdkcore.getCoinbaseOnRampUrl.call(void 0, {appId:t.app.appId,input:g,amount:e.amount,blockchain:m,asset:n,experience:a==="exchange"?"send":"buy"});Ve({providerLink:h.url.toString(),coinbasePartnerUserId:g.partner_user_id});return}Ve({error:new S("failed_to_fetch_funding_provider_uri","A provider for this funding flow couldn't be found")})}catch(f){console.error(f),Ve({error:new S("failed_to_fetch_funding_provider_uri","A provider for this funding flow couldn't be found")})}})}var Qn="#110F2A";var ei=3e3,ai=["success","failure"];function hl({onSuccess:e,onError:a}){var c;let t=_chunkFS424Q3Ojs.l.call(void 0, ),o=He(),[r]=ll(),[l,s]=_react.useState.call(void 0, "pending"),u=_react.useRef.call(void 0, 0);_react.useEffect.call(void 0, ()=>{s("pending")},[r]),_react.useEffect.call(void 0, ()=>{if(!r||ai.includes(l))return;let i=setInterval(()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{let d=yield t.funding.coinbase.getStatus(r);if(!(d!=null&&d.status))return;s(d.status),u.current=0}catch(d){console.error(d),u.current+=1,u.current>=3&&s("failure")}}),ei);return()=>clearInterval(i)},[l,r,t,(c=o==null?void 0:o.moonpay)==null?void 0:c.useSandbox]),_react.useEffect.call(void 0, ()=>{l==="success"?e({status:l}):l==="failure"&&a({status:l})},[l,e,a])}var li=3e3,si=["completed","failed","serviceFailure"];function xl({onSuccess:e,onError:a}){var c;let t=_chunkFS424Q3Ojs.l.call(void 0, ),o=He(),[r]=rl(),[l,s]=_react.useState.call(void 0, "pending"),u=_react.useRef.call(void 0, 0);_react.useEffect.call(void 0, ()=>{s("pending")},[r]),_react.useEffect.call(void 0, ()=>{if(!r||si.includes(l))return;let i=setInterval(()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){var d,f;try{let n=yield t.funding.moonpay.getTransactionStatus({transactionId:r,useSandbox:!!((d=o==null?void 0:o.moonpay)!=null&&d.useSandbox)});if(console.log("status",n==null?void 0:n.status),!(n!=null&&n.status))return;if(s(n.status),u.current=0,n.status==="completed"){console.log(JSON.stringify(n));let m=(f=n.getValidQuote)==null?void 0:f.quoteCurrencyAmount;e({status:"completed",amount:m?String(m):void 0})}else n.status==="failed"||n.status}catch(n){if(n instanceof _jssdkcore.MoonpayApiError&&n.response.status===404)return;console.error(n),u.current>=3&&(s("serviceFailure"),a({status:"serviceFailure"}))}}),li);return()=>clearInterval(i)},[l,r,t,(c=o==null?void 0:o.moonpay)==null?void 0:c.useSandbox,e,a])}function yl({config:e,goBackRef:a}){let t=_chunkFS424Q3Ojs.l.call(void 0, ),[o,r]=al(),l=nl(),s=dl(),[u,c]=tl(),[i,d]=sl(),[f]=ol(),[n,m]=ul(),[g,h]=_react.useState.call(void 0, ),[I,w]=_react.useState.call(void 0, !1),[P,E]=_react.useState.call(void 0, ),T=_react.useMemo.call(void 0, ()=>Array.from(new Set(e.paymentOptions.map(({method:F})=>F))),[e.paymentOptions]),N=_react.useMemo.call(void 0, ()=>e.paymentOptions.filter(F=>F.method===g),[e.paymentOptions,g]);function O(F,Ne){return _chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){F!==g&&h(F),yield ga({method:F,provider:(()=>{var Sa,ya;return Ne||(F==="card"&&(ya=(Sa=e.card)==null?void 0:Sa.preferredProvider)!=null?ya:i)})(),client:t,config:e})})}function V(){if(!g)return;let F=d();O(g,F)}let Z=_react.useCallback.call(void 0, ()=>{r("success");let F=setTimeout(()=>s(),5e3);return()=>clearTimeout(F)},[r,s]),ae=_react.useCallback.call(void 0, ({amount:F})=>{E(F),r("success");let Ne=setTimeout(()=>s(),5e3);return()=>clearTimeout(Ne)},[r,s]),Ge=_react.useCallback.call(void 0, ()=>{m(new S("provider_transaction_failed","Something went wrong adding funds from Moonpay. Please try again or use another method to fund your wallet."))},[m]),ze=_react.useCallback.call(void 0, ()=>{m(new S("provider_transaction_failed","Something went wrong adding funds from Coinbase. Please try again or use another method to fund your wallet."))},[m]);switch(xl({onSuccess:ae,onError:Ge}),hl({onSuccess:ae,onError:ze}),_react.useEffect.call(void 0, ()=>(a.current=()=>{if(o==="method-selection"){l();return}if(o==="manual-funding"&&!e.paymentOptions.length){l();return}if(e.defaultPaymentMethod!==void 0){l();return}u!=="manual"&&u!=null&&(w(!0),h(u)),c(null)},()=>{a.current=null}),[o,a,u,c,l,e]),o){case"method-selection":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:()=>{var F;return(F=a==null?void 0:a.current)==null?void 0:F.call(a)}}),Nt.default.createElement(Rr,{appName:e.appName,methods:T,onMethodSelected:O,onSwitchProvider:I&&N.length>1?V:void 0}));case"manual-funding":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:()=>{var F;return(F=a==null?void 0:a.current)==null?void 0:F.call(a)},close:()=>s()}),Nt.default.createElement(Il,{onFunded:Z}));case"provider-funding":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(Or,{close:()=>{var F;return(F=a==null?void 0:a.current)==null?void 0:F.call(a)},style:{paddingRight:23}}),Nt.default.createElement(Kr,{uri:f,goBackRef:a}));case"success":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:()=>s()}),Nt.default.createElement(R,{subtitle:`You\u2019ve successfully added ${P?`${P} `:""}${Ct(e)} to your ${e.appName?`${e.appName} `:""}wallet. It may take a minute before the funds are available to use.`}));case"error":default:return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:()=>{var F;return(F=a==null?void 0:a.current)==null?void 0:F.call(a)}}),Nt.default.createElement(U,{title:"Something went wrong",subtitle:(n==null?void 0:n.message)||"Please try again."}))}}var ii=1e3*60*5,La=_zustand.create.call(void 0, )((e,a)=>({walletUIConfig:null,walletPromiseResolvers:null,openWalletFlow:t=>fa(o=>{if(ia(),a().walletPromiseResolvers!==null)throw new S("existing_ui_flow_in_progress","A wallet flow is already in progress");let r=dt(o,()=>(e({walletUIConfig:null,walletPromiseResolvers:null}),new S("ui_flow_timeout","The wallet flow timed out")),ii);e({walletPromiseResolvers:r,walletUIConfig:t})}),navigateWhileInFlow:t=>{if(a().walletPromiseResolvers===null)throw new Error("Internal PrivyElements error");e({walletUIConfig:t})},closeWalletFlow:t=>{var o;return(o=a().walletPromiseResolvers)==null||o.reject(t!=null?t:new S("ui_flow_closed","The wallet flow was closed")),e({walletUIConfig:null,walletPromiseResolvers:null})}})),wl=()=>La(e=>e.walletUIConfig),Pl=()=>La.getState().walletUIConfig,H=()=>_react.useCallback.call(void 0, a=>{let{walletPromiseResolvers:t,closeWalletFlow:o}=La.getState();t==null||t.resolve(a),o()},[]),D=()=>La(e=>e.closeWalletFlow),Le=()=>La(e=>e.openWalletFlow),$=()=>La(e=>e.navigateWhileInFlow);function Ml({isMfaUIEnabled:e=!1}){let a=Le(),t=$();_chunkFS424Q3Ojs.O.call(void 0, {onMfaRequired:_react.useCallback.call(void 0, o=>{var u,c;if(!e)return;let r=(c=(u=_chunkFS424Q3Ojs.a.call(void 0, ))==null?void 0:u.mfa)==null?void 0:c.relyingParty,l=Pl(),s=l?t:a;if(o.length===1){let i=o[0];s({type:`mfa:verify:${i}`,payload:{relyingParty:r,ongoingWalletUIFlow:l}});return}s({type:"mfa:verify:landing",payload:{enrolledMfaMethods:o,relyingParty:r,ongoingWalletUIFlow:l}})},[e,t,a])})}var Li=1200,vl=({oauthProvider:e})=>{let{setOAuthState:a}=_react.useContext.call(void 0, _chunkFS424Q3Ojs._),t=Oe(),o=it(),{state:r}=_chunkULTUNRFWjs.b.call(void 0, ),{step:l,error:s=null,isNewUser:u=!1}=_react.useMemo.call(void 0, ()=>{var d;switch(r.status){case"initial":return{step:"initial"};case"loading":return{step:"loading"};case"done":return{step:"done",isNewUser:r.isNewUser};case"error":return{step:"error",error:(d=r.error)!=null?d:new Error("Unknown error")}}},[r]);_react.useEffect.call(void 0, ()=>{s instanceof _jssdkcore.PrivyClientError&&s.code==="login_with_oauth_was_cancelled_by_user"&&(a({status:"initial"}),o())},[s,o,a]),_react.useEffect.call(void 0, ()=>{if(l!=="done")return;let d=setTimeout(()=>{t()},Li);return()=>clearTimeout(d)},[l,t]);let c=Ee[e],i=u?"You've successfully created an account.":"Your account is secured.";switch(l){case"initial":case"loading":return Nt.default.createElement(ma,null);case"done":return Nt.default.createElement(R,{subtitle:i});case"error":return Nt.default.createElement(U,{title:"Authentication failed",subtitle:Ii(s).replace("{provider}",c)})}},Ii=_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 kl=()=>{var a,t;let{logo:e}=(t=(a=nt())==null?void 0:a.appearance)!=null?t:{};return e?Nt.default.createElement(_reactnative.Image,{source:{uri:e},style:{width:xi,height:Si,resizeMode:"contain"}}):null},xi=220,Si=110;var yi={email:Qe,sms:ye},Tl=({method:e,onLoginMethodChange:a,preferred:t})=>{let o=yi[e],{colors:r}=p();return Nt.default.createElement(y,{LeftIcon:t?null:Nt.default.createElement(o,{size:24,color:r.icon}),variant:t?"primary":"secondary",onPress:()=>a(e),title:`Continue with ${Ee[e]}`})};var Pi=e=>yt.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 18 22"},e),yt.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"}),yt.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"})),Bl=Pi;var vi=e=>mo.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),mo.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"})),Ul=vi;var Ti=e=>go.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",x:24,y:24,viewBox:"0 0 98 96"},e),go.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"})),Dl=Ti;var Bi=e=>Ia.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),Ia.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"}),Ia.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"}),Ia.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"}),Ia.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"})),El=Bi;var Ei=e=>Lo.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",role:"img",viewBox:"0 0 24 24"},e),Lo.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"})),Ol=Ei;var qi=e=>ta.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 320"},e),ta.createElement(_reactnativesvg.Rect,{width:320,height:320,fill:"#06c755",rx:72.14}),ta.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"}),ta.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"}),ta.createElement(_reactnativesvg.Rect,{width:11.64,height:50.64,x:128.73,y:121.85,fill:"#06c755",rx:2.04}),ta.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"})),Hl=qi;var Wi=e=>ho.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),ho.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"})),Vl=Wi;var Gi=e=>Co.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),Co.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"})),Wl=Gi;var Xi=e=>xo.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),xo.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"})),_l=Xi;var ji=e=>So.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"currentColor",viewBox:"0 0 24 24"},e),So.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"})),Rl=ji;var Yi=e=>yo.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),yo.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"})),Gl=Yi;var $i={google:El,apple:Bl,discord:Ul,github:Dl,twitter:Gl,spotify:Wl,instagram:Ol,tiktok:_l,linkedin:Vl,line:Hl,twitch:Rl},Nl=({method:e,onLoginMethodChange:a})=>{let{login:t}=_chunkULTUNRFWjs.b.call(void 0, ),{colors:o}=p(),r=$i[e],l=()=>{t({provider:e}),a(e)};return Nt.default.createElement(y,{LeftIcon:Nt.default.createElement(r,{width:24,height:24,color:o.icon}),variant:"secondary",onPress:l,title:Ee[e]})};var Kl=({method:e,onLoginMethodChange:a,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":return Nt.default.createElement(Nl,{method:e,onLoginMethodChange:a});case"email":case"sms":return Nt.default.createElement(Tl,{method:e,onLoginMethodChange:a,preferred:t});default:throw new S("unsupported_login_method",`Unsupported login method: ${e}`)}};var jl=({loginMethods:e,onLoginMethodChange:a})=>Nt.default.createElement(_reactnative.ScrollView,{style:Pt.scrollView,contentContainerStyle:Pt.container},Nt.default.createElement(_reactnative.View,{style:Pt.formContainer},Nt.default.createElement(kl,null),Nt.default.createElement(k,{title:"Login or sign up"}),Nt.default.createElement(_reactnative.View,{style:Pt.listContainer},e.map((t,o)=>Nt.default.createElement(Kl,{key:`method-button-${t}`,method:t,onLoginMethodChange:a,preferred:o===0})))),Nt.default.createElement(da,null),Nt.default.createElement(B,null)),Pt=_reactnative.StyleSheet.create({scrollView:{flex:1},container:{paddingHorizontal:16},formContainer:{alignItems:"center",gap:32},listContainer:{gap:16,alignSelf:"stretch"}});function Ie({Icons:e,title:a,subtitle:t,Features:o,Footer:r}){return Nt.default.createElement(_reactnative.View,{style:Za.screen},Nt.default.createElement(_reactnative.View,{style:Za.content},Nt.default.createElement(_reactnative.View,{style:Za.header},Nt.default.createElement(_reactnative.View,{style:Za.headerIcons},e),Nt.default.createElement(k,{tight:!0,title:a,subtitle:t})),Nt.default.createElement(_reactnative.View,{style:Za.featuresList},o)),Nt.default.createElement(_reactnative.View,null,r))}var Za=_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 Jl=({termsAndPolicyConfig:e})=>{let{colors:a}=p(),t=_chunkFS424Q3Ojs.l.call(void 0, ),{logout:o}=_chunkFS424Q3Ojs.X.call(void 0, ),{termsAndConditionsUrl:r,privacyPolicyUrl:l}=e,s=Oe(),[u,c]=_react.useState.call(void 0, !1),i=()=>{o(),s({termsReviewed:!0})},d=()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){c(!0),yield t.user.acceptTerms().finally(()=>c(!1)),s({termsReviewed:!0})});return Nt.default.createElement(Ie,{Icons:Nt.default.createElement(ba,{size:48,color:a.icon}),title:"One last step",subtitle:"By signing up, you agree to our terms and privacy policy.",Features:Nt.default.createElement(Nt.default.Fragment,null,r&&Nt.default.createElement(y,{variant:"secondary",title:"View Terms",onPress:()=>wo.openBrowserAsync(r),RightIcon:Nt.default.createElement(De,{color:a.icon,size:24})}),l&&Nt.default.createElement(y,{variant:"secondary",title:"View Privacy Policy",onPress:()=>wo.openBrowserAsync(l),RightIcon:Nt.default.createElement(De,{color:a.icon,size:24})})),Footer:Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(y,{variant:"primary",title:"Accept",onPress:d,loading:u}),Nt.default.createElement(y,{variant:"tertiary",destroy:!0,title:"No thanks",onPress:i}))})};var _reactnativesafeareacontext = require('react-native-safe-area-context');var df=()=>{let e=_reactnativesafeareacontext.useSafeAreaInsets.call(void 0, );return{paddingTop:e.top,paddingBottom:e.bottom,paddingLeft:e.left,paddingRight:e.right}},Yl=({children:e,visible:a})=>{let t=df(),{colors:o}=p();return Nt.default.createElement(_reactnative.Modal,{animationType:"slide",transparent:!0,visible:a},Nt.default.createElement(_reactnative.View,{style:[_reactnative.StyleSheet.absoluteFill,{backgroundColor:o.background},t]},e))};var $l=()=>{let{client:e}=_react.useContext.call(void 0, _chunkFS424Q3Ojs._),a=e.app.getConfig(),t=a==null?void 0:a.logo_url;_react.useEffect.call(void 0, ()=>{t&&_reactnative.Image.prefetch(t)},[t])};var es=1e3,ts=({config:e})=>{let{appName:a,onConsent:t}=e,{colors:o}=p(),r=H(),l=D(),[s,u]=_react.useState.call(void 0, !1),[c,i]=_react.useState.call(void 0, !1),[d,f]=_react.useState.call(void 0, !1),n=()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){try{u(!0),i(!1),f(!1);let g=yield t();i(!0),yield _chunkFS424Q3Ojs.h.call(void 0, es),r(g)}catch(g){f(!0),yield _chunkFS424Q3Ojs.h.call(void 0, es),l(g instanceof S?g:new A(g))}finally{u(!1)}});if(c)return Nt.default.createElement(R,{subtitle:"You\u2019ve successfully enabled offline access."});if(d)return Nt.default.createElement(U,null);let m=`By confirming, ${a} will be able to use your wallet for you even when you're not around. You can revoke this later.`;return Nt.default.createElement(_reactnative.View,{style:as.container},Nt.default.createElement(_reactnative.View,{style:as.header},Nt.default.createElement(Ue,{size:48,color:o.icon}),Nt.default.createElement(k,{title:"Enable offline access",subtitle:m})),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:"Confirm",onPress:n,loading:s}),Nt.default.createElement(B,null)))},as=_reactnative.StyleSheet.create({container:{paddingTop:24,paddingHorizontal:16,gap:24,flex:1,justifyContent:"space-between"},header:{alignItems:"center",gap:8}});var os=1e3,ls=({config:e})=>{let{appName:a,onRevoke:t}=e,{colors:o}=p(),r=H(),l=D(),[s,u]=_react.useState.call(void 0, !1),[c,i]=_react.useState.call(void 0, !1),[d,f]=_react.useState.call(void 0, !1),n=()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){try{u(!0),i(!1),f(!1);let g=yield t();i(!0),yield _chunkFS424Q3Ojs.h.call(void 0, os),r(g)}catch(g){f(!0),yield _chunkFS424Q3Ojs.h.call(void 0, os),l(g instanceof S?g:new A(g))}finally{u(!1)}});if(c)return Nt.default.createElement(R,{subtitle:"You\u2019ve successfully revoked offline access."});if(d)return Nt.default.createElement(U,null);let m=`By confirming, ${a} will no longer be able to use this wallet on your behalf when you are not online.`;return Nt.default.createElement(_reactnative.View,{style:rs.container},Nt.default.createElement(_reactnative.View,{style:rs.header},Nt.default.createElement(va,{size:48,color:o.icon}),Nt.default.createElement(k,{title:"Revoke offline access to wallet",subtitle:m})),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:"Confirm",onPress:n,loading:s}),Nt.default.createElement(B,null)))},rs=_reactnative.StyleSheet.create({container:{paddingTop:24,paddingHorizontal:16,gap:24,flex:1,justifyContent:"space-between"},header:{alignItems:"center",gap:8}});var _buffer = require('buffer');function Mt(e){return`0x${_buffer.Buffer.from(e).toString("hex")}`}var us=({iconUrl:e})=>Nt.default.createElement(_reactnative.Image,{source:{uri:e},style:{width:hf,height:ss,borderRadius:ss/2,resizeMode:"contain",alignSelf:"center"}}),hf=80,ss=80;var ds=1e3,ns=({config:e})=>{let{message:a,onSignMessage:t,title:o="Sign message",description:r="Sign to continue",buttonText:l="Confirm signature",logo:s}=e,{colors:u}=p(),c=H(),i=D(),[d,f]=_react.useState.call(void 0, !1),[n,m]=_react.useState.call(void 0, !1),[g,h]=_react.useState.call(void 0, !1),I=()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){try{f(!0),m(!1),h(!1);let P=yield t(a);m(!0),yield _chunkFS424Q3Ojs.h.call(void 0, ds),c(P)}catch(P){h(!0),yield _chunkFS424Q3Ojs.h.call(void 0, ds),i(P instanceof S?P:new A(P))}finally{f(!1)}}),w=_react.useMemo.call(void 0, ()=>a instanceof Uint8Array?Mt(a):a,[a]);return n?Nt.default.createElement(R,{subtitle:"You\u2019ve successfully completed the signature."}):g?Nt.default.createElement(U,null):Nt.default.createElement(_reactnative.ScrollView,{style:Ca.container,contentContainerStyle:Ca.contentContainer},Nt.default.createElement(_reactnative.View,{style:Ca.content},Nt.default.createElement(_reactnative.View,{style:Ca.header},s&&Nt.default.createElement(us,{iconUrl:s}),Nt.default.createElement(k,{title:o,subtitle:r,tight:!0})),Nt.default.createElement(_reactnative.View,{style:[Ca.messageBox,{backgroundColor:u.backgroundSecondary}]},Nt.default.createElement(_reactnative.Text,{style:[Ca.message,{color:u.text}]},w))),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:l,onPress:I,loading:d}),Nt.default.createElement(B,null)))},Ca=_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 ra({Icon:e,children:a}){let{colors:t}=p();return Nt.default.createElement(_reactnative.View,{style:is.row},Nt.default.createElement(e,{size:24,color:t.icon}),Nt.default.createElement(_reactnative.Text,{style:[is.label,{color:t.text}]},a))}var is=_reactnative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",gap:12},label:{flex:1,fontFamily:"Inter_500Medium",fontSize:14,lineHeight:22}});function j(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 fs({onBack:e}){let{initMfaEnrollment:a,submitMfaEnrollment:t}=_chunkFS424Q3Ojs.T.call(void 0, ),{prompt:o}=_chunkFS424Q3Ojs.S.call(void 0, ),r=H(),l=D(),{user:s}=_chunkFS424Q3Ojs.X.call(void 0, ),{colors:u}=p(),[c,i]=_react.useState.call(void 0, !1),[d,f]=_react.useState.call(void 0, !1),[n,m]=_react.useState.call(void 0, ),[g,h]=_react.useState.call(void 0, !1),I=_react.useMemo.call(void 0, ()=>{var T;return((T=s==null?void 0:s.linked_accounts)!=null?T:[]).filter(N=>N.type==="passkey").map(N=>N.credential_id)},[s]),w=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{f(!0),h(!1),m(void 0),i(!1),yield o(),yield a({method:"passkey"}),yield t({method:"passkey",credentialIds:I}),i(!0),yield _chunkFS424Q3Ojs.h.call(void 0, 1500),r({success:!0})}catch(P){let{isBlockingError:E,error:T}=j(P);m(T),h(E),E&&(yield _chunkFS424Q3Ojs.h.call(void 0, 1500),l(T instanceof S?T:new A(T)))}finally{f(!1)}}),[I,a,l,r,o,t]);return c?Nt.default.createElement(R,{subtitle:"From now on, you'll use the passkey whenever you use your Privy wallet."}):g?Nt.default.createElement(U,{subtitle:n==null?void 0:n.message}):Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:()=>e()}),Nt.default.createElement(Ie,{Icons:Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(Ye,{size:48,color:u.icon}),Nt.default.createElement(ce,{size:48,color:u.icon})),title:"Set up passkey verification",subtitle:"You can change this later.",Features:Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(ra,{Icon:we},"Verify with Touch ID, Face ID, PIN, or hardware key"),Nt.default.createElement(ra,{Icon:Aa},"Takes seconds to set up and use"),Nt.default.createElement(ra,{Icon:Ba},"Use your passkey to verify transactions"),n&&Nt.default.createElement(_reactnative.Text,{style:[Uf.statusText,{color:u.errorDark}]},n.message)),Footer:Nt.default.createElement(y,{title:"Confirm",onPress:()=>w(),loading:d})}))}var Uf=_reactnative.StyleSheet.create({statusText:{textAlign:"center",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});var Df=1e3;function cs({onBack:e}){let{initMfaEnrollment:a,submitMfaEnrollment:t}=_chunkFS424Q3Ojs.T.call(void 0, ),o=H(),r=D(),[l,s]=_react.useState.call(void 0, "phone-input"),[u,c]=_react.useState.call(void 0, ""),[i,d]=_react.useState.call(void 0, !1),[f,n]=_react.useState.call(void 0, !1),[m,g]=_react.useState.call(void 0, ),[h,I]=_react.useState.call(void 0, !1),w=_react.useCallback.call(void 0, T=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{c(T),g(void 0),d(!0),yield a({method:"sms",phoneNumber:T}),s("otp-submit")}catch(N){let{isBlockingError:O,error:V}=j(N);g(V),I(O),O&&(yield _chunkFS424Q3Ojs.h.call(void 0, 1500),r(new A(V)))}finally{d(!1)}}),[a,r]),P=_react.useCallback.call(void 0, T=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{d(!0),g(void 0),yield t({method:"sms",phoneNumber:u,code:T}),n(!0),yield _chunkFS424Q3Ojs.h.call(void 0, Df),o({success:!0})}catch(N){let{isBlockingError:O,error:V}=j(N);g(V),I(O),O&&(yield _chunkFS424Q3Ojs.h.call(void 0, 1500),r(new A(V)))}finally{d(!1)}}),[r,o,u,t]),E=_react.useCallback.call(void 0, ()=>{l==="otp-submit"?s("phone-input"):e()},[e,l]);return h?Nt.default.createElement(U,{subtitle:m==null?void 0:m.message}):f?Nt.default.createElement(R,{subtitle:""}):l==="phone-input"?Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:E}),Nt.default.createElement(mt,{error:m!=null?m:null,isLoading:i,sendCode:w})):Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:E}),Nt.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,isDone:f,isLoading:i,onSendCode:P,onRequestNewCode:()=>w(u)}))}function gs({onContinue:e,secret:a,authUrl:t}){let{colors:o}=p(),r=()=>ms.openURL(t),[l,s]=_react.useState.call(void 0, !1),u=()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){yield ps.setStringAsync(a!=null?a:""),s(!0),yield _chunkFS424Q3Ojs.h.call(void 0, 2e3),s(!1)});return Nt.default.createElement(_reactnative.View,{style:Ja.container},Nt.default.createElement(_reactnative.View,{style:Ja.formContainer},Nt.default.createElement(k,{title:"Scan QR code",subtitle:"Open your authenticator app and scan the QR code to continue."}),Nt.default.createElement(_reactnative.View,{style:Ja.listContainer},Nt.default.createElement(_reactnative.View,{style:Ja.qrContainer},Nt.default.createElement(_reactnativeqrcodestyled2.default,{data:t,color:o.text,errorCorrectionLevel:"Q",pieceSize:6,pieceBorderRadius:3,outerEyesOptions:{borderRadius:20},innerEyesOptions:{borderRadius:9}}),Nt.default.createElement(_reactnative.View,{style:[Ja.logoContainer,{backgroundColor:o.background}]},Nt.default.createElement(we,{size:40,color:o.text}))),Nt.default.createElement(y,{title:"Open in Authenticator app",variant:"tertiary",color:o.textMuted,onPress:r,LeftIcon:Nt.default.createElement(De,{color:o.iconSubtle,size:16})}),Nt.default.createElement(y,{title:"Copy secret",variant:"tertiary",color:o.textMuted,onPress:u,LeftIcon:l?Nt.default.createElement(xe,{color:o.iconSubtle,size:16}):Nt.default.createElement(je,{color:o.iconSubtle,size:16})}),Nt.default.createElement(y,{title:"Continue",onPress:e}))),Nt.default.createElement(B,null))}var Ja=_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 Vf=1e3;function Ls({onBack:e}){let{initMfaEnrollment:a,submitMfaEnrollment:t}=_chunkFS424Q3Ojs.T.call(void 0, ),o=H(),r=D(),[l,s]=_react.useState.call(void 0, "auth-link"),[u,c]=_react.useState.call(void 0, ),[i,d]=_react.useState.call(void 0, ),[f,n]=_react.useState.call(void 0, !1),[m,g]=_react.useState.call(void 0, !1),[h,I]=_react.useState.call(void 0, ),[w,P]=_react.useState.call(void 0, !1),E=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{I(void 0),n(!0);let{authUrl:O,secret:V}=yield a({method:"totp"});d(V),c(O)}catch(O){let{isBlockingError:V,error:Z}=j(O);I(Z),P(V),V&&(yield _chunkFS424Q3Ojs.h.call(void 0, 1500),r(Z instanceof S?Z:new A(Z)))}finally{n(!1)}}),[a,r]),T=_react.useCallback.call(void 0, O=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{n(!0),I(void 0),yield t({method:"totp",code:O}),g(!0),yield _chunkFS424Q3Ojs.h.call(void 0, Vf),o({success:!0})}catch(V){let{isBlockingError:Z,error:ae}=j(V);I(ae),P(Z),Z&&(yield _chunkFS424Q3Ojs.h.call(void 0, 1500),r(ae instanceof S?ae:new A(ae)))}finally{n(!1)}}),[r,o,t]);_react.useEffect.call(void 0, ()=>{E()},[E]);let N=_react.useCallback.call(void 0, ()=>{l==="otp-submit"?s("auth-link"):e()},[e,l]);return u?w?Nt.default.createElement(U,{subtitle:h==null?void 0:h.message}):m?Nt.default.createElement(R,{subtitle:""}):l==="auth-link"?Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:N}),Nt.default.createElement(gs,{secret:i!=null?i:"",authUrl:u!=null?u:"",onContinue:()=>s("otp-submit")})):Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:N}),Nt.default.createElement(se,{subtitle:"Please check your for code in you Authenticator app.",error:h!=null?h:null,isDone:m,isLoading:f,onSendCode:T})):Nt.default.createElement(ma,null)}function Is({config:e}){let{method:a,onBack:t}=e;switch(a){case"totp":return Nt.default.createElement(Ls,{onBack:t});case"sms":return Nt.default.createElement(cs,{onBack:t});case"passkey":return Nt.default.createElement(fs,{onBack:t})}}function hs({config:e}){let{colors:a}=p(),t=$(),{availableMethods:o,enrolledMfaMethods:r}=e,l=_react.useCallback.call(void 0, u=>{if(r.includes(u)){t({type:"mfa:enrollment:unenroll",payload:{method:u,onBack:()=>t({type:"mfa:enrollment:landing",payload:e})}});return}t({type:"mfa:enrollment:enroll",payload:{method:u,relyingParty:e.relyingParty,onBack:()=>t({type:"mfa:enrollment:landing",payload:e})}})},[e,r,t]);function s({mfaMethod:u}){return r&&r.includes(u)?Nt.default.createElement(_reactnative.View,{style:At.unenrollGroup},Nt.default.createElement(_reactnative.Text,null,"Enabled"),Nt.default.createElement(ue,{color:a.icon,size:24})):Nt.default.createElement(Se,{color:a.icon,size:24})}return Nt.default.createElement(_reactnative.View,{style:At.container},Nt.default.createElement(_reactnative.View,{style:At.formContainer},Nt.default.createElement(k,{title:"Choose a verification method",subtitle:"You can change this later."}),Nt.default.createElement(_reactnative.View,{style:At.listContainer},o.includes("totp")&&Nt.default.createElement(y,{title:"Authenticator app",variant:"secondary",onPress:()=>l("totp"),LeftIcon:Nt.default.createElement($e,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(s,{mfaMethod:"totp"})}),o.includes("passkey")&&Nt.default.createElement(y,{title:"Passkey",variant:"secondary",onPress:()=>l("passkey"),LeftIcon:Nt.default.createElement(ce,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(s,{mfaMethod:"passkey"})}),o.includes("sms")&&Nt.default.createElement(y,{title:"SMS",variant:"secondary",onPress:()=>l("sms"),LeftIcon:Nt.default.createElement(ye,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(s,{mfaMethod:"sms"})}))),Nt.default.createElement(B,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 Cs({config:e}){let{colors:a}=p(),{method:t,onBack:o}=e,{unenrollMfa:r}=_chunkFS424Q3Ojs.T.call(void 0, ),{prompt:l}=_chunkFS424Q3Ojs.S.call(void 0, ),s=H(),u=D(),[c,i]=_react.useState.call(void 0, !1),[d,f]=_react.useState.call(void 0, !1),[n,m]=_react.useState.call(void 0, !1),g=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){var P;try{i(!0),f(!1),m(!1),t==="sms"?yield r({method:"sms"}):t==="totp"?yield r({method:"totp"}):t==="passkey"&&(yield l(),yield r({method:"passkey",removeForLogin:(P=Lr().passkeys)==null?void 0:P.shouldUnlinkOnUnenrollMfa})),f(!0),yield _chunkFS424Q3Ojs.h.call(void 0, 1500),s({success:!0})}catch(E){m(!0),yield _chunkFS424Q3Ojs.h.call(void 0, 1500),u(E instanceof S?E:new A(E))}finally{i(!1)}}),[t,u,s,l,r]);if(d)return Nt.default.createElement(R,{subtitle:""});if(n)return Nt.default.createElement(U,null);let h=zf[t],I=`Remove ${h} verification?`,w="MFA adds an extra layer of security to your account. Make sure you have other methods to secure your account.";return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:o}),Nt.default.createElement(Ie,{Icons:Nt.default.createElement(Be,{size:48,color:a.icon}),title:I,subtitle:w,Footer:Nt.default.createElement(y,{title:`Remove ${h} for MFA`,variant:"primary",destroy:!0,onPress:g,loading:c})}))}var zf={totp:"TOTP",sms:"SMS",passkey:"Passkey"};function xs({config:e}){let{onContinue:a}=e,t=D(),{colors:o}=p();return Nt.default.createElement(_reactnative.View,{style:Tt.container},Nt.default.createElement(_reactnative.View,{style:Tt.content},Nt.default.createElement(_reactnative.View,{style:Tt.header},Nt.default.createElement(we,{color:o.icon,size:32}),Nt.default.createElement(k,{title:"Add more security",subtitle:"Set up multi-factor verification.",tight:!0})),Nt.default.createElement(_reactnative.View,{style:Tt.featureList},Nt.default.createElement(ra,{Icon:Te},"Enable multi-factor verification for your wallet."),Nt.default.createElement(ra,{Icon:Ea},"Your wallet will have you complete a verification for every transaction you complete."))),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:"Continue",onPress:()=>a()}),Nt.default.createElement(y,{title:"Not now",variant:"tertiary",onPress:()=>t()}),Nt.default.createElement(B,null)))}var Tt=_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 Ss({config:e}){let{colors:a}=p(),t=$(),{enrolledMfaMethods:o}=e,r=_react.useCallback.call(void 0, l=>{t({type:`mfa:verify:${l}`,payload:{relyingParty:e.relyingParty,ongoingWalletUIFlow:e.ongoingWalletUIFlow,onBack:()=>t({type:"mfa:verify:landing",payload:e})}})},[e,t]);return Nt.default.createElement(Ie,{Icons:void 0,title:"Choose a verification method",subtitle:"",Features:Nt.default.createElement(Nt.default.Fragment,null,o.includes("totp")&&Nt.default.createElement(y,{title:"Authenticator app",variant:"secondary",onPress:()=>r("totp"),LeftIcon:Nt.default.createElement($e,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(Se,{color:a.icon,size:24})}),o.includes("passkey")&&Nt.default.createElement(y,{title:"Passkey",variant:"secondary",onPress:()=>r("passkey"),LeftIcon:Nt.default.createElement(ce,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(Se,{color:a.icon,size:24})}),o.includes("sms")&&Nt.default.createElement(y,{title:"SMS",variant:"secondary",onPress:()=>r("sms"),LeftIcon:Nt.default.createElement(ye,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(Se,{color:a.icon,size:24})})),Footer:Nt.default.createElement(B,null)})}var ys=({config:e})=>{let{colors:a}=p(),{init:t,submit:o}=_chunkFS424Q3Ojs.S.call(void 0, ),{relyingParty:r,ongoingWalletUIFlow:l}=e,s=$(),u=H(),c=D(),[i,d]=_react.useState.call(void 0, !1),[f,n]=_react.useState.call(void 0, ),[m,g]=_react.useState.call(void 0, !1),h=_react.useRef.call(void 0, ),I=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){try{d(!0),n(void 0),g(!1);let w=h.current;w||(w=yield t({method:"passkey",relyingParty:r})),yield o({method:"passkey",mfaCode:w,relyingParty:r}),l?s(l):u({success:!0})}catch(w){let{isBlockingError:P,error:E}=j(w);n(E),g(P),P&&(yield _chunkFS424Q3Ojs.h.call(void 0, 1500),c(new A(w)))}finally{d(!1)}}),[t,s,c,u,l,r,o]);return _react.useEffect.call(void 0, ()=>{I()},[I]),m?Nt.default.createElement(U,{subtitle:f==null?void 0:f.message}):Nt.default.createElement(Ie,{Icons:Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(Ye,{size:48,color:a.icon}),Nt.default.createElement(ce,{size:48,color:a.icon})),title:"Verifying with passkey",subtitle:"Approve this action using your touch, face, PIN, or hardware key.",Features:f?Nt.default.createElement(_reactnative.Text,{style:[Yf.statusText,{color:a.errorDark}]},f.message):void 0,Footer:Nt.default.createElement(y,{title:"Try again",loading:i,onPress:()=>I(),variant:"primary"})})},Yf=_reactnative.StyleSheet.create({statusText:{textAlign:"center",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});function Ms({config:e}){let{init:a,submit:t}=_chunkFS424Q3Ojs.S.call(void 0, ),{ongoingWalletUIFlow:o}=e,r=$(),l=H(),s=D(),[u,c]=_react.useState.call(void 0, !1),[i,d]=_react.useState.call(void 0, ),[f,n]=_react.useState.call(void 0, !1),m=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{c(!0),d(void 0),n(!1),yield a({method:"sms"})}catch(h){let{isBlockingError:I,error:w}=j(h);d(w),n(I),I&&(yield _chunkFS424Q3Ojs.h.call(void 0, 1500),s(new A(h)))}finally{c(!1)}}),[a,s]),g=_react.useCallback.call(void 0, h=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{c(!0),d(void 0),n(!1),yield t({method:"sms",mfaCode:h}),o?r(o):l({success:!0})}catch(I){let{isBlockingError:w,error:P}=j(I);d(P),n(w),w&&(yield _chunkFS424Q3Ojs.h.call(void 0, 1500),s(new A(I)))}finally{c(!1)}}),[r,s,l,o,t]);return _react.useEffect.call(void 0, ()=>{m()},[m]),f?Nt.default.createElement(U,{subtitle:i==null?void 0:i.message}):Nt.default.createElement(se,{subtitle:"Please check your phone for a message with your MFA code.",hint:"Didn\u2019t get an SMS?",error:i!=null?i:null,isLoading:u,onSendCode:g,onRequestNewCode:m})}function Fs({config:e}){let{init:a,submit:t}=_chunkFS424Q3Ojs.S.call(void 0, ),{ongoingWalletUIFlow:o}=e,r=$(),l=H(),s=D(),[u,c]=_react.useState.call(void 0, !1),[i,d]=_react.useState.call(void 0, ),[f,n]=_react.useState.call(void 0, !1),m=_react.useCallback.call(void 0, g=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{if(c(!0),d(void 0),n(!1),yield a({method:"totp"}),yield t({method:"totp",mfaCode:g}),o)return r(o);l({success:!0})}catch(h){let{isBlockingError:I,error:w}=j(h);d(w),n(I),I&&(yield _chunkFS424Q3Ojs.h.call(void 0, 1500),s(new A(h)))}finally{c(!1)}}),[a,r,s,l,o,t]);return f?Nt.default.createElement(U,{subtitle:i==null?void 0:i.message}):Nt.default.createElement(se,{subtitle:Nt.default.createElement(Nt.default.Fragment,null,"To continue, please enter the 6-digit code generated from your"," ",Nt.default.createElement(_reactnative.Text,{style:oc.strong},"authenticator app")),error:i!=null?i:null,isLoading:u,onSendCode:m})}var oc=_reactnative.StyleSheet.create({strong:{fontFamily:"Inter_600SemiBold"}});var vs=({config:e})=>{let a=D(),{cancel:t}=_chunkFS424Q3Ojs.S.call(void 0, ),o=Nt.default.useCallback(()=>{t(),a(new A(new Error("MFA verification was canceled")))},[t,a]);switch(e.type){case"mfa:enrollment:welcome":return Nt.default.createElement(xs,{config:e.payload});case"mfa:enrollment:unenroll":return Nt.default.createElement(Cs,{config:e.payload});case"mfa:enrollment:landing":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:()=>a()}),Nt.default.createElement(hs,{config:e.payload}));case"mfa:enrollment:enroll":return Nt.default.createElement(Is,{config:e.payload});case"mfa:verify:landing":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:o}),Nt.default.createElement(Ss,{config:e.payload}));case"mfa:verify:passkey":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:o,goBack:e.payload.onBack}),Nt.default.createElement(ys,{config:e.payload}));case"mfa:verify:totp":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:o,goBack:e.payload.onBack}),Nt.default.createElement(Fs,{config:e.payload}));case"mfa:verify:sms":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:o,goBack:e.payload.onBack}),Nt.default.createElement(Ms,{config:e.payload}));case"wallet:signature":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:()=>a()}),Nt.default.createElement(ns,{config:e.payload}));case"delegatedActions:consent":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:()=>a()}),Nt.default.createElement(ts,{config:e.payload}));case"delegatedActions:revoke":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:()=>a()}),Nt.default.createElement(ls,{config:e.payload}));default:throw new Error("Unsupported wallet UI config type")}};function sc({config:e,goBackRef:a}){let t=it();return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:()=>{var o;return((o=a.current)!=null?o:t)()}}),Nt.default.createElement(uc,{config:e,goBackRef:a}))}var uc=({config:e,goBackRef:a})=>{let[t,o]=Cr(),r=t&&gr(e.loginMethods,t),l=ua();if(_chunkFS424Q3Ojs.e.call(void 0, )&&(l!=null&&l.requireUsersAcceptTerms))return Nt.default.createElement(Jl,{termsAndPolicyConfig:l});switch(t){case"email":return Nt.default.createElement(wr,{goBackRef:a,otherLoginMethod:r,onLoginMethodChange:o});case"sms":return Nt.default.createElement(Er,{goBackRef:a,otherLoginMethod:r,onLoginMethodChange:o});case"apple":case"google":case"discord":case"twitter":case"github":case"spotify":case"instagram":case"tiktok":case"line":case"linkedin":case"twitch":return Nt.default.createElement(vl,{oauthProvider:t,goBackRef:a,otherLoginMethod:r,onLoginMethodChange:o});case null:return Nt.default.createElement(jl,{loginMethods:e.loginMethods,onLoginMethodChange:o,goBackRef:a});default:throw new S("unsupported_login_method",`Unsupported login method: ${t}`)}},dc= exports.PrivyElements =({config:e={}})=>{var o;let a=xr();_react.useEffect.call(void 0, ()=>_chunkFS424Q3Ojs.c.call(void 0, ({user:r})=>{r&&a(r)}),[a]),$l(),Ir(e),Ml({isMfaUIEnabled:(o=e.mfa)==null?void 0:o.enableMfaVerificationUIs});let t=nc();return Nt.default.createElement(Dt,{appearance:e.appearance},Nt.default.createElement(Yl,{visible:!!t},t))};function nc(){let e=_react.useRef.call(void 0, null),a=nt(),t=He(),o=wl();return t?Nt.default.createElement(yl,{config:t,goBackRef:e}):a?Nt.default.createElement(sc,{config:a,goBackRef:e}):o?Nt.default.createElement(vs,{config:o}):null}var fc=()=>{let e=hr(),{setOtpState:a,setOAuthState:t,client:o}=_react.useContext.call(void 0, _chunkFS424Q3Ojs._),r=_react.useCallback.call(void 0, ()=>{a({status:"initial"}),t({status:"initial"})},[t,a]);return{login:_react.useCallback.call(void 0, s=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){let u=_chunkFS424Q3Ojs.b.call(void 0, );return{user:yield e(s,o,u,r)}}),[e,o,r])}};var Lc=()=>{let e=Le(),{client:a}=_react.useContext.call(void 0, _chunkFS424Q3Ojs._);return{signMessage:_react.useCallback.call(void 0, t=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){var u,c,i,d;let o=_chunkFS424Q3Ojs.b.call(void 0, ),r=_jssdkcore.getUserEmbeddedEthereumWallet.call(void 0, o),l=_jssdkcore.getEntropyDetailsFromUser.call(void 0, o);if(!r||!l)throw new Error("No embedded Ethereum wallet found");let s=yield a.embeddedWallet.getEthereumProvider({entropyId:l.entropyId,entropyIdVerifier:l.entropyIdVerifier,wallet:r});return yield e({type:"wallet:signature",payload:{message:t.message,logo:(u=t.appearance)==null?void 0:u.logo,buttonText:(c=t.appearance)==null?void 0:c.buttonText,description:(i=t.appearance)==null?void 0:i.description,title:(d=t.appearance)==null?void 0:d.title,onSignMessage:f=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){return f instanceof Uint8Array&&(f=Mt(f)),yield s.request({method:"personal_sign",params:[f,r.address]})})}})}),[a.embeddedWallet,e])}};var yc=()=>{let e=Le(),{client:a}=_react.useContext.call(void 0, _chunkFS424Q3Ojs._);return{signMessage:_react.useCallback.call(void 0, t=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){var d,f,n,m;let o=_chunkFS424Q3Ojs.b.call(void 0, ),r=_jssdkcore.getAllUserEmbeddedSolanaWallets.call(void 0, o),l=_jssdkcore.getEntropyDetailsFromUser.call(void 0, o);if(!l)throw new Error("No embedded Solana wallets found");let s=t.address?r.find(g=>g.address===t.address):r[0];if(!s)throw new Error("Solana account not found");let{entropyId:u,entropyIdVerifier:c}=l,i=yield a.embeddedWallet.getSolanaProvider(s,u,c);return yield e(_chunkQTVIWU3Njs.b.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {type:"wallet:signature"},t),{payload:{message:t.message,logo:(d=t.appearance)==null?void 0:d.logo,buttonText:(f=t.appearance)==null?void 0:f.buttonText,description:(n=t.appearance)==null?void 0:n.description,title:(m=t.appearance)==null?void 0:m.title,onSignMessage:g=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){return g instanceof Uint8Array&&(g=_buffer.Buffer.from(g).toString("base64")),yield i.request({method:"signMessage",params:{message:g}})})}}))}),[a.embeddedWallet,e])}};var Pc=()=>{let e=Le(),{client:a}=_react.useContext.call(void 0, _chunkFS424Q3Ojs._),t=_react.useMemo.call(void 0, ()=>_jssdkcore.delegatedActions.delegateWallet(a),[a]),o=_react.useMemo.call(void 0, ()=>_jssdkcore.delegatedActions.revokeWallets(a),[a]);return{delegateWallet:_react.useCallback.call(void 0, r=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){let{name:l}=yield a.app.getConfig();return yield e({type:"delegatedActions:consent",payload:{appName:l,onConsent:()=>t(r)}})}),[a,t,e]),revokeWallets:_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){let{name:r}=yield a.app.getConfig();return yield e({type:"delegatedActions:revoke",payload:{appName:r,onRevoke:()=>o()}})}),[a,o,e])}};function Fc(){let e=Le(),a=$();return{init:_react.useCallback.call(void 0, o=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){let r=_chunkFS424Q3Ojs.b.call(void 0, );if(!r)throw new Error("User is not logged in");let l=r.linked_accounts.some(({type:i})=>i==="passkey"),s=r.mfa_methods.map(i=>i.type),u=o.mfaMethods;(!l||!o.relyingParty)&&(u=u.filter(i=>i!=="passkey"));let c={type:"mfa:enrollment:landing",payload:{availableMethods:u,enrolledMfaMethods:s,relyingParty:o.relyingParty}};if(s.length===0){yield e({type:"mfa:enrollment:welcome",payload:{onContinue:()=>a(c)}});return}yield e(c)}),[a,e])}}function Us(t){return _chunkQTVIWU3Njs.d.call(void 0, this,arguments,function*({chain:e,erc20Address:a}){let o=_viem.createPublicClient.call(void 0, {chain:e,transport:_viem.http.call(void 0, )}),[r,l]=yield Promise.all([o.readContract({abi:Bs,address:a,functionName:"symbol"}),o.readContract({abi:Bs,address:a,functionName:"decimals"})]);return{decimals:l,symbol:r}})}var Bs=[{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 Oc(){let e=_chunkFS424Q3Ojs.l.call(void 0, ),a=ht();return{fundWallet:_react.useCallback.call(void 0, c=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){var i=c,{address:o,asset:r,chain:l,amount:s}=i,u=_chunkQTVIWU3Njs.c.call(void 0, i,["address","asset","chain","amount"]);var Z,ae,Ge,ze,F,Ne,bt,Sa,ya,qo;let d=e.app.getConfig(),f=(d==null?void 0:d.name)||"",n=(Z=d==null?void 0:d.funding_config)==null?void 0:Z.default_recommended_amount,m=(ae=d==null?void 0:d.funding_config)==null?void 0:ae.default_recommended_currency.asset,g=(Ge=d==null?void 0:d.funding_config)==null?void 0:Ge.default_recommended_currency.chain.replace("eip155:",""),h=g?_jssdkcore.getSupportedChainById.call(void 0, +g):void 0,I=(F=(ze=d==null?void 0:d.funding_config)==null?void 0:ze.options)!=null?F:[],w=l!=null?l:h,P=(Ne=r!=null?r:m)!=null?Ne:"native-currency",E=(bt=s!=null?s:n)==null?void 0:bt.trim();if(!w)throw new S("chain_not_supported",`Chain with id ${(Sa=l==null?void 0:l.id)!=null?Sa:g} is not supported`);if(!E)throw new S("amount_not_specified","amount was not specified");let T;if(P==="USDC"){let Ce=_jssdkcore.UsdcAddressMap[w.id];if(!Ce)throw new S("asset_not_supported",`Chain with id ${w.id} does not support USDC`);T={address:Ce,symbol:"USDC",decimals:6}}else if(typeof P=="object"&&P.tokenAddress)if(_jssdkcore.getIsTokenUsdc.call(void 0, P.tokenAddress,w))T={address:P.tokenAddress,symbol:"USDC",decimals:6};else{let Ce=yield Us({chain:w,erc20Address:P.tokenAddress}).catch(console.error);if(!Ce)throw new S("asset_info_not_found",`Asset ${P.tokenAddress} information could not be found`);T={address:P.tokenAddress,symbol:Ce.symbol,decimals:Ce.decimals}}let N=I.filter(({provider:Ce})=>{let Ho=(T==null?void 0:T.symbol)==="USDC"?"USDC":"native-currency";if(Ce==="moonpay")return _jssdkcore.isSupportedChainIdForMoonpay.call(void 0, w.id,Ho);if(Ce==="coinbase")return _jssdkcore.toCoinbaseBlockchainFromChainId.call(void 0, w.id)&&_jssdkcore.isSupportedChainIdForCoinbaseOnramp.call(void 0, w.id,Ho)}),O=_chunkQTVIWU3Njs.b.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {},u),{chainType:"ethereum",appName:f,address:o,tokenInfo:T,paymentOptions:N,chain:w,asset:P,amount:E}),V=a(O);return u.defaultPaymentMethod&&(yield ga({client:e,method:u.defaultPaymentMethod,provider:u.defaultPaymentMethod==="card"&&(qo=(ya=u.card)==null?void 0:ya.preferredProvider)!=null?qo:"coinbase",config:O})),yield V}),[a,e])}}function Wc(){let e=_chunkFS424Q3Ojs.l.call(void 0, ),a=ht();return{fundWallet:_react.useCallback.call(void 0, c=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){var i=c,{address:o,asset:r,amount:l,cluster:s}=i,u=_chunkQTVIWU3Njs.c.call(void 0, i,["address","asset","amount","cluster"]);var N,O,V,Z,ae,Ge,ze,F;let d=e.app.getConfig(),f=(d==null?void 0:d.name)||"",n=(N=d==null?void 0:d.funding_config)==null?void 0:N.default_recommended_amount,m=(O=d==null?void 0:d.funding_config)==null?void 0:O.default_recommended_currency.asset,g=(Z=(V=d==null?void 0:d.funding_config)==null?void 0:V.options)!=null?Z:[],h=(ae=r!=null?r:m)!=null?ae:"native-currency",I=(Ge=l!=null?l:n)==null?void 0:Ge.trim(),w=s!=null?s:{name:"mainnet-beta"};if(!I)throw new S("amount_not_specified","amount was not specified");let P;h==="USDC"&&(P={symbol:"USDC",decimals:6,address:_jssdkcore.getSolanaUsdcMintAddressForCluster.call(void 0, w)});let E=_chunkQTVIWU3Njs.b.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {},u),{chainType:"solana",appName:f,address:o,tokenInfo:P,paymentOptions:g,asset:h,amount:I,cluster:{name:w.name,rpcUrl:_jssdkcore.getSolanaRpcEndpointForCluster.call(void 0, w)}}),T=a(E);return u.defaultPaymentMethod&&(yield ga({client:e,method:u.defaultPaymentMethod,provider:u.defaultPaymentMethod==="card"&&(F=(ze=u.card)==null?void 0:ze.preferredProvider)!=null?F:"coinbase",config:E})),yield T}),[a,e])}}exports.PrivyElements = dc; exports.PrivyUIError = S; exports.useDelegatedActions = Pc; exports.useFundSolanaWallet = Wc; exports.useFundWallet = Oc; exports.useLogin = fc; exports.useMfaEnrollmentUI = Fc; exports.useSignMessage = Lc; exports.useSolanaSignMessage = yc;
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 _chunkP5U72U3Djs = require('./chunk-P5U72U3D.js');var _chunkAXOO6XM5js = require('./chunk-AXOO6XM5.js');var _chunkQTVIWU3Njs = require('./chunk-QTVIWU3N.js');var _react = require('react'); var Nt = _interopRequireWildcard(_react); var ro = _interopRequireWildcard(_react); var aa = _interopRequireWildcard(_react); var It = _interopRequireWildcard(_react); var yt = _interopRequireWildcard(_react); var mo = _interopRequireWildcard(_react); var go = _interopRequireWildcard(_react); var Ia = _interopRequireWildcard(_react); var Lo = _interopRequireWildcard(_react); var ta = _interopRequireWildcard(_react); var ho = _interopRequireWildcard(_react); var Co = _interopRequireWildcard(_react); var xo = _interopRequireWildcard(_react); var So = _interopRequireWildcard(_react); var yo = _interopRequireWildcard(_react);function ua(){let e=_chunkAXOO6XM5js.l.call(void 0, ),{isReady:a}=_chunkAXOO6XM5js.X.call(void 0, ),t=_chunkAXOO6XM5js.d.call(void 0, );return _react.useMemo.call(void 0, ()=>{var s,u;if(!a)return null;let o=e.app.getConfig();if(!o)return null;let r=(s=o.require_users_accept_terms)!=null?s:!1,l=(u=t==null?void 0:t.has_accepted_terms)!=null?u:!1;return{termsAndConditionsUrl:o.terms_and_conditions_url,privacyPolicyUrl:o.privacy_policy_url,requireUsersAcceptTerms:r&&!l}},[e.app,a,t==null?void 0:t.has_accepted_terms])}var _reactnative = require('react-native');var _jssdkcore = require('@privy-io/js-sdk-core');var _reactnativesvg = require('react-native-svg'); var Rt = _interopRequireWildcard(_reactnativesvg);var Xo=({color:e})=>{let a=_reactnative.useAnimatedValue.call(void 0, 0);_react.useEffect.call(void 0, ()=>{a.setValue(0);let o=_reactnative.Animated.loop(_reactnative.Animated.timing(a,{toValue:1,duration:1200,useNativeDriver:!0,easing:_reactnative.Easing.linear}));return o.start(),()=>o.stop()},[a]);let t=a.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return Nt.default.createElement(_reactnative.Animated.View,{style:{transform:[{rotate:t}]}},Nt.default.createElement(Rt.default,{width:20,height:20,viewBox:"0 0 20 20",fill:"none"},Nt.default.createElement(_reactnativesvg.Path,{d:"M19 10a9 9 0 11-6.219-8.56",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))};var et=_react.createContext.call(void 0, void 0);var Ko="#5B4FFF";function Zo({colorScheme:e,accentHex:a}){return e==="dark"?{interactive:a,background:"#22222A",backgroundSecondary:"#010110",backgroundInformation:"#1E1B4B",backgroundTertiary:"#010110",backgroundHighlight:"#052E16",text:"#ffffff",textPlaceholder:"#9498B8",textMuted:"#FFFFFF",textHighlight:"#BBF7D0",textTitle:"#FFFFFF",textInteractive:"#FFFFFF",icon:"#FFFFFF",iconInformation:"#818CF8",iconSubtle:"#919191",privyBrand:"#FFFFFF",success:"#4ADE80",successLight:"#C5F7D7",border:"#474869",borderInformation:"#818CF8",error:"#FCA5A5",errorDark:"#EF4444"}:{interactive:a,background:"#FFFFFF",backgroundSecondary:"#F3F3F3",backgroundInformation:"#E0E7FF",backgroundTertiary:"#FFFFFF",backgroundHighlight:"#F1F2F9",text:"#040217",textPlaceholder:"#9498B8",textMuted:"#64668B",textHighlight:"#64668B",textTitle:"#1A1C29",textInteractive:"#FFFFFF",icon:"#110F2A",iconSubtle:"#9498B8",iconInformation:"#4F46E5",privyBrand:"#010110",success:"#16A34A",successLight:"#DCFCE7",border:"#E2E3F0",borderInformation:"#5B4FFF",error:"#EF4444",errorDark:"#B91C1C"}}function jo({colorScheme:e,accentHex:a}){return{colors:Zo({colorScheme:e,accentHex:a}),colorScheme:e}}function Dt({children:e,appearance:a={}}){let{colorScheme:t="light",accentColor:o}=a,{isReady:r,client:l}=_react.useContext.call(void 0, _chunkAXOO6XM5js._),s=_react.useMemo.call(void 0, ()=>{var i,d;let u=r?l.app.getConfig():void 0,c=(i=u==null?void 0:u.accent_color)!=null?i:void 0;return jo({colorScheme:t,accentHex:(d=o!=null?o:c)!=null?d:Ko})},[t,o,r,l]);return Nt.default.createElement(et.Provider,{value:s},e)}var p=()=>{let e=_react.useContext.call(void 0, et);if(e===void 0)throw new Error("Components calling useTheme must be wrapped in an ElementsThemeProvider");return e};var y=i=>{var d=i,{variant:e="primary",title:a,destroy:t=!1,loading:o=!1,LeftIcon:r,RightIcon:l,color:s,style:u}=d,c=_chunkQTVIWU3Njs.c.call(void 0, d,["variant","title","destroy","loading","LeftIcon","RightIcon","color","style"]);let{colors:f}=p(),n=t?f.errorDark:f.interactive,m={primary:n,secondary:f.backgroundTertiary,tertiary:f.background}[e],g={primary:f.textInteractive,secondary:f.text,tertiary:n}[e];return Nt.default.createElement(_reactnative.Pressable,_chunkQTVIWU3Njs.b.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {},c),{disabled:c.disabled||o}),Nt.default.createElement(_reactnative.View,{style:[wa.buttonBox,{backgroundColor:m},e==="secondary"&&wa.buttonBoxSecondary,e==="secondary"&&{borderColor:f.border},u]},o?Nt.default.createElement(Xo,{color:s!=null?s:g}):Nt.default.createElement(Nt.default.Fragment,null,r,Nt.default.createElement(_reactnative.Text,{style:[wa.buttonLabel,{color:s!=null?s:g},e==="secondary"&&wa.buttonLabelSecondary,e==="tertiary"&&wa.buttonLabelTertiary]},a),!!l&&Nt.default.createElement(_reactnative.View,{style:{marginLeft:"auto"}},l))))},wa=_reactnative.StyleSheet.create({buttonBox:{height:54,flexDirection:"row",justifyContent:"center",alignItems:"center",borderRadius:14,paddingHorizontal:16,gap:12},buttonBoxSecondary:{justifyContent:"flex-start",borderWidth:1,borderRadius:12},buttonLabel:{fontFamily:"Inter_600SemiBold",fontSize:16,lineHeight:24},buttonLabelSecondary:{fontFamily:"Inter_400Regular"},buttonLabelTertiary:{fontFamily:"Inter_500Medium"}});var Yo=({value:e,isFocused:a,isSuccess:t,isError:o})=>{let{colors:r}=p();return Nt.default.createElement(_reactnative.View,{style:[Et.box,{borderColor:o?r.error:t?r.success:a?r.interactive:r.border},a&&Et.focusedBox]},Nt.default.createElement(_reactnative.Text,{style:[Et.text,{color:r.text}]},e))},Et=_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 Ot=6,eu=[0,1,2,"-",3,4,5];function qt({value:e="",status:a=" ",onChangeText:t=()=>{},editable:o=!0,success:r=!1,error:l=!1,autoFocus:s=!1}){let{colors:u}=p(),c=_react.useRef.call(void 0, null),[i,d]=_react.useState.call(void 0, !1),[f,n]=_react.useState.call(void 0, {start:0,end:0}),m=h=>{let I=h.replace(/\D/g,"");t(I.substring(0,Ot))},g=i?Math.min(e.length,Ot-1):void 0;return Nt.default.createElement(_reactnative.View,{style:Pa.container},Nt.default.createElement(_reactnative.TextInput,{autoFocus:s,style:Pa.invisibleTextInput,value:e,onChangeText:m,maxLength:Ot,ref:c,editable:o,onFocus:()=>{d(!0),n({start:0,end:e.length||0})},onBlur:()=>d(!1),onSelectionChange:h=>n(h.nativeEvent.selection),selection:f,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"}),Nt.default.createElement(_reactnative.View,{style:Pa.codeContainer,pointerEvents:"none"},eu.map((h,I)=>h==="-"?Nt.default.createElement(au,{key:I}):Nt.default.createElement(Yo,{key:I,isFocused:g===h,value:e[h]||"",isSuccess:r,isError:l}))),Nt.default.createElement(_reactnative.Text,{style:[Pa.statusText,{color:l?u.errorDark:r?u.success:u.textMuted}]},a))}var au=()=>{let{colors:e}=p();return Nt.default.createElement(_reactnative.Text,{style:[Pa.separator,{color:e.text}]},"-")},Pa=_reactnative.StyleSheet.create({container:{justifyContent:"center",paddingHorizontal:0,gap:6},invisibleTextInput:{position:"absolute",width:"100%",height:60,backgroundColor:"transparent",color:"transparent",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 k=({title:e,subtitle:a,tight:t=!1,style:o})=>{let{colors:r}=p();return Nt.default.createElement(_reactnative.View,{style:[at.titleContainer,t&&at.tightContainer,o]},Nt.default.createElement(_reactnative.Text,{style:[at.title,{color:r.textTitle}]},e),a&&Nt.default.createElement(_reactnative.Text,{style:[at.subtitle,{color:r.textMuted}]},a))},at=_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 lr=({hint:e,link:a,onPress:t,disabled:o})=>{let{colors:r}=p();return Nt.default.createElement(_reactnative.View,{style:Vt.container},Nt.default.createElement(_reactnative.Text,{style:[Vt.hintText,{color:r.textMuted}]},e),a&&Nt.default.createElement(_reactnative.Pressable,{onPress:t,disabled:o},Nt.default.createElement(_reactnative.Text,{style:[Vt.linkText,{color:o?r.textMuted:r.interactive}]}," ",a)))},Vt=_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 pu=3e4,mu=()=>{let[e,a]=_react.useState.call(void 0, !1),t=_react.useCallback.call(void 0, ()=>{a(!1),setTimeout(()=>{a(!0)},pu)},[]);return _react.useEffect.call(void 0, ()=>{t()},[t]),[e,t]},se=({onSendCode:e,onRequestNewCode:a,subtitle:t,isLoading:o,error:r,isDone:l=!1,hint:s})=>{let[u,c]=_react.useState.call(void 0, ""),i=m=>{c(m),m.length===6&&e(m)},[d,f]=mu(),n=a&&(()=>{a(),f()});return Nt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:_t.innerContainer},Nt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},Nt.default.createElement(_reactnative.View,{style:_t.content},Nt.default.createElement(_reactnative.View,{style:_t.formContainer},Nt.default.createElement(k,{title:"Enter confirmation code",subtitle:t}),Nt.default.createElement(qt,{value:u,editable:!o,onChangeText:i,success:l,error:!!r,status:l?"Success.":r?gu(r):" ",autoFocus:!0}),!!n&&Nt.default.createElement(lr,{hint:s||"Didn\u2019t get a message?",link:"Resend code",onPress:n,disabled:!d}))),Nt.default.createElement(y,{title:"Continue",loading:o,onPress:()=>e(u),variant:"primary"})))},gu=_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."}),_t=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:16},formContainer:{rowGap:24}});var Ze={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ur={fill:Ze.fill,stroke:Ze.stroke,strokeWidth:Ze.strokeWidth,strokeLinecap:Ze.strokeLinecap,strokeLinejoin:Ze.strokeLinejoin};var x=(e,a)=>{let t=_react.forwardRef.call(void 0, (f,d)=>{var n=f,{color:o="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:s,children:u,"data-testid":c}=n,i=_chunkQTVIWU3Njs.c.call(void 0, n,["color","size","strokeWidth","absoluteStrokeWidth","children","data-testid"]);let m=_chunkQTVIWU3Njs.a.call(void 0, {stroke:o,strokeWidth:s?Number(l)*24/Number(r):l},i);return _react.createElement.call(void 0, Rt.Svg,_chunkQTVIWU3Njs.a.call(void 0, _chunkQTVIWU3Njs.b.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {ref:d},Ze),{width:r,height:r,"data-testid":c}),m),[...a.map(([g,h])=>{let I=g.charAt(0).toUpperCase()+g.slice(1);return _react.createElement.call(void 0, Rt[I],_chunkQTVIWU3Njs.a.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {},ur),m),h))}),...(Array.isArray(u)?u:[u])||[]])});return t.displayName=`${e}`,t};var Ma=x("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);var Fa=x("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var va=x("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);var xe=x("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var ka=x("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var Se=x("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var Te=x("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var be=x("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var Be=x("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var ue=x("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var Aa=x("Clock10",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 8 10",key:"atfzqc"}]]);var Ue=x("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);var je=x("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var Ta=x("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var De=x("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var ba=x("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);var ce=x("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);var Je=x("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var Ba=x("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);var Qe=x("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);var ye=x("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);var Ua=x("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);var Ye=x("ScanFace",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 9h.01",key:"x1ddxp"}]]);var Da=x("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var we=x("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var $e=x("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);var Ea=x("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);var Oa=x("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var _expowebbrowser = require('expo-web-browser'); var zt = _interopRequireWildcard(_expowebbrowser); var Xr = _interopRequireWildcard(_expowebbrowser); var wo = _interopRequireWildcard(_expowebbrowser);function da(){let e=ua(),{colors:a}=p();if(!e)return null;let{termsAndConditionsUrl:t,privacyPolicyUrl:o,requireUsersAcceptTerms:r}=e;if(r||!t&&!o)return null;let l=!!(t&&o);return Nt.default.createElement(_reactnative.View,{style:rt.container},Nt.default.createElement(_reactnative.Text,{style:[rt.hintText,{color:a.textMuted}]},"By logging in I agree to the"," ",t&&Nt.default.createElement(_reactnative.Text,{style:[rt.linkText,{color:a.interactive}],onPress:()=>zt.openBrowserAsync(t)},l?"Terms":"Terms of Service"),!1,l&&" & ",o&&Nt.default.createElement(_reactnative.Text,{style:[rt.linkText,{color:a.interactive}],onPress:()=>zt.openBrowserAsync(o)},"Privacy Policy")))}var rt=_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 ir = _interopRequireWildcard(_expolinking); var Nr = _interopRequireWildcard(_expolinking); var ms = _interopRequireWildcard(_expolinking);var Su=e=>Nt.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40"},e),Nt.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"})),nr=Su;var Mu="https://privy.io/?utm_source=module&utm_medium=module&utm_campaign=registration_module",B=()=>{let{colors:e}=p();return Nt.default.createElement(_reactnative.View,{style:Fu.legalFooterContainer},Nt.default.createElement(_reactnative.Pressable,{onPress:()=>ir.openURL(Mu),accessibilityRole:"link"},Nt.default.createElement(nr,{color:e.privyBrand,width:"100%",height:11})))},Fu=_reactnative.StyleSheet.create({legalFooterContainer:{flexDirection:"row",alignItems:"center",marginVertical:16,justifyContent:"center",gap:2}});var na=r=>{var l=r,{error:e,status:a,LeftIcon:t}=l,o=_chunkQTVIWU3Njs.c.call(void 0, l,["error","status","LeftIcon"]);let{colors:s}=p(),[u,c]=_react.useState.call(void 0, !1);return Nt.default.createElement(_reactnative.View,{style:st.container},Nt.default.createElement(_reactnative.View,{style:[st.inputBox,{backgroundColor:s.backgroundSecondary,borderColor:s.border},u&&{borderColor:s.interactive},e&&{borderColor:s.error}]},t,Nt.default.createElement(_reactnative.TextInput,_chunkQTVIWU3Njs.a.call(void 0, {cursorColor:s.interactive,placeholderTextColor:s.textPlaceholder,onFocus:()=>c(!0),onBlur:()=>c(!1),autoCapitalize:"none",returnKeyType:"next",multiline:!1,numberOfLines:1,style:[st.input,{color:s.text}]},o))),a&&Nt.default.createElement(_reactnative.Text,{style:[st.statusText,{color:s.textMuted},e&&{color:s.errorDark}]},a))},st=_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 pr=({sendCode:e,isLoading:a,error:t,initialEmail:o,FooterComponent:r})=>{let[l,s]=_react.useState.call(void 0, o!=null?o:""),{colors:u}=p();return Nt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:ut.innerContainer},Nt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},Nt.default.createElement(_reactnative.View,{style:ut.content},Nt.default.createElement(_reactnative.View,{style:ut.content},Nt.default.createElement(_reactnative.View,{style:ut.formContainer},Nt.default.createElement(k,{title:"Enter your email"}),Nt.default.createElement(na,{LeftIcon:Nt.default.createElement(Qe,{size:24,color:u.icon}),value:l,onChangeText:s,error:!!t,status:t?Ou(t):" ",placeholder:"your@email.com",autoComplete:"email",keyboardType:"email-address",autoFocus:!0})),r),Nt.default.createElement(B,null)),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:"Continue",loading:a,onPress:()=>e(l)}),Nt.default.createElement(da,null))))},Ou=_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."}),ut=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:4},formContainer:{rowGap:24}});var _zustand = require('zustand');var S=class extends Error{constructor(t,o){super(o);this.code=t,this.error=o}},A=class extends S{constructor(t){super("underlying_error",t instanceof Error?t.message:"An underlying error occurred");this.wrappedError=t}};var Kt={success:e=>({value:e}),error:e=>({error:e})};var mr=e=>{let a=Array.from(new Set(e));return a.length===0?Kt.error(new S("no_login_methods_available","No login methods available")):Kt.success(a)},Zt=e=>{let a=e.length,t=e.every(o=>o==="sms"||o==="email");return a<=2&&t?e[0]:null},gr=(e,a)=>{if(e.length!==2)return null;let[t,o]=e;return a===t?o:t},Ee={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"};var _vanilla = require('zustand/vanilla');var jt=_vanilla.createStore.call(void 0, )(e=>({elementsConfig:null,updateUIMounted:a=>e({elementsConfig:a})})),ia=()=>{let{elementsConfig:e}=jt.getState();if(!(e!==null))throw new S("privy_elements_not_ready","Privy Elements is not mounted")},Lr=()=>{let{elementsConfig:e}=jt.getState();if(e===null)throw new S("privy_elements_not_ready","Privy Elements is not mounted");return e},Ir=e=>{_react.useEffect.call(void 0, ()=>{let{updateUIMounted:a}=jt.getState();return a(e),()=>{a(null)}},[e])};function fa(e){return new Promise((a,t)=>{e({resolve:a,reject:t})})}function Vu(e,a){return{resolve:t=>{a(),e.resolve(t)},reject:t=>{a(),e.reject(t)}}}function dt(e,a,t){let o=setTimeout(()=>{e.reject(a())},t);return Vu(e,()=>{clearTimeout(o)})}var Ru=1e3*60*5,ea=_zustand.create.call(void 0, )((e,a)=>({privyElementsConfig:null,loginPromiseResolvers:null,activeLoginMethod:null,openLoginFlow:(t,o,r,l)=>fa(s=>{var f,n,m;let u=o.app.getConfig();if(!u)return s.reject(new S("privy_not_ready","Privy is not ready"));if(r!==null)return s.reject(new S("user_already_logged_in","User is already logged in"));if(ia(),a().loginPromiseResolvers!==null)return s.reject(new S("existing_login_flow_in_progress","A login flow is already in progress"));let c=mr(t.loginMethods);if(c.error)return s.reject(c.error);let i={loginMethods:c.value,appearance:{logo:(m=(n=(f=t.appearance)==null?void 0:f.logo)!=null?n:u.logo_url)!=null?m:void 0}},d=dt(s,()=>(e({privyElementsConfig:null,loginPromiseResolvers:null}),new S("login_flow_timeout","The login flow timed out")),Ru);l(),e({loginPromiseResolvers:d,privyElementsConfig:i,activeLoginMethod:Zt(i.loginMethods)})}),closeLoginFlow:()=>{var t;return(t=a().loginPromiseResolvers)==null||t.reject(new S("login_flow_closed","The login flow was closed")),e({privyElementsConfig:null,loginPromiseResolvers:null})},goBack:()=>{let{activeLoginMethod:t,privyElementsConfig:o,updateActiveLoginMethod:r,closeLoginFlow:l}=a();if(!o){l();return}let s=Zt(o.loginMethods)===null;t===null||!s?l():r(null)},updateActiveLoginMethod:t=>e({activeLoginMethod:t})})),nt=()=>ea(e=>e.privyElementsConfig),hr=()=>ea(e=>e.openLoginFlow),Oe=()=>{let e=ea(t=>t.closeLoginFlow),a=ua();return _react.useCallback.call(void 0, t=>{a!=null&&a.requireUsersAcceptTerms&&!(t!=null&&t.termsReviewed)||e()},[e,a])},it=()=>ea(e=>e.goBack),Cr=()=>[ea(e=>e.activeLoginMethod),ea(e=>e.updateActiveLoginMethod)],Gu=e=>{let{loginPromiseResolvers:a}=ea.getState();a==null||a.resolve(e)},xr=()=>Gu;var ft=({onLoginMethodChange:e,otherLoginMethod:a})=>a?Nt.default.createElement(y,{variant:"tertiary",title:`Use ${Ee[a]} instead`,onPress:()=>e(a)}):null;var Ku=600,wr=({goBackRef:e,onLoginMethodChange:a,otherLoginMethod:t})=>{let{setOtpState:o}=_react.useContext.call(void 0, _chunkAXOO6XM5js._),r=Oe(),[l,s]=_react.useState.call(void 0, ""),{state:u,loginWithCode:c,sendCode:i}=_chunkAXOO6XM5js.r.call(void 0, ),[d,f]=_react.useState.call(void 0, "email"),{step:n,error:m=null,isLoading:g=!1,isDone:h=!1}=_react.useMemo.call(void 0, ()=>{var I;switch(u.status){case"initial":return{step:{type:"email"}};case"sending-code":return{step:{type:d},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:d},error:(I=u.error)!=null?I:new Error("Unknown error")}}},[d,u.status]);switch(d!==n.type&&f(n.type),_react.useEffect.call(void 0, ()=>{if(!h)return;let I=setTimeout(()=>{r()},Ku);return()=>clearTimeout(I)},[h,r]),_react.useEffect.call(void 0, ()=>{if(n.type==="code")return e.current=()=>{o({status:"initial"})},()=>{e.current=null}},[n.type,o]),n.type){case"code":return Nt.default.createElement(se,{onSendCode:I=>c({code:I,email:l}),onRequestNewCode:()=>i({email:l}),subtitle:`Please check ${l} for a message with your login code.`,isLoading:g,error:m,isDone:h});case"email":return Nt.default.createElement(pr,{initialEmail:l,sendCode:I=>{s(I),i({email:I})},isLoading:g,error:m,FooterComponent:Nt.default.createElement(ft,{onLoginMethodChange:a,otherLoginMethod:t})})}};function Pr(e,a){let[t,o]=_react.useState.call(void 0, e);return _react.useEffect.call(void 0, ()=>{let r=setTimeout(()=>{o(e)},a);return()=>{clearTimeout(r)}},[e,a]),t}var Mr=[["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 Yu=Mr,Fr=Yu.map(([e,a,t])=>({name:e,code:a,callCode:_jssdkcore.getCountryCallingCode.call(void 0, a),flag:t}));var kr=({country:e,onPress:a,selected:t})=>{let{colors:o}=p();return Nt.default.createElement(_reactnative.Pressable,{onPress:a},Nt.default.createElement(_reactnative.View,{style:Qt.row},Nt.default.createElement(_reactnative.Text,{style:Qt.rowFlag},e.flag),Nt.default.createElement(_reactnative.Text,{style:[Qt.rowLabel,{color:o.text}]},e.name," (+",e.callCode,")"),t&&Nt.default.createElement(xe,{size:24,color:o.interactive})))},Qt=_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 nd=600,Tr=({countryCode:e,onChangeCountryCode:a,onComplete:t})=>{let{colors:o}=p(),[r,l]=_react.useState.call(void 0, ""),s=Pr(r,nd),u=_react.useMemo.call(void 0, ()=>Fr.filter(c=>c.name.toLowerCase().includes(s.toLowerCase())),[s]);return Nt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:Ar.innerContainer},Nt.default.createElement(_reactnative.View,{style:Ar.header},Nt.default.createElement(k,{title:"Select country code"}),Nt.default.createElement(na,{LeftIcon:Nt.default.createElement(Da,{size:24,color:o.iconSubtle}),value:r,onChangeText:l,placeholder:"Search country"})),Nt.default.createElement(_reactnative.FlatList,{style:{flex:1},data:u,keyExtractor:c=>`country-option-${c.code}`,renderItem:({item:c})=>Nt.default.createElement(kr,{country:c,selected:c.code===e,onPress:()=>{a(c.code),t()}})}),Nt.default.createElement(y,{title:"Continue",onPress:t}))},Ar=_reactnative.StyleSheet.create({innerContainer:{flex:1,paddingHorizontal:16},header:{gap:20}});var Br=({countryCode:e,onPress:a})=>{let{colors:t}=p();return Nt.default.createElement(_reactnative.Pressable,{onPress:a},Nt.default.createElement(_reactnative.View,{style:br.cell},Nt.default.createElement(_reactnative.Text,{style:[br.text,{color:t.text}]},e," +",_jssdkcore.getCountryCallingCode.call(void 0, e)),Nt.default.createElement(ka,{size:16,color:t.icon})))},br=_reactnative.StyleSheet.create({cell:{flexDirection:"row",alignItems:"center",gap:6},text:{fontFamily:"Inter_400Regular",fontSize:18,lineHeight:30}});var mt=({sendCode:e,isLoading:a,error:t,initialPhone:o,FooterComponent:r})=>{let[l,s]=_react.useState.call(void 0, o!=null?o:""),[u,c]=_react.useState.call(void 0, "US"),[i,d]=_react.useState.call(void 0, !1),f=_jssdkcore.phoneNumberTypingFormatter.call(void 0, u),n=_jssdkcore.getPlaceholderPhoneNumber.call(void 0, u),m=g=>{try{let h=g.replace(/\D/g,""),I=l.replace(/\D/g,""),w=h===I?g:f.input(g);s(w)}catch(h){console.error("Error processing phone number:",h),s("")}};return i?Nt.default.createElement(Tr,{countryCode:u,onChangeCountryCode:c,onComplete:()=>d(!1)}):Nt.default.createElement(_reactnative.KeyboardAvoidingView,{behavior:_reactnative.Platform.OS==="ios"?"padding":void 0,style:pt.innerContainer},Nt.default.createElement(_reactnative.View,{style:{flex:1,justifyContent:"space-between",paddingHorizontal:16,paddingBottom:16}},Nt.default.createElement(_reactnative.View,{style:pt.content},Nt.default.createElement(_reactnative.View,{style:pt.content},Nt.default.createElement(_reactnative.View,{style:pt.formContainer},Nt.default.createElement(k,{title:"Enter your phone"}),Nt.default.createElement(na,{LeftIcon:Nt.default.createElement(Br,{countryCode:u,onPress:()=>d(!0)}),value:l,onChangeText:m,error:!!t,status:t?yd(t):" ",placeholder:n,autoComplete:"tel",keyboardType:"phone-pad",autoFocus:!0})),r),Nt.default.createElement(B,null)),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:"Continue",loading:a,onPress:()=>e(_jssdkcore.formatPhoneNumber.call(void 0, l.replace(/\D/g,""),u))}),Nt.default.createElement(da,null))))},yd=_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."}),pt=_reactnative.StyleSheet.create({innerContainer:{flex:1},content:{gap:4},formContainer:{rowGap:24}});var Md=600,Er=({goBackRef:e,onLoginMethodChange:a,otherLoginMethod:t})=>{let{setOtpState:o}=_react.useContext.call(void 0, _chunkAXOO6XM5js._),r=Oe(),[l,s]=_react.useState.call(void 0, ""),{state:u,loginWithCode:c,sendCode:i}=_chunkAXOO6XM5js.t.call(void 0, ),[d,f]=_react.useState.call(void 0, "phone"),{step:n,error:m=null,isLoading:g=!1,isDone:h=!1}=_react.useMemo.call(void 0, ()=>{var I;switch(u.status){case"initial":return{step:{type:"phone"}};case"sending-code":return{step:{type:d},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:d},error:(I=u.error)!=null?I:new Error("Unknown error")}}},[d,u.status]);switch(d!==n.type&&f(n.type),_react.useEffect.call(void 0, ()=>{if(!h)return;let I=setTimeout(()=>{r()},Md);return()=>clearTimeout(I)},[h,r]),_react.useEffect.call(void 0, ()=>{if(n.type==="code")return e.current=()=>{o({status:"initial"})},()=>{e.current=null}},[n.type,o,r]),n.type){case"phone":return Nt.default.createElement(mt,{initialPhone:l,sendCode:I=>{s(I),i({phone:I})},isLoading:g,error:m,FooterComponent:Nt.default.createElement(ft,{onLoginMethodChange:a,otherLoginMethod:t})});case"code":return Nt.default.createElement(se,{onSendCode:I=>c({code:I,phone:l}),onRequestNewCode:()=>i({phone:l}),subtitle:`Please check ${l} for a message with your login code.`,isLoading:g,error:m,isDone:h})}};var Ad=28,Td=24,Or=({close:e,style:a})=>{let{colors:t}=p();return Nt.default.createElement(_reactnative.View,{style:[bd.slimNavigationBar,a]},e&&Nt.default.createElement(_reactnative.Pressable,{onPress:e},Nt.default.createElement(ue,{color:t.icon,size:Td})))},bd=_reactnative.StyleSheet.create({slimNavigationBar:{height:Ad,paddingBottom:4,flexDirection:"row",justifyContent:"flex-end",backgroundColor:"transparent"}});var b=({goBack:e,close:a})=>Nt.default.createElement(_reactnative.View,{style:ao.navigationBar},Nt.default.createElement(_reactnative.View,null,e&&Nt.default.createElement(Ud,{onPress:e})),Nt.default.createElement(_reactnative.View,null,a&&Nt.default.createElement(Dd,{onPress:a}))),Ud=e=>{let{colors:a}=p();return Nt.default.createElement(_reactnative.Pressable,_chunkQTVIWU3Njs.a.call(void 0, {},e),Nt.default.createElement(_reactnative.View,{style:ao.backButton},Nt.default.createElement(Fa,{size:24,color:a.icon})))},Dd=e=>{let{colors:a}=p();return Nt.default.createElement(_reactnative.Pressable,_chunkQTVIWU3Njs.a.call(void 0, {},e),Nt.default.createElement(_reactnative.View,{style:ao.backButton},Nt.default.createElement(Oa,{size:24,color:a.icon})))},ao=_reactnative.StyleSheet.create({navigationBar:{height:48,flexDirection:"row",justifyContent:"space-between"},backButton:{width:48,height:48,justifyContent:"center",alignItems:"center"}});var U=({title:e="Error!",subtitle:a="Something went wrong."})=>{let{colors:t}=p();return Nt.default.createElement(_reactnative.View,{style:qd.container},Nt.default.createElement(ue,{size:74,color:t.error}),Nt.default.createElement(k,{title:e,subtitle:a,tight:!0}))},qd=_reactnative.StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:16}});var R=({title:e="Success!",subtitle:a})=>{let{colors:t}=p();return Nt.default.createElement(_reactnative.View,{style:Gd.container},Nt.default.createElement(Rt.default,{height:"74",width:"74",viewBox:"0 0 74 74"},Nt.default.createElement(_reactnativesvg.Circle,{cx:"37",cy:"37",r:"36.8",fill:t.successLight}),Nt.default.createElement(_reactnativesvg.G,{transform:"translate(18, 18)"},Nt.default.createElement(be,{size:38,color:t.success}))),Nt.default.createElement(k,{title:e,subtitle:a,tight:!0}))},Gd=_reactnative.StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:16}});var gt={regular:"Inter_400Regular",medium:"Inter_500Medium",semibold:"Inter_600SemiBold"};var _a=Nt.default.forwardRef((r,o)=>{var l=r,{style:e,variant:a="default"}=l,t=_chunkQTVIWU3Njs.c.call(void 0, l,["style","variant"]);let{colors:s}=p();return Nt.default.createElement(_reactnative.View,_chunkQTVIWU3Njs.a.call(void 0, {ref:o,style:[oo.alert,a==="info"&&{backgroundColor:s.backgroundInformation,borderColor:s.borderInformation},e]},t))});_a.displayName="Alert";var Xd=Nt.default.forwardRef((o,t)=>{var r=o,{style:e}=r,a=_chunkQTVIWU3Njs.c.call(void 0, r,["style"]);let{colors:l}=p();return Nt.default.createElement(_reactnative.Text,_chunkQTVIWU3Njs.a.call(void 0, {ref:t,style:[oo.title,{color:l.text},e]},a))});Xd.displayName="AlertTitle";var Ra=Nt.default.forwardRef((o,t)=>{var r=o,{style:e}=r,a=_chunkQTVIWU3Njs.c.call(void 0, r,["style"]);let{colors:l}=p();return Nt.default.createElement(_reactnative.Text,_chunkQTVIWU3Njs.a.call(void 0, {ref:t,style:[oo.description,{color:l.text},e]},a))});Ra.displayName="AlertDescription";var oo=_reactnative.StyleSheet.create({alert:{borderRadius:8,alignItems:"center",gap:12,paddingHorizontal:12,paddingVertical:8,flexDirection:"row"},title:{marginBottom:4,fontFamily:gt.semibold,fontSize:16},description:{fontSize:14,lineHeight:20}});var jd=e=>ro.createElement(Rt.default,_chunkQTVIWU3Njs.a.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),ro.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"})),Vr=jd;var Qd=e=>aa.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",x:0,y:0,viewBox:"0 0 80 38.1"},e),aa.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"}}),aa.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"}}),aa.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"}}),aa.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"}}),aa.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"}})),Wr=Qd;function Na({method:e}){let{colors:a}=p();switch(e){case"card":return Nt.default.createElement(Ta,{size:24,color:a.icon});case"exchange":return Nt.default.createElement(Ma,{size:24,color:a.icon});case"payment-request":return _reactnative.Platform.OS==="ios"?Nt.default.createElement(Vr,{height:70,width:33}):Nt.default.createElement(Wr,{height:70,width:33});case"manual":return Nt.default.createElement(Ua,{size:24,color:a.icon});default:return null}}function Rr({appName:e,methods:a,onMethodSelected:t,onSwitchProvider:o}){let{colors:r}=p();return Nt.default.createElement(_reactnative.ScrollView,{style:lo.scrollView,contentContainerStyle:lo.container},Nt.default.createElement(_reactnative.View,{style:{gap:32}},Nt.default.createElement(k,{title:"Add funds",subtitle:`Select a method for funding your ${e?`${e} `:""}wallet.`}),Nt.default.createElement(_reactnative.View,{style:lo.listContainer},a.includes("card")&&Nt.default.createElement(y,{title:"Debit card",LeftIcon:Nt.default.createElement(Na,{method:"card"}),RightIcon:a.includes("payment-request")?Nt.default.createElement(Na,{method:"payment-request"}):void 0,onPress:()=>t("card"),variant:"secondary"}),a.includes("exchange")&&Nt.default.createElement(y,{title:"Transfer from an exchange",LeftIcon:Nt.default.createElement(Na,{method:"exchange"}),onPress:()=>t("exchange"),variant:"secondary"}),Nt.default.createElement(y,{title:"Receive funds",LeftIcon:Nt.default.createElement(Na,{method:"manual"}),onPress:()=>t("manual"),variant:"secondary"}),!!o&&Nt.default.createElement(_reactnative.Pressable,{onPress:o},Nt.default.createElement(_a,{variant:"info",style:{borderWidth:1}},Nt.default.createElement(Je,{size:16,color:r.iconInformation}),Nt.default.createElement(Ra,null,"Having trouble facing location restrictions?"," ",Nt.default.createElement(_reactnative.Text,{style:{color:r.interactive}},"Try a different provider.")))))),Nt.default.createElement(B,null))}var lo=_reactnative.StyleSheet.create({scrollView:{flex:1},container:{paddingHorizontal:16,justifyContent:"space-between",flex:1},listContainer:{gap:16,alignSelf:"stretch"}});var Gr=()=>{let{colors:e}=p(),a=_reactnative.useAnimatedValue.call(void 0, 0);_react.useEffect.call(void 0, ()=>{a.setValue(0);let o=_reactnative.Animated.loop(_reactnative.Animated.timing(a,{toValue:1,duration:1200,useNativeDriver:!0,easing:_reactnative.Easing.linear}));return o.start(),()=>o.stop()},[a]);let t=a.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return Nt.default.createElement(_reactnative.Animated.View,{style:{transform:[{rotate:t}]}},Nt.default.createElement(Rt.default,{width:160,height:160,viewBox:"0 0 166 166",fill:"none"},Nt.default.createElement(_reactnativesvg.Circle,{cx:"83",cy:"83",r:"80",stroke:e.icon,strokeWidth:"6"}),Nt.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 ma=()=>Nt.default.createElement(_reactnative.View,{style:cn.container},Nt.default.createElement(Gr,null)),cn=_reactnative.StyleSheet.create({container:{flex:1,gap:20,alignItems:"center",justifyContent:"center",paddingHorizontal:16}});function Kr({uri:e,goBackRef:a}){let t=_react.useRef.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{if(e&&!t.current){t.current=!0;let o=Nr.createURL("/");Xr.openAuthSessionAsync(e,o,{createTask:!1}).catch(r=>{console.warn("[Privy] Funding flow error",r)}).finally(()=>{var r;console.log("[Privy] Funding flow finished"),(r=a==null?void 0:a.current)==null||r.call(a)})}},[e,a]),Nt.default.createElement(ma,null)}var _reactnativeqrcodestyled = require('react-native-qrcode-styled'); var _reactnativeqrcodestyled2 = _interopRequireDefault(_reactnativeqrcodestyled);var _expoclipboard = require('expo-clipboard'); var Yr = _interopRequireWildcard(_expoclipboard); var ps = _interopRequireWildcard(_expoclipboard);function Zr({children:e,style:a}){let{colors:t}=p();return Nt.default.createElement(_reactnative.Text,{style:[Cn.badge,{backgroundColor:t.backgroundHighlight,color:t.textHighlight},a]},e)}var Cn=_reactnative.StyleSheet.create({badge:{fontSize:12,lineHeight:18,paddingHorizontal:8,paddingVertical:2,borderRadius:6,flexGrow:0}});function jr({children:e,stopped:a}){let t=_reactnative.useAnimatedValue.call(void 0, 1);return _react.useEffect.call(void 0, ()=>{let o=_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!a&&o.start(),()=>(o.stop(),o.reset())},[t,a]),Nt.default.createElement(_reactnative.Animated.View,{style:{opacity:t}},e)}function $r({address:e,balance:a,currencySymbol:t,isLoading:o}){let{colors:r}=p(),[l,s]=_react.useState.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{if(l){let u=setTimeout(()=>s(!1),2e3);return()=>clearTimeout(u)}},[l]),Nt.default.createElement(_reactnative.Pressable,{style:[uo.container,{borderColor:r.border}],onPress:()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){Yr.setStringAsync(e),s(!0)})},Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(_reactnative.Text,{style:[uo.title,{color:r.textMuted}]},"Your wallet"),Nt.default.createElement(_reactnative.View,{style:{flexDirection:"row",gap:10,alignItems:"center"}},Nt.default.createElement(_reactnative.Text,{style:[uo.walletAddress,{color:r.text}]},_jssdkcore.formatWalletAddress.call(void 0, e)),l?Nt.default.createElement(xe,{size:14,color:r.textMuted}):Nt.default.createElement(je,{size:14,color:r.textMuted}))),Nt.default.createElement(jr,{stopped:!o},Nt.default.createElement(Zr,{style:{minWidth:50}},o?"":`${a} ${t}`)))}var uo=_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:gt.medium}});var bn=e=>It.createElement(Rt.default,_chunkQTVIWU3Njs.a.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),It.createElement(_reactnativesvg.G,{fill:e.color},It.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"}))),el=bn;var W=_zustand.create.call(void 0, )((e,a)=>({config:null,promiseResolvers:null,screen:null,setScreen:t=>e({screen:t}),method:null,setMethod:t=>{var o;if(!t&&((o=a().config)!=null&&o.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=a().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=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){return fa(o=>{ia(),e({config:t,promiseResolvers:o,method:t.paymentOptions.length?null:"manual",screen:t.paymentOptions.length?"method-selection":"manual-funding"})})}),endFundingFlow:()=>{var t;(t=a().promiseResolvers)==null||t.resolve(),a().reset()},exitFundingFlow:()=>{var t;(t=a().promiseResolvers)==null||t.reject(new S("funding_flow_cancelled","Funding flow was cancelled")),a().reset()}})),He=()=>W(e=>e.config),al=()=>[W(e=>e.screen),W(e=>e.setScreen)],tl=()=>[W(e=>e.method),W(e=>e.setMethod)],ol=()=>[W(e=>e.providerLink),W(e=>e.setProviderLink)],rl=()=>[W(e=>e.moonpayTransactionId),W(e=>e.setMoonpayTransactionId)],ll=()=>[W(e=>e.coinbasePartnerUserId),W(e=>e.setCoinbasePartnerUserId)],sl=()=>[W(e=>e.provider),W(e=>e.switchProvider)],ul=()=>[W(e=>e.error),W(e=>e.setError)],ht=()=>W(e=>e.startFundingFlow),dl=()=>W(e=>e.endFundingFlow),nl=()=>W(e=>e.exitFundingFlow),Ve=W.setState;function Ct(e){var a;return(a=e.tokenInfo)!=null&&a.symbol?e.tokenInfo.symbol:e.chainType==="solana"?"SOL":e.chain.nativeCurrency.symbol}var _viem = require('viem');function il(o){return _chunkQTVIWU3Njs.d.call(void 0, this,arguments,function*({chain:e,walletAddress:a,erc20Address:t}){return yield _viem.createPublicClient.call(void 0, {chain:e,transport:_viem.http.call(void 0, )}).readContract({address:t,abi:En,functionName:"balanceOf",args:[a]})})}var En=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];var gl=5e3;function Ll({fundingUiConfig:e,onFunded:a}){let t=_n({enabled:e.chainType==="ethereum",fundingUiConfig:e,onFunded:a}),o=Rn({enabled:e.chainType==="solana",fundingUiConfig:e,onFunded:a});return e.chainType==="ethereum"?t:o}function _n({enabled:e,fundingUiConfig:{address:a,chain:t,tokenInfo:o},onFunded:r}){let[l,s]=_react.useState.call(void 0, null),[u,c]=_react.useState.call(void 0, !1),i=_react.useMemo.call(void 0, ()=>{if(!(!e||!t))return _viem.createPublicClient.call(void 0, {chain:t,transport:_viem.http.call(void 0, )})},[t,e]),d=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){if(!(!e||!a||!i))try{return c(!0),o!=null&&o.address?yield il({walletAddress:a,erc20Address:o.address,chain:t}):yield i.getBalance({address:a})}catch(f){console.error(f)}finally{c(!1)}}),[i,a,o==null?void 0:o.address,t,e]);return _react.useEffect.call(void 0, ()=>{if(l==null&&d().then(f=>f!=null&&s(f)),r){let f=setInterval(()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){let n=yield d();n!=null&&(s(n),l!=null&&n>l&&r())}),gl);return()=>clearInterval(f)}},[d,l,r]),{balance:l,isLoading:u&&l==null,formattedBalance:o?_jssdkcore.formatTokenAmount.call(void 0, {amount:l!=null?l:BigInt(0),decimals:o.decimals}):_jssdkcore.formatWeiAmount.call(void 0, {wei:l!=null?l:BigInt(0)})}}function Rn({enabled:e,fundingUiConfig:{address:a,cluster:t,tokenInfo:o},onFunded:r}){let[l,s]=_react.useState.call(void 0, null),[u,c]=_react.useState.call(void 0, !1),i=_react.useMemo.call(void 0, ()=>{if(!(!e||!t))return new (0, _jssdkcore.SolanaClient)(t)},[e,t]),d=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){if(!(!e||!a||!i))try{if(c(!0),o!=null&&o.address){let f=yield i.getTokenAccountsByOwner(a,o.address);return f==null?void 0:f.amount}else return yield i.getBalance(a)}catch(f){console.error(f)}finally{c(!1)}}),[a,i,e,o==null?void 0:o.address]);return _react.useEffect.call(void 0, ()=>{if(l==null&&d().then(f=>f!=null&&s(f)),r){let f=setInterval(()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){let n=yield d();n!=null&&(s(n),l!=null&&n>l&&r())}),gl);return()=>clearInterval(f)}},[d,l,r]),{balance:l,isLoading:u&&l==null,formattedBalance:o!=null&&o.address?_jssdkcore.formatTokenAmount.call(void 0, {amount:l!=null?l:BigInt(0),decimals:o.decimals}):_jssdkcore.formatLamportsAmount.call(void 0, {lamports:l!=null?l:BigInt(0)})}}function Il({onFunded:e}){let a=He(),{colors:t}=p();if(!a)throw new Error("Invalid funding config");let o=a.chainType==="ethereum"?a.chain.name:_jssdkcore.getSolanaClusterDisplayName.call(void 0, a.cluster.name),r=Ct(a),{formattedBalance:l,isLoading:s}=Ll({fundingUiConfig:a,onFunded:e});return Nt.default.createElement(_reactnative.View,{style:io.container},Nt.default.createElement(_reactnative.View,{style:{gap:28}},Nt.default.createElement(k,{title:"Receive funds",subtitle:`Scan or copy your wallet address to receive funds on ${o}.`}),Nt.default.createElement(_reactnative.View,{style:io.qrContainer},Nt.default.createElement(_reactnativeqrcodestyled2.default,{data:a.address,pieceSize:8,errorCorrectionLevel:"Q",pieceBorderRadius:2,isPiecesGlued:!0,color:t.text}),Nt.default.createElement(_reactnative.View,{style:[io.logoContainer,{backgroundColor:t.background}]},Nt.default.createElement(el,{height:40,width:40,color:t.privyBrand}))),Nt.default.createElement(_reactnative.View,{style:{gap:12}},Nt.default.createElement(_a,{variant:"info"},Nt.default.createElement(Je,{size:16,color:t.iconInformation}),Nt.default.createElement(Ra,null,"Make sure to send on ",o,".")),Nt.default.createElement($r,{address:a.address,currencySymbol:r,balance:l,isLoading:s}))),Nt.default.createElement(B,null))}var io=_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 ga(r){return _chunkQTVIWU3Njs.d.call(void 0, this,arguments,function*({config:e,method:a,client:t,provider:o}){var l,s,u,c,i,d;if(Ve({method:a}),a==="manual"){Ve({screen:"manual-funding"});return}Ve({screen:"provider-funding"});try{let f=e.paymentOptions.find(n=>n.method===a&&n.provider===o)||e.paymentOptions.find(n=>n.method===a);if((f==null?void 0:f.provider)==="moonpay"){let n;e.chainType==="ethereum"?n=_jssdkcore.chainToMoonpayCurrency.call(void 0, e.chain.id,((l=e.tokenInfo)==null?void 0:l.symbol)==="USDC"?"USDC":"native-currency"):n=((s=e.tokenInfo)==null?void 0:s.symbol)==="USDC"?"USDC_SOL":"SOL";let m=yield t.funding.moonpay.sign({address:e.address,config:{currencyCode:n,paymentMethod:_jssdkcore.fundingMethodToMoonpayPaymentMethod.call(void 0, a),quoteCurrencyAmount:parseFloat(e.amount),uiConfig:_chunkQTVIWU3Njs.a.call(void 0, {accentColor:Qn},(u=e.moonpay)==null?void 0:u.uiConfig)},useSandbox:!!((c=e.moonpay)!=null&&c.useSandbox)});Ve({providerLink:m.signedUrl,moonpayTransactionId:m.externalTransactionId});return}if((f==null?void 0:f.provider)==="coinbase"){let n,m;e.chainType==="ethereum"?(n=_jssdkcore.toCoinbaseAssetId.call(void 0, e.chain.id,((i=e.tokenInfo)==null?void 0:i.symbol)==="USDC"?"USDC":"native-currency"),m=_jssdkcore.toCoinbaseBlockchainFromChainId.call(void 0, e.chain.id)):(n=((d=e.tokenInfo)==null?void 0:d.symbol)==="USDC"?"USDC":"SOL",m="solana");let g=yield t.funding.coinbase.initOnRampSession({addresses:[{address:e.address,blockchains:[m]}],assets:[n]}),h=_jssdkcore.getCoinbaseOnRampUrl.call(void 0, {appId:t.app.appId,input:g,amount:e.amount,blockchain:m,asset:n,experience:a==="exchange"?"send":"buy"});Ve({providerLink:h.url.toString(),coinbasePartnerUserId:g.partner_user_id});return}Ve({error:new S("failed_to_fetch_funding_provider_uri","A provider for this funding flow couldn't be found")})}catch(f){console.error(f),Ve({error:new S("failed_to_fetch_funding_provider_uri","A provider for this funding flow couldn't be found")})}})}var Qn="#110F2A";var ei=3e3,ai=["success","failure"];function hl({onSuccess:e,onError:a}){var c;let t=_chunkAXOO6XM5js.l.call(void 0, ),o=He(),[r]=ll(),[l,s]=_react.useState.call(void 0, "pending"),u=_react.useRef.call(void 0, 0);_react.useEffect.call(void 0, ()=>{s("pending")},[r]),_react.useEffect.call(void 0, ()=>{if(!r||ai.includes(l))return;let i=setInterval(()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{let d=yield t.funding.coinbase.getStatus(r);if(!(d!=null&&d.status))return;s(d.status),u.current=0}catch(d){console.error(d),u.current+=1,u.current>=3&&s("failure")}}),ei);return()=>clearInterval(i)},[l,r,t,(c=o==null?void 0:o.moonpay)==null?void 0:c.useSandbox]),_react.useEffect.call(void 0, ()=>{l==="success"?e({status:l}):l==="failure"&&a({status:l})},[l,e,a])}var li=3e3,si=["completed","failed","serviceFailure"];function xl({onSuccess:e,onError:a}){var c;let t=_chunkAXOO6XM5js.l.call(void 0, ),o=He(),[r]=rl(),[l,s]=_react.useState.call(void 0, "pending"),u=_react.useRef.call(void 0, 0);_react.useEffect.call(void 0, ()=>{s("pending")},[r]),_react.useEffect.call(void 0, ()=>{if(!r||si.includes(l))return;let i=setInterval(()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){var d,f;try{let n=yield t.funding.moonpay.getTransactionStatus({transactionId:r,useSandbox:!!((d=o==null?void 0:o.moonpay)!=null&&d.useSandbox)});if(console.log("status",n==null?void 0:n.status),!(n!=null&&n.status))return;if(s(n.status),u.current=0,n.status==="completed"){console.log(JSON.stringify(n));let m=(f=n.getValidQuote)==null?void 0:f.quoteCurrencyAmount;e({status:"completed",amount:m?String(m):void 0})}else n.status==="failed"||n.status}catch(n){if(n instanceof _jssdkcore.MoonpayApiError&&n.response.status===404)return;console.error(n),u.current>=3&&(s("serviceFailure"),a({status:"serviceFailure"}))}}),li);return()=>clearInterval(i)},[l,r,t,(c=o==null?void 0:o.moonpay)==null?void 0:c.useSandbox,e,a])}function yl({config:e,goBackRef:a}){let t=_chunkAXOO6XM5js.l.call(void 0, ),[o,r]=al(),l=nl(),s=dl(),[u,c]=tl(),[i,d]=sl(),[f]=ol(),[n,m]=ul(),[g,h]=_react.useState.call(void 0, ),[I,w]=_react.useState.call(void 0, !1),[P,E]=_react.useState.call(void 0, ),T=_react.useMemo.call(void 0, ()=>Array.from(new Set(e.paymentOptions.map(({method:F})=>F))),[e.paymentOptions]),N=_react.useMemo.call(void 0, ()=>e.paymentOptions.filter(F=>F.method===g),[e.paymentOptions,g]);function O(F,Ne){return _chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){F!==g&&h(F),yield ga({method:F,provider:(()=>{var Sa,ya;return Ne||(F==="card"&&(ya=(Sa=e.card)==null?void 0:Sa.preferredProvider)!=null?ya:i)})(),client:t,config:e})})}function V(){if(!g)return;let F=d();O(g,F)}let Z=_react.useCallback.call(void 0, ()=>{r("success");let F=setTimeout(()=>s(),5e3);return()=>clearTimeout(F)},[r,s]),ae=_react.useCallback.call(void 0, ({amount:F})=>{E(F),r("success");let Ne=setTimeout(()=>s(),5e3);return()=>clearTimeout(Ne)},[r,s]),Ge=_react.useCallback.call(void 0, ()=>{m(new S("provider_transaction_failed","Something went wrong adding funds from Moonpay. Please try again or use another method to fund your wallet."))},[m]),ze=_react.useCallback.call(void 0, ()=>{m(new S("provider_transaction_failed","Something went wrong adding funds from Coinbase. Please try again or use another method to fund your wallet."))},[m]);switch(xl({onSuccess:ae,onError:Ge}),hl({onSuccess:ae,onError:ze}),_react.useEffect.call(void 0, ()=>(a.current=()=>{if(o==="method-selection"){l();return}if(o==="manual-funding"&&!e.paymentOptions.length){l();return}if(e.defaultPaymentMethod!==void 0){l();return}u!=="manual"&&u!=null&&(w(!0),h(u)),c(null)},()=>{a.current=null}),[o,a,u,c,l,e]),o){case"method-selection":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:()=>{var F;return(F=a==null?void 0:a.current)==null?void 0:F.call(a)}}),Nt.default.createElement(Rr,{appName:e.appName,methods:T,onMethodSelected:O,onSwitchProvider:I&&N.length>1?V:void 0}));case"manual-funding":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:()=>{var F;return(F=a==null?void 0:a.current)==null?void 0:F.call(a)},close:()=>s()}),Nt.default.createElement(Il,{onFunded:Z}));case"provider-funding":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(Or,{close:()=>{var F;return(F=a==null?void 0:a.current)==null?void 0:F.call(a)},style:{paddingRight:23}}),Nt.default.createElement(Kr,{uri:f,goBackRef:a}));case"success":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:()=>s()}),Nt.default.createElement(R,{subtitle:`You\u2019ve successfully added ${P?`${P} `:""}${Ct(e)} to your ${e.appName?`${e.appName} `:""}wallet. It may take a minute before the funds are available to use.`}));case"error":default:return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:()=>{var F;return(F=a==null?void 0:a.current)==null?void 0:F.call(a)}}),Nt.default.createElement(U,{title:"Something went wrong",subtitle:(n==null?void 0:n.message)||"Please try again."}))}}var ii=1e3*60*5,La=_zustand.create.call(void 0, )((e,a)=>({walletUIConfig:null,walletPromiseResolvers:null,openWalletFlow:t=>fa(o=>{if(ia(),a().walletPromiseResolvers!==null)throw new S("existing_ui_flow_in_progress","A wallet flow is already in progress");let r=dt(o,()=>(e({walletUIConfig:null,walletPromiseResolvers:null}),new S("ui_flow_timeout","The wallet flow timed out")),ii);e({walletPromiseResolvers:r,walletUIConfig:t})}),navigateWhileInFlow:t=>{if(a().walletPromiseResolvers===null)throw new Error("Internal PrivyElements error");e({walletUIConfig:t})},closeWalletFlow:t=>{var o;return(o=a().walletPromiseResolvers)==null||o.reject(t!=null?t:new S("ui_flow_closed","The wallet flow was closed")),e({walletUIConfig:null,walletPromiseResolvers:null})}})),wl=()=>La(e=>e.walletUIConfig),Pl=()=>La.getState().walletUIConfig,H=()=>_react.useCallback.call(void 0, a=>{let{walletPromiseResolvers:t,closeWalletFlow:o}=La.getState();t==null||t.resolve(a),o()},[]),D=()=>La(e=>e.closeWalletFlow),Le=()=>La(e=>e.openWalletFlow),$=()=>La(e=>e.navigateWhileInFlow);function Ml({isMfaUIEnabled:e=!1}){let a=Le(),t=$();_chunkAXOO6XM5js.O.call(void 0, {onMfaRequired:_react.useCallback.call(void 0, o=>{var u,c;if(!e)return;let r=(c=(u=_chunkAXOO6XM5js.a.call(void 0, ))==null?void 0:u.mfa)==null?void 0:c.relyingParty,l=Pl(),s=l?t:a;if(o.length===1){let i=o[0];s({type:`mfa:verify:${i}`,payload:{relyingParty:r,ongoingWalletUIFlow:l}});return}s({type:"mfa:verify:landing",payload:{enrolledMfaMethods:o,relyingParty:r,ongoingWalletUIFlow:l}})},[e,t,a])})}var Li=1200,vl=({oauthProvider:e})=>{let{setOAuthState:a}=_react.useContext.call(void 0, _chunkAXOO6XM5js._),t=Oe(),o=it(),{state:r}=_chunkP5U72U3Djs.b.call(void 0, ),{step:l,error:s=null,isNewUser:u=!1}=_react.useMemo.call(void 0, ()=>{var d;switch(r.status){case"initial":return{step:"initial"};case"loading":return{step:"loading"};case"done":return{step:"done",isNewUser:r.isNewUser};case"error":return{step:"error",error:(d=r.error)!=null?d:new Error("Unknown error")}}},[r]);_react.useEffect.call(void 0, ()=>{s instanceof _jssdkcore.PrivyClientError&&s.code==="login_with_oauth_was_cancelled_by_user"&&(a({status:"initial"}),o())},[s,o,a]),_react.useEffect.call(void 0, ()=>{if(l!=="done")return;let d=setTimeout(()=>{t()},Li);return()=>clearTimeout(d)},[l,t]);let c=Ee[e],i=u?"You've successfully created an account.":"Your account is secured.";switch(l){case"initial":case"loading":return Nt.default.createElement(ma,null);case"done":return Nt.default.createElement(R,{subtitle:i});case"error":return Nt.default.createElement(U,{title:"Authentication failed",subtitle:Ii(s).replace("{provider}",c)})}},Ii=_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 kl=()=>{var a,t;let{logo:e}=(t=(a=nt())==null?void 0:a.appearance)!=null?t:{};return e?Nt.default.createElement(_reactnative.Image,{source:{uri:e},style:{width:xi,height:Si,resizeMode:"contain"}}):null},xi=220,Si=110;var yi={email:Qe,sms:ye},Tl=({method:e,onLoginMethodChange:a,preferred:t})=>{let o=yi[e],{colors:r}=p();return Nt.default.createElement(y,{LeftIcon:t?null:Nt.default.createElement(o,{size:24,color:r.icon}),variant:t?"primary":"secondary",onPress:()=>a(e),title:`Continue with ${Ee[e]}`})};var Pi=e=>yt.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 18 22"},e),yt.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"}),yt.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"})),Bl=Pi;var vi=e=>mo.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),mo.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"})),Ul=vi;var Ti=e=>go.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",x:24,y:24,viewBox:"0 0 98 96"},e),go.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"})),Dl=Ti;var Bi=e=>Ia.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),Ia.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"}),Ia.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"}),Ia.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"}),Ia.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"})),El=Bi;var Ei=e=>Lo.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",role:"img",viewBox:"0 0 24 24"},e),Lo.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"})),Ol=Ei;var qi=e=>ta.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 320"},e),ta.createElement(_reactnativesvg.Rect,{width:320,height:320,fill:"#06c755",rx:72.14}),ta.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"}),ta.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"}),ta.createElement(_reactnativesvg.Rect,{width:11.64,height:50.64,x:128.73,y:121.85,fill:"#06c755",rx:2.04}),ta.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"})),Hl=qi;var Wi=e=>ho.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),ho.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"})),Vl=Wi;var Gi=e=>Co.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),Co.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"})),Wl=Gi;var Xi=e=>xo.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),xo.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"})),_l=Xi;var ji=e=>So.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"currentColor",viewBox:"0 0 24 24"},e),So.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"})),Rl=ji;var Yi=e=>yo.createElement(Rt.default,_chunkQTVIWU3Njs.a.call(void 0, {xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),yo.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"})),Gl=Yi;var $i={google:El,apple:Bl,discord:Ul,github:Dl,twitter:Gl,spotify:Wl,instagram:Ol,tiktok:_l,linkedin:Vl,line:Hl,twitch:Rl},Nl=({method:e,onLoginMethodChange:a})=>{let{login:t}=_chunkP5U72U3Djs.b.call(void 0, ),{colors:o}=p(),r=$i[e],l=()=>{t({provider:e}),a(e)};return Nt.default.createElement(y,{LeftIcon:Nt.default.createElement(r,{width:24,height:24,color:o.icon}),variant:"secondary",onPress:l,title:Ee[e]})};var Kl=({method:e,onLoginMethodChange:a,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":return Nt.default.createElement(Nl,{method:e,onLoginMethodChange:a});case"email":case"sms":return Nt.default.createElement(Tl,{method:e,onLoginMethodChange:a,preferred:t});default:throw new S("unsupported_login_method",`Unsupported login method: ${e}`)}};var jl=({loginMethods:e,onLoginMethodChange:a})=>Nt.default.createElement(_reactnative.ScrollView,{style:Pt.scrollView,contentContainerStyle:Pt.container},Nt.default.createElement(_reactnative.View,{style:Pt.formContainer},Nt.default.createElement(kl,null),Nt.default.createElement(k,{title:"Login or sign up"}),Nt.default.createElement(_reactnative.View,{style:Pt.listContainer},e.map((t,o)=>Nt.default.createElement(Kl,{key:`method-button-${t}`,method:t,onLoginMethodChange:a,preferred:o===0})))),Nt.default.createElement(da,null),Nt.default.createElement(B,null)),Pt=_reactnative.StyleSheet.create({scrollView:{flex:1},container:{paddingHorizontal:16},formContainer:{alignItems:"center",gap:32},listContainer:{gap:16,alignSelf:"stretch"}});function Ie({Icons:e,title:a,subtitle:t,Features:o,Footer:r}){return Nt.default.createElement(_reactnative.View,{style:Za.screen},Nt.default.createElement(_reactnative.View,{style:Za.content},Nt.default.createElement(_reactnative.View,{style:Za.header},Nt.default.createElement(_reactnative.View,{style:Za.headerIcons},e),Nt.default.createElement(k,{tight:!0,title:a,subtitle:t})),Nt.default.createElement(_reactnative.View,{style:Za.featuresList},o)),Nt.default.createElement(_reactnative.View,null,r))}var Za=_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 Jl=({termsAndPolicyConfig:e})=>{let{colors:a}=p(),t=_chunkAXOO6XM5js.l.call(void 0, ),{logout:o}=_chunkAXOO6XM5js.X.call(void 0, ),{termsAndConditionsUrl:r,privacyPolicyUrl:l}=e,s=Oe(),[u,c]=_react.useState.call(void 0, !1),i=()=>{o(),s({termsReviewed:!0})},d=()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){c(!0),yield t.user.acceptTerms().finally(()=>c(!1)),s({termsReviewed:!0})});return Nt.default.createElement(Ie,{Icons:Nt.default.createElement(ba,{size:48,color:a.icon}),title:"One last step",subtitle:"By signing up, you agree to our terms and privacy policy.",Features:Nt.default.createElement(Nt.default.Fragment,null,r&&Nt.default.createElement(y,{variant:"secondary",title:"View Terms",onPress:()=>wo.openBrowserAsync(r),RightIcon:Nt.default.createElement(De,{color:a.icon,size:24})}),l&&Nt.default.createElement(y,{variant:"secondary",title:"View Privacy Policy",onPress:()=>wo.openBrowserAsync(l),RightIcon:Nt.default.createElement(De,{color:a.icon,size:24})})),Footer:Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(y,{variant:"primary",title:"Accept",onPress:d,loading:u}),Nt.default.createElement(y,{variant:"tertiary",destroy:!0,title:"No thanks",onPress:i}))})};var _reactnativesafeareacontext = require('react-native-safe-area-context');var df=()=>{let e=_reactnativesafeareacontext.useSafeAreaInsets.call(void 0, );return{paddingTop:e.top,paddingBottom:e.bottom,paddingLeft:e.left,paddingRight:e.right}},Yl=({children:e,visible:a})=>{let t=df(),{colors:o}=p();return Nt.default.createElement(_reactnative.Modal,{animationType:"slide",transparent:!0,visible:a},Nt.default.createElement(_reactnative.View,{style:[_reactnative.StyleSheet.absoluteFill,{backgroundColor:o.background},t]},e))};var $l=()=>{let{client:e}=_react.useContext.call(void 0, _chunkAXOO6XM5js._),a=e.app.getConfig(),t=a==null?void 0:a.logo_url;_react.useEffect.call(void 0, ()=>{t&&_reactnative.Image.prefetch(t)},[t])};var es=1e3,ts=({config:e})=>{let{appName:a,onConsent:t}=e,{colors:o}=p(),r=H(),l=D(),[s,u]=_react.useState.call(void 0, !1),[c,i]=_react.useState.call(void 0, !1),[d,f]=_react.useState.call(void 0, !1),n=()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){try{u(!0),i(!1),f(!1);let g=yield t();i(!0),yield _chunkAXOO6XM5js.h.call(void 0, es),r(g)}catch(g){f(!0),yield _chunkAXOO6XM5js.h.call(void 0, es),l(g instanceof S?g:new A(g))}finally{u(!1)}});if(c)return Nt.default.createElement(R,{subtitle:"You\u2019ve successfully enabled offline access."});if(d)return Nt.default.createElement(U,null);let m=`By confirming, ${a} will be able to use your wallet for you even when you're not around. You can revoke this later.`;return Nt.default.createElement(_reactnative.View,{style:as.container},Nt.default.createElement(_reactnative.View,{style:as.header},Nt.default.createElement(Ue,{size:48,color:o.icon}),Nt.default.createElement(k,{title:"Enable offline access",subtitle:m})),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:"Confirm",onPress:n,loading:s}),Nt.default.createElement(B,null)))},as=_reactnative.StyleSheet.create({container:{paddingTop:24,paddingHorizontal:16,gap:24,flex:1,justifyContent:"space-between"},header:{alignItems:"center",gap:8}});var os=1e3,ls=({config:e})=>{let{appName:a,onRevoke:t}=e,{colors:o}=p(),r=H(),l=D(),[s,u]=_react.useState.call(void 0, !1),[c,i]=_react.useState.call(void 0, !1),[d,f]=_react.useState.call(void 0, !1),n=()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){try{u(!0),i(!1),f(!1);let g=yield t();i(!0),yield _chunkAXOO6XM5js.h.call(void 0, os),r(g)}catch(g){f(!0),yield _chunkAXOO6XM5js.h.call(void 0, os),l(g instanceof S?g:new A(g))}finally{u(!1)}});if(c)return Nt.default.createElement(R,{subtitle:"You\u2019ve successfully revoked offline access."});if(d)return Nt.default.createElement(U,null);let m=`By confirming, ${a} will no longer be able to use this wallet on your behalf when you are not online.`;return Nt.default.createElement(_reactnative.View,{style:rs.container},Nt.default.createElement(_reactnative.View,{style:rs.header},Nt.default.createElement(va,{size:48,color:o.icon}),Nt.default.createElement(k,{title:"Revoke offline access to wallet",subtitle:m})),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:"Confirm",onPress:n,loading:s}),Nt.default.createElement(B,null)))},rs=_reactnative.StyleSheet.create({container:{paddingTop:24,paddingHorizontal:16,gap:24,flex:1,justifyContent:"space-between"},header:{alignItems:"center",gap:8}});var _buffer = require('buffer');function Mt(e){return`0x${_buffer.Buffer.from(e).toString("hex")}`}var us=({iconUrl:e})=>Nt.default.createElement(_reactnative.Image,{source:{uri:e},style:{width:hf,height:ss,borderRadius:ss/2,resizeMode:"contain",alignSelf:"center"}}),hf=80,ss=80;var ds=1e3,ns=({config:e})=>{let{message:a,onSignMessage:t,title:o="Sign message",description:r="Sign to continue",buttonText:l="Confirm signature",logo:s}=e,{colors:u}=p(),c=H(),i=D(),[d,f]=_react.useState.call(void 0, !1),[n,m]=_react.useState.call(void 0, !1),[g,h]=_react.useState.call(void 0, !1),I=()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){try{f(!0),m(!1),h(!1);let P=yield t(a);m(!0),yield _chunkAXOO6XM5js.h.call(void 0, ds),c(P)}catch(P){h(!0),yield _chunkAXOO6XM5js.h.call(void 0, ds),i(P instanceof S?P:new A(P))}finally{f(!1)}}),w=_react.useMemo.call(void 0, ()=>a instanceof Uint8Array?Mt(a):a,[a]);return n?Nt.default.createElement(R,{subtitle:"You\u2019ve successfully completed the signature."}):g?Nt.default.createElement(U,null):Nt.default.createElement(_reactnative.ScrollView,{style:Ca.container,contentContainerStyle:Ca.contentContainer},Nt.default.createElement(_reactnative.View,{style:Ca.content},Nt.default.createElement(_reactnative.View,{style:Ca.header},s&&Nt.default.createElement(us,{iconUrl:s}),Nt.default.createElement(k,{title:o,subtitle:r,tight:!0})),Nt.default.createElement(_reactnative.View,{style:[Ca.messageBox,{backgroundColor:u.backgroundSecondary}]},Nt.default.createElement(_reactnative.Text,{style:[Ca.message,{color:u.text}]},w))),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:l,onPress:I,loading:d}),Nt.default.createElement(B,null)))},Ca=_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 ra({Icon:e,children:a}){let{colors:t}=p();return Nt.default.createElement(_reactnative.View,{style:is.row},Nt.default.createElement(e,{size:24,color:t.icon}),Nt.default.createElement(_reactnative.Text,{style:[is.label,{color:t.text}]},a))}var is=_reactnative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",gap:12},label:{flex:1,fontFamily:"Inter_500Medium",fontSize:14,lineHeight:22}});function j(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 fs({onBack:e}){let{initMfaEnrollment:a,submitMfaEnrollment:t}=_chunkAXOO6XM5js.T.call(void 0, ),{prompt:o}=_chunkAXOO6XM5js.S.call(void 0, ),r=H(),l=D(),{user:s}=_chunkAXOO6XM5js.X.call(void 0, ),{colors:u}=p(),[c,i]=_react.useState.call(void 0, !1),[d,f]=_react.useState.call(void 0, !1),[n,m]=_react.useState.call(void 0, ),[g,h]=_react.useState.call(void 0, !1),I=_react.useMemo.call(void 0, ()=>{var T;return((T=s==null?void 0:s.linked_accounts)!=null?T:[]).filter(N=>N.type==="passkey").map(N=>N.credential_id)},[s]),w=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{f(!0),h(!1),m(void 0),i(!1),yield o(),yield a({method:"passkey"}),yield t({method:"passkey",credentialIds:I}),i(!0),yield _chunkAXOO6XM5js.h.call(void 0, 1500),r({success:!0})}catch(P){let{isBlockingError:E,error:T}=j(P);m(T),h(E),E&&(yield _chunkAXOO6XM5js.h.call(void 0, 1500),l(T instanceof S?T:new A(T)))}finally{f(!1)}}),[I,a,l,r,o,t]);return c?Nt.default.createElement(R,{subtitle:"From now on, you'll use the passkey whenever you use your Privy wallet."}):g?Nt.default.createElement(U,{subtitle:n==null?void 0:n.message}):Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:()=>e()}),Nt.default.createElement(Ie,{Icons:Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(Ye,{size:48,color:u.icon}),Nt.default.createElement(ce,{size:48,color:u.icon})),title:"Set up passkey verification",subtitle:"You can change this later.",Features:Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(ra,{Icon:we},"Verify with Touch ID, Face ID, PIN, or hardware key"),Nt.default.createElement(ra,{Icon:Aa},"Takes seconds to set up and use"),Nt.default.createElement(ra,{Icon:Ba},"Use your passkey to verify transactions"),n&&Nt.default.createElement(_reactnative.Text,{style:[Uf.statusText,{color:u.errorDark}]},n.message)),Footer:Nt.default.createElement(y,{title:"Confirm",onPress:()=>w(),loading:d})}))}var Uf=_reactnative.StyleSheet.create({statusText:{textAlign:"center",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});var Df=1e3;function cs({onBack:e}){let{initMfaEnrollment:a,submitMfaEnrollment:t}=_chunkAXOO6XM5js.T.call(void 0, ),o=H(),r=D(),[l,s]=_react.useState.call(void 0, "phone-input"),[u,c]=_react.useState.call(void 0, ""),[i,d]=_react.useState.call(void 0, !1),[f,n]=_react.useState.call(void 0, !1),[m,g]=_react.useState.call(void 0, ),[h,I]=_react.useState.call(void 0, !1),w=_react.useCallback.call(void 0, T=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{c(T),g(void 0),d(!0),yield a({method:"sms",phoneNumber:T}),s("otp-submit")}catch(N){let{isBlockingError:O,error:V}=j(N);g(V),I(O),O&&(yield _chunkAXOO6XM5js.h.call(void 0, 1500),r(new A(V)))}finally{d(!1)}}),[a,r]),P=_react.useCallback.call(void 0, T=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{d(!0),g(void 0),yield t({method:"sms",phoneNumber:u,code:T}),n(!0),yield _chunkAXOO6XM5js.h.call(void 0, Df),o({success:!0})}catch(N){let{isBlockingError:O,error:V}=j(N);g(V),I(O),O&&(yield _chunkAXOO6XM5js.h.call(void 0, 1500),r(new A(V)))}finally{d(!1)}}),[r,o,u,t]),E=_react.useCallback.call(void 0, ()=>{l==="otp-submit"?s("phone-input"):e()},[e,l]);return h?Nt.default.createElement(U,{subtitle:m==null?void 0:m.message}):f?Nt.default.createElement(R,{subtitle:""}):l==="phone-input"?Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:E}),Nt.default.createElement(mt,{error:m!=null?m:null,isLoading:i,sendCode:w})):Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:E}),Nt.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,isDone:f,isLoading:i,onSendCode:P,onRequestNewCode:()=>w(u)}))}function gs({onContinue:e,secret:a,authUrl:t}){let{colors:o}=p(),r=()=>ms.openURL(t),[l,s]=_react.useState.call(void 0, !1),u=()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){yield ps.setStringAsync(a!=null?a:""),s(!0),yield _chunkAXOO6XM5js.h.call(void 0, 2e3),s(!1)});return Nt.default.createElement(_reactnative.View,{style:Ja.container},Nt.default.createElement(_reactnative.View,{style:Ja.formContainer},Nt.default.createElement(k,{title:"Scan QR code",subtitle:"Open your authenticator app and scan the QR code to continue."}),Nt.default.createElement(_reactnative.View,{style:Ja.listContainer},Nt.default.createElement(_reactnative.View,{style:Ja.qrContainer},Nt.default.createElement(_reactnativeqrcodestyled2.default,{data:t,color:o.text,errorCorrectionLevel:"Q",pieceSize:6,pieceBorderRadius:3,outerEyesOptions:{borderRadius:20},innerEyesOptions:{borderRadius:9}}),Nt.default.createElement(_reactnative.View,{style:[Ja.logoContainer,{backgroundColor:o.background}]},Nt.default.createElement(we,{size:40,color:o.text}))),Nt.default.createElement(y,{title:"Open in Authenticator app",variant:"tertiary",color:o.textMuted,onPress:r,LeftIcon:Nt.default.createElement(De,{color:o.iconSubtle,size:16})}),Nt.default.createElement(y,{title:"Copy secret",variant:"tertiary",color:o.textMuted,onPress:u,LeftIcon:l?Nt.default.createElement(xe,{color:o.iconSubtle,size:16}):Nt.default.createElement(je,{color:o.iconSubtle,size:16})}),Nt.default.createElement(y,{title:"Continue",onPress:e}))),Nt.default.createElement(B,null))}var Ja=_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 Vf=1e3;function Ls({onBack:e}){let{initMfaEnrollment:a,submitMfaEnrollment:t}=_chunkAXOO6XM5js.T.call(void 0, ),o=H(),r=D(),[l,s]=_react.useState.call(void 0, "auth-link"),[u,c]=_react.useState.call(void 0, ),[i,d]=_react.useState.call(void 0, ),[f,n]=_react.useState.call(void 0, !1),[m,g]=_react.useState.call(void 0, !1),[h,I]=_react.useState.call(void 0, ),[w,P]=_react.useState.call(void 0, !1),E=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{I(void 0),n(!0);let{authUrl:O,secret:V}=yield a({method:"totp"});d(V),c(O)}catch(O){let{isBlockingError:V,error:Z}=j(O);I(Z),P(V),V&&(yield _chunkAXOO6XM5js.h.call(void 0, 1500),r(Z instanceof S?Z:new A(Z)))}finally{n(!1)}}),[a,r]),T=_react.useCallback.call(void 0, O=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{n(!0),I(void 0),yield t({method:"totp",code:O}),g(!0),yield _chunkAXOO6XM5js.h.call(void 0, Vf),o({success:!0})}catch(V){let{isBlockingError:Z,error:ae}=j(V);I(ae),P(Z),Z&&(yield _chunkAXOO6XM5js.h.call(void 0, 1500),r(ae instanceof S?ae:new A(ae)))}finally{n(!1)}}),[r,o,t]);_react.useEffect.call(void 0, ()=>{E()},[E]);let N=_react.useCallback.call(void 0, ()=>{l==="otp-submit"?s("auth-link"):e()},[e,l]);return u?w?Nt.default.createElement(U,{subtitle:h==null?void 0:h.message}):m?Nt.default.createElement(R,{subtitle:""}):l==="auth-link"?Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:N}),Nt.default.createElement(gs,{secret:i!=null?i:"",authUrl:u!=null?u:"",onContinue:()=>s("otp-submit")})):Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:N}),Nt.default.createElement(se,{subtitle:"Please check your for code in you Authenticator app.",error:h!=null?h:null,isDone:m,isLoading:f,onSendCode:T})):Nt.default.createElement(ma,null)}function Is({config:e}){let{method:a,onBack:t}=e;switch(a){case"totp":return Nt.default.createElement(Ls,{onBack:t});case"sms":return Nt.default.createElement(cs,{onBack:t});case"passkey":return Nt.default.createElement(fs,{onBack:t})}}function hs({config:e}){let{colors:a}=p(),t=$(),{availableMethods:o,enrolledMfaMethods:r}=e,l=_react.useCallback.call(void 0, u=>{if(r.includes(u)){t({type:"mfa:enrollment:unenroll",payload:{method:u,onBack:()=>t({type:"mfa:enrollment:landing",payload:e})}});return}t({type:"mfa:enrollment:enroll",payload:{method:u,relyingParty:e.relyingParty,onBack:()=>t({type:"mfa:enrollment:landing",payload:e})}})},[e,r,t]);function s({mfaMethod:u}){return r&&r.includes(u)?Nt.default.createElement(_reactnative.View,{style:At.unenrollGroup},Nt.default.createElement(_reactnative.Text,null,"Enabled"),Nt.default.createElement(ue,{color:a.icon,size:24})):Nt.default.createElement(Se,{color:a.icon,size:24})}return Nt.default.createElement(_reactnative.View,{style:At.container},Nt.default.createElement(_reactnative.View,{style:At.formContainer},Nt.default.createElement(k,{title:"Choose a verification method",subtitle:"You can change this later."}),Nt.default.createElement(_reactnative.View,{style:At.listContainer},o.includes("totp")&&Nt.default.createElement(y,{title:"Authenticator app",variant:"secondary",onPress:()=>l("totp"),LeftIcon:Nt.default.createElement($e,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(s,{mfaMethod:"totp"})}),o.includes("passkey")&&Nt.default.createElement(y,{title:"Passkey",variant:"secondary",onPress:()=>l("passkey"),LeftIcon:Nt.default.createElement(ce,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(s,{mfaMethod:"passkey"})}),o.includes("sms")&&Nt.default.createElement(y,{title:"SMS",variant:"secondary",onPress:()=>l("sms"),LeftIcon:Nt.default.createElement(ye,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(s,{mfaMethod:"sms"})}))),Nt.default.createElement(B,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 Cs({config:e}){let{colors:a}=p(),{method:t,onBack:o}=e,{unenrollMfa:r}=_chunkAXOO6XM5js.T.call(void 0, ),{prompt:l}=_chunkAXOO6XM5js.S.call(void 0, ),s=H(),u=D(),[c,i]=_react.useState.call(void 0, !1),[d,f]=_react.useState.call(void 0, !1),[n,m]=_react.useState.call(void 0, !1),g=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){var P;try{i(!0),f(!1),m(!1),t==="sms"?yield r({method:"sms"}):t==="totp"?yield r({method:"totp"}):t==="passkey"&&(yield l(),yield r({method:"passkey",removeForLogin:(P=Lr().passkeys)==null?void 0:P.shouldUnlinkOnUnenrollMfa})),f(!0),yield _chunkAXOO6XM5js.h.call(void 0, 1500),s({success:!0})}catch(E){m(!0),yield _chunkAXOO6XM5js.h.call(void 0, 1500),u(E instanceof S?E:new A(E))}finally{i(!1)}}),[t,u,s,l,r]);if(d)return Nt.default.createElement(R,{subtitle:""});if(n)return Nt.default.createElement(U,null);let h=zf[t],I=`Remove ${h} verification?`,w="MFA adds an extra layer of security to your account. Make sure you have other methods to secure your account.";return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:o}),Nt.default.createElement(Ie,{Icons:Nt.default.createElement(Be,{size:48,color:a.icon}),title:I,subtitle:w,Footer:Nt.default.createElement(y,{title:`Remove ${h} for MFA`,variant:"primary",destroy:!0,onPress:g,loading:c})}))}var zf={totp:"TOTP",sms:"SMS",passkey:"Passkey"};function xs({config:e}){let{onContinue:a}=e,t=D(),{colors:o}=p();return Nt.default.createElement(_reactnative.View,{style:Tt.container},Nt.default.createElement(_reactnative.View,{style:Tt.content},Nt.default.createElement(_reactnative.View,{style:Tt.header},Nt.default.createElement(we,{color:o.icon,size:32}),Nt.default.createElement(k,{title:"Add more security",subtitle:"Set up multi-factor verification.",tight:!0})),Nt.default.createElement(_reactnative.View,{style:Tt.featureList},Nt.default.createElement(ra,{Icon:Te},"Enable multi-factor verification for your wallet."),Nt.default.createElement(ra,{Icon:Ea},"Your wallet will have you complete a verification for every transaction you complete."))),Nt.default.createElement(_reactnative.View,null,Nt.default.createElement(y,{title:"Continue",onPress:()=>a()}),Nt.default.createElement(y,{title:"Not now",variant:"tertiary",onPress:()=>t()}),Nt.default.createElement(B,null)))}var Tt=_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 Ss({config:e}){let{colors:a}=p(),t=$(),{enrolledMfaMethods:o}=e,r=_react.useCallback.call(void 0, l=>{t({type:`mfa:verify:${l}`,payload:{relyingParty:e.relyingParty,ongoingWalletUIFlow:e.ongoingWalletUIFlow,onBack:()=>t({type:"mfa:verify:landing",payload:e})}})},[e,t]);return Nt.default.createElement(Ie,{Icons:void 0,title:"Choose a verification method",subtitle:"",Features:Nt.default.createElement(Nt.default.Fragment,null,o.includes("totp")&&Nt.default.createElement(y,{title:"Authenticator app",variant:"secondary",onPress:()=>r("totp"),LeftIcon:Nt.default.createElement($e,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(Se,{color:a.icon,size:24})}),o.includes("passkey")&&Nt.default.createElement(y,{title:"Passkey",variant:"secondary",onPress:()=>r("passkey"),LeftIcon:Nt.default.createElement(ce,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(Se,{color:a.icon,size:24})}),o.includes("sms")&&Nt.default.createElement(y,{title:"SMS",variant:"secondary",onPress:()=>r("sms"),LeftIcon:Nt.default.createElement(ye,{color:a.icon,size:24}),RightIcon:Nt.default.createElement(Se,{color:a.icon,size:24})})),Footer:Nt.default.createElement(B,null)})}var ys=({config:e})=>{let{colors:a}=p(),{init:t,submit:o}=_chunkAXOO6XM5js.S.call(void 0, ),{relyingParty:r,ongoingWalletUIFlow:l}=e,s=$(),u=H(),c=D(),[i,d]=_react.useState.call(void 0, !1),[f,n]=_react.useState.call(void 0, ),[m,g]=_react.useState.call(void 0, !1),h=_react.useRef.call(void 0, ),I=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){try{d(!0),n(void 0),g(!1);let w=h.current;w||(w=yield t({method:"passkey",relyingParty:r})),yield o({method:"passkey",mfaCode:w,relyingParty:r}),l?s(l):u({success:!0})}catch(w){let{isBlockingError:P,error:E}=j(w);n(E),g(P),P&&(yield _chunkAXOO6XM5js.h.call(void 0, 1500),c(new A(w)))}finally{d(!1)}}),[t,s,c,u,l,r,o]);return _react.useEffect.call(void 0, ()=>{I()},[I]),m?Nt.default.createElement(U,{subtitle:f==null?void 0:f.message}):Nt.default.createElement(Ie,{Icons:Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(Ye,{size:48,color:a.icon}),Nt.default.createElement(ce,{size:48,color:a.icon})),title:"Verifying with passkey",subtitle:"Approve this action using your touch, face, PIN, or hardware key.",Features:f?Nt.default.createElement(_reactnative.Text,{style:[Yf.statusText,{color:a.errorDark}]},f.message):void 0,Footer:Nt.default.createElement(y,{title:"Try again",loading:i,onPress:()=>I(),variant:"primary"})})},Yf=_reactnative.StyleSheet.create({statusText:{textAlign:"center",fontFamily:"Inter_400Regular",fontSize:14,lineHeight:22}});function Ms({config:e}){let{init:a,submit:t}=_chunkAXOO6XM5js.S.call(void 0, ),{ongoingWalletUIFlow:o}=e,r=$(),l=H(),s=D(),[u,c]=_react.useState.call(void 0, !1),[i,d]=_react.useState.call(void 0, ),[f,n]=_react.useState.call(void 0, !1),m=_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{c(!0),d(void 0),n(!1),yield a({method:"sms"})}catch(h){let{isBlockingError:I,error:w}=j(h);d(w),n(I),I&&(yield _chunkAXOO6XM5js.h.call(void 0, 1500),s(new A(h)))}finally{c(!1)}}),[a,s]),g=_react.useCallback.call(void 0, h=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{c(!0),d(void 0),n(!1),yield t({method:"sms",mfaCode:h}),o?r(o):l({success:!0})}catch(I){let{isBlockingError:w,error:P}=j(I);d(P),n(w),w&&(yield _chunkAXOO6XM5js.h.call(void 0, 1500),s(new A(I)))}finally{c(!1)}}),[r,s,l,o,t]);return _react.useEffect.call(void 0, ()=>{m()},[m]),f?Nt.default.createElement(U,{subtitle:i==null?void 0:i.message}):Nt.default.createElement(se,{subtitle:"Please check your phone for a message with your MFA code.",hint:"Didn\u2019t get an SMS?",error:i!=null?i:null,isLoading:u,onSendCode:g,onRequestNewCode:m})}function Fs({config:e}){let{init:a,submit:t}=_chunkAXOO6XM5js.S.call(void 0, ),{ongoingWalletUIFlow:o}=e,r=$(),l=H(),s=D(),[u,c]=_react.useState.call(void 0, !1),[i,d]=_react.useState.call(void 0, ),[f,n]=_react.useState.call(void 0, !1),m=_react.useCallback.call(void 0, g=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){try{if(c(!0),d(void 0),n(!1),yield a({method:"totp"}),yield t({method:"totp",mfaCode:g}),o)return r(o);l({success:!0})}catch(h){let{isBlockingError:I,error:w}=j(h);d(w),n(I),I&&(yield _chunkAXOO6XM5js.h.call(void 0, 1500),s(new A(h)))}finally{c(!1)}}),[a,r,s,l,o,t]);return f?Nt.default.createElement(U,{subtitle:i==null?void 0:i.message}):Nt.default.createElement(se,{subtitle:Nt.default.createElement(Nt.default.Fragment,null,"To continue, please enter the 6-digit code generated from your"," ",Nt.default.createElement(_reactnative.Text,{style:oc.strong},"authenticator app")),error:i!=null?i:null,isLoading:u,onSendCode:m})}var oc=_reactnative.StyleSheet.create({strong:{fontFamily:"Inter_600SemiBold"}});var vs=({config:e})=>{let a=D(),{cancel:t}=_chunkAXOO6XM5js.S.call(void 0, ),o=Nt.default.useCallback(()=>{t(),a(new A(new Error("MFA verification was canceled")))},[t,a]);switch(e.type){case"mfa:enrollment:welcome":return Nt.default.createElement(xs,{config:e.payload});case"mfa:enrollment:unenroll":return Nt.default.createElement(Cs,{config:e.payload});case"mfa:enrollment:landing":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:()=>a()}),Nt.default.createElement(hs,{config:e.payload}));case"mfa:enrollment:enroll":return Nt.default.createElement(Is,{config:e.payload});case"mfa:verify:landing":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:o}),Nt.default.createElement(Ss,{config:e.payload}));case"mfa:verify:passkey":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:o,goBack:e.payload.onBack}),Nt.default.createElement(ys,{config:e.payload}));case"mfa:verify:totp":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:o,goBack:e.payload.onBack}),Nt.default.createElement(Fs,{config:e.payload}));case"mfa:verify:sms":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:o,goBack:e.payload.onBack}),Nt.default.createElement(Ms,{config:e.payload}));case"wallet:signature":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:()=>a()}),Nt.default.createElement(ns,{config:e.payload}));case"delegatedActions:consent":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:()=>a()}),Nt.default.createElement(ts,{config:e.payload}));case"delegatedActions:revoke":return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{close:()=>a()}),Nt.default.createElement(ls,{config:e.payload}));default:throw new Error("Unsupported wallet UI config type")}};function sc({config:e,goBackRef:a}){let t=it();return Nt.default.createElement(Nt.default.Fragment,null,Nt.default.createElement(b,{goBack:()=>{var o;return((o=a.current)!=null?o:t)()}}),Nt.default.createElement(uc,{config:e,goBackRef:a}))}var uc=({config:e,goBackRef:a})=>{let[t,o]=Cr(),r=t&&gr(e.loginMethods,t),l=ua();if(_chunkAXOO6XM5js.e.call(void 0, )&&(l!=null&&l.requireUsersAcceptTerms))return Nt.default.createElement(Jl,{termsAndPolicyConfig:l});switch(t){case"email":return Nt.default.createElement(wr,{goBackRef:a,otherLoginMethod:r,onLoginMethodChange:o});case"sms":return Nt.default.createElement(Er,{goBackRef:a,otherLoginMethod:r,onLoginMethodChange:o});case"apple":case"google":case"discord":case"twitter":case"github":case"spotify":case"instagram":case"tiktok":case"line":case"linkedin":case"twitch":return Nt.default.createElement(vl,{oauthProvider:t,goBackRef:a,otherLoginMethod:r,onLoginMethodChange:o});case null:return Nt.default.createElement(jl,{loginMethods:e.loginMethods,onLoginMethodChange:o,goBackRef:a});default:throw new S("unsupported_login_method",`Unsupported login method: ${t}`)}},dc= exports.PrivyElements =({config:e={}})=>{var o;let a=xr();_react.useEffect.call(void 0, ()=>_chunkAXOO6XM5js.c.call(void 0, ({user:r})=>{r&&a(r)}),[a]),$l(),Ir(e),Ml({isMfaUIEnabled:(o=e.mfa)==null?void 0:o.enableMfaVerificationUIs});let t=nc();return Nt.default.createElement(Dt,{appearance:e.appearance},Nt.default.createElement(Yl,{visible:!!t},t))};function nc(){let e=_react.useRef.call(void 0, null),a=nt(),t=He(),o=wl();return t?Nt.default.createElement(yl,{config:t,goBackRef:e}):a?Nt.default.createElement(sc,{config:a,goBackRef:e}):o?Nt.default.createElement(vs,{config:o}):null}var fc=()=>{let e=hr(),{setOtpState:a,setOAuthState:t,client:o}=_react.useContext.call(void 0, _chunkAXOO6XM5js._),r=_react.useCallback.call(void 0, ()=>{a({status:"initial"}),t({status:"initial"})},[t,a]);return{login:_react.useCallback.call(void 0, s=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){let u=_chunkAXOO6XM5js.b.call(void 0, );return{user:yield e(s,o,u,r)}}),[e,o,r])}};var Lc=()=>{let e=Le(),{client:a}=_react.useContext.call(void 0, _chunkAXOO6XM5js._);return{signMessage:_react.useCallback.call(void 0, t=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){var u,c,i,d;let o=_chunkAXOO6XM5js.b.call(void 0, ),r=_jssdkcore.getUserEmbeddedEthereumWallet.call(void 0, o),l=_jssdkcore.getEntropyDetailsFromUser.call(void 0, o);if(!r||!l)throw new Error("No embedded Ethereum wallet found");let s=yield a.embeddedWallet.getEthereumProvider({entropyId:l.entropyId,entropyIdVerifier:l.entropyIdVerifier,wallet:r});return yield e({type:"wallet:signature",payload:{message:t.message,logo:(u=t.appearance)==null?void 0:u.logo,buttonText:(c=t.appearance)==null?void 0:c.buttonText,description:(i=t.appearance)==null?void 0:i.description,title:(d=t.appearance)==null?void 0:d.title,onSignMessage:f=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){return f instanceof Uint8Array&&(f=Mt(f)),yield s.request({method:"personal_sign",params:[f,r.address]})})}})}),[a.embeddedWallet,e])}};var yc=()=>{let e=Le(),{client:a}=_react.useContext.call(void 0, _chunkAXOO6XM5js._);return{signMessage:_react.useCallback.call(void 0, t=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){var d,f,n,m;let o=_chunkAXOO6XM5js.b.call(void 0, ),r=_jssdkcore.getAllUserEmbeddedSolanaWallets.call(void 0, o),l=_jssdkcore.getEntropyDetailsFromUser.call(void 0, o);if(!l)throw new Error("No embedded Solana wallets found");let s=t.address?r.find(g=>g.address===t.address):r[0];if(!s)throw new Error("Solana account not found");let{entropyId:u,entropyIdVerifier:c}=l,i=yield a.embeddedWallet.getSolanaProvider(s,u,c);return yield e(_chunkQTVIWU3Njs.b.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {type:"wallet:signature"},t),{payload:{message:t.message,logo:(d=t.appearance)==null?void 0:d.logo,buttonText:(f=t.appearance)==null?void 0:f.buttonText,description:(n=t.appearance)==null?void 0:n.description,title:(m=t.appearance)==null?void 0:m.title,onSignMessage:g=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){return g instanceof Uint8Array&&(g=_buffer.Buffer.from(g).toString("base64")),yield i.request({method:"signMessage",params:{message:g}})})}}))}),[a.embeddedWallet,e])}};var Pc=()=>{let e=Le(),{client:a}=_react.useContext.call(void 0, _chunkAXOO6XM5js._),t=_react.useMemo.call(void 0, ()=>_jssdkcore.delegatedActions.delegateWallet(a),[a]),o=_react.useMemo.call(void 0, ()=>_jssdkcore.delegatedActions.revokeWallets(a),[a]);return{delegateWallet:_react.useCallback.call(void 0, r=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){let{name:l}=yield a.app.getConfig();return yield e({type:"delegatedActions:consent",payload:{appName:l,onConsent:()=>t(r)}})}),[a,t,e]),revokeWallets:_react.useCallback.call(void 0, ()=>_chunkQTVIWU3Njs.d.call(void 0, void 0,null,function*(){let{name:r}=yield a.app.getConfig();return yield e({type:"delegatedActions:revoke",payload:{appName:r,onRevoke:()=>o()}})}),[a,o,e])}};function Fc(){let e=Le(),a=$();return{init:_react.useCallback.call(void 0, o=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){let r=_chunkAXOO6XM5js.b.call(void 0, );if(!r)throw new Error("User is not logged in");let l=r.linked_accounts.some(({type:i})=>i==="passkey"),s=r.mfa_methods.map(i=>i.type),u=o.mfaMethods;(!l||!o.relyingParty)&&(u=u.filter(i=>i!=="passkey"));let c={type:"mfa:enrollment:landing",payload:{availableMethods:u,enrolledMfaMethods:s,relyingParty:o.relyingParty}};if(s.length===0){yield e({type:"mfa:enrollment:welcome",payload:{onContinue:()=>a(c)}});return}yield e(c)}),[a,e])}}function Us(t){return _chunkQTVIWU3Njs.d.call(void 0, this,arguments,function*({chain:e,erc20Address:a}){let o=_viem.createPublicClient.call(void 0, {chain:e,transport:_viem.http.call(void 0, )}),[r,l]=yield Promise.all([o.readContract({abi:Bs,address:a,functionName:"symbol"}),o.readContract({abi:Bs,address:a,functionName:"decimals"})]);return{decimals:l,symbol:r}})}var Bs=[{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 Oc(){let e=_chunkAXOO6XM5js.l.call(void 0, ),a=ht();return{fundWallet:_react.useCallback.call(void 0, c=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){var i=c,{address:o,asset:r,chain:l,amount:s}=i,u=_chunkQTVIWU3Njs.c.call(void 0, i,["address","asset","chain","amount"]);var Z,ae,Ge,ze,F,Ne,bt,Sa,ya,qo;let d=e.app.getConfig(),f=(d==null?void 0:d.name)||"",n=(Z=d==null?void 0:d.funding_config)==null?void 0:Z.default_recommended_amount,m=(ae=d==null?void 0:d.funding_config)==null?void 0:ae.default_recommended_currency.asset,g=(Ge=d==null?void 0:d.funding_config)==null?void 0:Ge.default_recommended_currency.chain.replace("eip155:",""),h=g?_jssdkcore.getSupportedChainById.call(void 0, +g):void 0,I=(F=(ze=d==null?void 0:d.funding_config)==null?void 0:ze.options)!=null?F:[],w=l!=null?l:h,P=(Ne=r!=null?r:m)!=null?Ne:"native-currency",E=(bt=s!=null?s:n)==null?void 0:bt.trim();if(!w)throw new S("chain_not_supported",`Chain with id ${(Sa=l==null?void 0:l.id)!=null?Sa:g} is not supported`);if(!E)throw new S("amount_not_specified","amount was not specified");let T;if(P==="USDC"){let Ce=_jssdkcore.UsdcAddressMap[w.id];if(!Ce)throw new S("asset_not_supported",`Chain with id ${w.id} does not support USDC`);T={address:Ce,symbol:"USDC",decimals:6}}else if(typeof P=="object"&&P.tokenAddress)if(_jssdkcore.getIsTokenUsdc.call(void 0, P.tokenAddress,w))T={address:P.tokenAddress,symbol:"USDC",decimals:6};else{let Ce=yield Us({chain:w,erc20Address:P.tokenAddress}).catch(console.error);if(!Ce)throw new S("asset_info_not_found",`Asset ${P.tokenAddress} information could not be found`);T={address:P.tokenAddress,symbol:Ce.symbol,decimals:Ce.decimals}}let N=I.filter(({provider:Ce})=>{let Ho=(T==null?void 0:T.symbol)==="USDC"?"USDC":"native-currency";if(Ce==="moonpay")return _jssdkcore.isSupportedChainIdForMoonpay.call(void 0, w.id,Ho);if(Ce==="coinbase")return _jssdkcore.toCoinbaseBlockchainFromChainId.call(void 0, w.id)&&_jssdkcore.isSupportedChainIdForCoinbaseOnramp.call(void 0, w.id,Ho)}),O=_chunkQTVIWU3Njs.b.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {},u),{chainType:"ethereum",appName:f,address:o,tokenInfo:T,paymentOptions:N,chain:w,asset:P,amount:E}),V=a(O);return u.defaultPaymentMethod&&(yield ga({client:e,method:u.defaultPaymentMethod,provider:u.defaultPaymentMethod==="card"&&(qo=(ya=u.card)==null?void 0:ya.preferredProvider)!=null?qo:"coinbase",config:O})),yield V}),[a,e])}}function Wc(){let e=_chunkAXOO6XM5js.l.call(void 0, ),a=ht();return{fundWallet:_react.useCallback.call(void 0, c=>_chunkQTVIWU3Njs.d.call(void 0, this,null,function*(){var i=c,{address:o,asset:r,amount:l,cluster:s}=i,u=_chunkQTVIWU3Njs.c.call(void 0, i,["address","asset","amount","cluster"]);var N,O,V,Z,ae,Ge,ze,F;let d=e.app.getConfig(),f=(d==null?void 0:d.name)||"",n=(N=d==null?void 0:d.funding_config)==null?void 0:N.default_recommended_amount,m=(O=d==null?void 0:d.funding_config)==null?void 0:O.default_recommended_currency.asset,g=(Z=(V=d==null?void 0:d.funding_config)==null?void 0:V.options)!=null?Z:[],h=(ae=r!=null?r:m)!=null?ae:"native-currency",I=(Ge=l!=null?l:n)==null?void 0:Ge.trim(),w=s!=null?s:{name:"mainnet-beta"};if(!I)throw new S("amount_not_specified","amount was not specified");let P;h==="USDC"&&(P={symbol:"USDC",decimals:6,address:_jssdkcore.getSolanaUsdcMintAddressForCluster.call(void 0, w)});let E=_chunkQTVIWU3Njs.b.call(void 0, _chunkQTVIWU3Njs.a.call(void 0, {},u),{chainType:"solana",appName:f,address:o,tokenInfo:P,paymentOptions:g,asset:h,amount:I,cluster:{name:w.name,rpcUrl:_jssdkcore.getSolanaRpcEndpointForCluster.call(void 0, w)}}),T=a(E);return u.defaultPaymentMethod&&(yield ga({client:e,method:u.defaultPaymentMethod,provider:u.defaultPaymentMethod==="card"&&(F=(ze=u.card)==null?void 0:ze.preferredProvider)!=null?F:"coinbase",config:E})),yield T}),[a,e])}}exports.PrivyElements = dc; exports.PrivyUIError = S; exports.useDelegatedActions = Pc; exports.useFundSolanaWallet = Wc; exports.useFundWallet = Oc; exports.useLogin = fc; exports.useMfaEnrollmentUI = Fc; exports.useSignMessage = Lc; exports.useSolanaSignMessage = yc;
2
2
  /*! Bundled license information:
3
3
 
4
4
  lucide-react-native/dist/esm/defaultAttributes.js: