1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="754b8b8a-975b-41ae-98c4-5b5fdd9bfcff",e._sentryDebugIdIdentifier="sentry-dbid-754b8b8a-975b-41ae-98c4-5b5fdd9bfcff")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3781],{23093:(e,t,a)=>{a.d(t,{T:()=>l});var i=a(82470);function l(e){return(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",...e,children:[(0,i.jsx)("rect",{width:"512",height:"512",rx:"15%",fill:"#37aee2"}),(0,i.jsx)("path",{fill:"#c8daea",d:"M199 404c-11 0-10-4-13-14l-32-105 245-144"}),(0,i.jsx)("path",{fill:"#a9c9dd",d:"M199 404c7 0 11-4 16-8l45-43-56-34"}),(0,i.jsx)("path",{fill:"#f6fbfe",d:"M204 319l135 99c14 9 26 4 30-14l55-258c5-22-9-32-24-25L79 245c-21 8-21 21-4 26l83 26 190-121c9-5 17-3 11 4"})]})}},23781:(e,t,a)=>{a.d(t,{C:()=>et,L:()=>G});var i=a(82470),l=a(62694);let r=l.forwardRef(function(e,t){let{title:a,titleId:i,...r}=e;return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},r),a?l.createElement("title",{id:i},a):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))});var n=a(47056),s=a(1055),o=a(59549),d=a(67929),c=a(31913),p=a(25552),u=a(72030),h=a(29246),g=a(26440),f=a(43673);let m=(0,f.A)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),x=(0,f.A)("circle-user",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);var y=a(63651),w=a(75007),j=a(95991);let v=(e,t=!0)=>e.reduce((e,a)=>({...e,[a]:t}),{});var b=a(33569),C=a(65042),k=a(48803),S=a(57035),M=a(82095),T=a(38230),A=a(23093),E=a(38549),L=a(89381);let I=()=>{let e=(0,o.u)(),t=e?.appearance?.logo,a=`${e?.name} logo`,r={maxHeight:"90px",maxWidth:"180px"};return t?"string"==typeof t?(0,i.jsx)("img",{src:t,alt:a,style:r}):"svg"===t.type||"img"===t.type?l.cloneElement(t,{alt:a,style:r}):(console.warn("`config.appearance.logo` must be a string, or an SVG / IMG element. Nothing will be rendered."),null):null},N=n.I4.div.withConfig({displayName:"AppLogoContainer",componentId:"sc-b210074-0"})(["display:flex;flex-direction:column;align-items:center;padding:24px 0;flex-grow:1;justify-content:center;"]),W=({name:e,logoUrl:t,size:a="38px"})=>"string"==typeof t?(0,i.jsx)("img",{src:t,alt:`${e??"Provider app"} logo`,style:{width:a,height:a,maxHeight:"90px",maxWidth:"180px",borderRadius:"8px"}}):(0,i.jsx)("span",{}),V=({appId:e})=>{let[t,a]=(0,l.useState)(void 0),{startCrossAppAuthFlow:r,authenticated:n}=(0,p.u)(),{data:s}=(0,p.a)(),{client:o}=(0,c.u)();return(0,l.useEffect)(()=>{(async()=>{o&&a(await o.getCrossAppProviderDetails(e))})()},[o]),(0,i.jsx)(d.U,{onClick:()=>r({appId:e,action:n?"link":"login",disableSignup:s?.login?.disableSignup}),disabled:!t,children:t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(W,{name:t.name,logoUrl:t.icon_url||void 0,size:"24px"})," ",t.name]}):(0,i.jsx)(d.G,{})})},D=({isEditable:e,setIsEditable:t,defaultValue:a})=>{let r=(0,l.useRef)(null);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.H,{$if:!e,children:(0,i.jsx)(y.C,{ref:r,defaultValue:a})}),(0,i.jsx)(d.H,{$if:e,children:(0,i.jsxs)(d.U,{onClick:()=>{t(),setTimeout(()=>{r.current?.focus()},0)},children:[(0,i.jsx)(d.V,{children:(0,i.jsx)(g.A,{})}),"Continue with Email"]})})]})},P=()=>{let[e,t]=(0,l.useState)(!1),{currentScreen:a,navigate:r,setModalData:n,data:s}=(0,p.a)(),{enabled:o,token:h}=(0,u.a)(),{initLoginWithFarcaster:g}=(0,c.u)(),{accountType:f}=(0,d.F)();return(0,i.jsxs)(d.U,{onClick:async()=>{t(!0);try{o&&!h?(n({captchaModalData:{callback:e=>g(e,s?.login?.disableSignup),userIntentRequired:!0,onSuccessNavigateTo:"FarcasterConnectStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),r("CaptchaScreen")):(await g(h,s?.login?.disableSignup),r("FarcasterConnectStatusScreen"))}
1catch(e){n({errorModalData:{error:e,previousScreen:a||"LandingScreen"}}),r("ErrorScreen")}finally{t(!1)}},disabled:!1,children:[(0,i.jsx)(j.F,{width:32,height:32})," Farcaster",e&&(0,i.jsx)(d.G,{}),"farcaster"===f&&(0,i.jsx)(H,{color:"gray",children:"Recent"})]})},H=(0,n.I4)(w.C).withConfig({displayName:"StyledChip",componentId:"sc-2f1c7323-0"})(["margin-left:auto;"]),_=({...e})=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",...e,children:[(0,i.jsxs)("g",{clipPath:"url(#clip0_2856_1743)",children:[(0,i.jsx)("path",{d:"M22.1673 8.24075V16.3642C22.1673 17.3256 21.3421 18.105 20.3241 18.105H17.0028M22.1673 8.24075C22.1673 7.27936 21.3421 6.5 20.3241 6.5H11.5302M22.1673 8.24075V8.42852C22.1673 9.03302 21.8352 9.59423 21.2901 9.91105L15.1463 13.4818C14.5539 13.8261 13.8067 13.8261 13.2143 13.4818L10.1621 11.5401",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M3.12913 6.64816C0.508085 12.9507 3.49251 20.1847 9.79504 22.8057L11.5068 23.5176C12.4522 23.9108 13.7783 23.2222 14.1714 22.2768L14.6054 21.2333C14.7687 20.8406 14.6438 20.3871 14.3024 20.1334L11.2872 17.8927C10.9878 17.6702 10.5843 17.6488 10.2632 17.8384L9.11575 18.5156C8.78274 18.7121 8.3597 18.6844 8.07552 18.4221C5.94293 16.4542 4.77629 13.6264 4.90096 10.7273C4.91757 10.3409 5.19796 10.023 5.57269 9.92753L6.86381 9.59869C7.22522 9.50664 7.49627 9.20696 7.55169 8.83815L8.10986 5.12321C8.17306 4.70259 7.94188 4.29293 7.54915 4.1296L6.50564 3.69564C5.56026 3.30248 4.23416 3.99103 3.84101 4.9364L3.12913 6.64816Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_2856_1743",children:(0,i.jsx)("rect",{x:"0.5",y:"0.5",width:"24",height:"24",rx:"6",fill:"white"})})})]}),F=({chainType:e,withPadding:t})=>{let a="";return a="ethereum-only"===e||"ethereum-and-solana"===e?"Rainbow, Phantom, or Coinbase Wallet":"Phantom or Solflare",(0,i.jsx)(d.W,{$withPadding:t,children:(0,i.jsxs)(d.X,{children:[(0,i.jsx)(b.A,{style:{color:"var(--privy-color-warn)",height:48,width:48}}),(0,i.jsx)("h3",{children:"No wallets available"}),(0,i.jsxs)("p",{children:["Please download an external wallet provider, like ",a,"."]})]})},"empty-wallet-state")},U=()=>{let{enabled:e,token:t}=(0,u.a)(),{navigate:a,setModalData:r,data:n}=(0,p.a)(),s=(0,o.u)(),{initLoginWithPasskey:h}=(0,c.u)(),g=()=>{s.loginConfig.passkeysForSignupEnabled?a("PasskeySelectSignupOrLogin"):(async()=>{e&&!t?(r({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:e=>h({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),a("CaptchaScreen")):(await h({withPrivyUi:!0,captchaToken:t}),r({passkeyAuthModalData:{passkeySignupFlow:!1}}),a("PasskeyStatusScreen"))})()};return 0===(0,l.useMemo)(()=>{let e=n?.login?.loginMethods;return e?e.filter(e=>"passkey"!==e).length:Object.entries(s.loginMethods).filter(([e,t])=>t).filter(([e])=>"passkey"!==e).length},[s.loginMethods,n?.login])?(0,i.jsxs)(d.U,{onClick:g,children:[(0,i.jsx)(C.A,{})," Continue with passkey"]}):(0,i.jsx)(k.L,{as:"button",onClick:g,size:"sm",variant:"navigation",style:{width:"100%",justifyContent:"center"},children:"I have a passkey"})},O=({isEditable:e,setIsEditable:t,defaultValue:a})=>{let r=(0,l.useRef)(null),{authenticated:n}=(0,p.u)(),{navigate:s,setModalData:h,currentScreen:g,data:f}=(0,p.a)(),{initLoginWithSms:x}=(0,c.u)(),{enabled:y,token:w}=(0,u.a)(),{whatsAppEnabled:j}=(0,o.u)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.H,{$if:!e,children:(0,i.jsx)(S.C,{ref:r,onSubmit:async function({qualifiedPhoneNumber:e}){if(!y||w||n)try{await x({phoneNumber:e,captchaToken:w,withPrivyUi:!0,disableSignup:f?.login?.disableSignup}),s("AwaitingPasswordlessCodeScreen")}catch(e){h({errorModalData:{error:e,previousScreen:g||"LandingScreen"}}),s("ErrorScreen")}else h({captchaModalData:{callback:t=>x({phoneNumber:e,captchaToken:t,withPrivyUi:!0,disableSignup:f?.login?.disableSignup}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),s("CaptchaScreen")}
1,defaultValue:a})}),(0,i.jsx)(d.H,{$if:e,children:(0,i.jsxs)(d.U,{onClick:()=>{t(),setTimeout(()=>{r.current?.focus()},0)},children:[(0,i.jsx)(d.V,{children:(0,i.jsx)(m,{})}),"Continue with ",j?"WhatsApp":"SMS"]})})]})},R={apple:{logo:M.A,displayName:"Apple"},discord:{logo:M.D,displayName:"Discord"},github:{logo:M.b,displayName:"GitHub"},google:{logo:M.G,displayName:"Google"},linkedin:{logo:M.L,displayName:"LinkedIn"},spotify:{logo:M.S,displayName:"Spotify"},instagram:{logo:M.I,displayName:"Instagram"},twitter:{logo:M.a,displayName:"Twitter"},tiktok:{logo:M.T,displayName:"TikTok"},line:{logo:T.L,displayName:"LINE"},twitch:{logo:T.T,displayName:"Twitch"}},$=({provider:e})=>{let{enabled:t,token:a}=(0,u.a)(),{navigate:r,setModalData:n,data:s}=(0,p.a)(),[h,g]=(0,l.useState)(!1),f=(0,o.u)(),{initLoginWithOAuth:m}=(0,c.u)(),{accountType:x}=(0,d.F)(),y=(0,l.useMemo)(()=>x&&"guest"!==x&&"authorization_key"!==x&&"cross_app"!==x?(0,u.t)(x):null,[x]),{displayName:w,logo:j}=(0,l.useMemo)(()=>{if((0,p.i)(e)){let t=f.customOAuthProviders.find(t=>t.provider===e),a=t.provider_icon_url,l=t.provider_display_name;return{displayName:l,logo:({style:e})=>(0,i.jsx)("img",{alt:`${l} logo`,src:a,style:e})}}return R[e]},[e,f.customOAuthProviders]);return(0,i.jsxs)(d.U,{onClick:()=>{g(!0),setTimeout(()=>{g(!1)},2e3),t&&!a?(n({captchaModalData:{callback:t=>m(e,t,s?.login?.disableSignup),userIntentRequired:!0,onSuccessNavigateTo:null,onErrorNavigateTo:"ErrorScreen"}}),r("CaptchaScreen")):m(e,void 0,s?.login?.disableSignup)},disabled:h,children:[(0,i.jsx)(d.V,{$fullSize:!0,children:(0,i.jsx)(j,{style:{width:"32px",height:"32px"}})}),w,y?.loginMethod===e&&(0,i.jsx)(z,{color:"gray",children:"Recent"})]})},z=(0,n.I4)(w.C).withConfig({displayName:"StyledChip",componentId:"sc-e74c7091-0"})(["margin-left:auto;"]),q=()=>{let{enabled:e,token:t}=(0,u.a)(),{navigate:a,setModalData:r,data:n}=(0,p.a)(),[s,o]=(0,l.useState)(!1),{initLoginWithTelegram:h}=(0,c.u)(),{accountType:g}=(0,d.F)();async function f(e){try{await h(e,n?.login?.disableSignup),r({telegramAuthModalData:{seamlessAuth:!1}}),a("TelegramAuthScreen")}catch(e){console.error(e),o(!1)}}return(0,i.jsxs)(d.U,{onClick:async function(){if(o(!0),e&&!t)return r({captchaModalData:{callback:f,userIntentRequired:!0,onSuccessNavigateTo:null,onErrorNavigateTo:"ErrorScreen"}}),void a("CaptchaScreen");await f(t)},disabled:s,children:[(0,i.jsx)(A.T,{width:32,height:32}),"Telegram","telegram"===g&&(0,i.jsx)(Z,{color:"gray",children:"Recent"})]})},Z=(0,n.I4)(w.C).withConfig({displayName:"StyledChip",componentId:"sc-639dd483-0"})(["margin-left:auto;"]),B=({onClick:e,text:t,icon:a})=>(0,i.jsxs)(d.U,{onClick:e,children:[(0,i.jsx)(d.V,{children:a}),(0,i.jsx)(d.Y,{children:t})]}),G=({connectOnly:e})=>{let{closePrivyModal:t}=(0,c.u)(),{data:a,setModalData:r,onUserCloseViaDialogOrKeybindRef:n,navigate:g}=(0,p.a)(),f=(0,o.u)(),m=a?.login,x=f.appearance.walletList,y=m?.walletChainType??f.appearance.walletChainType,{accountType:w,walletClientType:j,chainType:b}=(0,d.F)(),C=(0,l.useMemo)(()=>w&&"guest"!==w&&"authorization_key"!==w&&"cross_app"!==w?(0,u.t)(w):null,[w]),{email:k,sms:S,google:M,twitter:T,discord:A,github:N,spotify:W,instagram:H,tiktok:_,line:R,twitch:z,linkedin:Z,apple:G,wallet:et,farcaster:ea,telegram:ei}=(0,l.useMemo)(()=>m?.loginMethods?v(m.loginMethods,!0):null,[m])??f.loginMethods,{wallets:el}=(0,h.u)({enabled:(0,d.e)(et?x:[]),walletList:x,walletChainType:y}),er=f.customOAuthProviders,en=f.crossAppProviders,{passkey:es}=f.loginMethods,eo=[k&&"email",S&&"sms",M&&"google",T&&"twitter",A&&"discord",N&&"github",W&&"spotify",H&&"instagram",_&&"tiktok",R&&"line",z&&"twitch",Z&&"linkedin",G&&"apple",ea&&"farcaster",ei&&"telegram",...er.map(e=>e.provider),...en].filter(e=>!!e),ed=eo.length>0,ec=(0,l.useMemo)(()=>et&&!ed?"web3-first":et&&f?.appearance.loginGroupPriority||"web2-first",[et,ed,f?.appearance.loginGroupPriority]),ep=f?.appearance.hideDirectWeb2Inputs,[eu,eh]=(0,l.useState)("default"),[eg,ef]=(0,l.useState)(ee({mostRecentlyUsedAccountType:w,smsAvailable:S,emailAvailable:k,prefilledType:m?.prefill?.type}));(0,l.useEffect)(()=>{ef(ee({mostRecentlyUsedAccountType:w,smsAvailable:S,emailAvailable:k,prefilledType:m?.prefill?.type}))},[k,S,w]);let em=()=>{t({shouldCallAuthOnSuccess:!0}),setTimeout(()=>{eh("default")},150)};n.current=em;let ex=[];j&&et?ex.push(j):C?.loginMethod&&eo.includes(C.loginMethod)&&ex.push(C.loginMethod);let ey=t=>{if("email"===t)return(0,i.jsx)(D,{isEditable:"email"===eg,setIsEditable:()=>{ef("email")},defaultValue:"email"===m?.prefill?.type?m.prefill.value:void 0},t);
1if("sms"===t)return(0,i.jsx)(O,{isEditable:"sms"===eg,setIsEditable:()=>{ef("sms")},defaultValue:"phone"===m?.prefill?.type?m.prefill.value:void 0},t);if("apple"===t)return(0,i.jsx)($,{provider:"apple"},t);if("discord"===t)return(0,i.jsx)($,{provider:"discord"},t);if("farcaster"===t)return(0,i.jsx)(P,{},t);if("github"===t)return(0,i.jsx)($,{provider:"github"},t);if("google"===t)return(0,i.jsx)($,{provider:"google"},t);if("linkedin"===t)return(0,i.jsx)($,{provider:"linkedin"},t);if("tiktok"===t)return(0,i.jsx)($,{provider:"tiktok"},t);if("line"===t)return(0,i.jsx)($,{provider:"line"},t);if("twitch"===t)return(0,i.jsx)($,{provider:"twitch"},t);if("spotify"===t)return(0,i.jsx)($,{provider:"spotify"},t);if("instagram"===t)return(0,i.jsx)($,{provider:"instagram"},t);if("twitter"===t)return(0,i.jsx)($,{provider:"twitter"},t);if("telegram"===t)return(0,i.jsx)(q,{},t);if((0,p.i)(t))return(0,i.jsx)($,{provider:t},t);if(t.startsWith("privy:")){let e=t.split(":")[1];if(!e)throw Error("Invalid cross-app provider format. App ID missing.");return(0,i.jsx)(V,{appId:e},t)}let a=el.findIndex(({id:e})=>e===h.c.normalize(t)),l="solana"===b?"solana-only":"ethereum-only";return(0,i.jsx)(h.d,{recent:!0,index:a,data:{wallets:el,walletChainType:l,handleWalletClick(t){r(e=>({...e,externalConnectWallet:{walletList:x,walletChainType:l,preSelectedWalletId:t.id}})),g(e?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}})},ew=el.filter(e=>e.id!==h.c.normalize(j||"")),ej=ew.map((t,a)=>(0,i.jsx)(h.d,{index:a,data:{walletChainType:y,wallets:ew,handleWalletClick(t){r(e=>({...e,externalConnectWallet:{walletList:x,walletChainType:y,preSelectedWalletId:t.id}})),g(e?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}},t.id)),ev=eo.filter(e=>e!==C?.loginMethod).flatMap(ey),eb=ex.flatMap(ey);"web3-first"===ec&&"default"===eu?ej.unshift(...eb):"web2-first"===ec&&ev.unshift(...eb);let eC="web2-overflow"===eu?()=>eh("default"):void 0,ek=eo.filter(e=>"email"!==e&&"sms"!==e),eS=X({priority:ec,email:k,sms:S,social:ek}),eM=J({priority:ec,email:k,sms:S,social:ek}),eT=(0,i.jsx)(E.W,{text:Q({priority:ec}),onClick:()=>{r({...a,externalConnectWallet:{walletChainType:m?.walletChainType??f.appearance.walletChainType}}),g(e?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}),eA=(0,i.jsx)(B,{text:eS,icon:eM,onClick:()=>eh("web2-overflow")}),eE=+!ep,eL=et&&ej.length>0,eI=0===ev.length&&et&&0===ej.length,eN=5-!!eL,eW="default"===eu&&f?.appearance.logo,eV="default"===eu&&f.appearance.loginMessage;return(0,i.jsxs)(L.S,{title:f.appearance.landingHeader,icon:eW?(0,i.jsx)(I,{}):void 0,iconVariant:eW?"logo":void 0,onClose:em,showClose:!0,onBack:eC,showBack:!!eC,helpText:f||es&&"default"===eu?(0,i.jsxs)(i.Fragment,{children:[es&&"default"===eu&&(0,i.jsx)(U,{}),f&&(0,i.jsx)(s.T,{app:f})]}):void 0,watermark:!0,children:[eV&&("string"==typeof f.appearance.loginMessage?(0,i.jsx)(K,{children:f.appearance.loginMessage}):(0,i.jsx)(Y,{children:f.appearance.loginMessage})),(0,i.jsx)(d.Z,{$colorScheme:f.appearance.palette.colorScheme,children:"default"===eu&&"web2-first"===ec?(0,i.jsxs)(i.Fragment,{children:[ev.length>eN?ev.slice(0,eN-1):ev,ev.length>eN&&eA,eL&&eT,eI&&(0,i.jsx)(F,{chainType:f.appearance.walletChainType})]}):"default"===eu&&"web3-first"===ec?(0,i.jsxs)(i.Fragment,{children:[et&&(0,i.jsxs)(i.Fragment,{children:[ej.length>eN?ej.slice(0,eN-1):ej,ej.length>eN&&eT]}),ev.length>eE&&eA,ev.length===eE&&ev[0],eI&&(0,i.jsx)(F,{chainType:f.appearance.walletChainType})]}):"web2-overflow"===eu?(0,i.jsx)(i.Fragment,{children:"web3-first"===ec?ev:ev.slice(3)}):null})]})},K=n.I4.div.withConfig({displayName:"StyledSubtitle",componentId:"sc-c85d71fe-0"})(["text-align:center;font-size:14px;margin-bottom:24px;"]),Y=n.I4.div.withConfig({displayName:"MessageContainer",componentId:"sc-c85d71fe-1"})(["margin-bottom:24px;"]),X=({priority:e,email:t,sms:a,social:i})=>"web2-first"===e?"Other socials":t&&a&&i.length>0||t&&i.length>0?"Log in with email or socials":a&&i.length>0?"Log in with sms or socials":t&&a?"Continue with email or sms":t?"Continue with email":a?"Continue with sms":"Log in with a social account",J=({priority:e,email:t,sms:a,social:l})=>"web2-first"===e||l.length>0?(0,i.jsx)(x,{}):t&&a?(0,i.jsx)(_,{}):t?(0,i.jsx)(g.A,{}):a?(0,i.jsx)(m,{}):null,Q=({priority:e})=>"web2-first"===e?"Continue with a wallet":"Other wallets",ee=({mostRecentlyUsedAccountType:e,smsAvailable:t,emailAvailable:a,prefilledType:i})=>
1a&&("email"===e&&"phone"!==i||"email"===i)||!t||"phone"!==e&&"phone"!==i?"email":"sms",et=({connectOnly:e})=>{let{closePrivyModal:t,connectors:a}=(0,c.u)(),{data:n,setModalData:g,onUserCloseViaDialogOrKeybindRef:f,navigate:m}=(0,p.a)(),x=(0,o.u)(),y=x.appearance.palette.colorScheme,{accountType:w,walletClientType:j}=(0,d.F)(),v=(0,l.useMemo)(()=>w&&"guest"!==w&&"authorization_key"!==w&&"cross_app"!==w?(0,u.t)(w):null,[w]),b=x.loginMethodsAndOrder?.primary??[],C=x.loginMethodsAndOrder?.overflow??[],k=(0,l.useMemo)(()=>[...b,...C],[b,C]),S=x.loginMethods.passkey,M=n?.login,T=[];j&&k.includes(j)?T.push(j):w&&k.includes(v?.loginMethod)&&T.push(v?.loginMethod);let[A,E]=(0,l.useState)("default"),[L,I]=(0,l.useState)(ee({mostRecentlyUsedAccountType:w,smsAvailable:k.includes("sms"),emailAvailable:k.includes("email"),prefilledType:M?.prefill?.type}));(0,l.useEffect)(()=>{I(ee({mostRecentlyUsedAccountType:w,smsAvailable:k.includes("sms"),emailAvailable:k.includes("email"),prefilledType:M?.prefill?.type}))},[k,w]),(0,l.useEffect)(()=>{"phone"===w&&I("sms");let e=k.indexOf("sms"),t=k.indexOf("email");e>-1&&e<t&&I("sms")},[w,b,C]);let N=()=>{t({shouldCallAuthOnSuccess:!0}),setTimeout(()=>{E("default")},150)};f.current=N;let{listings:W}=(0,d.d)(),H=t=>{if("email"===t)return(0,i.jsx)(D,{isEditable:"email"===L,setIsEditable:()=>{I("email")},defaultValue:"email"===M?.prefill?.type?M.prefill.value:void 0},t);if("sms"===t)return(0,i.jsx)(O,{isEditable:"sms"===L,setIsEditable:()=>{I("sms")},defaultValue:"phone"===M?.prefill?.type?M.prefill.value:void 0},t);if("apple"===t)return(0,i.jsx)($,{provider:"apple"},t);if("discord"===t)return(0,i.jsx)($,{provider:"discord"},t);if("farcaster"===t)return(0,i.jsx)(P,{},t);if("github"===t)return(0,i.jsx)($,{provider:"github"},t);if("google"===t)return(0,i.jsx)($,{provider:"google"},t);if("linkedin"===t)return(0,i.jsx)($,{provider:"linkedin"},t);if("spotify"===t)return(0,i.jsx)($,{provider:"spotify"},t);if("instagram"===t)return(0,i.jsx)($,{provider:"instagram"},t);if("tiktok"===t)return(0,i.jsx)($,{provider:"tiktok"},t);if("line"===t)return(0,i.jsx)($,{provider:"line"},t);if("twitch"===t)return(0,i.jsx)($,{provider:"twitch"},t);if("twitter"===t)return(0,i.jsx)($,{provider:"twitter"},t);if("telegram"===t)return(0,i.jsx)(q,{},t);if(t.startsWith("privy:"))return(0,i.jsx)(V,{appId:t.replace("privy:","")},t);let l=x.appearance.walletChainType,r=new h.c(l,[t]).getWallets(a,W);return r.wallets.map((t,a)=>(0,i.jsx)(h.d,{index:a,data:{wallets:r.wallets,walletChainType:l,handleWalletClick(t){g(e=>({...e,externalConnectWallet:{walletList:k,walletChainType:l,preSelectedWalletId:t.id}})),m(e?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}},t.id+a))},_=T.flatMap(H),F=b.filter(e=>e!==j&&e!==v?.loginMethod).flatMap(H),R=C.filter(e=>e!==j&&e!==v?.loginMethod).flatMap(H),[z,Z]=(0,d._)([..._,...F,...R],ea({primary:F.length+_.length,overflow:R.length}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.M,{title:x.appearance.landingHeader,onClose:N,backFn:"default"===A?void 0:()=>{E("default")}}),"default"===A&&(0,i.jsx)(ei,{}),"default"===A&&("string"==typeof x.appearance.loginMessage?(0,i.jsx)(d.$,{children:x.appearance.loginMessage}):x.appearance.loginMessage),(0,i.jsx)(d.a0,{style:{overflow:"hidden"},children:(0,i.jsxs)(d.Z,{$colorScheme:y,children:["default"===A&&(0,i.jsxs)(i.Fragment,{children:[z,Z.length>0&&(0,i.jsx)(B,{text:"More options",icon:(0,i.jsx)(r,{}),onClick:()=>E("overflow")})]}),"overflow"===A&&(0,i.jsx)(i.Fragment,{children:Z}),S&&"default"===A&&(0,i.jsx)(U,{})]})}),x&&(0,i.jsx)(s.T,{app:x}),(0,i.jsx)(s.B,{})]})},ea=({primary:e,overflow:t})=>e<5?e:5===e&&0===t?5:4,ei=(0,n.I4)(e=>{let t=(0,o.u)();return t?.appearance.logo?(0,i.jsx)(N,{...e,children:(0,i.jsx)(I,{})}):null}).withConfig({displayName:"StyledAppLogoHeader",componentId:"sc-ead54d53-0"})(["margin-bottom:16px;"])},26440:(e,t,a)=>{a.d(t,{A:()=>i});let i=(0,a(43673).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},38549:(e,t,a)=>{a.d(t,{W:()=>n});var i=a(82470);let l=(0,a(43673).A)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);var r=a(67929);let n=({onClick:e,text:t})=>(0,i.jsxs)(r.U,{onClick:e,children:[(0,i.jsx)(r.V,{children:(0,i.jsx)(l,{})}),(0,i.jsx)(r.Y,{children:t})]})},43673:(e,t,a)=>{a.d(t,{A:()=>p});var i=a(62694);let l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),r=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,a)=>a?a.toUpperCase():t.toLowerCase()),n=e=>{let t=r(e);return t.charAt(0).toUpperCase()+t.slice(1)},s=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim()},o=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var d={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"};let c=(0,i.forwardRef)((e,t)=>{let{color:a="currentColor",size:l=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:c="",children:p,iconNode:u,...h}=e;return(0,i.createElement)("svg",{ref:t,...d,width:l,height:l,stroke:a,strokeWidth:n?24*Number(r)/Number(l):r,className:s("lucide",c),...!p&&!o(h)&&{"aria-hidden":"true"},...h},[...u.map(e=>
1{let[t,a]=e;return(0,i.createElement)(t,a)}),...Array.isArray(p)?p:[p]])}),p=(e,t)=>{let a=(0,i.forwardRef)((a,r)=>{let{className:o,...d}=a;return(0,i.createElement)(c,{ref:r,iconNode:t,className:s("lucide-".concat(l(n(e))),"lucide-".concat(e),o),...d})});return a.displayName=n(e),a}},63651:(e,t,a)=>{a.d(t,{C:()=>m});var i=a(82470),l=a(26440),r=a(62694),n=a(47056),s=a(59549),o=a(31913),d=a(72030),c=a(25552),p=a(67929),u=a(92225),h=a(75007),g=a(39046),f=a(63763);let m=(0,r.forwardRef)((e,t)=>{let[a,n]=(0,r.useState)(e.defaultValue||""),[g,m]=(0,r.useState)(""),[j,v]=(0,r.useState)(!1),{authenticated:b}=(0,c.u)(),{initLoginWithEmail:C}=(0,o.u)(),{navigate:k,setModalData:S,currentScreen:M,data:T}=(0,c.a)(),{enabled:A,token:E}=(0,d.a)(),[L,I]=(0,r.useState)(!1),{accountType:N}=(0,p.F)(),W=(0,s.u)();(0,r.useEffect)(()=>{!a&&W.disablePlusEmails&&T?.inlineError?.error instanceof o.c&&T?.inlineError?.error.privyErrorCode===o.b.DISALLOWED_PLUS_EMAIL&&!g&&m("Please enter a valid email address without a '+'."),g&&m("")},[a]);let V=(0,p.a1)(a),D=j||!V,P=()=>{S({login:T?.login,inlineError:void 0}),!A||E||b?(v(!0),C({email:a,captchaToken:E,disableSignup:T?.login?.disableSignup,withPrivyUi:!0}).then(()=>{k("AwaitingPasswordlessCodeScreen")}).catch(e=>{S({errorModalData:{error:e,previousScreen:M||"LandingScreen"}}),k("ErrorScreen")}).finally(()=>{v(!1)})):(S({captchaModalData:{callback:e=>C({email:a,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),k("CaptchaScreen"))};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(x,{children:[g&&(0,i.jsx)(f.E,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:g}),(0,i.jsxs)(y,{stacked:e.stacked,$error:!!g,children:[(0,i.jsx)(w,{children:(0,i.jsx)(l.A,{})}),(0,i.jsx)("input",{ref:t,id:"email-input",className:"login-method-button",type:"email",placeholder:"[email protected]",onFocus:()=>I(!0),onChange:e=>n(e.target.value),onKeyUp:e=>{"Enter"===e.key&&P()},value:a,autoComplete:"email"}),"email"!==N||L?e.stacked?(0,i.jsx)("span",{}):(0,i.jsx)(u.E,{isSubmitting:j,onClick:P,disabled:D,children:"Submit"}):(0,i.jsx)(h.C,{color:"gray",children:"Recent"})]})]}),e.stacked?(0,i.jsx)(u.P,{loadingText:null,loading:j,disabled:D,onClick:P,style:{width:"100%"},children:"Submit"}):null]})}),x=g.I,y=g.a,w=(0,n.I4)(p.V).withConfig({displayName:"StyledLoginMethodIconWrapper",componentId:"sc-30d3bab7-0"})(["display:inline-flex;"])},65042:(e,t,a)=>{a.d(t,{A:()=>l});var i=a(62694);let l=i.forwardRef(function(e,t){let{title:a,titleId:l,...r}=e;return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":l},r),a?i.createElement("title",{id:l},a):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.864 4.243A7.5 7.5 0 0 1 19.5 10.5c0 2.92-.556 5.709-1.568 8.268M5.742 6.364A7.465 7.465 0 0 0 4.5 10.5a7.464 7.464 0 0 1-1.15 3.993m1.989 3.559A11.209 11.209 0 0 0 8.25 10.5a3.75 3.75 0 1 1 7.5 0c0 .527-.021 1.049-.064 1.565M12 10.5a14.94 14.94 0 0 1-3.6 9.75m6.633-4.596a18.666 18.666 0 0 1-2.485 5.33"}))})},95991:(e,t,a)=>{a.d(t,{F:()=>l});var i=a(82470);let l=e=>(0,i.jsxs)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,i.jsx)("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#855DCD"}),(0,i.jsxs)("g",{"clip-path":"url(#clip0_1715_1960)",children:[(0,i.jsx)("path",{d:"M4.5 4H28.5V28H4.5V4Z",fill:"#855DCD"}),(0,i.jsx)("path",{d:"M11.1072 8.42105H21.6983V23.5789H20.1437V16.6357H20.1284C19.9566 14.7167 18.3542 13.2129 16.4028 13.2129C14.4514 13.2129 12.849 14.7167 12.6771 16.6357H12.6619V23.5789H11.1072V8.42105Z",fill:"white"}),(0,i.jsx)("path",{d:"M8.28943 10.5725L8.92101 12.7239H9.45542V21.4275C9.1871 21.4275 8.96959 21.6464 8.96959 21.9165V22.5032H8.87242C8.60411 22.5032 8.38659 22.7221 8.38659 22.9922V23.5789H13.8279V22.9922C13.8279 22.7221 13.6104 22.5032 13.3421 22.5032H13.2449V2
11.9165C13.2449 21.6464 13.0274 21.4275 12.7591 21.4275H12.1761V10.5725H8.28943Z",fill:"white"}),(0,i.jsx)("path",{d:"M20.2408 21.4275C19.9725 21.4275 19.755 21.6464 19.755 21.9165V22.5032H19.6579C19.3895 22.5032 19.172 22.7221 19.172 22.9922V23.5789H24.6133V22.9922C24.6133 22.7221 24.3958 22.5032 24.1275 22.5032H24.0303V21.9165C24.0303 21.6464 23.8128 21.4275 23.5445 21.4275V12.7239H24.0789L24.7105 10.5725H20.8238V21.4275H20.2408Z",fill:"white"})]}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_1715_1960",children:(0,i.jsx)("rect",{width:"24",height:"24",fill:"white",transform:"translate(4.5 4)"})})})]})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.